cln-1.3.3/0000755000000000000000000000000012173047127007164 5ustar cln-1.3.3/benchmarks/0000755000000000000000000000000012173046202011272 5ustar cln-1.3.3/benchmarks/README0000644000000000000000000000070211201634736012157 0ustar Bench1 is a benchmark for the transcendental functions I found on the LiDIA home page. Some of its tests are not good because they fall into pitfalls of some systems (for example exp(log(2)) is not a good test because in CLN, exp(x) begins by computing x mod log(2)). Also it fails to benchmark the most basic operations: multiplication and division. Bench2 is a benchmark jointly designed by the LiDIA and CLN developers to overcome these flaws. cln-1.3.3/benchmarks/timebench2b.cc0000644000000000000000000000725711201634736014004 0ustar #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace cln; int main (int argc, char * argv[]) { int digits = 100; int repetitions = 1; while (argc >= 3) { if (!strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; continue; } if (!strcmp(argv[1],"-n")) { digits = atoi(argv[2]); argc -= 2; argv += 2; continue; } break; } if (argc < 1) exit(1); cerr << "Number of digits: " << digits << endl; cerr << "Number of repetitions (except for pi,euler,e): " << repetitions << endl; float_format_t prec = float_format(digits); cl_F x1 = sqrt(cl_float(2,prec)); cl_F x2 = sqrt(cl_float(3,prec)); cl_F x3 = The(cl_F)(log(cl_float(2,prec))); cerr << "multiplication" << endl; { cl_F r = x1*x2; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { r = x1*x2; } } cout << r << endl << endl; } cerr << "sqrt" << endl; { cl_F r = sqrt(x3); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { r = sqrt(x3); } } cout << r << endl << endl; } cerr << "pi" << endl; { cl_F r; { CL_TIMING; r = pi(prec); } cout << r << endl << endl; } cerr << "eulerconst" << endl; { cl_F r; { CL_TIMING; r = eulerconst(prec); } cout << r << endl << endl; } cerr << "e" << endl; { cl_F r; { CL_TIMING; r = exp1(prec); } cout << r << endl << endl; } cerr << "exp" << endl; { cl_F r = exp(-x1); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { r = exp(-x1); } } cout << r << endl << endl; } cerr << "log" << endl; { cl_N r = log(x2); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { r = log(x2); } } cout << r << endl << endl; } cerr << "sin" << endl; { cl_R r = sin(5*x1); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { r = sin(5*x1); } } cout << r << endl << endl; } cerr << "cos" << endl; { cl_R r = cos(5*x1); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { r = cos(5*x1); } } cout << r << endl << endl; } cerr << "asin" << endl; { cl_N r = asin(x3); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { r = asin(x3); } } cout << r << endl << endl; } cerr << "acos" << endl; { cl_N r = acos(x3); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { r = acos(x3); } } cout << r << endl << endl; } cerr << "atan" << endl; { cl_F r = atan(x3); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { r = atan(x3); } } cout << r << endl << endl; } cerr << "sinh" << endl; { cl_F r = sinh(x2); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { r = sinh(x2); } } cout << r << endl << endl; } cerr << "cosh" << endl; { cl_F r = cosh(x2); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { r = cosh(x2); } } cout << r << endl << endl; } cerr << "asinh" << endl; { cl_N r = asinh(x3); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { r = asinh(x3); } } cout << r << endl << endl; } cerr << "acosh" << endl; { cl_N r = acosh(1+x3); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { r = acosh(1+x3); } } cout << r << endl << endl; } cerr << "atanh" << endl; { cl_N r = atanh(x3); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { r = atanh(x3); } } cout << r << endl << endl; } } cln-1.3.3/benchmarks/timebench2a.cc0000644000000000000000000000330711201634736013773 0ustar #include #include #include #include #include #include #include #include #include using namespace std; using namespace cln; int main (int argc, char * argv[]) { int digits = 100; int repetitions = 1; while (argc >= 3) { if (!strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; continue; } if (!strcmp(argv[1],"-n")) { digits = atoi(argv[2]); argc -= 2; argv += 2; continue; } break; } if (argc < 1) exit(1); cerr << "Number of digits: " << digits << endl; cerr << "Number of repetitions: " << repetitions << endl; float_format_t prec = float_format(digits); float_format_t prec2 = float_format(digits*2); cl_I pow = expt_pos(10,digits); cl_I x1 = floor1((sqrt(cl_float(5,prec2))+1)/2 * expt_pos(pow,2)); cl_I x2 = floor1(sqrt(cl_float(3,prec)) * pow); cl_I x3 = pow+1; cerr << "multiplication" << endl; { cl_I r = x1*x2; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { r = x1*x2; } } cout << r << endl << endl; } cerr << "division" << endl; { cl_I_div_t qr = floor2(x1,x2); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { qr = floor2(x1,x2); } } cout << qr.quotient << endl << qr.remainder << endl << endl; } cerr << "isqrt" << endl; { cl_I r = isqrt(x3); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { r = isqrt(x3); } } cout << r << endl << endl; } cerr << "gcd" << endl; { cl_I r = gcd(x1,x2); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { r = gcd(x1,x2); } } cout << r << endl << endl; } } cln-1.3.3/benchmarks/bench2.txt0000644000000000000000000000374611201634736013214 0ustar Benchmark for Computer-Algebra Libraries ======================================== (jointly developed by the LiDIA and CLN developers, 1996) A. Elementary integer computations B. Transcendental functions C. Elementary polynomial functions D. Polynomial factorization A. Elementary integer computations: The tests are run with N = 100, 1000, 10000, 100000 decimal digits. Precompute x1 = floor((sqrt(5)+1)/2 * 10^(2N)) x2 = floor(sqrt(3) * 10^N) x3 = 10^N+1 Then time the following operations: 1. Multiplication x1*x2, 2. Division (with remainder) x1 / x2, 3. integer_sqrt(x3), 4. gcd(x1,x2), A'. (from Pari) u=1;v=1;p=1;q=1;for(k=1..1000){w=u+v;u=v;v=w;p=p*w;q=lcm(q,w);} B. Transcendental functions: The tests are run with a precision of N = 100, 1000, 10000, 100000 decimal digits. Precompute x1 = sqrt(2) x2 = sqrt(3) x3 = log(2) Then time the following operations: 1. Multiplication x1*x2, 2. Square root sqrt(x3), 3. pi (once), 4. Euler's constant C (once), 5. e (once), 6. exp(-x1), 7. log(x2), 8. sin(5*x1), 9. cos(5*x1), 10. asin(x3), 11. acos(x3), 12. atan(x3), 13. sinh(x2), 14. cosh(x2), 15. asinh(x3), 16. acosh(1+x3), 17. atanh(x3). C. Univariate polynomials: The tests are run with degree N = 100, 1000, and with coefficient bound M = 10^9, 10^20. Precompute p1(X) = sum(i=0..2N, (floor(sqrt(5)*M*i) mod M)*(-1)^i * X^i) p2(X) = sum(i=0..N, (floor(sqrt(3)*M*i) mod M) * x^i Then time the following operations: 1. Multiplication p1(X)*p2(X), 2. Pseudo-division p1(X)*c^N = p2(X)*q(X)+r(X), 3. gcd(p1(X),p2(X)). D. Factorization of univariate polynomials: The benchmark by J. von zur Gathen. For N = 500, precompute p := smallest prime >= pi*2^N. Then time the following operation: 1. Factorize X^N+X+1 mod p in the ring F_p[X]. [von zur Gathen: A Polynomial Factorization Challenge. SIGSAM Bulletin 26,2 (1992), 22-24.] cln-1.3.3/benchmarks/timebench2.sh0000644000000000000000000000031411201634736013652 0ustar #!/bin/sh ./timebench2a -n 100 -r 100000 > /dev/null ./timebench2a -n 1000 -r 10000 > /dev/null ./timebench2a -n 10000 -r 100 > /dev/null ./timebench2a -n 100000 -r 100 > /dev/null ./timebench2ap -r 100 cln-1.3.3/benchmarks/timebench1.cc0000644000000000000000000001407111201634736013631 0ustar // Benchmarks from the LiDIA home page #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace cln; using namespace std; // Timings on Linux i486 33 MHz, 1000 decimal places = 104 32-bit words. // Function LiDIA Pari CLISP CLN // pi 0.17 / 0 0.38 / 0 0.12 / 0 // gamma 7.51 / 0 -- 3.75 / 0 // e 1.20 5.06 / 0.20 0.66 / 0.10 // multiplication 0.018 0.010 0.010 // sqrt(3) 0.051 0.012 0.01 // exp(log(2)) 3.13 0.08 / 3.94 0.04 // log(exp(2)) 3.07 4.93 / 2.75 1.34 // sin(pi/3) 1.53 2.98 0.58 // cos(pi/3) 1.59 2.16 0.58 // arcsin(sqrt(3)/2) 4.24 2.22 1.26 // arccos(sqrt(3)/2) 4.26 2.22 1.26 // sinh(log(2)) 3.16 2.02 0.03 // cosh(log(2)) 3.17 2.09 0.04 // arsinh(pi) 1.93 2.62 0.65 // arcosh(pi) 1.95 2.26 0.69 // (Versions: Pari 1.39, clisp-1996-07-22, cln-1996-11-17.) // Timings on Solaris Sparc 20, 75 MHz, 1000 decimal places = 104 32-bit words. // Function LiDIA Pari CLISP CLN // pi 0.06 / 0 0.04 / 0 0.028 / 0 // gamma 1.98 / 0 1.26 / 0 1.99 / 0 // e 0 0.15 0.15 // multiplication // sqrt(3) 0.0025 0.01 0.0025 // exp(log(2)) 0.25 0.39 0.010 // log(exp(2)) 0.21 0.39 0.31 // sin(pi/3) 0.071 0.18 0.13 // cos(pi/3) 0.070 0.19 0.13 // arcsin(sqrt(3)/2) 0.30 0.55 0.27 // arccos(sqrt(3)/2) 0.30 0.55 0.27 // sinh(log(2)) 0.25 0.41 0.010 // cosh(log(2)) 0.25 0.40 0.010 // arsinh(pi) 0.16 0.26 0.144 // arcosh(pi) 0.16 0.26 0.153 // (Versions: Pari 1.39, LiDIA 1.2.1 with libI, cln-1996-10-13.) int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 1) exit(1); fprint(std::cerr, "Number of repetitions: "); fprintdecimal(std::cerr, repetitions); fprint(std::cerr, "\n"); float_format_t prec = float_format(1000); fprint(std::cerr, "pi\n"); { cl_F p; { CL_TIMING; p = pi(prec); } { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_F p = pi(prec); } } cout << p << endl << endl; } fprint(std::cerr, "gamma\n"); { cl_F p; { CL_TIMING; p = eulerconst(prec); } { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_F p = eulerconst(prec); } } cout << p << endl << endl; } fprint(std::cerr, "e\n"); { cl_F p = exp1(prec); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_F p = exp1(prec); } } cout << p << endl << endl; } fprint(std::cerr, "sqrt(3)\n"); { cl_R p = sqrt(cl_float(3,prec)); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_R p = sqrt(cl_float(3,prec)); } } cout << p << endl << endl; } fprint(std::cerr, "exp(log(2))\n"); { cl_N p = exp(log(cl_float(2,prec))); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_N p = exp(log(cl_float(2,prec))); } } cout << p << endl << endl; } fprint(std::cerr, "log(exp(2))\n"); { cl_N p = log(exp(cl_float(2,prec))); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_N p = log(exp(cl_float(2,prec))); } } cout << p << endl << endl; } fprint(std::cerr, "sin(pi/3)\n"); { cl_R p = sin(pi(prec)/3); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_R p = sin(pi(prec)/3); } } cout << p << endl << endl; } fprint(std::cerr, "cos(pi/3)\n"); { cl_R p = cos(pi(prec)/3); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_R p = cos(pi(prec)/3); } } cout << p << endl << endl; } fprint(std::cerr, "arcsin(sqrt(3)/2)\n"); { cl_N p = asin(sqrt(cl_float(3,prec))/2); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_N p = asin(sqrt(cl_float(3,prec))/2); } } cout << p << endl << endl; } fprint(std::cerr, "arccos(sqrt(3)/2)\n"); { cl_N p = acos(sqrt(cl_float(3,prec))/2); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_N p = acos(sqrt(cl_float(3,prec))/2); } } cout << p << endl << endl; } fprint(std::cerr, "sinh(log(2))\n"); { cl_N p = sinh(log(cl_float(2,prec))); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_N p = sinh(log(cl_float(2,prec))); } } cout << p << endl << endl; } fprint(std::cerr, "cosh(log(2))\n"); { cl_N p = cosh(log(cl_float(2,prec))); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_N p = cosh(log(cl_float(2,prec))); } } cout << p << endl << endl; } fprint(std::cerr, "arsinh(pi)\n"); { cl_N p = asinh(pi(prec)); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_N p = asinh(pi(prec)); } } cout << p << endl << endl; } fprint(std::cerr, "arcosh(pi)\n"); { cl_N p = acosh(pi(prec)); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_N p = acosh(pi(prec)); } } cout << p << endl << endl; } } cln-1.3.3/benchmarks/timebench2ap.cc0000644000000000000000000000153711201634736014156 0ustar #include #include #include #include #include #include using namespace std; using namespace cln; int main (int argc, char * argv[]) { int limit = 1000; int repetitions = 1; while (argc >= 3) { if (!strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; continue; } if (!strcmp(argv[1],"-l")) { limit = atoi(argv[2]); argc -= 2; argv += 2; continue; } break; } if (argc < 1) exit(1); cerr << "Limit: " << limit << endl; cerr << "Number of repetitions: " << repetitions << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_I u = 1, v = 1, p = 1, q = 1; for (int k = 1; k <= limit; k++) { cl_I w = u+v; u = v; v = w; p = p*w; q = lcm(q,w); } } } } cln-1.3.3/benchmarks/Makefile.in0000644000000000000000000004745312172603767013372 0ustar # Makefile.in generated by automake 1.13.3 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. @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@ noinst_PROGRAMS = timebench1$(EXEEXT) timebench2a$(EXEEXT) \ timebench2ap$(EXEEXT) timebench2b$(EXEEXT) subdir = benchmarks DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/autoconf/depcomp README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alloca.m4 \ $(top_srcdir)/m4/as-underscore.m4 $(top_srcdir)/m4/cc.m4 \ $(top_srcdir)/m4/floatparam.m4 $(top_srcdir)/m4/general.m4 \ $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gmp.m4 \ $(top_srcdir)/m4/intparam.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/param.m4 \ $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/proto.m4 \ $(top_srcdir)/m4/rusage.m4 $(top_srcdir)/m4/times.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/autoconf/cl_config.h \ $(top_builddir)/include/cln/config.h \ $(top_builddir)/include/cln/host_cpu.h \ $(top_builddir)/include/cln/version.h \ $(top_builddir)/src/base/cl_base_config.h \ $(top_builddir)/src/base/cl_gmpconfig.h \ $(top_builddir)/src/timing/cl_t_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_timebench1_OBJECTS = timebench1.$(OBJEXT) timebench1_OBJECTS = $(am_timebench1_OBJECTS) timebench1_DEPENDENCIES = ../src/libcln.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am_timebench2a_OBJECTS = timebench2a.$(OBJEXT) timebench2a_OBJECTS = $(am_timebench2a_OBJECTS) timebench2a_DEPENDENCIES = ../src/libcln.la am_timebench2ap_OBJECTS = timebench2ap.$(OBJEXT) timebench2ap_OBJECTS = $(am_timebench2ap_OBJECTS) timebench2ap_DEPENDENCIES = ../src/libcln.la am_timebench2b_OBJECTS = timebench2b.$(OBJEXT) timebench2b_OBJECTS = $(am_timebench2b_OBJECTS) timebench2b_DEPENDENCIES = ../src/libcln.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(timebench1_SOURCES) $(timebench2a_SOURCES) \ $(timebench2ap_SOURCES) $(timebench2b_SOURCES) DIST_SOURCES = $(timebench1_SOURCES) $(timebench2a_SOURCES) \ $(timebench2ap_SOURCES) $(timebench2b_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS_UNDERSCORE = @AS_UNDERSCORE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLNLIB_RPATH = @CLNLIB_RPATH@ CL_VERSION = @CL_VERSION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GMP_RPATH_CFG = @GMP_RPATH_CFG@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_VERSION_INFO = @LT_VERSION_INFO@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ 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@ SED = @SED@ 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_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ timebench1_SOURCES = timebench1.cc timebench1_LDADD = ../src/libcln.la timebench2a_SOURCES = timebench2a.cc timebench2a_LDADD = ../src/libcln.la timebench2ap_SOURCES = timebench2ap.cc timebench2ap_LDADD = ../src/libcln.la timebench2b_SOURCES = timebench2b.cc timebench2b_LDADD = ../src/libcln.la AM_CPPFLAGS = -I../include -I$(top_srcdir)/include DEFAULT_INCLUDES = -I.@am__isrc@ EXTRA_DIST = README bench2.txt timebench2.sh all: all-am .SUFFIXES: .SUFFIXES: .cc .lo .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) --foreign benchmarks/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign benchmarks/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): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list timebench1$(EXEEXT): $(timebench1_OBJECTS) $(timebench1_DEPENDENCIES) $(EXTRA_timebench1_DEPENDENCIES) @rm -f timebench1$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timebench1_OBJECTS) $(timebench1_LDADD) $(LIBS) timebench2a$(EXEEXT): $(timebench2a_OBJECTS) $(timebench2a_DEPENDENCIES) $(EXTRA_timebench2a_DEPENDENCIES) @rm -f timebench2a$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timebench2a_OBJECTS) $(timebench2a_LDADD) $(LIBS) timebench2ap$(EXEEXT): $(timebench2ap_OBJECTS) $(timebench2ap_DEPENDENCIES) $(EXTRA_timebench2ap_DEPENDENCIES) @rm -f timebench2ap$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timebench2ap_OBJECTS) $(timebench2ap_LDADD) $(LIBS) timebench2b$(EXEEXT): $(timebench2b_OBJECTS) $(timebench2b_DEPENDENCIES) $(EXTRA_timebench2b_DEPENDENCIES) @rm -f timebench2b$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timebench2b_OBJECTS) $(timebench2b_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timebench1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timebench2a.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timebench2ap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timebench2b.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs 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 $(PROGRAMS) installdirs: 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-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -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-dvi: install-dvi-am install-dvi-am: install-exec-am: 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 -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool 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-info \ install-info-am 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 mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # 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: cln-1.3.3/benchmarks/Makefile.am0000644000000000000000000000076211201634736013341 0ustar noinst_PROGRAMS = timebench1 timebench2a timebench2ap timebench2b timebench1_SOURCES = timebench1.cc timebench1_LDADD = ../src/libcln.la timebench2a_SOURCES = timebench2a.cc timebench2a_LDADD = ../src/libcln.la timebench2ap_SOURCES = timebench2ap.cc timebench2ap_LDADD = ../src/libcln.la timebench2b_SOURCES = timebench2b.cc timebench2b_LDADD = ../src/libcln.la AM_CPPFLAGS = -I../include -I$(top_srcdir)/include DEFAULT_INCLUDES = -I.@am__isrc@ EXTRA_DIST = README bench2.txt timebench2.sh cln-1.3.3/aclocal.m40000644000000000000000000011446212172603765011041 0ustar # generated automatically by aclocal 1.13.3 -*- 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.13' 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.13.3], [], [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.13.3])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Figure out how to run the assembler. -*- 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_PROG_AS # ---------- AC_DEFUN([AM_PROG_AS], [# By default we simply use the C compiler to build assembly code. AC_REQUIRE([AC_PROG_CC]) test "${CCAS+set}" = set || CCAS=$CC test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl ]) # 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], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])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. # 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: # # 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 ]) 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])]) # 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 /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 m4_include([m4/alloca.m4]) m4_include([m4/as-underscore.m4]) m4_include([m4/cc.m4]) m4_include([m4/floatparam.m4]) m4_include([m4/general.m4]) m4_include([m4/gettimeofday.m4]) m4_include([m4/gmp.m4]) m4_include([m4/intparam.m4]) m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) m4_include([m4/libtool.m4]) m4_include([m4/longdouble.m4]) m4_include([m4/longlong.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/param.m4]) m4_include([m4/perror.m4]) m4_include([m4/proto.m4]) m4_include([m4/rusage.m4]) m4_include([m4/times.m4]) cln-1.3.3/README0000644000000000000000000000237311731472024010046 0ustar Class Library for Numbers Copyright (c) Bruno Haible 1988-2008 Copyright (c) Richard Kreckel 2000-2012 Copyright (c) Alexei Sheplyakov 2008-2010 GPL Features: - Rich set of number classes: Integer (unlimited precision), rational, short float, single float, double float, long float (unlimited precision), complex, modular integer, univariate polynomial. - Elementary, logical, transcendental functions. - C++ as implementation language brings - efficiency, - type safety, - algebraic syntax. - Memory efficiency: - Small integers and short floats are immediate, not heap allocated. - Automatic, non-interruptive garbage collection. - Speed efficiency: - Assembly language kernel for some CPUs, - Karatsuba and Schönhage-Strassen multiplication. - Interoperability: - Garbage collection with no burden on the main application, - hooks for memory allocation. Requires: C++ compiler g++. The following C++ features are used: classes, member functions, overloading of functions and operators, constructors and destructors, inline, const, multiple inheritance, templates, namespaces, and exceptions. The following C++ features are not used: new, delete, virtual inheritance. Homepage: cln-1.3.3/TODO0000644000000000000000000000226411201634735007656 0ustar Algorithms: Niels Moeller's subquadratic GCD - polynomial division and gcd - polynomial documentation 7. add combinatorial, linear algebra, factorization, polynomial functions as in SAC-2. 7. finite fields, e.g. - gf256_log_2, gf256_antilog_2, gf256_power_of_2, gf256_add, gf256_minus, gf256_subtract, gf256_mul, gf256_inv, gf256_div, gf256_product, gf256_exp, gf256_term, gfmul, gfadd, gfinv, gfexp. more polynomial operations: x(), power, >>, <<, division, scalmult, content, primitivepart, gcd, xgcd, no_of_real_roots, factorization. modular polynomials: powmod etc. 7. chinese remainder algorithm, maybe Hensel-lifting as in Magnum. 8. factor and primality testing for small integers 8. primality test in Z: + polynomials cl_MUP_MI, cl_MUP_I use integer FFT for multiplication in cl_UP_MI and cl_MUP_MI + - Pollard rho + - complex values of j() - Hilbert polynomial for j() 7.6.1 + roots of polynomials mod N 1.6.1 + - elliptic curves, Jacobi representation - m.P on elliptic curve + Atkin's algorithm 10. factoring in Z: - small prime table, - Pollard rho, - multiple polynomial quadratic sieve Document the timing class cln-1.3.3/tests/0000755000000000000000000000000012173046202010317 5ustar cln-1.3.3/tests/exam_RA_div.cc0000644000000000000000000003732011201634740013012 0ustar #include "exam.h" #include #include static div_test rational_div_tests[] = { { "7013212896988366906/12397903473277899947", "818833870013215068/2125577647443895255", "7453564285301859120853045020886215515/5075911640537211768265804260348400698" }, { "-15781329068048599432/14942574238341613337", "4388772934226358350/2640112802717985697", "-20832244458230302534551181278529162052/32789782692450857054331267544650656975" }, { "-9015230453321124271/17425619133302730035", "-10422000746814766599/14972344381173680534", "134979135022768387806775446187867640714/181609815620990738305316999098032100965" }, { "-14741075237791868512/12448692140900938227", "-1090381863721238817/1060836378253796023", "15637868866825840780217685066084527776/13573828137487503515304766902031557459" }, { "-7371815071140740177/4722722556038701367", "3872455829192658988/994203944294825175", "-7329087620340161131469364260313555975/18288534491791723206480607737200436596" }, { "-9856364379969390509/7988230468709836259", "-7208901117187058135/7430860779232874136", "1093153305924514768551484985555671272/859497963436269188803272225817371895" }, { "-16740689272507881147/56924866550406451570641164619431212169", "-14712532880452686095/143481612520580129383584255576273223983", "2401981091525408257128502717450566513166280001357873948501/837508970838236191644285394369194561392491093277901090055" }, { "1874027699956565000/65960003455647360668413772300355814843", "-172394881832672950/2006879686300828197846469567507151887", "-75218962452157875130617756878839223573611935155763100/227423340028380523596387094039260091189651621559491937" }, { "851521912886492079/58839621451933520132430725102159653727", "-5525838657334730480/268863138354222710211869290179088409033", "-228942853876053297959532391872114722003932597144466549607/325138254802036127673497464266072288930584674567672498960" }, { "2130823024472312937/30463932363736038600114358208342163020", "413938864244113775/131673792970459944919771618253738144891", "280573549781056638388629087822719475587456644826399754867/12610205563054396144647765193069861697742251186477600500" }, { "17234694073181371137/253506951459931119968572673772742357160", "8407879684613951161/42697666588937447817581914537644794355", "147176244259806896721181660841298454615950364713859506327/426291189417673978158704851675227114861497071554451732552" }, { "14739301038477826821/4801125431810347467140397350459581435", "-1752125940488995048/127905197451270157484305628763539243969", "-1885233209620217720514367144506571751170505057476450692549/8412176412616337518572109406238500578932979745867733880" }, { "9194848570227974720/45448499872046683203864930109076126035374684748838016011669264943000310475483", "-4572473918523931944/28941042619577200519536336906341131911598596429670188136734086846500956354149", "-33263563043940787786171015409141766453199063320923723716765930467953050399983260590187417389160/25976510037621464639740779963549572814837984766154635046133743883024710122710674726552171566119" }, { "-2662376868940711929/2674240208804755702377222409224408783678596883960539287029565653749020338064", "-5046618244273151929/26826013625152995057141957222948811537350409769204161465077735924332004069058", "35710479080747854012875521001477955195584454274704368888444222736697434540936425667291700196441/6747934713661461716612153292457811722283965560031580498434684530869001786777260513409206862728" }, { "646980248518054663/28444849537262537816809349756569888989442483441699293309597267649158853799707", "-10174938507557455325/16470612178414296088079890015341965945714023680627341561729034923083435428747", "-10656160760434978971303471120231114671340660575734505071429575384684610862775940451177787597261/289424594898370460244167952344748286246980979584479610186308309369583658143095854438992150589775" }, { "1268676597518744714/6024937921458004492480888468749320142603908196076058575752452561172018490893", "17823595902143962912/85935047374548136904062562443188289405155329832270007415035044821925251080203", "18170630585125644385503771892175817370913744757273904248648000044618805359154885235028182716157/17897676474595109057512045856227678061218241143085827332930191066967148125532813505892133626736" }, { "-3035741006152688190/58890268425224581569217175195410848521985674465189565646495474378301884202047", "-4870935665435665519/47998868922405332801456101880162843269583282603435159879276723163289928325531", "145712134636693761356266465698326002831562744975420904782663360472436650653549187025441059178890/286850708819506259357726384810790881448875152111132928069815447961129371272624891025817707117393" }, { "-4420263280205408439/38682162086456801604593696710774835436326970692840048042132553053971380151628", "-758651402628235427/1755534012040040367913026343944696058732638465867705260088080517539506722166", "3879961265286134914514096239640695384126081133972137242327715997675029567458817030555062379437/14673138261791601182714628661554161812345431143865809776872034934342213839184709418896670662578" }, { "-312487180249669742743295380499853180353/9828632991038934281", "-86131955660561774942466932680637336739/10268762916730341592", "3208856768501438660232746468300370677374054716853273141976/846559380988100144557815474234956961169507773676687849659" }, { "105376075880566042097567073713047434893/11411565636673693365", "-220737802783327232867818580441304577024/5817406274606660773", "-613015445021032499619145665530563205764250055719854552289/2518963924957071797477174332253152325843619212749200245760" }, { "-311533429150518992652072799089375050497/4403073054828470603", "-320230219907951760832723580313293021909/1370493254961533625", "426954463345823097468320537904981772054351338526938461625/1409997052618498081840381197699863669488222338862641441127" }, { "305676222727436457375950609916137360009/2001517485431820526", "324338803123828318219640932070020543912/11123178903397935211", "3400091311912189654145957985944153094384781502787164376899/649169785656371151621897383467144093766684841422885937712" }, { "8845112929712368402815105446090151026/8124751572615311799", "-107609110538267962880281203537194473336/8714443449141779053", "-38540118213625599008519681983731393728094066419546629189/437148645036763776481446937412401903340367189496615845732" }, { "152921217721894690043853278309581658066/11705615305395353865", "184187448038871874764725486848823516773/4171619104693691390", "127585814672335876029018138907883882524550368713261650348/431205482165106014329333719781838993214328411764819575529" }, { "16414254293541341780725162107696242521/155838132618727968561620486302365154071", "323320173010032367023620851618405869489/49801924105617352177018959505967933104", "817461446577249670665800625691379410535771218196808189195363718417488315184/50385611999847495177988476252475899813264458225659097815552272081452203039719" }, { "-188149667625860588508273820953820709614/21438745582767797684161462130971215025", "128458309657689922121539794960212789849/134174286369366827879740776978166655691", "-25244847384333405496229128525982900130397411994350175944375943735942831513274/2753985018743617742875555653653797261370358442640799457019039857068516281225" }, { "1218460641064115152742257147372113443/1773382194117714970762642066492794929", "-105212349758139121832338365854603836112/35045896682356785176328011712384921341", "-42702045738251194875426595475683618047253961691478453648029952948483687063/186581707662369193907913729212042024270164277319717456729276609131940676048" }, { "1467722271775252460214852151179762687/1747611358981474614363356529179985509", "25495740211005247928144692929451604259/29615224810946461612486375021101910565", "14488975012885720730598332784736375353299643425098519766594278819666029385/14852215066131169889445443721709162270198753408805825268529301698140894277" }, { "6278399735526726207674375684072448068/13890681759576280617381650633747782321", "-112063146811220963294237186476216238443/46495820670393894026441353693945662660", "-291919348200099113895651901892723884699250237261456280525601785996696740880/1556633509331345870779770006255469001211806559199158615405344674499795966203" }, { "248406099260780863433196593538936526373/315762135750029127758352280023694126018", "-24578051912523675039725210046249323571/3033769619337997374435389027823294736", "-376803438597807975522050212312559316811899647514236724224019181136008036264/3880409082236781853269738100403484871805889674074731389226471480469265885139" }, { "-305871752543087256004326578375555909668/80170799467978436032303243749692785696371676780847080230403479135749775915991", "-208573266832391890136462745593008906685/96016271562601269514856687672805175650907293023094157826925793080307407361434", "29368665255505841438632782694581946057561031972462112644657516768267440383833513431444679871238206541553985530943912/16721485549600848123731461311227384049611071114404954309505697259277905994635125654414916826332204568970567318299835" }, { "-171651126582338417143004525987733942986/48126955023093310081685702171788275811688444573315712039582092051531229683107", "32570134112026732491936310765048378699/18584159151613423191553551933672204731023422884196280183931777685641069715348", "-3189991854959918631828923606391779823799241149346421336570141741355492000935500642040047513113849334779592681149128/1567501379505627719887579027549074087653888429037997616626567546431482074522690424133509833932668944596793898937793" }, { "-31304786393644787215292629624842492472/10539846271603297974613179098685212701091372728582260780054561526149580513583", "43496364289252206338797704034889660065/966865502932307025364733802774045297740949567802356684866342045679773834966", "-30267518040679809082934454680954168768135550720881039440573156734314284479043791824457029301083428211405425375952/458444992982373700837242411005687390212275114474481688646320865335043970683786989531994936463047685893258985162895" }, { "124366625369659591476708994326732418029/107684759001536292829359995221778346870065030877016948429894748600664800488759", "-90949754058598173499067700725927605729/79727020098830307921496202496061295138733611655702270828135321391380898414003", "-9915380440470549523296226431396644117384598256053664887332801972488440466568616812942647849957495261151611303260087/9793902347049141646079571573977765974008832433473016883117384010293158932212528563016145547341801740792289848500311" }, { "26792084925762094333829722201654015569/6815899891200140342329613369008754659665480100088941978786466272502677117648", "179968988142253715757129058636648023126/97033837835570527321466682927970125702018459951415339098532052222053589117353", "866579607987744230609336186273867662887766686833260209925103055244528379635362816895584608387230956963010276689619/408883535566062149539621907018509777969515872715944952500700527207173412646715462423653890585029605025758308909216" }, { "320794852821756057819990044473359503428/42380074203350930293358543616207018031675687905746455222111844144668904183229", "-11813439835454851567822019323728871339/51852159737956631156972450987013128151750117741949546305537111598356497409240", "-5544635317209327550045071802859986261979158492907374734760649234578367469399038563605323839330681533705071632958240/166884818941132804535892580774781586387104334774784737031184369589400544303785250219152004898392301479219940857877" }, { "63160395612932962868082774785156358041658469338654564454114468396132462549944/5671929772244157797", "19541045450680948617094710246839287171374470593288265457341382295544977156173/10827756125123268218", "227961786821047895774887365257727015864174017882302289602409601101722343657899277052494444293264/36945145824164509580938949252327087600266044162541122809277442696583642758457532273140841543627" }, { "31389399613343712511677734270541516183531975055644318154870016415582858008412/11320913214023484367", "-95931706646769408081251897664360951854776052790951374912970042200868629796051/14301831604104230477", "-149641969141325406602881756591195860220337618158488775091717625369334526143115090325362684257508/362011508473745439254610688691597507367516106821889963803421575701854031622412859179610532278239" }, { "-50845041077039215658764589763556935122444212169574762080162289087527164772395/482986173890811026", "-51342299909113507561385579724776151277474630060658338514843664853027455595538/3864573616937705869", "196494404298439669659681446421686066898686292162412914850963937042669022612531239234324840686255/24797620991857267698917294149872672843409173617406514673128342148521539559341861421304646801988" }, { "76283614020376921713154299810619585257752996149145061806263596894412414185408/337890011287912517039286436540240936661", "70530558237421368381589233382700323659036925075366138096846582768833233488577/12121510300837787759729092713205686989", "924672613133132744522463879340347327755455994321131972145048214329608890428265966744607561005512244129921459256512/23831571118985077324412202325831974453532679575894228007993082738742295289254461850021038245882565939546151124021397" }, { "13518475961402756750057330871273933874583566313800024119371308450919239424622/71146816100737230880567880716110051085", "-11914742388051168959634071864657967837347162591767656949770878950409478930980/166466796775669753065110807850377519909", "-1125188695291804746273664719520877594103080002716204716437885631737502681157239448228517736957154781558316254899699/423847992785167635691798025732868758201476408654527740579259436528169254792708107390082891890404030666159494556650" }, { "-53624051286117226406327700847140806598091981633622544805551583455315188018537/149060170957501829683988930330276188371", "-49540630291338976658332195799658601133012561780540500265134312414843218811481/313014990314092319823049811442768272842", "16785131893926373429171158665038393627227592608630727377590747943991201054188961463248027101037470630205119769672154/7384534820569381535972144752572408048556227885764547207137140227958732266609348654686668662110083737942669493487451" }, { "2634758410586745842739353561704344884865889793873131750193619887157306355755/83106075320614705363810122092414199463231740446254118542567688658288107572919", "10787649314660479714744029413883607304719873485501736976813666398631455642569/2439964488756696481271244145022481444549967702052558191280867337292105066432", "2142905652761565172685487282499186838096673751132490328620490049367034561455889328384026705096013173825469773464105722689198047146574263705663366838720/298839732158850477765824602476778580028064205733214070073086531571837859351705342746223206218407306637658483098569582239416197836311325170250187389329637" }, { "-1907320079310938642409293211056905401889419041722087613680756850005726714712/10387378553621846874105702088597026076825105075730032753153301604042569998683", "113647247724474559442709588703965365251731833799417671287796250968092484717057/58756890421232187224353930678527831208703723187770044891160428018937233424397", "-37356065632762902117955690133395145368676268194116097031480521390942668514422835237280325034441435052929702455487858500299401976652159912902024146542888/393498994563785425899168694480259206994308562177080555315323154941891277193612821825931878224565302417504072329241812530787363937691786269618438039211977" }, { "-54987418627898620923060954379316763081930842855917193391807940070173620336071/17370345837184638879794373707261631548922174314274224219546763452439685451597", "107349939397731511365417710412808670916754334908520065561311453951414109180973/7800708635318451621630266369706695626474649690647985662113853436261704078874", "-428940831324519456770429889832838610542119304716244392653623661175655561457214418178921042544524225772650432309479656622489393939407340321261255371264054/1864705572939408818246392762570376592749103793151936455808919833872532407312841098160841844995663367019074328670998871082130543124576872890789577304863881" }, }; cln-1.3.3/tests/exam_FF.cc0000644000000000000000000000024511201634740012135 0ustar #include "exam_FF_plus.cc" #include "exam_FF_minus.cc" #include "exam_FF_mul.cc" #include "exam_FF_div.cc" #include "exam_FF_floor.cc" DO_TESTS(ffloat,cl_FF,cl_FF) cln-1.3.3/tests/test_I_lognor.cc0000644000000000000000000000041611201634740013437 0ustar #include "test_I.h" int test_I_lognor (int iterations) { int error = 0; int i; // Check against logior. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); ASSERT2(lognor(a,b) == lognot(logior(a,b)), a,b); } return error; } cln-1.3.3/tests/test_I.cc0000644000000000000000000000657011201634740012066 0ustar #include // Elementary operations. extern int test_I_abs (int iterations); extern int test_I_compare (int iterations); extern int test_I_plus (int iterations); extern int test_I_minus (int iterations); extern int test_I_plus1 (int iterations); extern int test_I_minus1 (int iterations); extern int test_I_mul (int iterations); extern int test_I_div (int iterations); // Euclidean ring operations. extern int test_I_gcd (int iterations); extern int test_I_xgcd (int iterations); // Bit vector operations. extern int test_I_ash (int iterations); extern int test_I_evenp (int iterations); extern int test_I_oddp (int iterations); extern int test_I_lognot (int iterations); extern int test_I_logand (int iterations); extern int test_I_logandc1 (int iterations); extern int test_I_logandc2 (int iterations); extern int test_I_logior (int iterations); extern int test_I_logorc1 (int iterations); extern int test_I_logorc2 (int iterations); extern int test_I_logxor (int iterations); extern int test_I_lognand (int iterations); extern int test_I_lognor (int iterations); extern int test_I_logeqv (int iterations); extern int test_I_boole (int iterations); extern int test_I_logbitp (int iterations); extern int test_I_logtest (int iterations); extern int test_I_ldb (int iterations); extern int test_I_ldb_test (int iterations); extern int test_I_mask_field (int iterations); extern int test_I_dpb (int iterations); extern int test_I_deposit_field (int iterations); extern int test_I_logcount (int iterations); extern int test_I_integer_length (int iterations); extern int test_I_ord2 (int iterations); extern int test_I_power2p (int iterations); // More complex operations. extern int test_I_isqrt (int iterations); extern int test_I_sqrtp (int iterations); // Miscellaneous. extern int test_I_io (int iterations); extern int test_I_GV (int iterations); #define RUN(tester,iterations) \ std::cout << "Testing "#tester"..." << std::endl; \ error |= tester (iterations); int test_I (int iterations) { int error = 0; // Elementary operations. RUN(test_I_abs,iterations); RUN(test_I_compare,iterations); RUN(test_I_plus,iterations); RUN(test_I_minus,iterations); RUN(test_I_plus1,iterations); RUN(test_I_minus1,iterations); RUN(test_I_mul,iterations); RUN(test_I_div,iterations); // Euclidean ring operations. RUN(test_I_gcd,iterations); RUN(test_I_xgcd,iterations); // Bit vector operations. RUN(test_I_ash,iterations); RUN(test_I_evenp,iterations); RUN(test_I_oddp,iterations); RUN(test_I_lognot,iterations); RUN(test_I_logand,iterations); RUN(test_I_logandc1,iterations); RUN(test_I_logandc2,iterations); RUN(test_I_logior,iterations); RUN(test_I_logorc1,iterations); RUN(test_I_logorc2,iterations); RUN(test_I_logxor,iterations); RUN(test_I_lognand,iterations); RUN(test_I_lognor,iterations); RUN(test_I_logeqv,iterations); RUN(test_I_boole,iterations); RUN(test_I_logbitp,iterations); RUN(test_I_logtest,iterations); RUN(test_I_ldb,iterations); RUN(test_I_ldb_test,iterations); RUN(test_I_mask_field,iterations); RUN(test_I_dpb,iterations); RUN(test_I_deposit_field,iterations); RUN(test_I_logcount,iterations); RUN(test_I_integer_length,iterations); RUN(test_I_ord2,iterations); RUN(test_I_power2p,iterations); // More complex operations. RUN(test_I_isqrt,iterations); RUN(test_I_sqrtp,iterations); // Miscellaneous. RUN(test_I_io,iterations); RUN(test_I_GV,iterations); return error; } cln-1.3.3/tests/test_I_ord2.cc0000644000000000000000000000051011201634740013000 0ustar #include "test_I.h" int test_I_ord2 (int iterations) { int error = 0; int i; // Check against ash and oddp. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); if (a != 0) { uintC n = ord2(a); cl_I b = ash(a,-(sintC)n); ASSERT1(oddp(b), a); ASSERT1(a == ash(b,(sintC)n), a); } } return error; } cln-1.3.3/tests/test_I_boole.cc0000644000000000000000000000175411201634740013245 0ustar #include "test_I.h" int test_I_boole (int iterations) { int error = 0; int i; for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); ASSERT2(boole(boole_clr,a,b) == 0, a,b); ASSERT2(boole(boole_set,a,b) == -1, a,b); ASSERT2(boole(boole_1,a,b) == a, a,b); ASSERT2(boole(boole_2,a,b) == b, a,b); ASSERT2(boole(boole_c1,a,b) == lognot(a), a,b); ASSERT2(boole(boole_c2,a,b) == lognot(b), a,b); ASSERT2(boole(boole_and,a,b) == logand(a,b), a,b); ASSERT2(boole(boole_ior,a,b) == logior(a,b), a,b); ASSERT2(boole(boole_xor,a,b) == logxor(a,b), a,b); ASSERT2(boole(boole_eqv,a,b) == logeqv(a,b), a,b); ASSERT2(boole(boole_nand,a,b) == lognand(a,b), a,b); ASSERT2(boole(boole_nor,a,b) == lognor(a,b), a,b); ASSERT2(boole(boole_andc1,a,b) == logandc1(a,b), a,b); ASSERT2(boole(boole_andc2,a,b) == logandc2(a,b), a,b); ASSERT2(boole(boole_orc1,a,b) == logorc1(a,b), a,b); ASSERT2(boole(boole_orc2,a,b) == logorc2(a,b), a,b); } return error; } cln-1.3.3/tests/exam_I_div.cc0000644000000000000000000023757611201634740012717 0ustar #include "exam.h" #include #include #include #include static div_test integer_div_tests[] = { { "10105597264942543888", "14352488138967388642", "5052798632471271944/7176244069483694321" }, { "-17631701977702695093", "3931860028646338313", "-17631701977702695093/3931860028646338313" }, { "-1606495881715082381", "16324360910828438638", "-1606495881715082381/16324360910828438638" }, { "-7960193178071300653", "-10280747961248435844", "7960193178071300653/10280747961248435844" }, { "-11544909483975853384", "-16041992360613233027", "11544909483975853384/16041992360613233027" }, { "-5758820541298901548", "-2596462557714095861", "5758820541298901548/2596462557714095861" }, { "-13056342734667572546", "46502284983183419157350605242474199851", "-13056342734667572546/46502284983183419157350605242474199851" }, { "12668118634717482325", "-338544675918656078399121171905238525746", "-12668118634717482325/338544675918656078399121171905238525746" }, { "-16738429327795346815", "164053836541028518093058940786011794219", "-16738429327795346815/164053836541028518093058940786011794219" }, { "-9884600460121235549", "-53914696297933680001835530599748561584", "9884600460121235549/53914696297933680001835530599748561584" }, { "6753521264659576004", "71759828079371803409570464915096122874", "3376760632329788002/35879914039685901704785232457548061437" }, { "-6072478784520825268", "83641961138289700975241455431547940418", "-3036239392260412634/41820980569144850487620727715773970209" }, { "-6708950756971973620", "-9847903810677323447803434015107261150885944735136350527205856921771320298384705376646797569973415403097847060539915279223391112430240736564839483430569706", "3354475378485986810/4923951905338661723901717007553630575442972367568175263602928460885660149192352688323398784986707701548923530269957639611695556215120368282419741715284853" }, { "11263779860755455072", "2292311486393743282743453705144070351222990311578446825826935237655927864700827857707370158936582804478427014131790879562565658386819339761919809732496450", "1877296643459242512/382051914398957213790575617524011725203831718596407804304489206275987977450137976284561693156097134079737835688631813260427609731136556626986634955416075" }, { "9956488981426387585", "-12351244248621474338537656633137999145154500022264356186225225426288301330225259889671144104952158102155582320296061124840400655528634050137479515338944145", "-1991297796285277517/2470248849724294867707531326627599829030900004452871237245045085257660266045051977934228820990431620431116464059212224968080131105726810027495903067788829" }, { "-14875992781716065391", "4906952781757522095285156014969507916562921709689447567404076064849249737893410245743456952512717420040816186768213920574809530298070437840356629617118643", "-2125141825959437913/700993254536788870755022287852786845223274529955635366772010866407035676841915749391922421787531060005830883824030560082115647185438633977193804231016949" }, { "16043178952268979636", "-4962728781666935768923030490263743715131420507991284894489828489607808897271220927863958149140648859077934323268424257800724618076505149638049461104621679", "-5347726317422993212/1654242927222311922974343496754581238377140169330428298163276163202602965757073642621319383046882953025978107756141419266908206025501716546016487034873893" }, { "-14889985628902581941", "3075736124701105220602924325296812116294816310089906623707854625135862902005059305428034753787024827094954645083406870532379125275086885405969947540175361", "-14889985628902581941/3075736124701105220602924325296812116294816310089906623707854625135862902005059305428034753787024827094954645083406870532379125275086885405969947540175361" }, { "-1719613957783789857", "19860562547348050982501313785551054055826630539673708970554435103060535649825139319625648954889488501680865494719253019921780044205805557658109807483499994523398090829033362953135186523580359552555144614353929273831853529446536288544481045105104526669277307473478898498061888931858821517694257595658138564305517447595298378933983614114298000880741350618424855028965861930329619462261269994651112266861896630584883581092431090390354633458596611690990999635499563944625720180529318327647519405136188243979680965052005899543797270970540925042201315580510136864931200059448645464256385079735225156720340173280541113382758", "-1719613957783789857/19860562547348050982501313785551054055826630539673708970554435103060535649825139319625648954889488501680865494719253019921780044205805557658109807483499994523398090829033362953135186523580359552555144614353929273831853529446536288544481045105104526669277307473478898498061888931858821517694257595658138564305517447595298378933983614114298000880741350618424855028965861930329619462261269994651112266861896630584883581092431090390354633458596611690990999635499563944625720180529318327647519405136188243979680965052005899543797270970540925042201315580510136864931200059448645464256385079735225156720340173280541113382758" }, { "-10969623867482498359", "1292477254230352575769754773488799598312602810841892384475535212194939033905139960602724737178675944133847094464739764817257836826367652752931492512753561670732296265459534230949226553571982695924178928914002527460943582374603078611662312521259541641138419845784008028215876048965254023368247445173694441960256131358058174374542730502334351759171930973722361567186133851896057677818979314942434199157003833234473048838906103902832115569853657335216793235394595479328932380393044485884605451918890395812628720641212850763944658735838941829604119213195707479940053016354291972875689927240247563236506479099606571912595", "-10969623867482498359/1292477254230352575769754773488799598312602810841892384475535212194939033905139960602724737178675944133847094464739764817257836826367652752931492512753561670732296265459534230949226553571982695924178928914002527460943582374603078611662312521259541641138419845784008028215876048965254023368247445173694441960256131358058174374542730502334351759171930973722361567186133851896057677818979314942434199157003833234473048838906103902832115569853657335216793235394595479328932380393044485884605451918890395812628720641212850763944658735838941829604119213195707479940053016354291972875689927240247563236506479099606571912595" }, { "-3716891004757979686", "-19452372993227550502015765258932159656814363741878583541173956168837566077148160901999018823586675966076058615847408138956450751813058209394199427182041779436168298455103717521843644244801542056954603631432685194627158423459586845252167819811850263444712218938833443253125954475476481099092216538126519474183531297423759923656571895377587989169731023397615799830371852298135015608612181670362528239430952907458704415974164085176066242388561893721949244663406941558257051263727439679525692652639731850971185056484335828001005009903973037524233097329857690857731943951449292814500362180170793919266389501882641682782987", "3716891004757979686/19452372993227550502015765258932159656814363741878583541173956168837566077148160901999018823586675966076058615847408138956450751813058209394199427182041779436168298455103717521843644244801542056954603631432685194627158423459586845252167819811850263444712218938833443253125954475476481099092216538126519474183531297423759923656571895377587989169731023397615799830371852298135015608612181670362528239430952907458704415974164085176066242388561893721949244663406941558257051263727439679525692652639731850971185056484335828001005009903973037524233097329857690857731943951449292814500362180170793919266389501882641682782987" }, { "-4863232114852441787", "-22963038454503597269981750990033903654256693514059439027985256604978917966584414065892146187253799108250061573972673983350956191446047978392921074610323648301008272837432907303975548030552369880338022067315042332692023645592417869181836251486577977896077712912433381480614752789750181208326525834629219729662085632321271870762094800588296544243340047360684854239747242066367921596241226349790282723168222543448385227922748241223520686047460119733024390425165073367321644498280127168757335614077882325524816799960018589278475564547840614315473357481582710826551932681173443524724802157570101916268510464302946527662720", "4863232114852441787/22963038454503597269981750990033903654256693514059439027985256604978917966584414065892146187253799108250061573972673983350956191446047978392921074610323648301008272837432907303975548030552369880338022067315042332692023645592417869181836251486577977896077712912433381480614752789750181208326525834629219729662085632321271870762094800588296544243340047360684854239747242066367921596241226349790282723168222543448385227922748241223520686047460119733024390425165073367321644498280127168757335614077882325524816799960018589278475564547840614315473357481582710826551932681173443524724802157570101916268510464302946527662720" }, { "-16248276650501285553", "-3381199474840825715485713565301777938368574604710714363907009216856320913536015299178065264912798511857598595067318796576494480424838898250138649774858742984769125731728430552285782315111538920026330816414650913188340281906359149109963139438960274321560117812365241840204034925444652058916966934904097509799291744775242863360284348334605170437300543978049053839829106628489146216325576991696936733592366926096500684308845306493636196092408597450926695579897293944488261001228478152650490677071497874746121221519036861983646423005753475340900508665494162949119110128646472783016552527735050067363030838015919512260159", "16248276650501285553/3381199474840825715485713565301777938368574604710714363907009216856320913536015299178065264912798511857598595067318796576494480424838898250138649774858742984769125731728430552285782315111538920026330816414650913188340281906359149109963139438960274321560117812365241840204034925444652058916966934904097509799291744775242863360284348334605170437300543978049053839829106628489146216325576991696936733592366926096500684308845306493636196092408597450926695579897293944488261001228478152650490677071497874746121221519036861983646423005753475340900508665494162949119110128646472783016552527735050067363030838015919512260159" }, { "18296946401228630959", "3302341071702763311560113831030141639804425031433511503765833897787925467295486187687396312611805794369889470239777040624530990622212474466940548049117664906468330871893337410618797113677420975837622378808494314918471282099855916016026079371666730617071364751834080179173620476977670099126230223862266413091012344741482772771219725893630556702028108027870656512750807359335108428687238687397060104669074315031780019301768744978815422943986587389425726602444937024004102212071953113581935989741954695450085391443134273670514145585869912689150728183940456773133212037846765421397201956541430155664614978559762638030787", "494512064898071107/89252461397371981393516590027841665940660135984689500101779294534808796413391518586145846286805562009997012709183163260122459206005742553160555352678855808282927861402522632719426949018308675022638442670499846349147872489185295027460164307342344070731658506806326491329016769648045137814222438482763957110567901209229264128951884483611636667622381298050558284128400198900948876451006451010731354180245251757615676197345101215643660079567205064579073691957971270919029789515458192258971242965998775552705010579544169558662544475293781424031100761728120453327924649671534200578302755582200815017962566988101692919751" }, { "-60488682170925814337492051725122486652", "14880088785789146426", "-30244341085462907168746025862561243326/7440044392894573213" }, { "126617729996196635247771282957911941277", "-7166506344996883172", "-126617729996196635247771282957911941277/7166506344996883172" }, { "-278675896803726074870988122161067771390", "7744689831802931490", "-27867589680372607487098812216106777139/774468983180293149" }, { "-283351838662873779255871649630248958879", "6912311315831153835", "-14913254666467041013466928927907839941/363805858727955465" }, { "-9715584046609700027352634666499181378", "3368831995960494221", "-9715584046609700027352634666499181378/3368831995960494221" }, { "-137493547985106345282009151869389470397", "-1916381539906956855", "137493547985106345282009151869389470397/1916381539906956855" }, { "-328662747577960331872949773416436800743", "-231069430804205460334599495337085157308", "328662747577960331872949773416436800743/231069430804205460334599495337085157308" }, { "213595640581249636406536485951630735277", "-48492294677143227478357598229530842959", "-213595640581249636406536485951630735277/48492294677143227478357598229530842959" }, { "85922846498729014445816145204889624189", "193533957681757355413031965695625196813", "85922846498729014445816145204889624189/193533957681757355413031965695625196813" }, { "24053342958857142686054803491202486471", "196417511107100936775397820630955772553", "24053342958857142686054803491202486471/196417511107100936775397820630955772553" }, { "102038936612518756467074084117019701214", "-111946989731587760700903475996379168167", "-102038936612518756467074084117019701214/111946989731587760700903475996379168167" }, { "-3006867214208872584699983438179656913", "-234257597822744479264249663225224173340", "3006867214208872584699983438179656913/234257597822744479264249663225224173340" }, { "-279839802710533516603863620922251878907", "-3244112647743502769852782626803305310331045534071805654982307107362388474314396636799597033636575215617240554815450017779373048313695795886893032630263219", "279839802710533516603863620922251878907/3244112647743502769852782626803305310331045534071805654982307107362388474314396636799597033636575215617240554815450017779373048313695795886893032630263219" }, { "123635964546481689465778244982425098404", "7701433613491146708866098469269971554817017737111287276993583150548359764165526640986060909954451793171933304569726872785964805121981749276421956645830854", "61817982273240844732889122491212549202/3850716806745573354433049234634985777408508868555643638496791575274179882082763320493030454977225896585966652284863436392982402560990874638210978322915427" }, { "166158110049010486343321316578688184578", "4093720847216792748840371965199135052196058344862447621818024731938681519017878880275303125899149558774718190527651555811733139227128378041055212888819294", "83079055024505243171660658289344092289/2046860423608396374420185982599567526098029172431223810909012365969340759508939440137651562949574779387359095263825777905866569613564189020527606444409647" }, { "147416259636838312272435267341375281181", "-11266711292262839805944890501811605204323255169233519804446548849178247889563130015168799346120099052214488209897402054530713234143622703174309015777885801", "-147416259636838312272435267341375281181/11266711292262839805944890501811605204323255169233519804446548849178247889563130015168799346120099052214488209897402054530713234143622703174309015777885801" }, { "102557200511608632541115941654031896919", "3866177549962722728707550488877109233779215384377007088712280650225992470307822792085413087509167847767889824884877044539352696974351192629898363157976511", "102557200511608632541115941654031896919/3866177549962722728707550488877109233779215384377007088712280650225992470307822792085413087509167847767889824884877044539352696974351192629898363157976511" }, { "47794953079190110032282671989549362415", "3802290983508829335098916118339496411537222492645529399519373082799614656011270200284796148989094312601047370399228868583158444769807910513767845541589667", "47794953079190110032282671989549362415/3802290983508829335098916118339496411537222492645529399519373082799614656011270200284796148989094312601047370399228868583158444769807910513767845541589667" }, { "-169956065319483471022234920202991103615", "-9934427489865644196610501807375648335352544234206717324511161205173460054921759084767897792996557220898467288533128078406604709773449948420404563411793533441010236017064154469575084055359823982786110746700747423674942932421964955746280671982635899487781780756099620799397239156211815110739544719746684712086075069101799537802834839550142629064374734870047412916259754010150500874430055034366305216104752636211802195447299210332237598443674867760860326529472901775427058078447963316168327741049511844237329137194533000697525539835371015163158135757326482343130221118201740819963770851200676279882978581431999960842565", "33991213063896694204446984040598220723/1986885497973128839322100361475129667070508846841343464902232241034692010984351816953579558599311444179693457706625615681320941954689989684080912682358706688202047203412830893915016811071964796557222149340149484734988586484392991149256134396527179897556356151219924159879447831242363022147908943949336942417215013820359907560566967910028525812874946974009482583251950802030100174886011006873261043220950527242360439089459842066447519688734973552172065305894580355085411615689592663233665548209902368847465827438906600139505107967074203032631627151465296468626044223640348163992754170240135255976595716286399992168513" }, { "-83006311763073652927964071041666508273", "13480787677843057038436344704360462056114592749322481662307876594244244638227291805757775026215166740035048814729231681821563443093991755779505400592913963236010573873554317250153995160235771659208137440518282824497744092608999871327127239673370293239927529076145825972430101380272357235582367639159280348164804218713823424182167974242317526959809443701996053548231667727254858428867000011055354779789221097183515832386890638024105232865079002765479933320220378271026425568216748186200736499581088153390350474814123049637951929317200314355414551809067125550551841102097159644340520444983020267926123546444838010089690", "-83006311763073652927964071041666508273/13480787677843057038436344704360462056114592749322481662307876594244244638227291805757775026215166740035048814729231681821563443093991755779505400592913963236010573873554317250153995160235771659208137440518282824497744092608999871327127239673370293239927529076145825972430101380272357235582367639159280348164804218713823424182167974242317526959809443701996053548231667727254858428867000011055354779789221097183515832386890638024105232865079002765479933320220378271026425568216748186200736499581088153390350474814123049637951929317200314355414551809067125550551841102097159644340520444983020267926123546444838010089690" }, { "-312626207169475064151212222217866488926", "6989069923898656093413456232544365450599471748502878018530391549015151484336014906416216966193568842618920902504390187814247729346977677905224098932673981665869061845335443588666641982676550205160521286690015544764015602751932938178737949961754714143180917985455875095030469699198116593730005119922928175789172042067281849364217595912265452199938281052984802042194034638773435768458457616208103331213440768472281882976004050012769415198321241810008696147179275528426468408383757692656341606162350211696837361434874035354680073309142183699892959618671515841112321607728427286289324836870027735590091451421689980776552", "-52104367861579177358535370369644414821/1164844987316442682235576038757394241766578624750479669755065258169191914056002484402702827698928140436486817084065031302374621557829612984204016488778996944311510307555907264777773663779425034193420214448335924127335933791988823029789658326959119023863486330909312515838411616533019432288334186653821362631528673677880308227369599318710908699989713508830800340365672439795572628076409602701350555202240128078713647162667341668794902533053540301668116024529879254737744734730626282109390267693725035282806226905812339225780012218190363949982159936445252640185386934621404547714887472811671289265015241903614996796092" }, { "-151709660794612786408772973806200383563", "-26960472721919005254400858042130056790831511338891584787669209989714807518625849812230185079206081782191501696661436514815190623849929065098497737155759771863508038766934134444191240792356114381746781342181881402424707118515655119761011977116554236461222788625158348668147995099157685699761135150772589445239536582228655532345059046596356954495360132444243748421428095867292294626357084961338288369883088525401649234025290736504802104065029036642533076183281468647642956623788270236516849523210698622687255735945678505925047193818483603361307498423724202227256505312543145618362906047473400380196192622607541097732443", "151709660794612786408772973806200383563/26960472721919005254400858042130056790831511338891584787669209989714807518625849812230185079206081782191501696661436514815190623849929065098497737155759771863508038766934134444191240792356114381746781342181881402424707118515655119761011977116554236461222788625158348668147995099157685699761135150772589445239536582228655532345059046596356954495360132444243748421428095867292294626357084961338288369883088525401649234025290736504802104065029036642533076183281468647642956623788270236516849523210698622687255735945678505925047193818483603361307498423724202227256505312543145618362906047473400380196192622607541097732443" }, { "138834496986391136939574372853300933725", "-8052690543272184576133758511645801940246473546142520821850130421981395129853341888352999304040698251945886555605291324954368612109314080471658982022831338507499254609048475429862437003158379101603576571787302167207044118847876475134352180874260998595377014195145760071923429129767580115085764485254455919915567128572731355497418831212259648020550107573824886521471697331410754043280744066090848295906051303624846301488010249980896364883452154860562864255354208802313850527991005497484253401461375477060954782095047043919500670383372218536999834862885439984085848342867301834247551832677237328664699302165347765799113", "-15426055220710126326619374761477881525/894743393696909397348195390182866882249608171793613424650014491331266125539260209816999922671188694660654061733921258328263179123257120052406553558092370945277694956560941714429159667017597677955952952420811351911893790983097386126039131208251222066153001577238417785769269903307508901676196053917161768879507458730303483944157647912473294224505567508202765169052410814601194893697860451787872032878450144847205144609778916664544040542605794984506984917261578755812650058665667277498250377940152830784550531343894115991055630042596913170777759429209493331565094260318589092694172425853026369851633255796149751755457" }, { "276499207940187081393841843387608369874", "27347897028734618663428054896349668572244941195143856840032842195489553215406302254043947382368793914074147314353589439281000471813879502242851166670252197853998033813694814376228360691543987661407996785043637351295817024680721181205269262470473172181965930243852520386958529041036476807810647578694133804796395977642274699322030062940721165202488695975750512485574440928370802874677938542169620505668128224812441566912043326338714451629730522324228356364241376445033028898865300103247057378058702233150414643818049655628999871012383236520330575609745427181485617250755214922048672375947942288446974485524776744246517", "8919329288393131657865865915729302254/882190226733374795594453383753215115233707780488511510968801361144824297271171040453030560721573997228198300463019014170354853929479983943317779570008135414645097864957897237942850344888515731013161186614310882299865065312281328425976427821628166844579546136898468399579307388420531509929375728344972058219238579923944345139420324610991005329112538579862919757599175513818412995957352856199020016311875104026207792481033655688345627471926791042717043753685205691775258996737590325911195399292216201069368214316711279213838705516528491500655825019669207328435019911314684352324150721804772331885386273726605701427307" }, { "-8979365591106781219797187096315899769868799444656824967426553299158070014074001230883484015880186603742048949313393413640240595706939311540002219411120389", "-1698360947072008877", "1282766513015254459971026728045128538552685634950974995346650471308295716296285890126212002268598086248864135616199059091462942243848473077143174201588627/242622992438858411" }, { "-12831814656788829919185319784994714617782749504716966706877579983082880759985031662545957372565411439648298939198657738497464024214657609856476819270030801", "454910754379715", "-273017333123166594025219569893504566335803180951424823550586808150699590637979397075445901543944924247836147642524632733988596259886332124605889771702783/9678952220845" }, { "-7834266257250691217409788323211914445703052638619784568844628449769010091330019095736167988675873769434766592786720961949649685040028101508217441360672222", "-428418418877192732", "3917133128625345608704894161605957222851526319309892284422314224884505045665009547868083994337936884717383296393360480974824842520014050754108720680336111/214209209438596366" }, { "5737805823029931079838944835405107564434908634489801628049345331760087020955028323378020396677249341204498685189403657652738071833877470777083253103936452", "9588993061977446661", "5737805823029931079838944835405107564434908634489801628049345331760087020955028323378020396677249341204498685189403657652738071833877470777083253103936452/9588993061977446661" }, { "-4001605821592542867351046644170905984672346731784670159062281252096012802838642896466582343641124674682428297533953704119505640938363392225910275838094045", "15760991890495426717", "-4001605821592542867351046644170905984672346731784670159062281252096012802838642896466582343641124674682428297533953704119505640938363392225910275838094045/15760991890495426717" }, { "2876630161532936743269451364955814480771395635620140205538288339793482694260173239474830738010159518887660000673207712630507802368373928478641773477534499", "-6788234478844960330", "-2876630161532936743269451364955814480771395635620140205538288339793482694260173239474830738010159518887660000673207712630507802368373928478641773477534499/6788234478844960330" }, { "6230070442453337264527950102774203962152836811174649694700041895216739851602598854067104967963392074425258687296947909484969927078206601660837276754799333", "190237375887614033974333796608341639595", "6230070442453337264527950102774203962152836811174649694700041895216739851602598854067104967963392074425258687296947909484969927078206601660837276754799333/190237375887614033974333796608341639595" }, { "-12098771374444180013224380531550204930654718468097503123335711776524055419889032578894177605164827523969169377266342179411916625188550162928371789854647472", "-41681385674896602840749705069663453185", "12098771374444180013224380531550204930654718468097503123335711776524055419889032578894177605164827523969169377266342179411916625188550162928371789854647472/41681385674896602840749705069663453185" }, { "13185465843955116174925558412278612918939024395488172088108029202384613698982949554556435640011161663974075894844304583900497170806796813871943782330552768", "-155202352609947911537719051033334010254", "-6592732921977558087462779206139306459469512197744086044054014601192306849491474777278217820005580831987037947422152291950248585403398406935971891165276384/77601176304973955768859525516667005127" }, { "12784980722915659825738808684740823452025110516624579136271791852138148426775553817114893299569867520414470532361018804123866264934222335562072872489963044", "-249441012384365373362771955533424187237", "-12784980722915659825738808684740823452025110516624579136271791852138148426775553817114893299569867520414470532361018804123866264934222335562072872489963044/249441012384365373362771955533424187237" }, { "8517839393030302736298983538193047531846908718502576675615969705563208303329257882565359266876007571790337440612227785062203468682754778416335180236967433", "-23101645464137481399279134347982485126", "-8517839393030302736298983538193047531846908718502576675615969705563208303329257882565359266876007571790337440612227785062203468682754778416335180236967433/23101645464137481399279134347982485126" }, { "-10157767522292361462005308817460390811646115952647174687477824271227382383351453540195549992670001314693794150879368708343715654899952822395459036505947192", "-25611473771508763579433379623726126173", "10157767522292361462005308817460390811646115952647174687477824271227382383351453540195549992670001314693794150879368708343715654899952822395459036505947192/25611473771508763579433379623726126173" }, { "-8580252632668820290302987230726290672170301642399871646484841866604753910447257372311950907045477729554307803379310475132687855999835211879267570997069974", "5347050029330174629945013741349819215851040371727058829687387719215168997632386672310746837193930669173408831178932364105722911104309540550576485594530627", "-8580252632668820290302987230726290672170301642399871646484841866604753910447257372311950907045477729554307803379310475132687855999835211879267570997069974/5347050029330174629945013741349819215851040371727058829687387719215168997632386672310746837193930669173408831178932364105722911104309540550576485594530627" }, { "7706102251141221799524762336156378964168657337573751909064577951085535246905735244239132983582998872001001594454632956803416956154262109939446710205558308", "6334400709835247308796432875490978646658012545184955441452799118298109610816693049400832749087993843490999852355789914065232784070007399786089389453289854", "3853051125570610899762381168078189482084328668786875954532288975542767623452867622119566491791499436000500797227316478401708478077131054969723355102779154/3167200354917623654398216437745489323329006272592477720726399559149054805408346524700416374543996921745499926177894957032616392035003699893044694726644927" }, { "12609622044672092190084693450911157599596799695538449568681964257744962273690941575572590166273187189250007688411096790312605666562908125521094386992971478", "-8237858212652788898158635047388584411011830102060269605835391741772914864422465141467281143809161251942948659243584296367296559912373856433388249393853968", "-6304811022336046095042346725455578799798399847769224784340982128872481136845470787786295083136593594625003844205548395156302833281454062760547193496485739/4118929106326394449079317523694292205505915051030134802917695870886457432211232570733640571904580625971474329621792148183648279956186928216694124696926984" }, { "-9988492519236282081446302885464711911055350309732728352574982611126604133339499170845224383282665522673248920309221355720665956477799939031063172954469785", "-1878204914631111607000020160429571305542722711529281855381736226230242796648854769713662269068364131804626863789957256573308715572826753755672493154125086", "9988492519236282081446302885464711911055350309732728352574982611126604133339499170845224383282665522673248920309221355720665956477799939031063172954469785/1878204914631111607000020160429571305542722711529281855381736226230242796648854769713662269068364131804626863789957256573308715572826753755672493154125086" }, { "-10729942326579120947061030583094707809945059776287551713953926998992375520903658867971835616518813070294302895655369081976222497359056962112544408591462495", "-4917625712783289245414023733273041940212797202855299465496072729329693853584860839801663152618595377553772371725021213143455497822882736730281253858119747", "10729942326579120947061030583094707809945059776287551713953926998992375520903658867971835616518813070294302895655369081976222497359056962112544408591462495/4917625712783289245414023733273041940212797202855299465496072729329693853584860839801663152618595377553772371725021213143455497822882736730281253858119747" }, { "8114113595157517238445304590338354472776364877475201453112450680537221171989478096363668912966343706408770932684807802285529572133696646343108263717309148", "5443953102973235688784499815692116502566847594605098596244123647428188581304528525010862185203718640610834003873728718183528722470626702382993497913086105", "8114113595157517238445304590338354472776364877475201453112450680537221171989478096363668912966343706408770932684807802285529572133696646343108263717309148/5443953102973235688784499815692116502566847594605098596244123647428188581304528525010862185203718640610834003873728718183528722470626702382993497913086105" }, { "-7125100205152691887479515774712530950031072786448635736036405923401522078562323494262148946679985384635556474075282302608446439950458673260234175964199684", "-23871420315894180764743988478670341498770583257649869670486332228804693253344466615199983955886679924409910043885402198203427975742868174334723967563526738510726448815413356678504144193747696164586135745786501041060322480940451156015256191962506052700295351077719851275026974629635679531161390660244641370183176979934485671396035404817388717005746812037357500295693454623478902942336087760288091719793968445716246099043828787040340339906538864570506773535078524092440112404847904632624419421052178754041718790915772437556681684830937503838434712179830722395832238257078212535157309743054115702650740005055678387806081", "7125100205152691887479515774712530950031072786448635736036405923401522078562323494262148946679985384635556474075282302608446439950458673260234175964199684/23871420315894180764743988478670341498770583257649869670486332228804693253344466615199983955886679924409910043885402198203427975742868174334723967563526738510726448815413356678504144193747696164586135745786501041060322480940451156015256191962506052700295351077719851275026974629635679531161390660244641370183176979934485671396035404817388717005746812037357500295693454623478902942336087760288091719793968445716246099043828787040340339906538864570506773535078524092440112404847904632624419421052178754041718790915772437556681684830937503838434712179830722395832238257078212535157309743054115702650740005055678387806081" }, { "4801495919363827077158204249631885157347198552733998896638174958434968555935827788499392382851493568264006507028024783408190862186734863708684652212703744", "29234959990138609668202089052356468732793041824333219340488007351402997202222578434579705387840772390513345507274006495462445058795870182760749392281528881636623188890883479914921272700981309656920982410970774047916714087713562927554033500521877735827036675598267184309367127514966388636440710253467328441763131873309183205727440365838789320851968108312559316922678357314418486932673434031479515016224407618177089903730349114511598373251388750023508633761000320088841886505077453257141723747388913336375142897897501529451618927178835485127020789481918641637409265186365292847057986276062625965612268181771076051892980", "1200373979840956769289551062407971289336799638183499724159543739608742138983956947124848095712873392066001626757006195852047715546683715927171163053175936/7308739997534652417050522263089117183198260456083304835122001837850749300555644608644926346960193097628336376818501623865611264698967545690187348070382220409155797222720869978730318175245327414230245602742693511979178521928390731888508375130469433956759168899566796077341781878741597159110177563366832110440782968327295801431860091459697330212992027078139829230669589328604621733168358507869878754056101904544272475932587278627899593312847187505877158440250080022210471626269363314285430936847228334093785724474375382362904731794708871281755197370479660409352316296591323211764496569015656491403067045442769012973245" }, { "10769619761532897875307527770350128978615798426116103116325434914975512103385205123955114305107607195469345895102375220593168903042839441996791318999499708", "-7224105715967976893083374742254251507019823877014718307738328810406361200631626366722837314776666720638271529652546975342143108973422364041422652163016078890272393678677152791565494865444430757858556891645947268886646732022748338160528677218733159766121781240328812893374941548395710123982510227501927393735585082736583984561348450061452997663109932611188779299623613963995350679177776686423432406091192517292522853783968685873925548901506191291253596763183277703635837071862492572256145656312023955675669362656148946145528559574994353884313568526553663370513565393821926602014407548325293145102073923450066319746913", "-10769619761532897875307527770350128978615798426116103116325434914975512103385205123955114305107607195469345895102375220593168903042839441996791318999499708/7224105715967976893083374742254251507019823877014718307738328810406361200631626366722837314776666720638271529652546975342143108973422364041422652163016078890272393678677152791565494865444430757858556891645947268886646732022748338160528677218733159766121781240328812893374941548395710123982510227501927393735585082736583984561348450061452997663109932611188779299623613963995350679177776686423432406091192517292522853783968685873925548901506191291253596763183277703635837071862492572256145656312023955675669362656148946145528559574994353884313568526553663370513565393821926602014407548325293145102073923450066319746913" }, { "1505915608160301518246681692927442986955390537144107830770082927276722640395785957392652130911646706470337068266772174699405268120590454296080828168261019", "31152879253507543898583880698200027990847289346701738353567402100527465991154555548630544962150902011282973749886327325250084401181379196961322399337408341296727915922288276602390334861175305055229766353672502691855637668618950047400571070157436221479289152631256433294884836727331457389922838951144187501751190662594278336543502171639899940796536926507796271202659224890656712231014450702948847764643603683153113663072089256293587951842007583210791100743318865647555912543508324790181772321217524164822106191538518498016236866957803105254555578252294418243701672226181762763332992886540089416888889135117147250495261", "1505915608160301518246681692927442986955390537144107830770082927276722640395785957392652130911646706470337068266772174699405268120590454296080828168261019/31152879253507543898583880698200027990847289346701738353567402100527465991154555548630544962150902011282973749886327325250084401181379196961322399337408341296727915922288276602390334861175305055229766353672502691855637668618950047400571070157436221479289152631256433294884836727331457389922838951144187501751190662594278336543502171639899940796536926507796271202659224890656712231014450702948847764643603683153113663072089256293587951842007583210791100743318865647555912543508324790181772321217524164822106191538518498016236866957803105254555578252294418243701672226181762763332992886540089416888889135117147250495261" }, { "-4912349668310730778272626761660101328812783790262451913449395750351147048676353891314609774894027305081515542385381430403698808605768281804457186380542764", "6582102431028556562269167182029950958541569095123705594954788174046339660437206159173417583841743892857066740116322758515837624700881569925244230209567223461401193316695082415261197843574563450002486582967745135870782254839990479649574452750850133306720341823136645982650022199634379361313745598455049448887744206616434903460504591098363901961758069797933831934878649993183747273660007900662110776570580293994733189753806312784239743585453090900671308673380802381312083077891736513388250097195232616017027333586286786139736783210630705878401429301217589001317082952461701571026008195534878902572422952568763551674434", "-2456174834155365389136313380830050664406391895131225956724697875175573524338176945657304887447013652540757771192690715201849404302884140902228593190271382/3291051215514278281134583591014975479270784547561852797477394087023169830218603079586708791920871946428533370058161379257918812350440784962622115104783611730700596658347541207630598921787281725001243291483872567935391127419995239824787226375425066653360170911568322991325011099817189680656872799227524724443872103308217451730252295549181950980879034898966915967439324996591873636830003950331055388285290146997366594876903156392119871792726545450335654336690401190656041538945868256694125048597616308008513666793143393069868391605315352939200714650608794500658541476230850785513004097767439451286211476284381775837217" }, { "-11503235648135220410087372678575470255397243144180272745183844970864347348074104828328211521698012119761674096067066173927209129755062269068090560678650614", "-5548338218081690289723998288742945948643693817491921699797822887914665364835947234564530865119623677435878746610856459141463506776423054050179729345956931675338102809929977610828639446535095411122377961067651902947030310564736893080382424590568134091858634304377553326990788802662029347894499019277621467098333287442862683493159356014650672092060912274570436879076161496563079759704321556494898013269338428360856068237785049960484767969682269790642298701577934519452927652996671267126348627432295779183359417597868330923329974640383630473044712419371517153268338860560601603043892503067815822312755611206254762903436", "5751617824067610205043686339287735127698621572090136372591922485432173674037052414164105760849006059880837048033533086963604564877531134534045280339325307/2774169109040845144861999144371472974321846908745960849898911443957332682417973617282265432559811838717939373305428229570731753388211527025089864672978465837669051404964988805414319723267547705561188980533825951473515155282368446540191212295284067045929317152188776663495394401331014673947249509638810733549166643721431341746579678007325336046030456137285218439538080748281539879852160778247449006634669214180428034118892524980242383984841134895321149350788967259726463826498335633563174313716147889591679708798934165461664987320191815236522356209685758576634169430280300801521946251533907911156377805603127381451718" }, { "-22964048032108117904633365483799091488990853392670636861794813863757795874434768543212887316456319246155824842161717179767513360050328383696194174741889496306018655333450647372293193335577883672679165775070112770359697627614883420620410888137853011387271594559450892054491963940112235887802995117234918878648066362268919389271696465517050425727202664230530633207566444357393843669758809938086228366322548799235049875711702216182219182908217345405023677260470015666831191434586902791186444958476491096759363292487221288620810273243009200212776634572092195691654105986099646006756823055390654876878195583529521482548988", "10644501761877612307", "-22964048032108117904633365483799091488990853392670636861794813863757795874434768543212887316456319246155824842161717179767513360050328383696194174741889496306018655333450647372293193335577883672679165775070112770359697627614883420620410888137853011387271594559450892054491963940112235887802995117234918878648066362268919389271696465517050425727202664230530633207566444357393843669758809938086228366322548799235049875711702216182219182908217345405023677260470015666831191434586902791186444958476491096759363292487221288620810273243009200212776634572092195691654105986099646006756823055390654876878195583529521482548988/10644501761877612307" }, { "-19058897134776675884737764093896349427183484738023061956638485191239529906311503740032626797095131123523175909943402828257449376045336777553758951620699386266853663342003969442142858702229701661125904623724248177901462857013835790939020450746503125344631958534655024089231193396521561965297735217497608287565163852923704017958259400904834287026933197193592591423799328167149965328232560408884408251535373934831244856695227539243433290481951528897142697352526450162440279318507285454432916819060795455956931254810171588139618689138022062041222735056137988435900866680084665165131313435515187611756148824388549448126467", "-8326067459929079652", "19058897134776675884737764093896349427183484738023061956638485191239529906311503740032626797095131123523175909943402828257449376045336777553758951620699386266853663342003969442142858702229701661125904623724248177901462857013835790939020450746503125344631958534655024089231193396521561965297735217497608287565163852923704017958259400904834287026933197193592591423799328167149965328232560408884408251535373934831244856695227539243433290481951528897142697352526450162440279318507285454432916819060795455956931254810171588139618689138022062041222735056137988435900866680084665165131313435515187611756148824388549448126467/8326067459929079652" }, { "25828007361450952719858846443651616751980622231808382804245407702688699228397920589229449608543284896555585501243582045708656531815385828908740757435341854996277769645696261182122648194952548457487178342682313459444433667556195761154944956714756269417591048771194019245925463541886773351873002480266654825771525233808830260734678788520487541379982691221386179066818743751876186761036101255542680066874888848011074569355779905086056095043888696435054884292698783753890317487209955316141370052511469715869816445031102161253514609763532756500340262263800747279044587806090353812452308490155782240390040070679663451429071", "-16419739031141199968", "-25828007361450952719858846443651616751980622231808382804245407702688699228397920589229449608543284896555585501243582045708656531815385828908740757435341854996277769645696261182122648194952548457487178342682313459444433667556195761154944956714756269417591048771194019245925463541886773351873002480266654825771525233808830260734678788520487541379982691221386179066818743751876186761036101255542680066874888848011074569355779905086056095043888696435054884292698783753890317487209955316141370052511469715869816445031102161253514609763532756500340262263800747279044587806090353812452308490155782240390040070679663451429071/16419739031141199968" }, { "-1669696848499325185991294008037906453080648048592518700324899343297324898656645662186964240087582483813312797482298159224575128489696846451225871663856944749639170892311973606684486632224811435175199158920841554176114937196187087530038509898368755036744105403511353564606301040888877621412514452110348953863172547944175251415725815533087344857665837809749724257466399374547882097484009980477192931829030533366309859182367479867549644502538060694266048652224732348150866071381652452605392696555259221463464108413747443898588713629829490175098280805280460168541344102200890646453100478450456898359263676257882174308268", "-3154577849943484396", "417424212124831296497823502009476613270162012148129675081224835824331224664161415546741060021895620953328199370574539806143782122424211612806467915964236187409792723077993401671121658056202858793799789730210388544028734299046771882509627474592188759186026350877838391151575260222219405353128613027587238465793136986043812853931453883271836214416459452437431064366599843636970524371002495119298232957257633341577464795591869966887411125634515173566512163056183087037716517845413113151348174138814805365866027103436860974647178407457372543774570201320115042135336025550222661613275119612614224589815919064470543577067/788644462485871099" }, { "-2215504974719141921873290809898041836016933916943403987778356628123168736190963062169230280020568365292362281642280014010817115943641228422541948070912910166283758843455538187697141038676028739959626556519808411324617157646799936128314485433146912658200236754847332237438334421065771940922444296618134121662770699950019164632463150784605652351782139277998735272280336096528241168196650073301607171613955878761317417480490869592669781417658461696905996344800864447403426286476662235990122025654999230690604488053668524888833992415515434190712628587043474760836969696399229242018051635699746048823240033842587927229964", "-11305319675542865070", "1107752487359570960936645404949020918008466958471701993889178314061584368095481531084615140010284182646181140821140007005408557971820614211270974035456455083141879421727769093848570519338014369979813278259904205662308578823399968064157242716573456329100118377423666118719167210532885970461222148309067060831385349975009582316231575392302826175891069638999367636140168048264120584098325036650803585806977939380658708740245434796334890708829230848452998172400432223701713143238331117995061012827499615345302244026834262444416996207757717095356314293521737380418484848199614621009025817849873024411620016921293963614982/5652659837771432535" }, { "24358677073350645219370308521851912760304925518671532565724702185818845784332554892130070740233218685874351979772556877899278790031132507391155876157108663291716896413773711734271947599485714147026138105714458778787734198938526335256418673319464023475137997251085298903419563039860433435847755093653670989129405749785476487449599232956305952768800154351414655365461746574761818724131185410194605648466196476174400166047788352670171627261342369793028465418799251589432585363577887467959594667618177199696618852093807640490831859585621198048572586882398004957371434677752931134884039120875470266936204172511104679441462", "8754800987327220648", "12179338536675322609685154260925956380152462759335766282862351092909422892166277446065035370116609342937175989886278438949639395015566253695577938078554331645858448206886855867135973799742857073513069052857229389393867099469263167628209336659732011737568998625542649451709781519930216717923877546826835494564702874892738243724799616478152976384400077175707327682730873287380909362065592705097302824233098238087200083023894176335085813630671184896514232709399625794716292681788943733979797333809088599848309426046903820245415929792810599024286293441199002478685717338876465567442019560437735133468102086255552339720731/4377400493663610324" }, { "-26302114071841994464108666310942614602208671348774320769941579409198660404735714925432808094014718434192516800374483192192707032773903982752997957629389083405320034044554226640590549491188742685901503166669355807243735533977994184111229208270447279559478659750835531593667003322059717930484363943660175452777363121025595100592911646539549735930625865256846706785601753749996181113742254145758187876411260965175520035400453360390392991183382425735199046574346992179663247011131958270717402007532256308394559029768974932620173103778338779940189812875680687510582798628982957687329572431433891809534332514765287899172737", "196971971351558855568201373145365478995", "-26302114071841994464108666310942614602208671348774320769941579409198660404735714925432808094014718434192516800374483192192707032773903982752997957629389083405320034044554226640590549491188742685901503166669355807243735533977994184111229208270447279559478659750835531593667003322059717930484363943660175452777363121025595100592911646539549735930625865256846706785601753749996181113742254145758187876411260965175520035400453360390392991183382425735199046574346992179663247011131958270717402007532256308394559029768974932620173103778338779940189812875680687510582798628982957687329572431433891809534332514765287899172737/196971971351558855568201373145365478995" }, { "-25700334917103749626396366612061842558162882395534131493737229591609654899446089376271023701490708870843231350129849819430092002268875830384992877382393956173037794109904701961390126146975281052960293513473777226100954163054292968509501976296424278813632162404905591038465215586347229260479401862039805429711982871702185657527199220459658257385112793877259572278229045135617281858788415643567614198333459934599272409406206213115625226065750113120833933806486512117533453281522448845990642550827848765145774541658722594353290694745164913189694785762218575339370800538946514325662656804799046877175035545715523049884960", "56325873113907570153638933263921340484", "-6425083729275937406599091653015460639540720598883532873434307397902413724861522344067755925372677217710807837532462454857523000567218957596248219345598489043259448527476175490347531536743820263240073378368444306525238540763573242127375494074106069703408040601226397759616303896586807315119850465509951357427995717925546414381799805114914564346278198469314893069557261283904320464697103910891903549583364983649818102351551553278906306516437528280208483451621628029383363320380612211497660637706962191286443635414680648588322673686291228297423696440554643834842700134736628581415664201199761719293758886428880762471240/14081468278476892538409733315980335121" }, { "-25716495567761925495340309269248196976121711927176026606462843116646034561721958499564011513233986043633061335866265799467020807570689498961190839877265773450484494789052182300993137822542881883769593344810286970036960228835955266304979090841345697560418139960733748874044680214388098802745248923989851173047158103142988835055585349795022662576576434371181693607267864646932929998659458265265400181839509356921460222604661909947838434113964465769102604033848276159366897885013231683417270877512514679528402888899725431524867260144325739317224922955028035417867933390409466302057857579158202739536568407090965929352402", "-92089830031261826185903006947297196357", "25716495567761925495340309269248196976121711927176026606462843116646034561721958499564011513233986043633061335866265799467020807570689498961190839877265773450484494789052182300993137822542881883769593344810286970036960228835955266304979090841345697560418139960733748874044680214388098802745248923989851173047158103142988835055585349795022662576576434371181693607267864646932929998659458265265400181839509356921460222604661909947838434113964465769102604033848276159366897885013231683417270877512514679528402888899725431524867260144325739317224922955028035417867933390409466302057857579158202739536568407090965929352402/92089830031261826185903006947297196357" }, { "6427758281007308443295844679532867042370757542760390680622584758338041709910068192973790897624827722686313216884084305612889554116246627679267186323854642904894988936981064543865794245002470271142875081223308666588659587718561791667575945670118263124267218395749059879636505504607358472659126298770422135028955713148882314050530771750859372048576074912599265823577267962213046012777760882389021047579367276198483178024744924299929585515193595330026399302022065656106472153858484998010254767462854235008343139218888170221421046454280858208068658907389288543063912721882521711363713136166478126504226820360347652405439", "80854661163518168674595213426641201760", "6427758281007308443295844679532867042370757542760390680622584758338041709910068192973790897624827722686313216884084305612889554116246627679267186323854642904894988936981064543865794245002470271142875081223308666588659587718561791667575945670118263124267218395749059879636505504607358472659126298770422135028955713148882314050530771750859372048576074912599265823577267962213046012777760882389021047579367276198483178024744924299929585515193595330026399302022065656106472153858484998010254767462854235008343139218888170221421046454280858208068658907389288543063912721882521711363713136166478126504226820360347652405439/80854661163518168674595213426641201760" }, { "1960728263483597985471065015024594804771170333646104429205729831998416939777820080209106943861368202560376682136488253096512360698625765514606930980274938979705620987031595592685578710084284618125325617453699875318678007463857705931376750632972266553809944621631324385690517092215690694024807784270742388108802858889381036105223858467345514041786882957807868961085072340965930749117411726729713477739990680381647988935514765113077094375924848051541167125595015542791382355149166582367766443782842193396221676952668624805183924877889696428989259842153378327156342464279071638070457876940165186524833987190050817072048", "91266493124541431873557009470479491083", "1960728263483597985471065015024594804771170333646104429205729831998416939777820080209106943861368202560376682136488253096512360698625765514606930980274938979705620987031595592685578710084284618125325617453699875318678007463857705931376750632972266553809944621631324385690517092215690694024807784270742388108802858889381036105223858467345514041786882957807868961085072340965930749117411726729713477739990680381647988935514765113077094375924848051541167125595015542791382355149166582367766443782842193396221676952668624805183924877889696428989259842153378327156342464279071638070457876940165186524833987190050817072048/91266493124541431873557009470479491083" }, { "4941680418946960910262990974014623728051861920391294141439502190044830922127013115391726343950340163023958511659132792063033185693862678433421115681422259770928656196358763089894449447854011668445981430826871764812047994423858851467292757304285634515474652989618200442851239459073981986390515468331839802701176644729973346052528164203299481240263263697394061787580128379398464090163611942724580936445878570184925290925246112514015572149640886198984723311273144361235138411362294735799814160816806773736605477503201836095726740734281001021071803299510239436683913500734680524381145064985356627091311888606290704759943", "291575320383555320391938911470370670502", "1647226806315653636754330324671541242683953973463764713813167396681610307375671038463908781316780054341319503886377597354344395231287559477807038560474086590309552065452921029964816482618003889481993810275623921604015998141286283822430919101428544838491550996539400147617079819691327328796838489443946600900392214909991115350842721401099827080087754565798020595860042793132821363387870647574860312148626190061641763641748704171338524049880295399661574437091048120411712803787431578599938053605602257912201825834400612031908913578093667007023934433170079812227971166911560174793715021661785542363770629535430234919981/97191773461185106797312970490123556834" }, { "-17803449239532304707372697093467431202778585961066204978641168716990033159088600623106396534094218402005803618121159982050197012697237961155375180768349707725936023283589475384693590539312637333226292265409814019687105755522332846972859860649558844229320481883408457674560284773922666633054564243260924189551494368660033292970122831009582038986061326503238023206238467592238752824663935316307653075615249537594229930297642710570473007696494702367783692850946455203144153509057520651038068881755863521371187245025834292163874467913915588768778393773565536027848586260129438664753479013894698439967637389690509120223682", "-10962227285754340409566802000064407225866105372406170304563353147415988225079632767886653994299800743521362563345682593189107807948342418743229049299449088", "8901724619766152353686348546733715601389292980533102489320584358495016579544300311553198267047109201002901809060579991025098506348618980577687590384174853862968011641794737692346795269656318666613146132704907009843552877761166423486429930324779422114660240941704228837280142386961333316527282121630462094775747184330016646485061415504791019493030663251619011603119233796119376412331967658153826537807624768797114965148821355285236503848247351183891846425473227601572076754528760325519034440877931760685593622512917146081937233956957794384389196886782768013924293130064719332376739506947349219983818694845254560111841/5481113642877170204783401000032203612933052686203085152281676573707994112539816383943326997149900371760681281672841296594553903974171209371614524649724544" }, { "-11349783565099575757929584771389010505157850113880084607145768380886038854233583951229136273631022011781914171912628263930864052254964518914857757025547156428098062812984733912827827545722979442676567330004437902674729872754963478834939047061999292143602525229120558979819117729589695377623970606315287270030693151486803968345724658003068961239204812937084581894755863859944500186226990319892122692007317326534880413455575446314965159569830188583093978564829748603480193166063624130610256395632946002879039047154077629561745862713628266069928068634042545592328263646730943717246953000457159714049930890865576634096206", "-5169948998417532948043886408019867395123131165917923418040862036041756675786217242743410895008311710518018466892169868028617239526646914529999134517417939", "11349783565099575757929584771389010505157850113880084607145768380886038854233583951229136273631022011781914171912628263930864052254964518914857757025547156428098062812984733912827827545722979442676567330004437902674729872754963478834939047061999292143602525229120558979819117729589695377623970606315287270030693151486803968345724658003068961239204812937084581894755863859944500186226990319892122692007317326534880413455575446314965159569830188583093978564829748603480193166063624130610256395632946002879039047154077629561745862713628266069928068634042545592328263646730943717246953000457159714049930890865576634096206/5169948998417532948043886408019867395123131165917923418040862036041756675786217242743410895008311710518018466892169868028617239526646914529999134517417939" }, { "-4372008041495429462966226028389793326873997497126815043214338280101332483009650104005998792061125254101227371430911497751865710691604158789733634394053254604723940088324934622768312096370232736965692181452463495731681105253628558429524788376108667441329817524961077744083376843098018692898745743361309486938506049017980865957895278210133305721083115513131884239744064081819033733041876411992332060293539102545847193260167588667810376670587099064558298380310132769718526554738650709745767046942440481512965138461694790645096012018276362849398785863823724642554436182185786302301222529261914437437947741031113015699315", "-13213007132248918651858333568248204618745148942720942572088217188768868803339938910599097839075045781852237705726227293430250507070717570662238736211897310", "874401608299085892593245205677958665374799499425363008642867656020266496601930020801199758412225050820245474286182299550373142138320831757946726878810650920944788017664986924553662419274046547393138436290492699146336221050725711685904957675221733488265963504992215548816675368619603738579749148672261897387701209803596173191579055642026661144216623102626376847948812816363806746608375282398466412058707820509169438652033517733562075334117419812911659676062026553943705310947730141949153409388488096302593027692338958129019202403655272569879757172764744928510887236437157260460244505852382887487589548206222603139863/2642601426449783730371666713649640923749029788544188514417643437753773760667987782119819567815009156370447541145245458686050101414143514132447747242379462" }, { "-24003371850945507239307096734506644624830254935119140199726507920301383328662376914775504920527918338079792692943250446679097229950654636321252144129692109999375967030689211646504258922323499994340282315270808545865248969923421472430657741998787024263629527291510416193284540865950122841477102934165296344839654902079279846705581902668360663987722715177845485423354226653585575109653937253382583158263755381721094429734122004436184054214443676096492583897635497699417294183504529284810360226314491839533303380490277211336049582128602304906849999737224506976061216780230350942535246958957024226614847691329767208211525", "10686139440491678930358521446524488461285005495304677740436234635584738003880529034339295291091217655777627375148264449580064000634364863951333061091724053", "-1263335360576079328384584038658244453938434470269428431564553048436914912034861942882921311606732544109462773312802655088373538418455507174802744427878532105230314054246800612973908364332815789175804332382674133992907840522285340654245144315725632855980501436395285062804449519260532781130373838640278754991560784319962097195030626456229508630932774483044499232808117192293977637350207223862241218855987125353741812091269579180851792327075982952446978099875552510495647062289712067621597906648131149449121230552119853228213135901505384468781578933538131946108485093696334260133434050471422327716570931122619326747975/562428391604825206860974812974973076909737131331825144233486033451828315993712054438910278478485139777769861849908655241056000033387624418491213741669687" }, { "11114571678097117920369007866358540243142633567044843952020632081573546909920632543585596494530749645890342978505657174505155646987551523455565703297238406590291026899487431109110746657023874064284362499621762851387854720746040865741433394111425240861542892218169985953747711593827913014379823797703717216676877313898809377467394109623799717556800777662963842899812297087284510893865429864819927951428138755600792987191034272014681606301885821862650098620488569288170357746018556395309910262410994899971436293672676949544989196526035130226777567220128838888396668158456237490064462262193759918857287915854681904206680", "4808076329737968688023887165061921594706561818755147855784713748545995818001333418509444774306288638038607173052166709335820929501845348060033808100812677", "11114571678097117920369007866358540243142633567044843952020632081573546909920632543585596494530749645890342978505657174505155646987551523455565703297238406590291026899487431109110746657023874064284362499621762851387854720746040865741433394111425240861542892218169985953747711593827913014379823797703717216676877313898809377467394109623799717556800777662963842899812297087284510893865429864819927951428138755600792987191034272014681606301885821862650098620488569288170357746018556395309910262410994899971436293672676949544989196526035130226777567220128838888396668158456237490064462262193759918857287915854681904206680/4808076329737968688023887165061921594706561818755147855784713748545995818001333418509444774306288638038607173052166709335820929501845348060033808100812677" }, { "-27971792815424016824370019866875377333122266892537700816201893161065327053508379094007350664178576160161460501442627646041422270472469587140689725524176629653056006769618104516779694726446739085332330345789012312708713495757968594985567285237456431009983022526625885024663335598317191838389804118084831445251467492693688286258834282078888862754754572546522075833632779922232880101875914894393005204887265821991459415144492487189071888581048779385051174007698853920104709378859053075296413813207007405843448595681090932498329066591349910723578718333092115184652723310842559914379989208301125396793101430807658654849482", "3169580893680227534064172567436590084742349042688765883461923377455374714865282199177755353861979892274552092801376364846717140845237173266602633583445110", "-4661965469237336137395003311145896222187044482089616802700315526844221175584729849001225110696429360026910083573771274340237045078744931190114954254029438275509334461603017419463282454407789847555388390964835385451452249292994765830927880872909405168330503754437647504110555933052865306398300686347471907541911248782281381043139047013148143792459095424420345972272129987038813350312652482398834200814544303665243235857415414531511981430174796564175195667949808986684118229809842179216068968867834567640574765946848488749721511098558318453929786388848685864108787218473759985729998201383520899465516905134609775808247/528263482280037922344028761239431680790391507114794313910320562909229119144213699862959225643663315379092015466896060807786190140872862211100438930574185" }, #if 0 // more than two arguments { "-138888658164471549506154385143989713534453638138516110941977029 48484067562152384719540184707188444570280914254129306788137384972303743285284814 56428088099244342456240635263153370817851703737803685168591843059886944388583310 6984617762898435035101945891920384937438416626357047934508608980105797822504000 90193136183227859939744547239819443586783276313678017953708293432043879247302040 70539472782976230144489157899475475029273447055080677052149474853222128626227832 2525164589393997980217929709704832829968554364529060039097810436136432713906553063644429644328565051224269893261942396763235990073001625976866246420775436", "15614337547041181126817477188043219628044963126229393225781917631975649438502836750353253851523795212263078850399716875892512719059737913422781999218667136371648316387382440793865460028660248325297931269646982047533754121791358966254514009830876592200454797694143082163294323565673200905929297174223061890100210054105027025488322289599106119653451218493916291922340123640475500240519924011764050880374885136181582395113140580448936759383024305870622004464940344826337458060607492042593813585998516868215921180540240201095202617277388950504036371411600204964284568597705251929695275183521036281637399204541958859605054", "-138888658164471549506154385143989713534453638138516110941977029/4793535847709521198063287553243915170068914691727215964454867625024011698922303669226389748584276840530192157568469968220857898703102351955898913589325705637953049380748829567692600765708909637920797057370082064005557328769108356548100875674196976079597658854339583183901899349355521527519781721778545444496852540362424465770767219571362842157786846795990148969989617793004579188905882473140017509154008696803103206996067638134383708975696867028865870695941933200225325283190379262695816923376790224594063264297952504481719779782130509306530621779762254864669078635401870023086312919956154224782043667754741333688780367667466505233610011253346902821033707597517691608103391952937194719540981992469020284583499872663129517095879706480339710037976698298522952071766717472040399518290905103777436461474880898550115925718887748413534479076504168236430697214654069473800915087572730747027455509241250627470590715812698745630545585772046458363388764449879417348554556621640336029897762172500880501074103433267444717053504878282494505367980026597725927414511391047010801407870379019921551218005714825277162504166028680939100225793768617321830389705750902850499916610355200000" }, { "2902267908619179684129536324641634394442732593027015198805855082 4748067699021154152763168285921806700655154833226062437593302484475663167752990 92172802787151156076284963978247829387076983213530315481815585776147505007251090 15808981285029107672090190966349736198141855760941720122983980047623201110025085 60559202289239963744584432021634662330089323842876293477363484160210450706125345 20641717016962556495214267565148984505293698026059157698737040675346468206231142 142380249473014630955299439077662853963947100833592874440361316474000948841420058017600161066408668117933232436922811486348705081331372574460204309908598", "22418721268614574393232189860262616514600143215945007038687873335656746730488694050883006164427390756358558140145027011322151188565843290717535647848841274550496431839061217253488169143292339455650565906288959125935798633464526818546688779845699340483771625364583343140648892889571715648295855169294054985996834093294240640072029711789359793649773566295329912082241637482772608479106201840565936084243727069954911883243252762742415647868355726139789907900798435783365130277592703989608678774745914668128791639635886550753850811717805962562157686110637810320436812644047534536168343578232389700410352900247092236175044", "1451133954309589842064768162320817197221366296513507599402927541/13803211377640454778526029288269623376813125655593684775595099045285713415153039020789267800416616529908688645478733023490751981264976732618374046330204398361829051480928696426688037404239513603403603849882719851670264413777889524531938606364925013854252374108222701436535488401321603495905123597139234414735397259257280679663147039651553472142280954446675036289021783142392760217244908768132158498744301278889276778209560846418263599491357632762902447742083022806085077053406738681250354036208472026046315736408632370478801849290705001622808552373129971427533249307210975612625050706661691322027927380443494854794852235813844542319971019369687589916047377092369702778251658652143114091304960406840026816351348391618676357634544120732441610431417230403811846208113160343697557236265319994702483700922393762500190362776377442551539417224595247790865885105594005740401824824367904020732469833438717527758468635665777261969819260766044978137909489986407113029460354144391595512642835261443393260585888868936164331461486646676578398836326366036777321522851855085808626766493197635871100152761464712744017549919220291986785134521319127277292845352756807452050073157340000" }, { "7798204144688205291220879078360728451593323170355809361079096742 35808393784851478122520372074317359817820799318259895240196875729073154197251420 58532175726063855694248618287185551673975962776708803423334853085996022345828434 97834368697888769536063057370864051207348099191057106781292664602519775900739777 92489021460656714290092899983209031746574776013841975324837145038810562509209529 71083733375588666647468985607775761710974844539643116636307037921671845148256816 6123989271760127932230015643359630675168106436173654465119508990415235040641894537960236511442249258231302028977221206744158863083898145166446430168108", "-27418900206398855942064397259705713102524342707255992250395147550519659429645343464288092288218160406382406024735131578979728501208163782063519839258876833755387025755815673514708453862847139552613587001235204464673999898312854941659541050445981594990466469147364579547089805525464252876345032296745312923488525701877655352034887018931755379078328147999631937419977103372927428613463482328465834563846802083044643719319690088670748858904291298575733560600669924511028715689681303059001186388754140003746463568171428267337107394361025465082282061651196456268663181772211292647101192148287507051053367729008997838464209", "-3899102072344102645610439539180364225796661585177904680539548371/113184205287561573324139833190653102440730360395399197973956984769580868365256138025034414373155098575475566747215877030265786675432252675717351889433714136838615056208470421665419618669892136317438270826178251174708190860235979949204785938786562420189510825909814566675745650194525647207897976611434325225523578368855952217879373499055292850828774005130267218801086474623429504045290678320168493275019256514768273116059350700654655821674309331585233552793659038912697151359657915391954687630783641745610431060563252789714638916120291482852533638921356624929690158752601417722733222880768367060672103351737811624242610815140332559619520810810999145535251960674284283045907801934328911198563750515779896457101601178888594882087326241517566336011980952110586199881600553269825310575512911473547251704677890770772166895623118832621335417348044312911888377718725944255218219811801447500167145561774582342171995333086224230231746597452848775656030037837271428187450747141983599129861631612369300880722326218963779650411119279310045263996988089484063433088077868691314162108392639864773907107325220582413508233901954483499166402135445110435112499264825479433389003494762240" }, { "6291885367078853457481986049409245691302078375827782321496819120 20959289231548357352292073342856567687394126070322865796282035211176720583560298 24366038587110130209541647226271577368736240640393242419005751016119649778306566 40118119174220166901790237425673316895032570534639145502274313654443256239236466 73598137358602854818844747625643480865061277528564461120022408463105339470504117 36695182446520138181079917512512743290981469731336486456411609014364293489978544 8671667981598505073194269824535189054936442262459158402875147736469644925300845122881093216273840895555488593258562684601176239455526568314028830532770", "15920064019095473156324398162334173238735268739049399738654357508344572552411935473846021991360836375685872129737682603096450566258725052013769725919038955505690389573813769125933987978360857342250911865713011888064725725934341157729878064563080803955584985269499994186472079783942404183377695242296289152788154908185130552013951432753148997632323578507137074131845177376689609114975253308906745794984371839952312988353950198030866538756253618535421214253194954603293145507537939731320546686208032528588232652963255550963088571344119439249328480867640436815434047309164687808223851012490130534705427647158409623238123", "1439421788255379275215959765325419043929720157723371200401/1747562187028503746686299553853635643553063923188506902759251937250022196751705340155682655202720363192751787186892107863159676381018035068965958466119538181810433273947829904580526582292369320932134048728374142501965682147541817431447933591106030690334465450755701191781243754499216697336293783127396687916725975251100500896467549458036395977769801208905203001097425041200299917628353220804629035768571072498715030261324138691471497255335498185741379289492513543474304524261634247519034231348033379344777678679950561777846684978640375273167561174451700942154388980887510088060818147834369595669846115248027925007288445161871535514130090907585140894883683709507099726386549038354860875469377442908932714711235823032704493155679240378374325069782368108779247450762222838197717507164088182062062215767468125843278459189085290703729281279344184417197883359351058003644499215541300350121854220342250451978930421772367851329849662028719768708399155817754711362398236471946313773603716759409265530444582884661320404389499624411965234669344882203618613097197387901166904575791500958722726774956950592290330175936039556139052663816485140080963740296685158607671768592" }, { "7377598052472799909620353419322603137723415431070641423056433630 50990728761110292768803869421408199244526424730838143228662194914314857136430737 89434155113971221138805303763480423496687322824531744020762041598590716339098287 91343386111124700155689622654961840380754244946720984970313893805578518003516073 5641075230099727784981579696383316732450130418277879081291954534985607255267932 91040802121912074401640073226003257602385910518707524375098380810792151468159323 59272268188012925764499414539835790113036863511169317924034366016920114706179376837448098952655862721652129333873020625135398431500899131874782270590048", "26690053756452308398721390096804652429111408747235998849320348549870126230712525274708597346508961935323823048352116439255386668122483555236157562141222434006899926132549352821247340442387991613448730451171206857242290791156220288682675982609964518905569737166444127835826079348146626921864776959482079234994631361894786436656768739968380067890165160954836874044821979903056957225885565092422439358816023307475581832942250031121721325840673134241504501661692722633100336840768527354183989544434614842654682324213774503456414914613412547380720171088896588158750436205804689590730033393056191028424154915201435563063992", "3688799026236399954810176709661301568861707715535320711528216815/169215718032454146095901737002485678790901914179482864125777331106759302744215797822810809511498045518338288799757661725047129775976254373463314416017128993811694804386237923340900604770406784566473173755998386770282409830097844352035251738093305402541509197084964701114515390028814839744480965823142680384744649624767291550851759670297818996073873968006960956353033659153219390871979066743795530136868490210455800714335529013059123604101460242870160400211866883478263106349349114199154533363251799944090298252763172390952446660627602934622584400932001701907172000401485323481964448487312714644861543740014645407417493588261100128985848137181719614326345024112347151970444057551896842474702539258687521054961314443551837168457190568932765925484427579811571491887599619302241390226818415165012748654917331557679228501007751078584244340346651276906088856205294333241792044902850102153793417101337667969641035858108457362954650972654353600494166650067557014544136240962457086782865870886529792004619668808741311540795514394731398977642092124679638585188974746423756335151669217754388004341907440529525288302872368689364872785975840444000802518095138062596107983803117056" }, { "-239344771695510351349291992975349015183687755312261264640655565 59880027487583466136533364102518649070390160795136023810470091681171428955831193 48344457085007359228086666145324485903333773379391455489556219681156342646858065 96824393663737121700189215323825147927318524415097221824671795011444303522438090 73240728471954064253765051525185557601431281145369716902120469411886093226662465 53476482728312567840603110355495270554470432250981685279567813448298175801364992 2468459436652089730331798017030410049989399340882712030505584719342958436741536069714790640546086933185494149096286590992747248311590137695839482679011866", "-20583944357058654336975302336113341974001469085102805363209530168831840401111182124827636905521584509677325966689931599005216123375088335255672290604710305325984961984791919524676460851699284525672773368217606895110240237523696098521003978238685169880199868729577660354717875890521074505342309726366304528678619465048659607726264456481345739318939431629704180230985397408136331466856633265343276511285483458860216756106887559724757372775728879136089013590836231272961497930729470443491032308329051560641396901204040829291495325588896591482909336032903587307512310970849256645908744180630660878534263566681640143534823", "15956318113034023423286132865023267678912517020817417642710371/3718709813392127924163278362562751486187605430152002432053108623099406465632705761508167478249438322470295467114170871555665890539409511492475240415534629792791729596612426725326976353265532166735941330128195885206087665506220364347120981130748862937276841801804372097254983242962029582754709606117339082763083905960784323141929645331591164015455383939302728076410053178677168172481507115685831178503426055335630689722163467637005123748113214310366231893390818795405612007113310547901224920768646006621130651182788173442625298859454337696280614462941186626306295514630883052819172301830539345633711941340491653447613466053205836875456839023743314390098829184111583809697328393569588632000669468187410368485286035179259523632217543401146996259011916302393091677624838641658623073752023082344005134299104409908004250830639232078441523519412192782367689826532215394196055149255026188549091956300108740792221660678858924234682223183500313556198187095251404633698868186071148295957994257417049500872570631774233307260384902571112475241073598945295745287525486108978093728296107260155093397986671349139935376427469718767763295900745932105722655724205000829205748307261900800" }, #endif }; cln-1.3.3/tests/timeRAtoLF.cc0000644000000000000000000000206711201634741012603 0ustar #include #include #include #include #include #include #include #include #include #include #include using namespace cln; using namespace std; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 4) exit(1); uintL m1 = atoi(argv[1]); cl_I m2 = cl_I(argv[2]); cl_I M2 = (cl_I)1 << (intDsize*m2); cl_I m3 = cl_I(argv[3]); cl_I M3 = (cl_I)1 << (intDsize*m3); float_format_t M1 = (float_format_t)(m1*intDsize); cl_I u; cl_I v; do { u = random_I(M2); } while (zerop(u)); do { v = random_I(M3); } while (zerop(v) || gcd(u,v) > 1); cl_RA y = u / v; cl_F p; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = cl_float(u,M1)/cl_float(v,M1); } } cout << p << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = cl_float(y,M1); } } cout << p << endl; } cln-1.3.3/tests/timediv2adic.cc0000644000000000000000000000225611201634741013201 0ustar #include #include #include #include "base/digitseq/cl_DS.h" #include "base/digitseq/cl_2DS.h" #include #include "base/random/cl_random_impl.h" #include #include #include using namespace cln; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 3) exit(1); uintL a_len = atoi(argv[1]); uintL b_len = atoi(argv[2]); if (!(a_len >= b_len && b_len > 0)) exit(1); CL_ALLOCA_STACK; uintD* a_MSDptr; uintD* a_LSDptr; uintD* b_MSDptr; uintD* b_LSDptr; uintD* q_MSDptr; uintD* q_LSDptr; uintD* q1_MSDptr; uintD* q1_LSDptr; num_stack_alloc(a_len,a_MSDptr=,a_LSDptr=); num_stack_alloc(b_len,b_MSDptr=,b_LSDptr=); num_stack_alloc(a_len,q_MSDptr=,q_LSDptr=); num_stack_alloc(a_len,q1_MSDptr=,q1_LSDptr=); random_UDS(default_random_state,a_MSDptr,a_len); random_UDS(default_random_state,b_MSDptr,b_len); lspref(b_LSDptr,0) |= 1; // force b to be odd { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { div2adic(a_len,a_LSDptr,b_len,b_LSDptr,q_LSDptr); } } } cln-1.3.3/tests/test_I.h0000644000000000000000000000011011201634740011710 0ustar #include #include #include "test.h" cln-1.3.3/tests/test_I_logbitp.cc0000644000000000000000000000122611201634740013577 0ustar #include "test_I.h" int test_I_logbitp (int iterations) { int error = 0; int i; // Check against ash and oddp. for (i = iterations; i > 0; i--) { uintL a = random32() % 1024; cl_I b = testrandom_I(); ASSERT2(logbitp(a,b) == oddp(ash(b,-(sintL)a)), a,b); } // Check against ash and logand. for (i = iterations; i > 0; i--) { uintL a = random32() % 1024; cl_I b = testrandom_I(); ASSERT2(logbitp(a,b) == !zerop(logand(b,ash(1,(sintL)a))), a,b); } // Check against each other. for (i = iterations; i > 0; i--) { uintL a = random32() % 1024; cl_I b = testrandom_I(); ASSERT2(logbitp((cl_I)a,b) == logbitp(a,b), a,b); } return error; } cln-1.3.3/tests/timesqrt.cc0000644000000000000000000000110311201634741012473 0ustar #include #include #include #include #include #include #include using namespace cln; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); cl_I m1 = cl_I(argv[1]); cl_I M1 = (cl_I)1 << (intDsize*m1); cl_I a = abs(random_I(M1)); extern int cl_sqrt_algo; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_I b; isqrt(a,&b); } } } cln-1.3.3/tests/test_I_logtest.cc0000644000000000000000000000160211201634740013616 0ustar #include "test_I.h" int test_I_logtest (int iterations) { int error = 0; int i; // Check commutativity. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); ASSERT2(logtest(a,b) == logtest(b,a), a,b); } // Check some axioms. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); ASSERT2(!logtest(a,logand(b,lognot(a))), a,b); ASSERT2(!logtest(logand(b,lognot(a)),a), a,b); ASSERT2(!logtest(b,logand(a,lognot(b))), a,b); ASSERT2(!logtest(logand(a,lognot(b)),b), a,b); if (a != 0) ASSERT2(logtest(a,logior(a,b)), a,b); if (b != 0) ASSERT2(logtest(b,logior(a,b)), a,b); } // Check some special cases, against ash and logbitp. for (i = iterations; i > 0; i--) { uintL a = random32() % 1024; cl_I b = testrandom_I(); ASSERT2(logbitp(a,b) == logtest(b,ash(1,(sintL)a)), a,b); } return error; } cln-1.3.3/tests/test_I_logand.cc0000644000000000000000000000114411201634740013402 0ustar #include "test_I.h" int test_I_logand (int iterations) { int error = 0; int i; // Check commutativity. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); ASSERT2(logand(a,b) == logand(b,a), a,b); } // Check against ash and oddp. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); ASSERT2(oddp(logand(a,b)) == (oddp(a) & oddp(b)), a,b); sintL c = random32() % 1024; ASSERT3(logand(ash(a,c),ash(b,c)) == ash(logand(a,b),c), a,b,c); ASSERT3(logand(ash(a,-c),ash(b,-c)) == ash(logand(a,b),-c), a,b,c); } return error; } cln-1.3.3/tests/timeLFln.cc0000644000000000000000000000175011201634741012345 0ustar #include #include #include #include #include #include "float/lfloat/cl_LF.h" #include #include #include #include #include using namespace cln; #include using namespace std; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); uintL len = atoi(argv[1]); #if 0 cl_LF one = cl_I_to_LF(1,len); cl_F x = one + random_F(one)/3; cout << x << endl; #else cl_F x = sqrt(sqrt(cl_I_to_LF(2,len))); #endif cl_F y; extern int cl_lnx_algo; y = ln(x); // fill cache #if 0 cl_lnx_algo = 0; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { y = ln(x); } } cout << y << endl; cl_lnx_algo = 1; #endif { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { y = ln(x); } } cout << y << endl; } cln-1.3.3/tests/exam_I_gcd.cc0000644000000000000000000000570211201634740012652 0ustar #include #include #include using namespace std; using namespace cln; #define ASSERT(expr) \ if (!(expr)) { \ std::cerr << "Assertion failed! File " << __FILE__ << ", line " << __LINE__ << endl; \ error = 1; \ } struct gcd_test { const char * arg1; const char * arg2; const char * result; }; #define num_elements(array) (sizeof(array)/sizeof(array[0])) // Note: This macro differs slightly from the one in "exam.h". #define DO_BINOP_TEST(typename,type,rtype,opname) \ static int test_##typename##_##opname (void) \ { \ int error = 0; \ for (unsigned int i = 0; i < num_elements(typename##_##opname##_tests); i++) { \ opname##_test& test = typename##_##opname##_tests[i]; \ type arg1 = type(test.arg1); \ type arg2 = type(test.arg2); \ rtype computed_result = opname(arg1,arg2); \ rtype result = rtype(test.result); \ if (computed_result != result) { \ std::cerr << "Error in " #typename "_" #opname "_tests[" << i << "] !" << endl; \ std::cerr << "Result should be: " << result << endl; \ std::cerr << "Result computed : " << computed_result << endl << endl; \ error = 1; \ } \ } \ return error; \ } static gcd_test integer_gcd_tests[] = { { "123456789", "345", "3" }, { "345", "123456789", "3" }, { "10", "0", "10" }, { "0", "10", "10" }, { "2523533737", "855322739", "1" }, { "855322739", "2523533737", "1" }, { "101611479673163974026724715741235467160607959655653420075620", "533177863832047932237026621580126811198495699416238676294977", "1" }, { "30729415811", "323233683197", "31071199" }, { "77874422", "32223899", "1" }, { "974507656412513757857315037382926980395082974811562770185617915360", "-1539496810360685510909469177732386446833404488164283", "1" }, { "2823618260546496405819033080103700734250203999069672146446", "18374686479688400895", "1" } }; DO_BINOP_TEST(integer,cl_I,cl_I,gcd) int test_gcd (void) { int error = 0; error |= test_integer_gcd(); return error; } int test_xgcd (void) { int error = 0; { cl_I a = 77874422; cl_I b = 32223899; cl_I u; cl_I v; cl_I g = xgcd(a,b, &u,&v); ASSERT(g == 1); ASSERT(g == a*u+b*v); ASSERT(u == -9206830); ASSERT(v == 22249839); } { cl_I a = "560014183"; cl_I b = 312839871; cl_I u; cl_I v; cl_I g = xgcd(a,b, &u,&v); ASSERT(g == 1); ASSERT(g == a*u+b*v); ASSERT(u == 77165803); ASSERT(v == -138134388); } { cl_I a = "#x80000000"; cl_I b = "#x-C0000000"; cl_I u; cl_I v; cl_I g = xgcd(a,b, &u,&v); ASSERT(g == (cl_I)"#x40000000"); ASSERT(g == a*u+b*v); ASSERT(u == -1); ASSERT(v == -1); } { cl_I a = "974507656412513757857315037382926980395082974811562770185617915360"; cl_I b = "-1539496810360685510909469177732386446833404488164283"; cl_I u; cl_I v; cl_I g = xgcd(a,b, &u,&v); ASSERT(g == 1); ASSERT(g == a*u+b*v); } return error; } cln-1.3.3/tests/test_I_logcount.cc0000644000000000000000000000123711201634740013773 0ustar #include "test_I.h" int test_I_logcount (int iterations) { int error = 0; int i; // Check additivity. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); if (a >= 0 && b >= 0) ASSERT2(logcount(a) == logcount(logand(a,b)) + logcount(logandc2(a,b)), a,b); } // Check behaviour on sign change. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); ASSERT1(logcount(lognot(a)) == logcount(a), a); } // Check shift invariance. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); sintL b = random32() % 1024; ASSERT2(logcount(ash(a,b)) == logcount(a) + (minusp(a) ? b : 0), a,b); } return error; } cln-1.3.3/tests/exam.cc0000644000000000000000000000153711201634740011567 0ustar #include #include #include using namespace std; using namespace cln; extern int test_integer(); extern int test_rational(); extern int test_sfloat(); extern int test_ffloat(); extern int test_dfloat(); extern int test_lfloat(); int test_elementary (void) { int error = 0; error |= test_integer(); error |= test_rational(); error |= test_sfloat(); error |= test_ffloat(); error |= test_dfloat(); error |= test_lfloat(); return error; } extern int test_gcd (void); extern int test_xgcd (void); extern int test_sqrtp (void); int test_all (void) { int error = 0; error |= test_elementary(); error |= test_gcd(); error |= test_xgcd(); error |= test_sqrtp(); return error; } int main () { if (!test_all()) { cout << "Tests passed." << endl; exit(0); } else { cout << "Tests failed" << endl; exit(1); } } cln-1.3.3/tests/exam_I_plus.cc0000644000000000000000000021700611201634740013102 0ustar #include "exam.h" #include #include static plus_test integer_plus_tests[] = { { "17009115185923538769", "-12047631083067675031", "4961484102855863738" }, { "12677011568664239747", "3269056182420253574", "15946067751084493321" }, { "9315504781982082433", "13857624532376678678", "23173129314358761111" }, { "15226508728194069537", "11481952022080775416", "26708460750274844953" }, { "7461641943684774743", "12249026721402718630", "19710668665087493373" }, { "1180469445886971055", "-3208456171287181032", "-2027986725400209977" }, { "18358552990465743315", "221529797579218180385160273426219343697", "221529797579218180403518826416685087012" }, { "-14819874956616484359", "30498815629431206969122152847973230849", "30498815629431206954302277891356746490" }, { "-11781881800334342169", "112219460388643619332860331282276228017", "112219460388643619321078449481941885848" }, { "3570694277032201957", "284821691832196381859344006870088122712", "284821691832196381862914701147120324669" }, { "-17005463295060938595", "69162171850264911722979835561124066203", "69162171850264911705974372266063127608" }, { "15647113311796203488", "150750467185419235519670165664526735459", "150750467185419235535317278976322938947" }, { "-14330150541101371097", "-13054027994001826312503071338715966858478218093171762021549815587520723118772963817341751396703629529810372702877555022105594068768886421335353882155416908", "-13054027994001826312503071338715966858478218093171762021549815587520723118772963817341751396703629529810372702877555022105594068768886435665504423256788005" }, { "7406427184711759740", "-4059250217961011548005203450962458026528281798230141192186669580689721046971433745892994467792118611646113962840750314719233572760336084100766391093756252", "-4059250217961011548005203450962458026528281798230141192186669580689721046971433745892994467792118611646113962840750314719233572760336076694339206381996512" }, { "8819522415901031498", "7274905269237471130619913887005155660991437201841760414347836177003483932007334374478344594178179032728521106519295465031750530183363793325150672647162846", "7274905269237471130619913887005155660991437201841760414347836177003483932007334374478344594178179032728521106519295465031750530183363802144673088548194344" }, { "-7242932332215698200", "-10558564312909325527488520195600871241245891651644550509993750377630234801225525279855157008009255586978047154906058790342845859331159009687703010657137320", "-10558564312909325527488520195600871241245891651644550509993750377630234801225525279855157008009255586978047154906058790342845859331159016930635342872835520" }, { "9794320575955609492", "13380937715397052566925484435342184213544885758759259410983243841206628594840271850190097746775475837233042430565529099681550277688470325394342993771343357", "13380937715397052566925484435342184213544885758759259410983243841206628594840271850190097746775475837233042430565529099681550277688470335188663569726952849" }, { "-18404048401680891243", "6690884608978704096379677348142836785900717005050936986370615083929607190833180925295418079551348559691161519822750772440155040888224482801864925665484770", "6690884608978704096379677348142836785900717005050936986370615083929607190833180925295418079551348559691161519822750772440155040888224464397816523984593527" }, { "-10763220363947284865", "-30985722824355332972176356513316569304601382411274079243859710673739383446566598659878378034375348869471278415635671865753349734809209959160389615096293457362383744562507969316522225741589739150453090393424063226271167062127000223628785686999799282795143706407082119829140399988180879618548495395684946331608899565543458192773899200054228140747414544792128323269250618482622488195333106891323515989863192944848391405358725993695671970811097285270641251816244586360288952156538400321933146150313939864593445583603568771077260174826348411367609521412133720180359748539721570562669201065857989876521301209899829037444385", "-30985722824355332972176356513316569304601382411274079243859710673739383446566598659878378034375348869471278415635671865753349734809209959160389615096293457362383744562507969316522225741589739150453090393424063226271167062127000223628785686999799282795143706407082119829140399988180879618548495395684946331608899565543458192773899200054228140747414544792128323269250618482622488195333106891323515989863192944848391405358725993695671970811097285270641251816244586360288952156538400321933146150313939864593445583603568771077260174826348411367609521412133720180359748539721570562669201065857989876521311973120192984729250" }, { "-12742462236537568498", "8711131313747826394504271797986775572294949693272674156076339989631171694968899228610359983845552623710580616605402899155485071497929100432998183040757832449369366844015907530612334721882095163137705867337969942902346066961718232788529860214990099385213558935023241940238638069647809530490438245386869385682221280939688108487754251075630026707075310465788398213293782900699868609660892232563106662995330591906155134237356516622436517046191466823447743155250482328613449506396571170001248589926831956459700467126756876526930443317428628239358666456771112897986098390410773312792390699312960051747534683311506465130527", "8711131313747826394504271797986775572294949693272674156076339989631171694968899228610359983845552623710580616605402899155485071497929100432998183040757832449369366844015907530612334721882095163137705867337969942902346066961718232788529860214990099385213558935023241940238638069647809530490438245386869385682221280939688108487754251075630026707075310465788398213293782900699868609660892232563106662995330591906155134237356516622436517046191466823447743155250482328613449506396571170001248589926831956459700467126756876526930443317428628239358666456771112897986098390410773312792390699312960051747521940849269927562029" }, { "9991390529516174614", "7879872958436992955898278403297937595295396115022400543178444946646147916754852888072481665174663073269556311758611700754643170639645548596647557683044355930340624784190093631808382820554407595007761070026239341594197877214157118335743842022627898879376346092898666610367809537340994845045475091410516226225078052019727419030585524815982151736622865401299588936172760762386183577504972623377661437665668080131418564228642443266935225613702941906491478788336262289516199380144218708241406077806669686589734333554945412904560108150202389909124657090061223183441083590340175629756198442568877659538345749595968764873879", "7879872958436992955898278403297937595295396115022400543178444946646147916754852888072481665174663073269556311758611700754643170639645548596647557683044355930340624784190093631808382820554407595007761070026239341594197877214157118335743842022627898879376346092898666610367809537340994845045475091410516226225078052019727419030585524815982151736622865401299588936172760762386183577504972623377661437665668080131418564228642443266935225613702941906491478788336262289516199380144218708241406077806669686589734333554945412904560108150202389909124657090061223183441083590340175629756198442568877659538355740986498281048493" }, { "831234034418847630", "-744676478858160349467117341859049692149463503380690495147216354303526704924280287782902146026018180364963325847811379182950159627878800024734206345960410146056000392683000433501805629464626281031086102425271022388473812300724085127447081771317912465921636737545371909901577246384446144919253141375367648958387948463576516115079816552636772639965957498569187848459747361493535081532845254971492261148968198806736512864867151355002902241562014241077734122599581732704243705918200179789271894804233542502502119523149682814025979598424744685548054183678652651244898867735764030968089217841214778606507809487462642341164", "-744676478858160349467117341859049692149463503380690495147216354303526704924280287782902146026018180364963325847811379182950159627878800024734206345960410146056000392683000433501805629464626281031086102425271022388473812300724085127447081771317912465921636737545371909901577246384446144919253141375367648958387948463576516115079816552636772639965957498569187848459747361493535081532845254971492261148968198806736512864867151355002902241562014241077734122599581732704243705918200179789271894804233542502502119523149682814025979598424744685548054183678652651244898867735764030968089217841214778606506978253428223493534" }, { "-6996572501442843347", "-16567158719848992553565776505785820491834685475229611199353714982570065913508303466008005931649515528390057456882757990896824841386431756898386429000065518724021230756426613661219891419166146764347562529640689229693578574350948436847247856000438153789455857903402883189892697143647998643667467614427922009931545254965075041050860609824086811877108940020349157317276288348430058535959434983921323332907180869396258655826781438419383792024592535415693101119109484610789291889841197827977530804650015884500878613240443324806805475203272442094530735476095374446946252236490708915034012846683015547314889561060687692538144", "-16567158719848992553565776505785820491834685475229611199353714982570065913508303466008005931649515528390057456882757990896824841386431756898386429000065518724021230756426613661219891419166146764347562529640689229693578574350948436847247856000438153789455857903402883189892697143647998643667467614427922009931545254965075041050860609824086811877108940020349157317276288348430058535959434983921323332907180869396258655826781438419383792024592535415693101119109484610789291889841197827977530804650015884500878613240443324806805475203272442094530735476095374446946252236490708915034012846683015547314896557633189135381491" }, { "-8920936222630165483", "-18738991973681679876688842391791783563249057933653045519186959571392922172943405646958686202208790537612746921398028331540617848217445632123805070077600768524509025758950743971128222843292926773668584735575066246660802064630842300367821042873152766467703905048558085377302000898639290554395913805527529259855535801856020623830262396582180677933562523957295341539162448074423901242873918231922121053192425691524797238343327318801359521456598967984637483081312932069399045363737622797213185099130529375169698811801965974416555301085043300426947769193582129151016159057101028336667142913854943018973494705119572045938607", "-18738991973681679876688842391791783563249057933653045519186959571392922172943405646958686202208790537612746921398028331540617848217445632123805070077600768524509025758950743971128222843292926773668584735575066246660802064630842300367821042873152766467703905048558085377302000898639290554395913805527529259855535801856020623830262396582180677933562523957295341539162448074423901242873918231922121053192425691524797238343327318801359521456598967984637483081312932069399045363737622797213185099130529375169698811801965974416555301085043300426947769193582129151016159057101028336667142913854943018973503626055794676104090" }, { "-243510292488206214847646757340020705642", "5940577100149745132", "-243510292488206214841706180239870960510" }, { "35446324064743728955945058978206455057", "-6248622708755929572", "35446324064743728949696436269450525485" }, { "-285342226760657637664173494795024413673", "-11942737781617905307", "-285342226760657637676116232576642318980" }, { "180790435817422032042321866247362452865", "12401641959336396832", "180790435817422032054723508206698849697" }, { "-179994871947239535956826388240542999950", "13573822506399140772", "-179994871947239535943252565734143859178" }, { "-308198027295905163635866438671452347268", "-8790069282378476990", "-308198027295905163644656507953830824258" }, { "-139324757925833055762410227358605285566", "-190622873846936719063564661032771271922", "-329947631772769774825974888391376557488" }, { "332866352618304570046318203427223999347", "147978646177673305481282943528696833018", "480844998795977875527601146955920832365" }, { "-39471620476300923970352914034802271156", "28992893610776120142668950821916856486", "-10478726865524803827683963212885414670" }, { "274120253734611965146455315763505869288", "254675910805265090692978775702306142625", "528796164539877055839434091465812011913" }, { "-122086811464559635596206661886176775901", "287312583034687582188356355813963609701", "165225771570127946592149693927786833800" }, { "288576174771266329955482943556556984728", "-57843540651903655425270706396868707777", "230732634119362674530212237159688276951" }, { "-47977736580820486006305788441965482221", "984809271313988066640898939725532304075331399066274624928410251834520283291912387208948664716457549646483445981126881113426109906085249657168046936670489", "984809271313988066640898939725532304075331399066274624928410251834520283291912387208948664716457549646483445981126833135689529085599243351379604971188268" }, { "21225484205143479814642328762121362291", "11839789093732539327981861490012713257538550745921177905266671749716203131127256902110452504526721633943016923389974867770082516862899595554460170417713940", "11839789093732539327981861490012713257538550745921177905266671749716203131127256902110452504526721633943016923389974888995566722006379410196788932539076231" }, { "-193095363331703875886398909106293703000", "4389392021031719669078675478621418677903292147307684123866099084349756491860737402449105804868232530632178577388168068485304437343508442251302846768269976", "4389392021031719669078675478621418677903292147307684123866099084349756491860737402449105804868232530632178577388167875389941105639632555852393740474566976" }, { "-14827657635864183514988182371035598180", "-7256545787852407071411458891023580461638051949278710509801472046178301830006724297747051044450550248499056073213660185258676369175307019300952192657194576", "-7256545787852407071411458891023580461638051949278710509801472046178301830006724297747051044450550248499056073213660200086334005039490534289134563692792756" }, { "54301423175725658626298504084995819705", "-13385853291610595576947504757201441006088030688464261540642594993520424631577281077984278942244446266776534612440941312995898184903431893212829646845766101", "-13385853291610595576947504757201441006088030688464261540642594993520424631577281077984278942244446266776534612440941258694475009177773266914325561849946396" }, { "195114404067053480147948948510253723990", "-8373866462448797623435948949281383906369538962237624940506813188612614128993186653340202956656303504523161255703176374041758276069255591562198514767063594", "-8373866462448797623435948949281383906369538962237624940506813188612614128993186653340202956656303504523161255703176178927354209015775443613250004513339604" }, { "-308030589512186791277525017840002670741", "-11922204352024596469278978325035646517433105521287613403902396944414655739824695945028308092245747333098422116078042326104667969967224788442970266049942774583538734406057081597034454910987815490244451193242377705191422489528853976486607580169986057592557285271953385769215318545520155212402919465580052078255078759756709086185424029620805084776442744700501748376290562843380642608395240491162047933014854466267084965223593172702334466729933986413870670083326499598274393380692146118979961818816348097032083332695128587696590646086980241100792624502607816103195636761141133903550454815591457829485684936036414823492160", "-11922204352024596469278978325035646517433105521287613403902396944414655739824695945028308092245747333098422116078042326104667969967224788442970266049942774583538734406057081597034454910987815490244451193242377705191422489528853976486607580169986057592557285271953385769215318545520155212402919465580052078255078759756709086185424029620805084776442744700501748376290562843380642608395240491162047933014854466267084965223593172702334466729933986413870670083326499598274393380692146118979961818816348097032083332695128587696590646086980241100792624502607816103195636761141133903550762846180970016276962461054254826162901" }, { "-172649878347923210775992373331623646864", "22180935775581457002090790736532281654456312526625354262953960635330604551829750571440878712430708012807252279301365732385899228826740712544768476577874129759972563823209525283326887563301081200476495752033290851190327066070873711444930389093339915885090143783170994309089448293499799071372787520776773788274677288230540162485916160484352398851925328125588729604931589867889917097887951581817207079060016091919559509735997493084833476849835444339835031436580214492450731100723026312163752403946315983551266206214298679421644737804098691991631489261658890937663698502561036246447760919715595005106669653475931803053499", "22180935775581457002090790736532281654456312526625354262953960635330604551829750571440878712430708012807252279301365732385899228826740712544768476577874129759972563823209525283326887563301081200476495752033290851190327066070873711444930389093339915885090143783170994309089448293499799071372787520776773788274677288230540162485916160484352398851925328125588729604931589867889917097887951581817207079060016091919559509735997493084833476849835444339835031436580214492450731100723026312163752403946315983551266206214298679421644737804098691991631489261658890937663698502561036246447588269837247081895893661102600179406635" }, { "17539006966816771902104329685391462527", "15609797782337099611892065465036826453911053690739041627254619195700021040383385710184052653282070244915503750549545390475671883312314708978681904377133928647935359080875691628246716591529028104762422990155477702994042953196747769893182153631482194578269859879402160062955490194674372351117284129320011166238130774752386987036267064693133554447596069886693581191241594745541512444806003236372840085705813835001957163976961730871756250344335996073970142337882238844723800849054637237549515249957267772181010402413375667537558243971058326641257721901094391380667244006959028327507917720426571969997513984360849930719808", "15609797782337099611892065465036826453911053690739041627254619195700021040383385710184052653282070244915503750549545390475671883312314708978681904377133928647935359080875691628246716591529028104762422990155477702994042953196747769893182153631482194578269859879402160062955490194674372351117284129320011166238130774752386987036267064693133554447596069886693581191241594745541512444806003236372840085705813835001957163976961730871756250344335996073970142337882238844723800849054637237549515249957267772181010402413375667537558243971058326641257721901094391380667244006959028327507935259433538786769416088690535322182335" }, { "244901855797156286376563377540855746602", "-22138106346578776369849317622304392466030036563754663379976505966920461958652141160336156065177498990718609170201272980114106671808245437660234479124938853665375934080221740523696180221118540569603989748587853373569525751680828044059607889572522502629277877343410298879764820905044284757389006201848194571453112545228115550224254565141563427486518108434758694923122284117299374156393942906293546318323661938734959824887786185558612820887463537294120950912969343488704744978847504513710882720654330147775174336365363311173472002077960424794151168301281665765411704505095008907760396535767621855642720080219960822554492", "-22138106346578776369849317622304392466030036563754663379976505966920461958652141160336156065177498990718609170201272980114106671808245437660234479124938853665375934080221740523696180221118540569603989748587853373569525751680828044059607889572522502629277877343410298879764820905044284757389006201848194571453112545228115550224254565141563427486518108434758694923122284117299374156393942906293546318323661938734959824887786185558612820887463537294120950912969343488704744978847504513710882720654330147775174336365363311173472002077960424794151168301281665765411704505095008907760151633911824699356343516842419966807890" }, { "-119403662992279138748600939857239307122", "26272999248235953724172008428088697264933069743507017434844709711501131900922919455931092196539942532993887162365511473221418376205773427597933886270411672062672089518774390132453916538404354895529975888201032175628249480896964400801763570333497287321002961557096975786141940970260074557095118887294558700145949117395512768347250531196100831164663613049206690894640391431616112104502483838173255614981302462548882276825096564828583591963617871547373532874400764134244496979962241959713525053686209002866840900623246072884125102845824992994967009109046451949348656842486048332953732384499190437432898387573320391878853", "26272999248235953724172008428088697264933069743507017434844709711501131900922919455931092196539942532993887162365511473221418376205773427597933886270411672062672089518774390132453916538404354895529975888201032175628249480896964400801763570333497287321002961557096975786141940970260074557095118887294558700145949117395512768347250531196100831164663613049206690894640391431616112104502483838173255614981302462548882276825096564828583591963617871547373532874400764134244496979962241959713525053686209002866840900623246072884125102845824992994967009109046451949348656842486048332953612980836198158294149786633463152571731" }, { "313963939617834410089002930298454269912", "23286645405607099799151331553995799851855144387826191186590140820016670502830395945076644578998873585162998873396623634135231418574284200209367505115739462344028303923666952261030907434438322884189133236837089851688275865098623902644385995630973049587854251981548128145516004461191094062488421288607625783540996659060285661398859383778209495884203323937672739376151794507745282074538961033778823733980759695886879886017489555795079194346438911010371103435094677167286870898482214310646392174423422237727456012197253183422715313378603607058548706460095379882633958651034759773864354021315490712575535559549015858088608", "23286645405607099799151331553995799851855144387826191186590140820016670502830395945076644578998873585162998873396623634135231418574284200209367505115739462344028303923666952261030907434438322884189133236837089851688275865098623902644385995630973049587854251981548128145516004461191094062488421288607625783540996659060285661398859383778209495884203323937672739376151794507745282074538961033778823733980759695886879886017489555795079194346438911010371103435094677167286870898482214310646392174423422237727456012197253183422715313378603607058548706460095379882633958651034759773864667985255108546985624562479314312358520" }, { "2000877973959266893810594143560134441447453310844726478119781029700338468704683515329516333146806175216349912753585564808803731447160643580198590073658869", "-17993015014355471903", "2000877973959266893810594143560134441447453310844726478119781029700338468704683515329516333146806175216349912753585564808803731447160625587183575718186966" }, { "5492930533666246223206322654398877802091439062008700770880939594548305919677404080859141226095489505872709347538974725998600861651942609010590873980143878", "15372278140141207703", "5492930533666246223206322654398877802091439062008700770880939594548305919677404080859141226095489505872709347538974725998600861651942624382869014121351581" }, { "-13405500833215428652808705089190188280715732437731292502890523313631564795139560159124390691283401484515088713758307366404145018349044148223082253439210893", "-14793401891248640808", "-13405500833215428652808705089190188280715732437731292502890523313631564795139560159124390691283401484515088713758307366404145018349044163016484144687851701" }, { "9945195259699924701593703207751086973468898794114625092150620088406276196469184233537941913755508476427888065765634203723512911676149274871082481174186606", "8699133332160461067", "9945195259699924701593703207751086973468898794114625092150620088406276196469184233537941913755508476427888065765634203723512911676149283570215813334647673" }, { "-1785165974800693006461065312083337532938610906605533088558498259067461510781028452552786542598361030690629530721209490413999022804146471920873844686294838", "-13079925952361275418", "-1785165974800693006461065312083337532938610906605533088558498259067461510781028452552786542598361030690629530721209490413999022804146485000799797047570256" }, { "-4861207515430071951958387366611380234482792653010151054346367776006873932152600469133110239669746470475230906073865131648496652783311445471793936775767736", "-9381557743227419896", "-4861207515430071951958387366611380234482792653010151054346367776006873932152600469133110239669746470475230906073865131648496652783311454853351680003187632" }, { "-6638723469626495957966112633999375479181736600737250559572415894485618850919815869703127084789143821420728194272094956858541960962483734293877093635361160", "277811698220276334443479876776376776138", "-6638723469626495957966112633999375479181736600737250559572415894485618850919815869703127084789143821420728194272094679046843740686149290814000317258585022" }, { "1983880417172931934469534542170437296262471214582817006917470485544552211448284732460451903536334682269123998240709059499894818265755197559390728940140016", "-118940994129137705779355371753506018694", "1983880417172931934469534542170437296262471214582817006917470485544552211448284732460451903536334682269123998240708940558900689128049418204018975434121322" }, { "-9354509264984586574958285335910611806441061705184818350015454221731287473282231343722010109181841005578131927454778025302197744540571159656556971614966757", "120224841184491944160266976391113485817", "-9354509264984586574958285335910611806441061705184818350015454221731287473282231343722010109181841005578131927454777905077356560048626999389580580501480940" }, { "4389359421234641412950681847970318834150108533025088077429496538447029921663033978550089607257809597829358374972237448178553189381274150213236222139873594", "106674783386899772113212633712093787897", "4389359421234641412950681847970318834150108533025088077429496538447029921663033978550089607257809597829358374972237554853336576281046263425869934233661491" }, { "-9319417879153488839579936799737117639058244394679644240663244688680826325564084529474537634510092069422987165268448907193562300482925125162731530249763801", "192969103435503875767216559494769734726", "-9319417879153488839579936799737117639058244394679644240663244688680826325564084529474537634510092069422987165268448714224458864979049357946172035480029075" }, { "1394404616168163951844558734723678125985464491792846741433683801962971891047718103736551854371207400145441134823994228143957746922511631911996296931168332", "-211230038021470285136061932161632203274", "1394404616168163951844558734723678125985464491792846741433683801962971891047718103736551854371207400145441134823994016913919725452226495850064135298965058" }, { "-2935941510094051560788359387128767361559188973149773593522440619832472030019457317998381634585179453958737810428870232715146002408187749944694186205812791", "-1221176156661231926164756142840452419679061324806989304452215660535991083923207702827717652226257158321829748247784282139952864899457896871473184473608543", "-4157117666755283486953115529969219781238250297956762897974656280368463113942665020826099286811436612280567558676654514855098867307645646816167370679421334" }, { "-1338674579024795395027232680327531457830908239605718353094975139226848400289367913459076082700361212506196070727982446232782659114647371030398516119682505", "-1298372177520411182435886041880377054374169787570856408996533471838082317927648953576721017727347029007573543972764860712708420553928791798580799809858729", "-2637046756545206577463118722207908512205078027176574762091508611064930718217016867035797100427708241513769614700747306945491079668576162828979315929541234" }, { "-2072456075229532951804023218627137969798924912365258263779029006567941400203608770518731715660383378937120213112973528605594220795605977413985543331908189", "-9744489461776287963808523409593616918248399004543154581056479712028497082820841423941781438667661074968238703192056877665754560746003512076830245760254982", "-11816945537005820915612546628220754888047323916908412844835508718596438483024450194460513154328044453905358916305030406271348781541609489490815789092163171" }, { "-2570682164188734368809161664810917340861573482754788446510182252413437925852206735928397938304353826925422441004271229738766803460790995673395984247950088", "656920705293329551826685120408221577679101260931105312141757138825917579070505267306626244216341686712802796891966598838285570807961966448181138356047523", "-1913761458895404816982476544402695763182472221823683134368425113587520346781701468621771694088012140212619644112304630900481232652829029225214845891902565" }, { "7846359203342053693101523606887617345982401999003795257520576318451663998927274759872692123323796450295314377046602880394071105863527900699633560551732837", "3683380639347829102597675045842249667669675715600522157867595962635108482512780509393310714588544837398923613138772339053021025559943198965234376657126821", "11529739842689882795699198652729867013652077714604317415388172281086772481440055269266002837912341287694237990185375219447092131423471099664867937208859658" }, { "-11692323148567132684205145901751681947225824260005631214936266006610207543813382900867093989444659986091234552140689684476541703112098935301322850961583953", "-8534276689564199122569555420819240948691777228327984555753862457592427992599992931175844172478864477440165366128106812103785256271256853749622592560655914", "-20226599838131331806774701322570922895917601488333615770690128464202635536413375832042938161923524463531399918268796496580326959383355789050945443522239867" }, { "-10734754884168724884333968138739681643742524619139397687680049322697740991391014196697040576174049452737571835233123127815762146577096625434481167057340772", "17059878151450238567815178684522345445687980385106446646013863901583786249398194029757376950491550197185231926262467028755342392379269039238766592672298850588065335172902157386017520689203005559576263548017475991638498600879259882041932152385436968424098224966518534467302264172016376096778201462205990822825056602379115848799619564610033123837036507127427054121975400703490855123544706355545059512146550901507159940126280812512339749605195422987937677650572797378799103456094203126081464905326203083057134061673694975250599375795827437561275156235513192978645909947341297774926450637694325145427434486258223666250272", "17059878151450238567815178684522345445687980385106446646013863901583786249398194029757376950491550197185231926262467028755342392379269039238766592672298850588065335172902157386017520689203005559576263548017475991638498600879259882041932152385436968424098224966518534467302264172016376096778201462205990822825056602379115848799619564610033123837036507127427054121975400703490855123544706355545059512146550901507159940126280812512339749605195422987937677650572797368064348571925478241747496766586521439314609442534297287570550053098086446170260959538472616804596457209769462541803322821932178568330809051777056608909500" }, { "1982582032974021971225071139786536402936929744496433027195224299475980201425925452469321205602618940472354066218156609448199804973454183972974358405933935", "-5591374624026484498020036332218412149978824230210339582240360391202660977358546150723165491729699122647688030937226316069237264083850854032732663284717882873051337566653841254365703461654061656817936193716386141166210237666314879751427421825450110467888973152907618520704486700443275358649289847595635931220181024199692771066498714511145489237541761266539978351840438236927937894376002981658065431416811632941197501676956304254109064936038146674412392128883565757325842468006824235119684861972224857533964558963441079998949499582965764591461900562931342373507763081479989957632695010603500633322408246084430203281475", "-5591374624026484498020036332218412149978824230210339582240360391202660977358546150723165491729699122647688030937226316069237264083850854032732663284717882873051337566653841254365703461654061656817936193716386141166210237666314879751427421825450110467888973152907618520704486700443275358649289847595635931220181024199692771066498714511145489237541761266539978351840438236927937894376002981658065431416811632941197501676956304254109064936038146674412392128883565755343260435032802263894613722185688454597034814467008052803725200106985563165536448093610136770888822609125923739476085562403695659868224273110071797347540" }, { "11532228364136654310006206557545352284448588590560137249197311142901246089838098630841794341370689745410654263817911440601934362503092628725755210859171724", "-25776236925500995542036591604259749301547568770017466769502569415611770276300787105037848049555500555975152877716727294374436703766730618054071617947449695177320842403963009384468257891933593584757723535299746543328292715942626303315235241470269740287031317322772461137186093930239744879822272349431389779234805703118929710210161489122272898252221025966631463842234537744822906696719691188223105175714602909117904182229960075276443648211003011686250829474364425483901920822837775032295913486152631638908227467242772081310515646217115760180349854601959031626524004201825198439309850266508687796415478396821644422350208", "-25776236925500995542036591604259749301547568770017466769502569415611770276300787105037848049555500555975152877716727294374436703766730618054071617947449695177320842403963009384468257891933593584757723535299746543328292715942626303315235241470269740287031317322772461137186093930239744879822272349431389779234805703118929710210161489122272898252221025966631463842234537744822906696719691188223105175714602909117904182229960075276443648211003011686250829474364425472369692458701120722289706928607279354459638876682634832113204503315869670342251223760164690255834258791170934621398409664574325293322849671066433563178484" }, { "-2603756427337798371354526130541868239006085657393372011847827118826669474695402075575479286172808099892726251004549675772420422527946534088483901153485670", "-10844269742362409682236511127219508926736627172993604953084481596070757241623728297275447608738915355190715664012379562650777199088096670239050254578284071100042116609747208178716191571268815994455064584659920497876052406993834873124981417288518101426395560764186717660091472734401090302285129741058888303693710456902635092811413971399734306158050053239768185860958896447298052082493590498954512083131068867270078638929796561440903919430094619437872896595720463663570751134804664228918188923926951933302878771189484614604311920655871182974081898031051411394311700207305532216445616083858025977851570522763537300875989", "-10844269742362409682236511127219508926736627172993604953084481596070757241623728297275447608738915355190715664012379562650777199088096670239050254578284071100042116609747208178716191571268815994455064584659920497876052406993834873124981417288518101426395560764186717660091472734401090302285129741058888303693710456902635092811413971399734306158050053239768185860958896447298052082493590498954512083131068867270078638929796561440903919430094619437872896595720463666174507562142462600272715054468820172308964428582856626452139039482540657669483973606530697567119800100031783220995291856278448505798104611247438454361659" }, { "-5929887196386997518766568868806997104240129372360669348628384183712406620199102166145939206783172815805659513128544493795329100599632286529420772709366102", "24544958491142793859949310604465694574872439331169358241746200808802938771527900616394258199996170862256988647191747967628756772368808644819831481350919782560499270148419601775750932556119448001824346026042068416905254113155445053931789404515589532235225580737103411251232560863878948880220469490014568323308965914171394449781093816607870593225534700167342589927524232815571862258490314644577819742372918446373756857848586825568514909823940075182825283229026250682015641747568282510036326125505522447591703308661608718100933027549520132308555240654655887041040427813131621391320267698106519650611462269033902177180035", "24544958491142793859949310604465694574872439331169358241746200808802938771527900616394258199996170862256988647191747967628756772368808644819831481350919782560499270148419601775750932556119448001824346026042068416905254113155445053931789404515589532235225580737103411251232560863878948880220469490014568323308965914171394449781093816607870593225534700167342589927524232815571862258490314644577819742372918446373756857848586825568514909823940075182825283229026250676085754551181284991269757256698525343351573936300939369472548843837113512109453074508716680257867612007472108262775773902777419050979175739613129467813933" }, { "-8848084327536592532063677611386811805244460767433749071435930786126721080365289638381557872263825830664387392539638767251180242665642373539064690745095464", "-15917950175678012281826361248776190984758236997789474333609547749168308439513527143790323694526378056113636462939674273462177686456811495629631337058042159570336251822399402513133598701991665209363955263097315081570618652783181494594400709239428597117944511110842795526862595552977665064029517628515465251448116061875878430407784298951946811321795808932206846491091803276390661869369638950672478828532423383951689632136029256108992610781912267083149156104328033893238864631158195280554850035949666897861529711006187241710164902350100555999894332438423857208747342184052953230247487231455921360593096823760117493579248", "-15917950175678012281826361248776190984758236997789474333609547749168308439513527143790323694526378056113636462939674273462177686456811495629631337058042159570336251822399402513133598701991665209363955263097315081570618652783181494594400709239428597117944511110842795526862595552977665064029517628515465251448116061875878430407784298951946811321795808932206846491091803276390661869369638950672478828532423383951689632136029256108992610781912267083149156104328033902086948958694787812618527647336478703105990478439936313146095688476821636365183970819981729472573172848440345769886254482636164026235470362824808238674712" }, { "-16314775600714318471451792035636584056297958597339492996728118376578145765736873313518831390349547274517050864260054903974054712997529177834428786007341762649083404743713562157667828894017440065599882523458121037421757904691003094608420565550031561905074671735751685371533975894842331113347413787808917193134135744321547478500861021485075363990553639161661734684228250909589741380076008551020384304303171431833670236949934603973673998262066558668396388979463892768199916011368116729432353268535563246463324517035331079693172060671712718486388759443825620676228470068291448236914050793177812037679396721657020438979754", "12553426083939460917", "-16314775600714318471451792035636584056297958597339492996728118376578145765736873313518831390349547274517050864260054903974054712997529177834428786007341762649083404743713562157667828894017440065599882523458121037421757904691003094608420565550031561905074671735751685371533975894842331113347413787808917193134135744321547478500861021485075363990553639161661734684228250909589741380076008551020384304303171431833670236949934603973673998262066558668396388979463892768199916011368116729432353268535563246463324517035331079693172060671712718486388759443825620676228470068291448236914050793177812037679384168230936499518837" }, { "20637030084881771176788188367974505419050866216433677435050410899110162793040751338330447574748263391136356400036001988938659722098883893353523409458775455519257672423829361150611806294256710309281788819450225670112435352092313483086404714074567539245791066202051788986426960935796927738180831688497683293306590464598379493141645539253898709000874685535467854788184424886911457134522632486730390913239660179785071885982403741669161655812015114272497907946919026898579927936299607156006210124954460880383605958519412435713868501997649784658832599101777001703519408664662715322044086646014163774269660274683400619225321", "11620128128044940816", "20637030084881771176788188367974505419050866216433677435050410899110162793040751338330447574748263391136356400036001988938659722098883893353523409458775455519257672423829361150611806294256710309281788819450225670112435352092313483086404714074567539245791066202051788986426960935796927738180831688497683293306590464598379493141645539253898709000874685535467854788184424886911457134522632486730390913239660179785071885982403741669161655812015114272497907946919026898579927936299607156006210124954460880383605958519412435713868501997649784658832599101777001703519408664662715322044086646014163774269671894811528664166137" }, { "-9838804688358141062268493389453191808060717708062736103828856866310283812230958467655270667206937622979717683919584610288962829724022506216738929136418489468786902364550847498615864720240589837282441807174290461916292258263929411081218952357662703079709351365960916688275651864441386750529258343003652300629003597744958152243494244227986280506395347894285277364095898602965258114321853474000520432831298793365139040664543928707100657375292032051256485942532600998813627925626928634068613637417702688610315924917761411247617905738119218110678854564441914784262998574445847209847985439514580300936248281049628734475702", "2380166482232871816", "-9838804688358141062268493389453191808060717708062736103828856866310283812230958467655270667206937622979717683919584610288962829724022506216738929136418489468786902364550847498615864720240589837282441807174290461916292258263929411081218952357662703079709351365960916688275651864441386750529258343003652300629003597744958152243494244227986280506395347894285277364095898602965258114321853474000520432831298793365139040664543928707100657375292032051256485942532600998813627925626928634068613637417702688610315924917761411247617905738119218110678854564441914784262998574445847209847985439514580300936245900883146501603886" }, { "-30961575335426221869515496362216292453766907587859856766456625722888557357647164641922707199324601608700561081422636642523431947551124957385652791834855425829101761914145137205962610515642614866296480715893528289170482422505734612327038754622917335073993027434927547277037587173529054849390646376806910407207016292483185533697336599641898250465186168797820802225861771331652801064811222606773495565340386327294310913503461903243119204619412324538886439122443769008953829820425376589389335553937319588224864611583436327810214798652896733118881040503785110481197462772022447173744898802421806800203373153221004361953729", "-10586442965055062759", "-30961575335426221869515496362216292453766907587859856766456625722888557357647164641922707199324601608700561081422636642523431947551124957385652791834855425829101761914145137205962610515642614866296480715893528289170482422505734612327038754622917335073993027434927547277037587173529054849390646376806910407207016292483185533697336599641898250465186168797820802225861771331652801064811222606773495565340386327294310913503461903243119204619412324538886439122443769008953829820425376589389335553937319588224864611583436327810214798652896733118881040503785110481197462772022447173744898802421806800203383739663969417016488" }, { "8835746018617511846981408800319983340292665114153404569022025834059427359831684523399830234196625160662387716033871154398104436720494608541518837969397374272734698261557358249258503982414578618525420572597611597792132117034895074841909295420434392963714805547538976612884853497014341345150095544449860198192757839489063747595073430612069212219930749783824683135433987509303139260133564905961552149844964215891730262218278214035649706577154652729844092199333026620127958228847111442161350881527928460177763370427262298116900358910460957772350452949782281117704005514462730290063772968929608448642592954601418753021512", "-12227722924075527556", "8835746018617511846981408800319983340292665114153404569022025834059427359831684523399830234196625160662387716033871154398104436720494608541518837969397374272734698261557358249258503982414578618525420572597611597792132117034895074841909295420434392963714805547538976612884853497014341345150095544449860198192757839489063747595073430612069212219930749783824683135433987509303139260133564905961552149844964215891730262218278214035649706577154652729844092199333026620127958228847111442161350881527928460177763370427262298116900358910460957772350452949782281117704005514462730290063772968929608448642580726878494677493956" }, { "-5455184800550144006991157215735481579353213544152145628297990102571936052187486515129266239245491863623978659179559754999567936067584384479787934704340911556625153536160778495579370425428019248950494107696016864499055854257192071541354806671987402367524770228296322497224645429524493838356022616251290117624472061673033274133156467148770562815676767117605001434288573911556053311048284534341905722947046607192815465807736361991479044698448267471087552952494477144251510778491315012457514838113324210534577956298926109164909779987221094000880908857594198276812276890284008572664102792405452379662935026125770444036994", "-7349798942312432150", "-5455184800550144006991157215735481579353213544152145628297990102571936052187486515129266239245491863623978659179559754999567936067584384479787934704340911556625153536160778495579370425428019248950494107696016864499055854257192071541354806671987402367524770228296322497224645429524493838356022616251290117624472061673033274133156467148770562815676767117605001434288573911556053311048284534341905722947046607192815465807736361991479044698448267471087552952494477144251510778491315012457514838113324210534577956298926109164909779987221094000880908857594198276812276890284008572664102792405452379662942375924712756469144" }, { "27233955893140063612427006607965940109569052437681267421929959186535416115028420267622879017163568256526042146282241931623674996867133390355390677118211537487769195270234259640386625552763891339073878417517169618832945750393661600092643257470064376916337734385887099957095417541169462231630821139075814859604097878094729685589777579267192538715202397220666651307185763054526407234767132218634060693076054116575833737797189157152326979078121760900891899319809724675232853322526718686306470372869701173824664984405178677187081936624687293494821338781534163633206006387449585716391843039459733925494003066841874935048611", "-66646390577667468207341453008390168215", "27233955893140063612427006607965940109569052437681267421929959186535416115028420267622879017163568256526042146282241931623674996867133390355390677118211537487769195270234259640386625552763891339073878417517169618832945750393661600092643257470064376916337734385887099957095417541169462231630821139075814859604097878094729685589777579267192538715202397220666651307185763054526407234767132218634060693076054116575833737797189157152326979078121760900891899319809724675232853322526718686306470372869701173824664984405178677187081936624687293494821338781534163633206006387449585716391776393069156258025795725388866544880396" }, { "15030400024888781078933103028897733817304421960545019199443871381537070197157227994520524631721701055962609956080413517776229513420814407790533237358129529547793422514837651333555776540939235592155512951229106778709351772195248438493792786143040421233061520515971787881798980515709417481015662862327435825812557205663033601853937647320838585333754027488605638576977560072206293290493215523194883494322543800546276353830683084405428005815296131527861252717516620765986589669237487765523936713749717927502645633123584240464131140829496052170285171610845098023517906586134613874506419828208611247177336492131262918439281", "-164048419232636429449474429717211197442", "15030400024888781078933103028897733817304421960545019199443871381537070197157227994520524631721701055962609956080413517776229513420814407790533237358129529547793422514837651333555776540939235592155512951229106778709351772195248438493792786143040421233061520515971787881798980515709417481015662862327435825812557205663033601853937647320838585333754027488605638576977560072206293290493215523194883494322543800546276353830683084405428005815296131527861252717516620765986589669237487765523936713749717927502645633123584240464131140829496052170285171610845098023517906586134613874506255779789378610747887017701545707241839" }, { "-10227062646189307616073129048534031298512434237226774743330733206156788005874968173984804649812506029813402205606562016228122184161577517837608957023376079537037472977098465137152327215807765130656192272994478964341604278041664840636982572214751638093860605132350960802560601354006634296348422600320863531059118477125143903734159707623839282511184908969206873548650544269932394344952983661665472663102992782521888857016369837211403335306200813816060883478434441858442549261115972947741929087886423170398410216855322384956160289855500229952405068604320121652911887067414460828300146993858360430784079225137421074839819", "117460076430162201914796277915447781936", "-10227062646189307616073129048534031298512434237226774743330733206156788005874968173984804649812506029813402205606562016228122184161577517837608957023376079537037472977098465137152327215807765130656192272994478964341604278041664840636982572214751638093860605132350960802560601354006634296348422600320863531059118477125143903734159707623839282511184908969206873548650544269932394344952983661665472663102992782521888857016369837211403335306200813816060883478434441858442549261115972947741929087886423170398410216855322384956160289855500229952405068604320121652911887067414460828300029533781930268582164428859505627057883" }, { "27989453264793973121573869640708223239762902243991948581280654553806618470632044367386680716040316895884976837122054709584963028986161694425215067648887944710852278135008221491665079705797192389681328802747226171436158375378499411314855257919224316919346771317457123252623293612958336691335423245293660257386649100685560072354549579281852792682734916555498283053758141666658137856828164206947320523255487437004565021167276952652515632644458005291855624829941937578229983628962137595011570216766689546500517528191189928660433013004254032861383790553611840534023221000900694995707453499030166286828319347894538505334235", "-59175168207571178843658955348404514921", "27989453264793973121573869640708223239762902243991948581280654553806618470632044367386680716040316895884976837122054709584963028986161694425215067648887944710852278135008221491665079705797192389681328802747226171436158375378499411314855257919224316919346771317457123252623293612958336691335423245293660257386649100685560072354549579281852792682734916555498283053758141666658137856828164206947320523255487437004565021167276952652515632644458005291855624829941937578229983628962137595011570216766689546500517528191189928660433013004254032861383790553611840534023221000900694995707394323861958715649475688939190100819314" }, { "1178650930337394440162727078866515771626896502845852711186000991913866844090831426017480263676964607121490209778220339316756171449922437605552456088105443130477974682689512446683178356259305893852096425478878588001446154476458310269704392486398646169362313605456233489086567865316333034897433650974160168545492823208575634152241341906068149887959566983066154182855136114289266802474404127414747112706158621650063987662749553991791509795764642256261917497984177610694405881831052199417235241109412927893781778469398975117797578753730248539151297798807326284978255001046995523851829184120171969918537718488250577987049", "-151873924489040812813761508259707631973", "1178650930337394440162727078866515771626896502845852711186000991913866844090831426017480263676964607121490209778220339316756171449922437605552456088105443130477974682689512446683178356259305893852096425478878588001446154476458310269704392486398646169362313605456233489086567865316333034897433650974160168545492823208575634152241341906068149887959566983066154182855136114289266802474404127414747112706158621650063987662749553991791509795764642256261917497984177610694405881831052199417235241109412927893781778469398975117797578753730248539151297798807326284978255001046995523851677310195682929105723956979990870355076" }, { "28233332719950979786871881804755080223325040620170668729385709165879717973040387558150293205758215739710262749733170837042434162049732587908182282319848154049410849721309988807368466228286699721201975848741931128639324322061892706638973259354962358866000024260698793885547287093369940035337370984725857550291339492871017395328145015077506882578124550084937438336881072124376107623716831044079223921566902242543198986921476998895559488862309653154914291349588095330683589871173449191854284433182368052817373384461363574550061788800329400860372148193491004593903732351395815409821222597665222975816418433744748143385431", "-43245950360315656184924888243641533635", "28233332719950979786871881804755080223325040620170668729385709165879717973040387558150293205758215739710262749733170837042434162049732587908182282319848154049410849721309988807368466228286699721201975848741931128639324322061892706638973259354962358866000024260698793885547287093369940035337370984725857550291339492871017395328145015077506882578124550084937438336881072124376107623716831044079223921566902242543198986921476998895559488862309653154914291349588095330683589871173449191854284433182368052817373384461363574550061788800329400860372148193491004593903732351395815409821179351714862660160233508856504501851796" }, { "17311283930487575047109155431670372891723312431004343097275158353815289445461275098157423001160013464866170709729134076291306322952612660169010483426086431377525432637844274608988581691477819008626983761905899834444008235608280930166913911248710072733217113558125600345343437000427963292980921009445490627620344145866648036116660335905940809860199697939729919140888034303887423527841395304960072549430314367914315102150378504502158659627719016733307736583749830415574905929299482373462584995162798576853564481617711234957058703455021082855018642616999836886763535412642684228990890160568207941504887072856663966242787", "1954009743321912552050341299974626734964446274711484506734354360114801426013796892421541915293157994203607853436799102383078659985249097057923578528366737", "17311283930487575047109155431670372891723312431004343097275158353815289445461275098157423001160013464866170709729134076291306322952612660169010483426086431377525432637844274608988581691477819008626983761905899834444008235608280930166913911248710072733217113558125600345343437000427963292980921009445490627620344145866648036116660335905940809860199697939729919140888034303887423527841395304960072549430314367914315102150378504502158659627719016733307736583749830417528915672621394925512926295137425311818010756329195741691413063569822508868815535038541752179921529616250537665789992543646867926753984130780242494609524" }, { "1135960177108146621604027872788612991247811085764456406834564014092038611848908717507207251239454266163702244932570537009884467598603226302482406831131219148530146321028801515381981782506355042255201016953375149829517466449677312249611502599434850555618739830488706171667035140895674806873502543300909514568759918040129665855731078258004983486524477103833885001539135541445685573269814159175744401893663504523858005835387122082112362666991112899837534230326730196110477118156871579503345757821268248575583821695674912517830056856597644827244194658166928026249459511837772775196175188368236573504643083995409774002567", "-5513982495816270388232134254127393284677692173792609278582774509636977743203029647121158805174638642867428501907786521939155900331399058909602425073976766", "1135960177108146621604027872788612991247811085764456406834564014092038611848908717507207251239454266163702244932570537009884467598603226302482406831131219148530146321028801515381981782506355042255201016953375149829517466449677312249611502599434850555618739830488706171667035140895674806873502543300909514568759918040129665855731078258004983486524477103833885001539135541445685573269814159175744401893663504523858005835387122082112362666991112899837534230326730190596494622340601191271211503693874963897891647903065633935055547219619901624214547537008122851610816644409270867409653249212336242105584174392984700025801" }, { "-30369736932762868789456108597366835061749107555998091727589163626331595118680326568212941898571309672187038272915036839449380083450246957904300051802617002374912724325419651633014408152565340519439718081357147324136023867003917288524338643759680061563616479323818330115572573568245719292922176485298767387601922362893307843067637295955606642841006993776777666041277965868780958830666697755738164183356399977211227424725670822944234275611849032230010745799964550976844117943559190671369193871330514473741920389633762695829790016565565261170688485790141638094160105909405353382982945608773290740598479367828342651860878", "3451570547959142767282758882796967240086418127970526029661337442068316209707489088420708984628065070358319478649952710478991064476168799556496237099109563", "-30369736932762868789456108597366835061749107555998091727589163626331595118680326568212941898571309672187038272915036839449380083450246957904300051802617002374912724325419651633014408152565340519439718081357147324136023867003917288524338643759680061563616479323818330115572573568245719292922176485298767387601922362893307843067637295955606642841006993776777666041277965868780958830666697755738164183356399977211227424725670822944234275611849032230010745799964550973392547395600047904086434988533547233655502261663236666168452574497249051463199397369432653466095035551085874733030235129782226264429679811332105552751315" }, { "24749014370880469345815230363662696846133977441600857690896762642529872426102613384561609594131771018575590861342023688138502403609639138062665279129058939911797019091643704220495944170754490238422880589600838613701783818105188827633578438439212856537589855796204839275633245851474930725845096235668385012500773524750522781174430369067441632028068262240870795850561389232369373523415592833273932285308223863420210049445377497367753786125779044716949754454461623397410528064697616617917065021866397277409044449982605591256067763430930720398889239414812509701319783809830072841056369381573100589260104551934136733317845", "-9461623592584966196513107657889418526847060851423069480904645009418813160370721071067349946095573698635859409908288864150475056170059858850823883834932131", "24749014370880469345815230363662696846133977441600857690896762642529872426102613384561609594131771018575590861342023688138502403609639138062665279129058939911797019091643704220495944170754490238422880589600838613701783818105188827633578438439212856537589855796204839275633245851474930725845096235668385012500773524750522781174430369067441632028068262240870795850561389232369373523415592833273932285308223863420210049445377497367753786125779044716949754454461623387948904472112650421403957363976978750561983598559536110351422754012117560028168168347462563605746085173970662932767505231098044419200245701110252898385714" }, { "19070246171469235561279483225919489206942407814032615339351735800304747459507922411906751965555240682457214768298108831815622470433175555196912899313888991765436434867025639919521068437191248198117664398275835972573354886915721765715992151871453808224011999677700078879590132676060988550961950472536029228350169237717222998397029428440792110955380302156159849645211726041489206565536560827557279129751110297078563108009278363910936720061216511798518178957070787710331228500533067546198458251241005176280410230146430275074766072259256583499095689284871987010372039977403712023630453400259082684930755893684499232318008", "12330599952818018622104330691506128012101935028731995985677032980931398338453806827555760801312052792065671886621851470997557806941112316627790755867100463", "19070246171469235561279483225919489206942407814032615339351735800304747459507922411906751965555240682457214768298108831815622470433175555196912899313888991765436434867025639919521068437191248198117664398275835972573354886915721765715992151871453808224011999677700078879590132676060988550961950472536029228350169237717222998397029428440792110955380302156159849645211726041489206565536560827557279129751110297078563108009278363910936720061216511798518178957070787722661828453351086168302788942747133188382345258878426260751799053190654921952902516840632788322424832043075598645481924397816889626043072521475255099418471" }, { "-20895998178036569919774658790651496115060841511658297683195804524712012347695091074325978179977718571444320688167469052862702339462089668992243209990795362064005869602003990235714500149401994013174762139297327430396441552225926368085284222509085197484452650071390132794942944512235132641643003294762547138305644086106533258432786768644384855008506026923783604514268955071498269812887794817192371944269611642901807443894686178438687102834127061425955994253034824027771176714559050403098437684091684851207513969915720607528045624635094984539637789113651579846373399975502788877555747414523231999341294756679330384323996", "764238600803843266244444637050072967342049538611688895792923539838804953492110953673720766879606601435939162680753428779068917662740403667549850724878795", "-20895998178036569919774658790651496115060841511658297683195804524712012347695091074325978179977718571444320688167469052862702339462089668992243209990795362064005869602003990235714500149401994013174762139297327430396441552225926368085284222509085197484452650071390132794942944512235132641643003294762547138305644086106533258432786768644384855008506026923783604514268955071498269812887794817192371944269611642901807443894686178438687102834127061425955994253034824027006938113755207136853993047041611883865464431304031711735122084796290031047526835439930812966766798539563626196802318635454314336600891089129479659445201" }, { "6243894672855694190803081952962387322599009058758027960092936187687064819462191583137945440936085088260632250436567758576422207449236613172605950116622271404444221039084346501796818945639456207912207604248991842124079786471250102192718092353598850889806607728696519257402580732995770031331187089424192803722612735557735028710899438934171272639518928194764526910590046378401600819132587804143949995694950116915803127294011661411525934100144319021440919928013617766507409909846670172516021888661284467975865076091834094160862228180625536450124272957206172214541444266874056050295270719541605687740822711659847211976891", "11877496607682442993105675644902145742318375725225741293060927105303783712520284640625374957608051032540491531573337817824773543104969422017506696018037874641947740606655370938613842356322585858034851150595788166740174872996252792014218946552442572806242471174234462119454014379628228878122072189387777413014452140618318641689597452676091677588204537830401725113931418426919671512011822864583481449136550835952005765386885680701637038206002172218712504732572449659704181315669255320876647592649071711438131711904976335957846353867776093588236311654631696625859173554395714740218099921290128795607292259527492722462071", "18121391280538137183908757597864533064917384783983769253153863292990848531982476223763320398544136120801123782009905576401195750554206035190112646134660146046391961645739717440410661301962042065947058754844780008864254659467502894206937038906041423696049078902930981376856595112623998909453259278811970216737064876176053670400496891610262950227723466025166252024521464805321272331144410668727431444831500952867808892680897342113162972306146491240153424660586067426211591225515925493392669481310356179413996787996810430118708582048401630038360584611837868840400617821269770790513370640831734483348114971187339934438962" }, { "-24023960171862805266003610953999097357395283354964456554686635290239019705581779621120391229617494503580661676939681517550103414632840981987397485411400553792707518662609532504246677658012933762605038799352109564432278094548068984563394926376371580465135388578139331334464060067790936072127680597181415407099723844313625277987147283697141407959289588588489162704824409673099509423520008795428217612706997355591985894255450783091681112776112997887084157623388943538145736618168104404283342039105202585543852590302154958791010622670839015475427693311663800177428904406869645066988663292128104453773413982185343111560886", "-31939808827732134714870375774276102357277346245583282398423150631754622253109692213928642228787888509211781331649081002266227303203259124984426497846441848502574293640959494009564992092503141598640200823656998243767453860939156780549404892392521391484933772285520949470194562525777116137058001008184603332597820522016200623301007194309404025522056113671560767212894303567191067178003014955596425115379852712737129325098876542459702682095445350281859042779889411325882123213577906096942649941285655935053362468972482748617111598313960198743596285343178242282172686940700127068972627110105953098737923773182254460772630", "-55963768999594939980873986728275199714672629600547738953109785921993641958691471835049033458405383012792443008588762519816330717836100106971823983257842402295281812303569026513811669750516075361245239623009107808199731955487225765112799818768892971950069160863660280804658622593568052209185681605366018739697544366329825901288154478006545433481345702260049929917718713240290576601523023751024642728086850068329115219354327325551383794871558348168943200403278354864027859831746010501225991980390858520597215059274637707408122220984799214219023978654842042459601591347569772135961290402234057552511337755367597572333516" }, { "14513652183174940741664411990199277445706189147726874603036586212536012746892966848269748909379750612027025331446918381470766609543142456872580466135425754204680927122749772612276850998180593344389487924747722210296498854143380696064338777945015153982467675141485724865534995199700908286263993697988986805404864429385840512740226775506122190698806967785494289035976495492863456705096841250592980439363856397663738211335801835896091823148249303370609165910779981271035234045185574995335952208702661648744928539539455138167482396767268362221492607154709559716065850417221174683768503217544145599044845325824451589309835", "-12814535978730024053359592817368712576084646962861720729844389627130663192435154658607204342320327460695280260731620465435530495952836598646143907272825807563512741964987882356778796849529260646503692618525570185450780889283642116889481314560395290434301143877809550098309214046129802023655714098730144464028249594406616074059558969757405392170810220921023905546104487938441503430332099605473144930508420331873995741851604525954472341693863067199617721032815462094767522339305487934030130207039176659398466616780628644572276059410087128533031562978399689702766028716401176531098447698206272762966470643604141938670152", "1699116204444916688304819172830564869621542184865153873192196585405349554457812189662544567059423151331745070715297916035236113590305858226436558862599946641168185157761890255498054148651332697885795306222152024845717964859738579174857463384619863548166531263676174767225781153571106262608279599258842341376614834979224438680667805748716798527996746864470383489872007554421953274764741645119835508855436065789742469484197309941619481454386236170991444877964519176267711705880087061305822001663484989346461922758826493595206337357181233688461044176309870013299821700819998152670055519337872836078374682220309650639683" }, { "11356479761814008572465147431830778885327227506593483181241437802252618729479905490826767363633131720717461693888023278837835457496021519184903984385091047829540007466025527592005114414671285638168997562037691602144751434208304408870143450743278437854754504713023422097017723330207792526222436928747286558205279330508360438281011315147578105966454344087225699378388309094140949428028313539634103047841948634832398526343605363013644180832752120081735152285507591096001749463421326282317713079361827765412853023201330345752038722069405404812511739634687282327711258974520622248165974215116400638833123609666501349513623", "-2451734542868054449539778460457497703609327132304922810342762480808881050209276687756391911546806187586640918078231508181876445466503459873508196878629364924241891220686182517218825181707207808769770392864734466652524094735160185556148554260517746279303022469784592528209667497664672945900929888144529727881050106027775707933311860110618130543481573815538047460723253898548348335762406437618625388229555824532715231231491787570056329865617082709588903922431713098922691537317839185452018617461891748518176708607861270770493263960554805373552348256747200291438630960804647686832667981625018361034564086859426490014044", "8904745218945954122925368971373281181717900374288560370898675321443737679270628803070375452086325533130820775809791770655959012029518059311395787506461682905298116245339345074786289232964077829399227169172957135492227339473144223313994896482760691575451482243238829568808055832543119580321507040602756830324229224480584730347699455036959975422972770271687651917665055195592601092265907102015477659612392810299683295112113575443587850967135037372146248363075877997079057926103487096865694461899936016894676314593469074981545458108850599438959391377940082036272628013715974561333306233491382277798559522807074859499579" }, { "-1814184401790217165873937825605141478060935014868566665644215718762341535891730598045990231798382966074312671040257824056876679135909008140059087311700216658095793352051583071432744886316274989901835606602224927350560604355249919901932382803472476702792978322468747380191775778902733911968522382089332819162367884984027854067607561808704316828316820133400099093450636968732151876570835173932998599031643640476109466728761033062776578175554441947411139184426213290292577467587355369954997241091769769542810051228504545831588488726789173405585678190671534386784806998695797717346491308862362775748058331375692317599945", "15466182953987394334491149436346080039471412309427279110582769586053943302670765125931570041904640518032832554998553018838321871748542118021556398569294085708441934948186080236498081517178574839977996802813431873543309853609838200338534343580791382510179184571852290959723696010410340740895530535423959476873857191548113125728667781953125153120447892632916574768078583174099545013854248664119997703948998871566374080719541931440495888606776561795893839624084254684939434035018741535261951124673664746010067859317726891535170781460914710499572006592206360512398012457295755926986236618644330364227754380084585899275327", "13651998552197177168617211610740938561410477294558712444938553867291601766779034527885579810106257551958519883958295194781445192612633109881497311257593869050346141596134497165065336630862299850076161196211206946192749249254588280436601960777318905807386206249383543579531920231507606828927008153334626657711489306564085271661060220144420836292131072499516475674627946205367393137283413490186999104917355231090264613990780898377719310431222119848482700439658041394646856567431386165306953883581894976467257808089222345703582292734125537093986328401534826125613205458599958209639745309781967588479696048708893581675382" }, { "-27127130599753372624001250456405972983012981437652156246797208697430661165612459362971759027335854588888552031022264244768883843080959804690580574272908031271224646245152017114094021048441971097191444782106551075175878815012595015584723250801765859461211934306789890718268168352614164589637346918581658850565274510502652089457352942736418509881708568727739912127781455473660768550022762222130489047215089836402367851853412705556570667960548570630054608024914653686223423908494006675057953013815512203710764854485332282975729323105427143207127239069826750682633272289409910001698385240596625059970587393681128674617278", "5719655139276246085992066702308194672442413085748146924567717361937179810269300239821879673460959112727066470468217892213025828988023367028158410455624528688729907493639908638553730770145274142147983721694721139760883483821883267129411125364089207412089113869427479340283853501026803387874124668123626271531796990801822527792189514551888019206405597994403243358155410088320317141454525417323186389587327532772638942220300149829241141659063128602316305332848477566686425551944956989370838072872906293845914921103561360871571846865478762953536949621421094416539099628942010528483544062050170673327754206501716239719529", "-21407475460477126538009183754097778310570568351904009322229491335493481355343159123149879353874895476161485560554046352555858014092936437662422163817283502582494738751512108475540290278296696955043461060411829935414995331190711748455312125437676652049122820437362411377984314851587361201763222250458032579033477519700829561665163428184530490675302970733336668769626045385340451408568236804807302657627762303629728909633112555727329526301485442027738302692066176119536998356549049685687114940942605909864849933381770922104157476239948380253590289448405656266094172660467899473214841178546454386642833187179412434897749" }, }; cln-1.3.3/tests/timerecip2adic.cc0000644000000000000000000000156111201634741013517 0ustar #include #include #include #include "base/digitseq/cl_DS.h" #include "base/digitseq/cl_2DS.h" #include #include "base/random/cl_random_impl.h" #include #include #include using namespace cln; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); uintL len = atoi(argv[1]); CL_ALLOCA_STACK; uintD* a_MSDptr; uintD* a_LSDptr; uintD* b_MSDptr; uintD* b_LSDptr; num_stack_alloc(len,a_MSDptr=,a_LSDptr=); num_stack_alloc(len,b_MSDptr=,b_LSDptr=); random_UDS(default_random_state,a_MSDptr,len); lspref(a_LSDptr,0) |= 1; // force a to be odd { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { recip2adic(len,a_LSDptr,b_LSDptr); } } } cln-1.3.3/tests/timefact.cc0000644000000000000000000000100711201634741012422 0ustar #include #include #include #include #include "integer/cl_I.h" #include #include #include using namespace cln; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); cl_I m = cl_I(argv[1]); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) cl_I f = factorial(FN_to_V(m)); } } cln-1.3.3/tests/test_I_logorc1.cc0000644000000000000000000000042011201634740013500 0ustar #include "test_I.h" int test_I_logorc1 (int iterations) { int error = 0; int i; // Check against logior. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); ASSERT2(logorc1(a,b) == logior(lognot(a),b), a,b); } return error; } cln-1.3.3/tests/test_I_mkf.cc0000644000000000000000000000051311201634740012712 0ustar #include "test_I.h" int test_I_mask_field (int iterations) { int error = 0; int i; // Check against ash. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); sintL s = random32() % 1024; sintL p = random32() % 1024; ASSERT3(mask_field(a,cl_byte(s,p)) == logand(a,ash(ash(1,s)-1,p)), a,s,p); } return error; } cln-1.3.3/tests/exam_I_minus.cc0000644000000000000000000021677411201634740013265 0ustar #include "exam.h" #include #include static minus_test integer_minus_tests[] = { { "3872339191937382556", "13437882608410293981", "-9565543416472911425" }, { "12702320881720530101", "13823645380834800545", "-1121324499114270444" }, { "10222969257152373972", "-3454292165863475982", "13677261423015849954" }, { "591233951053628288", "-17639978232337836611", "18231212183391464899" }, { "-7878405903223218778", "9050739027069287469", "-16929144930292506247" }, { "11347120771894057376", "8443917396834074370", "2903203375059983006" }, { "7831959259127703467", "-257470007821066702597399141202130667973", "257470007821066702605231100461258371440" }, { "1092406341647857980", "-325710450166845666190895573961860069495", "325710450166845666191987980303507927475" }, { "-4220606126689357919", "73461013742902296577411907972196819778", "-73461013742902296581632514098886177697" }, { "-5112059189225304080", "334306213789148650102245018234146620793", "-334306213789148650107357077423371924873" }, { "3093346224554776175", "-204967241927023874963787190016588249299", "204967241927023874966880536241143025474" }, { "-5735747638156472357", "-3881750746805128137401544408305666047", "3881750746805128131665796770149193690" }, { "17639095392510638323", "13312205908441007415860933757605397223142073616822325142416364932887680287063250296996056787873086490231950036662943632990219865746131453861285495087665017", "-13312205908441007415860933757605397223142073616822325142416364932887680287063250296996056787873086490231950036662943632990219865746131436222190102577026694" }, { "16304056910692545233", "1463591032326743052350022746892396184459320617971409440301562638996633667625451301419074212369365394140737678584830314878769698416417465834928609990708982", "-1463591032326743052350022746892396184459320617971409440301562638996633667625451301419074212369365394140737678584830314878769698416417449530871699298163749" }, { "-10347586523508777315", "12614325304787850623826535169596975975360455924114817820074336137897280818245940873677389644701038550150832199897314137414727161192173691528917744363375331", "-12614325304787850623826535169596975975360455924114817820074336137897280818245940873677389644701038550150832199897314137414727161192173701876504267872152646" }, { "16875252323587344863", "-10230183557696638447600885112945653217398839137450096120772416948425622105048400944465287395231588821521217980407867153259741079758527788318592431794213674", "10230183557696638447600885112945653217398839137450096120772416948425622105048400944465287395231588821521217980407867153259741079758527805193844755381558537" }, { "8574302739232756920", "2945205250727759066959418729185252318153395797902208079569164623770839848878181416073351760975066439564334127158302281471631001294503759011790017443478716", "-2945205250727759066959418729185252318153395797902208079569164623770839848878181416073351760975066439564334127158302281471631001294503750437487278210721796" }, { "-17657597319577965851", "-470389901349206124503884936612357721199915776516939967013182926735009022045917047211666512521578494339222795740836335004070464944715357800461845632614015", "470389901349206124503884936612357721199915776516939967013182926735009022045917047211666512521578494339222795740836335004070464944715340142864526054648164" }, { "11472336850218354926", "16764018932433717867649699977474298016589762238077229911249331402108995850754999065988360217500238643747316139204767820295123085026049273617874157749889925712672510963712964034497935503076689670786498045302562704435768723916334451317158760704743066709581593570757498670622547878516907127632802801541072452593999435195637193819500375063696114131057474475407791672955417184592088612921927282233762919112197264895445408873539746256555444555901857369535350160665235184955438709679669964546134487688796078142789125799020704969226557493354453298489954288702387159956161243151013189140749021799388406290339231792790773612376", "-16764018932433717867649699977474298016589762238077229911249331402108995850754999065988360217500238643747316139204767820295123085026049273617874157749889925712672510963712964034497935503076689670786498045302562704435768723916334451317158760704743066709581593570757498670622547878516907127632802801541072452593999435195637193819500375063696114131057474475407791672955417184592088612921927282233762919112197264895445408873539746256555444555901857369535350160665235184955438709679669964546134487688796078142789125799020704969226557493354453298489954288702387159956161243151013189140749021799388406290327759455940555257450" }, { "12682607562584942903", "32133619583510009354538204193505267426986629771080807813988708187761849276650847958886764459302043799013813125903744946349479743277662066609741649009023451783267511140245797235200413941774959851628239089013586399425314412329003636059313583335807925401822165199322334470452126484173417518861322963430951772895619791799137157183662289329901964728384697377777905235894234370773419160283767144177627084271804319157013765325677633945370597318765372346484383325176768117059688792498687750479618961541872574768601477738410497806623403054372221338126223825515939164627992974469102910882915893925327931884157735553718792115929", "-32133619583510009354538204193505267426986629771080807813988708187761849276650847958886764459302043799013813125903744946349479743277662066609741649009023451783267511140245797235200413941774959851628239089013586399425314412329003636059313583335807925401822165199322334470452126484173417518861322963430951772895619791799137157183662289329901964728384697377777905235894234370773419160283767144177627084271804319157013765325677633945370597318765372346484383325176768117059688792498687750479618961541872574768601477738410497806623403054372221338126223825515939164627992974469102910882915893925327931884145052946156207173026" }, { "14621880654476679971", "-10075923784619510279100488003620810539888599376089081798647754628017452762406215094511315867213396543200861274584884759429891242650999761503100661310915213260386281412125687376866399124849043409890009033179987278297335571911640353059036551139958369871790768643514550179661619387008678118363266091945225880595898524898713646458647465935791224159084684209727153050053537752111696883536364966526666445737103854446009305531519860527938394412863332757413309423156200192973778629503534709731073637828912608835085933003410694216843775182940057891552358942312728978810053715387504707194992816961400377579655168106377696154728", "10075923784619510279100488003620810539888599376089081798647754628017452762406215094511315867213396543200861274584884759429891242650999761503100661310915213260386281412125687376866399124849043409890009033179987278297335571911640353059036551139958369871790768643514550179661619387008678118363266091945225880595898524898713646458647465935791224159084684209727153050053537752111696883536364966526666445737103854446009305531519860527938394412863332757413309423156200192973778629503534709731073637828912608835085933003410694216843775182940057891552358942312728978810053715387504707194992816961400377579669789987032172834699" }, { "-3220156644655019630", "-8347829670073174550775641165362740628312221836466572623516708794243074870361401136762432100726575330214254748615114820602945887237367461962207075265579588481261313345359877816874924645801358760718027997416917747796144940020489321523749233377708490614979453376328244189926517907474704635785063100359787580409065317918203485474119227673185211436285930586838616288721370975925191964611302275354365110550116042403226844820172448647475637867255305805337047967053177320593337377763657329816935516961201488840745892529800883680912275812320160312651894919502389242002380151562481051684439333368396132543667539444686619670713", "8347829670073174550775641165362740628312221836466572623516708794243074870361401136762432100726575330214254748615114820602945887237367461962207075265579588481261313345359877816874924645801358760718027997416917747796144940020489321523749233377708490614979453376328244189926517907474704635785063100359787580409065317918203485474119227673185211436285930586838616288721370975925191964611302275354365110550116042403226844820172448647475637867255305805337047967053177320593337377763657329816935516961201488840745892529800883680912275812320160312651894919502389242002380151562481051684439333368396132543664319288041964651083" }, { "11628988978410243120", "21091260149209133824278525560739673446778991946138130571540201996950100883736332286627324787663044982195445635023357027423513202277912840570399895946346028843517588470258087913846945044832851780108963206182331994065720076983528527849542421619745503796476103034657238118665288185878258232226731582201217795631247916614224227701409259346052937919425072595891571572960468193421257458185693656090215937518204243652916583730260295885562094977775951577484951577581277292356830523013216949489797535362720471761788697932265967910160407593278848113303674799017334692501935041730808945554336564957621028111014116286675587727714", "-21091260149209133824278525560739673446778991946138130571540201996950100883736332286627324787663044982195445635023357027423513202277912840570399895946346028843517588470258087913846945044832851780108963206182331994065720076983528527849542421619745503796476103034657238118665288185878258232226731582201217795631247916614224227701409259346052937919425072595891571572960468193421257458185693656090215937518204243652916583730260295885562094977775951577484951577581277292356830523013216949489797535362720471761788697932265967910160407593278848113303674799017334692501935041730808945554336564957621028111002487297697177484594" }, { "-15960716439913426281", "18799211173341989380260980155501104944815245973352765317821146163884181375747259542484535639646490774929026134833947975785613727050541297797675705933339289016115326958150660323801621778641184271728990164666383865587422591755046779736996211052149338115836473967202556153668963815595875844414662034458693455631979862997316049580586739835122770408911308146605671192538040301857163633538268589024651373766021087864982140201615461513687698136663128896835597598904095187715456109340116329587986878167776146023396961265667934659006280575496363066974484893764810659481361856335795455814679851690737943592227795474197104696127", "-18799211173341989380260980155501104944815245973352765317821146163884181375747259542484535639646490774929026134833947975785613727050541297797675705933339289016115326958150660323801621778641184271728990164666383865587422591755046779736996211052149338115836473967202556153668963815595875844414662034458693455631979862997316049580586739835122770408911308146605671192538040301857163633538268589024651373766021087864982140201615461513687698136663128896835597598904095187715456109340116329587986878167776146023396961265667934659006280575496363066974484893764810659481361856335795455814679851690737943592243756190637018122408" }, { "-181065640455671431985325539445069267017", "14120143334024043377", "-181065640455671431999445682779093310394" }, { "-91295299684959299024846233061686623774", "6891102275697080803", "-91295299684959299031737335337383704577" }, { "-252582289949155881579950873916766853744", "883304029266526072", "-252582289949155881580834177946033379816" }, { "-10104159950635417603045689770006558103", "17251490913777465304", "-10104159950635417620297180683784023407" }, { "288463495341489091297108607960869684860", "-16376960611483226267", "288463495341489091313485568572352911127" }, { "204661965092367792468062569536290631004", "7774991291341524479", "204661965092367792460287578244949106525" }, { "174559967167400201536723778015754014369", "168183438971818617783400303174116396891", "6376528195581583753323474841637617478" }, { "-253300708624436983509156598368557395374", "-77166863757693227553099778725240875400", "-176133844866743755956056819643316519974" }, { "-38587765028356074196061530813295290944", "5999161273284748726648331130480323187", "-44586926301640822922709861943775614131" }, { "-236400856885875891058508662756360145662", "222191413471626205952456600591947275777", "-458592270357502097010965263348307421439" }, { "212937903940173587742882129816769611096", "336470165768472077447806282475185249734", "-123532261828298489704924152658415638638" }, { "-264812595676159375893264580577855253845", "-247068943830535581577267897204259299723", "-17743651845623794315996683373595954122" }, { "-1725732715479127274526681751197327660", "-2279805492899538651574406423954277869507456204136276822451602661149698386520868702017367409743272511010382761246500508887739763323997191435566266331339917", "2279805492899538651574406423954277869507456204136276822451602661149698386520868702017367409743272511010382761246500507162007047844869916908884515134012257" }, { "-220007189346579184019349894240059989979", "9116030813176547770422918633286023943039811682891023288884273747820892639481842291616424036020927750322528731882517057595815179415042385175627374957565803", "-9116030813176547770422918633286023943039811682891023288884273747820892639481842291616424036020927750322528731882517277603004525994226404525521615017555782" }, { "139683266109784685815165642637380856544", "5782493350903499652295971390391981928106911831248674750993968151944332845911526084530951283012280786005612601970108688202931002414214353708335212597807345", "-5782493350903499652295971390391981928106911831248674750993968151944332845911526084530951283012280786005612601970108548519664892629528538542692575216950801" }, { "239160165978290709841254489756277328273", "5152132850125501873897264811465207492706871561577273155117982457627773151595716641409297120994045059130053034927464958986304380141364542178714472948085275", "-5152132850125501873897264811465207492706871561577273155117982457627773151595716641409297120994045059130053034927464719826138401850654700924224716670757002" }, { "315772704643232632782106484978382006176", "-3689252327480456512393153800679864208480329729627292260734151097785848947569336194072922395859496552999163037466184616218582046814434719444842678248982224", "3689252327480456512393153800679864208480329729627292260734151097785848947569336194072922395859496552999163037466184931991286690047067501551327656630988400" }, { "82735713197488344149642668226610301853", "-12473025194535761005577066561696471986140205263843017221991729197337093872383371857001077050460827652296473928714097816492579684543651922277865558518876774", "12473025194535761005577066561696471986140205263843017221991729197337093872383371857001077050460827652296473928714097899228292882031996071920533785129178627" }, { "63472235942371758467270296983419551089", "-7866520408163137968600317959735552406794938230345293650627055135268307695389903092041438746530663083967329111232451176014649873249349534808700483360707382397988918594143264031213181385790969271527978925616276399184489007642142996251807222768397530946779296600805549276528669432847672215219943599871223372831999133812100481632278022608906065923652981249057846548868473376683960144009223047416366697876553049362242497225174860431577034875737250719899362881567590934060155436179316063810148362442197071642183371654740845983314705249832168923202400873364289483910868432511677656218937984504828452980698439495961392749596", "7866520408163137968600317959735552406794938230345293650627055135268307695389903092041438746530663083967329111232451176014649873249349534808700483360707382397988918594143264031213181385790969271527978925616276399184489007642142996251807222768397530946779296600805549276528669432847672215219943599871223372831999133812100481632278022608906065923652981249057846548868473376683960144009223047416366697876553049362242497225174860431577034875737250719899362881567590934060155436179316063810148362442197071642183371654740845983314705249832168923202400873364289483910868432511677656219001456740770824739165709792944812300685" }, { "-284018520801241078671538235859630240269", "-5529748211779294240854894683633173443789067073881249229985499707296461959655918837051490512357840133495603640185675483847478587849599477020706893805485599954539589062532211767295361120129440287144117406526027552427750375526095104163474774446716012360038076376952619723549765229763943818011605991300849052030142173100367582906381575666628005795818339029350398340616624791399526643991489247585213423174803853961438830286737553181353007081438503238779644371968004083452645077716952159339978836669723137339898471600546912430030276920763475622536295311290657163861398519747560279682401429552174530714298081464588450842581", "5529748211779294240854894683633173443789067073881249229985499707296461959655918837051490512357840133495603640185675483847478587849599477020706893805485599954539589062532211767295361120129440287144117406526027552427750375526095104163474774446716012360038076376952619723549765229763943818011605991300849052030142173100367582906381575666628005795818339029350398340616624791399526643991489247585213423174803853961438830286737553181353007081438503238779644371968004083452645077716952159339978836669723137339898471600546912430030276920763475622536295311290657163861398519747560279682117411031373289635626543228728820602312" }, { "-171812101820192353275910956459431262142", "11401673303315394031728944442295528921842441448377692701102691446500671963119794838260543877466107345474902885032629120622020177051592733148817057943390167845763358795044702079370835841331467130719834250134674578757640577473495192331790176510774020541399177011446664359866582351045889299070080989390219063301859447807907203943168891690028442190793548699886572720360741686677780644932612683647303776634496172481504075784427704287335805355801794320914944330891519283383694196486986108936857630373759865062862204149003789919218681050221366182434949855054760827976853645027544605870235074909890698574792562001595287630131", "-11401673303315394031728944442295528921842441448377692701102691446500671963119794838260543877466107345474902885032629120622020177051592733148817057943390167845763358795044702079370835841331467130719834250134674578757640577473495192331790176510774020541399177011446664359866582351045889299070080989390219063301859447807907203943168891690028442190793548699886572720360741686677780644932612683647303776634496172481504075784427704287335805355801794320914944330891519283383694196486986108936857630373759865062862204149003789919218681050221366182434949855054760827976853645027544605870406887011710890928068472958054718892273" }, { "-243638660221338112796448050030955119997", "-32214383478080953899491069562585164652288236626686985994647827422262342469970423345510055643470262764747630363450204055220886177681745412924556264758690138113272748656941509018308925555317383307928766093730384151056027828368474245304944063213926492719166086055718735381341569379006804236876950175122702350552198046290567043195716369691666842524594399597143281611765509174168738392889075290806378316647736667077047013214732267367344808724905727602402784621437141760604478301412768904784950365257469208085143467704875589485635570084387755189599791857576855454112556762755762408826226326879491415484319411662301650468948", "32214383478080953899491069562585164652288236626686985994647827422262342469970423345510055643470262764747630363450204055220886177681745412924556264758690138113272748656941509018308925555317383307928766093730384151056027828368474245304944063213926492719166086055718735381341569379006804236876950175122702350552198046290567043195716369691666842524594399597143281611765509174168738392889075290806378316647736667077047013214732267367344808724905727602402784621437141760604478301412768904784950365257469208085143467704875589485635570084387755189599791857576855454112556762755762408825982688219270077371522963612270695348951" }, { "-126332081511349770866908261827634312283", "31497387372874133218238910173378055967910722258532087598053588964599898753455370244114881403020152175272452951858324158004662566613339529101292284073176382818309096142522412043073218657587031893636358434796164444941535757484360125937835242214199979245499374972029624710574236962978707708765065292759037309958875006017588240959790355958632745299212449602934380927677385974488564420550408281673927387615657765312151272852486266800510090872812376232597458154951925709496664568906509814364388823105469855516803225244972466742963619633076158367569109107733990828830121948130235858799809203410103682003414364238243553515261", "-31497387372874133218238910173378055967910722258532087598053588964599898753455370244114881403020152175272452951858324158004662566613339529101292284073176382818309096142522412043073218657587031893636358434796164444941535757484360125937835242214199979245499374972029624710574236962978707708765065292759037309958875006017588240959790355958632745299212449602934380927677385974488564420550408281673927387615657765312151272852486266800510090872812376232597458154951925709496664568906509814364388823105469855516803225244972466742963619633076158367569109107733990828830121948130235858799935535491615031774281272500071187827544" }, { "219979452670016849533060110266815720199", "3900115048441644499033281842448985956665866771934663536385503692700586024397767816761943054115584011069129310718114010862034970648115172218305599786238607524420973404711138276011261135403209178420948996472570042497859127324157786975578751148348046315727383390370594954695454631662061021971027739429505825056455676233533511412589936865597034183410893428831818716136282201523804692574965779771140320669492229416601369453681528301333865290947482219850340728455965391492610516639151652595539203632139883064874286555941718154489936421274731413286355640404192677546692090304496817063325766995908926108582896362623757323811", "-3900115048441644499033281842448985956665866771934663536385503692700586024397767816761943054115584011069129310718114010862034970648115172218305599786238607524420973404711138276011261135403209178420948996472570042497859127324157786975578751148348046315727383390370594954695454631662061021971027739429505825056455676233533511412589936865597034183410893428831818716136282201523804692574965779771140320669492229416601369453681528301333865290947482219850340728455965391492610516639151652595539203632139883064874286555941718154489936421274731413286355640404192677546692090304496817063105787543238909259049836252356941603612" }, { "585873325961105129055557280004608765382109855007674169500308242261038324959928764512890600512016613154122762798104714052579267789493643522748210870974797", "-1855792162818946202", "585873325961105129055557280004608765382109855007674169500308242261038324959928764512890600512016613154122762798104714052579267789493645378540373689920999" }, { "-3026050092505200332789765255096964033685859497096213532090644235603419347590512426830117415222669642053441336442247132403948783838396746566100575461602162", "18009081534399282710", "-3026050092505200332789765255096964033685859497096213532090644235603419347590512426830117415222669642053441336442247132403948783838396764575182109860884872" }, { "-11124638695599888462310706699308855434715251048597328942409434888923094027849143412724699165971400546471660924330688750607774759764580214088920441698992069", "-4827559068742614723", "-11124638695599888462310706699308855434715251048597328942409434888923094027849143412724699165971400546471660924330688750607774759764580209261361372956377346" }, { "4950293428090696283711882613183655723616682297360442241017758383241177602498881186549809051670562038601658285833496694108818253845693871318067007752043113", "17597810481352184048", "4950293428090696283711882613183655723616682297360442241017758383241177602498881186549809051670562038601658285833496694108818253845693853720256526399859065" }, { "-5733769947958740467479139247420201065087494801172241127791526686385518674532830661413722661802560247463032020003355494614502034002778775472609306735864748", "-3892174127829225880", "-5733769947958740467479139247420201065087494801172241127791526686385518674532830661413722661802560247463032020003355494614502034002778771580435178906638868" }, { "8320894458193427045187598554188178307429755504967209344418448624882517461814957461249858674758807195827056824653471934409067429988676743031117653237018365", "-12861394200627120797", "8320894458193427045187598554188178307429755504967209344418448624882517461814957461249858674758807195827056824653471934409067429988676755892511853864139162" }, { "13033402737450594044106258936169013897237368708138118260402180886096095497725071502601849887805439844083105685971731015312020770945603825344926844435936044", "236396022362585261770052671762207864597", "13033402737450594044106258936169013897237368708138118260402180886096095497725071502601849887805439844083105685971730778915998408360342055292255082228071447" }, { "12170667278114656173974716189098171384426379753661081475485441559687661443127166543908925678856145097632475832903680828294561265828775791256812588754280222", "-276673555533799047589626400978981416789", "12170667278114656173974716189098171384426379753661081475485441559687661443127166543908925678856145097632475832903681104968116799627823380883213567735697011" }, { "-12755594876262399860618168642932232021734362385933348033134635580177924615701078617214764415318471507488803810365565826229169313660087149542130819663319659", "-157671440495648010763311068579191828684", "-12755594876262399860618168642932232021734362385933348033134635580177924615701078617214764415318471507488803810365565668557728818012076386231062240471490975" }, { "8664063140780163008577373335591938905735059211566906376953760862047748343846207426667781783874718320339071949903053785280430612875488847226724390758938740", "54361107931665215623681874454167019934", "8664063140780163008577373335591938905735059211566906376953760862047748343846207426667781783874718320339071949903053730919322681210273223544849936591918806" }, { "3699576825118349347309026261327541749454660339251578894574483235547605815416603169143590292164644149607672871236942391817131531474661895913650810587431606", "-50508350367572393968128467319633674717", "3699576825118349347309026261327541749454660339251578894574483235547605815416603169143590292164644149607672871236942442325481899047055864042118130221106323" }, { "5626548453644136572409808769267055618695663227750732922630041368983808478347120771651822300668480671524976882745306794511840379704578900504784165956486985", "170502882789371639987361620116696459267", "5626548453644136572409808769267055618695663227750732922630041368983808478347120771651822300668480671524976882745306624008957590332938913143164049260027718" }, { "-10859007735074693411217019392659638207496329895257318665547454149984863458541990037760564769787816800806064437172810158051442267508476778676439633382657890", "-7558060977666720080449823996328496253877735754811271086853901493753796001778345391546991917892931500169890406340928835457635973812901681485438886367096185", "-3300946757407973330767195396331141953618594140446047578693552656231067456763644646213572851894885300636174030831881322593806293695575097191000747015561705" }, { "9842028993407961669727766131360795288615020071102475108883839785397865740828387076847892646234215787999498419839351470775471313077046438080666908734795616", "8259939762466350877481193620364896193464602165170783019804380181692322874550956777598992104871440502758410340359413403619753571535498118388286469082729503", "1582089230941610792246572510995899095150417905931692089079459603705542866277430299248900541362775285241088079479938067155717741541548319692380439652066113" }, { "3122315115429970622394662815735050825423438028108957393747131991771456957037829402044934484343765915727397519247940959221091465331254497476137639859816450", "10737995515603450913722681305571315249864367824351372254572936648132763616823019940208526402092654554035074813865303483747097673960803093638463005072804384", "-7615680400173480291328018489836264424440929796242414860825804656361306659785190538163591917748888638307677294617362524526006208629548596162325365212987934" }, { "11618335890332522671268040181306950825004789685088262996478365976802329054158653675768163009290064139158450983598701977173152384425333441365287895694522192", "-13130287008197231017935223399369698658354829835061356451363818961959486828237111511740029441613108087354987794332115218978284937263725126538295501305403242", "24748622898529753689203263580676649483359619520149619447842184938761815882395765187508192450903172226513438777930817196151437321689058567903583396999925434" }, { "-4829477140897377009195646150061276059814366801005389903693533021027427566117360765323647260121062827801190746646296803957067548167571028717513392985791293", "10716557117391614298810040587314742187092120526669273567183969821384063434473189717686678450880765426943205955814024872764413373364846268902370055526485180", "-15546034258288991308005686737376018246906487327674663470877502842411491000590550483010325711001828254744396702460321676721480921532417297619883448512276473" }, { "1560421244904974852620371975782132605421448226892487453928759432083522187778803424020804578027100625536441377609275030418285893555753560195716001014786650", "-11797558308994912054526619290334311429749533070145154703018977152548370444659962978040151671210413666186432921816690953994784423526183449271023503069393845", "13357979553899886907146991266116444035170981297037642156947736584631892632438766402060956249237514291722874299425965984413070317081937009466739504084180495" }, { "-7701347923966912534344428538744620884561375267012102797292378941649984539207353887059064943586048644516121387166836442084007442716291792933061162738380376", "5290969389374230541016502448421359606252744677802288901830045825873182202718418905866055323957065013553046698199939002159982374580735362593037515863844280108947533575824820196689891621498006303535207762625068798755031433921940066544809959896067184147997503827988613858484669349726945188167613248195147619673963531690938913245110754715059472477991342216448470339490385593605806518967792963339193162830698488489270925945408227996742278697477358272529028932771642478870844024835907350391770605391526921411004262446196112836319091260967898895009427182171643279100998182191816962677328417390867021108292139204864164048286", "-5290969389374230541016502448421359606252744677802288901830045825873182202718418905866055323957065013553046698199939002159982374580735362593037515863844280108947533575824820196689891621498006303535207762625068798755031433921940066544809959896067184147997503827988613858484669349726945188167613248195147619673963531690938913245110754715059472477991342216448470339490385593605806518967792963339193162830698488489270925945408227996742278697477358272529028932771642486572191948802819884736199144136147805972379529458298910128698032910952438102363314241236586865149642698313204129513770501398309737400085072266026902428662" }, { "9733743430220591762422540139212426729307515492818443460852332805653889275463385649305231919846970974905736816260992940027028218064265519723018527155353151", "-29407855293830047984154639411082591337348779678279017647951764366455421210163494489475996514661359700145916243499452007595041420522019751347743105082745321262372977262641488359297167392118038994384136863563032667040671405618315550876997904307423736276844997706938133936081058323434935833614475654922773162140266784233792639117145232791514703532554345086520312281500696798706889025860427142771458666376271994240028586899592254884476941388776984078337603148583453255593120138178690189726206775893096279000909079330468718593887702543025737308336025198677457129910473491269839827087491228569718246503140134413881896746751", "29407855293830047984154639411082591337348779678279017647951764366455421210163494489475996514661359700145916243499452007595041420522019751347743105082745321262372977262641488359297167392118038994384136863563032667040671405618315550876997904307423736276844997706938133936081058323434935833614475654922773162140266784233792639117145232791514703532554345086520312281500696798706889025860427142771458666376271994240028586899592254884476941388776984078337603148583453265326863568399281952148746915105523008308424572148912179446220508196915012771721674503909376976881448397006656088080431255597936310768659857432409052099902" }, { "-276731217243271862683214238489380950428392903790808046630969592255272629537001990355375434170910931115552132394269672247616298060929507021008951190291387", "100289083769237476480554074865040988004216167545459907207847010762380733541100608695693297149249375537088329431700364201275915507683345148401600569951338052791424407090330310974243070931256108167365334162914085216447196038922091547331474328250886730614683299908003398886233860613008266913065047699535081030427106800418656336608005860846045905149012346378286475449307630537665901621055008855374148058291266835796203075976592585729940879567246284967856356337849150102261744547461816282538319258966892339056695718919291240188920586288417893106046698069355647145603908383687239983874164793005765733782432717429040621674", "-100289083769237476480554074865040988004216167545459907207847010762380733541100608695693297149249375537088329431700364201275915507683345148401600569951338052791424407090330310974243070931256108167365334162914085216447196038922091547331474328250886730614683299908003398886233860613008266913065047699535081030427106800418656336608005860846045905149012346378286475449307630537665901621055008855374148058291266835796203075976592585729940879567246284967856356337849150378992961790733678965752557748347842767449599509727337871158512841561047430108037053444789818056535023935819634253546412409303826663289453726380230913061" }, { "8505070389896098095621766692413480203366379968950158493268895987250690600795955783113900096527432416791184386061684833478921638080978014176210898461637606", "-16410711613672171332126342754193842244915477287016327757357714698751777287458963458682349581881560880814595167244857846847668988374679430572782121021084683986742283012573569894084166107235597351093334125816075658348307113218478800035703971671113417712009419861470917307849916674203301497919242668373376352901312309673053175315189945730756118172940886476343290174961420986113367531057713782438374928471960914578818951372282574754612716278516397754222547513576728677459134022062202283647690649100602260948409511070624300011106517649666031530376191755817891213910847547809248990517666613043010292627100428536737652546738", "16410711613672171332126342754193842244915477287016327757357714698751777287458963458682349581881560880814595167244857846847668988374679430572782121021084683986742283012573569894084166107235597351093334125816075658348307113218478800035703971671113417712009419861470917307849916674203301497919242668373376352901312309673053175315189945730756118172940886476343290174961420986113367531057713782438374928471960914578818951372282574754612716278516397754222547513576728685964204411958300379269457341514082464314789480020782793280002504900356632326331974869717987741343264338993635052202500091964648373605114604747636114184344" }, { "-12618010259109779267590315037969998053964054382853891516547435925972388025118492931596200697357628900783311183940584302426381939302632641549019984810957030", "-30500906828861638007306362171210132987300359439962044769219457463653547834815716264412200930088623097530758080891972640000479943534665059199377729854850415258341537838023739964147532129877743393965857370995558748807382396090020006195649251292012405690725917389684473999400905751109361754679152179983739269026226054012963756892488872262522587481931950410504651253101938824790285623805566521723062029033001745636445860437154344665483641408727637784045030118212476306906983993748299291616038887011943864441807818857508443930272872365334665976442185494702520760793786640113779099219233665607521784524244604432396247693263", "30500906828861638007306362171210132987300359439962044769219457463653547834815716264412200930088623097530758080891972640000479943534665059199377729854850415258341537838023739964147532129877743393965857370995558748807382396090020006195649251292012405690725917389684473999400905751109361754679152179983739269026226054012963756892488872262522587481931950410504651253101938824790285623805566521723062029033001745636445860437154344665483641408727637784045030118212476294288973734638520024025723849041945810477753436003616927382836946392946640857949253898501823403164885856802595158634931239225582481891603055412411436736233" }, { "793528769616879938852241178439496352527042950647521648629732169156958768358523029837406526207126598190786120139491813624819360632811627576064199559812277", "-7357484069649002655190557040768215614708659708788999334802985986235721030962928900092675952032143512196279092521450986819067071570862007086586132687661085824939677603953832219860573980632016025218580608321648907608385784471745482257672314890331358256478273312255285010343369949412955387472116587504557483184506548209831317705115523967163525846685455369176657510129844566195941925821733027993620517287411895496215426174909366458092382652675628195464969405904518323018004882611048769247228828875493680284766874334247375868318795940759082324831733175858991629741478124633015067484305547002438816473086042218906532116413", "7357484069649002655190557040768215614708659708788999334802985986235721030962928900092675952032143512196279092521450986819067071570862007086586132687661085824939677603953832219860573980632016025218580608321648907608385784471745482257672314890331358256478273312255285010343369949412955387472116587504557483184506548209831317705115523967163525846685455369176657510129844566195941925821733027993620517287411895496215426174909366458092382652675628195464969405904518323811533652227928708099470007314990032811809824981769024498050965097717850683354763013265517836868076315419135206976119171821799449284713618283106091928690" }, { "30958566711373255787092081401292877738974978442987704470984765018293851031728996862405055424093249924047528792113585028592262445810946419909807061004531455817427671594281537965628880611732831524185850161910304038646992464838306728350704966234151134620041799373762432970330864023007632010865749239024802839173884778578927209741320635135275002489733299806669933393428518104197594560039136096527206600870299327752296492029012993590212340409989598323540081430189567580333356380487749078595746626408529223195894600223743978246922817054226858311823994547784553612982586322603593335538875728113115443554199017672360091721648", "9164115638960783470", "30958566711373255787092081401292877738974978442987704470984765018293851031728996862405055424093249924047528792113585028592262445810946419909807061004531455817427671594281537965628880611732831524185850161910304038646992464838306728350704966234151134620041799373762432970330864023007632010865749239024802839173884778578927209741320635135275002489733299806669933393428518104197594560039136096527206600870299327752296492029012993590212340409989598323540081430189567580333356380487749078595746626408529223195894600223743978246922817054226858311823994547784553612982586322603593335538875728113115443554189853556721130938178" }, { "-22540807692474380279530794404584230073523360203115293035869063366926380719566516089428840111682263403627532047214106171892715667227836310498366393991106231487046533598391969789120283294510723096483520917309134391072655861112766764278247568027435618337967113341863713181603534251049249873125130781073437913954718595729437608729446837417196899902194261111827656247095442897532040935029872731410799530408713850806239149348700486268275019296069828199088780767614008685960242354118969741283398882689239770114582524756296906388861630890288875920861344939520380841337675934551587994259348267613541166769237154904791412049964", "16928681651977808800", "-22540807692474380279530794404584230073523360203115293035869063366926380719566516089428840111682263403627532047214106171892715667227836310498366393991106231487046533598391969789120283294510723096483520917309134391072655861112766764278247568027435618337967113341863713181603534251049249873125130781073437913954718595729437608729446837417196899902194261111827656247095442897532040935029872731410799530408713850806239149348700486268275019296069828199088780767614008685960242354118969741283398882689239770114582524756296906388861630890288875920861344939520380841337675934551587994259348267613541166769254083586443389858764" }, { "-5403850875869356031749551669837202919756114555261706106905659104903792701565965475066159243529680606410723686422444947172225540145977333194008702465610630608545009270872541652430806931212184915840724378685979865349848151917650322286497417985248678815214889868576385900691591784772762893647315325310416150353725001943778473686980157692817497562783521120544549784746647104651038037129984152623720529803205580894126664077380391379306511348324442512538418658728022685805514196592544294177914956734669359073791151050869328577099869772182315103156047405800398706114122356939316464974680113324979723289916823063616573634058", "-10755560408227106818", "-5403850875869356031749551669837202919756114555261706106905659104903792701565965475066159243529680606410723686422444947172225540145977333194008702465610630608545009270872541652430806931212184915840724378685979865349848151917650322286497417985248678815214889868576385900691591784772762893647315325310416150353725001943778473686980157692817497562783521120544549784746647104651038037129984152623720529803205580894126664077380391379306511348324442512538418658728022685805514196592544294177914956734669359073791151050869328577099869772182315103156047405800398706114122356939316464974680113324979723289906067503208346527240" }, { "16201587974698660164372991183566748501003872177894450603471850345714117528335101264234127789041855420954511595895378320972957964222386731614839583078498685801156670229700092209313747849610762975747730086443186821337319452128253859293962343891549207804191088925361935683615063225197130192492652062735684739784075955094308092423304262201429421582566117390598395895220976999990205945523225411701169301910362640419341608407294018105959688929256136725564385243617240412649023368133778798063226772467915584333795357813292935080009919284755332034998122912861893282865727947810588086156919649131720183722427134042574317487793", "-126159569916621842", "16201587974698660164372991183566748501003872177894450603471850345714117528335101264234127789041855420954511595895378320972957964222386731614839583078498685801156670229700092209313747849610762975747730086443186821337319452128253859293962343891549207804191088925361935683615063225197130192492652062735684739784075955094308092423304262201429421582566117390598395895220976999990205945523225411701169301910362640419341608407294018105959688929256136725564385243617240412649023368133778798063226772467915584333795357813292935080009919284755332034998122912861893282865727947810588086156919649131720183722427260202144234109635" }, { "-9976758107386398142455037422077809088581080675608340830198269021688955930541332630075972471934165382030070969307731206728197760190279942894255740733209190331510591013089699837164445642396864912572863786290237335963836376543389815671640509582958465164874961381137096877288362944469137669502842448492172241151419831252572392809173900377271652074261706120638052379886108764460001026094198502028776365675088466580595870167840105746912975236851293882732079317535103041585285239081516202482201377111734010788198635874359396626004300532752450289119192633850562141516671742961938277967783337559307443617308447853505824391099", "13449070890444925581", "-9976758107386398142455037422077809088581080675608340830198269021688955930541332630075972471934165382030070969307731206728197760190279942894255740733209190331510591013089699837164445642396864912572863786290237335963836376543389815671640509582958465164874961381137096877288362944469137669502842448492172241151419831252572392809173900377271652074261706120638052379886108764460001026094198502028776365675088466580595870167840105746912975236851293882732079317535103041585285239081516202482201377111734010788198635874359396626004300532752450289119192633850562141516671742961938277967783337559307443617321896924396269316680" }, { "-8570952518585194406209873586517687582701183275108243979199329595605282282125006489076327154374449108678257552384372919282846744626955206382078850958298637157198962032090439427286914716782317030245513658212430127586764421559372214829010306717557679285031617989735914399954286846456953917915955558448774972943731602144914068097214910567329340361564904028964471241318105967747431610163083002382821902859161510204381788262611298660559327478615315484763561786397041779926288206767156863141140852268323253657685018587945456372648431446464389004257999049529945532453598011773843788498650935959375182414447893892341891463988", "4431555062692055371", "-8570952518585194406209873586517687582701183275108243979199329595605282282125006489076327154374449108678257552384372919282846744626955206382078850958298637157198962032090439427286914716782317030245513658212430127586764421559372214829010306717557679285031617989735914399954286846456953917915955558448774972943731602144914068097214910567329340361564904028964471241318105967747431610163083002382821902859161510204381788262611298660559327478615315484763561786397041779926288206767156863141140852268323253657685018587945456372648431446464389004257999049529945532453598011773843788498650935959375182414452325447404583519359" }, { "4117976000917214601143188578494558474138167055110060832594841842655428229500889876131794484851166401425675703592388271925904534237338595998991043982676292549088043959446082382516734793718348862105938692342851330680670593768890094290655852108130945387988863730762717733881418314989528719379494082656897158942547008663543153236129762264443358316776532465284014215413819415615612452225913947961681691310132286840303081453109375175436902292224029179426794714036524361081174901146731799945483243427138748119832116750910126386838614645397770107366925613473924955965862778639046707637382775371488874447622330992324750207465", "329466253508616383200261654231797136951", "4117976000917214601143188578494558474138167055110060832594841842655428229500889876131794484851166401425675703592388271925904534237338595998991043982676292549088043959446082382516734793718348862105938692342851330680670593768890094290655852108130945387988863730762717733881418314989528719379494082656897158942547008663543153236129762264443358316776532465284014215413819415615612452225913947961681691310132286840303081453109375175436902292224029179426794714036524361081174901146731799945483243427138748119832116750910126386838614645397770107366925613473924955965862778639046707637053309117980258064422069338092953070514" }, { "28857935543824608075326348244201981931023939250259142606733822094071772153858420201297951828741003977413353359215638528196235956061529059419904405354390715114239219947402126760298132539402386106279333968395498788354937020337343839325588433318100331044091923709732742795159387846354148919054314582749477292946200912006940503778924320301062789466388997936618573519744795661160190636101768486096961991215006236190655062992372061052426455063703038765465688361316141792840153608145888307784845264037109867657483109819380082597605481013612040648149090345778910883349230476481347645708269410828528742743794495302359380494607", "126536164564464424337714470705049463978", "28857935543824608075326348244201981931023939250259142606733822094071772153858420201297951828741003977413353359215638528196235956061529059419904405354390715114239219947402126760298132539402386106279333968395498788354937020337343839325588433318100331044091923709732742795159387846354148919054314582749477292946200912006940503778924320301062789466388997936618573519744795661160190636101768486096961991215006236190655062992372061052426455063703038765465688361316141792840153608145888307784845264037109867657483109819380082597605481013612040648149090345778910883349230476481347645708142874663964278319456780831654331030629" }, { "3146199586408378667812619157270468624370984629500707476575291934586478540055436137993431548830607708293475788354970610669452058906009873485175438772484599603993015239438297747261356407887781450787482447252615210880612867127689283653562498484594955015919746443263740095372831444793239911996227663006098501180972347442107190398034048225264564325230296723559400768342331039755765597288518435463475921534765025262262798267314969774604439319964638461636007229819888743218820584570149249791727508891676067767073852694327748467914037392778283816153183422263956621516748627574334199731850712255885395479903525322397561293553", "-169494171680584797187706369710105239124", "3146199586408378667812619157270468624370984629500707476575291934586478540055436137993431548830607708293475788354970610669452058906009873485175438772484599603993015239438297747261356407887781450787482447252615210880612867127689283653562498484594955015919746443263740095372831444793239911996227663006098501180972347442107190398034048225264564325230296723559400768342331039755765597288518435463475921534765025262262798267314969774604439319964638461636007229819888743218820584570149249791727508891676067767073852694327748467914037392778283816153183422263956621516748627574334199732020206427565980277091231692107666532677" }, { "-17024716654716744558842421452239026542281806678754026383430912733874686056449261218428541803113383766132449624540209841726047308927951820311213785345168358108138304716549475322223600292513384537980742126687035576531330089447100646214364923043445903103768701639992829171572718403272488931980504461938688955457870904289239032709146514866818331202329982821151580491257491540240579366183525075936339515949345815704583685855315810611089822402567649542290589282153225725537026309623090382054078872576985425957096858376112688308214148412270019118710904983829984589093557307164347051152307499446188262820058714564165108542508", "-26845770031559702758807696432929071597", "-17024716654716744558842421452239026542281806678754026383430912733874686056449261218428541803113383766132449624540209841726047308927951820311213785345168358108138304716549475322223600292513384537980742126687035576531330089447100646214364923043445903103768701639992829171572718403272488931980504461938688955457870904289239032709146514866818331202329982821151580491257491540240579366183525075936339515949345815704583685855315810611089822402567649542290589282153225725537026309623090382054078872576985425957096858376112688308214148412270019118710904983829984589093557307164347051152280653676156703117299906867732179470911" }, { "-20875354448001792153279041347864644172439177882677780548397567327274288309764204295853633150227327732322157811413794613378828291977852467550695289535036337326494269114787031260705326469002279939986228049380615128280814933748700667874022724707001736732724010699175779382411342385842744973636495738468838244099596215421975861650998954057316519632062827510021706536194961332185926551767127180751211669386674770139039516623606727799489291663572125587356845055646322930167536458093283930082765496058330805117442824718962237069840252138957395570892073194575112213410604881673785921789655406716271370732069643455590690035701", "-321447426701397438572265325285879998363", "-20875354448001792153279041347864644172439177882677780548397567327274288309764204295853633150227327732322157811413794613378828291977852467550695289535036337326494269114787031260705326469002279939986228049380615128280814933748700667874022724707001736732724010699175779382411342385842744973636495738468838244099596215421975861650998954057316519632062827510021706536194961332185926551767127180751211669386674770139039516623606727799489291663572125587356845055646322930167536458093283930082765496058330805117442824718962237069840252138957395570892073194575112213410604881673785921789333959289569973293497378130304810037338" }, { "-6750548706930727136186675393752693335334383613941059024795513640678178119089262068912855951615043660442324823673049951182143778744824110223137384940032268718291241014850714197673735719784663896993460156686600813524168487673234842233781654493200950459723884918456280719440022930492599128086690014332139955274261568563155723011697763382009890186816226119314994799655369791620499988988986590903148198659095740939986627235565633349906453726759224441608018598520571182643709143072528030332708598472074166415467718451869993686505339408706320298338691467040585228617379086727764240955696690287600957842671916189752415855520", "132223863177855649509430852484092802671", "-6750548706930727136186675393752693335334383613941059024795513640678178119089262068912855951615043660442324823673049951182143778744824110223137384940032268718291241014850714197673735719784663896993460156686600813524168487673234842233781654493200950459723884918456280719440022930492599128086690014332139955274261568563155723011697763382009890186816226119314994799655369791620499988988986590903148198659095740939986627235565633349906453726759224441608018598520571182643709143072528030332708598472074166415467718451869993686505339408706320298338691467040585228617379086727764240955828914150778813492181347042236508658191" }, { "15737797902964168014939893286340956118635524170934156177365242966267432695262586636031957242055461736359478270642576860414422844075672388559647477705484719667060463718865742735598799928335211410004369240278699196301127699945374217439676378682879115442203681638050752745036508637214733712716867800216723838016099572951915042604603457902610639317648800296497583507890473114507231814851908526534709496988648572353272479026750068932474334642929727977996779536604912743446197670724757690108283368934769626461285961947257397454619164856011847736479229692086038931510067165282571276049292116713101550911614590774659556899356", "-6114512833799784097991148713266650451765474382378581896952003894922931741133332233338460555227243451198289670274036744955599177213449957470212981501678055", "15737797902964168014939893286340956118635524170934156177365242966267432695262586636031957242055461736359478270642576860414422844075672388559647477705484719667060463718865742735598799928335211410004369240278699196301127699945374217439676378682879115442203681638050752745036508637214733712716867800216723838016099572951915042604603457902610639317648800296497583507890473114507231814851908526534709496988648572353272479026750068932474334642929727977996779536604912749560710504524541788099432082201420078226760344325839294406623059778943588869811463030546594158753518363572241550086037072312278764361572060987641058577411" }, { "-26633154627863501044020127597209297142657179797586777727331879111280843451446814109347357601013807189824906954310855123313836812409388745541128842840054310853220032505914307470215180950497357091093642400638925719682307925365402618310180378684705799724964274776149984064608716300479893889145492885897234574442542501896696821902329473018442082678749291668341477914681413039643187020003425962922948452894682558162414623956491734656939841377698702802567258906642912449969621455596132708975438173455827361542712483153981422051943690720556013580161324856788091093465837542336129629269227369781823515673967591796132853515009", "3321161637038961370471515250185392889390643163295535903347391615170504064647249127732639364682803744773593849851778894972403397573953564801884397178069327", "-26633154627863501044020127597209297142657179797586777727331879111280843451446814109347357601013807189824906954310855123313836812409388745541128842840054310853220032505914307470215180950497357091093642400638925719682307925365402618310180378684705799724964274776149984064608716300479893889145492885897234574442542501896696821902329473018442082678749291668341477914681413039643187020003425962922948452894682558162414623956491734656939841377698702802567258906642912453290783092635094079446953423641220250933355646449517325399335305891060078227410452589427455776269582315929979481048122342185221089627532393680530031584336" }, { "27668394897866653012794531261739800318882766882548843941974485394983434533400277607364280566269718161470415771058329222680901477416257843578362127708934184467195154000133252468684612556324066063725677629160438683034201285122508880444372096430021219637788794365539396242345208611990491721052691567092029622640533057073151980959055665792776356282961971341363712186503783566960850166774438868528799819047163739437906559674823146932668464230936946321915236658512741918196732794332451120218658490129307932187658010681746557120172585093207839141764683325214902696969028472942954863209641597556494684135445935915485525220911", "204625459185084436546676461283890328511903949966691877662249903659689934813784661695047569885195881142676761876303280806728760511429260843727967794322777", "27668394897866653012794531261739800318882766882548843941974485394983434533400277607364280566269718161470415771058329222680901477416257843578362127708934184467195154000133252468684612556324066063725677629160438683034201285122508880444372096430021219637788794365539396242345208611990491721052691567092029622640533057073151980959055665792776356282961971341363712186503783566960850166774438868528799819047163739437906559674823146932668464230936946321915236658512741917992107335147366683671982028845417603675754060715054679457922681433517904327980021630167332811773147330266192986906360790827734172706185092187517730898134" }, { "18944451653774463090918576081661764936021793389045063662102219434278236461286997354190032851092512146937346521704215170240383659165117708716738711782597164244188741818096207452074083439983059414271417130274747048227795964884943105011205424198661201055104372863019759130697888820715782179466491256695453118035286889359217448004524564796840711987314064158194625731263591557915838970249677548534895064545467992194029425250039951132361639559343536937119283951538321037694842089561504643350632756961329867761604760788760440497535611072991056505806805291706178639395690245460397975614715123591611301423752799666149495108752", "994321141213369910357526037382331323092462599623554452705525887587326552002660849455542761618020243106424015447778226642816634338781654345001677083881111", "18944451653774463090918576081661764936021793389045063662102219434278236461286997354190032851092512146937346521704215170240383659165117708716738711782597164244188741818096207452074083439983059414271417130274747048227795964884943105011205424198661201055104372863019759130697888820715782179466491256695453118035286889359217448004524564796840711987314064158194625731263591557915838970249677548534895064545467992194029425250039951132361639559343536937119283951538321036700520948348134732993106719578998544669142161165205987792009723485664504503145955836163417021375447139036382527836488480774976962642098454664472411227641" }, { "-25075128489482657321316021943980016828761861550379828525731288423212311433274066958090940464803020097932875912251380196071686918459370667428905844496548191635733867314315152547202859654044591981512687559437417616479425752991419002108503390319869665933757684966460526631533822984311725217788657567199485442486045019468844265484117570385156844404625735176559901986920712550964238722824122000259551821135404274194791706113272773768366572120227974096419295159271316157215551931810740200836725504693738229444336470213883741520460842708733150362983831267583568258736572295448486287825894301201018490203520738439038977754991", "-7402949251688548738762242219263594861535354011996392637087346760786292549376145193266590582054224293289596877537643409310483743293801574030358189880866069", "-25075128489482657321316021943980016828761861550379828525731288423212311433274066958090940464803020097932875912251380196071686918459370667428905844496548191635733867314315152547202859654044591981512687559437417616479425752991419002108503390319869665933757684966460526631533822984311725217788657567199485442486045019468844265484117570385156844404625735176559901986920712550964238722824122000259551821135404274194791706113272773768366572120227974096419295159271316149812602680122191462074483285430143367908982458217491104433114081922440600986838638000992986204512279005851608750182484990717275196401946708080849096888922" }, { "-26509487378481600038412836495388065888781507388737194948728047318975269277448073484403390476243134990463394380967295356958474984927721196047241216945988250219075749832868804186657201899994373052648345989716938779173325348547767647529160988985542438998030764420175306438858518207072038513664360905985908879070216069156102379349899544471658754952888660878997691670566078979940005195987259493512159628198906090101827331841914429358969184839073862821059400943312264269215878469013316796620921077244799814690434355127994011220041638393750697699141479399553359747084811371804524490919966410379714725200415331414459870271869", "-9247155945465656153397925559476432992975541781462281935278489123804934847762489500833913193183733932905776020790478662969835879365116238125565077744775032", "-26509487378481600038412836495388065888781507388737194948728047318975269277448073484403390476243134990463394380967295356958474984927721196047241216945988250219075749832868804186657201899994373052648345989716938779173325348547767647529160988985542438998030764420175306438858518207072038513664360905985908879070216069156102379349899544471658754952888660878997691670566078979940005195987259493512159628198906090101827331841914429358969184839073862821059400943312264259968722523547660643222995517768366821714892573665712075941552514588815849936651978565640166563350878466028503700441303440543835360084177205849382125496837" }, { "-17010604274474750006607667808593883725990508452473783283717890546525148212376267233909567638545898628257361383837671935903199638230375408397752251127816717091041943873728526445398525706450929660366518707254053655364610471112296477865068960744948010561798109833411657930112293904378353445961131058136287425064317621271289456901138718557297733713446119244533144377470099270824020439428168481914824420861176457152299497728390918971852021025089592998997807574907789524112450146545688385954763667980124432645276563626082835790429598328230426471161191074551543308732791287559033843466623138171520961684959997180979203053477", "-17319079025684619178510812811805110270463447771889107440996086020812918555191263705580533644731591929176480040622705607552852994906782176254877135818109655911838591767583157894999741648979817400330572419476101372927546509769818404491634583907246692993992514876697330603464497645633398167129555001859772111887143352351860130929715392173452396253437927361301990735683539169040916027268831202732178553152351117118606495416985612909248422655861312689027789401950549626643389790516560291620711705848717875304929186131258525831197192620523261738944873398924939726689336762464320190834794155527335576391767307110012289717973", "308474751209869171903145003211226544472939319415324157278195474287770342814996471670966006185693300919118656785033671649653356676406767857124884690292938820796647893854631449601215942528887739964053712222047717562936038657521926626565623162298682432194405043285672673352203741255044721168423943723484686822825731080570674028576673616154662539991808116768846358213439898216895587840662720817354132291174659966306997688594693937396401630771719690029981827042760102530939643970871905665948037868593442659652622505175690040767594292292835267783682324373396417956545474905286347368171017355814614706807309929033086664496" }, { "-28362352496476494327713713233021518136860402239251781438945998574753662942796270292818595738100959519541952077905620088422871490191217157269435052965329201030095268586136492980900212955645939325800541690754639292707053269767151001292253701853012092829784482071789669480438026889625605099744553642207773753943711175375843649210118677569597324789367425691177169929576236753018329085700397911235750600921874606148324025962628852167093806152864269874177214562322576097931390470469397118268354868919899638376323751276807304678316688836173746719723312665764603485606350244811113608471530958617108833879194264695174468397461", "-4081062111675377984305281082755054920741203741273067094307824323728798665450292976016160959354997082250970415737745853292134965575242789548167162064123232363464302136338349828801951197252612093077640695564825095503535921549690447893467349156939791370286866987224201115453216606688305427702274940837032716124925028835914047967887674858015919302546781010326385758988488478290741665427521820112231266659657169118374988259423444686317389869729817643396097464874333968181509317307320406521221309011946212308190273531009796563611621389720223920155554879800901239072885025170342349379379336047732368458185953903872634982504", "-24281290384801116343408432150266463216119198497978714344638174251024864277345977316802434778745962437290981662167874235130736524615974367721267890901205968666630966449798143152098261758393327232722900995189814197203517348217460553398786352696072301459497615084565468364984810282937299672042278701370741037818786146539929601242231002711581405486820644680850784170587748274727587420272876091123519334262217437029949037703205407480776416283134452230781117097448242129749881153162076711747133559907953426068133477745797508114705067446453522799567757785963702246533465219640771259092151622569376465421008310791301833414957" }, { "10367142604728811799331249565431331488313655422005202933702176605382043644320209814639311439871418581341534233560256605231366966869093495784665834232350567124110194965198962966795893926025854156729633358240069116588609932539289897499402463770167927610848388138020589286461244557962368497723086593344721146859584146431437967506007518396464517349944129896971137720357645026281243138165214047233258394590454775153944241555543594427555914116439316287902470043292624597940465373006598913770411505099332700167695871387948271302951230983772351549087620538875967635100644404345317626621438913980275970160864401622986870735123", "-13323117602411502623386235160326625769048477819798659261203460002048250420188223753407093545503703207645050883770850457071863684414849353264890601744588860687970804808452855795406182324143949747985869939791374195222513169904228914579995165180964917538177994190229733465224857616114628815752065632238207474599531507602861647623695058640735949593381112671690796335596142010430124683781417828023076027476816068202219709673411776556090962187853799456968290579708094595903778622705850818245685205707447012659247018940946510378371952655457988959551256869060428488498330109152756599450626641948447980234503249330875085656261", "23690260207140314422717484725757957257362133241803862194905636607430294064508433568046404985375121788986585117331107062303230651283942849049556435976939427812080999773651818762202076250169803904715503298031443311811123102443518812079397628951132845149026382328250322751686102174076997313475152225582928621459115654034299615129702577037200466943325242568661934055953787036711367821946631875256334422067270843356163951228955370983646876304293115744870760623000719193844243995712449732016096710806779712826942890328894781681323183639230340508638877407936396123598974513498074226072065555928723950395367650953861956391384" }, { "-25321281404861286799950777949097462701962113587443565138655462269365151737118518315058035825695270231347401755128007072923189452859397209062457461602335603630181865680063451525170253746137368267674863889514153713728814272332433431604233690200451816570240227260445028630591376891139306370205846627093813889699170594185178241812081296510140572331372738998993116117098817936927692238682202717231675283209016857095739468507690090676681400453024293870135659990528969837132054786661560150259115734877162158755858653364070279937027014730947342216816307219127474721622123875699701715404820384545693058511056735799834754890692", "-15870257059811626693754498423136372480069134596343998984549199283973854570508228359295418026089909378687774627821225399931314225867711515277913855368473873536462450935842786002269065816311054834857109074848803122494252885020527074586145467185882674518032764708782999568002770206995683800833252068328835778749976046128872525287656002968632147457840467536682726059599593635219947081138082647985895437016641903078766878782632503812736486529143041369932038649270950453231711525943737962179463585338023463992816994328519710963267459007592689204838965317062070771191372220277256094361390952025057574056586665509010902583686", "-9451024345049660106196279525961090221892978991099566154106262985391297166610289955762617799605360852659627127306781672991875226991685693784543606233861730093719414744220665522901187929826313432817754814665350591234561387311906357018088223014569142052207462551662029062588606684143622569372594558764978110949194548056305716524425293541508424873532271462310390057499224301707745157544120069245779846192374954016972589725057586863944913923881252500203621341258019383900343260717822188079652149539138694763041659035550568973759555723354653011977341902065403950430751655422445621043429432520635484454470070290823852307006" }, { "-10064759312484387184876313010284016458560725440641239737323234767636591183611201479885347260175161165340917225306019885202675573016295152797559983194160634880140345743489989007821872426587698574795394887035658449467358615185057180305109018898637903449135520486663185036663238956537895356325733583128141439025002140924158670346599492383552938312402521066705186885506193758499006001382444818328802338159713646715901977137011576113434170842422373328479181457354927400927267448788528116619711184792932525071391797130057189079431487557270366699175956757661488296856660145077706273571985222726397848614141194988258117115194", "-3689074607001776735792882994440038588887963294487080609346609068733026224735369468180206799966728461935654851527895876039403151156669223687679382665269013769686991783531091821265184956524448064027733731862929686596729449196238312997460578818232100254940830907672953344544031914926653652310468671685310332327057444910423081752028857828828473637496272809899061573593874011995802487442092326045415689987885712749026491545159340468151000027397821404233369034594141219014219707193746581364791219277489927025992135462852894714639406751538919395016165215641239054420028872350709704191189169571752512626755385998505584006855", "-6375684705482610449083430015843977869672762146154159127976625698903564958875832011705140460208432703405262373778124009163272421859625929109880600528891621110453353959958897186556687470063250510767661155172728762870629165988818867307648440080405803194194689578990231692119207041611241704015264911442831106697944696013735588594570634554724464674906248256806125311912319746503203513940352492283386648171827933966875485591852235645283170815024551924245812422760786181913047741594781535254919965515442598045399661667204294364792080805731447304159791542020249242436631272726996569380796053154645335987385808989752533108339" }, { "-4621513851362114851854472268081584822344822740665629177305004335694395719163541988311496405455186973857145245414214464449674464879082042971313025249648887349614046805778335573547862191522938924075560443632614665169520240664970180760364771373836023824195690134618554368845612471858027311791638881380352344527105480173917778084361560336490212845414303819150625355111300877737042696291233444311426721588476948565949641149735838580313236869041013210454558557732497012037162735013212361842433337324577522358968152852532145622765032318936569346015498130151789662274686368870963891262060214274101000058555635785833724062234", "20283847238128227963042817384468009365120280641032764409860857066215336820785816567924217697745867082423864450685360959383940995237907453126362378908108545669654749698030305432673477271848544313029448526561606175059997663752601262173667861202924953502866611309434183496911206954880840674239880495147451496219568787221129244201657487090244435562896841733049066453539864301122516559479757096183362477594406691085946787803323712522074578611082872627361465163804239673539339633332349145205596371287028267780080937728455742966681547897652607170788637996317683436193829274172400558140357237480809582038468874094877651383053", "-24905361089490342814897289652549594187465103381698393587165861401909732539949358556235714103201054056281009696099575423833615460116989496097675404157757433019268796503808641006221339463371483237105008970194220840229517904417571442934032632576760977327062301444052737865756819426738867986031519376527803840746674267395047022286019047426734648408311145552199691808651165178859559255770990540494789199182883639651896428953059551102387815480123885837816023721536736685576502368345561507048029708611605790139049090580987888589446580216589176516804136126469473098468515643043364449402417451754910582097024509880711375445287" }, }; cln-1.3.3/tests/exam_RA_minus.cc0000644000000000000000000005023211201634740013360 0ustar #include "exam.h" #include #include static minus_test rational_minus_tests[] = { { "8229768172162771789/4094631553683915058", "14916542302144281688/9648520391570031013", "18327341244785642013243791303754634353/39507136041685332578233153660317693754" }, { "13554976081719376860/5850035209629724601", "-6813034992928443315/16012083383654426278", "256899901877002811987490932642058619395/93671251573905451634945335611797465078" }, { "-221798849980968127/896588178875000428", "-10118632981534633697/16809799818197706916", "333990778095757160537366868413422249/941966737890699707694484674257410003" }, { "-10398409463665680242/10672871071680021919", "908300169382593227/1663860017749090135", "-2076589873614048366639515256135965791/1366012573135328609279238070700513005" }, { "-2198518713248421187/494031967775171833", "162489257999262168/3608560229859558061", "-8013762081101965644053022173225152351/1782744111192743850497670941715295813" }, { "4025149216228566945/640594137312937394", "5467380276809034025/15813352732084653151", "60148732603712157399679443099667862845/10129941051434949990590527231467828494" }, { "45649282670476595/278386580761220266717341154184065537", "-8637266763647548631/320617180101036447149595031898805939080", "17040443444897688379155017841073877168061229451634462447/89255520501631886327999278515127058459530587144975987720686743155549485960" }, { "5648415331928005377/86815630814151297970860026950116430492", "-3858618729527320883/27855468652821710859204555976171379400", "123081918822962876101148539477322308270739795776139149559/604572520679633516300271119677141637780408278090307422820905500994965166200" }, { "9781572955588417059/112881800445343004034168709823458687843", "-5059688483724168531/4577416283528891230944530353546966748", "615921077060787960354561606126348783111829996215681822765/516706991472571912574910836774186280180852506048696459094758451180832844564" }, { "-4967914039344839478/238170260180199675500515253723794945205", "1851848905279976507/5731170327270969184071911155742503278", "-469527297115675955424190428047537920421409443442551107819/1364994327983166854234805393053180119374354994464588574791772715189542881990" }, { "-16853061581795824324/96404437352723357070647888504166371117", "2887610208906060444/32980643277330946266739822018299212963", "-834203249643667606680245846951263316484378801689149307960/3179480358681967952651970543397987660141008737601948320258541111852875189671" }, { "-10766003534404571638/1736320411127247334175538439020437437", "-220564366893542891/24024005562370344889629855466198025799", "-11228676451427374102904112111967705085778332338188090365/1813624835433832784217556253227924899981441517333394378436857197512671181" }, { "-4039872531792560303/2717817538621352660433068255065439787147153801016478776178010367557953211548", "-17969900169229544519/10371230759745501411127733226376204123221866394120596070959771442399588297129", "6940459580028931824293913174633904994365279610168782399332846513086074139209123514834476635325/28187112855925579976299840753672542065528422968220885043792832460046226866036339425358907691441054924266606457279617295071355282523744922239122018045692" }, { "11905720953886477738/26349991043344773150817457299711471013733618033386232710348739943906972457535", "-1868508269239354100/7915113871665192715310471309271830385175189228544536787145345883401181858893", "15941145914794937177093386304443205602552827651536706608400845076162777444155363739893353329726/23173686625047977587990304423741788120258508897732978034793987736019678129860415537604628640859289817332994555163435451240013483415438259775849311623195" }, { "-2449440712560236858/3924161613720467738425590715321110829708355586356453490516463081317902575263", "3313932993860824279/18392642760231276916239249302906853654153090246504347205856270072174622214792", "-19352032211145724571420568734409847660231095572377236173431089875006133635431666731719362137971/24058567564857748536604240288023690440577404826273237225585673569644473540232022448230431237781096357243673961302816983638647478040822458289501843963432" }, { "2375854596996813469/17171542567603713573317138241061150416263899780234956304631913156611236192733", "-1690236091628058998/115698505401619203741389026136939663329574241316722960060260525901879106902321", "303906786920788985464713527121698374469813384178920405503303785899916213843318155692692663023083/1986721810512032345893371071989737461519340072368099757524397292434629497187713075053126253107235936414498803590298681018206068059043963268488989361033293" }, { "-9066703779833220052/53996509329904595759286231403247566365148374715934463324003880626270687736687", "10104829441267883881/34350188217372122913844475743718288066233853695548819225257606841719829170673", "-857068498550946301314281599902676812596945461499639532351672507051201056365247232693696093577243/1854790258563312749374056592838765632813507083399863975139987272744324437901043103651094837595789610803765303659351781344942305171362498886075754606580351" }, { "-712905705954993103/38361275706852471555340413672243335795384295466685977818182375699688812583403", "-3487523845474404757/24004509207225606167828624323100421869226668573968691661898194620137716910067", "116672912187985693533424614379662678476187446315443107971581372764612623068602629062267386180170/920843595906060126846114857872490000269306626188013726759480780006531676144330596572087176480154495471428384288229491172449159350622326294294528887818001" }, { "-104068455909264700529593875361271227125/3443783531459345396", "94266182755532992545775726171008609186/10986871169556601787", "-1468019045636814162670978305715811638938423723806410280031/37836405995984502494576730289263822652" }, { "6250188382163250356218308848100308290/74975517450841979", "10057222263694104272437942231238950849/1377150882331486572", "7853407001895533030925726629648778749078643531548391709/103252600010686800286181264132405988" }, { "-325869560300902552275820653500571757882/6390430580148850471", "94468553562411191993094256419298214695/11908765973274803007", "-4484399064985071999330976874105690617426359030318059422519/76102142247451389303559481900024166297" }, { "-93570528036598407567281714804477572547/1681213810574384291", "-244906502561054838674546679498356325029/6878656438675875801", "-231899320744132980638168050942881155823492361410591515708/11564492202898292712047439710761442091" }, { "-81411835730261219386583131450337332863/716127167248934", "305772198898084305417824619321954306670/5852119619187572757", "-476650772889757879179369019399921041943854248979406203071/4190861845290706865359628655691038" }, { "8378821874364768218652992773582270365/264620166167099506", "-235085292482743132422942426826553295351/5218853722286899445", "105936154887632142427944491040385766054707164161382644031/1381013939193345109641609957531174170" }, { "-46932041053326337601984043288899377207/83004348019257810472659105973646518650", "-172752976692389001100875729845538600392/64697064048458368935602368307247306331", "11302882932785858045495103305619355060523322049764297548269071809310077113283/5370137620102451116225827082734739449691101289924623877117727128768254573150" }, { "-5215113722152182902641295804790889582/37267147737183802417372262122851319461", "-174324915479281952095382231256728338942/198797486533978895289571841018885549001", "1819946959828587625889363843813156766676787993042778284071188313098762447560/2469538433480866339929667414220581052912334718874062150193407525506073469487" }, { "-308468863588547635528373349890793262605/277175417813474671446046438490775760091", "-88071245580784145343997181342216325733/109042592277517238289414020635536175644", "-9225060231388102579469362745283215538990500777711808852192407359260779270917/30223926073985207174135233898799350451872811382182855106546181559011381423604" }, { "-139281160373255540085888405052544101003/21590054032847718908692432707921390245", "-175128181843395150044469443628898278945/101874815793501611839718166887463701141", "-10408215647857282226079103083273257459322595128147732742048301223816698452898/2199482777568107961766315941206227462112836158088743951492692685709912769545" }, { "-13653637423911886957204229566898836211/6724361745919744069899921221745423919", "60537422461958273742622747790343370991/323722395245687564470126807800714703749", "-4827063738484690108652046326448960810791170812913084889649499536314520788768/2176826490887613088066161490358401961235974091796973399049221882998503572331" }, { "207284509647982883454717074874778610186/315575836476247924963087075944676754095", "59454580888278446469281150437143941047/3799382139920332759258392540934029749", "-17974876032324524053425850245755672169670471578477359535347261991433397414151/1198993196898275844180025803639723883733761367273976879884312817813487572155" }, { "-149255714031984711085009662216310611563/61209488724728410476016289765233999883959861482512968048939594260689484910535", "-206353007879160639705730135450663155/12341134377195982958424940281067948493740598784362073339140017508008773524522", "-1829354061323966095884091779117676852909282652562065419187935424186237303685407507859167669375269438805585201409961/755394525511335693198081866608161950899365908489933659716533239785460293292606918153507868614180865950008697266433342863460741791684603303270127798639270" }, { "286228990947356503137685907205210886138/64525193112922470913382853022276019736227442678252533126077234112153953877503", "-93778927468512815169462456699065596479/70019706577332037325570327903202382111804035215024271930215402736305222068556", "26092773364888269343302672267572690894453186378630697330693315371426642609003667116358459590920104883240139740188665/4518035088612517412858008269349176355736855744033363257986123715832709510554983209440815107866748014413528943649032845277041680450752670951433682692095668" }, { "128067958966292694713545212085241612749/50804897676960765097908813878456128842417954009101908722816951877006748778869", "-331437715897535092432788513322484606485/102911257177761006574263802557003927106564530572416215828322919550454967864323", "30018293903870953799879886574342637699455128356488843398998059810000258259055116602688738404467489640369684487419392/5228395890723542025866546462435908982096651119675992137235094920338650164475761939608730060759309002063498665792819192135030537577109853650729817121390687" }, { "27065789167947870065829490227927612633/10795458608984562931374526676297845621730864739104955678079256994070639461197", "53314096352440087811254806167289750292/44807028208492548064750449353871285104149154384082409595945081934090139448067", "637187458285170434834128234123875152637450428605039275620795715002449318075555518355578432548587274399560043210887/483712418416385035748598509413117409273155809870339120248356475239836262578288026980177669113025449532258001487616187498682131415946755647640047843156199" }, { "275528434092876314751862670579225752027/23290954563951481764306221308726902093226107549717031306984541394996363441752", "118398743375843543978994815511147957868/26050691402435592629863948804505350954161759382372519491414484055670238339031", "4420086456754111377514058698455330162869575963826459083894390154200727636413353382047981846196341965799691593361101/606745469813648893293125236863835131523556569847025597910312571817347251611730291043895952533706547565767925058454286630395458711598751591845070996622312" }, { "-263828172858355421790882308711676546531/27836884730007976814146538035133148053942251062564400015534567388490010158584", "31580638196736633522674344981675107601/26210154715367115936541726366619494863883445533448748701891278370021519416412", "-1948520953518189888695889830515156795224640917019574042614412953331052369986548949517168001067643449389746489215939/182402263891837359872743630675214135004512597266032306942151126033873543370078488920825920736994254287019873146147276876145783659805845233146169813070152" }, { "43029409555492054023102681165249027816896930295612442385573977041111849786681/17478431621804970398", "-63831159286570708329826084149841946467426290005331979697932225104261019322894/15909114936773208135", "1800228375210677909820927489860838061135888931548234366640994061734196466170531105718785437541747/278066377585826623354880511023167787730" }, { "-34677827126365037739221949705076349308552841821108642369491195428278121711851/12321935233094032355", "2466652720703038662112375481129216761044838204088317060529010755963314905661/458077759838279587", "-46279076433142446690218423399092373290016631287423134630356063713373023144989129659854095947192/5644404488448083755690706619714037385" }, { "75657421640076548917316021979547903196453821552146142751737530624725671569062/5416811919979369403", "-51031635143911513328361770575139950616395278082588474953679149885798666896870/16274277637120569843", "1507698654622877634185545368063085304919907004898369478770589865697455127479301592176158803465876/88154701093808389139357381843158713729" }, { "-86696779369804422745383183615836359604633179506005810847902134850836986706763/15354752711854066426", "83875579121692496325618937810567731584819474189441279434601944065565889174333/1890321146489013312", "-725886765676185953186290796464189476910148783977596698524963064505627422317719186476684911836457/14512706875163632554860591439823131456" }, { "-2824584270835350806110810310308644313069326027498380007733023821989145840779/3128200028313826545", "-16485532380752962986834975164722153533427821569516340079793116204530103476885/4044901389917631001", "40144878017198534388242075435853869853984060096218401720566307902396394251666454424383286522546/12653260642466969643085415999628721545" }, { "-71140717297594692514165816539390347954764512441693085945645019026357644035048/15130773661553937219", "106518314860779634188990156539381479314908411240039365434170935270962911954978/11202282371121185733", "-267626990691150539404999353980899804835901788880218020004516046839225745741587662342920970677374/18833244338916713919008552672213388503" }, { "-31372444086039981530710911528326367048894875160807395940269724829549418985367/149682691887362386596593782520991059630", "13980025800771566396092717430902170466939197897483207383178768135899198010674/143215924045734814208985239450703841431", "-6585601463869631351127457963734548845246885851328680299125624347680443020577881573937479731612385878788264587830797/21436945032301618223045694723696447349670080755369221855700055538448185530530" }, { "60002561005149795132492915799111287923312170708430066011808292212167201814322/16346766380600148228286881361520329811", "104734497917913613491539581495799848702023341599268915776996571583385896191203/61937476024742321910315674059586179787", "19844918952732846654680216616282727016967753441473733514766184661191061075852141231786969917096326062063227788681/10024529215648371311559365663430434349900555024451481776473735938354274557" }, { "78980655687309201443760271907411093305339297143458162112992101000746746121121/24094471248783344167514231679460830840", "10562090177736342378322146805187203837437609238688017154037816697523731420573/74961473522415640988394298626742882726", "2833009175986364875175323375606672657538996734036576482627590142336455915129629838687125527863027857335645122892263/903078534276138789186206765245648729133926893901427360507431923032322034920" }, { "96507496069338193466683209170737942070468924698476218759487496209308948365/19252547784216386872197161331387216893", "12563973560096321588715986952435909079270363887929001032891628645353358046011/79879611474172059435223762585596250921", "-234179520035021783886726161079163865833895106001667476480293126893061678147610754451356994012799045797572757769658/1537886036891137155393554113191390737924110193971845147480358562685078008453" }, { "-95307376781556674397571761484869767912211504027346871580288574968524683908606/128329921725822403056205582017133271311", "36170894925879686192917617159219095595164782822289198001474013555499918728596/240886887357120796976726436320063138705", "-27600105449672599524131749634403660999916186956076872373762346977331203119722064380924286397976905109959929163304586/30912995399316310109755266138690547023211992922143297688759057498082990192255" }, { "-22104893896795356297688360407985617971036912713007110938688208155601366216839/5790727918973991999188987227357894380", "-2339372311396919406471876113751500811577555408710269902369834593304924842262/12937689744925498650506694361349920911", "-90813196841584888136609582546105640167792279132393576014002859436259486025871518847027719826829986116492656710923/24972880404321196721702428178050372850585634300866259560981343234830460060" }, { "-3426218098660813853559652497557253942819662042768623922183022792185928242671/2077407536662385613357832628600529321326686191757127715026249042748302985178", "102639297566540827510784861997871251414598617775200449087621943894148321803293/83089038429507982364103335021257902316010144851865721965726693103637274338545", "-497904817589969304680335736144278473886197067420059149312627956679073246109792679236301202959163792633927112737045328517845259242265445360227131779644849/172609794647490471018785535271654901168315737813115654161745630290269473799997219289162551586864155467201760250711449118429648095083028041134558889086010" }, { "1543899448831604569141696144740105016328586790221799945430718394112623114412/1094690716976737526626281319975432667416762320123576900412499904933271786567", "-101835025746074730017715423582062511397387458863000475669454309217160145993/55116548932808468782187525862059393507883043749327746382569396580129398962", "196572266866178229534134252625134989714563665559807019513454337864363053729628560611312158082929567528955985669620113192156991984486011150099776316375/60335574468539540262844259780498204139853746803235564167348945699931512713417761400790104247218084745081610815218855896912895393599203789305655343454" }, { "-37581128364300495505521143552535972339959603365602244668159915869829949338997/42947503543372015019662104425995959382231280059683481488692141811517675950053", "-64888994735350842409379226446854438865448614840503930577860382883594178287934/83188698741706753136718468601650233481619465918167616089202536622553688681087", "-339504834548876267781536981106771553482515399809961247195394672491113984585270709765073243997043174508213253440272888923497173265137136111635177948889237/3572746933977957867604303713153220827104741303667912510494658617478381525690274918494624922428110123336345510454960178899375325287131764283538305257747611" }, { "-16230533405187239318665866908175768720879595131719076634847964191318368133798/22572606803697929681675696479626869642065470042484269772607381297011844085929", "-3238806615045730440879378702226410558103197865253164974472379309242480970831/7167633180423354812410246140643720752789573307606828791458541239290047771821", "-43226201536346598702395278529841763047400215735214225929426206339139243925579733185594282160061132691154727543083543034702325848468839969037250195569159/161792165494835249202675342837643048016103040739685489755239980324180308179745586573032524649518850731442178659412287492012066453331740508600962908806709" }, { "-58154703770626762920775801228739843350302933064569814497417973139312614069763/25655935043535628671780902110427599603857741303802203417196105196580175051005", "2291927744682353823611191393035210406213286149316388597509251757479544491322/2075117977066796442381930295725401140983312287419314083032058820231519915051", "-2848879691864593463404526996418656511058536739346277043463623510210968076493148319480555434626780964688210750895957968447300033820091387019574369485421/845064952814266442598400897276554701819815257830830535600041451476645443978805142044657833921127247033533628716506571358424324423237490438402971304385" }, { "16233726784138742204308718138203086218138595789383817317246449554340898453104/16370584482945481446847872945862788646563748664837147378940234530469832625057", "14431071141710676049963542765626402177344958369162454874051268130438178883381/21166786163219212747261378458659387864767326410261049063051557406799162784072", "107370754167217929909136144689909613387440429633745577224054233373886366171618903318258855919060113440621302505589923655976636732694637334616990468681771/346512661117421566971293748815177161526095870176610277140325665174756629068111228154091043637596506814557119477231243643171068111260010676990408227692104" }, }; cln-1.3.3/tests/timeMIpow2div.cc0000644000000000000000000000121111201634741013322 0ustar #include #include #include #include #include #include #include using namespace cln; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); uintL len = atoi(argv[1]); cl_modint_ring R = find_modint_ring((cl_I)1 << (intDsize*len)); cl_MI a = R->random(); cl_MI b; do { b = R->random(); } while (!oddp(R->retract(b))); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_MI c = R->div(a,b); } } } cln-1.3.3/tests/test_I_logior.cc0000644000000000000000000000114511201634740013432 0ustar #include "test_I.h" int test_I_logior (int iterations) { int error = 0; int i; // Check commutativity. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); ASSERT2(logior(a,b) == logior(b,a), a,b); } // Check against ash and oddp. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); ASSERT2(oddp(logior(a,b)) == (oddp(a) | oddp(b)), a,b); sintL c = random32() % 1024; ASSERT3(logior(ash(a,c),ash(b,c)) == ash(logior(a,b),c), a,b,c); ASSERT3(logior(ash(a,-c),ash(b,-c)) == ash(logior(a,b),-c), a,b,c); } return error; } cln-1.3.3/tests/timeLFcosh.cc0000644000000000000000000000176411201634741012675 0ustar #include #include #include #include #include #include "float/lfloat/cl_LF.h" #include #include #include #include #include using namespace cln; #include using namespace std; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); extern int cl_cosh_algo; uintL len = atoi(argv[1]); #if 0 cl_LF one = cl_I_to_LF(1,len); cl_F x = scale_float(random_F(one),-1); cout << x << endl; #else cl_F x = sqrt(cl_I_to_LF(2,len))-1; #endif cl_F y; y = exp(x); // fill cache #if 0 cl_cosh_algo = 0; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { y = cosh(x); } } cout << y << endl; cl_cosh_algo = 1; #endif { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { y = cosh(x); } } cout << y << endl; } cln-1.3.3/tests/timeMIpow2recip.cc0000644000000000000000000000116111201634741013646 0ustar #include #include #include #include #include #include #include using namespace cln; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); uintL len = atoi(argv[1]); cl_modint_ring R = find_modint_ring((cl_I)1 << (intDsize*len)); cl_MI a; do { a = R->random(); } while (!oddp(R->retract(a))); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_MI b = R->recip(a); } } } cln-1.3.3/tests/test_nt.cc0000644000000000000000000000043211201634741012307 0ustar #include extern int test_nt_jacobi (int iterations); #define RUN(tester,iterations) \ std::cout << "Testing "#tester"..." << std::endl; \ error |= tester (iterations); int test_nt (int iterations) { int error = 0; RUN(test_nt_jacobi,iterations); return error; } cln-1.3.3/tests/test_MI_mul.cc0000644000000000000000000000302711201634741013053 0ustar #include "test_MI.h" int test_MI_mul (int iterations) { int error = 0; int i; // Check commutativity. for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); cl_modint_ring R = find_modint_ring(m); cl_MI a = R->canonhom(testrandom_I()); cl_MI b = R->canonhom(testrandom_I()); ASSERT3(a*b == b*a, m,a,b); } // Check associativity. for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); cl_modint_ring R = find_modint_ring(m); cl_MI a = R->canonhom(testrandom_I()); cl_MI b = R->canonhom(testrandom_I()); cl_MI c = R->canonhom(testrandom_I()); ASSERT4((a*b)*c == a*(b*c), m,a,b,c); } // Check second binomial formula. for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); cl_modint_ring R = find_modint_ring(m); cl_MI a = R->canonhom(testrandom_I()); cl_MI b = R->canonhom(testrandom_I()); ASSERT3((a+b)*(a-b) == a*a-b*b, m,a,b); } // Check distributive formula. for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); cl_modint_ring R = find_modint_ring(m); cl_MI a = R->canonhom(testrandom_I()); cl_MI b = R->canonhom(testrandom_I()); cl_MI c = R->canonhom(testrandom_I()); ASSERT4((a+c)*(b+c) == a*b+(a+b)*c+c*c, m,a,b,c); } // Check special cases 0, 1, -1. for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); cl_modint_ring R = find_modint_ring(m); cl_MI a = R->canonhom(testrandom_I()); cl_MI z = R->zero(); cl_MI o = R->one(); cl_MI mo = R->canonhom(-1); ASSERT2(a*z == z, m,a); ASSERT2(a*o == a, m,a); ASSERT2(a*mo == -a, m,a); } return error; } cln-1.3.3/tests/test_I_gcd.cc0000644000000000000000000000111211201634740012666 0ustar #include "test_I.h" int test_I_gcd (int iterations) { int error = 0; int i; // Check commutativity. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); ASSERT2(gcd(a,b) == gcd(b,a), a,b); } // Check some axioms. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); cl_I g = gcd(a,b); if (g > 1) { ASSERT2(mod(a,g) == 0, a,b); ASSERT2(mod(b,g) == 0, a,b); ASSERT2(gcd(exquo(a,g),exquo(b,g)) == 1, a,b); } cl_I c = testrandom_I(); ASSERT3(gcd(a+b*c,b) == g, a,b,c); } return error; } cln-1.3.3/tests/timeprint.cc0000644000000000000000000000133611201634741012646 0ustar #include #include #include #include #include #include #include #include #include using namespace cln; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); cl_I m = cl_I(argv[1]); cl_I M = (cl_I)1 << (intDsize*m); cl_I a = random_I(M); // One run to fill the cache. { char* p = cl_decimal_string(a); free_hook(p); } // Now start the timing. { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { char* p = cl_decimal_string(a); free_hook(p); } } } cln-1.3.3/tests/exam_SF.cc0000644000000000000000000000024511201634740012152 0ustar #include "exam_SF_plus.cc" #include "exam_SF_minus.cc" #include "exam_SF_mul.cc" #include "exam_SF_div.cc" #include "exam_SF_floor.cc" DO_TESTS(sfloat,cl_SF,cl_SF) cln-1.3.3/tests/exam_SF_plus.cc0000644000000000000000000001621311201634740013217 0ustar #include "exam.h" #include #include static plus_test sfloat_plus_tests[] = { { "0.52019s0", "0.98203s0", "1.50223s0" }, { "0.026268s0", "0.6137s0", "0.63997s0" }, { "-0.338943s0", "0.450523s0", "0.11158s0" }, { "-0.032799s0", "0.995186s0", "0.96239s0" }, { "0.249222s0", "0.96463s0", "1.21385s0" }, { "-0.46177s0", "-0.80114s0", "-1.26291s0" }, { "-0.127754s0", "-1.88775s9", "-1.88775s9" }, { "-0.65572s0", "-9.1112s9", "-9.1112s9" }, { "-0.99359s0", "-7.6134s9", "-7.6134s9" }, { "0.0169907s0", "-5.9027s9", "-5.9027s9" }, { "0.77272s0", "-9.5384s9", "-9.5384s9" }, { "-0.50671s0", "1.95366s9", "1.95366s9" }, { "-0.281487s0", "-1.4109s-13", "-0.281487s0" }, { "0.86259s0", "-1.8225s-13", "0.86259s0" }, { "0.42874s0", "6.326s-14", "0.42874s0" }, { "-0.53545s0", "3.607s-14", "-0.53545s0" }, { "0.63671s0", "-4.723s-14", "0.63671s0" }, { "0.34449s0", "-4.873s-14", "0.34449s0" }, { "-0.480698s0", "3.03292s19", "3.03292s19" }, { "0.85132s0", "-6.325s19", "-6.325s19" }, { "-0.54742s0", "-2.83806s19", "-2.83806s19" }, { "0.45269s0", "1.62964s19", "1.62964s19" }, { "-0.5122s0", "-3.6148s18", "-3.6148s18" }, { "0.192093s0", "5.3618s19", "5.3618s19" }, { "-0.43486s0", "-8.918s-24", "-0.43486s0" }, { "0.289955s0", "-5.911s-24", "0.289955s0" }, { "0.274345s0", "-1.6779s-23", "0.274345s0" }, { "0.392723s0", "-7.441s-24", "0.392723s0" }, { "-0.62215s0", "3.521s-24", "-0.62215s0" }, { "-0.5406s0", "-7.718s-24", "-0.5406s0" }, { "6.5444s9", "-0.060898s0", "6.5444s9" }, { "-8.541s9", "-0.181755s0", "-8.541s9" }, { "3.02993s9", "0.694534s0", "3.02993s9" }, { "9.3926s9", "-0.77226s0", "9.3926s9" }, { "-6.4481s9", "0.252235s0", "-6.4481s9" }, { "-1.1734s8", "0.94104s0", "-1.1734s8" }, { "-5.1049s9", "1.28059s9", "-3.82435s9" }, { "-7.39554s9", "8.9347s9", "1.53911s9" }, { "3.11457s9", "1.71478s9", "4.82935s9" }, { "-8.0461s9", "9.0508s9", "1.00467s9" }, { "-8.58006s8", "-2.82289s7", "-8.86235s8" }, { "1.82954s9", "-1.83914s9", "-9601000.0s0" }, { "7.6292s9", "1.3988s-13", "7.6292s9" }, { "-1.43837s9", "-2.482s-15", "-1.43837s9" }, { "-6.4696s9", "-1.3269s-13", "-6.4696s9" }, { "9.6744s9", "-3.132s-14", "9.6744s9" }, { "-1.18927s9", "-1.9405s-13", "-1.18927s9" }, { "-3.81462s9", "-8.602s-14", "-3.81462s9" }, { "5.5761s9", "1.32286s19", "1.32286s19" }, { "7.1631s9", "-9.3184s19", "-9.3184s19" }, { "4.7921s9", "-5.8008s19", "-5.8008s19" }, { "7.792s9", "9.7695s19", "9.7695s19" }, { "8.9575s9", "7.0198s19", "7.0198s19" }, { "4.4688s9", "7.2066s19", "7.2066s19" }, { "8.9222s9", "-1.3243s-23", "8.9222s9" }, { "-9.7717s9", "3.434s-24", "-9.7717s9" }, { "-4.22478s9", "-7.938s-24", "-4.22478s9" }, { "3.9261s8", "7.916s-24", "3.9261s8" }, { "-3.239s9", "-8.986s-24", "-3.239s9" }, { "-4.6268s9", "-1.0129s-23", "-4.6268s9" }, { "1.1171s-13", "0.73372s0", "0.73372s0" }, { "-3.575s-14", "0.94588s0", "0.94588s0" }, { "3.176s-14", "-0.160759s0", "-0.160759s0" }, { "5.055s-15", "-0.0258102s0", "-0.0258102s0" }, { "6.371s-14", "0.480484s0", "0.480484s0" }, { "-9.257s-14", "0.698975s0", "0.698975s0" }, { "-1.0281s-13", "-9.4453s9", "-9.4453s9" }, { "5.960s-14", "-1.71395s9", "-1.71395s9" }, { "6.805s-14", "-5.8515s9", "-5.8515s9" }, { "1.1645s-13", "7.4758s9", "7.4758s9" }, { "-1.0064s-13", "-1.86868s9", "-1.86868s9" }, { "8.912s-15", "-8.4908s9", "-8.4908s9" }, { "4.036s-14", "3.308s-15", "4.3668s-14" }, { "-2.503s-15", "-7.642s-14", "-7.8923s-14" }, { "4.653s-14", "-4.612s-14", "4.10262s-16" }, { "4.700s-14", "-8.456s-14", "-3.756s-14" }, { "8.181s-14", "-4.658s-14", "3.52305s-14" }, { "-1.5467s-13", "2.3608s-13", "8.1409s-14" }, { "-4.341s-14", "-5.14576s19", "-5.14576s19" }, { "-3.159s-14", "-9.4925s19", "-9.4925s19" }, { "-7.325s-14", "3.49983s19", "3.49983s19" }, { "4.134s-14", "7.07955s19", "7.07955s19" }, { "4.080s-15", "-3.7832s19", "-3.7832s19" }, { "1.1577s-13", "3.30522s19", "3.30522s19" }, { "-6.838s-14", "2.739s-24", "-6.838s-14" }, { "5.050s-14", "6.768s-24", "5.05s-14" }, { "-1.9477s-13", "-6.657s-24", "-1.9477s-13" }, { "-6.348s-14", "-5.222s-24", "-6.348s-14" }, { "-8.770s-14", "-1.58234s-22", "-8.77s-14" }, { "7.906s-14", "4.9202s-22", "7.906s-14" }, { "3.7985s19", "0.8199s0", "3.7985s19" }, { "9.891s19", "0.79037s0", "9.891s19" }, { "-1.49583s19", "-0.360153s0", "-1.49583s19" }, { "-7.36023s19", "0.8185s0", "-7.36023s19" }, { "3.62075s19", "-0.364594s0", "3.62075s19" }, { "8.0477s19", "-0.531815s0", "8.0477s19" }, { "3.62182s19", "-7.2661s9", "3.62182s19" }, { "-3.23868s19", "-9.6806s9", "-3.23868s19" }, { "-6.08735s19", "2.89138s9", "-6.08735s19" }, { "5.00175s19", "-6.3548s9", "5.00175s19" }, { "2.82944s19", "4.7262s9", "2.82944s19" }, { "4.6168s19", "-6.8772s9", "4.6168s19" }, { "1.15555s19", "-3.786s-14", "1.15555s19" }, { "8.1897s19", "-8.971s-14", "8.1897s19" }, { "4.32734s19", "-4.794s-14", "4.32734s19" }, { "-9.4559s19", "-1.9717s-13", "-9.4559s19" }, { "-4.20726s19", "-8.657s-14", "-4.20726s19" }, { "9.7697s19", "-3.376s-14", "9.7697s19" }, { "6.09264s19", "-7.5608s18", "5.33654s19" }, { "-5.2828s19", "6.8924s18", "-4.59356s19" }, { "5.73685s19", "-1.4978s19", "4.23907s19" }, { "-1.30897s19", "4.8593s19", "3.55036s19" }, { "-8.5586s19", "-9.712s19", "-1.82707s20" }, { "3.8772s19", "-8.6355s19", "-4.75833s19" }, { "-1.03845s19", "6.88s-24", "-1.03845s19" }, { "8.4716s19", "9.614s-24", "8.4716s19" }, { "-4.3023s19", "-7.649s-24", "-4.3023s19" }, { "5.9593s19", "-2.552s-24", "5.9593s19" }, { "9.8934s19", "1.3093s-23", "9.8934s19" }, { "-5.70567s19", "7.918s-24", "-5.70567s19" }, { "-2.893s-24", "-0.93898s0", "-0.93898s0" }, { "8.795s-24", "-0.030014s0", "-0.030014s0" }, { "-9.366s-24", "0.200493s0", "0.200493s0" }, { "-9.3102s-22", "-0.28704s0", "-0.28704s0" }, { "7.142s-24", "-0.45701s0", "-0.45701s0" }, { "9.420s-24", "0.957794s0", "0.957794s0" }, { "2.975s-24", "-6.84104s9", "-6.84104s9" }, { "2.26822s-22", "-8.9898s9", "-8.9898s9" }, { "-1.531s-23", "8.1961s9", "8.1961s9" }, { "1.7221s-23", "-1.53725s9", "-1.53725s9" }, { "-9.488s-24", "-4.77676s8", "-4.77676s8" }, { "-1.5077s-23", "2.8251s9", "2.8251s9" }, { "3.410s-24", "-4.701s-14", "-4.701s-14" }, { "-3.361s-24", "-4.947s-15", "-4.947s-15" }, { "9.026s-24", "7.353s-14", "7.353s-14" }, { "-6.385s-24", "7.789s-14", "7.789s-14" }, { "1.8237s-23", "8.517s-14", "8.517s-14" }, { "3.4439s-22", "-4.345s-14", "-4.345s-14" }, { "-6.817s-24", "-9.8611s19", "-9.8611s19" }, { "6.213s-24", "-2.7257s19", "-2.7257s19" }, { "-1.9353s-23", "-2.71446s19", "-2.71446s19" }, { "-3.653s-24", "-7.7565s19", "-7.7565s19" }, { "1.2298s-23", "-1.56532s19", "-1.56532s19" }, { "2.905s-24", "2.334s19", "2.334s19" }, { "3.182s-24", "-5.727s-24", "-2.545s-24" }, { "-1.0745s-23", "3.640s-24", "-7.1049s-24" }, { "-9.7145s-22", "8.77s-24", "-9.6267s-22" }, { "1.3734s-23", "3.225s-24", "1.69588s-23" }, { "2.745s-24", "1.0505s-23", "1.325s-23" }, { "2.780s-24", "2.747s-24", "5.527s-24" }, }; cln-1.3.3/tests/timeUPMImul.cc0000644000000000000000000000237111201634741013002 0ustar #include #include #include #include #include #include #include #include using namespace cln; #include using namespace std; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); int n = atoi(argv[1]); cl_I m = 100001; int i; cl_modint_ring R1 = find_modint_ring(m); cl_univpoly_ring PR1 = find_univpoly_ring(R1); cl_UP p1 = PR1->create(n-1); for (i = 0; i < n; i++) p1.set_coeff(i, R1->canonhom((int)(1.618033989*i*i))); p1.finalize(); cout << p1 << endl; cl_UP sp1 = PR1->zero(); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { sp1 = square(p1); } } cout << sp1 << endl; } // Time: // n modint modint2 neu // 2 0.000123 0.000082 0.000086 // 5 0.00051 0.00031 0.00032 // 10 0.00169 0.00095 0.00100 // 25 0.0089 0.0049 0.0053 // 50 0.031 0.018 0.020 // 100 0.118 0.070 0.079 // 250 0.72 0.43 0.48 // 500 2.87 1.76 1.91 // 1000 11.4 7.0 8.0 cln-1.3.3/tests/test_I_lognand.cc0000644000000000000000000000042011201634740013554 0ustar #include "test_I.h" int test_I_lognand (int iterations) { int error = 0; int i; // Check against logand. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); ASSERT2(lognand(a,b) == lognot(logand(a,b)), a,b); } return error; } cln-1.3.3/tests/test_MI_minus.cc0000644000000000000000000000164311201634741013413 0ustar #include "test_MI.h" int test_MI_minus (int iterations) { int error = 0; int i; // Check anti-commutativity. for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); cl_modint_ring R = find_modint_ring(m); cl_MI a = R->canonhom(testrandom_I()); cl_MI b = R->canonhom(testrandom_I()); cl_MI z = R->zero(); ASSERT3((a-b) + (b-a) == z, m,a,b); } // Check associativity. for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); cl_modint_ring R = find_modint_ring(m); cl_MI a = R->canonhom(testrandom_I()); cl_MI b = R->canonhom(testrandom_I()); cl_MI c = R->canonhom(testrandom_I()); ASSERT4(a-(b-c) == c-(b-a), m,a,b,c); } // Check special case 0. for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); cl_modint_ring R = find_modint_ring(m); cl_MI a = R->canonhom(testrandom_I()); cl_MI z = R->zero(); ASSERT2(a-z == a, m,a); ASSERT2(z-(z-a) == a, m,a); } return error; } cln-1.3.3/tests/test_I_compare.cc0000644000000000000000000000073511201634740013571 0ustar #include "test_I.h" int test_I_compare (int iterations) { int error = 0; int i; // Check anticommutativity. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); ASSERT2(compare(a,b) == -compare(b,a), a,b); } // Check a < b <==> a+c < b+c . for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); cl_I c = testrandom_I(); ASSERT3(compare(a,b) == compare(a+c,b+c), a,b,c); } return error; } cln-1.3.3/tests/test_MI_expt.cc0000644000000000000000000000276111201634741013242 0ustar #include "test_MI.h" int test_MI_expt (int iterations) { int error = 0; int i; // Check special caSes 0, 1, 2. for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); cl_modint_ring R = find_modint_ring(m); cl_MI a = R->canonhom(testrandom_I()); ASSERT2(expt(a,0) == R->one(), m,a); ASSERT2(expt(a,1) == a, m,a); ASSERT2(expt(a,2) == a*a, m,a); } // Check special cases -1, -2. for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); cl_modint_ring R = find_modint_ring(m); cl_I ai = testrandom_I(); if (gcd(m,ai)==1) { cl_MI a = R->canonhom(ai); cl_MI ar = R->recip(a); ASSERT2(expt(a,-1) == ar, m,a); ASSERT2(expt(a,-2) == ar*ar, m,a); } } // Check homomorphism (fixed exponent). for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); if (!zerop(m)) { // avoid generating huge numbers cl_modint_ring R = find_modint_ring(m); cl_MI a = R->canonhom(testrandom_I()); cl_MI b = R->canonhom(testrandom_I()); cl_I e = abs(testrandom_I()); ASSERT4(expt(a,e)*expt(b,e) == expt(a*b,e), m,a,b,e); } } // Check distributive formulas (fixed base). for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); if (!zerop(m)) { // avoid generating huge numbers cl_modint_ring R = find_modint_ring(m); cl_MI a = R->canonhom(testrandom_I()); cl_I e = abs(testrandom_I()); cl_I f = abs(testrandom_I()); ASSERT4(expt(a,e)*expt(a,f) == expt(a,e+f), m,a,e,f); ASSERT4(expt(expt(a,e),f) == expt(a,e*f), m,a,e,f); } } return error; } cln-1.3.3/tests/test_I_logandc2.cc0000644000000000000000000000042211201634740013625 0ustar #include "test_I.h" int test_I_logandc2 (int iterations) { int error = 0; int i; // Check against logand. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); ASSERT2(logandc2(a,b) == logand(a,lognot(b)), a,b); } return error; } cln-1.3.3/tests/exam_FF_minus.cc0000644000000000000000000002004111201634740013344 0ustar #include "exam.h" #include #include static minus_test ffloat_minus_tests[] = { { "-0.41894162", "0.23777992", "-0.65672153" }, { "0.74937063", "0.4803756", "0.26899505" }, { "0.46964037", "-0.94880456", "1.4184449" }, { "0.16453332", "0.035123527", "0.12940979" }, { "0.7353321", "-0.3952883", "1.1306204" }, { "-0.33693552", "-0.6941588", "0.35722327" }, { "-0.61853", "-9.25498E9", "9.25498E9" }, { "0.5172653", "-6.728693E9", "6.728693E9" }, { "0.1268478", "-1.8808037E9", "1.8808037E9" }, { "0.29479754", "-3.4643973E9", "3.4643973E9" }, { "0.34332883", "1.4258218E9", "-1.4258218E9" }, { "-0.4093976", "-1.6698813E9", "1.6698813E9" }, { "0.10942185", "-2.015636E-11", "0.10942185" }, { "0.30351585", "4.4276416E-11", "0.30351585" }, { "-0.41279083", "6.5274E-11", "-0.41279083" }, { "0.7813598", "-5.028443E-11", "0.7813598" }, { "-0.72214615", "2.5959075E-11", "-0.72214615" }, { "-0.8924311", "-5.2076333E-11", "-0.8924311" }, { "-0.26128495", "6.8887236E19", "-6.8887236E19" }, { "0.906616", "-2.0519019E18", "2.0519019E18" }, { "0.96452767", "-1.6347343E19", "1.6347343E19" }, { "-0.99801517", "8.383864E19", "-8.383864E19" }, { "-0.60573876", "-4.890489E19", "4.890489E19" }, { "-0.004701972", "6.3981E18", "-6.3981E18" }, { "0.34311903", "3.52871E-21", "0.34311903" }, { "-0.38159567", "-2.3400748E-21", "-0.38159567" }, { "-0.6719565", "-5.4333447E-21", "-0.6719565" }, { "-0.21363729", "8.021308E-21", "-0.21363729" }, { "0.5275244", "-4.88554E-21", "0.5275244" }, { "0.9064559", "-6.5840867E-21", "0.9064559" }, { "-3.0312538E8", "0.26249015", "-3.0312538E8" }, { "-9.217122E9", "0.22172129", "-9.217122E9" }, { "-1.157806E9", "-0.95704305", "-1.157806E9" }, { "6.743087E9", "-0.37863714", "6.743087E9" }, { "-4.0819942E8", "-0.068549395", "-4.0819942E8" }, { "4.586502E9", "0.29215187", "4.586502E9" }, { "5.091125E9", "-2.971223E9", "8.0623483E9" }, { "-2.1147072E8", "-8.537374E9", "8.3259034E9" }, { "-9.075735E9", "-9.072693E9", "-3041280.0" }, { "1.4614451E9", "3.0213921E9", "-1.559947E9" }, { "8.960645E9", "5.4822825E9", "3.4783626E9" }, { "-3.7246787E9", "-2.823592E9", "-9.010867E8" }, { "-3.4256804E9", "-1.8245674E-11", "-3.4256804E9" }, { "7.0777057E9", "3.6826153E-11", "7.0777057E9" }, { "3.4600579E9", "-5.207135E-11", "3.4600579E9" }, { "9.57872E9", "8.222393E-11", "9.57872E9" }, { "8.388926E9", "-1.1216945E-11", "8.388926E9" }, { "3.8273395E8", "1.153788E-11", "3.8273395E8" }, { "-1.2011469E8", "-9.879852E19", "9.879852E19" }, { "3.850388E9", "4.8155957E19", "-4.8155957E19" }, { "5.5329756E9", "-5.067925E19", "5.067925E19" }, { "3.3222902E9", "5.2892763E19", "-5.2892763E19" }, { "4.431185E9", "-8.005187E19", "8.005187E19" }, { "-7.307553E8", "-6.8217897E19", "6.8217897E19" }, { "7.9813893E9", "9.68989E-21", "7.9813893E9" }, { "-5.7208223E9", "9.790913E-21", "-5.7208223E9" }, { "-5.9564112E7", "9.217466E-21", "-5.9564112E7" }, { "5.4524237E9", "4.947411E-21", "5.4524237E9" }, { "1.4269632E9", "-5.1552662E-21", "1.4269632E9" }, { "3.7555832E9", "-4.168443E-21", "3.7555832E9" }, { "-4.1575327E-11", "-0.38582206", "0.38582206" }, { "-5.810516E-11", "-0.5456566", "0.5456566" }, { "-1.2386638E-11", "-0.6209788", "0.6209788" }, { "2.0245033E-11", "-0.7418727", "0.7418727" }, { "3.7671637E-11", "0.1772576", "-0.1772576" }, { "-2.2774244E-11", "-0.5959606", "0.5959606" }, { "-5.6623112E-11", "6.8330056E9", "-6.8330056E9" }, { "-9.2078116E-11", "-3.4236897E9", "3.4236897E9" }, { "-3.317883E-11", "-3.2438755E8", "3.2438755E8" }, { "6.711307E-11", "-7.9204526E9", "7.9204526E9" }, { "-5.1150143E-11", "9.1128E9", "-9.1128E9" }, { "-7.3234044E-11", "-8.067016E9", "8.067016E9" }, { "-3.217777E-11", "-1.6301262E-11", "-1.5876508E-11" }, { "9.6583325E-11", "5.882668E-11", "3.7756645E-11" }, { "-7.573351E-11", "6.3386435E-11", "-1.3911994E-10" }, { "-4.5759726E-11", "8.069604E-11", "-1.2645576E-10" }, { "-9.538651E-11", "-9.01152E-11", "-5.271311E-12" }, { "6.2486766E-11", "-3.414284E-11", "9.662961E-11" }, { "5.530477E-13", "-3.1361222E18", "3.1361222E18" }, { "1.7998643E-11", "1.5437615E19", "-1.5437615E19" }, { "-4.7948378E-11", "2.6669319E19", "-2.6669319E19" }, { "-6.8626884E-12", "-5.7713735E19", "5.7713735E19" }, { "6.195949E-11", "2.8851469E19", "-2.8851469E19" }, { "2.4957127E-11", "-2.661574E18", "2.661574E18" }, { "9.8157565E-11", "-4.561507E-21", "9.8157565E-11" }, { "-9.332288E-11", "-9.280375E-21", "-9.332288E-11" }, { "-9.916877E-11", "-1.6945641E-21", "-9.916877E-11" }, { "-6.460804E-11", "-3.6695186E-21", "-6.460804E-11" }, { "6.712223E-11", "-2.5360524E-21", "6.712223E-11" }, { "2.3824066E-11", "-7.439168E-21", "2.3824066E-11" }, { "-5.189389E19", "0.01453203", "-5.189389E19" }, { "7.0132006E19", "0.45530832", "7.0132006E19" }, { "2.9365046E19", "0.36346745", "2.9365046E19" }, { "-4.1377934E19", "0.37368965", "-4.1377934E19" }, { "-1.891423E19", "0.159002", "-1.891423E19" }, { "1.8096083E19", "-0.6511793", "1.8096083E19" }, { "6.4361307E19", "6.6511677E9", "6.4361307E19" }, { "-1.8698508E19", "1.1925399E9", "-1.8698508E19" }, { "7.75824E19", "7.7361823E9", "7.75824E19" }, { "-7.2570015E19", "3.0842496E9", "-7.2570015E19" }, { "-1.9014525E19", "-3.8941514E9", "-1.9014525E19" }, { "3.2787157E19", "-8.612244E9", "3.2787157E19" }, { "6.4268583E19", "-1.2707472E-11", "6.4268583E19" }, { "-6.5179933E19", "8.61941E-11", "-6.5179933E19" }, { "-8.106952E19", "2.1709537E-11", "-8.106952E19" }, { "2.5455064E19", "3.5653924E-11", "2.5455064E19" }, { "1.574235E19", "-2.7033407E-11", "1.574235E19" }, { "-1.1099541E19", "-8.620364E-12", "-1.1099541E19" }, { "-6.346294E19", "2.9902512E19", "-9.336545E19" }, { "4.9783164E19", "-2.079425E19", "7.0577414E19" }, { "-7.149202E19", "1.4282865E19", "-8.577488E19" }, { "6.0978866E19", "5.256896E19", "8.409905E18" }, { "-9.961146E19", "-1.9834548E19", "-7.977691E19" }, { "2.5196015E18", "5.0534214E19", "-4.8014613E19" }, { "-3.6981453E19", "-1.005367E-21", "-3.6981453E19" }, { "8.881044E19", "-9.717088E-22", "8.881044E19" }, { "4.9637263E19", "-7.544846E-21", "4.9637263E19" }, { "-4.2414725E19", "1.3904184E-21", "-4.2414725E19" }, { "7.844454E18", "-8.659333E-21", "7.844454E18" }, { "1.5733016E19", "8.638849E-21", "1.5733016E19" }, { "1.7531192E-21", "-0.8690463", "0.8690463" }, { "9.449351E-21", "0.7848489", "-0.7848489" }, { "5.5016538E-21", "-0.8998171", "0.8998171" }, { "-6.977279E-21", "-0.9815793", "0.9815793" }, { "-7.9253305E-21", "-0.21357381", "0.21357381" }, { "4.026555E-21", "0.5610563", "-0.5610563" }, { "-7.080433E-21", "-1.9501078E9", "1.9501078E9" }, { "-8.152211E-21", "8.164317E9", "-8.164317E9" }, { "2.177096E-21", "-8.591886E9", "8.591886E9" }, { "9.387247E-21", "3.5730028E9", "-3.5730028E9" }, { "-7.589234E-21", "-4.9193774E9", "4.9193774E9" }, { "1.5755653E-21", "-2.3484498E9", "2.3484498E9" }, { "9.3034425E-21", "8.28104E-11", "-8.28104E-11" }, { "-6.417297E-21", "-8.352926E-11", "8.352926E-11" }, { "8.728735E-21", "9.160732E-11", "-9.160732E-11" }, { "3.8984202E-21", "6.5116944E-12", "-6.5116944E-12" }, { "6.288995E-21", "-5.6701328E-11", "5.6701328E-11" }, { "-2.7652023E-22", "-1.01428276E-11", "1.01428276E-11" }, { "4.7200214E-21", "-3.726995E18", "3.726995E18" }, { "-2.2945808E-21", "-7.3098524E19", "7.3098524E19" }, { "-9.493033E-21", "3.4235436E19", "-3.4235436E19" }, { "3.7946773E-21", "-5.126768E18", "5.126768E18" }, { "-1.2865209E-21", "3.5096026E19", "-3.5096026E19" }, { "-8.403449E-21", "5.704743E18", "-5.704743E18" }, { "2.928304E-21", "-5.574477E-21", "8.502781E-21" }, { "-9.46122E-21", "-3.858943E-21", "-5.602277E-21" }, { "7.296878E-22", "1.8123137E-21", "-1.0826259E-21" }, { "5.866651E-21", "2.4605584E-21", "3.4060923E-21" }, { "-7.633577E-21", "9.915102E-21", "-1.7548679E-20" }, { "-8.7881085E-24", "3.001468E-21", "-3.0102563E-21" }, }; cln-1.3.3/tests/test_MI_canonhom.cc0000644000000000000000000000054011201634741014055 0ustar #include "test_MI.h" int test_MI_canonhom (int iterations) { int error = 0; int i; // Check canonhom followed by retract. for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); cl_modint_ring R = find_modint_ring(m); cl_I a = testrandom_I(); ASSERT2(R->retract(R->canonhom(a)) == (m==0 ? a : mod(a,abs(m))), m,a); } return error; } cln-1.3.3/tests/exam_LF_floor.cc0000644000000000000000000003562211201634740013353 0ustar #include "exam.h" #include #include #include #include static floor_test lfloat_floor_tests[] = { { "-0.9677507664075728311L0", "0.09829392666835353511L0", "-10", "0.015188500275962520004L0" }, { "-0.084596576622269801105L0", "-0.78271578747309396924L0", "0", "-0.084596576622269801105L0" }, { "0.97785517019559092334L0", "-0.24687352093087197807L0", "-4", "-0.009638913527896988987L0" }, { "0.36348468689259258175L0", "0.5156866254701831051L0", "0", "0.36348468689259258175L0" }, { "-0.51463186192345608164L0", "0.8683136279312965567L0", "-1", "0.35368176600784047506L0" }, { "0.36128372948365635348L0", "-0.5061584717303788097L0", "-1", "-0.1448747422467224562L0" }, { "-0.83188875677783952054L0", "-6.988497329115560525L9", "0", "-0.83188875677783952054L0" }, { "-0.09110744229488624391L0", "-9.792597852253288497L9", "0", "-0.09110744229488624391L0" }, { "0.23616060202132526459L0", "-1.5882829404848723914L9", "-1", "-1.5882829402487117894L9" }, { "-0.09652925723903261584L0", "6.2261024177069773893L9", "-1", "6.226102417610448132L9" }, { "0.5413601234707634158L0", "9.144943549323542538L9", "0", "0.5413601234707634158L0" }, { "-0.57037258938648310115L0", "4.436821091919698621L9", "-1", "4.4368210913493260317L9" }, { "-0.9973297751770725278L0", "3.4051851548139874998L-11", "-29288562291", "1.4506986275662661537L-11" }, { "0.6604979952397203417L0", "-4.3497555374342239963L-11", "-15184715315", "-1.8114827519649365006L-11" }, { "0.38589975187928444138L0", "1.0289103184336123803L-12", "375056742036", "3.5046726009323829848L-13" }, { "0.9402638162334174371L0", "4.2262799834524861567L-11", "22248024738", "1.7766010468098603481L-11" }, { "-0.8642082843541437474L0", "8.911777256338402297L-11", "-9697373033", "6.304376014060421794L-11" }, { "0.7435773981922973139L0", "5.910629837324535378L-11", "12580341159", "1.1224045374678474888L-11" }, { "0.7898063255151059068L0", "1.2757118849664610875L18", "0", "0.7898063255151059068L0" }, { "0.19544684487626281231L0", "-3.6071314846523434156L19", "-1", "-3.6071314846523434156L19" }, { "-0.032130218136830583316L0", "-3.367647816525978896L18", "0", "-0.032130218136830583316L0" }, { "-0.25693079625787854222L0", "2.3815464531684079734L19", "-1", "2.3815464531684079734L19" }, { "-0.3975875412090936933L0", "3.9957351306215043416L19", "-1", "3.9957351306215043416L19" }, { "0.16223305219726616216L0", "-5.3922124894358790612L19", "-1", "-5.3922124894358790612L19" }, { "0.14869268750642991106L0", "-4.676414410846522305L-21", "-31796302560686368198", "0.0L0" }, { "0.4848921957991629974L0", "7.275052251851656838L-21", "66651369504012501536", "0.0L0" }, { "0.44996459510190342355L0", "-3.96515259272563559L-21", "-113479767696052002376", "0.0L0" }, { "0.7246909129638354568L0", "-1.2540349367528059089L-21", "-577887339279675740320", "0.0L0" }, { "0.83383904440522878455L0", "3.5186204165781412753L-21", "236978970643311773536", "0.0L0" }, { "0.26779759740636464572L0", "-6.954613119627800336L-21", "-38506469418200611672", "0.0L0" }, { "-7.4845680268023566543L9", "-0.2629469688312594538L0", "28464173061", "-0.1240146549242767677L0" }, { "6.1612132433805581187L9", "-0.09975641287987705455L0", "-61762578120", "-0.083822638930812785824L0" }, { "-3.6629628120558108524L9", "0.35361739315194823028L0", "-10358548203", "0.32784699422401302726L0" }, { "-6.999024858613990497L9", "-0.6086338795192380592L0", "11499564999", "-0.48897756390533489348L0" }, { "4.2927999071819381092L9", "-0.8483437666321241058L0", "-5060212707", "-0.6341788853647631104L0" }, { "-4.377925687006929662L9", "0.3220507356662819166L0", "-13593900595", "0.18712780555802854961L0" }, { "-9.5387759396672939425L9", "7.7154581598602048657L9", "-2", "5.892140380053115789L9" }, { "-5.64339842966998351L9", "4.025489717604319313L9", "-2", "2.4075810055386551162L9" }, { "-4.811594948157823536L9", "-7.834071766040306942L9", "0", "-4.811594948157823536L9" }, { "4.4476035118893197435L9", "3.0450117757143498866L9", "1", "1.4025917361749698569L9" }, { "-7.3465328576805684287L9", "-4.603589573313564281L9", "1", "-2.7429432843670041477L9" }, { "4.956277095163508632L9", "-6.664438280281275845L9", "-1", "-1.708161185117767213L9" }, { "4.367757792316331005L9", "-7.8163461329531150714L-11", "-55879789840705743024", "0.0L0" }, { "-4.7778036898247465523L8", "3.4933422750724630952L-11", "-13676883951274541565", "0.0L0" }, { "-6.667353710605079077L9", "5.3863219342714070564L-11", "-123783052553596643928", "0.0L0" }, { "-6.6004002390836614547L9", "-9.313678706634845693L-11", "70867811173061956036", "0.0L0" }, { "-9.439278803200832958L9", "-6.7075776392225367144L-11", "140725598880953434976", "0.0L0" }, { "-9.207319097846486017L9", "-5.7812820689283059893L-11", "159260852317369718528", "0.0L0" }, { "-7.564134292866958547L9", "6.4508269927189105468L19", "-1", "6.4508269919624971176L19" }, { "-5.7520914080101070246L9", "-4.4901662701989554116L17", "0", "-5.7520914080101070246L9" }, { "-9.801170739094381102L9", "9.482698257311007893L19", "-1", "9.482698256330890819L19" }, { "7.471594576665974082L8", "3.1667053210759199935L18", "0", "7.471594576665974081L8" }, { "-6.4762144691604037974L9", "-8.2417624342716462896L19", "0", "-6.4762144691604037974L9" }, { "-5.5263312844382694187L9", "9.5950716135522835064L19", "-1", "9.5950716129996503776L19" }, { "3.1312033848911460338L9", "-8.61316266389637687L-21", "-363537008074414891396807786496", "0.0L0" }, { "2.6279029713558476835L9", "-4.516664720059022692L-21", "-581823786849847663134534270976", "0.0L0" }, { "4.502075635961923785L9", "-9.685834626464620576L-21", "-464810293545679143271024033792", "0.0L0" }, { "1.4031562604294053729L9", "3.412866773725220897L-21", "411137132932332056394984325120", "0.0L0" }, { "-4.3024038761755407723L9", "2.485284435684751149L-21", "-1731151498959165530746191347712", "0.0L0" }, { "6.136473603422627364L9", "5.6959828635137213127L-21", "1077333578850898685241017237504", "0.0L0" }, { "-8.202208473677937235L-11", "0.12393605769441814725L0", "-1", "0.123936057612396062516L0" }, { "-8.6757073154686102475L-11", "-0.37237633673270687662L0", "0", "-8.675707315468610247L-11" }, { "5.6028622390057924218L-11", "0.6499341232771672055L0", "0", "5.6028622390057924218L-11" }, { "4.5783899320025937576L-11", "-0.7229560019811405793L0", "-1", "-0.7229560019353566799L0" }, { "7.224213822400873615L-11", "-0.87051303270552073176L0", "-1", "-0.87051303263327859354L0" }, { "-5.5008008233955830292L-11", "-0.45974678868400245752L0", "0", "-5.5008008233955830295L-11" }, { "-5.949553569817051437L-11", "-4.9088361621296460857L9", "0", "-5.949553569817051437L-11" }, { "9.068981360820356321L-11", "3.9567179334666110438L9", "0", "9.068981360820356321L-11" }, { "3.4621680776088405294L-13", "4.3691679646970805987L9", "0", "3.4621680776088405294L-13" }, { "4.005939678622022073L-11", "-9.2132271371400602936L8", "-1", "-9.213227137140060293L8" }, { "6.8015601712459487755L-11", "-4.769849366969915586L9", "-1", "-4.769849366969915586L9" }, { "8.736177705951390388L-11", "8.3701230195943479203L9", "0", "8.736177705951390388L-11" }, { "-8.8368349664293751446L-11", "1.7247862508910726963L-11", "-6", "1.5118825389170610328L-11" }, { "-2.0922301210797840822L-11", "2.9157326021078492393L-11", "-1", "8.235024810280651572L-12" }, { "-9.929248815922456709L-11", "-6.9934608623319373425L-11", "1", "-2.9357879535905193665L-11" }, { "8.809298490106908006L-11", "2.521478295865126635L-11", "3", "1.244863602511528101L-11" }, { "7.3620267190952160604L-11", "-5.0806267993123045533L-11", "-2", "-2.7992268795293930463L-11" }, { "-9.070716461299934103L-11", "1.372581158818204212L-11", "-7", "5.3735165042749538097L-12" }, { "-7.459630170957188741L-11", "-3.429772398019229389L19", "0", "-7.459630170957188741L-11" }, { "1.9725650506989118904L-11", "-1.7770668980460508816L19", "-1", "-1.7770668980460508816L19" }, { "6.3974118251214889016L-12", "-5.69117448017374684L19", "-1", "-5.69117448017374684L19" }, { "9.080192761938897539L-11", "5.1550284925054312868L19", "0", "9.080192761938897539L-11" }, { "7.694299339180548789L-11", "3.1601030797220572842L19", "0", "7.694299339180548789L-11" }, { "5.5788554873601060938L-11", "5.5699367746931070664L19", "0", "5.5788554873601060938L-11" }, { "-4.087371164243010522L-11", "1.7025318283693090775L-21", "-24007605005", "1.5007203773756006028L-21" }, { "-7.3575974688385316083L-11", "-1.6670029902289832508L-21", "44136678290", "-1.8066891019200848581L-22" }, { "1.0850282868697332469L-11", "5.7344803128377181472L-21", "1892112672", "1.4425616831217755076L-21" }, { "-9.848519351300913193L-11", "-7.121687974823219785L-21", "13828911609", "-2.300608125189343731L-21" }, { "3.0260591554314098406L-12", "1.7303586387117179437L-22", "17488046048", "9.689796116124082976L-23" }, { "5.867643793784483945L-11", "2.9831220978672803306L-21", "19669472456", "9.594326475082730988L-22" }, { "9.453252855247919707L19", "0.3964594556008910194L0", "238441856328540902016", "0.0L0" }, { "1.9865852464762410773L17", "0.8745495786051183551L0", "227155245977568008", "0.08198902299422984579L0" }, { "5.8003655986843771616L19", "-0.57075967601329721915L0", "-101625357264188433960", "0.0L0" }, { "6.5463855676706502812L19", "0.5124698839969514896L0", "127741859026189966704", "0.0L0" }, { "8.053368905864221505L19", "0.40679331708739617821L0", "197972006116659527920", "0.0L0" }, { "8.5722362029533885376L19", "0.1793174966141533504L0", "478047952085719142240", "0.0L0" }, { "-6.6056603867132043536L19", "1.8364346532401849241L9", "-35970026895", "8.274070785684816422L8" }, { "2.473965171745108034L19", "5.5749126908032718576L9", "4437675186", "5.356910410798194379L9" }, { "-4.405924011882179756L19", "-6.4568556406242929674L9", "6823637165", "-4.1798826632701602209L8" }, { "2.1093676314099077168L19", "5.727620773112868108L8", "36827990451", "1.8408274540307780489L8" }, { "-1.0962340119185741432L19", "-8.173187675545835245L9", "1341256380", "-4.422519927692124746L9" }, { "-9.664836922872330681L19", "-4.5461452948374001435L9", "21259410546", "-4.0088028420210172099L9" }, { "9.9654629946168490416L19", "-6.27691916031617149L-11", "-1587636026543136775574879469568", "0.0L0" }, { "-1.2700534905234296955L19", "-7.6392648594402208417L-11", "166253365198349054807791108096", "0.0L0" }, { "-7.837735447773461618L18", "-8.6041613252133785413L-11", "91092381366746282195935035392", "0.0L0" }, { "4.849306367034469812L19", "-8.744903371098252931L-11", "-554529439749024491444258209792", "0.0L0" }, { "-6.3895751736590951245L18", "-8.9218106166526971406L-11", "71617471477514379195326660608", "0.0L0" }, { "-1.1249006547358954392L19", "-3.749899421128778124L-11", "299981553744522252727485464576", "0.0L0" }, { "-4.8298889769606521412L19", "3.2897859420995047714L19", "-2", "1.7496829072383574016L19" }, { "-7.618272569239742257L19", "-2.4246730847406800364L19", "3", "-3.4425331501770214745L18" }, { "-9.9344217376670949096L19", "-2.187787768895506888L19", "4", "-1.1832706620850673572L19" }, { "3.9222824564168688912L19", "-9.476307993509074433L19", "-1", "-5.5540255370922055412L19" }, { "-2.012988112115775752L19", "-1.01146191266402097525L18", "19", "-9.1210478054135899006L17" }, { "8.6136075623649245696L19", "-9.374471951386232653L19", "-1", "-7.6086438902130808345L18" }, { "-4.0954879593227223964L19", "3.4785793369902262412L-21", "-11773449913223093127289481096658923028480", "0.0L0" }, { "-5.7633820540313762628L19", "-6.9799216943629666126L-21", "8257086979479904139315172946770002968576", "0.0L0" }, { "-4.5945941433359568196L19", "-9.26874309885338918L-21", "4957084357969034092339972319162935541760", "0.0L0" }, { "9.069653875532044557L19", "1.1607862998892810815L-21", "78133708817868823323292026086376001765376", "0.0L0" }, { "1.9663881236128118596L19", "-7.53224056983834607L-21", "-2610628411799403924128603371383036051456", "0.0L0" }, { "3.8155182638858600344L19", "-9.78280482738867461L-21", "-3900229362854759958152852242692868931584", "0.0L0" }, { "2.0785751397779279812L-21", "0.84874462118484074924L0", "0", "2.0785751397779279812L-21" }, { "9.468679817093889512L-22", "-0.14230041428757812886L0", "-1", "-0.14230041428757812886L0" }, { "-3.5329587582370771722L-21", "-0.75145077780984780047L0", "0", "-3.5329587582370771722L-21" }, { "1.0147425004279850959L-21", "0.55049889413410685307L0", "0", "1.0147425004279850959L-21" }, { "-9.214176537319943048L-21", "-0.45008902557926736644L0", "0", "-9.214176537319943048L-21" }, { "-1.146684367801419132L-21", "0.3317375182580383851L0", "-1", "0.3317375182580383851L0" }, { "9.8958965362796452575L-23", "-8742129.925142999928L0", "-1", "-8742129.925142999928L0" }, { "-8.629925553125559817L-22", "1.4904768761159059732L9", "-1", "1.4904768761159059732L9" }, { "-1.7636696713810751494L-21", "1.2803675755746476424L9", "-1", "1.2803675755746476424L9" }, { "7.8572218293550540256L-21", "7.311951574932556098L9", "0", "7.8572218293550540256L-21" }, { "5.8831628670454666175L-21", "-2.430599936529262355L9", "-1", "-2.430599936529262355L9" }, { "5.891885696934149925L-21", "6.0077688200842341403L9", "0", "5.891885696934149925L-21" }, { "-5.5378511525885539255L-21", "-4.317564477957860586L-11", "0", "-5.5378511525885539255L-21" }, { "-1.9525004120740256159L-21", "9.454884961900014292L-11", "-1", "9.454884961704764251L-11" }, { "5.461359828153347278L-21", "-9.7061135180917529105L-11", "-1", "-9.706113517545616928L-11" }, { "9.644530490453124287L-21", "8.28693431641614359L-11", "0", "9.644530490453124287L-21" }, { "8.997549905605484822L-21", "5.2672865249640494307L-11", "0", "8.997549905605484822L-21" }, { "-1.55338435917637846L-21", "5.9708770769690056966L-11", "-1", "5.9708770768136672606L-11" }, { "3.9285675924255819076L-21", "5.674913585946206864L19", "0", "3.9285675924255819076L-21" }, { "-3.6185336116295331734L-21", "-9.043926006483480333L19", "0", "-3.6185336116295331734L-21" }, { "-7.32672036508508268L-21", "1.205614654464109627L19", "-1", "1.205614654464109627L19" }, { "-3.3565132746900103151L-21", "8.585503247975515849L19", "-1", "8.585503247975515849L19" }, { "-6.9204354176156616745L-21", "-3.6158709669328356396L19", "0", "-6.9204354176156616745L-21" }, { "-7.5176747956103960436L-21", "9.3440027997860057096L19", "-1", "9.3440027997860057096L19" }, { "-6.302622462978502841L-21", "8.1107309029375862425L-21", "-1", "1.8081084399590834014L-21" }, { "1.4803054325001667241L-22", "6.3345497995208400772L-21", "0", "1.4803054325001667241L-22" }, { "-5.7089861270321677843L-21", "9.540482421100450586L-21", "-1", "3.831496294068282802L-21" }, { "3.3765199428161524112L-21", "9.669802014415968729L-21", "0", "3.3765199428161524112L-21" }, { "7.52101063082155294L-21", "8.827949370572986921L-21", "0", "7.52101063082155294L-21" }, { "4.196504310402249954L-23", "3.785428476220113075L-21", "0", "4.196504310402249954L-23" }, }; cln-1.3.3/tests/test_I_logandc1.cc0000644000000000000000000000042211201634740013624 0ustar #include "test_I.h" int test_I_logandc1 (int iterations) { int error = 0; int i; // Check against logand. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); ASSERT2(logandc1(a,b) == logand(lognot(a),b), a,b); } return error; } cln-1.3.3/tests/exam_DF_plus.cc0000644000000000000000000003004611201634740013200 0ustar #include "exam.h" #include #include static plus_test dfloat_plus_tests[] = { { "0.6049332056786565d0", "-0.9611373574853808d0", "-0.35620415180672427d0" }, { "-0.4763715667865308d0", "0.25936932107685584d0", "-0.21700224570967497d0" }, { "0.2666481927718355d0", "-0.04984768063142031d0", "0.21680051214041518d0" }, { "-0.29478659758474846d0", "0.3371004337672615d0", "0.042313836182513054d0" }, { "0.8203063910979178d0", "0.28968607542857916d0", "1.109992466526497d0" }, { "-0.08207985138263585d0", "0.4368723951711785d0", "0.35479254378854264d0" }, { "-0.8659875373355486d0", "-6.631430771196765d9", "-6.631430772062753d9" }, { "0.15071385783307878d0", "-7.154424279496395d9", "-7.154424279345681d9" }, { "-0.8969642760814789d0", "-2.4070067380831727d8", "-2.4070067470528156d8" }, { "-0.9610362081435054d0", "9.070410778399954d9", "9.070410777438917d9" }, { "0.5129052501104072d0", "-7.47841120327471d9", "-7.478411202761805d9" }, { "0.3840242289740675d0", "7.793048210060242d9", "7.793048210444266d9" }, { "0.07603066126204616d0", "5.215008470388369d-11", "0.07603066131419625d0" }, { "-0.17187858025312586d0", "-5.116645189173968d-11", "-0.17187858030429232d0" }, { "0.2521315816245864d0", "8.603210607505339d-11", "0.2521315817106185d0" }, { "-0.3557185853193914d0", "-2.0371324697272998d-11", "-0.3557185853397627d0" }, { "0.7142792289542045d0", "-7.106356053331326d-11", "0.7142792288831409d0" }, { "0.4380415886629452d0", "-3.069969538383403d-11", "0.43804158863224546d0" }, { "0.24798614227178573d0", "3.972393639614975d19", "3.972393639614975d19" }, { "-0.5210677288128815d0", "4.846393336901129d19", "4.846393336901129d19" }, { "0.5825404819115d0", "1.9710987361264255d19", "1.9710987361264255d19" }, { "0.9105175208730549d0", "2.391166552096775d19", "2.391166552096775d19" }, { "0.48414423368371695d0", "-9.696117779740095d19", "-9.696117779740095d19" }, { "0.25780758450697716d0", "6.094683117025535d19", "6.094683117025535d19" }, { "0.9824539149570484d0", "-5.4680066990812835d-21", "0.9824539149570484d0" }, { "-0.9520982941158654d0", "3.2513564801568073d-21", "-0.9520982941158654d0" }, { "0.0630170624560149d0", "-9.858852595793203d-21", "0.0630170624560149d0" }, { "0.24705141169888878d0", "1.4582081178692862d-22", "0.24705141169888878d0" }, { "0.7440948700757135d0", "-3.0932442581890818d-21", "0.7440948700757135d0" }, { "-0.5055970869515372d0", "4.0277457257516025d-21", "-0.5055970869515372d0" }, { "1.672355787134947d9", "0.0064909681594120805d0", "1.672355787141438d9" }, { "-9.694504381396599d9", "-0.8925470085542831d0", "-9.694504382289146d9" }, { "-1.6695005924298635d9", "-0.34426964741306d0", "-1.6695005927741332d9" }, { "-6.085591212594774d9", "0.5107956920100049d0", "-6.085591212083979d9" }, { "7.457486660952688d9", "-0.4323787588338597d0", "7.457486660520309d9" }, { "-8.790796444526546d9", "0.911415263281967d0", "-8.790796443615131d9" }, { "9.667548804251982d9", "-1.266547751029956d8", "9.540894029148987d9" }, { "-6.169561898845145d9", "9.627911197121864d9", "3.458349298276719d9" }, { "-9.870287253215279d9", "9.004242781937655d8", "-8.969862975021513d9" }, { "-8.175630881172554d9", "-4.08632236263908d9", "-1.2261953243811634d10" }, { "2.9069444232153206d9", "-7.961831315741894d9", "-5.054886892526573d9" }, { "-7.003647401371184d9", "-1.768371514817526d9", "-8.772018916188711d9" }, { "-6.418847599138249d9", "2.755257250162372d-11", "-6.418847599138249d9" }, { "2.3093152687241793d9", "1.2205440142364766d-11", "2.3093152687241793d9" }, { "8.634577667577518d9", "-9.065714034538668d-11", "8.634577667577518d9" }, { "1.711283212591781d9", "-3.235019197733951d-11", "1.711283212591781d9" }, { "2.583886638357791d9", "-8.199109798920928d-11", "2.583886638357791d9" }, { "-7.517123950474774d9", "5.2057802142431697d-11", "-7.517123950474774d9" }, { "3.266571938086574d9", "-4.4782768261898355d19", "-4.478276825863179d19" }, { "2.1000389219899452d9", "-8.547158903365463d19", "-8.54715890315546d19" }, { "-3.9140926801217155d9", "7.387959860641422d19", "7.387959860250013d19" }, { "-7.087607465790431d9", "7.96875093387599d19", "7.96875093316723d19" }, { "-8.341000808926519d9", "6.9360028397637304d19", "6.93600283892963d19" }, { "-5.507940634743809d9", "9.760028858210094d19", "9.7600288576593d19" }, { "8.492522971238823d9", "-2.8253881864964467d-22", "8.492522971238823d9" }, { "1.2731765723336241d9", "-5.8473937102910264d-21", "1.2731765723336241d9" }, { "9.654280758878323d9", "-4.2332114049658973d-22", "9.654280758878323d9" }, { "-6.864618926120946d9", "-1.245648314796599d-21", "-6.864618926120946d9" }, { "-3.9916044043798673d8", "1.697737588450543d-21", "-3.9916044043798673d8" }, { "-7.818041624198686d9", "4.635421587404246d-21", "-7.818041624198686d9" }, { "2.0609929543990767d-12", "-0.2126306554359736d0", "-0.2126306554339126d0" }, { "-1.5923091695877845d-11", "0.515731533720818d0", "0.515731533704895d0" }, { "4.794527092905871d-11", "-0.9066947202676092d0", "-0.9066947202196639d0" }, { "-8.63854477728633d-11", "0.3122982022565777d0", "0.3122982021701922d0" }, { "-7.577966666552416d-11", "-0.24137602092437593d0", "-0.2413760210001556d0" }, { "-4.971730475882754d-11", "-0.8202688719750202d0", "-0.8202688720247375d0" }, { "-5.249369194379291d-11", "-8.546120620321186d9", "-8.546120620321186d9" }, { "8.280786962526793d-11", "5.758373397436368d9", "5.758373397436368d9" }, { "6.370323595535815d-11", "-8.470663335712393d9", "-8.470663335712393d9" }, { "3.59771226839467d-11", "3.5042505440266216d8", "3.5042505440266216d8" }, { "-3.945501687396375d-11", "-5.082779978069177d9", "-5.082779978069177d9" }, { "9.780590963267516d-11", "-5.05591945120475d9", "-5.05591945120475d9" }, { "6.323293597096768d-11", "-7.208898910487284d-11", "-8.85605313390516d-12" }, { "-4.549781732354749d-11", "-6.095452636416357d-11", "-1.0645234368771105d-10" }, { "-5.372680267837374d-11", "2.0748354219485134d-11", "-3.297844845888861d-11" }, { "3.550879553916665d-11", "-4.374873254056574d-11", "-8.23993700139909d-12" }, { "-6.746002242414832d-11", "3.0803985031459436d-11", "-3.665603739268888d-11" }, { "-7.902512161494214d-11", "-8.907842858073236d-11", "-1.681035501956745d-10" }, { "-4.1465935469350415d-11", "6.244210696961323d19", "6.244210696961323d19" }, { "4.921297536286578d-11", "-1.694436650099881d19", "-1.694436650099881d19" }, { "-7.879478980672654d-11", "6.41757969360492d19", "6.41757969360492d19" }, { "-8.200749317872953d-11", "-9.490225542618815d19", "-9.490225542618815d19" }, { "-7.572981329795812d-11", "-3.350367078181029d19", "-3.350367078181029d19" }, { "-5.955255565125549d-11", "-5.009913629288125d19", "-5.009913629288125d19" }, { "-9.818180775332558d-11", "-7.926156011681593d-21", "-9.818180776125174d-11" }, { "-5.2466438379505935d-12", "8.468830229031857d-21", "-5.246643829481763d-12" }, { "3.582774358441715d-11", "3.6865211729351863d-22", "3.58277435847858d-11" }, { "7.169296413565744d-11", "-9.974881413980864d-21", "7.169296412568256d-11" }, { "-9.615073655516977d-11", "4.9552491300097786d-21", "-9.615073655021452d-11" }, { "6.7696956269187d-11", "4.1431488006404866d-21", "6.769695627333016d-11" }, { "-4.663397365185298d19", "0.9758464195927673d0", "-4.663397365185298d19" }, { "-4.77977261393851d19", "0.04145189313162445d0", "-4.77977261393851d19" }, { "7.195364554121596d19", "0.5169917736820715d0", "7.195364554121596d19" }, { "-7.766254779507882d19", "0.5919134938460356d0", "-7.766254779507882d19" }, { "-8.411122653901408d19", "-0.14463225181516137d0", "-8.411122653901408d19" }, { "-9.101920591747218d19", "0.23349918704239836d0", "-9.101920591747218d19" }, { "7.037477746142529d18", "-3.250947575909365d9", "7.037477742891581d18" }, { "-6.864341752972099d19", "-4.0510449339565725d9", "-6.864341753377203d19" }, { "-5.329540273290228d19", "8.14869777458878d9", "-5.329540272475358d19" }, { "-9.726234388247201d19", "2.053976989398215d9", "-9.726234388041803d19" }, { "-1.910324088450308d19", "6.247052535748024d9", "-1.910324087825603d19" }, { "-6.079933001949367d18", "6.316829148809886d9", "-6.079932995632539d18" }, { "-4.499107911798452d19", "9.659763881732633d-11", "-4.499107911798452d19" }, { "-3.0972208018542522d19", "-9.077209886078653d-11", "-3.0972208018542522d19" }, { "-2.3000547840875442d19", "-3.2043634522621155d-11", "-2.3000547840875442d19" }, { "2.124555308489292d19", "2.252166800652451d-11", "2.124555308489292d19" }, { "-7.74280238703686d19", "1.7289553748884322d-11", "-7.74280238703686d19" }, { "-8.119446783121816d19", "-4.3461802389685114d-11", "-8.119446783121816d19" }, { "-4.70848534032654d18", "-4.698316648967506d19", "-5.169165183000161d19" }, { "2.853799842810312d19", "-5.56805968603395d19", "-2.7142598432236384d19" }, { "-2.9128622996090335d19", "-5.153369106520702d19", "-8.066231406129735d19" }, { "-5.415993984772977d19", "4.481932558278175d19", "-9.340614264948015d18" }, { "-1.4652301908531261d19", "7.89284449966826d19", "6.427614308815133d19" }, { "-8.241911630479252d19", "5.377001886877124d19", "-2.8649097436021277d19" }, { "-6.923631123395076d19", "7.100129853298664d-22", "-6.923631123395076d19" }, { "-5.864213410820717d19", "-2.649878514627326d-21", "-5.864213410820717d19" }, { "8.660575002861176d19", "2.751926085897399d-21", "8.660575002861176d19" }, { "-3.0252871646631318d19", "6.852831573716124d-21", "-3.0252871646631318d19" }, { "-9.155476807340938d19", "-5.552907466957205d-21", "-9.155476807340938d19" }, { "-4.03382621358461d19", "6.670808279457885d-21", "-4.03382621358461d19" }, { "8.842980509187577d-21", "0.5028466982188534d0", "0.5028466982188534d0" }, { "1.7292043381396136d-21", "0.19490424064972922d0", "0.19490424064972922d0" }, { "-5.854820918836103d-21", "-0.6700030154364615d0", "-0.6700030154364615d0" }, { "-2.152396491682048d-21", "0.5002930268902921d0", "0.5002930268902921d0" }, { "-1.0897149666610629d-21", "0.16555534170490604d0", "0.16555534170490604d0" }, { "6.321421497987867d-24", "-0.08008112131564671d0", "-0.08008112131564671d0" }, { "-6.1552667309563055d-21", "7.235074489769488d9", "7.235074489769488d9" }, { "-2.2311335001219955d-22", "1.220011008333989d9", "1.220011008333989d9" }, { "8.523565724937177d-23", "-4.1650242034123087d9", "-4.1650242034123087d9" }, { "-2.4400041303825447d-21", "4.435554678685388d9", "4.435554678685388d9" }, { "-3.4479065449345757d-22", "8.491084033112451d8", "8.491084033112451d8" }, { "-7.919939059912893d-21", "-7.610637842585286d9", "-7.610637842585286d9" }, { "4.4958602369105625d-21", "5.758376768873417d-11", "5.7583767693230034d-11" }, { "2.4375297386412195d-21", "9.417086717671841d-11", "9.417086717915595d-11" }, { "1.0040647133383462d-21", "3.4701016271268983d-12", "3.470101628130963d-12" }, { "-3.885093055726793d-21", "-8.523534862249969d-11", "-8.523534862638479d-11" }, { "1.027951323422187d-21", "-7.65508060829868d-11", "-7.655080608195885d-11" }, { "-9.83813940552434d-21", "-5.048380063082019d-11", "-5.0483800640658324d-11" }, { "-7.640856498925806d-21", "-5.743808556015994d19", "-5.743808556015994d19" }, { "8.053891045717591d-21", "4.0840032650134725d19", "4.0840032650134725d19" }, { "-4.794782783871528d-21", "-3.431216587740782d18", "-3.431216587740782d18" }, { "1.860870988390988d-21", "-3.757945694933625d19", "-3.757945694933625d19" }, { "5.445498222566789d-21", "7.575823566817991d19", "7.575823566817991d19" }, { "2.631896745307223d-21", "4.906449817201212d19", "4.906449817201212d19" }, { "-6.61689881073516d-21", "5.357007670385275d-21", "-1.2598911403498852d-21" }, { "3.0173001109587537d-21", "5.2947222461350496d-21", "8.312022357093803d-21" }, { "-8.792518441030627d-21", "-1.0516787854168774d-21", "-9.844197226447504d-21" }, { "7.349451992884509d-21", "-8.427997362671486d-21", "-1.0785453697869767d-21" }, { "-7.881179611953633d-21", "3.2080446524364824d-21", "-4.6731349595171506d-21" }, { "-9.614117725927607d-21", "-5.35667712698602d-21", "-1.4970794852913628d-20" }, }; cln-1.3.3/tests/timeLFatan.cc0000644000000000000000000000173111201634741012656 0ustar #include #include #include #include #include #include "float/lfloat/cl_LF.h" #include #include #include #include #include using namespace cln; #include using namespace std; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); extern int cl_atan_algo; uintL len = atoi(argv[1]); #if 0 cl_LF one = cl_I_to_LF(1,len); cl_F x = scale_float(random_F(one),-1); cout << x << endl; #else cl_F x = sqrt(cl_I_to_LF(2,len))-1; #endif cl_F y; #if 0 cl_atan_algo = 0; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { y = atan(x); } } cout << y << endl; cl_atan_algo = 1; #endif { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { y = atan(x); } } cout << y << endl; } cln-1.3.3/tests/timeLFsqrt.cc0000644000000000000000000000130611201634741012722 0ustar #include #include #include #include #include #include "float/lfloat/cl_LF.h" #include #include #include #include #include #include using namespace cln; using namespace std; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); uintL len = atoi(argv[1]); cl_LF one = cl_I_to_LF(1,len); cl_F x = random_F(one); cl_F y; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { y = sqrt(x); } } cout << y << endl; } cln-1.3.3/tests/exam_DF_minus.cc0000644000000000000000000003004111201634740013343 0ustar #include "exam.h" #include #include static minus_test dfloat_minus_tests[] = { { "-0.011326914400453525d0", "-0.6668141757661364d0", "0.6554872613656829d0" }, { "-0.46185382764946437d0", "0.7488210697846337d0", "-1.2106748974340982d0" }, { "-0.35834120541234993d0", "-0.30919976341834987d0", "-0.04914144199400006d0" }, { "0.44705025064976966d0", "-0.9277893553610955d0", "1.3748396060108652d0" }, { "-0.47647537517067917d0", "0.29158058381073604d0", "-0.7680559589814152d0" }, { "-0.021697999002707746d0", "0.1779871773524142d0", "-0.19968517635512195d0" }, { "0.4179484378019861d0", "9.9990307469939d9", "-9.999030746575953d9" }, { "-0.7475415524823718d0", "1.3993312799214797d9", "-1.3993312806690214d9" }, { "0.2519442433861928d0", "-6.699632771871848d9", "6.699632772123793d9" }, { "-0.5124988631497671d0", "2.7959244812290273d9", "-2.795924481741526d9" }, { "-0.6870193827604301d0", "4.851102442573468d9", "-4.851102443260488d9" }, { "0.7609656780357723d0", "7.481252865855436d8", "-7.481252858245779d8" }, { "-0.6301276042170191d0", "-7.099314875214215d-11", "-0.630127604146026d0" }, { "-0.4139053484357884d0", "-2.897413526398709d-11", "-0.41390534840681426d0" }, { "-0.6944623060197281d0", "-3.291569879873739d-11", "-0.6944623059868125d0" }, { "-0.2057822500703933d0", "3.6505182026159854d-11", "-0.2057822501068985d0" }, { "-0.8792706674467908d0", "8.094527736950817d-11", "-0.8792706675277361d0" }, { "-0.6888184243601332d0", "9.127622796988807d-11", "-0.6888184244514094d0" }, { "-0.980711030497252d0", "8.752272461345245d19", "-8.752272461345245d19" }, { "0.8035082489836539d0", "-3.903355151264917d19", "3.903355151264917d19" }, { "-0.7537841372394811d0", "-5.879942447417834d19", "5.879942447417834d19" }, { "-0.6877475951546845d0", "-2.3972266191169642d19", "2.3972266191169642d19" }, { "-0.43128282112433525d0", "-5.422824998003439d19", "5.422824998003439d19" }, { "0.29538116818276694d0", "1.1291858990580939d19", "-1.1291858990580939d19" }, { "0.9166687388673976d0", "6.395175407123937d-21", "0.9166687388673976d0" }, { "0.41840538498193025d0", "-2.6655662412599155d-21", "0.41840538498193025d0" }, { "-0.8036940092501853d0", "6.7473779576832565d-21", "-0.8036940092501853d0" }, { "0.8555054025209989d0", "-7.939970418096797d-21", "0.8555054025209989d0" }, { "0.3365495704567003d0", "8.694519827555395d-21", "0.3365495704567003d0" }, { "-0.7430322011471231d0", "7.430332379292914d-22", "-0.7430322011471231d0" }, { "5.102372414731216d9", "-0.5073635765350494d0", "5.10237241523858d9" }, { "4.629827365822252d9", "0.6534380055543355d0", "4.629827365168815d9" }, { "7.218192507117569d9", "0.9781542046565127d0", "7.218192506139415d9" }, { "6.595760326622413d8", "0.7339510561932947d0", "6.595760319282902d8" }, { "7.191166637703489d9", "0.80792475493853d0", "7.191166636895564d9" }, { "-7.95531405213956d9", "0.5353636841430115d0", "-7.955314052674924d9" }, { "5.438904545553836d8", "6.533536518165114d9", "-5.989646063609731d9" }, { "-7.389650313101625d8", "-9.983943153365381d9", "9.244978122055218d9" }, { "8.364404619492165d9", "-7.600563055115287d9", "1.5964967674607452d10" }, { "2.070813748323649d9", "6.421052769114957d9", "-4.350239020791307d9" }, { "-2.8555256820439434d9", "-3.4077342921686625d8", "-2.514752252827077d9" }, { "9.147878229420991d8", "8.439982790150545d9", "-7.5251949672084465d9" }, { "-4.315772980070098d9", "-6.48869466068404d-11", "-4.315772980070098d9" }, { "-3.5186299785635023d9", "3.990046539849716d-11", "-3.5186299785635023d9" }, { "2.5645532837267537d9", "8.566645694205622d-13", "2.5645532837267537d9" }, { "6.145110896031829d9", "-9.242734002954773d-11", "6.145110896031829d9" }, { "-6.6836855975624d9", "9.117930361283473d-11", "-6.6836855975624d9" }, { "-1.7472828462085754d8", "-5.125838712019503d-11", "-1.7472828462085754d8" }, { "9.05675399397055d9", "9.086705650502484d19", "-9.08670564959681d19" }, { "-5.834806594586836d9", "9.981576053842906d19", "-9.981576054426386d19" }, { "3.047010922754272d9", "1.1715352070471352d19", "-1.1715352067424342d19" }, { "7.294295638574767d9", "2.845702947515113d19", "-2.8457029467856835d19" }, { "8.264143132493019d9", "-1.6322956072452289d19", "1.6322956080716431d19" }, { "-9.597823287256088d9", "3.954126758718671d19", "-3.954126759678453d19" }, { "3.229389511771705d9", "-4.329831377266493d-21", "3.229389511771705d9" }, { "6.897089200279753d9", "2.4428208790287663d-21", "6.897089200279753d9" }, { "2.3579775300187545d9", "4.729400988996349d-21", "2.3579775300187545d9" }, { "1.6718929117460046d9", "5.8162277016717065d-21", "1.6718929117460046d9" }, { "2.537177500868296d9", "1.4856605280697543d-21", "2.537177500868296d9" }, { "6.117674696930935d9", "-1.6187214719634357d-21", "6.117674696930935d9" }, { "4.1877888304549216d-11", "-0.06920550501017497d0", "0.06920550505205286d0" }, { "9.61054846124015d-11", "0.885309193732889d0", "-0.8853091936367835d0" }, { "2.5559085051828467d-11", "-0.8112181469812297d0", "0.8112181470067888d0" }, { "-1.4549570208293283d-12", "-0.5049325945871657d0", "0.5049325945857107d0" }, { "-7.091628047158497d-11", "0.61946884965934d0", "-0.6194688497302563d0" }, { "2.877466355456826d-11", "0.4496491857374d0", "-0.44964918570862533d0" }, { "1.3041612488449928d-12", "5.408018587130755d9", "-5.408018587130755d9" }, { "-5.379752339715717d-11", "-4.009594691514288d9", "4.009594691514288d9" }, { "7.023042501342336d-12", "-3.4153434285746374d9", "3.4153434285746374d9" }, { "6.968174934871611d-11", "4.713087404332662d9", "-4.713087404332662d9" }, { "-5.153562653896506d-11", "-8.44732228013254d8", "8.44732228013254d8" }, { "-8.424177457818745d-11", "1.6817117809824567d9", "-1.6817117809824567d9" }, { "3.374755984316538d-11", "8.893678266883364d-11", "-5.5189222825668264d-11" }, { "-8.684123447823306d-11", "-7.888825869147879d-11", "-7.952975786754267d-12" }, { "7.788477523205632d-11", "1.741674745286914d-11", "6.046802777918718d-11" }, { "6.546622477606044d-11", "-4.7719651007530584d-11", "1.1318587578359101d-10" }, { "-1.8595152377503265d-11", "5.7288738553553045d-11", "-7.588389093105631d-11" }, { "-8.184033550427558d-11", "-8.834399228929296d-11", "6.503656785017376d-12" }, { "5.749469292140762d-11", "7.493129199779113d19", "-7.493129199779113d19" }, { "-5.2285095120702066d-11", "-2.0611179974216552d19", "2.0611179974216552d19" }, { "-8.84727820032067d-11", "4.7423077384022024d19", "-4.7423077384022024d19" }, { "3.437676989338625d-11", "-3.5368755480277647d19", "3.5368755480277647d19" }, { "2.2665031619145437d-11", "-6.072845659234921d19", "6.072845659234921d19" }, { "-8.429070146313393d-11", "5.134329153614969d18", "-5.134329153614969d18" }, { "-9.009531819191212d-11", "2.301790665456671d-22", "-9.00953181921423d-11" }, { "-2.706942469371907d-11", "9.282350542107287d-21", "-2.706942470300142d-11" }, { "5.358266626996117d-11", "-4.409057695582885d-22", "5.358266627040208d-11" }, { "-7.189537285608088d-11", "9.569273217393917d-21", "-7.189537286565016d-11" }, { "-4.160295905335358d-11", "5.930867524794025d-21", "-4.160295905928445d-11" }, { "6.7922062777334035d-12", "-7.747524338474154d-22", "6.792206278508156d-12" }, { "-9.038821102045805d19", "0.04779131019959271d0", "-9.038821102045805d19" }, { "2.2020595055495963d19", "-0.424631558292516d0", "2.2020595055495963d19" }, { "-8.164003027214308d19", "0.6832198147365239d0", "-8.164003027214308d19" }, { "-3.878233560364984d19", "-0.28756619113600546d0", "-3.878233560364984d19" }, { "7.0829003521450525d19", "-0.6071548125948544d0", "7.0829003521450525d19" }, { "5.968540808784698d19", "0.7674294173432648d0", "5.968540808784698d19" }, { "-2.2143621795153547d19", "-2.443529365769125d9", "-2.2143621792710017d19" }, { "-9.77092538926342d18", "5.903189771537687d8", "-9.77092538985374d18" }, { "9.974714452399537d19", "-6.980456691485629d9", "9.974714453097582d19" }, { "1.7428950527159094d18", "3.68843657888816d9", "1.742895049027473d18" }, { "-1.1094381875350845d19", "-7.157723640671709d9", "-1.1094381868193122d19" }, { "-3.638795590369631d19", "6.9246542750294075d9", "-3.6387955910620963d19" }, { "-5.66543282261991d19", "-5.1005028153082024d-11", "-5.66543282261991d19" }, { "-3.901527864456216d19", "-1.064153465992923d-12", "-3.901527864456216d19" }, { "1.1477489418879848d19", "3.327888063907735d-11", "1.1477489418879848d19" }, { "3.508978072054437d19", "9.238453417997638d-11", "3.508978072054437d19" }, { "-4.7642024461416964d19", "-4.758309941438892d-11", "-4.7642024461416964d19" }, { "-8.307715835429606d19", "3.313910202186439d-11", "-8.307715835429606d19" }, { "2.704675010192592d18", "-2.6840207147078365d19", "2.954488215727096d19" }, { "-9.860969100714668d18", "-4.719594638795429d19", "3.7334977287239614d19" }, { "7.87799781828944d18", "-6.657221298850535d19", "7.44502108067948d19" }, { "-3.3937781740759863d19", "4.783805995045389d19", "-8.177584169121376d19" }, { "-1.0747572720102216d19", "-1.7144708598072445d19", "6.397135877970229d18" }, { "1.3938845733158445d19", "5.604369854609131d19", "-4.210485281293287d19" }, { "6.0938348303695315d19", "1.1005522580049531d-21", "6.0938348303695315d19" }, { "-2.4870844028694925d19", "1.5391650322730598d-22", "-2.4870844028694925d19" }, { "7.323118607079343d19", "6.637280375859432d-21", "7.323118607079343d19" }, { "-4.181201584825501d19", "4.768935182006663d-21", "-4.181201584825501d19" }, { "4.1225910279381205d19", "6.117191687463543d-21", "4.1225910279381205d19" }, { "6.438313875980151d17", "-1.4883489002691529d-21", "6.438313875980151d17" }, { "-4.573961206963222d-21", "0.3586300020381973d0", "-0.3586300020381973d0" }, { "7.74206782371325d-22", "0.23168389210368656d0", "-0.23168389210368656d0" }, { "8.572446613640605d-21", "0.6114581963443891d0", "-0.6114581963443891d0" }, { "-8.539467934859551d-21", "0.33474735899049d0", "-0.33474735899049d0" }, { "-5.55811309570968d-21", "-0.9637216018651454d0", "0.9637216018651454d0" }, { "-6.705839413964189d-21", "0.3787619614522374d0", "-0.3787619614522374d0" }, { "1.338539206480238d-22", "6.683968625235106d9", "-6.683968625235106d9" }, { "-9.64078167549023d-21", "3.291420859310843d9", "-3.291420859310843d9" }, { "-9.26536204591093d-22", "2.9839295142529476d8", "-2.9839295142529476d8" }, { "-3.647737608953592d-21", "6.115300020921433d8", "-6.115300020921433d8" }, { "1.4069763806331204d-21", "-1.183109060480878d9", "1.183109060480878d9" }, { "-6.0037865798761924d-21", "-7.442246743849378d9", "7.442246743849378d9" }, { "-5.994118986299138d-21", "-9.091558282012836d-11", "9.091558281413425d-11" }, { "6.969393585974241d-21", "3.435352867093995d-11", "-3.435352866397056d-11" }, { "-6.278554484817533d-22", "-4.7211920270841604d-11", "4.721192027021375d-11" }, { "-8.603262886304741d-21", "1.7296517702077242d-11", "-1.7296517710680505d-11" }, { "4.104502790901735d-21", "-4.8473213720301105d-11", "4.847321372440561d-11" }, { "-4.449725859444968d-21", "-8.944265568403936d-11", "8.944265567958964d-11" }, { "4.828216540804827d-21", "-1.1712152029346877d19", "1.1712152029346877d19" }, { "-5.65034940464881d-21", "-9.445303840982011d19", "9.445303840982011d19" }, { "-7.24107519738777d-21", "2.340578690102746d19", "-2.340578690102746d19" }, { "1.7659593956231534d-21", "-8.048768257390671d18", "8.048768257390671d18" }, { "-3.0538518255248124d-21", "8.834631867521575d19", "-8.834631867521575d19" }, { "8.57952908388053d-21", "-5.730742870111307d19", "5.730742870111307d19" }, { "-4.5090103564928485d-21", "1.8907114777916313d-21", "-6.399721834284479d-21" }, { "-3.8487625143236447d-22", "5.354282198078924d-21", "-5.739158449511288d-21" }, { "2.6660110440404615d-22", "3.833744224501756d-22", "-1.1677331804612944d-22" }, { "-7.503762004261027d-22", "-9.623906576475644d-21", "8.873530376049542d-21" }, { "-9.113431042260725d-21", "-3.5516521546085545d-21", "-5.56177888765217d-21" }, { "-3.4813735333296525d-21", "-2.6602650182385188d-21", "-8.211085150911337d-22" }, }; cln-1.3.3/tests/timecatalan.cc0000644000000000000000000000342711201634741013120 0ustar #include #include #include #include #include #include #include #include #include "float/lfloat/cl_LF.h" #include namespace cln { // FIXME: using internal functions is a bad idea (even if it works // on some ELF systems) extern cl_LF compute_catalanconst_ramanujan (uintC len); extern cl_LF compute_catalanconst_ramanujan_fast (uintC len); extern cl_LF compute_catalanconst_expintegral1 (uintC len); extern cl_LF compute_catalanconst_expintegral2 (uintC len); extern cl_LF compute_catalanconst_cvz1 (uintC len); extern cl_LF compute_catalanconst_cvz2 (uintC len); } using namespace cln; using namespace std; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); uintL len = atoi(argv[1]); cl_LF p; ln(cl_I_to_LF(1000,len+10)); // fill cache { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_catalanconst_ramanujan(len); } } cout << p << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_catalanconst_ramanujan_fast(len); } } cout << p << endl; #if 0 { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_catalanconst_expintegral1(len); } } cout << p << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_catalanconst_expintegral2(len); } } cout << p << endl; #endif { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_catalanconst_cvz1(len); } } cout << p << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_catalanconst_cvz2(len); } } cout << p << endl; } cln-1.3.3/tests/exam_FF_floor.cc0000644000000000000000000002125311201634740013340 0ustar #include "exam.h" #include #include #include #include static floor_test ffloat_floor_tests[] = { { "-0.8227301", "-0.25283414", "3", "-0.06422769" }, { "-0.6686161", "0.4833234", "-2", "0.29803064" }, { "-0.57436657", "0.52642506", "-2", "0.47848356" }, { "0.60395426", "-0.61624163", "-1", "-0.012287392" }, { "-0.21636301", "0.90365344", "-1", "0.68729043" }, { "0.8705054", "-0.7953333", "-2", "-0.72016126" }, { "0.4544462", "-9.890925E9", "-1", "-9.890925E9" }, { "-0.4954149", "-3.8786918E9", "0", "-0.49541488" }, { "-0.692049", "6.4791506E9", "-1", "6.4791506E9" }, { "0.75464755", "-3.618496E9", "-1", "-3.618496E9" }, { "-0.5929247", "-5.442471E9", "0", "-0.5929247" }, { "-0.30383867", "9.262864E9", "-1", "9.262864E9" }, { "0.9345329", "3.26737E-11", "28601991168", "0.0" }, { "0.3772617", "-7.991702E-11", "-4720667648", "0.0" }, { "0.74438447", "-1.0977978E-11", "-67807064064", "0.0" }, { "-0.9220973", "-1.2655998E-11", "72858525696", "0.0" }, { "-0.4615329", "6.48833E-11", "-7113276928", "0.0" }, { "0.2851941", "-8.262349E-11", "-3451731456", "0.0" }, { "0.61539984", "3.5826177E19", "0", "0.61539984" }, { "-0.8195054", "8.793426E19", "-1", "8.793426E19" }, { "-0.26412165", "7.015103E18", "-1", "7.015103E18" }, { "-0.527393", "8.434833E19", "-1", "8.434833E19" }, { "-0.1846056", "1.8252128E19", "-1", "1.8252128E19" }, { "-0.6079822", "6.106683E19", "-1", "6.106683E19" }, { "0.5564819", "5.953872E-21", "93465542827563810816", "0.0" }, { "-0.52575815", "-1.8358678E-21", "286381261476583178240", "0.0" }, { "-0.6321403", "-5.830945E-21", "108411292344853200896", "0.0" }, { "-0.9675891", "-9.936226E-21", "97379936163841703936", "0.0" }, { "-0.63503754", "-5.0137436E-21", "126659359065470140416", "0.0" }, { "0.8053654", "-3.4055888E-22", "-2364834534832713236480", "0.0" }, { "8.784645E9", "0.9775517", "8986374144", "0.0" }, { "-9.314413E9", "-0.8318871", "11196726272", "0.0" }, { "8.4695936E9", "-0.9823455", "-8621807616", "0.0" }, { "-5.8406625E9", "-0.031723082", "184113971200", "0.0" }, { "-7.325545E9", "0.93169844", "-7862571008", "0.0" }, { "-5.2999526E9", "0.11515945", "-46022733824", "0.0" }, { "6.680458E9", "7.170729E9", "0", "6.680458E9" }, { "-2.2146278E9", "5.2909993E9", "-1", "3.0763715E9" }, { "6.4947005E9", "3.1265188E9", "2", "2.4166298E8" }, { "7.947109E9", "2.464481E9", "3", "5.53666E8" }, { "8.899791E9", "3.5788132E9", "2", "1.7421644E9" }, { "5.272568E9", "-5.3260964E9", "-1", "-5.3528532E7" }, { "9.729838E8", "8.6379175E-11", "11264101901890748416", "0.0" }, { "1.210882E9", "-4.412428E-11", "-27442532596777484288", "0.0" }, { "9.169561E9", "-9.41537E-11", "-97389277614631288832", "0.0" }, { "9.289745E9", "3.1269442E-11", "297087021478284623872", "0.0" }, { "-5.334722E9", "2.0158666E-11", "-264636651022615314432", "0.0" }, { "9.910798E9", "-2.985589E-11", "-331954558296456691712", "0.0" }, { "-1.7169357E9", "2.220112E19", "-1", "2.220112E19" }, { "4.9906683E9", "6.857979E19", "0", "4.9906683E9" }, { "-9.90463E9", "-2.342953E19", "0", "-9.90463E9" }, { "-5.4878054E8", "5.438576E19", "-1", "5.438576E19" }, { "-6.1080986E9", "9.25119E19", "-1", "9.25119E19" }, { "-8.4138286E9", "-9.682224E19", "0", "-8.4138286E9" }, { "2.7084977E9", "2.542436E-23", "106531597407755826831748572905472", "0.0" }, { "-5.720767E9", "9.438407E-21", "-606115738076318963177881600000", "0.0" }, { "-3.4958034E9", "9.250327E-21", "-377911344579488968728001904640", "0.0" }, { "-8.3702047E9", "6.0186186E-21", "-1390718493086361392338557730816", "0.0" }, { "-7.517619E9", "-9.417701E-21", "798243593937800371539149848576", "0.0" }, { "-2.1220838E9", "3.931208E-21", "-539804494597454582830132625408", "0.0" }, { "-3.9606828E-11", "0.34267086", "-1", "0.34267086" }, { "2.495503E-11", "-0.4518087", "-1", "-0.4518087" }, { "-7.98698E-11", "-0.5665642", "0", "-7.98698E-11" }, { "2.1465689E-11", "0.17276591", "0", "2.146569E-11" }, { "4.9463066E-11", "-0.5659616", "-1", "-0.5659616" }, { "-1.8961567E-11", "-0.7758364", "0", "-1.8961567E-11" }, { "7.8871874E-11", "-5.768549E9", "-1", "-5.768549E9" }, { "-9.079439E-11", "-3.807195E9", "0", "-9.079439E-11" }, { "7.879919E-12", "-1.9198149E9", "-1", "-1.9198149E9" }, { "4.389072E-11", "-8.657572E9", "-1", "-8.657572E9" }, { "7.430157E-11", "-3.8599355E9", "-1", "-3.8599355E9" }, { "-5.8839114E-11", "-5.3409536E9", "0", "-5.8839114E-11" }, { "-3.3353615E-11", "8.9096924E-11", "-1", "5.574331E-11" }, { "6.335122E-11", "3.606541E-11", "1", "2.7285809E-11" }, { "-5.6885465E-11", "7.070333E-12", "-9", "6.7475353E-12" }, { "-7.581576E-11", "-3.4334775E-11", "2", "-7.1462155E-12" }, { "3.6686505E-11", "-1.9221425E-11", "-2", "-1.7563462E-12" }, { "3.066395E-11", "-2.3198866E-11", "-2", "-1.573378E-11" }, { "9.1089344E-11", "7.429058E19", "0", "9.1089344E-11" }, { "-7.2265194E-11", "-6.5831596E19", "0", "-7.2265194E-11" }, { "-4.9087675E-11", "1.9182038E19", "-1", "1.9182038E19" }, { "-7.907188E-11", "4.405831E19", "-1", "4.405831E19" }, { "6.118759E-11", "3.4342181E19", "0", "6.118759E-11" }, { "5.4731882E-11", "-5.861447E19", "-1", "-5.861447E19" }, { "6.121101E-11", "-1.8234462E-21", "-33568860160", "0.0" }, { "9.788758E-11", "-2.65478E-21", "-36872200192", "0.0" }, { "7.827001E-11", "-8.5754775E-21", "-9127189504", "0.0" }, { "-3.738018E-11", "-7.810784E-21", "4785714176", "0.0" }, { "7.31308E-11", "-2.0431058E-21", "-35793936384", "0.0" }, { "9.4578095E-11", "-3.0466443E-21", "-31043366912", "0.0" }, { "-4.8186137E19", "-0.95250696", "50588749896299315200", "0.0" }, { "9.548003E18", "-0.9061317", "-10537102614582001664", "0.0" }, { "5.5254813E19", "0.51959753", "106341562860634636288", "0.0" }, { "-4.2787504E19", "0.14769173", "-289708190148186865664", "0.0" }, { "-4.27109E17", "-0.03677529", "11614021477430460416", "0.0" }, { "-3.9238043E19", "0.26663417", "-147160597790283792384", "0.0" }, { "-2.0174873E19", "-6.7035556E7", "300957794304", "0.0" }, { "1.6296811E19", "-7.2014956E9", "-2262976000", "0.0" }, { "7.794499E19", "-7.412829E9", "-10514876416", "0.0" }, { "-1.2546485E19", "6.1565005E9", "-2037924864", "0.0" }, { "5.4549757E18", "-4.778849E9", "-1141483264", "0.0" }, { "-8.9214324E18", "3.0002557E9", "-2973557248", "0.0" }, { "8.790958E19", "-8.224902E-11", "-1068822197453670185020302557184", "0.0" }, { "9.029222E18", "1.3127345E-11", "687817816164697187548814901248", "0.0" }, { "6.7356843E19", "-9.1816894E-11", "-733599685837775742566290948096", "0.0" }, { "4.0346153E19", "2.0593792E-11", "1959141510822234462049892564992", "0.0" }, { "1.3402778E19", "-4.8733902E-11", "-275019611403690085233016700928", "0.0" }, { "-1.3005549E19", "5.6579824E-11", "-229861963021783171398467846144", "0.0" }, { "8.550302E19", "6.4624324E19", "1", "2.0878699E19" }, { "4.7897585E19", "-1.5724218E19", "-4", "-1.4999288E19" }, { "-8.6050445E19", "1.4007867E19", "-7", "1.2004627E19" }, { "-6.0799387E19", "-5.667626E19", "1", "-4.1231221E18" }, { "-7.847746E19", "-3.972193E19", "1", "-3.875553E19" }, { "-6.425414E19", "3.0601436E19", "-3", "2.7550168E19" }, { "2.8220074E-21", "-0.9401483", "-1", "-0.9401483" }, { "9.867747E-21", "0.86288685", "0", "9.867747E-21" }, { "6.2856053E-21", "-0.5235996", "-1", "-0.5235996" }, { "8.709991E-22", "0.42678982", "0", "8.709991E-22" }, { "1.0493481E-21", "0.9355661", "0", "1.0493481E-21" }, { "-6.137466E-21", "0.4328317", "-1", "0.4328317" }, { "6.5872774E-21", "-8.80464E9", "-1", "-8.80464E9" }, { "-1.0479629E-22", "-9.353607E9", "0", "-1.0479629E-22" }, { "-2.636932E-21", "9.794678E9", "-1", "9.794678E9" }, { "-7.912024E-21", "-2.9102356E9", "0", "-7.912024E-21" }, { "1.0071349E-21", "8.762459E9", "0", "1.0071349E-21" }, { "-6.795979E-21", "-9.445545E9", "0", "-6.795979E-21" }, { "6.0598967E-22", "-3.961637E-11", "-1", "-3.961637E-11" }, { "3.481348E-21", "-7.485006E-11", "-1", "-7.485006E-11" }, { "-5.610974E-21", "-4.073898E-11", "0", "-5.610974E-21" }, { "-6.2362584E-21", "8.403202E-11", "-1", "8.403202E-11" }, { "4.2029927E-21", "7.823452E-11", "0", "4.2029927E-21" }, { "-7.765272E-21", "-8.502908E-11", "0", "-7.765272E-21" }, { "2.7845436E-21", "3.490416E-21", "0", "2.7845436E-21" }, { "-1.4630091E-21", "9.193901E-21", "-1", "7.730892E-21" }, { "-8.1823826E-21", "8.941324E-21", "-1", "7.5894165E-22" }, { "-1.8218875E-21", "3.8057304E-21", "-1", "1.9838427E-21" }, { "5.8037763E-21", "-5.1721612E-21", "-2", "-4.5405462E-21" }, { "-8.179982E-21", "6.2204556E-21", "-2", "4.2609293E-21" }, }; cln-1.3.3/tests/exam_RA.cc0000644000000000000000000000024711201634740012146 0ustar #include "exam_RA_plus.cc" #include "exam_RA_minus.cc" #include "exam_RA_mul.cc" #include "exam_RA_div.cc" #include "exam_RA_floor.cc" DO_TESTS(rational,cl_RA,cl_RA) cln-1.3.3/tests/test_I_logeqv.cc0000644000000000000000000000041611201634740013434 0ustar #include "test_I.h" int test_I_logeqv (int iterations) { int error = 0; int i; // Check against logxor. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); ASSERT2(logeqv(a,b) == lognot(logxor(a,b)), a,b); } return error; } cln-1.3.3/tests/exam_LF_minus.cc0000644000000000000000000003302611201634740013361 0ustar #include "exam.h" #include #include static minus_test lfloat_minus_tests[] = { { "0.3211111183819802968L0", "-0.7024866236309383056L0", "1.0235977420129186024L0" }, { "-0.29770116676264721836L0", "0.8494818768850108081L0", "-1.1471830436476580264L0" }, { "-0.7677860965279355367L0", "0.9474539728585997539L0", "-1.7152400693865352905L0" }, { "-0.25414380069764370257L0", "0.82619594943351718565L0", "-1.0803397501311608883L0" }, { "0.21685951051311267031L0", "0.13084151170902027524L0", "0.08601799880409239507L0" }, { "-0.6658362643286463323L0", "-0.101768362258000388376L0", "-0.56406790207064594393L0" }, { "-0.8594165074009265017L0", "3.58724520062188585L9", "-3.5872452014813023575L9" }, { "-0.58779846333918551446L0", "-2.8410824560251060135L9", "2.84108245543730755L9" }, { "0.37819983918255152712L0", "1.75837003745458279L9", "-1.7583700370763829509L9" }, { "-0.19345242719447268632L0", "-8.900743696911070234L9", "8.900743696717617807L9" }, { "0.9170636757513836193L0", "-5.181144559509726756L9", "5.1811445604267904316L9" }, { "0.20643137049004858552L0", "3.3215544303850617772L9", "-3.3215544301786304067L9" }, { "-0.4014437452394343757L0", "4.7898418688154180505L-11", "-0.40144374528733279438L0" }, { "0.0725076594551243524L0", "-3.5321788599004111594L-11", "0.072507659490446140996L0" }, { "-0.65551702819898271043L0", "3.1653130032883009534L-11", "-0.6555170282306358405L0" }, { "0.9237105409310637695L0", "-8.9028024814928743296L-11", "0.9237105410200917943L0" }, { "0.8779771368966066218L0", "7.399233988536237696L-12", "0.8779771368892073878L0" }, { "0.51385216558296334914L0", "-3.3989256599054576304L-11", "0.51385216561695260575L0" }, { "0.74939199427992763254L0", "-6.6998781480191798724L19", "6.6998781480191798724L19" }, { "0.8073774220299670944L0", "2.0433771569275457978L18", "-2.043377156927545797L18" }, { "-0.75286822781531276375L0", "-7.7011647701976081504L19", "7.7011647701976081504L19" }, { "-0.6361916050116532222L0", "1.2717052281488651182L19", "-1.2717052281488651183L19" }, { "0.08977643006115956575L0", "1.2624046205072289204L19", "-1.2624046205072289204L19" }, { "-0.4220171145412169327L0", "8.9155115345908061576L19", "-8.9155115345908061576L19" }, { "0.397772867452284942L0", "5.7785851646148710778L-21", "0.397772867452284942L0" }, { "-0.53062845978690011166L0", "-3.648685738612220277L-21", "-0.53062845978690011166L0" }, { "0.25409096540159836552L0", "-7.8088660109317384514L-21", "0.25409096540159836552L0" }, { "0.78038095936361252965L0", "5.166705522400390383L-21", "0.78038095936361252965L0" }, { "0.2384997171475220939L0", "9.580584601627251829L-21", "0.23849971714752209389L0" }, { "0.38777493167494073L0", "-7.930455614605653916L-22", "0.38777493167494073L0" }, { "9.34906594120583919L8", "-0.06276538462885111519L0", "9.349065941833493036L8" }, { "3.8000098261497040978L9", "0.08156195452126583918L0", "3.8000098260681421433L9" }, { "-8.5084000619874580647L9", "-0.49084164337509169664L0", "-8.5084000614966164213L9" }, { "-9.367354572017391158L9", "0.7369625068937909906L0", "-9.367354572754353665L9" }, { "6.810025547716964613L9", "-0.65456201729278556224L0", "6.8100255483715266306L9" }, { "-2.0476539871173359762L9", "-0.61684944260168028793L0", "-2.0476539865004865336L9" }, { "7.927587886187347037L9", "-9.075678068210342653L9", "1.700326595439768969L10" }, { "8.3881162961959078424L9", "-8.168276983460029623L9", "1.6556393279655937465L10" }, { "-9.837108887605194379L9", "-5.518197215327419734L9", "-4.3189116722777746445L9" }, { "6.0530403690423784372L9", "-4.794777582812792957L9", "1.0847817951855171394L10" }, { "-7.6786817362598780694L8", "3.0685743382723052597L9", "-3.8364425118982930668L9" }, { "-1.035869943077157163L9", "6.964469962306024778L8", "-1.7323169393077596407L9" }, { "-5.236689202734255992L9", "-3.2118444581504684365L-12", "-5.236689202734255992L9" }, { "-5.374622629137047618L9", "6.0449117144963868685L-11", "-5.374622629137047618L9" }, { "-1.03444332932187716727L9", "-7.849504746710041045L-11", "-1.0344433293218771672L9" }, { "5.1103879354813158946L8", "6.53093826849017485L-11", "5.110387935481315894L8" }, { "-9.748335199611953219L9", "-1.0598402609119659922L-11", "-9.748335199611953219L9" }, { "-7.3482164921795502603L9", "7.644598674874161005L-11", "-7.3482164921795502603L9" }, { "-7.4770248834652064083L8", "-6.510822784079429222L19", "6.5108227840046589732L19" }, { "8.3114910321533068423L9", "-6.2387352982669333472L19", "6.2387352990980824504L19" }, { "-1.0718584220381511548L9", "8.521462332927085385L19", "-8.521462333034271227L19" }, { "-1.9155322368803175137L8", "1.3150623743950738752L19", "-1.3150623744142291976L19" }, { "3.8652241507510457716L9", "8.702412273358053775L19", "-8.70241227297153136L19" }, { "2.922009617968977308L8", "-8.409184530486676791L19", "8.409184530515896887L19" }, { "-7.3431860804237713437L9", "9.020687655591526829L-21", "-7.3431860804237713437L9" }, { "-1.1188563145822172016L9", "-2.7575065881283248758L-21", "-1.1188563145822172016L9" }, { "2.5835681218682880315L9", "-3.786022710650191692L-21", "2.5835681218682880315L9" }, { "4.3854765424506375063L9", "1.8847509423241615905L-21", "4.3854765424506375063L9" }, { "-3.4713769831512517224L9", "-2.322290027198980782L-21", "-3.4713769831512517224L9" }, { "414355.71501652302632L0", "3.5411352752491676944L-21", "414355.71501652302632L0" }, { "9.032857346451659148L-11", "0.45111022909893884074L0", "-0.45111022900861026729L0" }, { "-6.5860623447077106086L-11", "-0.16349916999618723413L0", "0.16349916993032661068L0" }, { "-9.239429491581222244L-11", "0.34742997377809253703L0", "-0.34742997387048683193L0" }, { "-1.3189202177704638207L-11", "0.6447775025861344695L0", "-0.64477750259932367166L0" }, { "-8.6095719029859522596L-11", "0.36611643318066821885L0", "-0.3661164332667639379L0" }, { "-7.9284738631391966236L-11", "-0.28883099180012157807L0", "0.28883099172083683944L0" }, { "-9.9602023259578447484L-11", "8.944817052366967221L9", "-8.944817052366967221L9" }, { "-4.7036434158090755064L-11", "-7.652311009876441256L9", "7.652311009876441256L9" }, { "-7.237899450242616437L-11", "-2.0865196011945540415L9", "2.0865196011945540414L9" }, { "1.619466049424876382L-11", "5.1184733211578935236L9", "-5.1184733211578935236L9" }, { "4.1799408897021043963L-11", "7.3289378733409777703L9", "-7.3289378733409777703L9" }, { "-7.1652994078281664426L-11", "-8.756819754593247181L9", "8.756819754593247181L9" }, { "-3.7074082585707708083L-11", "7.8185038704847907146L-11", "-1.1525912129055561523L-10" }, { "-6.236585731179139659L-11", "7.2778046100364844843L-11", "-1.3514390341215624144L-10" }, { "4.435573645212270856L-11", "-5.0777570123416204425L-11", "9.5133306575538912986L-11" }, { "-8.308776483243665939L-11", "9.147453931535851365L-11", "-1.7456230414779517304L-10" }, { "9.9047307392438733836L-11", "-2.5521271062995892868L-11", "1.245685784554346267L-10" }, { "7.964304540045338675L-11", "-8.2763721216842256806L-11", "1.6240676661729564355L-10" }, { "6.3981149909251410836L-11", "-8.199461198383311753L19", "8.199461198383311753L19" }, { "3.2676777703423324814L-11", "4.4068061681801047868L19", "-4.4068061681801047868L19" }, { "-6.239367423070186989L-11", "3.6883672788938434168L19", "-3.6883672788938434168L19" }, { "-2.2122757699951901351L-11", "2.1264312306673926188L19", "-2.1264312306673926188L19" }, { "8.873182931301984606L-11", "1.6930709481447417272L19", "-1.6930709481447417272L19" }, { "-6.88393272917067128L-11", "9.590650870092490293L19", "-9.590650870092490293L19" }, { "6.858643038376546876L-11", "7.344128953107545512L-21", "6.858643037642133981L-11" }, { "2.6458055358368033053L-11", "5.403788941414579396L-21", "2.6458055352964244111L-11" }, { "-2.0808117056914325832L-11", "-9.598437242399057154L-21", "-2.080811704731588859L-11" }, { "-6.7475294377176982065L-11", "7.066634775850918749L-21", "-6.747529438424361684L-11" }, { "-9.3542684131795074026L-11", "-2.671834604826394793L-22", "-9.354268413152789057L-11" }, { "-3.656675383727620855L-11", "-5.7226858095399702763L-21", "-3.656675383155352274L-11" }, { "4.4004114393746579576L19", "0.9981645829158248139L0", "4.4004114393746579576L19" }, { "-2.1157157847974045162L19", "-0.73136590134089295135L0", "-2.1157157847974045162L19" }, { "-6.58288354566033103L19", "0.6435204448077814454L0", "-6.58288354566033103L19" }, { "-6.1300052513232283715L18", "0.37782114066015354996L0", "-6.130005251323228372L18" }, { "-8.3428987469650376416L19", "0.092302889297602909923L0", "-8.3428987469650376416L19" }, { "4.478146018721476673L18", "-0.7594367116407568048L0", "4.4781460187214766738L18" }, { "3.9553793567888621644L19", "7.272309486263127643L9", "3.9553793560616312156L19" }, { "8.4985452245750157485L18", "-8.180191224624705388L9", "8.498545232755206973L18" }, { "-4.9006940756698268444L19", "5.635530637330344937L9", "-4.900694076233379908L19" }, { "3.321094625885548145L19", "7.739325488496469393L9", "3.3210946251116155962L19" }, { "-4.094717236852398814L19", "2.8833151826524522544L9", "-4.0947172371407303324L19" }, { "-7.297938416992967256L19", "1.7849049534461509205L9", "-7.2979384171714577512L19" }, { "-1.6274534493365811085L19", "-7.214220253590898893L-11", "-1.6274534493365811085L19" }, { "-8.8349360721401487896L19", "4.4201546048906225832L-11", "-8.8349360721401487896L19" }, { "2.1193875854469716176L19", "5.4852102858193519493L-11", "2.1193875854469716176L19" }, { "5.8956188285652689564L19", "5.2591781987716878005L-12", "5.8956188285652689564L19" }, { "3.8130742288947136824L19", "-6.2032926048476626596L-11", "3.8130742288947136824L19" }, { "-8.2648264381835919784L19", "5.240041099543619651L-11", "-8.2648264381835919784L19" }, { "-8.9795702979594840016L19", "5.3071479395700422216L19", "-1.4286718237529526223L20" }, { "7.4902067869555502376L19", "8.527286348112666809L18", "6.6374781521442835568L19" }, { "-9.945686226441305483L19", "-7.164943842935287866L19", "-2.7807423835060176172L19" }, { "-6.9451908461424534725L18", "1.7337328244166615333L19", "-2.4282519090309068806L19" }, { "-7.2554820480127785552L19", "-3.6345553532831870424L19", "-3.6209266947295915128L19" }, { "4.80739562024854996L19", "-9.8058600290712759904L19", "1.46132556493198259504L20" }, { "-2.2910115296639597206L19", "3.7450560231732721633L-21", "-2.2910115296639597206L19" }, { "6.3398397438838205245L18", "5.9452907771459291318L-21", "6.3398397438838205245L18" }, { "-3.6223171453314706578L19", "-7.3897558037422565484L-21", "-3.6223171453314706578L19" }, { "-5.253323265732561348L19", "-2.4894382246759080012L-21", "-5.253323265732561348L19" }, { "8.706482285826808214L18", "-5.353671688426432468L-21", "8.706482285826808214L18" }, { "2.2257683364797036278L18", "-8.640543721759613242L-21", "2.2257683364797036278L18" }, { "4.793610535063041737L-21", "-0.46707949288138879385L0", "0.46707949288138879385L0" }, { "-8.1177127707349576126L-22", "-0.524723160625887566L0", "0.524723160625887566L0" }, { "4.3845050204409245572L-21", "0.25137862247046227512L0", "-0.25137862247046227512L0" }, { "9.521149905664397992L-21", "-0.8412363166750659234L0", "0.8412363166750659234L0" }, { "9.174773471390805996L-21", "-0.101196005202611894716L0", "0.10119600520261189472L0" }, { "7.109559498077443181L-21", "0.9205539164614073537L0", "-0.9205539164614073537L0" }, { "4.698785699006337068L-21", "-2.1800327611972026394L9", "2.1800327611972026394L9" }, { "5.613624265510662971L-21", "-9.950548243828975189L9", "9.950548243828975189L9" }, { "4.6909741937286841078L-21", "-1.7837781830572891826L9", "1.7837781830572891826L9" }, { "-4.846242463794952647L-21", "-8.0162418694778434667L9", "8.0162418694778434667L9" }, { "2.40959428070040729L-21", "-8.889381116534260471L9", "8.889381116534260471L9" }, { "3.767840665510686708L-21", "-6.5742819327593306936L9", "6.5742819327593306936L9" }, { "-4.2984578582437655097L-21", "-7.11707524430297521L-11", "7.117075243873129424L-11" }, { "-8.2197602823824843314L-21", "5.6157517586290544195L-11", "-5.6157517594510304478L-11" }, { "9.693403466151038911L-21", "-2.4790192993953556532L-11", "2.4790193003646959998L-11" }, { "-1.7473025967684817638L-21", "-6.763791909706180161L-11", "6.763791909531449901L-11" }, { "-4.545821853960128388L-21", "-2.0149758755990572603L-11", "2.0149758751444750749L-11" }, { "-6.727743751498960878L-21", "4.6105155267302345166L-11", "-4.6105155274030088917L-11" }, { "3.1693009676315354841L-21", "-8.292132887357976433L19", "8.292132887357976433L19" }, { "-1.5197222855116101305L-21", "-6.8790212191073234628L19", "6.8790212191073234628L19" }, { "9.221684449614781083L-21", "-5.9085200983462461748L19", "5.9085200983462461748L19" }, { "8.784720275148798145L-21", "-3.507151222326700691L19", "3.507151222326700691L19" }, { "3.824100155304652155L-21", "1.2903444775641864255L19", "-1.2903444775641864255L19" }, { "-1.0750770892330241413L-21", "2.516785805333378789L19", "-2.516785805333378789L19" }, { "-9.607606672669937465L-21", "2.8158700323501294737L-21", "-1.2423476705020066939L-20" }, { "7.9685140548406097L-21", "-1.4252185339263422407L-21", "9.393732588766951941L-21" }, { "-3.1900732903251523987L-21", "1.30212230775860485605L-21", "-4.4921955980837572548L-21" }, { "2.845180721925488069L-21", "9.0340678136597289194L-21", "-6.1888870917342408505L-21" }, { "-5.1500491616497403683L-21", "-5.4818765813663490764L-21", "3.3182741971660870814L-22" }, { "5.3946808417918276896L-21", "2.1630450195342998269L-21", "3.2316358222575278627L-21" }, }; cln-1.3.3/tests/test_MI.cc0000644000000000000000000000137411201634741012201 0ustar #include #include "base/cl_macros.h" extern int test_MI_canonhom (int iterations); extern int test_MI_plus (int iterations); extern int test_MI_minus (int iterations); extern int test_MI_mul (int iterations); extern int test_MI_recip (int iterations); extern int test_MI_div (int iterations); extern int test_MI_expt (int iterations); #define RUN(tester,iterations) \ std::cout << "Testing "#tester"..." << std::endl; \ error |= tester (iterations); int test_MI (int iterations) { int error = 0; RUN(test_MI_canonhom,iterations); RUN(test_MI_plus,iterations); RUN(test_MI_minus,iterations); RUN(test_MI_mul,iterations); RUN(test_MI_recip,iterations); RUN(test_MI_div,iterations); RUN(test_MI_expt,ceiling(iterations,20)); return error; } cln-1.3.3/tests/timeRALFdiv.cc0000644000000000000000000000220611201634741012736 0ustar #include #include #include #include #include "float/lfloat/cl_LF.h" #include #include #include #include #include #include #include using namespace cln; using namespace std; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 4) exit(1); cl_I m1 = cl_I(argv[1]); cl_I M1 = (cl_I)1 << (intDsize*m1); cl_I m2 = cl_I(argv[2]); cl_I M2 = (cl_I)1 << (intDsize*m2); uintL m3 = atoi(argv[1]); cl_I u; cl_I v; do { u = random_I(M1); } while (zerop(u)); do { v = random_I(M2); } while (zerop(v) || gcd(u,v) > 1); cl_RA x = u / v; cl_LF y = The(cl_LF)(random_F(cl_I_to_LF(1,m3))); cl_F p; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = The(cl_LF)(cl_I_LF_div(u,The(cl_LF)(cl_LF_I_mul(y,v)))); } } cout << p << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = cl_RA_to_LF(x,TheLfloat(y)->len) / y; } } cout << p << endl; } cln-1.3.3/tests/test_I_logxor.cc0000644000000000000000000000131611201634740013451 0ustar #include "test_I.h" int test_I_logxor (int iterations) { int error = 0; int i; // Check commutativity. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); ASSERT2(logxor(a,b) == logxor(b,a), a,b); } // Check associativity. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); cl_I c = testrandom_I(); ASSERT3(logxor(logxor(a,b),c) == logxor(a,logxor(b,c)), a,b,c); } // Check special cases 0 and -1. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); ASSERT1(logxor(a,0) == a, a); ASSERT1(logxor(a,a) == 0, a); ASSERT1(logxor(a,-1) == lognot(a), a); ASSERT1(logxor(a,lognot(a)) == -1, a); } return error; } cln-1.3.3/tests/timeeuler.cc0000644000000000000000000000413511201634741012626 0ustar #include #include #include #include #include #include #include #include #include "float/lfloat/cl_LF.h" namespace cln { // FIXME: don't use internal functions. extern cl_LF compute_eulerconst (uintC len); extern cl_LF compute_eulerconst_expintegral (uintC len); extern cl_LF compute_eulerconst_expintegral1 (uintC len); extern cl_LF compute_eulerconst_expintegral2 (uintC len); extern cl_LF compute_eulerconst_besselintegral1 (uintC len); extern cl_LF compute_eulerconst_besselintegral2 (uintC len); extern cl_LF compute_eulerconst_besselintegral3 (uintC len); extern cl_LF compute_eulerconst_besselintegral4 (uintC len); } using namespace cln; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); uintL len = atoi(argv[1]); cl_LF p; ln(cl_I_to_LF(1000,len+10)); // fill cache #if 0 { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_eulerconst(len); } } #else #if 0 { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_eulerconst_expintegral(len); } } // cout << p << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_eulerconst_expintegral1(len); } } // cout << p << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_eulerconst_expintegral2(len); } } // cout << p << endl; #endif { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_eulerconst_besselintegral1(len); } } // cout << p << endl; #if 0 { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_eulerconst_besselintegral2(len); } } // cout << p << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_eulerconst_besselintegral3(len); } } // cout << p << endl; #endif { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_eulerconst_besselintegral4(len); } } // cout << p << endl; #endif } cln-1.3.3/tests/test_I_ash.cc0000644000000000000000000000200211201634740012703 0ustar #include "test_I.h" int test_I_ash (int iterations) { int error = 0; int i; // Check against "*" and floor1. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); uintL b = random32() % 1024; cl_I pow2 = 1; for (uintL j = 0; j < b; j++) pow2 = pow2+pow2; ASSERT1(ash(1,(sintL)b) == pow2, b); ASSERT1(ash(1,(cl_I)b) == pow2, b); ASSERT2(ash(a,(sintL)b) == a*pow2, a,b); ASSERT2(ash(a,-(sintL)b) == floor1(a,pow2), a,b); } // Check homomorphism w.r.t. second argument. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); sintL b = random32() % 1024; sintL c = random32() % 1024; ASSERT3(ash(ash(a,b),c) == ash(a,b+c), a,b,c); ASSERT3(ash(ash(a,b),-c) == ash(a,b-c), a,b,c); ASSERT3(ash(ash(a,-b),-c) == ash(a,-b-c), a,b,c); } // Check against each other. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); uintL b = random32() % 1024; ASSERT2(ash(a,(cl_I)b) == ash(a,(sintL)b), a,b); ASSERT2(ash(a,-(cl_I)b) == ash(a,-(sintL)b), a,b); } return error; } cln-1.3.3/tests/test_I_ilength.cc0000644000000000000000000000103711201634740013571 0ustar #include "test_I.h" int test_I_integer_length (int iterations) { int error = 0; int i; // Check against ash. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); uintC l = integer_length(a); if (a >= 0) { int b = 0; if (a < ash(1,l)) { if (a == 0) b = (l == 0); else b = (l > 0 && a >= ash(1,l-1)); } ASSERT1(b, a); } else { int b = 0; if (a >= ash(-1,l)) { if (a == -1) b = (l == 0); else b = (l > 0 && a < ash(-1,l-1)); } ASSERT1(b, a); } } return error; } cln-1.3.3/tests/exam_SF_div.cc0000644000000000000000000001521711201634740013021 0ustar #include "exam.h" #include #include static div_test sfloat_div_tests[] = { { "0.4319s0", "0.279747s0", "1.5439s0" }, { "0.58111s0", "0.474937s0", "1.22354s0" }, { "0.95817s0", "-0.209396s0", "-4.57587s0" }, { "-0.30497s0", "-0.182861s0", "1.66777s0" }, { "-0.69316s0", "-0.32908s0", "2.10635s0" }, { "-0.87152s0", "0.518326s0", "-1.68141s0" }, { "-0.81208s0", "3.27736s9", "-2.47784s-10" }, { "0.88465s0", "2.15492s9", "4.10527s-10" }, { "-0.96446s0", "8.0971s9", "-1.19112s-10" }, { "-0.65258s0", "-3.98033s9", "1.6395s-10" }, { "0.663826s0", "-7.88726s8", "-8.41645s-10" }, { "-0.31185s0", "4.1015s9", "-7.6033s-11" }, { "-0.89607s0", "-3.887s-14", "2.3053s13" }, { "-0.670135s0", "-5.027s-14", "1.33306s13" }, { "0.94663s0", "-6.153s-14", "-1.5385s13" }, { "-0.76772s0", "4.033s-14", "-1.90358s13" }, { "-0.446358s0", "-1.9017s-13", "2.34713s12" }, { "-0.157814s0", "-2.0401s-13", "7.73555s11" }, { "0.636185s0", "-3.78516s19", "-1.68073s-20" }, { "-0.90556s0", "7.7192s19", "-1.17314s-20" }, { "0.85053s0", "8.3134s19", "1.02309s-20" }, { "-0.3058s0", "3.00674s19", "-1.01705s-20" }, { "0.219429s0", "-8.1184s19", "-2.70286s-21" }, { "0.319603s0", "-2.0739s19", "-1.54106s-20" }, { "0.58943s0", "-5.280s-24", "-1.11635s23" }, { "0.72955s0", "7.852s-24", "9.2914s22" }, { "-0.66327s0", "-3.124s-24", "2.12315s23" }, { "-0.0137558s0", "-7.918s-24", "1.73729s21" }, { "0.35823s0", "5.467s-24", "6.55263s22" }, { "0.93861s0", "9.968s-24", "9.4163s22" }, { "3.83346s9", "0.99782s0", "3.84185s9" }, { "8.7033s9", "-0.81822s0", "-1.06369s10" }, { "3.52326s8", "-0.79994s0", "-4.4044s8" }, { "8.0525s9", "-0.91803s0", "-8.7715s9" }, { "-2.12784s9", "-0.761246s0", "2.7952s9" }, { "1.18805s9", "-0.903534s0", "-1.3149s9" }, { "-6.50556s9", "-5.4642s9", "1.19058s0" }, { "3.3333s8", "1.8341s8", "1.81738s0" }, { "3.70934s9", "9.1957s8", "4.03375s0" }, { "-8.0459s9", "4.5511s9", "-1.76791s0" }, { "3.54982s9", "4.6631s8", "7.6126s0" }, { "-6.27016s9", "-3.42858s9", "1.8288s0" }, { "-4.3213s9", "7.223s-15", "-5.98274s23" }, { "-2.57753s9", "-2.533s-15", "1.01759s24" }, { "3.8858s9", "-4.505s-14", "-8.6256s22" }, { "3.5946s9", "-5.067s-14", "-7.0941s22" }, { "2.94434s9", "8.333s-14", "3.53333s22" }, { "5.6178s9", "-8.241s-14", "-6.81694s22" }, { "4.9591s8", "3.9972s19", "1.24064s-11" }, { "2.4166s9", "-9.2141s19", "-2.62272s-11" }, { "-1.484s9", "2.0281s19", "-7.3172s-11" }, { "2.2339s8", "1.96374s19", "1.13758s-11" }, { "-6.6306s9", "-2.414s19", "2.7467s-10" }, { "9.9114s9", "9.6187s19", "1.03043s-10" }, { "4.4579s9", "5.343s-24", "8.3434s32" }, { "-6.35994s9", "-6.301s-24", "1.00936s33" }, { "5.49677s9", "-1.9306s-25", "-2.84717s34" }, { "-5.007s9", "3.692s-24", "-1.35617s33" }, { "8.6837s9", "-1.6358s-23", "-5.3085s32" }, { "5.5898s9", "-5.435s-24", "-1.02849s33" }, { "-5.042s-14", "0.79081s0", "-6.3758s-14" }, { "-6.231s-14", "0.96946s0", "-6.4273s-14" }, { "6.016s-14", "0.418983s0", "1.43587s-13" }, { "-1.1682s-13", "0.70944s0", "-1.64663s-13" }, { "-1.7485s-13", "0.83207s0", "-2.1014s-13" }, { "7.831s-15", "-0.083374s0", "-9.3926s-14" }, { "3.947s-14", "9.2342s9", "4.2744s-24" }, { "-1.1537s-13", "-6.44075s9", "1.79124s-23" }, { "6.751s-14", "5.8395s8", "1.1561s-22" }, { "-5.026s-14", "7.9677s9", "-6.308s-24" }, { "-1.0105s-13", "-1.71082s9", "5.9066s-23" }, { "-4.996s-14", "9.426s9", "-5.30024s-24" }, { "-6.837s-14", "-3.573s-14", "1.91351s0" }, { "-7.736s-14", "-4.898s-14", "1.57942s0" }, { "3.777s-14", "8.025s-14", "0.470657s0" }, { "-6.239s-14", "8.518s-15", "-7.32446s0" }, { "-7.548s-15", "-4.573s-14", "0.165056s0" }, { "1.6293s-14", "4.712s-14", "0.345776s0" }, { "-4.47s-14", "2.73658s19", "-1.63342s-33" }, { "1.0583s-13", "2.52534s19", "4.19073s-33" }, { "4.351s-15", "2.70326s19", "1.60955s-34" }, { "3.699s-14", "-6.00707s19", "-6.1577s-34" }, { "6.358s-14", "5.18274s19", "1.22677s-33" }, { "-2.971s-14", "6.153s19", "-4.8286s-34" }, { "-4.968s-14", "7.699s-24", "-6.4528s9" }, { "-3.654s-14", "8.434s-24", "-4.3325s9" }, { "-9.276s-14", "-7.079s-24", "1.31035s10" }, { "-4.556s-14", "1.3900s-23", "-3.27772s9" }, { "3.832s-14", "1.55715s-22", "2.4609s8" }, { "1.4186s-13", "1.64482s-21", "8.6246s7" }, { "-7.0974s19", "-0.705536s0", "1.00596s20" }, { "-7.687s19", "-0.241531s0", "3.1826s20" }, { "3.37013s19", "-0.425987s0", "-7.9114s19" }, { "6.56473s19", "-0.60696s0", "-1.08158s20" }, { "4.1598s19", "0.60135s0", "6.9175s19" }, { "8.8312s19", "0.93547s0", "9.4404s19" }, { "2.81357s19", "-2.62832s9", "-1.07048s10" }, { "5.9243s19", "-4.5189s8", "-1.311s11" }, { "-8.3887s19", "9.5761s9", "-8.7601s9" }, { "7.7606s19", "-8.5369s9", "-9.0906s9" }, { "-7.9868s19", "5.0173s9", "-1.59186s10" }, { "7.4128s19", "-6.7781s9", "-1.09364s10" }, { "1.27472s19", "1.1699s-13", "1.0896s32" }, { "2.97578s19", "4.448s-14", "6.6901s32" }, { "7.19416s19", "1.3834s-13", "5.20034s32" }, { "6.61843s19", "-4.268s-14", "-1.55071s33" }, { "2.8579s19", "4.364s-14", "6.5488s32" }, { "8.2451s18", "-6.532s-14", "-1.26227s32" }, { "4.63364s19", "9.4305s19", "0.491344s0" }, { "-1.81999s19", "1.05424s19", "-1.72636s0" }, { "-1.41579s19", "-4.03517s19", "0.350864s0" }, { "-1.88523s18", "-3.3165s18", "0.568436s0" }, { "8.4152s17", "-7.3293s19", "-0.0114815s0" }, { "-8.674s19", "-3.63595s19", "2.38562s0" }, { "-1.64643s-22", "0.78035s0", "-2.10986s-22" }, { "-7.455s-24", "-0.63174s0", "1.18009s-23" }, { "-3.259s-24", "-0.89363s0", "3.64694s-24" }, { "1.5803s-23", "-0.11338s0", "-1.39382s-22" }, { "-3.534s-24", "0.407562s0", "-8.6711s-24" }, { "-7.221s-24", "0.90274s0", "-7.999s-24" }, { "1.0479s-23", "5.66256s8", "1.85059s-32" }, { "1.62856s-21", "-1.9551s9", "-8.3298s-31" }, { "-8.102s-24", "9.7896s9", "-8.2761s-34" }, { "9.693s-24", "-8.777s9", "-1.10437s-33" }, { "8.643s-24", "-1.25557s9", "-6.8837s-33" }, { "3.224s-24", "9.8161s9", "3.2844s-34" }, { "1.06582s-21", "-1.0408s-13", "-1.02405s-8" }, { "1.6738s-23", "9.851s-14", "1.69914s-10" }, { "-1.1514s-23", "-6.509s-14", "1.76893s-10" }, { "9.171s-24", "9.292s-14", "9.8698s-11" }, { "1.8589s-23", "-4.213s-14", "-4.4123s-10" }, { "1.2837s-23", "1.1034s-13", "1.16341s-10" }, { "3.671s-24", "1.0091s-23", "0.363792s0" }, { "-3.373s-24", "-1.7017s-23", "0.198214s0" }, { "-2.0157s-23", "1.0021s-23", "-2.01147s0" }, { "8.041s-24", "-1.3974s-23", "-0.575424s0" }, { "-5.391s-24", "1.1762s-23", "-0.458344s0" }, { "1.7735s-23", "-3.313s-24", "-5.3531s0" }, }; cln-1.3.3/tests/test_nt.h0000644000000000000000000000014311201634741012150 0ustar #include #include #include #include "test.h" cln-1.3.3/tests/test_I_ldbtest.cc0000644000000000000000000000051111201634740013574 0ustar #include "test_I.h" int test_I_ldb_test (int iterations) { int error = 0; int i; // Check against ash. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); sintL s = random32() % 1024; sintL p = random32() % 1024; ASSERT3(ldb_test(a,cl_byte(s,p)) == logtest(ash(a,-p),ash(1,s)-1), a,s,p); } return error; } cln-1.3.3/tests/exam_DF_floor.cc0000644000000000000000000003304011201634740013333 0ustar #include "exam.h" #include #include #include #include static floor_test dfloat_floor_tests[] = { { "0.6173351962722496d0", "-0.11820538775792844d0", "-6", "-0.09189713027532098d0" }, { "-0.17517225806171177d0", "0.1118228341753209d0", "-2", "0.04847341028893004d0" }, { "-0.9387909021047899d0", "-0.16826318310698907d0", "5", "-0.09747498656984459d0" }, { "0.8036728904567848d0", "0.6774308237913269d0", "1", "0.1262420666654578d0" }, { "0.6882568422881421d0", "0.3302150266778784d0", "2", "0.02782678893238538d0" }, { "0.3618917435888378d0", "0.5454396894763598d0", "0", "0.3618917435888378d0" }, { "-0.478470818234076d0", "9.035797971846054d9", "-1", "9.035797971367584d9" }, { "0.6423779722022549d0", "2.0589504447793393d9", "0", "0.6423779722022549d0" }, { "0.21698095744051404d0", "1.570908384361449d9", "0", "0.21698095744051404d0" }, { "0.24033995915823747d0", "6.968395233824382d9", "0", "0.24033995915823747d0" }, { "-0.8531247643149816d0", "-5.299783511441018d9", "0", "-0.8531247643149817d0" }, { "-0.5134978162655872d0", "2.297671112225289d9", "-1", "2.297671111711791d9" }, { "0.6192405432591311d0", "5.4403538407469436d-11", "11382357864", "3.744539199218032d-11" }, { "-0.20340731452742233d0", "5.44351944436815d-12", "-37366875715", "2.4681729170135434d-12" }, { "-0.29394735220898527d0", "-3.6328318262890404d-12", "80914109505", "-3.3847154436219604d-12" }, { "-0.8359336184185098d0", "6.064791537508077d-11", "-13783385847", "1.2432123964511977d-11" }, { "-0.9762544843227843d0", "2.2086465633336306d-11", "-44201480696", "1.1997821346734454d-11" }, { "-0.2919696169517234d0", "6.922295436251983d-11", "-4217815025", "3.3402028237741715d-11" }, { "0.9452118035872986d0", "-1.1093667270485797d19", "-1", "-1.1093667270485797d19" }, { "0.3379784391207531d0", "-3.0106029588222304d19", "-1", "-3.0106029588222304d19" }, { "0.3907483945162724d0", "-9.823409070968835d19", "-1", "-9.823409070968835d19" }, { "-0.4293216868359586d0", "5.965415751655242d19", "-1", "5.965415751655242d19" }, { "0.13727607148241305d0", "-8.310631671228052d19", "-1", "-8.310631671228052d19" }, { "-0.7478116595122868d0", "7.235991436975452d19", "-1", "7.235991436975452d19" }, { "-0.9425796643098138d0", "-1.7749544068364875d-21", "531044437355311857664", "0.0d0" }, { "0.20835281321620536d0", "2.7983277403481253d-21", "74456186890490986496", "0.0d0" }, { "-0.5404541167071248d0", "9.266841531614177d-22", "-583212861537931100160", "0.0d0" }, { "-0.06796825059990208d0", "-6.350644782153893d-21", "10702574767038046208", "0.0d0" }, { "0.30647600932087793d0", "-9.704243038852408d-21", "-31581650221851901952", "0.0d0" }, { "-0.7939481974521416d0", "-7.44148349933678d-21", "106692193501860495360", "0.0d0" }, { "2.622471924924206d9", "0.3428958732728865d0", "7648012499", "0.2776496600055352d0" }, { "9.96303133513731d9", "-0.6839887200892081d0", "-14566075496", "-0.09450688719173875d0" }, { "9.438132647041376d8", "-0.9350840745499996d0", "-1009335193", "-0.15301271996267998d0" }, { "-5.031281076435459d9", "0.8566679205528436d0", "-5873082155", "0.5244045303768723d0" }, { "-9.504293159523993d9", "-0.17779074115973026d0", "53457750935", "-0.058079864158457416d0" }, { "5.593337221858664d8", "0.6365106532159245d0", "878749977", "0.3121177083383602d0" }, { "-9.849085830660753d9", "5.465582064164139d9", "-2", "1.0820782976675239d9" }, { "6.254242990207708d9", "1.9986128256161973d9", "3", "2.5840451335911673d8" }, { "-9.644949290710447d9", "3.677515142398587d9", "-3", "1.3875961364853137d9" }, { "9.966654669106707d9", "3.622741134738514d9", "2", "2.7211723996296782d9" }, { "-7.024110605080818d9", "-1.3131548351819434d9", "5", "-4.583364291711011d8" }, { "-4.5982831731090415d8", "-4.587607917895467d9", "0", "-4.5982831731090415d8" }, { "6.779683583609543d9", "-8.732134194560264d-11", "-77640625218895380480", "0.0d0" }, { "3.040910010354103d8", "-6.386892985922651d-11", "-4761172634419539968", "0.0d0" }, { "-9.081490496057175d9", "-8.389512916135551d-11", "108248125807050637312", "0.0d0" }, { "-2.3391140718625803d9", "4.078343101769488d-11", "-57354519065541566464", "0.0d0" }, { "9.740679130260033d9", "-4.1307299498162d-11", "-235810117064018001920", "0.0d0" }, { "4.630742761978566d9", "-8.36053471494181d-11", "-55388117146413842432", "0.0d0" }, { "6.607827158404311d8", "1.9791074337467208d19", "0", "6.607827158404311d8" }, { "1.5835379695092866d9", "-5.599741962857091d19", "-1", "-5.599741962698737d19" }, { "-9.972337740404726d9", "-1.4833907125668299d19", "0", "-9.972337740404726d9" }, { "-2.8545208802037845d9", "5.460276762513134d19", "-1", "5.4602767622276825d19" }, { "3.4574292483978963d9", "8.177006210253868d19", "0", "3.4574292483978963d9" }, { "-6.94800692720856d9", "5.400944544004402d19", "-1", "5.400944543309601d19" }, { "2.2301147741459103d9", "4.352417825189536d-22", "5123852680777023531125296857088", "0.0d0" }, { "2.855798499915275d9", "-2.1597757039453335d-21", "-1322266240285272897749142994944", "0.0d0" }, { "6.247757812861889d9", "-8.000803060408911d-21", "-780891338743010366964468023296", "0.0d0" }, { "-8.41352264607702d8", "2.4583479152659926d-21", "-342242958933120698647142465536", "0.0d0" }, { "9.08798064415713d9", "-4.6826703076651156d-21", "-1940768844921862497464005689344", "0.0d0" }, { "-2.450923950975804d9", "-8.516681149015905d-21", "287779230910741073293637320704", "0.0d0" }, { "-6.535114995775952d-11", "-0.4217447234387455d0", "0", "-6.535114995775952d-11" }, { "6.91351782048677d-13", "-0.8578740601420116d0", "-1", "-0.8578740601413203d0" }, { "-9.879448244992307d-11", "-0.6016918305263045d0", "0", "-9.879448244992307d-11" }, { "7.820572196574365d-11", "-0.8508242256358738d0", "-1", "-0.8508242255576681d0" }, { "-4.4420680878896835d-11", "0.6509799475016377d0", "-1", "0.650979947457217d0" }, { "-8.35377304874932d-11", "-0.7623592484047194d0", "0", "-8.35377304874932d-11" }, { "-4.697219220983554d-11", "-2.0199834401398075d9", "0", "-4.697219220983554d-11" }, { "4.027899822164905d-11", "-3.0043885624092436d8", "-1", "-3.0043885624092436d8" }, { "-9.473748837497406d-11", "-6.081705720880249d8", "0", "-9.473748837497406d-11" }, { "-6.257060775257221d-11", "4.479345462936419d9", "-1", "4.479345462936419d9" }, { "-4.076402998599221d-11", "3.0379052042471523d9", "-1", "3.0379052042471523d9" }, { "3.2516054170046405d-11", "9.075782126517027d9", "0", "3.2516054170046405d-11" }, { "7.77186165285192d-12", "-7.011585244893556d-11", "-1", "-6.234399079608364d-11" }, { "-4.129939073543463d-11", "-4.398862671531905d-11", "0", "-4.129939073543463d-11" }, { "-4.986332353670153d-11", "4.056354917830567d-11", "-2", "3.126377481990981d-11" }, { "-6.358815251785654d-11", "3.044610839789864d-11", "-3", "2.7750172675839383d-11" }, { "-1.5218538547762808d-11", "-4.9239841620755075d-11", "0", "-1.5218538547762808d-11" }, { "-3.714719523899548d-11", "-3.338962509681127d-11", "1", "-3.757570142184203d-12" }, { "-3.7559900032627426d-11", "-7.103620895893612d19", "0", "-3.7559900032627426d-11" }, { "3.442771371655891d-11", "3.2650979291930292d19", "0", "3.442771371655891d-11" }, { "-8.026236668129701d-11", "-7.030175018925641d19", "0", "-8.026236668129701d-11" }, { "4.0245932625540036d-11", "9.919022649131396d19", "0", "4.0245932625540036d-11" }, { "6.558019989897738d-11", "9.805879474847002d19", "0", "6.558019989897738d-11" }, { "-8.950419173616613d-11", "7.8967335533488d19", "-1", "7.8967335533488d19" }, { "-4.2555105814142415d-11", "-7.367149245343951d-22", "57763327980", "-5.012024424412273d-22" }, { "-7.125466497249949d-11", "-9.625683307253578d-21", "7402556545", "-6.2922712544984485d-21" }, { "8.076311292972551d-11", "5.7198456178965606d-21", "14119806429", "1.262169607592943d-21" }, { "-7.024787982764915d-11", "1.5125149703168537d-21", "-46444419531", "6.648179051963393d-22" }, { "2.3153240875994985d-11", "-1.5025822462858028d-21", "-15408967419", "-1.3907844732195436d-21" }, { "9.445189938981536d-11", "-1.8886893988697117d-21", "-50009228329", "-8.218058303553574d-22" }, { "-8.982223463756733d19", "0.20677548795071854d0", "-434394983311440412672", "0.0d0" }, { "-2.6872844858317455d19", "0.00946240694180256d0", "-2839958693765316083712", "0.0d0" }, { "-9.566658458393646d19", "-0.38847162936974444d0", "246264018659858710528", "0.0d0" }, { "-4.235085548018657d19", "-0.06527446136754045d0", "648812025299173376000", "0.0d0" }, { "2.8443413501845017d19", "-0.04996947402848739d0", "-569215787335074643968", "0.0d0" }, { "-4.484750058861429d19", "-0.2338784192921971d0", "191755616975433072640", "0.0d0" }, { "-2.986802109112903d19", "5.923385648786668d9", "-5042390090", "3.561083576852057d9" }, { "8.088567504347222d18", "9.070536452627407d9", "891740807", "8.158341046664973d9" }, { "-3.09688480137261d19", "-6.508291621550677d9", "4758368219", "-1.75538588669977d9" }, { "4.226418080435591d19", "7.892147197133178d9", "5355219530", "6.335538696917366d8" }, { "1.4013831972690205d19", "-2.4924246236187544d9", "-5622570023", "-6.556610185422871d8" }, { "6.1838203826708914d19", "8.941814127664919d9", "6915621700", "8.062833976289089d9" }, { "-6.916774706038343d18", "3.120694095597196d-11", "-221642189018039718512504602624", "0.0d0" }, { "9.435687674071892d19", "-3.149833308668829d-11", "-2995614926067172775889444274176", "0.0d0" }, { "-6.212546775235241d19", "3.239266009361982d-11", "-1917887187183768183263136317440", "0.0d0" }, { "4.749482734068419d19", "-5.5235623432819116d-11", "-859858627258009608103722483712", "0.0d0" }, { "3.0587261660909548d19", "4.4929685621578874d-11", "680780674018761986414328414208", "0.0d0" }, { "4.141754743467259d19", "5.235000122629564d-11", "791166121575339566219965497344", "0.0d0" }, { "-1.2481803107227873d19", "7.39878580568375d18", "-2", "2.3157685041396265d18" }, { "-1.5884453212818639d19", "-8.336283910718495d19", "0", "-1.5884453212818639d19" }, { "5.000368279611168d19", "-5.031778160332162d19", "-1", "-3.1409880720993677d17" }, { "-3.6360612893747024d19", "4.7875734964388405d19", "-1", "1.1515122070641383d19" }, { "2.357251757890727d19", "-4.493498319637942d19", "-1", "-2.136246561747215d19" }, { "5.0747068626287395d19", "8.591364094011977d19", "0", "5.0747068626287395d19" }, { "2.1440483442615423d19", "9.668454918695627d-21", "2217570813838780736509865871750106972160", "0.0d0" }, { "8.818664212173065d19", "-8.186497379734964d-21", "-10772206724212702608743560617665161592832", "0.0d0" }, { "-7.376250633760416d19", "-6.382238421048869d-21", "11557466435965877316178494055246213414912", "0.0d0" }, { "-4.374244855009332d19", "3.864539687646209d-21", "-11318928536282082575630148538694692241408", "0.0d0" }, { "7.578656580690454d19", "9.103502086399884d-22", "83249902166909342613269419960118328426496", "0.0d0" }, { "5.759312769216988d19", "-9.830658049049094d-21", "-5858522125865295462884970652182979280896", "0.0d0" }, { "-7.091696063135083d-21", "0.3220521420236615d0", "-1", "0.3220521420236615d0" }, { "-7.472975994693659d-21", "-0.06404310380828848d0", "0", "-7.472975994693657d-21" }, { "2.2994935284804662d-21", "0.8294627436562217d0", "0", "2.2994935284804662d-21" }, { "-6.098532726052559d-21", "-0.5103342535054871d0", "0", "-6.098532726052559d-21" }, { "-7.8237727943808d-21", "0.20193503990844952d0", "-1", "0.20193503990844952d0" }, { "-5.357065560054238d-21", "0.535324456368991d0", "-1", "0.535324456368991d0" }, { "8.67862366495009d-23", "5.869284875063336d9", "0", "8.67862366495009d-23" }, { "-3.913399519946995d-21", "4.645302733766437d9", "-1", "4.645302733766437d9" }, { "6.256033435453117d-21", "3.5904533516671333d9", "0", "6.2560334354531166d-21" }, { "-7.970558626381476d-21", "4.548434922363557d9", "-1", "4.548434922363557d9" }, { "7.442840440717647d-21", "-3.3266294818989463d9", "-1", "-3.3266294818989463d9" }, { "-4.6732789449833775d-21", "5.614289998802058d8", "-1", "5.614289998802058d8" }, { "7.136201304639634d-21", "-1.152382297069954d-12", "-1", "-1.1523822899337527d-12" }, { "-7.575364316308001d-21", "-4.790622052171537d-11", "0", "-7.575364316308001d-21" }, { "9.212759331893804d-21", "-6.41398602124991d-11", "-1", "-6.413986020328634d-11" }, { "-1.9103188467401064d-21", "-5.1860189481412404d-11", "0", "-1.9103188467401064d-21" }, { "-4.473075242507236d-21", "2.3036197131739102d-11", "-1", "2.303619712726603d-11" }, { "5.138595152941494d-21", "2.9424719822474346d-11", "0", "5.138595152941494d-21" }, { "-5.137698996313833d-22", "2.2468745456943227d19", "-1", "2.2468745456943227d19" }, { "-7.229848882029144d-21", "-3.031606285079872d19", "0", "-7.229848882029144d-21" }, { "-6.85451854164106d-21", "1.7676693722776926d19", "-1", "1.7676693722776926d19" }, { "5.372223270507929d-21", "-7.439745956384552d19", "-1", "-7.439745956384552d19" }, { "5.598138480271164d-21", "5.149401801116799d19", "0", "5.598138480271163d-21" }, { "9.285618896860432d-21", "6.546424273112694d19", "0", "9.285618896860432d-21" }, { "7.511556502656318d-21", "4.2351039143592516d-21", "1", "3.2764525882970666d-21" }, { "6.050106800286075d-21", "-1.187392681676287d-21", "-6", "-1.0742492897716469d-21" }, { "4.274671258683056d-21", "8.647095729321104d-21", "0", "4.274671258683056d-21" }, { "7.344809600387072d-21", "6.305446958850813d-21", "1", "1.039362641536258d-21" }, { "9.753544125648588d-21", "9.227661371269332d-21", "1", "5.258827543792571d-22" }, { "-7.227362780459908d-21", "-6.70179577363263d-21", "1", "-5.255670068272766d-22" }, }; cln-1.3.3/tests/timegcd.cc0000644000000000000000000000127611201634741012252 0ustar #include #include #include #include #include #include #include using namespace cln; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); cl_I m1 = cl_I(argv[1]); cl_I M1 = (cl_I)1 << (intDsize*m1); cl_I m2 = (argc>2 ? cl_I(argv[2]) : m1); cl_I M2 = (cl_I)1 << (intDsize*m2); cl_I a = random_I(M1); cl_I b = random_I(M2); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_I g = gcd(a,b); } // { cl_I u; cl_I v; cl_I g = xgcd(a,b,&u,&v); } } } cln-1.3.3/tests/timezeta3.cc0000644000000000000000000000237311201634741012542 0ustar #include #include #include #include #include #include #include #include "float/lfloat/cl_LF.h" namespace cln { // FIXME: don't use internal functions. extern cl_LF zeta (int s, uintC len); extern cl_LF compute_zeta_exp (int s, uintC len); extern cl_LF compute_zeta_cvz1 (int s, uintC len); extern cl_LF compute_zeta_cvz2 (int s, uintC len); extern cl_LF zeta3 (uintC len); } using namespace cln; #include using namespace std; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); uintL len = atoi(argv[1]); cl_LF p; ln(cl_I_to_LF(1000,len+10)); // fill cache { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_zeta_exp(3,len); } } cout << p << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_zeta_cvz1(3,len); } } cout << p << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_zeta_cvz2(3,len); } } cout << p << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = zeta3(len); } } cout << p << endl; } cln-1.3.3/tests/test_I_ldb.cc0000644000000000000000000000047611201634740012706 0ustar #include "test_I.h" int test_I_ldb (int iterations) { int error = 0; int i; // Check against ash. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); sintL s = random32() % 1024; sintL p = random32() % 1024; ASSERT3(ldb(a,cl_byte(s,p)) == logand(ash(a,-p),ash(1,s)-1), a,s,p); } return error; } cln-1.3.3/tests/test_I_div.cc0000644000000000000000000000306511201634740012724 0ustar #include "test_I.h" int test_I_div (int iterations) { int error = 0; int i; // Check floor. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); if (b != 0) { cl_I_div_t qr = floor2(a,b); const cl_I& q = qr.quotient; const cl_I& r = qr.remainder; ASSERT2(a == q*b+r, a,b); ASSERT2(b >= 0 ? (r >= 0 && r < b) : (r <= 0 && r > b), a,b); } } // Check ceiling. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); if (b != 0) { cl_I_div_t qr = ceiling2(a,b); const cl_I& q = qr.quotient; const cl_I& r = qr.remainder; ASSERT2(a == q*b+r, a,b); ASSERT2(b >= 0 ? (r <= 0 && r > -b) : (r >= 0 && r < -b), a,b); } } // Check truncate. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); if (b != 0) { cl_I_div_t qr = truncate2(a,b); const cl_I& q = qr.quotient; const cl_I& r = qr.remainder; ASSERT2(a == q*b+r, a,b); if (b >= 0) if (a >= 0) { ASSERT2(r >= 0 && r < b, a,b); } else { ASSERT2(r <= 0 && r > -b, a,b); } else if (a >= 0) { ASSERT2(r >= 0 && r < -b, a,b); } else { ASSERT2(r <= 0 && r > b, a,b); } } } // Check round. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); if (b != 0) { cl_I_div_t qr = round2(a,b); const cl_I& q = qr.quotient; const cl_I& r = qr.remainder; ASSERT2(a == q*b+r, a,b); ASSERT2(2*abs(r) <= abs(b), a,b); if (2*abs(r) == abs(b)) ASSERT2(evenp(q), a,b); } } return error; } cln-1.3.3/tests/test_I_isqrt.cc0000644000000000000000000000135411201634740013303 0ustar #include "test_I.h" int test_I_isqrt (int iterations) { int error = 0; int i; // Check against "*". for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); if (a >= 0) { cl_I w; bool squarep = isqrt(a,&w); ASSERT1(w >= 0 && expt_pos(w,2) <= a && a < expt_pos(w+1,2), a); ASSERT1(squarep ? w*w==a : w*w 0; i--) { cl_I a = abs(testrandom_I()); cl_I w; // Check a^2 is a square. ASSERT1(isqrt(a*a,&w) && w == a, a); // Check a^2+1 is not a square, except when a=0. ASSERT1((a==0) || (!isqrt(a*a+1,&w) && w == a), a); // Check a^2+2*a is not a square, except when a=0. ASSERT1(isqrt(a*(a+2),&w)==(a==0) && w == a, a); } return error; } cln-1.3.3/tests/timeMImisc5.cc0000644000000000000000000000320411201634741012754 0ustar #include #include #include #include #include #include #include using namespace cln; #include using namespace std; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 1) exit(1); cl_I p = "1269281897404513557783934075031171555202695168107"; cl_modint_ring R = find_modint_ring(p); { cl_MI a = R->canonhom("1111111111111111111111111111111111111111111111111"); cl_MI b = R->canonhom("777777777777777777777777777777777777777777777777"); cout << "product modulo p" << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_MI c = R->mul(a,b); } } cout << "square modulo p" << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_MI c = R->square(a); } } cout << "quotient modulo p" << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_MI c = R->div(a,b); } } } { cl_MI a = R->canonhom("1234567890123456789012345678901234567890123456789"); cl_MI b = R->canonhom("909090909090909090909090909090909090909090909090"); cout << "product modulo p" << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_MI c = R->mul(a,b); } } cout << "square modulo p" << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_MI c = R->square(a); } } cout << "quotient modulo p" << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_MI c = R->div(a,b); } } } } cln-1.3.3/tests/main.cc0000644000000000000000000000523511201634740011560 0ustar //#define WANT_OBFUSCATING_OPERATORS #include #include //#include //#include //#include //#include //#include #include #include //#include //#include #include using namespace cln; #include using namespace std; #define DUMP(expr) \ fprint(cout, #expr" = "); fprint(cout, expr); fprint(cout, "\n"); int main (int argc, char* argv[]) { (void)argc; (void)argv; #if 0 cl_F archimedes = pi((float_format_t)10000); fprint(cout, archimedes); fprint(cout, "\n"); #endif #if 0 cl_FF a; cl_FF x1 = "-0.2173f0"; cl_FF x2 = "5.5084f9"; cl_FF y = "-1.19698f9"; fprint(cout, "x1 = "); print_float_binary(cout,x1); fprint(cout, " = "); fprint(cout,x1); fprint(cout, "\n"); fprint(cout, "x2 = "); print_float_binary(cout,x2); fprint(cout, " = "); fprint(cout,x2); fprint(cout, "\n"); fprint(cout, "y = "); print_float_binary(cout,y); fprint(cout, " = "); fprint(cout,y); fprint(cout, "\n"); cl_FF x = x1*x2; fprint(cout, "x1*x2 = "); print_float_binary(cout,x); fprint(cout, " = "); fprint(cout,x); fprint(cout, "\n"); #endif #if 0 cl_I x = 10; cl_I y = ++x; x *= 2; x++; fprint(cout, "x = "); fprint(cout, x); fprint(cout, "\n"); fprint(cout, "y = "); fprint(cout, y); fprint(cout, "\n"); #endif #if 0 cl_I a = "77371252437321868671713407"; cl_I w; bool squarep = isqrt(a,&w); DUMP(squarep); DUMP(w); DUMP(expt_pos(w,2) <= a); DUMP(a < expt_pos(w+1,2)); #endif #if 0 cl_I m = "79228162513111556826425457664"; cl_I a = "19787815858762768436681494528"; cl_modint_ring R = find_modint_ring(m); cl_I b = R->retract(R->canonhom(a)); cl_I c = mod(a,abs(m)); DUMP(b); DUMP(c); DUMP(b==c); #endif #if 0 cl_N x = argv[1]; cl_N y = sinh(x); { CL_TIMING; y = sinh(x); } cout << y << endl; #endif #if 0 cl_I x = argv[1]; cout << x << " is " << (isprobprime(x) ? "" : "not ") << "prime" << endl; #endif #if 0 float_format_t f = float_format(atoi(argv[1])); extern cl_LF zeta3 (uintC len); uintC len = (uintC)f/intDsize+1; { CL_TIMING; cout << zeta(2,f) << endl; } { CL_TIMING; cout << expt(pi(f),2)/6 << endl; } { CL_TIMING; cout << zeta(3,f) << endl; } { CL_TIMING; cout << zeta3(len) << endl; } { CL_TIMING; cout << zeta(4,f) << endl; } #endif cl_I a = cl_I(argv[1]); cl_I b = cl_I(argv[2]); cl_I u; cl_I v; cl_I g = xgcd(a,b,&u,&v); cout << "a = " << a << endl; cout << "b = " << b << endl; cout << "gcd = " << gcd(a,b) << endl; cout << "g = " << g << endl; cout << "u = " << u << endl; cout << "v = " << v << endl; #if 0 cl_F x = argv[1]; cout << x << endl; #endif } cln-1.3.3/tests/test_I_dpf.cc0000644000000000000000000000063511201634740012713 0ustar #include "test_I.h" int test_I_deposit_field (int iterations) { int error = 0; int i; // Check against ash. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); sintL s = random32() % 1024; sintL p = random32() % 1024; cl_I mask = ash(ash(1,s)-1,p); ASSERT4(deposit_field(a,b,cl_byte(s,p)) == logxor(logand(a,mask),logandc2(b,mask)), a,s,p,b); } return error; } cln-1.3.3/tests/exam_SF_floor.cc0000644000000000000000000002011411201634740013350 0ustar #include "exam.h" #include #include #include #include static floor_test sfloat_floor_tests[] = { { "-0.403114s0", "0.64293s0", "-1", "0.239813s0" }, { "-0.538574s0", "0.74157s0", "-1", "0.202993s0" }, { "0.59919s0", "-0.433258s0", "-2", "-0.26733s0" }, { "-0.62148s0", "-0.185875s0", "3", "-0.063861s0" }, { "0.298317s0", "-0.79534s0", "-1", "-0.49703s0" }, { "0.84822s0", "9.519s9", "0", "0.84822s0" }, { "0.185059s0", "-4.4452s9", "-1", "-4.4452s9" }, { "-0.442635s0", "-4.64486s9", "0", "-0.442635s0" }, { "0.78401s0", "-8.4401s9", "-1", "-8.4401s9" }, { "0.300156s0", "-4.4083s9", "-1", "-4.4083s9" }, { "0.67763s0", "2.54755s9", "0", "0.67763s0" }, { "-0.189995s0", "-1.9236s-13", "987708260352", "0.0s0" }, { "0.442696s0", "-4.184s-15", "-105806519336960", "0.0s0" }, { "0.175987s0", "-5.055s-15", "-34814468030464", "0.0s0" }, { "0.30565s0", "-4.296s-14", "-7114747543552", "0.0s0" }, { "0.256264s0", "4.541s-14", "5643318591488", "0.0s0" }, { "-0.51656s0", "4.057s-14", "-12732698984448", "0.0s0" }, { "-0.221672s0", "-5.9783s19", "0", "-0.221672s0" }, { "-0.441925s0", "-8.1227s19", "0", "-0.441925s0" }, { "0.73287s0", "-3.99683s19", "-1", "-3.99683s19" }, { "-0.376198s0", "9.1146s19", "-1", "9.1146s19" }, { "0.61628s0", "-5.83824s19", "-1", "-5.83824s19" }, { "-0.072037s0", "4.40705s19", "-1", "4.40705s19" }, { "0.378708s0", "3.258s-24", "116238699015966918967296", "0.0s0" }, { "0.98937s0", "-7.698s-24", "-128524230569057480343552", "0.0s0" }, { "-0.94075s0", "-1.0053s-23", "93579179764423948500992", "0.0s0" }, { "0.263123s0", "-3.060s-24", "-85988344578092468011008", "0.0s0" }, { "-0.58892s0", "-1.1106s-23", "53027471682887319814144", "0.0s0" }, { "-0.38977s0", "-2.812s-24", "138609987891358177689600", "0.0s0" }, { "-1.46599s9", "0.338676s0", "-4328587264", "0.0s0" }, { "-6.326s9", "0.91743s0", "-6895370240", "0.0s0" }, { "-3.63617s9", "-0.569855s0", "6380847104", "0.0s0" }, { "-1.45737s9", "0.9508s0", "-1532788736", "0.0s0" }, { "5.24714s9", "0.45768s0", "11464605696", "0.0s0" }, { "8.1693s9", "0.69472s0", "11759255552", "0.0s0" }, { "-2.7664s9", "-1.9246s9", "1", "-8.418s8" }, { "8.29057s9", "-7.18694s9", "-2", "-6.0833s9" }, { "6.7409s9", "8.9158s9", "0", "6.7409s9" }, { "9.4039s9", "-1.80932s9", "-6", "-1.45206s9" }, { "4.4432s9", "-7.587s9", "-1", "-3.14373s9" }, { "-4.8365s9", "-3.4401s8", "14", "-2.03249s7" }, { "4.70575s9", "2.813s-15", "1672861433068424397848576", "0.0s0" }, { "8.37706s8", "1.1696s-13", "7162308674587923054592", "0.0s0" }, { "4.9421s9", "3.384s-15", "1460410281571511491887104", "0.0s0" }, { "9.4391s8", "6.964s-14", "13554177553722320617472", "0.0s0" }, { "3.56217s8", "3.380s-14", "10538999588799264063488", "0.0s0" }, { "7.53166s9", "7.011s-14", "107426919956256787529728", "0.0s0" }, { "-5.3385s9", "-7.8903s19", "0", "-5.3385s9" }, { "-5.5786s8", "-6.5112s19", "0", "-5.5786s8" }, { "-7.0502s9", "-2.57187s18", "0", "-7.0502s9" }, { "3.48724s9", "3.0864s19", "0", "3.48724s9" }, { "-1.195s9", "6.9068s19", "-1", "6.9068s19" }, { "6.40785s9", "6.1696s19", "0", "6.40785s9" }, { "-9.9772s9", "-3.455s-24", "2887787295482420840947083445796864", "0.0s0" }, { "6.3337s9", "-2.757s-24", "-2297319607304237298946798769930240", "0.0s0" }, { "2.24916s9", "8.958s-24", "251078998767860827355040375111680", "0.0s0" }, { "-4.695s9", "-9.695s-24", "484267288087969338977238606938112", "0.0s0" }, { "-5.84457s9", "-7.7713s-22", "7520717852416051178813723246592", "0.0s0" }, { "-2.01576s9", "6.682s-24", "-301671132293375748429617783898112", "0.0s0" }, { "1.7042s-13", "-0.80732s0", "-1", "-0.80732s0" }, { "4.959s-14", "0.9918s0", "0", "4.959s-14" }, { "2.0820s-13", "0.75837s0", "0", "2.08202s-13" }, { "4.808s-14", "0.89121s0", "0", "4.808s-14" }, { "-4.005s-14", "0.71084s0", "-1", "0.71084s0" }, { "4.497s-14", "-0.83223s0", "-1", "-0.83223s0" }, { "-4.538s-14", "3.81524s9", "-1", "3.81524s9" }, { "-1.0888s-13", "2.5705s9", "-1", "2.5705s9" }, { "-1.0445s-15", "3.9579s9", "-1", "3.9579s9" }, { "-3.399s-14", "3.8115s9", "-1", "3.8115s9" }, { "8.889s-14", "1.02951s9", "0", "8.889s-14" }, { "-4.408s-14", "-5.5562s9", "0", "-4.40806s-14" }, { "1.4679s-13", "-1.9105s-13", "-1", "-4.426s-14" }, { "1.2740s-14", "-4.935s-14", "-1", "-3.661s-14" }, { "-4.321s-14", "-8.355s-14", "0", "-4.32102s-14" }, { "-1.1228s-13", "-3.641s-14", "3", "-3.0501s-15" }, { "4.643s-14", "9.809s-14", "0", "4.643s-14" }, { "6.832s-14", "1.2918s-13", "0", "6.832s-14" }, { "-3.186s-15", "7.2502s19", "-1", "7.2502s19" }, { "7.570s-14", "-6.8838s19", "-1", "-6.8838s19" }, { "-1.5446s-14", "-8.6798s19", "0", "-1.5446s-14" }, { "-1.2496s-13", "-8.0029s19", "0", "-1.24963s-13" }, { "-3.303s-15", "-9.7969s19", "0", "-3.303s-15" }, { "-3.832s-14", "5.17976s19", "-1", "5.17976s19" }, { "-1.1039s-13", "1.1031s-23", "-10007216128", "0.0s0" }, { "-3.303s-14", "-1.61171s-21", "20493824", "0.0s0" }, { "3.660s-14", "-1.3664s-23", "-2678554624", "0.0s0" }, { "-1.9574s-13", "-6.864s-24", "28516810752", "0.0s0" }, { "3.285s-14", "-3.329s-24", "-9867755520", "0.0s0" }, { "-3.291s-15", "4.2038s-23", "-78285824", "0.0s0" }, { "-7.18707s19", "0.231445s0", "-310527697906823069696", "0.0s0" }, { "9.5173s19", "-0.0566254s0", "-1680761395333178589184", "0.0s0" }, { "-6.6524s19", "-0.697136s0", "95424520704539754496", "0.0s0" }, { "3.42423s19", "0.68306s0", "50130693352167833600", "0.0s0" }, { "-7.2388s19", "0.0522995s0", "-1384100280679029276672", "0.0s0" }, { "5.9235s18", "-0.24643s0", "-24037400061136601088", "0.0s0" }, { "-2.63137s18", "-1.6819s9", "1564524544", "0.0s0" }, { "2.4749s19", "-2.36457s9", "-10466623488", "0.0s0" }, { "-2.07847s19", "6.4981s9", "-3198582784", "0.0s0" }, { "-2.54907s19", "4.4446s9", "-5735186432", "0.0s0" }, { "2.34573s19", "3.0757s9", "7626620928", "0.0s0" }, { "-1.93055s19", "4.8192s9", "-4005953536", "0.0s0" }, { "4.4928s19", "9.588s-14", "468585063670302141654816501268480", "0.0s0" }, { "-2.17698s19", "-3.259s-14", "667992445198391196335567431270400", "0.0s0" }, { "-8.3605s19", "-1.2702s-13", "658197863607565267600565560410112", "0.0s0" }, { "5.2775s19", "3.555s-15", "14845297722947765992252704150257664", "0.0s0" }, { "-5.0371s19", "6.922s-15", "-7276948270610150879291824750460928", "0.0s0" }, { "8.3107s18", "-1.0201s-13", "-81468833985370875891111365181440", "0.0s0" }, { "-3.8796s19", "3.8685s19", "-2", "3.85733s19" }, { "4.11224s18", "-7.757s19", "-1", "-7.34577s19" }, { "-1.7228s19", "-6.0107s19", "0", "-1.72278s19" }, { "9.1191s19", "-4.49645s19", "-3", "-4.3702s19" }, { "4.2755s19", "8.9417s19", "0", "4.2755s19" }, { "-4.3237s19", "-1.9687s19", "2", "-3.86314s18" }, { "3.109s-24", "0.00614166s0", "0", "3.109s-24" }, { "-6.2027s-23", "0.0328217s0", "-1", "0.0328217s0" }, { "-6.017s-24", "0.76966s0", "-1", "0.76966s0" }, { "-7.628s-24", "0.47249s0", "-1", "0.47249s0" }, { "3.323s-24", "-0.86671s0", "-1", "-0.86671s0" }, { "-5.302s-24", "0.0245514s0", "-1", "0.0245514s0" }, { "5.342s-24", "6.0717s9", "0", "5.34194s-24" }, { "-2.664s-24", "5.573s9", "-1", "5.573s9" }, { "-2.830s-24", "7.0363s9", "-1", "7.0363s9" }, { "-3.176s-24", "1.12686s9", "-1", "1.12686s9" }, { "-2.2026s-22", "-3.99255s9", "0", "-2.2026s-22" }, { "6.994s-24", "5.81167s9", "0", "6.994s-24" }, { "6.054s-24", "-8.915s-14", "-1", "-8.915s-14" }, { "2.875s-24", "3.652s-14", "0", "2.875s-24" }, { "-1.57853s-22", "-4.501s-14", "0", "-1.57853s-22" }, { "-1.3880s-23", "-1.0479s-13", "0", "-1.388s-23" }, { "-8.879s-24", "3.974s-14", "-1", "3.974s-14" }, { "-1.14395s-21", "-4.527s-14", "0", "-1.14395s-21" }, { "6.149s-24", "9.418s-24", "0", "6.149s-24" }, { "7.661s-24", "-2.956s-24", "-3", "-1.20701s-24" }, { "3.254s-24", "1.2764s-22", "0", "3.254s-24" }, { "-5.4542s-22", "5.574s-24", "-98", "8.2738s-25" }, { "-1.4523s-23", "3.091s-24", "-5", "9.3198s-25" }, { "-5.913s-24", "8.419s-24", "-1", "2.506s-24" }, }; cln-1.3.3/tests/test_I_power2p.cc0000644000000000000000000000065311201634741013541 0ustar #include "test_I.h" int test_I_power2p (int iterations) { int error = 0; int i; // Check powers of 2. for (i = iterations; i > 0; i--) { uintL n = random32() % 1024; cl_I a = ash(1,n); ASSERT1(power2p(a) == n+1, n); } // Check against logcount. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); if (a > 0) ASSERT1(power2p(a) == (logcount(a) == 1 ? integer_length(a) : 0), a); } return error; } cln-1.3.3/tests/exam_RA_plus.cc0000644000000000000000000005027311201634740013215 0ustar #include "exam.h" #include #include static plus_test rational_plus_tests[] = { { "-6069217517368004039/4076344942716985944", "-399587800008780737/578697755310708616", "-321318766345655960630110128852941297/147435729263904928853096856396980844" }, { "-41285036778370718/305793940074617155", "-1396094619926552183/15846027887642356854", "-1081121118676718273499338028514700537/4845619302294419132297197085940230370" }, { "15975644088444536091/18063939613598316583", "17501188199168431305/2979264551795273683", "363736076920798535449296038324193823968/53817254956563877935003279344562385189" }, { "10197734562406803221/17452826108659293487", "14639450560606090654/236781760961536951", "257914422508077920978698094723491089669/4132510899763835955061848877304138137" }, { "-16810360766832230069/13652857552883800956", "5011749175730438558/4169057419710079215", "-184295743992738197672588473692806043/6324394120121667288243293659228081060" }, { "2234573531734039025/1128831476977636536", "5842177084459535064/10255356071975483971", "29511180623959738330730559435115466579/11576568741659658592450950022331964456" }, { "2268894928233321367/45672733521488298991909987382109984899", "-10510750087507287356/187832098427494353069556175466145198255", "-53883392376116199828369509984040539934420061636271022459/8578805378260910951788610598591490227836321974082207035230408675959411151245" }, { "14273433611429514043/7774518083776389556784045601066955324", "17247074371340283485/225579726714102822702316919752160926694", "1676942472465190408518249346164012571239098147062478293991/876886832336064155131767120243155911448808491410701588797601053820468509428" }, { "-384768590020206817/26284423885474502132625533495652664626", "-913687410374243983/254477371735734658619949996700223764026", "-10160887225658731404416073535892287983824191154410167550/557399258996959835387173465565070652935481894323496556880024318994528462023" }, { "-4465222504572200650/89674568206322981678158378582739708537", "4148550863841320780/74302497820894496090312266744880513261", "2118016946376507498169590394563632549990739165791772590/350686547828419379316750498534703170285368675911953477374458878558215968903" }, { "-4466938407638238142/281859125741189685767904931589784285893", "7302241525893379697/204618108204962312932373858463395271264", "1144186926000295881841982161759159994442430111060328362933/57673481089466829503954266461746705742702466399988738560842837126631263478752" }, { "6692616266348342275/280491911593106290120490189988812804382", "5414100524539959087/183579771905991028181574615911067652873", "2747240373316006570071525025488180559154305534334705425309/51492641151737853299832848099101317109893853469394209716061486746077629289486" }, { "-2794289802081124319/15768464977850217600859580216291365931410230647587457388598921425875331529149", "10869776169503285673/33805119742344157512165738805682358903614971418053290198565741206390317449856", "76938383491719886409504555688515759257937029058461512747558964579607347503639994773101488934213/533054846729186819415263583890627325668798847177803707144003483502948153457972377767011992167761176556555806720273883868208938866192358148729990609852544" }, { "-253222140119290489/2123024034843473393742534167007121513293496410591072104903085284304117612082", "17957334013642389787/32058972871090153103034645121513493401113378486125580864856088310966601405847", "30005809992231287609744177955201962181880644831204431411802631067134766877061419104162728517351/68061969937719269465960475690278941280799593161143759512261685488134507341176789799765185182008442410081522124548392827986923668912612728349293792643454" }, { "-13318881947309618/3105936147298438543619802738126617974207009907186580731552500517452462642139", "1850968757748704519/36469179946212878965111748233319050931475015876401494718861814560453153824935", "5263262069792987469108717688485565287648879759118200779949761992573778798556738644541735401311/113270944257273905484832818286307416845956086746130199501242465128236430928807948126409718436237517505516279133169796919230385184900609912160483959935965" }, { "-9937822914683494298/36414156259035675966580098631253549474580108307284844243190992829476777586283", "-13712605099585970325/17758145954890657915358548152198427387923366136638180213650029984340849686198", "-675810254607579372158951115566887998278519717754376916387787672973408477396668549189167387350979/646647901672150721610792561233068038707362067627156669418022102308446036384411330678972562863413004325878365438890328206637571985169324874284800419222034" }, { "2479135971595944301/28169711053558469409458629766960029324030958129245230797895768033968717159836", "3427244662960653095/28446538857424788738244844756675951434179713170118835630969510829753715142438", "83533664807147783700314944003289704497366290621039272787320536148072960487262393639109696219129/400665390043739792096386856839000624247597803909916773326187593475005945995926511155915226239317839405221783416485999405286913042389632370302962776360084" }, { "14865500635281371370/56222262470894935247131881777606182311286871927285650835673424014252462156319", "6436092572090050725/19282524131572095520593158313261757267758159099923763177708581262473988426947", "648496060602737474174747620183913927791943082591316359990137585798909535115053578637078811588665/1084107132826611778585714784136700465449309125114745313342842325649687943726086785657821763235618936882528385000712567133180567926723616940173290425928093" }, { "340196811925805824067049620503247332111/14422464039094716975", "51285507111580975533385007190438537498/3230944134273302873", "1838820276033673324738967436225477772648372110186756083453/46598175588880723338390245118389369175" }, { "-210449319160504160992731982827917332322/5436857856220342451", "251628249079137248539965770847855056283/4323109210037952829", "458271632943884346915405609513071881239303671882386130695/23504130271893362375786510953364243879" }, { "-40984360445255688839942109197081457275/6593417935076565019", "-138094174027187773198981391229349265879/7135512300754720691", "-1202957011856131413678873259651070808566709454882536663726/47047414779755620074837011989046108129" }, { "-289704472880230079383856507128133962457/10452740760651010288", "-55251460678415911958671096669490155237/10333740726609314202", "-1785630052601050832889834016432677758176770083879794496285/54007956451514283340719766211063255088" }, { "276702099951674677215621541062877777467/3899918017008359516", "42623843937285717338660228144403811741/1973785812353331893", "712380176058162142132059442064597996057720566915757732387/7697602851312240113570356856612843788" }, { "-323480614013303716597188084301661616596/12957985934572321773", "-72966206939397711493108854138997499334/4539020357040680881", "-2413780175334213399707013296172687953960842714316410700258/58816561943270580900205343368941122013" }, { "65443777543319569578713907336699651721/218804857459609839540825438673960136766", "-61986861924091374470669233802827103921/65997977315012279293170493460332070399", "-9243869541956614722377007489838492339200370508580665293676272508698701352807/14440678019033825487758061900150103876633207457375858942267120523885980189634" }, { "75417845823236070411341994633288547531/70553457686181702397810927701121800017", "-7132208259849175775323757110664708879/24379326462014713478002790304943339422", "1335434330716260509518880689691257567128541829706203586134358870209350816139/1720045777955364955754847231620711706115121721983605654691934662747636370174" }, { "-144692585186931942602350348772472248638/135233395864627580439431775527364081053", "282512666765911374279543408363363928190/317835040256607665191397469890906044457", "-7783226336195038987381961251409043080655184208289882004756343793157154115496/42981911818671667582796085276418080952868666330715445603855323471628969373221" }, { "44888992584766727877549626240272070725/30583318432547259097085073976959329092", "8004917623696885952432014881247978821/22005016116109025986417835664774768346", "616299974987760892931461886440810919939264155149950328291076750435394215691/336493207496148335911511951044490614757807556827643881435283379298939260916" }, { "78378756441281199312006031491361997668/175125578595003447448566412156266355477", "41128705932035853424044828385766740319/216359823601433445464965619660717081261", "24160702340946845080381231961736762955784254747832931999121777482667650876511/37890139292913914697800186893609983979783140570423836226844401085057321416497" }, { "-36669293296367265584135816683983780855/7341750629088488427994322429098120058", "-110335983484012479290765295565662258281/5944410911181873015545360879141666465", "-1028036623331099574157832708037007047972965676333418398303213384036005227873/43642382546729990922161061763293407461832155878510163500678954788762454970" }, { "228535455883892721240720366651075744967/13353170075841095813026701300679754576855418298534901819672803635370738730013", "50622643250826426975012800479360461693/18462345430382979738234695697296360785230118465695284267226773073149552698303", "4895273294635392498665165879164922265508724130843670837390305811645771221742112327485665544066552056189958877583010/246530838530831602270074647792752210668736478466245992891169449973883874207653264921203783108295835419855394180777469634862446033810927048792871560267939" }, { "11355068601761731966774720678777239425/4604724775053993730579400400679579947095967462408565975449642189823843820753", "140083339434585694465706029861026468774/44667214322013486680993684507177513903616004462434123967566781106229226297333", "1152244506542792151980649054527153167035843960949499862764543674633978109831264344257976000890169981044543787620347/205680228421222079539939271800361418862113882206694593495620042859527547538342323521609420336002641308832164587573546802806916292021672743366881933951749" }, { "-1347509007210283053816302848714698886/1127513773036247565111791991337919355855664936242166138889250311777351432819", "-29464928273311615445392112247506626497/61933028109313748081628643142485450090725737246358993405254280723087421657760", "-116677425670791909053501267317366054796703074907755330120413752187834449333299886015456661052906469074533366060403/69830342199092322009251417145364324484174202256910311362396720371574344280505889954115533896831727771442604285956749924105078563356474162416148250025440" }, { "-324250487660721070279458563122233299722/81069650926979269606211148691445887485067008319429991878657612702576019034861", "221744296343315457943731256980089803078/69422237643162665956763790134527973903052044485041686255401689654420090859107", "-1511153903564243978242173323335554031611949546418082039382510246845821774680210236992700372319944685567533765722032/1876012190766999122356500320654631447623282613780323887424324139799202291067983209550065997185860196433399782230215269625922714982832188312141580824109709" }, { "-5518324152042099343909980322067306333/114786626838714403445081775763480415805466836213320421844559660900880511042496", "-34415425451618992284220085078832944671/96012285963709194218263616278916829663708037691620330613749177799086889040577", "-121088040955051148243092870850103339772063863319219725752028251933576579890093496821887384992074112246777968211161/297862876779681729593084954525306275464788137269287692384941959703420459939692410434239827100068259769782676124741025632728203586961467995819025176090816" }, { "-14763921690861243371082340598041267817/5580497386043551028888310256097864185640794395615400088682607872958152738111", "-37917865546640067592937379176813765341/6460563866107795917092814416816176677900242086501650458839130903088333290440", "-306983808565398982164654624310995401934900925070311336095043743767915008644459192438083753301097540174379867380331/36053159767181973313125557585868206969047484351694148822117591172786449966899079869470557965303954072842600790897257698854023751399649072014440219958840" }, { "-50167218239107621378232529938205077788547946059832391744348095230748591585676/15685777859540025727", "2959973815535345735348053015389999235839609978295604181643547897863515739931/7556072538495923601", "-332637648328710384664787658442281566361265475773778265650094684540358159241317316408573560734439/118522875329417757148187346888166482927" }, { "36275100136090483878026478935942224245036692059657264537598788566553406654319/7192442039871568876", "31833552596558882106090352174644817045294359487590746360517241517440556146007/5115621724114081523", "6795584791386081942310910570767193224876510928834120433155946649367201608618436115134135392229/603177258173744207443043238127434068" }, { "1518304705177739493483387141342904186483658277690975456045607777812450680478/1837349761252804045", "-98159070764971437450169149833809835519268242923913777966502463698396945141091/17238232824535200528", "-154179655228376218743158291724235398278770272999447263973992852061897564252670941977524115620711/31672662964580000612902147746364535760" }, { "-16820231344048323866426670709751443650129113909724546927974450301780935205864/4879137683452153951", "41987219452495799378686134495924115238909423831017150785452046648616005475639/10470103987572807938", "28751853386830083847297108941057082854166610198448421498169760256533906032780671559334244751257/51085078915429149801779227663330863038" }, { "106981694162678522688926793970551228214793665448093395251834862896418045995969/12359470989873920972", "57736849967187961211538031441400807467468650239660040144967046985609433512403/9148121311784151716", "211534804819567028232303054650327703050869189253958355919997046592895748577556985792570078031065/14133242495605447754080611005730273494" }, { "32477400086615533920132766925666506741908300936974348739732763951610256880146/9045135183308696243", "-27444990730472195954051975667481893116650518055101159075033425831129583042846/14815776448343565085", "232934248044934592851252865496377968609159820017147884670610366058217203617961573611006127074832/134010700820948737148715427669965475655" }, { "-110053921687226074580746319073262192216481755737797790655164396095655530752161/255625377233605953547425802301922658850", "104095037267817888539158192425982072195078148060302393917025130946535913363779/52156238014583575190277280296975732513", "20869334635774913818120011435677143948904421430726712952150525645851498022294865158343391008006649321440592131083557/13332458017563665620865770931104425383051282278510599570476131200251352190050" }, { "-29732769078100192507326444863945498799317005912797369958801703828462203585495/153426302667449722633466432797809987061", "36094569840376017510791155197897623093337784636438580042046806320700826250193/73286165979315961333009750429763545174", "3358855747298609357265422062476767573626163217619249414656940907348235709105513077913806378841119674678021275101643/11244025482879487592663298816607141776071841230792806495601092332558428993614" }, { "-5942892427460131788264792587455286675871284855854073854440582948253436001319/42136930106315714728428443448730580823", "4013357443728612356640061171485791666303136232331145404661874650095235381569/4039594279673425548586623641599574814", "48367895947790658831309709091377784501687363167039737892874371817395083020674648576881857510385191335175551957207/56738700606823969419119152217721454504573192499839513549171731025354063974" }, { "83833896550100013648317056712064289497247852876055488793078639582729685477353/188580876675619574786621140720273228537", "-94310653397371924313725082402708514144086936359594289802762093989853507835016/223423274286761439988276492107364036191", "945257965914081840217765265999453398105151083284254483307155736205796420255026737575918161700355729594975143830831/42133356934734885127066999419230498520039134905254787577957770920054881982567" }, { "-14753992026457621496269953958381833108089826525439816493815533773338622353285/187171041855711408638339193132645929319", "41340837577662628944845446369855468662228665858415210386857356535970453143469/322471558852595372991189266479896691326", "993354944176102401496932276511264091214577507066786487301109889019709943488537161608732610457423116833164991120567/20119112546425211128699888199278894685207186285215928241217590790016852128998" }, { "1370528773439579327226257222995383030603284075640526658282329726447335048230/305600505683287165495713194488435114383", "65450762047588146235054351616480175308174618406941901794570541085963681607527/78934496562987400429145916504112602768", "2234440886428442112499564751364146150136438855986167755259621093816030535881959724370423862435538502079424185584609/2680269118389404699570998335430047660909241475691839354273569734988880268016" }, { "-76890617375308981455205142622328108690129081798840077873315966300000409208129/15716637731576156581128288257209679492686622162926707938907282962815471734862", "38716252217351070567267262306332875768795464072349655597599997486613800623507/8966639693620677733207403249675415446338239705879120765911896990394928596139", "-80961151400006413290662155450270992168701818633203071886556882897757813544592915596861717853520674107309124394292702460320442121704840951425284048212897/140925427734207212133604717335369986754855062343668899363006574618520848268718851310007161609443093589067206438198588881828988648068282656538084484897818" }, { "-43290760758277846058307167265569849910514905939554272559141355223092464986939/39390771697068809730875092892395235497943839933482798653607450783947201796777", "-34021960935937170163894986285771504067448629886312440795733904794894095253649/106500928228745564800818258673435811176493306775154643113582742982704678574998", "-5950657500399238361998292872481533631424138885403498309639150240712482075115081624153513501886127772738596607451116548616099047843190357858736503567640395/4195153749384427435979718872073512266029328962522899010907363614544821318917440413166534226890289043064894115954085809567292470182917919104836361549181446" }, { "17906146982204022925114071077515882010955693727109005464426577098738402001871/11978213712662686419384559301746021856683603106261241838035626618416021524231", "37108371752538653389309509075248119316034595087990649061240232817571629131708/23044877611981158676785639370406786635050056158699399001947422631523989139615", "857136973087880657664203854652754375000000796400911171478039451763440064550649429609696307332611304395324153178602635490321877797571177424460384122636213/276036469018466057777760709173569478463866562650149880633721199971933767458324034017734890892482223472007882939609440193626728031771767304374122564511065" }, { "-77062185592993847534024832256462395143306675613123510837298699277378172890089/108133793614758275822883834459865239455798743725021300772336023406871185253111", "11169356025540464491224577661206910726665825152149521753528516637690366838655/6369000033300801574913390611244042297918207179453133439308688067382050608197", "716975776667538986425481530620118513423964367153518065425241139444161780269039780459555836804116752462325735011822817367819625929553250251515977390346172/688704135133337463423649074673019029541747166391680122270752018123634233590688096940261480888455237095078029621363428114402137147558304641222314936350867" }, { "13583698920327742567560325715281067532806062839142769830536738488850089822247/37364394142255392010559408553278838878570049727027927213977555360874308098434", "89809462356450792524214360688853318641058652796345720882094866396911421360072/67457610947238032712889230619376608100793287037427539672885124981055281513463", "4272000026182362299819817378001862956001381379478285995446709640464951377212652125169846305230835604666564953883168949950485767679005929254184987140738609/2520512763327523955464432226120154092742373168521113224665257966793820057379494860454732800329019773731110452438496395974166220481124541266348389100216942" }, { "-56124163112538495128545947597589743957824668875494126834084658670528264380488/4752969512023182700122983723156599300062332404522277372984645779569746369511", "-24794747728228571193100294011820993825205231022194400752319729320185378063197/98168688073468429337427023004226732413974455700654808087001957859427678524065", "-5627484141989830997868845457242226973925524393512774885292323552602180052845805156311097870316601631410500655735815037997645271136502511615781690896430387/466592781448509275992390948177487068548424631274164031114910250651063315574511979617153568070687706304645818907382693929886654490427484894987856595782215" }, }; cln-1.3.3/tests/timeLFexp.cc0000644000000000000000000000175711201634741012537 0ustar #include #include #include #include #include #include "float/lfloat/cl_LF.h" #include #include #include #include #include using namespace cln; #include using namespace std; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); uintL len = atoi(argv[1]); #if 0 cl_LF one = cl_I_to_LF(1,len); cl_F x = scale_float(random_F(one),-1); cout << x << endl; #else cl_F x = sqrt(cl_I_to_LF(2,len))-1; #endif cl_F y; extern int cl_exp_algo; y = exp(x); // fill cache #if 0 cl_exp_algo = 0; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { y = exp(x); } } cout << y << endl; cl_exp_algo = 1; #endif { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { y = exp(x); } } cout << y << endl; } cln-1.3.3/tests/timesquare.cc0000644000000000000000000000145711201634741013016 0ustar #include #include #include #include #include #include #include using namespace cln; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); cl_I m1 = cl_I(argv[1]); cl_I M1 = (cl_I)1 << (intDsize*m1); cl_I m2 = (argc>2 ? cl_I(argv[2]) : m1); cl_I M2 = (cl_I)1 << (intDsize*m2); cl_I a = random_I(M1); cl_I b = random_I(M2); fprint(std::cerr, "Squaring: "); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_I p = a * a; } } fprint(std::cerr, "Multiplication: "); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_I p = a * b; } } } cln-1.3.3/tests/exam_I_sqrtp.cc0000644000000000000000000000131111201634740013256 0ustar #include "test_I.h" #define floor(a,b) ((a) / (b)) int test_sqrtp (void) { int error = 0; // As our algorithm for sqrtp does pre-filtering mod (64*63*65*11), // we check that no square is thrown away by this pre-filtering. { uintL a, b, c, d; for (a = 0; a <= floor(64,2); a++) for (b = 0; b <= floor(63,2); b++) for (c = 0; c <= floor(65,2); c++) for (d = 0; d <= floor(11,2); d++) { // Produce a number x == a mod 64, x == b mod 63, // x == c mod 65, x == d mod 11, and square it. uintL x = 1306305*a + 1967680*b + 133056*c + 2358720*d; x = x % 2882880; // not strictly necessary cl_I w; ASSERT4(sqrtp(expt_pos(x,2),&w) && w == x, a,b,c,d); } } return error; } cln-1.3.3/tests/exam_FF_mul.cc0000644000000000000000000001671211201634740013020 0ustar #include "exam.h" #include #include static mul_test ffloat_mul_tests[] = { { "0.3098436", "0.0057770014", "0.001789967" }, { "-0.14583993", "-0.028087378", "0.004096261" }, { "0.21399558", "0.96054405", "0.20555218" }, { "0.7590452", "0.8427266", "0.6396676" }, { "-0.34523207", "0.20272356", "-0.06998668" }, { "-0.98096234", "0.98158866", "-0.96290153" }, { "0.40309322", "4.0009994E9", "1.6127757E9" }, { "0.15507132", "9.481803E9", "1.4703557E9" }, { "0.5218476", "-2.1933102E9", "-1.1445737E9" }, { "0.17258328", "2.6295781E8", "4.538212E7" }, { "0.25962013", "8.699164E9", "2.258478E9" }, { "0.47902477", "-1.4075732E9", "-6.7426246E8" }, { "0.9642294", "-1.6256952E-11", "-1.5675431E-11" }, { "0.6098744", "-8.802921E-12", "-5.3686764E-12" }, { "-0.25792134", "4.804327E-11", "-1.2391385E-11" }, { "-0.8724403", "-9.101418E-11", "7.940444E-11" }, { "-0.13318628", "8.1157005E-11", "-1.08089995E-11" }, { "-0.54116476", "-9.353639E-11", "5.0618596E-11" }, { "0.9018487", "7.411783E19", "6.6843068E19" }, { "-0.6835444", "-7.590606E19", "5.188516E19" }, { "-0.9896146", "5.195105E18", "-5.141152E18" }, { "-0.4838531", "1.88174E19", "-9.1048573E18" }, { "-0.31826657", "-3.3103586E19", "1.0535765E19" }, { "0.6818549", "-9.227651E19", "-6.2919192E19" }, { "0.7676919", "7.320194E-21", "5.6196534E-21" }, { "0.49369502", "4.9805288E-21", "2.4588622E-21" }, { "0.9599328", "7.903804E-21", "7.58712E-21" }, { "0.13215566", "7.603894E-21", "1.0048976E-21" }, { "-0.35744518", "-9.408464E-21", "3.36301E-21" }, { "-0.79346496", "9.006081E-21", "-7.146009E-21" }, { "4.1775434E9", "-0.13509268", "-5.643555E8" }, { "7.27846E9", "-0.8181822", "-5.9551063E9" }, { "2.9669427E9", "0.7082195", "2.1012467E9" }, { "7.609933E9", "-0.33963126", "-2.5845711E9" }, { "3.4241843E9", "0.3924479", "1.3438139E9" }, { "-3.8366538E9", "0.56461394", "-2.1662282E9" }, { "3.7237007E9", "1.2646783E9", "4.7092836E18" }, { "-2.7657871E9", "-3.6314278E9", "1.0043756E19" }, { "-4.753982E9", "-5.8879616E8", "2.7991263E18" }, { "8.877933E9", "7.973602E9", "7.07891E19" }, { "-8.312081E9", "-8.941637E9", "7.432361E19" }, { "-4.297749E9", "9.913122E9", "-4.260411E19" }, { "-7.893335E9", "-4.7961794E-11", "0.3785785" }, { "-4.1332334E9", "7.221582E-11", "-0.29848483" }, { "1.9981688E9", "2.8169871E-11", "0.056288157" }, { "-5.8555295E9", "-7.562528E-11", "0.44282603" }, { "7.377872E9", "-1.5020383E-11", "-0.11081846" }, { "8.891134E9", "-7.035395E-11", "-0.6255264" }, { "-7.1412096E9", "5.1873507E19", "-3.7043958E29" }, { "8.0983844E9", "9.136914E19", "7.399425E29" }, { "-6.1437537E9", "-9.398771E19", "5.7743737E29" }, { "-2.3000973E9", "6.8743785E19", "-1.5811739E29" }, { "3.5817969E9", "-6.0353143E19", "-2.161727E29" }, { "6.544234E9", "8.265139E19", "5.4089003E29" }, { "2.1273733E8", "-2.3684083E-21", "-5.0384886E-13" }, { "-4.2644698E9", "2.956708E-21", "-1.2608792E-11" }, { "-5.1238026E9", "5.341445E-21", "-2.7368509E-11" }, { "-3.0125368E9", "5.201843E-21", "-1.5670742E-11" }, { "-4.4709827E9", "-1.5399217E-22", "6.8849635E-13" }, { "-4.934225E9", "5.9229795E-21", "-2.9225313E-11" }, { "-2.1100623E-11", "0.9615048", "-2.028835E-11" }, { "6.6090705E-12", "0.4100405", "2.7099865E-12" }, { "-9.541609E-11", "0.82497185", "-7.871559E-11" }, { "-2.7884627E-11", "-0.5218528", "1.4551671E-11" }, { "9.180904E-13", "-0.26436818", "-2.4271386E-13" }, { "2.6154882E-11", "0.2004636", "5.2431015E-12" }, { "9.751009E-11", "-7.0098227E9", "-0.6835284" }, { "-1.312651E-11", "1.9450307E8", "-0.0025531466" }, { "-4.591856E-11", "-4.6141565E8", "0.021187542" }, { "-4.1950752E-11", "-9.55923E9", "0.4010169" }, { "-2.1888996E-11", "9.976215E9", "-0.21836932" }, { "4.2696267E-11", "-7.927695E9", "-0.33848298" }, { "1.9615304E-11", "-5.3584637E-12", "-1.05107896E-22" }, { "-8.7289814E-11", "3.4389686E-11", "-3.0018693E-21" }, { "6.8621386E-11", "-1.4248663E-11", "-9.77763E-22" }, { "-9.5643375E-11", "-7.7591066E-11", "7.421071E-21" }, { "-6.3313584E-11", "5.173857E-11", "-3.2757542E-21" }, { "-6.968663E-11", "-4.966581E-12", "3.461043E-22" }, { "7.942278E-11", "-3.1309486E19", "-2.4866865E9" }, { "1.7023414E-11", "2.5512804E19", "4.34315E8" }, { "2.6554937E-11", "9.146128E19", "2.4287485E9" }, { "9.309172E-13", "-3.6298406E19", "-3.3790812E7" }, { "-6.106873E-11", "3.5271824E18", "-2.1540056E8" }, { "-2.8420502E-11", "-6.6643682E19", "1.8940468E9" }, { "-5.84991E-11", "1.5304011E-21", "-8.952709E-32" }, { "6.30787E-11", "-9.366236E-21", "-5.9081004E-31" }, { "1.9745445E-11", "7.034156E-21", "1.3889253E-31" }, { "2.440728E-11", "6.50959E-22", "1.5888139E-32" }, { "6.0243255E-11", "-1.7734902E-21", "-1.0684082E-31" }, { "1.0381073E-11", "7.167948E-21", "7.441099E-32" }, { "6.3378214E18", "0.022634745", "1.43454966E17" }, { "5.4942345E19", "0.26696533", "1.4667702E19" }, { "9.807893E19", "-0.99720424", "-9.780473E19" }, { "-7.1504E18", "0.045440495", "-3.249177E17" }, { "-7.265508E19", "0.37276286", "-2.7083115E19" }, { "9.3705245E19", "0.6617385", "6.200837E19" }, { "7.768628E19", "1.37205E9", "1.0658947E29" }, { "1.5640021E18", "9.344063E9", "1.4614135E28" }, { "3.8593804E19", "-9.424651E8", "-3.6373312E28" }, { "-9.23689E19", "-6.980498E9", "6.447809E29" }, { "7.926599E19", "5.0871127E9", "4.0323505E29" }, { "3.540541E19", "-5.11486E9", "-1.810937E29" }, { "-7.023858E19", "6.959093E-11", "-4.8879683E9" }, { "-2.0809586E19", "-4.045683E-12", "8.418899E7" }, { "5.3608545E19", "-7.0354486E-11", "-3.7716017E9" }, { "8.974303E19", "-6.383404E-11", "-5.72866E9" }, { "-6.8900017E19", "9.845904E-11", "-6.7838295E9" }, { "9.325442E19", "-3.9829796E-11", "-3.7143045E9" }, { "5.9436735E19", "-5.713992E-21", "-0.33962104" }, { "7.266224E18", "8.9780915E-21", "0.06523682" }, { "-3.6717237E18", "3.3338123E-21", "-0.012240837" }, { "4.119367E19", "-7.309974E-21", "-0.30112466" }, { "-8.453134E19", "4.6281215E-22", "-0.03912213" }, { "-3.7493624E19", "5.480264E-21", "-0.20547494" }, { "6.3693945E-21", "-0.25352144", "-1.6147781E-21" }, { "-8.51531E-21", "0.6031129", "-5.135693E-21" }, { "-9.771993E-21", "0.2740926", "-2.678431E-21" }, { "-4.2903415E-21", "0.5916119", "-2.5382172E-21" }, { "-3.7330673E-21", "0.9738175", "-3.6353263E-21" }, { "5.860415E-21", "-0.9997709", "-5.8590725E-21" }, { "-9.4827234E-21", "7.6195564E9", "-7.225415E-11" }, { "5.9501194E-21", "9.102942E9", "5.4163594E-11" }, { "2.8867428E-21", "-9.615872E9", "-2.7758549E-11" }, { "5.0077543E-21", "7.8715663E9", "3.941887E-11" }, { "7.082003E-21", "4.5221494E9", "3.2025875E-11" }, { "-2.9215627E-21", "5.131017E9", "-1.4990589E-11" }, { "-9.1914904E-21", "-2.3301847E-11", "2.141787E-31" }, { "1.3389891E-21", "-7.032628E-11", "-9.4166125E-32" }, { "-8.540776E-21", "3.052019E-11", "-2.6066613E-31" }, { "-2.7608417E-21", "-6.8345785E-12", "1.886919E-32" }, { "1.2978333E-21", "-2.1870255E-12", "-2.8383944E-33" }, { "8.2235335E-23", "-3.5080876E-11", "-2.8848876E-33" }, { "-3.958064E-21", "8.038726E19", "-0.3181779" }, { "7.752178E-21", "1.0747784E19", "0.08331874" }, { "-5.5964265E-21", "-8.700492E19", "0.48691663" }, { "3.2236927E-21", "3.6203593E19", "0.116709255" }, { "-6.308517E-21", "-3.8032156E19", "0.2399265" }, { "4.8663387E-21", "9.008218E19", "0.43837038" }, }; cln-1.3.3/tests/test_I_lognot.cc0000644000000000000000000000060111201634740013435 0ustar #include "test_I.h" int test_I_lognot (int iterations) { int error = 0; int i; // Check involution, sign, and against "+". for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = lognot(a); ASSERT1(lognot(b) == a, a); ASSERT1(minusp(a) != minusp(b), a); ASSERT1(a+b == -1, a); } // Check special cases 0 and -1. ASSERT(lognot(0) == -1); return error; } cln-1.3.3/tests/test_MI.h0000644000000000000000000000014411201634741012035 0ustar #include #include #include #include "test.h" cln-1.3.3/tests/exam_SF_minus.cc0000644000000000000000000001617011201634740013371 0ustar #include "exam.h" #include #include static minus_test sfloat_minus_tests[] = { { "0.57362s0", "-0.0545654s0", "0.62819s0" }, { "-0.121063s0", "-0.157204s0", "0.0361404s0" }, { "0.75334s0", "-0.186554s0", "0.939896s0" }, { "0.879036s0", "-0.54558s0", "1.42462s0" }, { "-0.245338s0", "-0.003891s0", "-0.241447s0" }, { "-0.89576s0", "0.61608s0", "-1.51184s0" }, { "-0.59227s0", "6.61s9", "-6.61s9" }, { "0.381363s0", "1.88003s9", "-1.88003s9" }, { "0.858986s0", "1.31028s9", "-1.31028s9" }, { "0.56377s0", "-3.26553s9", "3.26553s9" }, { "0.80342s0", "-1.46217s9", "1.46217s9" }, { "0.093941s0", "8.30203s9", "-8.30203s9" }, { "0.266243s0", "4.980s-14", "0.266243s0" }, { "-0.169983s0", "8.01s-15", "-0.169983s0" }, { "0.77925s0", "-2.777s-15", "0.77925s0" }, { "-0.379807s0", "3.990s-15", "-0.379807s0" }, { "-0.392517s0", "1.1080s-13", "-0.392517s0" }, { "-0.26274s0", "-7.575s-14", "-0.26274s0" }, { "0.72031s0", "4.1223s19", "-4.1223s19" }, { "0.589775s0", "-2.9271s19", "2.9271s19" }, { "0.205704s0", "-8.4906s19", "8.4906s19" }, { "0.362556s0", "6.8624s19", "-6.8624s19" }, { "-0.604004s0", "-1.42777s19", "1.42777s19" }, { "-0.53121s0", "2.3539s19", "-2.3539s19" }, { "-0.684906s0", "8.179s-24", "-0.684906s0" }, { "0.43084s0", "-5.849s-24", "0.43084s0" }, { "0.153358s0", "3.633s-24", "0.153358s0" }, { "0.93678s0", "9.13s-24", "0.93678s0" }, { "0.78924s0", "-7.766s-24", "0.78924s0" }, { "0.33867s0", "3.510s-24", "0.33867s0" }, { "8.0573s9", "-0.86206s0", "8.0573s9" }, { "9.3318s9", "-0.93273s0", "9.3318s9" }, { "-4.26515s9", "0.464104s0", "-4.26515s9" }, { "-3.35557s9", "-0.93267s0", "-3.35557s9" }, { "-6.81614s9", "-0.64528s0", "-6.81614s9" }, { "-5.099s9", "0.67011s0", "-5.099s9" }, { "-4.2206s9", "4.9182s9", "-9.1389s9" }, { "-5.18173s9", "2.267s9", "-7.4487s9" }, { "5.53314s9", "6.08856s9", "-5.5542s8" }, { "9.88s9", "-3.3333s9", "1.32132s10" }, { "4.87404s9", "7.17075s9", "-2.2967s9" }, { "-2.9911s9", "-1.37177s8", "-2.85393s9" }, { "-8.1379s9", "3.023s-15", "-8.1379s9" }, { "4.8877s9", "-1.1596s-13", "4.8877s9" }, { "-1.89071s9", "-4.330s-14", "-1.89071s9" }, { "8.7563s9", "-4.676s-14", "8.7563s9" }, { "-4.4533s9", "2.743s-15", "-4.4533s9" }, { "4.0261s9", "2.1618s-13", "4.0261s9" }, { "9.1731s9", "-8.0954s19", "8.0954s19" }, { "6.984s9", "1.09772s19", "-1.09772s19" }, { "-9.8832s9", "-8.0905s19", "8.0905s19" }, { "-8.5769s9", "-6.24565s19", "6.24565s19" }, { "8.5486s9", "2.77396s19", "-2.77396s19" }, { "-9.4026s9", "-3.5611s19", "3.5611s19" }, { "5.1003s9", "-1.9535s-23", "5.1003s9" }, { "1.88706s9", "-1.6304s-23", "1.88706s9" }, { "-9.4567s9", "-1.9848s-23", "-9.4567s9" }, { "9.6498s9", "-1.57531s-21", "9.6498s9" }, { "-5.733s9", "1.23215s-21", "-5.733s9" }, { "-4.0567s9", "-5.229s-24", "-4.0567s9" }, { "-4.379s-14", "-0.0201035s0", "0.0201035s0" }, { "-4.036s-14", "0.82034s0", "-0.82034s0" }, { "1.6661s-13", "-0.70753s0", "0.70753s0" }, { "3.360s-14", "0.60217s0", "-0.60217s0" }, { "4.977s-14", "-0.95905s0", "0.95905s0" }, { "-2.967s-14", "0.55465s0", "-0.55465s0" }, { "4.394s-14", "2.01859s9", "-2.01859s9" }, { "3.683s-14", "4.77836s9", "-4.77836s9" }, { "-6.887s-14", "-9.26s9", "9.26s9" }, { "-2.643s-15", "-5.6812s9", "5.6812s9" }, { "-8.498s-14", "-9.3728s9", "9.3728s9" }, { "9.033s-14", "2.18002s9", "-2.18002s9" }, { "3.113s-14", "-9.207s-14", "1.232s-13" }, { "-3.239s-15", "-1.2957s-13", "1.26331s-13" }, { "3.098s-15", "-6.117s-15", "9.2151s-15" }, { "1.7706s-13", "4.829s-14", "1.2877s-13" }, { "2.793s-15", "8.620s-14", "-8.3407s-14" }, { "-5.019s-14", "4.125s-14", "-9.144s-14" }, { "-9.495s-14", "-6.06994s18", "6.06994s18" }, { "9.385s-14", "-7.9288s19", "7.9288s19" }, { "-3.099s-14", "-6.64095s19", "6.64095s19" }, { "3.397s-15", "2.92222s19", "-2.92222s19" }, { "-8.463s-14", "-4.9708s19", "4.9708s19" }, { "-2.735s-15", "-9.2672s19", "9.2672s19" }, { "-2.974s-14", "-7.975s-24", "-2.974s-14" }, { "-2.1853s-13", "2.736s-24", "-2.1853s-13" }, { "3.243s-15", "-6.867s-24", "3.243s-15" }, { "4.792s-14", "-2.659s-24", "4.792s-14" }, { "4.672s-14", "7.831s-24", "4.672s-14" }, { "2.0285s-13", "2.741s-24", "2.0285s-13" }, { "-9.1884s19", "-0.22573s0", "-9.1884s19" }, { "3.32245s19", "0.7651s0", "3.32245s19" }, { "4.13513s17", "0.85135s0", "4.13513s17" }, { "2.2249s19", "0.45778s0", "2.2249s19" }, { "4.9103s19", "0.84862s0", "4.9103s19" }, { "4.27386s19", "-0.06662s0", "4.27386s19" }, { "-6.725s19", "5.11246s8", "-6.725s19" }, { "-2.40906s19", "7.2238s9", "-2.40906s19" }, { "6.1667s19", "-7.4303s9", "6.1667s19" }, { "-7.746s19", "-4.29687s8", "-7.746s19" }, { "-1.81419s19", "-5.68164s9", "-1.81419s19" }, { "7.0665s19", "-8.9546s8", "7.0665s19" }, { "2.47788s19", "-2.2961s-13", "2.47788s19" }, { "-7.4962s19", "-3.378s-14", "-7.4962s19" }, { "1.72135s19", "7.168s-14", "1.72135s19" }, { "8.3699s19", "4.887s-14", "8.3699s19" }, { "-4.5701s19", "-8.009s-14", "-4.5701s19" }, { "-2.845s18", "1.1087s-13", "-2.845s18" }, { "6.4084s19", "-4.569s19", "1.09774s20" }, { "1.33888s19", "-6.8446s19", "8.1835s19" }, { "-4.0631s19", "1.50864s19", "-5.57174s19" }, { "-5.61754s18", "2.6413s18", "-8.2588s18" }, { "-9.0749s19", "6.21626s19", "-1.5291s20" }, { "-8.5269s19", "6.2002s19", "-1.47271s20" }, { "3.15773s19", "5.433s-24", "3.15773s19" }, { "5.1563s19", "-1.6366s-23", "5.1563s19" }, { "-5.8449s19", "3.282s-24", "-5.8449s19" }, { "4.70947s19", "1.5640s-23", "4.70947s19" }, { "-4.32334s19", "-1.0593s-23", "-4.32334s19" }, { "7.9621s19", "5.610s-24", "7.9621s19" }, { "8.164s-24", "0.133362s0", "-0.133362s0" }, { "-1.57089s-21", "0.3154s0", "-0.3154s0" }, { "-3.736s-24", "-0.66536s0", "0.66536s0" }, { "-6.923s-24", "-0.431366s0", "0.431366s0" }, { "3.345s-24", "0.77436s0", "-0.77436s0" }, { "-1.4322s-23", "0.799644s0", "-0.799644s0" }, { "-1.3249s-23", "-4.22035s9", "4.22035s9" }, { "2.707s-24", "-6.5029s9", "6.5029s9" }, { "-3.490s-24", "-2.5205s9", "2.5205s9" }, { "-1.0086s-23", "1.35048s9", "-1.35048s9" }, { "1.4406s-23", "1.55487s9", "-1.55487s9" }, { "3.370s-24", "-4.3973s9", "4.3973s9" }, { "-1.31249s-21", "3.448s-14", "-3.448s-14" }, { "-7.706s-24", "-1.9488s-13", "1.9488s-13" }, { "-9.8403s-22", "2.2940s-13", "-2.294s-13" }, { "-3.355s-24", "1.0187s-13", "-1.0187s-13" }, { "9.5635s-22", "-8.663s-14", "8.663s-14" }, { "-5.713s-24", "-3.169s-14", "3.169s-14" }, { "2.645s-24", "-5.2307s19", "5.2307s19" }, { "-9.960s-24", "-9.2854s19", "9.2854s19" }, { "8.036s-24", "-7.11434s19", "7.11434s19" }, { "3.475s-24", "-4.845s19", "4.845s19" }, { "-3.062s-24", "4.91714s19", "-4.91714s19" }, { "-2.541s-24", "-2.91276s19", "2.91276s19" }, { "1.4371s-23", "1.1606s-23", "2.76508s-24" }, { "-1.8769s-23", "2.965s-24", "-2.1734s-23" }, { "3.713s-24", "-1.7581s-23", "2.1294s-23" }, { "-5.954s-24", "-2.764s-24", "-3.19s-24" }, { "3.21502s-22", "8.56s-24", "3.12942s-22" }, { "9.969s-24", "5.912s-24", "4.057s-24" }, }; cln-1.3.3/tests/test_I_logorc2.cc0000644000000000000000000000042011201634740013501 0ustar #include "test_I.h" int test_I_logorc2 (int iterations) { int error = 0; int i; // Check against logior. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); ASSERT2(logorc2(a,b) == logior(a,lognot(b)), a,b); } return error; } cln-1.3.3/tests/timeLFsin.cc0000644000000000000000000000172511201634741012527 0ustar #include #include #include #include #include #include "float/lfloat/cl_LF.h" #include #include #include #include #include using namespace cln; #include using namespace std; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); extern int cl_sin_algo; uintL len = atoi(argv[1]); #if 0 cl_LF one = cl_I_to_LF(1,len); cl_F x = scale_float(random_F(one),-1); cout << x << endl; #else cl_F x = sqrt(cl_I_to_LF(2,len))-1; #endif cl_F y; #if 0 cl_sin_algo = 0; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { y = sin(x); } } cout << y << endl; cl_sin_algo = 1; #endif { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { y = sin(x); } } cout << y << endl; } cln-1.3.3/tests/test_MI_recip.cc0000644000000000000000000000056211201634741013361 0ustar #include "test_MI.h" int test_MI_recip (int iterations) { int error = 0; int i; // Check against multiplication. for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); cl_modint_ring R = find_modint_ring(m); cl_I ai = testrandom_I(); if (gcd(m,ai)==1) { cl_MI a = R->canonhom(ai); ASSERT2(a*R->recip(a) == R->one(), m,a); } } return error; } cln-1.3.3/tests/test_I_xgcd.cc0000644000000000000000000000135211201634741013065 0ustar #include "test_I.h" int test_I_xgcd (int iterations) { int error = 0; int i; // Check against gcd. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); cl_I u, v; cl_I g = xgcd(a,b,&u,&v); ASSERT3(g == gcd(a,b), a,b,g); ASSERT4(g == u*a+v*b, a,b,u,v); if (a != 0 && b != 0) { if (abs(a) == abs(b)) { ASSERT4((u == signum(a) && v == 0) || (u == 0 && v == signum(b)), a,b,u,v); } else if (mod(abs(a),abs(b)) == 0) { ASSERT4(u == 0 && v == signum(b), a,b,u,v); } else if (mod(abs(b),abs(a)) == 0) { ASSERT4(u == signum(a) && v == 0, a,b,u,v); } else { ASSERT4(abs(u) <= floor1(abs(b),2*g) && abs(v) <= floor1(abs(a),2*g), a,b,u,v); } } } return error; } cln-1.3.3/tests/timesqrtmodp.cc0000644000000000000000000000350411201634741013362 0ustar #include #include #include #include #include #include #include #include #include using namespace cln; #include using namespace std; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); cl_I len = cl_I(argv[1]); int e = (argc > 2 ? atoi(argv[2]) : 0); if (e < 1) e = 1; if (len <= e) exit(0); cl_I p; do { p = ((random_I((cl_I)1 << (len-1-e))*2+1) << e) + 1; } while (!isprobprime(p)); cout << "p = " << p << endl; cl_modint_ring R = find_modint_ring(p); cl_MI x = R->random(); cl_MI a = square(x); sqrt_mod_p_t sol; #if 0 extern int cl_sqrt_algo; cl_sqrt_algo = 1; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { sol = sqrt_mod_p(R,a); } } if (sol.condition) cerr << "p not prime!" << endl; else { if (sol.solutions == 0) cerr << "No sqrt found!" << endl; if (!(sol.solution[0] == x || sol.solution[0] == -x)) cerr << "Wrong result!" << endl; } cl_sqrt_algo = 2; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { sol = sqrt_mod_p(R,a); } } if (sol.condition) cerr << "p not prime!" << endl; else { if (sol.solutions == 0) cerr << "No sqrt found!" << endl; if (!(sol.solution[0] == x || sol.solution[0] == -x)) cerr << "Wrong result!" << endl; } cl_sqrt_algo = 3; #endif { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { sol = sqrt_mod_p(R,a); } } if (sol.condition) cerr << "p not prime!" << endl; else { if (sol.solutions == 0) cerr << "No sqrt found!" << endl; if (!(sol.solution[0] == x || sol.solution[0] == -x)) cerr << "Wrong result!" << endl; } } cln-1.3.3/tests/exam_FF_plus.cc0000644000000000000000000002002311201634740013174 0ustar #include "exam.h" #include #include static plus_test ffloat_plus_tests[] = { { "0.79351956", "0.07393837", "0.8674579" }, { "-0.52145976", "-0.14409256", "-0.6655523" }, { "-0.094845235", "-0.091273725", "-0.18611896" }, { "-0.11106694", "-0.90595967", "-1.0170267" }, { "0.46902913", "0.6453068", "1.114336" }, { "-0.30989015", "0.6634996", "0.35360944" }, { "-0.58887166", "-3.1150198E9", "-3.1150198E9" }, { "0.08032262", "-8.451643E9", "-8.451643E9" }, { "-0.734433", "7.601292E9", "7.601292E9" }, { "0.77958024", "-4.2334996E9", "-4.2334996E9" }, { "-0.5492505", "4.4427484E9", "4.4427484E9" }, { "-0.45681345", "4.7386803E9", "4.7386803E9" }, { "-0.5951412", "7.866326E-11", "-0.5951412" }, { "0.8511461", "8.396644E-11", "0.8511461" }, { "-0.94777477", "-7.635105E-11", "-0.94777477" }, { "-0.20783025", "-1.7222382E-11", "-0.20783025" }, { "0.82520634", "-5.3449255E-11", "0.82520634" }, { "0.7797032", "3.7409843E-11", "0.7797032" }, { "0.9915549", "5.16192E19", "5.16192E19" }, { "-0.6311349", "2.1599532E19", "2.1599532E19" }, { "0.42801672", "4.8533796E18", "4.8533796E18" }, { "-0.11165339", "6.518633E19", "6.518633E19" }, { "-0.5133993", "-5.5200484E19", "-5.5200484E19" }, { "0.11643493", "-1.0541451E19", "-1.0541451E19" }, { "-0.7063649", "8.243067E-21", "-0.7063649" }, { "8.4728E-4", "-7.5151976E-21", "8.4728E-4" }, { "-0.47157037", "-8.748518E-21", "-0.47157037" }, { "0.7662331", "-5.6591384E-21", "0.7662331" }, { "-0.9418909", "-4.455382E-21", "-0.9418909" }, { "-0.88412094", "6.6664897E-21", "-0.88412094" }, { "5.5891533E9", "-0.11624104", "5.5891533E9" }, { "-8.760519E9", "0.22073412", "-8.760519E9" }, { "6.8390047E9", "-0.6434584", "6.8390047E9" }, { "5.1620844E9", "-0.93939686", "5.1620844E9" }, { "9.21372E9", "-0.93054956", "9.21372E9" }, { "-2.7403366E9", "-0.9354063", "-2.7403366E9" }, { "6.4755876E9", "7.780013E9", "1.4255601E10" }, { "3.6402857E9", "-4.6589404E9", "-1.0186547E9" }, { "9.858497E9", "-3.1216233E9", "6.7368735E9" }, { "-5.199144E9", "-8.3410964E9", "-1.354024E10" }, { "-2.2145843E9", "7.4088115E9", "5.194227E9" }, { "3.6034734E9", "-4.7355105E9", "-1.1320371E9" }, { "-3.974853E9", "8.344858E-11", "-3.974853E9" }, { "9.633741E9", "9.879035E-11", "9.633741E9" }, { "-5.84563E9", "-2.8054357E-11", "-5.84563E9" }, { "1.6814709E8", "-6.702281E-11", "1.6814709E8" }, { "6.627381E8", "8.1083654E-11", "6.627381E8" }, { "6.617609E9", "-7.74835E-11", "6.617609E9" }, { "-4.325255E9", "7.48992E19", "7.48992E19" }, { "8.963769E9", "5.6527995E19", "5.6527995E19" }, { "3.2307428E9", "-3.772047E19", "-3.772047E19" }, { "-1.5719092E9", "9.119215E19", "9.119215E19" }, { "-3.1338138E9", "2.7048826E19", "2.7048826E19" }, { "-4.4506363E9", "9.624759E19", "9.624759E19" }, { "1.8499094E9", "4.968932E-21", "1.8499094E9" }, { "1.1302281E9", "1.590079E-21", "1.1302281E9" }, { "5.7261727E9", "-3.3212954E-21", "5.7261727E9" }, { "1.8314988E9", "-6.247946E-21", "1.8314988E9" }, { "-7.301286E9", "-8.870309E-21", "-7.301286E9" }, { "8.0970737E9", "-6.944993E-21", "8.0970737E9" }, { "9.076142E-11", "0.79629874", "0.79629874" }, { "-2.5569331E-11", "-0.11109424", "-0.11109424" }, { "5.817238E-11", "0.8669617", "0.8669617" }, { "5.0001194E-11", "0.1629681", "0.1629681" }, { "-5.314657E-11", "0.33499128", "0.33499128" }, { "3.4244614E-11", "0.7846571", "0.7846571" }, { "5.016508E-11", "1.2850774E9", "1.2850774E9" }, { "-6.236206E-11", "-3.9463657E9", "-3.9463657E9" }, { "-9.461717E-11", "-2.86016E9", "-2.86016E9" }, { "9.271425E-11", "9.936099E9", "9.936099E9" }, { "-9.330213E-12", "4.2810826E9", "4.2810826E9" }, { "8.8110796E-11", "-7.967343E9", "-7.967343E9" }, { "-3.252064E-11", "9.310712E-11", "6.058648E-11" }, { "9.2616026E-11", "-4.2321837E-11", "5.029419E-11" }, { "-6.138445E-11", "2.0083374E-11", "-4.130108E-11" }, { "-1.672895E-11", "-4.1673078E-11", "-5.8402026E-11" }, { "-5.054619E-11", "-1.9569606E-11", "-7.0115795E-11" }, { "-6.765585E-11", "6.200571E-11", "-5.65014E-12" }, { "-8.958499E-11", "9.627367E18", "9.627367E18" }, { "-3.639458E-11", "-6.774422E19", "-6.774422E19" }, { "5.885664E-11", "7.710968E19", "7.710968E19" }, { "-2.8348934E-11", "-6.8805507E19", "-6.8805507E19" }, { "3.783013E-11", "-4.363011E19", "-4.363011E19" }, { "9.9192224E-11", "7.840148E19", "7.840148E19" }, { "1.5157771E-11", "-6.578477E-21", "1.5157771E-11" }, { "3.269849E-11", "-1.5641468E-21", "3.269849E-11" }, { "-2.4697334E-11", "-5.9471063E-21", "-2.4697334E-11" }, { "-7.226034E-11", "-8.027814E-21", "-7.226034E-11" }, { "6.705153E-12", "1.3146739E-21", "6.705153E-12" }, { "-9.281199E-11", "1.940757E-22", "-9.281199E-11" }, { "6.841885E19", "0.29873258", "6.841885E19" }, { "-7.487633E19", "-0.41199452", "-7.487633E19" }, { "9.324847E19", "-0.12986994", "9.324847E19" }, { "1.7454827E19", "-0.9480438", "1.7454827E19" }, { "-2.2794772E19", "-0.85242146", "-2.2794772E19" }, { "-1.4789046E18", "-0.3244334", "-1.4789046E18" }, { "-1.0913384E19", "6.2691034E8", "-1.0913384E19" }, { "9.054158E19", "6.7361736E9", "9.054158E19" }, { "-2.404365E19", "2.819194E9", "-2.404365E19" }, { "3.0628145E19", "3.8188636E9", "3.0628145E19" }, { "-3.7020847E19", "-4.248917E8", "-3.7020847E19" }, { "8.556466E19", "-5.431256E9", "8.556466E19" }, { "4.8590555E19", "-4.0259546E-11", "4.8590555E19" }, { "-1.990289E19", "-3.2150872E-11", "-1.990289E19" }, { "-1.5843934E19", "5.37822E-11", "-1.5843934E19" }, { "1.596058E19", "2.465645E-11", "1.596058E19" }, { "8.179266E19", "-8.080585E-11", "8.179266E19" }, { "8.673572E19", "-2.1405459E-11", "8.673572E19" }, { "-4.5302206E19", "4.4819714E19", "-4.824921E17" }, { "2.1413618E19", "-7.160984E19", "-5.0196224E19" }, { "9.760235E19", "-7.810464E19", "1.949771E19" }, { "-7.518544E19", "-5.7398474E19", "-1.32583915E20" }, { "-2.459352E19", "6.0089863E19", "3.5496343E19" }, { "-9.009707E19", "1.9710512E19", "-7.0386556E19" }, { "4.9167807E19", "-1.261897E-21", "4.9167807E19" }, { "-8.647001E18", "-1.4144885E-21", "-8.647001E18" }, { "-6.2763383E19", "6.69688E-21", "-6.2763383E19" }, { "1.6851938E19", "-4.9109547E-21", "1.6851938E19" }, { "-7.0371058E19", "-9.246501E-21", "-7.0371058E19" }, { "-2.8498996E19", "3.3614294E-21", "-2.8498996E19" }, { "-4.8211753E-21", "0.5153807", "0.5153807" }, { "-9.730312E-21", "0.3705088", "0.3705088" }, { "-8.83036E-21", "0.21063423", "0.21063423" }, { "1.8688595E-21", "-0.38304192", "-0.38304192" }, { "-7.9137435E-21", "-0.9482965", "-0.9482965" }, { "-5.7913193E-21", "-0.16538233", "-0.16538233" }, { "-4.667948E-21", "5.69782E9", "5.69782E9" }, { "-1.6254025E-21", "1.100067E9", "1.100067E9" }, { "5.4919865E-21", "9.125866E9", "9.125866E9" }, { "2.1973532E-21", "-5.218964E9", "-5.218964E9" }, { "-4.018586E-21", "-6.5943096E9", "-6.5943096E9" }, { "-7.7845274E-22", "4.172669E9", "4.172669E9" }, { "-2.843846E-21", "9.243441E-12", "9.243441E-12" }, { "1.1533075E-21", "3.327943E-11", "3.327943E-11" }, { "5.977113E-21", "6.507544E-11", "6.507544E-11" }, { "1.1817801E-21", "-4.1877824E-11", "-4.1877824E-11" }, { "1.932947E-21", "9.4013144E-11", "9.4013144E-11" }, { "8.526454E-21", "8.396772E-11", "8.396772E-11" }, { "-4.8870485E-21", "5.9277504E19", "5.9277504E19" }, { "-4.7174987E-21", "2.5545484E19", "2.5545484E19" }, { "-8.818029E-21", "1.2602901E19", "1.2602901E19" }, { "-1.2268113E-21", "-9.071741E19", "-9.071741E19" }, { "-7.0568975E-21", "-6.9825405E19", "-6.9825405E19" }, { "8.723312E-21", "-5.802767E19", "-5.802767E19" }, { "7.1661314E-21", "4.10364E-21", "1.1269772E-20" }, { "8.181265E-21", "-4.6898657E-21", "3.4913997E-21" }, { "-8.570217E-21", "-5.5145446E-21", "-1.4084761E-20" }, { "1.3507604E-23", "-7.152723E-21", "-7.139215E-21" }, { "-7.859527E-21", "-9.369602E-21", "-1.7229128E-20" }, { "-4.9014434E-21", "1.4580911E-21", "-3.443352E-21" }, }; cln-1.3.3/tests/timepi.cc0000644000000000000000000000277211201634741012127 0ustar #include #include #include #include #include #include #include #include #include using namespace std; using namespace cln; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); #if 0 uintL len = atoi(argv[1]); extern cl_LF compute_pi_brent_salamin (uintC len); extern cl_LF compute_pi_brent_salamin_quartic (uintC len); extern cl_LF compute_pi_ramanujan_163 (uintC len); extern cl_LF compute_pi_ramanujan_163_fast (uintC len); cl_LF p; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_pi_brent_salamin(len); } } // cout << p << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_pi_brent_salamin_quartic(len); } } // cout << p << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_pi_ramanujan_163(len); } } // cout << p << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_pi_ramanujan_163_fast(len); } } // cout << p << endl; #else // Here the argument is N *decimal* digits, not N*32 bits! int n = atoi(argv[1]); float_format_t prec = float_format(n); cl_F p; cerr << "Computing pi" << endl; { CL_TIMING; p = pi(prec); } cerr << "Converting pi to decimal" << endl; { CL_TIMING; cout << p << endl << endl; } #endif } cln-1.3.3/tests/exam_LF.cc0000644000000000000000000000024511201634740012143 0ustar #include "exam_LF_plus.cc" #include "exam_LF_minus.cc" #include "exam_LF_mul.cc" #include "exam_LF_div.cc" #include "exam_LF_floor.cc" DO_TESTS(lfloat,cl_LF,cl_LF) cln-1.3.3/tests/timeLFsinh.cc0000644000000000000000000000216111201634741012672 0ustar #include #include #include #include #include #include "float/lfloat/cl_LF.h" #include #include #include #include #include using namespace cln; #include using namespace std; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); extern int cl_sinh_algo; uintL len = atoi(argv[1]); #if 0 cl_LF one = cl_I_to_LF(1,len); cl_F x = scale_float(random_F(one),-1); cout << x << endl; #else cl_F x = sqrt(cl_I_to_LF(2,len))-1; #endif cl_F y; y = exp(x); // fill cache #if 0 cl_sinh_algo = 0; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { y = sinh(x); } } cout << y << endl; cl_sinh_algo = 1; #endif { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { y = sinh(x); } } cout << y << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { y = exp(x); y = (y-recip(y))/2; } } cout << y << endl; } cln-1.3.3/tests/test_I_plus1.cc0000644000000000000000000000033211201634740013200 0ustar #include "test_I.h" int test_I_plus1 (int iterations) { int error = 0; int i; // Check against "+". for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); ASSERT1(plus1(a) == 1+a, a); } return error; } cln-1.3.3/tests/exam_LF_div.cc0000644000000000000000000003316311201634740013012 0ustar #include "exam.h" #include #include static div_test lfloat_div_tests[] = { { "0.8476517865511829377L0", "0.14598720922015648169L0", "5.8063428370144327317L0" }, { "-0.16515392772872533974L0", "0.2885771921352848653L0", "-0.5723041606534907598L0" }, { "-0.25791761734650428572L0", "-0.17472849542471660309L0", "1.4761050664322265015L0" }, { "-0.9418668871216534004L0", "-0.25801526180943099573L0", "3.6504309106230792821L0" }, { "-0.25726582509610465451L0", "0.7704327058756196045L0", "-0.33392381078074095957L0" }, { "-0.021409432992321506645L0", "-0.44293479613874918959L0", "0.048335405524597819813L0" }, { "-0.26771090178828336857L0", "-7.7011892538310270067L9", "3.4762280599078659542L-11" }, { "0.82867609196336006595L0", "-3.0042819216966844948L9", "-2.7583166745395210866L-10" }, { "0.40732354689187331287L0", "-7.559832309976744222L9", "-5.387997116739304149L-11" }, { "-0.53349543673778000914L0", "-5.104278761341346705L8", "1.045192595628502556L-9" }, { "0.17669669311850475256L0", "-9.181879875841464834L9", "-1.9244064996255633173L-11" }, { "-0.38525727576606363245L0", "-4.8936643582468263693L9", "7.872572525674472248L-11" }, { "0.028580272067667963345L0", "-7.9841173999044091L-11", "-3.5796407587907142282L8" }, { "0.72167998280372380157L0", "-3.6437273419914776347L-12", "-1.980609181391958688L11" }, { "-0.5863461999919387516L0", "7.881986348526466578L-11", "-7.4390664239294943926L9" }, { "0.54541403791059564303L0", "-2.6107257402815120583L-11", "-2.089128051619026705L10" }, { "0.7985324354238058011L0", "9.752737902348257611L-12", "8.187777047012979847L10" }, { "0.14104671220162837288L0", "-1.679932803469743255L-11", "-8.3959734526470136372L9" }, { "0.84226961154302812054L0", "-3.7790325979515268584L19", "-2.2287968936801211454L-20" }, { "-0.17023320737807742781L0", "-7.0544793122604881768L19", "2.4131222141684768152L-21" }, { "0.51147038234753495475L0", "7.2890488826322506176L19", "7.01697012303244035L-21" }, { "0.15424860911694467965L0", "-9.2121691156562017736L19", "-1.6744005367291526718L-21" }, { "0.18043991101271504866L0", "-1.5135729370916590423L19", "-1.1921454631676461953L-20" }, { "-0.8669749687756526617L0", "8.7133495928438747096L19", "-9.949961946754488136L-21" }, { "-0.6448505560111598971L0", "3.636469578348857873L-21", "-1.7732873659951112376L20" }, { "-0.81857582399766609004L0", "5.2916132942068490006L-21", "-1.546930545536701092L20" }, { "0.77524450276763022L0", "-7.652595302708246449L-21", "-1.0130478250865714831L20" }, { "0.627858729575384142L0", "9.627326573065363056L-21", "6.5216311590796329432L19" }, { "-0.42943946308533227006L0", "-2.2414950519882640498L-21", "1.9158617490786266339L20" }, { "-0.34220208112358558038L0", "-7.4545803279812700505L-21", "4.5904942473972275588L19" }, { "5.560943842255079481L9", "-0.55841023848214400133L0", "-9.958527725728472542L9" }, { "-8.661678305761957921L9", "-0.87958882986448744696L0", "9.847417351919312785L9" }, { "3.6954900583503502368L9", "-0.36989453222048823558L0", "-9.9906587863470431315L9" }, { "6.740385471899914443L8", "-0.2745720588185960522L0", "-2.454869406924301959L9" }, { "-5.1381279403866914758L9", "-0.32555782051482221485L0", "1.578253574821668073L10" }, { "-3.2065087686035281697L9", "0.50505516522796299416L0", "-6.3488287802308291444L9" }, { "-7.7979994067331648055L9", "-6.4459990751639263853L9", "1.2097425574847536075L0" }, { "-4.7272619195621447717L9", "-3.825695015629283172L8", "12.356609453314103588L0" }, { "-3.5376744034596315073L9", "2.7483444719369282795L9", "-1.2872019645217230068L0" }, { "-2.2400216393287578975L9", "-3.7058330823204350567L9", "0.6044583200509807153L0" }, { "3.0621742151056386386L9", "-8.846101104908494769L9", "-0.34616088814613589822L0" }, { "7.5149875074517868906L9", "4.423024956398348232L9", "1.6990606161017937287L0" }, { "7.6970261502618782055L9", "-9.7716080626747355186L-11", "-7.876928854384493259L19" }, { "-8.725835744855911806L8", "8.409822932470646079L-11", "-1.0375766309139670758L19" }, { "5.820797723708174118L9", "-2.882166534035175912L-11", "-2.0195910454760464445L20" }, { "1.207852991950790034L9", "5.840354579417081103L-11", "2.068115857567237665L19" }, { "3.1046967393071541823L9", "-5.5642977043818474125L-11", "-5.5796740294147564416L19" }, { "4.392532668212736406L9", "-7.535498815249885942L-11", "-5.8291199771983175508L19" }, { "1.3280881496906639524L9", "-1.766515912740190632L19", "-7.518121632035316941L-11" }, { "1.4277961930808139626L9", "-8.986506745304867108L19", "-1.5888222571321021114L-11" }, { "-7.9134656119390343763L9", "-3.4095849226963530828L19", "2.3209469162249057589L-10" }, { "-8.7882725472722691335L9", "-5.186325400713441962L19", "1.6945085138821670647L-10" }, { "3.8930727351090315925L9", "-7.3980221641298868864L19", "-5.2623155875161027887L-11" }, { "9.998404421166073569L9", "-8.1317115085820412065L18", "-1.2295571984586471158L-9" }, { "4.623792381028250544L9", "6.996281129080973142L-21", "6.6089287947690416075L29" }, { "8.472924939037688662L9", "-4.3460987737519244214L-22", "-1.9495472560839050376L31" }, { "1.9551595642940545935L9", "-7.5324972045717692564L-21", "-2.5956326450508222435L29" }, { "-8.5478772651240992225L9", "-2.4212066230883777513L-21", "3.5304204042779411337L30" }, { "6.881700625121950854L9", "-8.203099619911879591L-21", "-8.389146717684109215L29" }, { "6.097099876947129031L9", "-4.76850418677518328L-21", "-1.2786189627046213921L30" }, { "-5.0358061432469478737L-11", "-0.6780392915138573621L0", "7.427012278305451381L-11" }, { "-1.49762284327640383L-11", "0.15227257119521089694L0", "-9.835145171066142436L-11" }, { "-7.1678035946969115934L-11", "0.75360681415553320054L0", "-9.511330656861051013L-11" }, { "4.583894304978394541L-12", "0.68934670181533335835L0", "6.6496210004445016106L-12" }, { "-3.8885547056166489716L-12", "-0.010643810658165133798L0", "3.6533482513930678043L-10" }, { "9.49880444227161124L-11", "-0.122629749019578004226L0", "-7.745921783428843474L-10" }, { "2.1990660545226500317L-11", "-1.4161745224867819854L9", "-1.552821364602098501L-20" }, { "9.951737846856727225L-11", "-6.0164204240154494783L9", "-1.6540961477912788069L-20" }, { "-5.873282338412930208L-11", "2.3788798751415933107L9", "-2.4689276662460085614L-20" }, { "2.2209512664584027642L-11", "5.1944018613813348683L9", "4.2756631576205975403L-21" }, { "-6.722318330051584872L-11", "6.7936247801916195024L9", "-9.895039169151724367L-21" }, { "-7.528877773200399613L-12", "-9.535757813603057891L9", "7.89541630604357328L-22" }, { "-2.0857643618410047184L-11", "2.701544718271986855L-11", "-0.77206360780699598463L0" }, { "2.5510439626733908612L-11", "1.6734405694946451074L-11", "1.5244305708709866576L0" }, { "3.048460642905138835L-11", "5.1568899955161432057L-11", "0.5911432366321058725L0" }, { "9.876491787625061464L-12", "8.667781903943973216L-11", "0.113944858062604306884L0" }, { "1.1166642175553123016L-11", "-7.759981600144040302L-11", "-0.14390036923986841014L0" }, { "-2.7282824760136843772L-11", "-9.160281916489131182L-11", "0.2978382653379466574L0" }, { "-3.1587174777348029438L-11", "-4.9090150171793744104L19", "6.4345239659701453497L-31" }, { "-4.512784364891002838L-11", "5.9600731551720265308L19", "-7.571692909465218857L-31" }, { "-1.431681316436341718L-11", "-4.22349605246125618L19", "3.3898014788057508284L-31" }, { "-6.719040537613210677L-11", "-4.545488183802435408L19", "1.47817797911258332435L-30" }, { "2.5092238442261623676L-11", "3.3004591427193857704L19", "7.602650830449936487L-31" }, { "-6.198495042920933878L-12", "1.8747110273916984954L19", "-3.306373596972410786L-31" }, { "8.3326031863190006605L-11", "6.3679312781687389584L-21", "1.3085259281747860217L10" }, { "2.228308172351851791L-11", "-4.6204647093882084617L-22", "-4.822692764700068564L10" }, { "9.7676469315043868665L-11", "-6.6370355345926113967L-21", "-1.4716882078745621587L10" }, { "-8.9713798012161717115L-11", "-3.669192301028840519L-21", "2.445055768459069116L10" }, { "7.214258511983827207L-11", "-1.5195990661514104949L-21", "-4.7474749574931692373L10" }, { "1.4822028144092954099L-12", "2.269595713994387529L-21", "6.530690929974856047L8" }, { "-4.6354687290142894644L19", "0.032331325634476806982L0", "-1.4337391486574910728L21" }, { "-2.389352438897577318L19", "0.8660312577952003013L0", "-2.7589678979723536864L19" }, { "-2.4109458405628950432L19", "0.26688102636777617506L0", "-9.0337851040803631776L19" }, { "8.961066349333904704L19", "-0.66178143682771294813L0", "-1.35408245844568974384L20" }, { "6.6419769467305502364L19", "-0.8456142496793601811L0", "-7.854618047471472417L19" }, { "3.7389082257286159308L19", "0.56261989685796304976L0", "6.645531462021022254L19" }, { "7.814283695666500025L19", "-4.6620013293904720047L9", "-1.6761650509199167363L10" }, { "6.6434731737611309404L19", "-2.858805223329136325L9", "-2.323863521567472329L10" }, { "-1.3409334390407788129L19", "6.1497605350647401055L9", "-2.1804644772671013651L9" }, { "7.0858597943822241668L19", "-2.58410378455919273L9", "-2.7420956684179617314L10" }, { "-6.6455998228898640428L19", "-7.7545004942277582046L9", "8.569990843171226794L9" }, { "2.9602494058183339616L19", "-5.7169856186590364077L9", "-5.1779899465842692843L9" }, { "-6.698311323164055808L19", "-6.553232827426109497L-11", "1.02213846197113193186L30" }, { "-7.554561034956199475L19", "6.4764910162760040714L-11", "-1.1664589692120175174L30" }, { "6.7796490729162210612L19", "9.9915237995070190003L-11", "6.785400514434773617L29" }, { "-6.9067747658009050975L18", "-2.5761632749585983355L-11", "2.681031452058062687L29" }, { "1.629413698021581386L19", "-8.612780517302459862L-11", "-1.8918555915226283107L29" }, { "8.8732593909692189064L19", "-4.0536919536865455935L-12", "-2.1889328277398133904L31" }, { "4.8426213700963381164L19", "7.883038261101094331L19", "0.61430900240485778846L0" }, { "-5.2968355222513127376L19", "1.5071497411718048594L19", "-3.5144719715328600349L0" }, { "-6.2610887651422622925L18", "1.0358424497888766788L19", "-0.60444411854509194816L0" }, { "-2.4670994205369878408L19", "6.9747461294856021948L19", "-0.3537188844920639511L0" }, { "6.9460731069354980812L19", "3.1486762233902586798L19", "2.2060296499639734035L0" }, { "8.8228286449463631936L19", "6.7354354317536527728L19", "1.3099121406987093833L0" }, { "3.2098388728662261428L19", "-2.6305167886064038438L-21", "-1.2202312818412901165L40" }, { "-7.144492994496515916L19", "-2.0335028635662185032L-21", "3.5133921483478965099L40" }, { "-6.3695870249569899508L19", "1.9319318539671607067L-21", "-3.2970039869042198792L40" }, { "-5.4056057590545112688L19", "6.6371220252553042967L-21", "-8.144502599899959829L39" }, { "-4.5534797093596626272L19", "9.223324048915255164L-21", "-4.9369182793650108047L39" }, { "3.9206183123968272208L19", "-1.6559061178638737343L-21", "-2.3676573629998072004L40" }, { "-8.768637785982664131L-21", "-0.18184176456694917492L0", "4.8221253279547290195L-20" }, { "2.6823352573966718016L-21", "-0.55524799130252431824L0", "-4.830877912956219511L-21" }, { "-4.0350541003620172524L-21", "0.27000304046926068644L0", "-1.4944476526446376082L-20" }, { "6.332356861830292899L-21", "0.65544003241974460534L0", "9.6612299350294242524L-21" }, { "3.5603120340723305693L-21", "-0.124100556644984066966L0", "-2.86889288035778711L-20" }, { "5.5961094005028721084L-21", "0.47201702367299511838L0", "1.18557363820414998006L-20" }, { "1.7187188076305931646L-21", "8.3685668129856246863L9", "2.0537791548292745125L-31" }, { "-2.7220241842791803757L-21", "2.2892422122227956846L9", "-1.1890503196846804849L-30" }, { "-6.028203796038167925L-21", "-5.415224539645905615L9", "1.1131955382282900156L-30" }, { "6.6310444174308960725L-21", "9.461342958972558645L9", "7.0085657460946591684L-31" }, { "-8.8033709586752979635L-21", "2.8098765759657792274L9", "-3.1330098389284241575L-30" }, { "-3.4027974212452472475L-21", "6.219628754500815959L8", "-5.4710619484849846614L-30" }, { "8.388977931970215088L-21", "2.8213325814913435694L-11", "2.9734097947204223302L-10" }, { "-9.3496400462478483586L-21", "-9.381494249123695733L-11", "9.966045704415559596L-11" }, { "-6.936639418470504025L-21", "5.6618206553549859367L-11", "-1.2251605694909792675L-10" }, { "-2.3667892015182913211L-21", "-7.1545639578577691874L-11", "3.3080830857887236957L-11" }, { "-9.576766108065157562L-21", "-6.4350290609494113365L-11", "1.4882242204905008798L-10" }, { "-2.5955914883538434001L-22", "5.8091383646322322124L-11", "-4.4681178609147595716L-12" }, { "-2.9619491950657497217L-21", "-5.3730670726011346488L19", "5.512585558757694777L-41" }, { "2.5726455340193007026L-22", "3.0037766865540527038L19", "8.564703047118500122L-42" }, { "-2.8277317971003367574L-21", "-4.4068191966128705184L19", "6.4167184332721487087L-41" }, { "7.503784949731224261L-21", "5.9540210967055505192L19", "1.2602886062804146604L-40" }, { "1.4876876016319254574L-22", "8.6818746213386148185L18", "1.7135557313571827969L-41" }, { "2.699544264870480357L-21", "3.6796341400587007856L19", "7.3364474893892979093L-41" }, { "-7.285812539718203862L-21", "5.700589904684711396L-21", "-1.2780804551000530294L0" }, { "3.6474102791520560028L-21", "-6.343773677116707765L-21", "-0.574959080319812269L0" }, { "-4.2510720089860863712L-21", "-8.281980897162330288L-21", "0.51329169455614642465L0" }, { "5.770684998505203844L-21", "6.5700291863604419324L-21", "0.8783347584642853315L0" }, { "-4.8018196973750014744L-21", "-7.3250029580209059804L-21", "0.6555382605159211192L0" }, { "-3.9261100835261094614L-21", "-8.986577968334144672L-21", "0.436885997913830856L0" }, }; cln-1.3.3/tests/timeexp1.cc0000644000000000000000000000120111201634741012356 0ustar #include #include #include #include #include #include #include #include namespace cln { // FIXME: don't use internal functions! extern cl_LF compute_exp1 (uintC len); } using namespace cln; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); uintL len = atoi(argv[1]); cl_LF p; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = compute_exp1(len); } } // cout << p << endl; } cln-1.3.3/tests/timemul.cc0000644000000000000000000000120611201634741012303 0ustar #include #include #include #include #include #include #include using namespace cln; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); cl_I m1 = cl_I(argv[1]); cl_I M1 = (cl_I)1 << (intDsize*m1); cl_I m2 = (argc>2 ? cl_I(argv[2]) : m1); cl_I M2 = (cl_I)1 << (intDsize*m2); cl_I a = random_I(M1); cl_I b = random_I(M2); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_I p = a * b; } } } cln-1.3.3/tests/exam_I_floor.cc0000644000000000000000000020470211201634740013237 0ustar #include "exam.h" #include #include static floor_test integer_floor_tests[] = { { "7853255233330224291", "-3336928547114505419", "-3", "-2157530408013291966" }, { "14068934522023857270", "16292006600125740074", "0", "14068934522023857270" }, { "10985143198741137410", "2820546847025452162", "3", "2523502657664780924" }, { "-8108344024060626734", "17657489924906565585", "-1", "9549145900845938851" }, { "9793321542618752251", "18086526939764980195", "0", "9793321542618752251" }, { "-17146297557940039430", "12031974228591547856", "-2", "6917650899243056282" }, { "-11002425733929018635", "317353195315898710776749437474283191162", "-1", "317353195315898710765747011740354172527" }, { "-7045772845268193739", "-89864936462331315327547597221973588375", "0", "-7045772845268193739" }, { "-3519209948682231610", "336646025916394184314065151550367317320", "-1", "336646025916394184310545941601685085710" }, { "-14043580588957562420", "-222396907959379818229719625081455476397", "0", "-14043580588957562420" }, { "-9551193686327136711", "75278849342865310446781730521816023755", "-1", "75278849342865310437230536835488887044" }, { "-5159693807678286583", "-271047212583781769863421872046042817014", "0", "-5159693807678286583" }, { "-468628810409465000", "4096333242794181573565417750313678008664626221486481835906739336082806890901464399325558358976385254948318232837795406709018062193288308568894691407903633", "-1", "4096333242794181573565417750313678008664626221486481835906739336082806890901464399325558358976385254948318232837795406709018062193288308100265880998438633" }, { "-5244261521146873643", "4921965954460062114436531997676458648483262898583452823054595308486273272424691697564822554202559195140246785942292198280651275061385828405859241079703409", "-1", "4921965954460062114436531997676458648483262898583452823054595308486273272424691697564822554202559195140246785942292198280651275061385823161597719932829766" }, { "-7155077620310044967", "8812163272024170253854686552273644496512722723120222844613502711675792665532423218585794856067792762737333036865054171911349107383532358686613366666267909", "-1", "8812163272024170253854686552273644496512722723120222844613502711675792665532423218585794856067792762737333036865054171911349107383532351531535746356222942" }, { "-6816314458740361202", "12075686527410596248188273566406493470578404199548730085391183041200273406509336777783445118538744079686672261898288597639090345296674064493442338947240247", "-1", "12075686527410596248188273566406493470578404199548730085391183041200273406509336777783445118538744079686672261898288597639090345296674057677127880206879045" }, { "-1890766085089344496", "-7408951123352997019624764400646833541081866912262454311449242781355699966135127365870537542305320515188627454777019144990896651509964466134772403923321917", "0", "-1890766085089344496" }, { "-17760474272160473768", "10671898954663586353020741847122236830297651230263271051052178674502913972809415507874936117140992859978582852208528956402833042707438860216609301338079639", "-1", "10671898954663586353020741847122236830297651230263271051052178674502913972809415507874936117140992859978582852208528956402833042707438842456135029177605871" }, { "17203040353218460773", "-2087162439393804055245476778327445230668947133920484097696589818636894139336038424853265430700117127209095408439503149361955520500062568298413951113007815520417010757436097548975086796164496676384718866185751276003374984886645837833063272909444571294955778352876647505220277070946109654595325494251711661808952794932834009121950804034627054856954463330684354292113876259596011570415522831755074832239680022834732540878425796300024337145992774113324576942861121693541507092307262607720008434123040550199401165667835993232451530119579950363100932584067714571588474895040209606410481479858029354372704983248137195749442", "-1", "-2087162439393804055245476778327445230668947133920484097696589818636894139336038424853265430700117127209095408439503149361955520500062568298413951113007815520417010757436097548975086796164496676384718866185751276003374984886645837833063272909444571294955778352876647505220277070946109654595325494251711661808952794932834009121950804034627054856954463330684354292113876259596011570415522831755074832239680022834732540878425796300024337145992774113324576942861121693541507092307262607720008434123040550199401165667835993232451530119579950363100932584067714571588474895040209606410481479858029354372687780207783977288669" }, { "-669078238914427842", "-2079683283534812796000190145696654156804430677578086735229530182730363039425073862859919937645919418081821481495275802097707156965850792454067873053943961704938117974314269568411834037549827330778321735965757574814268024643310969429104824266062514450939201453648232801402417276979456869834703061150723202264463831469016146310260625377771326468627250569024458585844135123967133684658903385261562998370487428947011971199332502829621504477139578507890165895257527873153869666215808793006714467381179632834850697420959155528830942491523671012905291756947015477293335637719271764878661266856465788562934083754663149622043", "0", "-669078238914427842" }, { "7327608361251253460", "-11696871058150243071087622230096689496181624466205249401376348902965608647385664229774648233384515557654898456058685820740766304363182039373157014626506361274439760335671626498691756724181737933201816787306863365879304649516313681157144055793349950077334014446025781487249267998958541998722387302987853596488202173446477234627919885268339967510098356435511938337505060706688248914394292741973765745281640737883810857064447143652281758869836897346742791897670275478332406904414773228555812810686551346417028168391700814494167715137071887755902595471083839770070956620494992791342919563605887139693691074220696797086954", "-1", "-11696871058150243071087622230096689496181624466205249401376348902965608647385664229774648233384515557654898456058685820740766304363182039373157014626506361274439760335671626498691756724181737933201816787306863365879304649516313681157144055793349950077334014446025781487249267998958541998722387302987853596488202173446477234627919885268339967510098356435511938337505060706688248914394292741973765745281640737883810857064447143652281758869836897346742791897670275478332406904414773228555812810686551346417028168391700814494167715137071887755902595471083839770070956620494992791342919563605887139693683746612335545833494" }, { "294675307927425004", "-9548883545732446060252072829565833006884749934819836721462955213854827688043000170303649263042149519854567992890424662453846646328000352698376041008580371118805742958892669824820331301849741711055204656684075622499980143446475914450482604391515448002257899292716976191315018524528823574850034894770209999447615978958086058881855069519056370913875205852377738400734853568252684386414540818555760214483168738870291995504569592275824832746669965860852593991220739290892286776371571179317949624919667076576237866033103387061005489130212740740367035039239029315995502459013799346342754507246725497131746887762156527202924", "-1", "-9548883545732446060252072829565833006884749934819836721462955213854827688043000170303649263042149519854567992890424662453846646328000352698376041008580371118805742958892669824820331301849741711055204656684075622499980143446475914450482604391515448002257899292716976191315018524528823574850034894770209999447615978958086058881855069519056370913875205852377738400734853568252684386414540818555760214483168738870291995504569592275824832746669965860852593991220739290892286776371571179317949624919667076576237866033103387061005489130212740740367035039239029315995502459013799346342754507246725497131746593086848599777920" }, { "14347605674351973575", "16781108313723465798753322947549009969874803839178924211234447140560213638432451682705091051257464849827979202356053729300113370530117630421654608371240669238603643549128642643200948947465613904905607632005913664436128507306181734648889038561843797684348733053132088104433891457988693229945931772136047702319895617567109469705064237812979865949533824478284021673220084274688077361876364538071423609125747407610677136416454538389383594373243559248761308999294417964846813960148782443892858983199711111035244418968070018974928177662516580063782128203214203321005133744081558995859628472663680467632605080081460859254457", "0", "14347605674351973575" }, { "-13687180458303546035", "-19965807258690898827399047857329749541944041888361526571512375013574840494217451526698619297248029675659091093507275385543103914023886879938416253663550378748995953654394575052030527774451712268159052917447058332864628753215292671454945836228787137495936035900814206996568155366945096185932229795907560606361081170245972586794828085080152240904698184990372898689089164281206741448028676272453255619644103230837682506759429084083781590844603079867247577101977877828608823440256009103689824572652465343135798570848914557962085239341382269526989381779235955669274286569338275810475113610787290242075588029043316765795281", "0", "-13687180458303546035" }, { "-18925243707105550517292233464727657082", "9190307209239173280", "-2059261271274988371", "2728041824926269798" }, { "-2268729715267556753620172461333386061", "2091801429708129323", "-1084581778674907194", "1902605633041663601" }, { "240105871177433673480858499581307555362", "-18137436669813972164", "-13238136984210147236", "-7622864679137983342" }, { "-262280851402380072992262860428676408462", "-16900353177245877861", "15519252683754978805", "-1413263307002672357" }, { "232088877459084367318095567773397104766", "6879279671528853911", "33737380734733937751", "5401711328350210605" }, { "28127709642032836544705999676759725409", "10932535648386303235", "2572844081801336427", "10537089091686284064" }, { "-306937202176830380291551701368328539229", "-296436198830834971825518518346845101512", "1", "-10501003345995408466033183021483437717" }, { "53182351345555180643155906117731554036", "-239211638592486301383761475381736024507", "-1", "-186029287246931120740605569264004470471" }, { "280879521805922529084106054377533635149", "86259942955448859132329436894499980462", "3", "22099692939575951687117743694033693763" }, { "270479016313808755540727122565065208981", "324912300098276215771804552548480817149", "0", "270479016313808755540727122565065208981" }, { "-36931767825051824504116995033958612864", "319307981922121038618879980001580483695", "-1", "282376214097069214114762984967621870831" }, { "107405040163562716679444439233633957914", "-141652913538112981614728925754765362880", "-1", "-34247873374550264935284486521131404966" }, { "184790583924323275311064238756309559899", "9405763068924930772523308542613843828189472529194204592633223103364008985533829727911596099340788835060163612329614413033927995456162272921833539208882402", "0", "184790583924323275311064238756309559899" }, { "-232146313651929815140292892576650425884", "127874042542498530491272428412953321188339770863893691736473766303033699167382382296818126363236257463426694846772750451609560841554300961480864245159756", "-1", "127874042542498530491272428412953321188339770863893691736473766303033699167382382296818126363236257463426694846772518305295908911739160668588287594733872" }, { "8728026917336931021644334642968359261", "-4025737651718879467086249421940400743845718511565541383201031450532496911741243591880148294568060736532264934821412351158153056198557273134546519285439196", "-1", "-4025737651718879467086249421940400743845718511565541383201031450532496911741243591880148294568060736532264934821412342430126138861626251490211876317079935" }, { "-21247806463473594155821742168531145877", "9874623814693251335287095436063900170315895560443374584548447111313954604343515085076726174459237734570523327188441412904116251434030306488421699399082287", "-1", "9874623814693251335287095436063900170315895560443374584548447111313954604343515085076726174459237734570523327188441391656309787960436150666679530867936410" }, { "286071012976663674972497644839812778135", "8117963470049102990205107814791130105126121536354646949522748212681559213640860255350655907507344188574393108661850973221437234442503731759547377868482253", "0", "286071012976663674972497644839812778135" }, { "-31984072490103846239901254171623218449", "5692584577100138206704178766874348327662006017031045734962382737701553237360572309466111381682998567474445884555969155997528896962520199289069413649945515", "-1", "5692584577100138206704178766874348327662006017031045734962382737701553237360572309466111381682998567474445884555969124013456406858673959387815242026727066" }, { "-118786321298036108045826901623494422286", "-13104687393529855246189161514016061367829206536234756076440701117699438900634808212710497707688898041370523685367660273492555927331371333817584456923437812254937564791326005224466260676246116823279440552837098144298072108885163702544652442198253976130758036230979750526665070549806140578651660117367824058664768255971820333797528263566114021182845197585116811208610765478558726491630221448907739229750716647693886681440731920621825762708622208585945445501310666367635378515829380161368994361558247741326227866296163878689192696502960274515396418704173356117106149549811507516298161494760216869495774889685228097554343", "0", "-118786321298036108045826901623494422286" }, { "-243504960196882294351576664380857968998", "-21587937181410571895883243216668490389074705797891859245233974857468088393972175783210897703383951091997858590608339069503309630378648345491373074180865032523580053667127292664354305946146706860083207200717386662398495588729927890691458790805600368902559075452315483293077820819619965677979632040202844747133012382862591603017396270452230496812292060122531819615885125296991557805051862986461441377986436031061301043809602913037623299360710776463563079053501286633046825608308134411478010516309133407298319800662521169341026639016773610132691088293480775753098006068864600975258749129292334356727402877150032641596013", "0", "-243504960196882294351576664380857968998" }, { "-232153120215337418381368832017470265942", "30369869998519160635038439385899036531726274899243107662193573776561025086030508184579231487739439638990032661366370630132003795988534362627493292132764049369361254377811101088096885616264297545296183017838644655031800075015262568240918564555865889092855166242732548296118581123607728694721796055009838837557999873738362196508994398492388283391000153200151108985088421583241872508945550713986000643154770628316896294096213588875028875159647959209523043158262383137987983806573391208706198841017176042216759223869369001945418516819972673432636326816040752486579776281338052626173120273068890045743383055115108151149136", "-1", "30369869998519160635038439385899036531726274899243107662193573776561025086030508184579231487739439638990032661366370630132003795988534362627493292132764049369361254377811101088096885616264297545296183017838644655031800075015262568240918564555865889092855166242732548296118581123607728694721796055009838837557999873738362196508994398492388283391000153200151108985088421583241872508945550713986000643154770628316896294096213588875028875159647959209523043158262383137987983806573391208706198841017176042216759223869369001945418516819972673432636326816040752486579776281338052626172888119948674708325001686283090680883194" }, { "-259060284965774946595436776839639567158", "-21169437398760148980356190208468018621145492999838564155598571671707045137252408058263155870788514173361612648418947991691931017566701206182096411121805142388703524692384188551391839307655250861401059757668540803453257330609840260191124331324376455691656017965418225557221321063048013134701879342357330536176553693912196231407222911508076200690973402778332647229863066211873019193191946948707769594605725700542299351271155436324879464212647734978854222464094486372144771948169422844206687239103281296767882465060755610256361348437002775612357787333990788742488962974294617778863800504758143312112916148210635178700875", "0", "-259060284965774946595436776839639567158" }, { "-306407220440527520801126245152934343544", "23776904469041910002999929986640006577749806048379780143306978176280330224333859620859305982085584460504452577150094943864349273103240498588108336792264540481132832425653265046674475461727185564436156797869482735166850827691928781085870354146365177855543550807539877079785312955597311473866546268560309551339704009052837019611095284429480282839060448969927393502922337023493529232757886223011597039473438267362519775173848264262428693937605086393282678388857244739695710639089112115821491015511241179389623611704128686301802869094211111183507607222840602723592206395532989319304742353354849715544201896997806941793031", "-1", "23776904469041910002999929986640006577749806048379780143306978176280330224333859620859305982085584460504452577150094943864349273103240498588108336792264540481132832425653265046674475461727185564436156797869482735166850827691928781085870354146365177855543550807539877079785312955597311473866546268560309551339704009052837019611095284429480282839060448969927393502922337023493529232757886223011597039473438267362519775173848264262428693937605086393282678388857244739695710639089112115821491015511241179389623611704128686301802869094211111183507607222840602723592206395532989319304435946134409188023400770752654007449487" }, { "-195344089877883615473604540022799066156", "3662747206396136814780716441352319011395583880744440623779519524132715621398922492090110915810914165138435343905061143614931233310311653264955206314385113727380922840781471233570237875610273247058183529977038444774890036917021403875269188605058323112809901006876685005810599540694986877767813641408707144817551209014119080068666341132956917595575721029282915413432788003670940873484464479035116187361986468817764174983360339341760904395062935668506379254915132158079325547293981795720009601997338615068852024788929328937759791477545407878160402653256560646902444406842976796122784294159073232675729939439754133572694", "-1", "3662747206396136814780716441352319011395583880744440623779519524132715621398922492090110915810914165138435343905061143614931233310311653264955206314385113727380922840781471233570237875610273247058183529977038444774890036917021403875269188605058323112809901006876685005810599540694986877767813641408707144817551209014119080068666341132956917595575721029282915413432788003670940873484464479035116187361986468817764174983360339341760904395062935668506379254915132158079325547293981795720009601997338615068852024788929328937759791477545407878160402653256560646902444406842976796122588950069195349060256334899731334506538" }, { "9264891165355739565190184416501921531110089392234481682785663537978152834210043205322426048946857682928713233093454298987718151514375312698287977140085629", "7037874176512351849", "1316433191754927814343121270936699199595699278862016004420926865721433832616431797693201713416985056700387482358940219476958754936526117", "3725966351458345296" }, { "4200307032774171266112621290628586259036811354993551074625290503853725932886889027855146647188583607214617803535833936888841730747156500044307235280341823", "1284895891758199540", "3268986273297707492966046995014614916998242647231210827092764188090140439361457237468815188241626314878458369000334553644889671709204514", "686385384999618263" }, { "4633581426210593840116821588308941075113609939505374670564216205139790589811590001728944069668539972864711443927654873778749890460797761818777105143436310", "-2962967916964005701", "-1563831116658993795279542101101791208522139405163357327177345954575873595639420625598557391282445499923781922172975036467881769387028636", "-2305528351410817526" }, { "12717552468498637611743035736272812618998169576927971614333302239794587794960622996075191568720328790968571121428403438724885597787608886055291630047062012", "13314634913503466421", "955155928128432692468469826248574845938797371431354312846155816839032798664341688948121282840353830287784283921940330056923616110441287", "3054936783550538185" }, { "12062294501874959722722826646961478850437392058690935960962546316456440331759806886386062852332964852589981740852222339370133938328830299239599161668985128", "-16763340409247566945", "-719563894032763567901416565485723597235798340734444183600832520303761799320002945942723929422229544393458648487318438477478730610009081", "-8784252901936442417" }, { "3044847544275515285523698330617680562098304367055502952571345800359603621492376638228899902071703358030930686556600015395721763778348780143354036450288026", "-346996692199522190", "-8774860431593785670059820118794469144363980632658525112469174051232043754755411530275560319174086707639904288765947602493995823751245651", "-238735003065207664" }, { "2509912747961300370421908848463238376627618739583712646450568707494390365647434163992939257405972498499963653610934135188560348612028561201284997136414467", "-103539220471632131715513528655357150478", "-24241178719797015812049763065806339919024561304709065585003455368093218973185992185403749066840410575011438662859226", "-96472873114015658715754743886276195561" }, { "903584156603757584665316743639288345339689627067279191353819345586609786559389840933430566508676924801215959188934167984436460131912383813696092800782502", "331768089796013775863175470747253254043", "2723541486944457282998823558887230609702011905460231484608706829329099534108144630923237396663979818212898288888162", "206235332161320659528701690369799443536" }, { "5673315779132616764913839385550510388979090539569302085655840858178135330568442902409259209441411672724870197775936862625748838206738247202566588717953664", "174314453261637397091517016624017866910", "32546445076572334426551736182476341541840123356058415149120265601377736759669652080905093959104527787429999911903291", "116692109360780668718335531020688952854" }, { "-1042174796681883628708939541235268651605049912220225874766096393016094308719465113556241387514699104237113811358810257758037463299809921161083533137718034", "-222161050831883826404696847740663687900", "4691077903977550484144586938760520043889189188344556635834217114054282381408390083982959968194813858480017307031811", "-99596643070173880773679158795261931134" }, { "514620852714641065399283188571474686623886013323210978774935263256584816823822985571618774823719005380283570413767760460152207111047429811764462688164598", "-249379962778237023348159084806351533829", "-2063601449697349844851896329155481297775287042332288194884672211603708613220802144442049441368964502372230090742486", "-95322380544583572818596570976868394296" }, { "4269600385716644031357008587416832262633392539755787971157199376810061034292825362806383550016756143465036715717235613514913396047178769910869994174370663", "285417980748490192096950554131180300340", "14959114960171371128118740711875740516756226597819143207915053559296218628291049058344647983358827408473567791787490", "241314195989544958480263376470519624063" }, { "6257762944066060502889009610562625466881502649685643619949901701091938859953222566838296129679249506961399045004819501125771060525963805468605899184284857", "2403901388951678895074087838271029994884292204266026258064846860089259517515609086601789420041871201768080771502802345608184755582676267305500365461987443", "2", "1449960166162702712740833934020565477112918241153591103820207980913419824922004393634717289595507103425237501999214809909401549360611270857605168260309971" }, { "-11993484600336960787296361130458404039545119394875472848786275539588308627572632551925095053909141197737731742215007587172062102742960429155637516154567478", "-10601606227266649325153572936490025724316912773656025997862708934485961793376598665748396482615905529759961488391911046336857148489489874009257983913322770", "1", "-1391878373070311462142788193968378315228206621219446850923566605102346834196033886176698571293235667977770253823096540835204954253470555146379532241244708" }, { "-8099353584218727402496117482244315513694479151831901237119469501251316930293170263154474101121202090352876083340578448720444998702069748972927117400667238", "3544314361305784888681580682051379178614889611356920001389193108853540699763802421224233206957629368752496825814976307915371579698349690086107445288844845", "-3", "2533589499698627263548624563909822022150189682238858767048109825309305168998237000518225519751686015904614394104350475025669740392979321285395218465867297" }, { "-2978635751180326260478380464684854159186938695694356726729544155114559498149136630265180287452727795680214540092030170434165319182046797389540988376220992", "-11044560433803724847345327269572156674554851849210901400046696801586678634230888624140822828361962132102290537138655249676050009778590939633587416463610415", "0", "-2978635751180326260478380464684854159186938695694356726729544155114559498149136630265180287452727795680214540092030170434165319182046797389540988376220992" }, { "13340538348613289212198643243040710073441733600226599862111857175429956610033827913042723029883753278922272401272143183977342753296395660841047710386806625", "-12505012580354283714273335370179473407347376833608196161777727706326565713505585671787333065372262611606233460666323939469037058474587043990269917174242835", "-2", "-11669486812095278216348027497318236741253020066989792461443598237223174816977343430531943100860771944290194520060504694960731363652778427139492123961679045" }, { "-3452499360915990528305851079744650498637858290301947784400848134276013289408593218875969649149167701046100505360083493320272180164238716241369492874982856", "-2841735595132421145030480470066423226109731223189024018875906078709951146850527470934664784555907173906888591079310297248898808599295604861461544021697908", "1", "-610763765783569383275370609678227272528127067112923765524942055566062142558065747941304864593260527139211914280773196071373371564943111379907948853284948" }, { "-12837726014506093148099404481188410844577204272048603185395045047349565142592994407238657335674129551317417810603584063833795494760777857363295221929632592", "-5400672038070763758928059302309515863608512780764658336296609520612929827128710430832496604060142364086061442480255889774184624927820479974807630834638627053061502551989845184646873008822134065011205730341955561862333543891572685472831543459711809182159609688999832404181689665081467086838440500602969410420032314939424736094367166550148605570451238900811316075091818613634658092771400323953464835124475741159313252328998401218032670762735091435255199537815920258090766640501899817468173756745613666544200642455036991967916355826412137450931256645775349763991939102903236911444655964118925598580974976427195132959063", "0", "-12837726014506093148099404481188410844577204272048603185395045047349565142592994407238657335674129551317417810603584063833795494760777857363295221929632592" }, { "6578123342051874578301723989032639872736755816906003001838468752363433436477439123182015773040480790196872643618542950300401093404997067180920740266777136", "30227534847135453106177887048045830910966009330493682541426640262878585964314188306388368740002450969080153107270718818194095421631888634061517731024627240634873991685067246458822125591350775226166707968203074411304172314390138208453777131423508042090910198631120304798774511984974823253005683386272038346156403540545900138637964682890471751795844957640450350739073841005154467987598913264762974403365908691068629911370262907886883158252280853615622312950774196097179304856495254526220900137020823369927850276669023897589972466867500466273084668060310345544901231841857904496215091732346299276586847479136514947400671", "0", "6578123342051874578301723989032639872736755816906003001838468752363433436477439123182015773040480790196872643618542950300401093404997067180920740266777136" }, { "12403944923950846249231475663107427245396603223802100275104415443763524399953865335344297718622152249002880852792246968794311649331174399649925724682365691", "-12888526328266820415927145054786787145889555649382608442248161845973745960691528655550360088202102799744537495406020539568745771467756467183613368156733378808019164713600978887019905699871417123365613340681673916006626966649924170996253273073733852663021384681382051909095614154557333966638418401258055946731820806422207820872515345183005729150326803604361512295955159943694411555067679327842378949865992521340416781113735936437694218150384351520004302169462501770232864597266654390198260481651327159066598217103147752784312005857617885666670915444340917773878003125490279146098981790584757296196254721882965728596834", "-1", "-12888526328266820415927145054786787145889555649382608442248161845973745960691528655550360088202102799744537495406020539568745771467756467183613368156733378808019164713600978887019905699871417123365613340681673916006626966649924170996253273073733852663021384681382051909095614154557333966638418401258055946731820806422207820872515345183005729150326803604361512295955159943694411555067679327842378949865992521340416781113735936437694218150384351520004302169462501757828919673315808140966784818543899913669994993301047477679896562094093485712805580100043199151725754122609426353852012996273107965021855071957241046231143" }, { "10948926687039959668263034501276830818625159748756208667794639002017960671515169323966433371280908617310031465455790806503858320395456591407286777524363944", "15489368888944605373650389556533647343231613227589912336942045556008797399070972592836944702007913599282985878262526911196097512734678645706417084706692047107683744531285802197270639216129852640210205547180574081479052109734758880839510339349237982383997307379952940072013079809351763653427560483156946719035644278683384662348499193303099798764213152890786143522348717903997482162057330324665060570551176318195643585920374603137371921517627526609290876303058743280212715019326447206678291320236859616579863769668727778545628289338458285997742887048186232356815344233169348134282594953756462483528235310248146271138654", "0", "10948926687039959668263034501276830818625159748756208667794639002017960671515169323966433371280908617310031465455790806503858320395456591407286777524363944" }, { "11464576772189320419261665628466949872551044398628568459420638211702970737332076526558331636045640676437486199912474581890841933557822038200509907802936313", "-22467560825853172479037421968188386486420879368653733048793951227030601094142939166908251610058992921146938740897141065727494001469172869273657374887890530345239013255211792126218659779037493454354985213639803588241949068595974842726845550080803721118359501094994460828504625140423100683538018569820187798018489678377090273255263020908779694768888896507998040871877361662889436371169588814603494476932238384716309803290555316924487478792149178773379217766514013266795383492328680695659480010501872205935050314706513127406414046031915649062646891311739001532048668245929929298605152418405630093221583825629790103566902", "-1", "-22467560825853172479037421968188386486420879368653733048793951227030601094142939166908251610058992921146938740897141065727494001469172869273657374887890530345239013255211792126218659779037493454354985213639803588241949068595974842726845550080803721118359501094994460828504625140423100683538018569820187798018489678377090273255263020908779694768888896507998040871877361662889436371169588814603494476932238384716309803290555316924487478792149178773379217766514013255330806720139360276397814382034922333384005916077944667985775834328944911730570364753407365486407991808443729386130570527563696535399545625119882300630589" }, { "8938867625495530153186421114297747048040597826172184076413640033054738602015847458230139602813250873350372960139469151926251587994978713194477868118851140", "32078375072910127937267277353555359769886046039319229674839329288579279294400524798815635423380870475101996161416889444654312193048344262195882716890119398121411812112449203794619431500846260449790771355510015457009235934372609093350279916863051987911050185220414029935306290325311701907978862607656115228781358052463349741922708496995681137879712967466047121123132315277071458202185149672157950295326835513685167006326116804121841993768353882369640078584371838201520000042076939249781755766637255305083290727182613012935978235950698890245889658464214791358409590524627630419359189066595841389501082705783042993303059", "0", "8938867625495530153186421114297747048040597826172184076413640033054738602015847458230139602813250873350372960139469151926251587994978713194477868118851140" }, { "8722682937170431050833187146084378340001260037987475887522226657702929497643381574300242436757970258082372353322466430729560481174965555877218498123235127972650642792093407571195465205419575987213014443482975328738475261835806620444520634849116095235065774422144459742716160248838471185163698000228745859478158104063095766855794756463409807333016407203497851105737138480852953389782284594500871170431951978989370255765328498664056929197514187424012915608945460596104718351333193752820591185791608965252963085687083606400804224201063308456591357967802486377986437493144904666736661926951141864058594174814702200209409", "17412472792254218853", "500944526446044913245854704095754296476914947449773601840238266000641308362538841153234090543298285278030309320940403936325404298435972916448525262079072487832742313980507689645024811947475736929391921911894727993931203210832413457668815952782782949239897550712034201783959782842323270598876666346488371315244615931371511266927466746002593260083813695350859233907674818312186201150675556646229110170730257749054381148001252368819048293261475322932890858943640868603051493461480912552795132518076648186629059596407623028993206501153697237322059149347109211519809718392500920402797396035977014151301", "13717640401691531656" }, { "28355649069936648964480577421600521514076854589748655538478527484386692848040560920378270353295750065522502408426901852657385194373002516782134462463403619404085937808470896616603996134884288656277511001166614643845546560002367982733683422291378278295503032478358197654941019479109634084898326003113897170044006328598213579789377859798284810297339455100733353158770429621612618690067430491463355522146151298846940191011096497912423339688256950368577997428204387561345591508638698782496102293891198658979297125431373501637906166414269821235570899541062164735301390814949753951678580623524363615439367796948526661114273", "8633859053023126034", "3284238125245742016855698157684933898976923158153988299571059835059738533454483417199061360717949675767825259147742326435714596823475742487511565640155717557287585352355724513814056546156034557507060565711152037955657280498048473524523497495066421726381315710512047045674071154161308957202034177182801687183543929989744017034272683534975659632492076519296858840261469439577557507171156150551483889412665000065287799665100306570592222219949067222441707356112651967102951988787499729560738632591896472356839552808850928783757605816255738706660766653939585897846868373880810762740938652879077841365007", "8480542101902822035" }, { "695804210379264643979583966247939985121477063798866833769029083451619832314943028815111717357207629373097980486420088049066444875218919515464168730784010670913213630418336413807551517181427706050442981412812560910674568907086122536915068847926867597666432252300779682993163510641754139318056267379096886236384894321926559804092457910184502775704660359338939407870665678723351102313495695271753077268239934810069567863069912893064736153816317584230084541663742856849855885433861537874945479324326871485256528265492542514387227516996450338546971631790859699133015684902494112907242906699969802617955900147949678000702", "6681774530135049718", "104134643759851814351147451693200005177949603843035721223567744815305881538588822665583702468671678158123657386652154620049781061631961328262453617035662063853637317024464861861946266314086911857166878173456014196637218631863393572542109069255296051532325807248516303174349857623773438852122643289226264801658953137748153296436411578898337203701260654377419646372368642303334799023574274991890918545934625239992964365706183254509198057965378271765137299881104144690382322308740670412140492093203922319672781421992523823019735773183797196153517598307995654976625437636949948229208840097078305544042", "753510048969320546" }, { "23793846839231724395641481096168600821165863841834871677817770057997115862268350281729411419898015728222764385314741974298570203231459954889026804768374989204737469979104608191592488617915776065920825549826544170491376474603565313317103382409887303248767928207436610335921923003830631904883475966155908755916279914050461058817604412376332860234542206749755476863494453482771627934874030957391163592500144106720406855489772599751499515034904792907346159848425450017939743424553771285003901024075692162881112993617392057913260097840038314973483416617082316428401467936188718832437149607288888734084245887947167600476942", "14251636779665730013", "1669551870223134151303903342674455433642542678166026329327716199552424270739267924882373474967130314854205248773422856606186537084529373808518256136223710801915037299873741750309033582768093390015183894640465684163714303454407585554851774795653260663343812169894506517621409762650950455752948417517702896344204545008148927831629685230911115972567815995382195887880974480058637498609515045000261275580213450984765289759768577989085446697886224919418538617830152205807256503108619376475835548388022966261347231830397100233962945745245326537590040744120991719469590787920917431072137837209281279829978", "13846244437708747228" }, { "5157109352853249971318864071100809054313778706912280725237530653514718017885603638808994268309662830522966266131723296476071219223553003512249189605920498878997009866938158487186969488205976122254188731320527219934117903279062529020046834522969499499006879142996400588997334123741485390256248878878301063076286830584096271875934275097457786951285271567141607668681320623976130528011279831938224824782139301311433982239041406699687231975177586985955350651094601995816681979048980035660883809964491229857363116776116215144288428315817606755704237448380042774619545204701291306469557276264456990236770565662987790837189", "-10013270743141522218", "-515027455577944332776599219259294388811187969682242219239790206822600106136108551964834930674442778634657645567794824061780492131991288077428371773780758138983535394992930162959647831148714333399217585802721010849103285390761891312665489859363343081240130486926587552859706337223282598959658826457912110150229463850079329163597771797337822709730777565370953422223408595882843118286956939988955846229075579330815290845722563420243422752650828997772215730429207767090119357203878107337884921705286570049639435686342039828502912430702417787311741719990865608911989344378016685337998208215872207554274", "-920760231421022543" }, { "6494479986256116541104296929948745881595810377963953264991072983439840586308068782167240611739100078965050725068818882183756338815160036859027539278041681781661292616356111680897493765185363894557565156777508945778492400417041556530072176186473028646756075186621344659621007329706013704866019055199752880400583535752226648517005237843095412900402261752786336175778761394870284838510406493285835836510084377115102990988520712094164167646661458280428910514014249834132126729469995977022911113044853980749549364759880528586645949565758303087716543654543586861828638440479331739588108393797432477382024670823562517526646", "5646044948886972124", "1150270684178027997729638025310141697535651329313468129284627631873742535270359534840413194117215304029010709513909008920532146218787185595227269977210380838656683242728568521891853665038056999715825712357842110695616824097006318159870253326008969365677078769387050477555367309756230306675796151995910498740461667569866473279089249936015985131524549691332989894205425117195925594673141706705491188937755834316410829046680432307112608812689099288880996341318638564624566449876699247700823589547245730672763432749619618807750355174780947014272103851229064036660484535227006468477136474311066305263226", "3785857158573214622" }, { "-31360864680221422030140415094508859225037184177278863690330048646310966010764143021431123151508104188281687033827937090369965061135751835578522568620174870624326364591751719134017727476315825913896303730502231987133828454596458972192605628269836766485752863341723932456882638706013143064500915331711791221807863285445277518932935928879510111580179238430718068897684115464091110803073393785115849134031970572952341156248906594900067269723116623961645695573540685417690666812895681389324387236630659047254288574908905115640816788218380202062908240234242061857266935270268131606785945960533363545765413571210356588614272", "158731480268028865375787109312788454557", "-197571802564094255018835618501836237470451780852464910702917947610328490115600879542277218044587953977482033832066853445897949746594340123621010571525423525283265694134335278880857970722363261435835440841138075424370755023622549046990506755720823389094963930373207384718204282462412342807880786115573288541223692700693236309165845190755419998468567231783954117079063183652374494384463667165956585068985935341133217173168221529758860606207789154326413767211275484817995028454435144966634656180655573506329003296926488159246532512031996848763667993503525898127688305577417054301089", "22128982064863884081225183621483498301" }, { "6972688127252138459564959519023672734797720350352562732688801457617542500099509865574973489633915033719003377224851429368921013349700580153017928134596084737004044411366993842119504403376959959480789333673755655063117787017101298662107070542628327980482897959181812093955456006698786827411711446400770298021381400926276799694253767942575674933967663793055141073318481678170963516082521833862017762649825976536694779299584090771859213561628651925244725218133964348562464473355036335901024895778660125505334188112559810228121975479770611339038859346371817450184722764849484125019138077786325611240207689562646177214862", "212229494710249959442576275005814060115", "32854472639496801513625266171869868980490382632885983229822011721729192329270622778562010916862699719016516950898363598128121229189750116863530046554995732003476968354657890095157193194509736774942176733534056571834590366060961121671289385934253368995757730753667329275656966343378668081666905678760988072374390324867142186156887369444294667350127131255070935565628787125782523108523608392770938414227072810340675454608542379054058487857197652824285799185253955626498482144435788461420918351383205430463919873128183751743772403931916447474872579786344165522578418757820262494633", "202602247999430336716424978770050352067" }, { "16146477881044981814872185978005786543642189695578037880128585850657582227346785609949631520306446259385630057714250080634804935779512167368598228578137970013047546260870411704532863029107179381174130047754949458719207263855344249323475379597824225167477700328511898116621808311449385399905867898699564040099050435706021172544369947305690899952295406293447506146823515423102232662385522802025721933657658703659553626211653699561780784625213816227416468145185123310306319508640423290747072654284738002434784128270456278391972933415297337582959158202392632248570451671740383769937167912379559021602080900933189192375421", "-20310422672054016316639412907518719590", "-794984828319777650694385094127543908631549711061207837016795411776676915426259473368853160688756737034823729254185786121643208845684214393842790938031685686187522759314947140818495607328399712740082388950671812621562726517214947696883370445215206445278987678057453772575168165658852145270562955365137991966349779422574705948837912807073553643238677887356778699590679423929808592396737386221680984966466476609537799000714595283015387280145210362603689829188312020767177147038887361232908826207585485585717770550283815412266616448789002231614634998653868395118016500112836083648523", "-11799925147898511149643800539362290149" }, { "-13333386402689284528955650425278647711888918022382802858930735354762601039626630790596510115878972126652469762677159574447095103432811719733783031083771953511074739306201836852090205483055377050725227473420407492132102122918222222661174330427122421429872287465154597256840268514193104109407101719163350519145025605863849817679140939130213133277602018019855074419919415918787364400403970284236218639542926948339939839929520062948689163759711059171596722904754429438151009753108425737178467425999202826949155777669899192519705543679208977557190789421238295365156644743397621766685402593133067165504533347334868817548870", "107895899863035416090758241115761545328", "-123576395577726995467509810094692559795501216776624732643654929468261569953970620516962817836961555200657486752392956631475337670018968072148956742753944568338154539759184635744464807131713977468703479999463417456632584312098725347773265375061594795112459950102134313707118281441803361728717545150343139196161174674989680811767284271234273952364761695483244122531302983909975719498713709629935106791776293856798291478157380963024628448230576871460269799644149756524167414024818290038046315016119726155391403548599527926110598142014566712845146844517328059271906387663525750970076", "88916219636034843584282198824028056058" }, { "17396957313719309181655810621342598276769983942993211094806395284201495622288603530182348401034532670779772026613959220329662328631746748840677422913897389222211979435071300283979361385673923168895608787064277711550661080470385607194607715097404666355341496134600730286695020337462621706659365279865288817231582460135505994785679557826378614057840182487774381015927951405829305139118747627556929090278010945530871104877221509669969637405745641517281958386251071953311649218819211648218403974139963448683937267881136641329201897530450274203549882462469989176813129608929688681288830465486480047730094845155570312862849", "104186547224209978415781641589908237686", "166978921724711432713743436094800137505239032223722714964309089009506614535895519867110422644603923287110323367280581626196181748165083370852210731028149827924135420402322644021166934074442323617970930798783252483767604446788478644579242675426052418474560530381252273076756647943610269802844827006798614570113552490465455602498689920520721194207399033534120048155924790694559525815508064767545247429922864279482054330586837508112647624007190343625308333109186981945018060033849826856038685383194624273212670683254990051450794748656874003602039616482791671154071071940218956513118", "9689041137085346765396894259391897901" }, { "26296668029363560180578472840636347646283515109787546573773133131169235303278230292620358193183994696837168281782424510501462932715289179113988102147665778902989371433141498385910026219307721742927641650208826808587628688330897125412814594284814050899367007933796796475217266168539594147019546294897573039387284123267787652073296654465797846788961105602455421819896924940988943972769457383697764285807789932427485615761627567609238909525216550007481876466503244451415718439500787125259366798747857812030734235875561021422659158282642054300429948383202431010170473103089719168265166132037042278884136592980721399898848", "-145151976679874338336058059363314537", "-181166447959297097309632649706277310462287087273328158550559504514077025970552462585976881228509338936991115036681066334762526041621219901153411893847383132947014037561714726163730996723689359625350327562359371926025189504119439124542211108302015324941630060663441114185165191476531119095379776949183747807676488899740428054170566283213350742091333006110702325305863276507428847828894436119391753135134140918882254262557249907254757481730047992171259860818951015886963391969368286964814563381601392580107247382831740092922947642920341973871311541502943677603328463821550096331015449", "-110577937214275422567781046193383265" }, { "-19994387832358687564296482880955715923586831477222916410597818184152857711804843023778287694318724091304456899035183525127967566364649938785565453184727547598671504088541688780249133503129117660562371945085803761853547276588271572826270417538713473845464667687405215144939251922714172491714494707146884856110703801489923219443900691887441959990915961809557008130581221371957930424791112777130507507175854695038524747304496126685506502272017923871345301904089286401283977464945598827719321374155830270851832155999413594990591210770207211404582078047399265487243377424091264415562555479103296829671606309227114918559411", "-12290727751262531359522445814787932748157034294075544178515373320704162497192584943859172528304649072004548036058435558708785921268699678655127651925033127", "1626786325187686206254527912536268233229423573477257270053889346415589499220953871015742625081244397640382477041911954315181713027690095532216560352291641519082404655148801601548476351855968135320238312168182690718232048560912434032449056943124604465352409935769208624710904989903415445402236977791654195811881494578919123294926181940156782515461241607944723498957864382829554865120206763098110715049165623436566759235599826844834593966722456940122296028858654743", "-9304614710679256891239598861411560332304324920434685965899525875715186019084445758952863067134832791421060008856516918122255022315420901512824783987888050" }, { "29916764548363516315213840380698377536192609328827808911066465815108876776179490417834258307994776308911573596103626976278007330105709262864909645777842169226871227147054313657605129607087589187123503174807369386299991859056839377153696490642393964375926230602462747312790529261100240727992473466712957240583216041201088172946856263144111813006598318253235946940685055230369936673556047728831107329646718919450916347559724523856479721600705891348359262178740659519774585983326669798219391447115538287743254388570949370216658299333436961807924794235560183973249587386381643272943817567729138289488897133971529039695757", "8476334091496252719253471844340714224307718865976339399900779938495486609491382968889867250990569753004524377073297071391348967807704774866029247355531618", "3529446129120492576886933802306348265603546401021071145489371491655402978871242160302127070993421776756377896228018319062438889879832901903630775379375474362476945682118589732246954574638082665328364641573132346715748566497144048040413137331852635046499249704620713985392482170976329565026453768403409435575238922748145312555307402543771398751056417238642358386670853730480256387244547289563589645563705382910276075835741806800308617595407635175179549186349623407", "1121598720662440742988451944089192258208677258393969079460095922943603039995215206852920630773807538691962340221388452566848135314318278502721876458313231" }, { "-30744743258986840974825934925400463284355151584175701001085034454282509186617636999187209301942468580138651572968436145883508307958710953672541548503099036345172087541186583358599035971842953063792288589346835317805238011836025866089112384348158834439025788655670125182111347815257445264926636792871229400549827577321670531162443103810493815924151448637886392962948822485797619344455378736429734156821345757186019132123507024835777255364976075865806996283635073664232613154449751312293463363442122204887362535000774934247468263702545257658938264075634847752288018235968497021028555508346290918717339789336670514080457", "9934634309555858804270980126309615970053320780519373855793924975583204316518242194797388422238716941854010764960600214725109000476250489194524103405530739", "-3094703066162616114961725586598761886126440000450319657542750158557542422972265973994772432239434133706930345695126019787070526540238058168248601279554005834087067802027491094801318957724338773860374084056857766237802500357570852135835098188033303615905411388899090151866056131910609183545491275118194384669083917607888152562507000146957250511707959497676133004912560741040750644659008842081402439245159076407113469036885418577123982203712293205143214370192534124", "4583596897489701137708573201509728063693689464812281935974761545728663079569821440573072545991527054461975034582959468944964678550288258358252037074357179" }, { "24643502519803888691586762836893695554672668882609252497967357925433058477865049537403781351424439957461939549800248300068008928283760882152105280755728186165336818042947891471506568092832294726444765034759769551554808855491501013689374698042749154404230203678454785382207604303955330803002216399957247238380783055267792042696128953561495320963977422797650867160007702447898131066450706964885725041540562948429789541526915479497874153956586286026740960933319749986950590370162278200833957789772606366304927219928607487195862425188567871883130961914293433624774413725427494180502314592349900074269004608052919421088368", "2717450167284225996753981867457220829510500841312068511238048532529427648370573174539553585183069673827813696207263846346713773366926177883038970327669336", "9068612486988930041452615817812610262395413380750714216172624755617167719146150429506179809229439286481063525474263171526993584649905549895379552966354856688607031124385144196292585204982548068977456744404073207215088901248836694827956726571697679223311674675917482789361649212542123782029147076771863216074461137218175127751607336902080642274682219411530926094644805942929937073627694007279189212959755881318530033893691479717411893927131774283641886860168845194", "2630363844657415178536247490974293939778607568925570410250370678327072798984411202414449734187268017772490491616031334354084510652181851150192386816317184" }, { "1857471144762621226078309760048781819853808902834007243224510947324703640579895884811355396539307768563652552656687272466757001311647739575925654454617797724205998847128737511426204839085303003071906438273332520201294499647651016586411018765198623236956366866836742835368817430092030307634950795461633849978479504285561783793523293571899866834127333885745234267982498066548934305641020559144124243564372784715821253591393010485777361901806233522170298666402318233462164642692695586402286093353406704474285764942607399336515494566976327035651095257443119526233432484730549923908643983835638400244551332963304703341991", "362612878824948204766041465498605121983038344328923889813821008133012829955553725429013872301357114460102737976404433762806451909620639548491755012601032", "5122463247256360173380682454830667735994909336257131094636868172398931453441644851286253058553683806107714242214425234484025628771776577335533690016729030113210376620329656025707882934177847398968795670307669192526890837607471635669459016090183544133427748745285201703705268883110778706355536331762965138118319801447738265213248123408984033840769670544118622199016226728679039309116650227118501163822195946867970684116882706924781160720494209768961175300546225784", "299760236823448232299335077352435634442705524236228994156709162318327253866985319237312495500717724311867426639654094420477947147244359720759776119932903" }, { "-15512250050509017569431653406374218468191654707236673402325185299702995515514048891881128604127259128940966966514594946451486134694476273851559935124397715410737724278746590654901453457150411276548615199767807502093455391898384739629715289928761836102897197661380120487438391395985221415090269132778914962364055598932950972975325423902250870789291669816092405224971234605691036355433974706922342506063057313987759468269851537540937400869685698983579620650290591582484180497444639057157757973753179907365231695893268694300775677678977541920955165836544926807198464657683328635157477957240884116233992874779933793654204", "3358541127950670805593397985550958371637657834938091938230318311713415017140090677340291997759883758478618605945079413061265904587739160855880393703427541", "-4618746491270258642196486131268015112521835423420717615093174172980857448220383551186758990917205762587881579670823547496170992786073126440511182401809159567300795932372630208424356476743332043619346311088384079059435373790499576304419282368802375623485321283238175405485184862968207039638749406944454331623523507687428477960605913568521627594126207284882249627708423470608914416155986620408793531083231293214124556072929628635430705354422888702360112306375650944", "3005102575063606384680566102915562580638230938191281335082512965430334791588194853068845397234960243041587407778382851298719244486316278864423824018594500" }, { "-7795907266149417935880848054805638357926463272237741460640947569644048588447722511612181517607450880049915905557897989678236704307693907736247058983016545076253121570693500226105057772914231058133990872553093077477246778482972908671114493634160355090012802248700706280069417479488180111886570768297449284497993155476453139747448123977064178202693174347058572053686548952330935409613585349836865130827901523001778569465270141666026392762544863707172069660941583975586471593214627992137708766736399392527511202198595607734119123667475481080585901379489987633325665012548140296404667154265922084962379380813206642961141", "3266322496024458154155982586177367205241879884975448114046439840444265881425140636480586339953113858345978121218157346057285955670573379845528853928778649121198573716895875372950665878135491926664618467827249347334921049358968885123014320008238518111491029267663871866232098994215220584035091470875989416180732388925174422587186795087858194659347743269411322176680238569785902471836835335166112452646235228206195081915725782645939016905926964169376697807870023636080042287120562847150399762713196525578131013908505157176421364232903071413436786302567498639276925676203136397430977438669196132229839190136276524068288", "-3", "2003060221923956526587099703726463257799176382688602881498371951688749055827699397829577502251890694988018458096574048493621162704026231800339502803319402287342599579994125892746939861492244721859864530928654964527516369593933746697928466390555199244460285554290909318626879503157481640218703644330518964044204011299070128014112261286510405775350055461175394476354166757026772005896920655661472227110804161616806676281907206271790657955236028800958023762668486932653655268147060549313490521403190184206881839526919863795144969031233733159724457528212508284505112016061268895888265161741666311727138189595622929243723" }, { "11613527140000568192482756738253388762224453894786686024705324634643336086154640452808765642911437980109688560443031730927780624431102238262306897218656077453053740901919490705730434109001630505554615644472687423755323577388664893480041595787444776915986509240983988768996984961291424649229547505632144971266842770877960364848817464904515794389771780820407027606373375049573795106795237627834701205331678265805568350911815774813018183599320960878173351437520785364220474506113269284418886794765499703487689302735252054649064328797761871733823998210784410557300554983737071496100764692702245794941065431902323619975581", "7587249511488455291481574592043097850017617150850944854151430663857438629054661904725186504711545142985024178310267212940242316767124495452290378757849233879415880641974894427201010329762690544890887138507664079244754338469394276854749839357593153274763991475638253761900794536890806900100092838214316658164432730592513062527370014192403678448098350118128696785002089891158354556141292773760767431084006166964515144211080310413063362654706066932594296395740249062444674285627590937186704887659632200604451417990996813320236575100574875972599186794102474813935877205799664448604353627460661673753990274449050152179527", "1", "4026277628512112901001182146210290912206836743935741170553893970785897457099978548083579138199892837124664382132764517987538307663977742810016518460806843573637860259944596278529423779238939960663728505965023344510569238919270616625291756429851623641222517765345735007096190424400617749129454667417828313102410040285447302321447450712112115941673430702278330821371285158415440550653944854073933774247672098841053206700735464399954820944614893945579055041780536301775800220485678347232181907105867502883237884744255241328827753697186995761224811416681935743364677777937407047496411065241584121187075157453273467796054" }, { "-7305781671042805086205879027901218372025263744748476920370936801215407682690507181906856060500614379569331564964369672229742583709815447579920249246854986585035499467980872113078927984775191185433409825799075510115669850322522523768142598684481781858254267858499128954637862215107851239397355311785880257523971110240017078879170794103136756816178851155500522519324993786026829680880063502983144325993463559477297984845168078230705008144229777150602704982383890956566628052218375163513110904344758464487972471262152773773566261138354198738738504010228322403241824600361830597196538559114936352203702189317843297305612", "-11937423884971453925821024083751259499642447259766781297912835275709052311299551864192658177304486399283699058384364751376568714457361090099824205847610164922413207048832164141112741434740690851620879666916091683114805059397520385319965609291355819302668926633114618391597972110270104195729524521712155052417250364832858246777602394209216012243471719585422463867924602236259070514326289155605995143153426519592268534452020820494702940294360007255909971183689215427975382460838239606147437401771039532404179010791325434773433170447691511043481857627662741058910094855501029573945308325534013127380693322055343068093073", "0", "-7305781671042805086205879027901218372025263744748476920370936801215407682690507181906856060500614379569331564964369672229742583709815447579920249246854986585035499467980872113078927984775191185433409825799075510115669850322522523768142598684481781858254267858499128954637862215107851239397355311785880257523971110240017078879170794103136756816178851155500522519324993786026829680880063502983144325993463559477297984845168078230705008144229777150602704982383890956566628052218375163513110904344758464487972471262152773773566261138354198738738504010228322403241824600361830597196538559114936352203702189317843297305612" }, { "17209502052655993695999949678678881817732805080961191774214537634467104669997820051278559964292611469011761231649311262525642916746094372962648405298787080759403024379693612743720557853611946286870304197122036126838107226222151419136402861650399432372524638862075613534601535719033760228742681750726602275976151585576407980278472053570791272866409613117043122126348697545507835143620584132787128003876247255766444872271317786602207376422907474443135464267851639815814827163426470735478362760843575789201717413221027220343295978806345517086041608240978720520050196395624694268550345436208830801369557317350938753101681", "-25492366031674865714603800130440722297248675391454036922399382654290017832413394991423912006244487394226853780856833445493556957899686872020567315114599762113500546176766623020864155665149937580279148318691466089932874147998457966225079089491216886106456935347049916843309661581230809710698689198580162954443484103521650233141750002940462046212610545804018834324858009370780731978549694951052575612824613445810777717659953126577086301947235560041125102454055651800601741899891885690488712713049609045874194541526013910595588271596050758340197535035493872183554373796733932414738278642683363241812520579194986842248406", "-1", "-8282863979018872018603850451761840479515870310492845148184845019822913162415574940145352041951875925215092549207522182967914041153592499057918909815812681354097521797073010277143597811537991293408844121569429963094766921776306547088676227840817453733932296484974303308708125862197049481956007447853560678467332517945242252863277949369670773346200932686975712198509311825272896834929110818265447608948366190044332845388635339974878925524328085597989638186204011984786914736465414955010349952206033256672477128304986690252292292789705241254155926794515151663504177401109238146187933206474532440442963261844048089146725" }, { "-8264418404762904935971540586212553189369665581268178138984287355704267971035469114147004054957406066365602520300857203610010249719556414712966642864630190534880504909484466848336120976452116710282569157883499369927614177722612839620755683557142607127318366680113418741529273669250116389195268121444810596743918472573214391707744942602210637166261703132552343842498400457951297867678005414165609775233338084350550320105330065321705398390488050253072298385134487973139665686164664754618413684815943926055617247418686500187322182211450203615430634564054858334306443836925011966962933359925972720453678168762605413687214", "5659270408666391096654451960229302202479994399681938594290004159630195588392730314741316662127233421095165804881532974934939182755121225362126950700260935754690609887023434283325604581248499606543036334396521593447377999307285561199879892626309791285854660250329582118972672086769638010239857182094917068742207521552140484875546416914612991626798295801703343486711676899362639653362756374154843829963089403048720579483739833657436575344900585844370562669493206999896738589003961397524062927929845521761767153927579517203070144813897742036471334901681673999002492983666998353060616069539877603853178826800408499832716", "-2", "3054122412569877257337363334246051215590323218095699049595720963556123205749991515335629269297060775824729089462208746259868115790686036011287258535891680974500714864562401718315088186044882502803503510909543816967141820891958282779004101695476975444390953820545745496416070504289159631284446242745023540740496570531066578043347891227015346087334888470854343130924953340773981439047507334144077884692840721746890838862149601993167752299313121435668826953851926026653811491843258040429712171043747117467917060436472534218818107416345280457512035239308489663698542130408984739158298779153782487252679484838211585978218" }, { "4195250682093770808206657488351701663023767531608220002369022288787894743733460069813218793361969185403525213558437941222523116136985128137372308027033996674188008302853626391013869026313385724383785051935256506784450227965020957296318645208598488161413279403683346821629439117327209071527878791167163980953326296620631874274522101994118890706372879111377721965738161511000396672294975037034526549811513789043244305969633354034500541113123255063232374386942908997046756046017320772897856114275234707703184161983806610888947627465435762937561231247173215724615365040435541390265704981699351563837340527277633975576176", "-11523670060248463390302653643248573080204626895667435502164973305972185748470395654926094006744012148505197326052121545710242241891352369937317053719774706293090545099894988182012473466703170157783937873302934404896538337261995680454862441735502556865637909145839304694688324140057229642104588273654096346180116632418345589170248829444934471179206795690822184585196864577932274205101316913141872261673241280391442045565990088555353753789476615480189520529331131737084431448177942371080785938641454814169544682945510387155405628842164935394830439534834414364899293061798829902686953424000191565445443376301466821322836", "-1", "-7328419378154692582095996154896871417180859364059215499795951017184291004736935585112875213382042963101672112493683604487719125754367241799944745692740709618902536797041361790998604440389784433400152821367677898112088109296974723158543796526904068704224629742155957873058885022730020570576709482486932365226790335797713714895726727450815580472833916579444462619458703066931877532806341876107345711861727491348197739596356734520853212676353360416957146142388222740037675402160621598182929824366220106466360520961703776266458001376729172457269208287661198640283928021363288512421248442300840001608102849023832845746660" }, { "2823618260546496405819033080103700734250203999069672146446", "18374686479688400895", "153668921843524129851264278497298119153", "18374686475930304511" }, }; cln-1.3.3/tests/exam_DF_div.cc0000644000000000000000000003015311201634740012776 0ustar #include "exam.h" #include #include static div_test dfloat_div_tests[] = { { "-0.651381628953465d0", "-0.9237050214744277d0", "0.7051835962889135d0" }, { "0.5067986732438687d0", "0.6260017267692811d0", "0.8095803119575966d0" }, { "-0.8399445051045212d0", "0.1829250718359493d0", "-4.591740742120902d0" }, { "-0.5987041550692662d0", "-0.4124053212463479d0", "1.4517372211878756d0" }, { "0.5861382519823647d0", "-0.7560374696447822d0", "-0.7752767230673855d0" }, { "-0.012882644582824954d0", "-0.4671067448591679d0", "0.02757965866390787d0" }, { "-0.7830198970435231d0", "2.1690164135025935d9", "-3.610022921767931d-10" }, { "-0.2339206226652567d0", "2.729373380002701d9", "-8.57048817062271d-11" }, { "-0.2285806315782951d0", "-2.602073870582813d9", "8.784555817667759d-11" }, { "-0.5298716781559242d0", "1.3509547453340487d9", "-3.9222015392151683d-10" }, { "0.7287190523338418d0", "-8.244205871151566d9", "-8.839166121309548d-11" }, { "0.18973054487786212d0", "6.557593452200545d9", "2.893295326415727d-11" }, { "0.5084032300982587d0", "4.5431682148621014d-11", "1.119049980221105d10" }, { "0.6621212705475221d0", "-1.838873437953206d-11", "-3.600689731450519d10" }, { "-0.4041791750277005d0", "7.707875701307648d-11", "-5.243716825365141d9" }, { "-0.09569063343466655d0", "4.789751448902253d-11", "-1.9978204392338054d9" }, { "-0.6471008513340974d0", "1.890250884404079d-11", "-3.4233596009563705d10" }, { "-0.4301276572683971d0", "9.134844738134672d-11", "-4.708647706651978d9" }, { "-0.5061027989171409d0", "4.246468515299164d19", "-1.1918204434902915d-20" }, { "-0.9601783702217944d0", "7.495754288877955d19", "-1.2809629734615065d-20" }, { "-0.6477754868655262d0", "-8.507334914535449d19", "7.614317449272521d-21" }, { "0.1934462826116784d0", "3.6173521417193476d19", "5.347731573618163d-21" }, { "-0.7794308505212441d0", "4.172217291786081d19", "-1.8681453913144062d-20" }, { "-0.8462346361305484d0", "7.378170819620111d19", "-1.1469436759043748d-20" }, { "0.9783005897625496d0", "6.175045007596078d-21", "1.584280905740958d20" }, { "-0.9700832605850568d0", "-1.7695051741124812d-21", "5.482229013948009d20" }, { "0.07062591404368701d0", "-8.855398515753737d-21", "-7.975464223100028d18" }, { "0.4751383409805402d0", "-8.1371029771106d-21", "-5.8391585103087485d19" }, { "-0.5103510786836052d0", "8.302178001281015d-21", "-6.14719509271975d19" }, { "0.7148807879199733d0", "4.338856119331781d-21", "1.6476250151158982d20" }, { "4.180670608983218d9", "-0.8621420131862095d0", "-4.849167010818503d9" }, { "3.202209376555907d9", "0.008113117870009012d0", "3.9469528581523615d11" }, { "7.767843042272955d9", "-0.04145956871894663d0", "-1.8735947532235483d11" }, { "1.1937839884817846d9", "0.45557753834605563d0", "2.6203749921818776d9" }, { "-2.4205138097471213d9", "-0.3737757916008485d0", "6.475844247109412d9" }, { "-7.534066568550288d9", "-0.3609372553147958d0", "2.0873618496321087d10" }, { "6.098867840095913d9", "3.0464612528039427d9", "2.0019515542771322d0" }, { "4.956687716396978d9", "7.035407926465974d9", "0.704534515724495d0" }, { "6.969049109639194d9", "-8.115758334653503d9", "-0.8587058438990264d0" }, { "-8.0699835500126705d9", "-1.1896420666819375d9", "6.783539163608158d0" }, { "-2.229793060172571d9", "-2.658809828346301d9", "0.8386433043838396d0" }, { "3.0672739776038485d9", "-7.988270854370873d9", "-0.3839722054398737d0" }, { "2.477055391151669d9", "-1.3522358047779648d-11", "-1.8318220700851785d20" }, { "1.1318646612469008d9", "-8.457695758685169d-11", "-1.3382659929385544d19" }, { "-7.978772126259147d9", "6.210468872769038d-11", "-1.2847294286013678d20" }, { "-9.057338243339752d9", "7.364415429198257d-11", "-1.2298787772658011d20" }, { "-5.341117220720213d9", "4.7359651161519756d-11", "-1.1277779902779204d20" }, { "5.838003830912871d9", "-5.0625478501901024d-11", "-1.153175042225754d20" }, { "6.407156672927742d9", "5.006339136594536d19", "1.279808758079079d-10" }, { "4.687485139826675d8", "-3.5561755068968083d19", "-1.3181253655045475d-11" }, { "-5.838044723576891d9", "-6.843985743599882d19", "8.530182473036721d-11" }, { "3.9279221543350096d9", "-5.882918042982924d19", "-6.67682623765291d-11" }, { "-9.686323716926361d9", "-3.44800215666902d19", "2.8092568614527606d-10" }, { "7.301304808910639d9", "1.2845297359643038d19", "5.684029419085038d-10" }, { "4.380345662298534d9", "-4.352751895415198d-21", "-1.0063393842668593d30" }, { "8.239490918139045d9", "3.2397577733346748d-21", "2.5432428886984834d30" }, { "3.8980499504872713d9", "8.311650110069505d-21", "4.689862901910189d29" }, { "-9.425472285331268d9", "-3.294031046828316d-21", "2.861379310436876d30" }, { "2.517833161624173d9", "3.6891560299469316d-21", "6.824957093669991d29" }, { "-5.463519676339016d9", "-7.298583081866205d-22", "7.485726496576409d30" }, { "1.39357009199772d-11", "0.417842407627649d0", "3.335157146709649d-11" }, { "8.58494900746665d-11", "-0.6481371063028898d0", "-1.3245575548724563d-10" }, { "-9.310282234439046d-11", "0.9146343299129254d0", "-1.0179239866631073d-10" }, { "-8.800556770159418d-11", "-0.9305573406536135d0", "9.45729659601417d-11" }, { "-1.3361456473382827d-11", "0.06420301636905124d0", "-2.081125970247039d-10" }, { "6.1406425153971765d-12", "-0.3082496074575478d0", "-1.992100676476244d-11" }, { "-3.6962256202372035d-11", "3.089420488573177d9", "-1.1964139015418631d-20" }, { "-6.145126590884831d-11", "-6.225608984106817d9", "9.870723661849874d-21" }, { "9.052281678541901d-11", "-6.9187138778508625d9", "-1.3083763598782874d-20" }, { "-3.4950245360118636d-11", "7.543342567738434d9", "-4.633257080169575d-21" }, { "-3.482822570743636d-11", "-3.87599225187502d9", "8.985628309909062d-21" }, { "-9.42226868788213d-11", "7.501937454180854d9", "-1.2559780383974101d-20" }, { "-4.8165035309367155d-11", "9.484620130429997d-11", "-0.5078225026096383d0" }, { "6.880022773725747d-11", "-9.699156104509544d-11", "-0.7093424107822056d0" }, { "1.5817962388036865d-11", "-7.11651152335492d-11", "-0.22227129593095693d0" }, { "-7.0140750853949335d-12", "-4.4677941652531186d-11", "0.15699190307254357d0" }, { "-2.6947489262085355d-11", "8.365454450205894d-11", "-0.3221282169723859d0" }, { "8.703167674410303d-11", "-4.88739813223768d-11", "-1.7807363834354917d0" }, { "1.165112061543483d-12", "-5.899528740399518d19", "-1.9749239520860124d-32" }, { "7.126386981630328d-12", "5.091741402945837d19", "1.3995971942933598d-31" }, { "-7.132349854872655d-13", "7.70347159367981d19", "-9.258617712985763d-33" }, { "4.507266517270466d-11", "-1.6192737232544485d19", "-2.7835111831566513d-30" }, { "-3.025128309814261d-11", "-5.606736896306867d19", "5.395523930874836d-31" }, { "-5.390258677516223d-11", "6.628750121976767d18", "-8.131636550373976d-30" }, { "-8.484515181627938d-11", "6.226893371743352d-21", "-1.3625598954575508d10" }, { "5.110456708789676d-11", "-7.434814854731122d-21", "-6.873683889434922d9" }, { "-7.784815533665352d-11", "-8.942884975553875d-21", "8.705038200698988d9" }, { "6.06871371776654d-11", "-8.4720755768444d-21", "-7.163195916657484d9" }, { "6.395725883763629d-11", "3.2465500186809204d-21", "1.970006883295217d10" }, { "8.23766365482318d-11", "3.5665958051648335d-21", "2.3096712116618633d10" }, { "-6.882125490660233d19", "0.680553203393516d0", "-1.0112545876418106d20" }, { "-8.955858402134752d19", "0.11144092291315044d0", "-8.03641801236189d20" }, { "4.517225460957592d19", "-0.5804969398143229d0", "-7.781652496570381d19" }, { "-9.741926397385082d19", "-0.9037000739789977d0", "1.0780043819728059d20" }, { "9.654390326446178d19", "-0.061963385089831124d0", "-1.558079874501655d21" }, { "9.50855454738802d19", "0.30375471599023185d0", "3.130339727036138d20" }, { "4.323538184184934d19", "-2.6027608151521606d9", "-1.661135421670383d10" }, { "4.0554081767557594d17", "4.814123702784068d9", "8.423979995384136d7" }, { "5.12727309625028d19", "1.761988796449604d9", "2.9099351293162037d10" }, { "-7.335661993746345d19", "-4.961351435504d9", "1.4785612527368061d10" }, { "3.7135994768593306d18", "3.273427798269768d8", "1.1344681189614824d10" }, { "1.3911083524706402d19", "8.651242909451927d9", "1.6079866985942366d9" }, { "6.473382688386894d19", "-3.700509647679497d-11", "-1.7493219325738552d30" }, { "7.25328632809461d19", "6.793518758100849d-11", "1.0676773828651782d30" }, { "7.053090091571119d19", "8.009021819073383d-11", "8.806431360661643d29" }, { "-1.6322872380348074d19", "-1.234889420758779d-11", "1.3218084231637898d30" }, { "-7.716951191497702d19", "-2.473367210466666d-11", "3.12001839388891d30" }, { "-2.1174708383466066d19", "-9.66632270128099d-11", "2.1905650202077337d29" }, { "4.0902039392392786d18", "-5.029423690873208d19", "-0.08132549951322827d0" }, { "1.4562115759233494d17", "4.2665150414889705d19", "0.0034131171735308037d0" }, { "-3.309692589578652d19", "1.1329455009949342d19", "-2.9213166799922274d0" }, { "3.059130103268258d19", "-7.719433592654628d19", "-0.3962894513632647d0" }, { "5.622979366632147d19", "-8.407251901594788d19", "-0.6688248945610293d0" }, { "-7.457587910839625d18", "1.102755747735572d19", "-0.6762683328700153d0" }, { "1.2026615920578564d19", "-3.77964792582931d-21", "-3.1819407935832407d39" }, { "-2.74643694419756d19", "2.538907641816601d-22", "-1.0817396028760112d41" }, { "8.267361397156658d18", "-4.986401395715489d-21", "-1.6579815263689556d39" }, { "9.876393891158812d19", "-5.792612775193684d-22", "-1.7049981199250076d41" }, { "3.927461252713038d17", "4.810589424292295d-21", "8.164199656866003d37" }, { "7.29943837795987d19", "-4.8820727437034755d-21", "-1.4951514983823475d40" }, { "-7.837850970911807d-21", "0.41514160181315674d0", "-1.8879945870708947d-20" }, { "1.1499234744049124d-21", "0.4643166529612681d0", "2.4765932194571437d-21" }, { "-1.094368243984769d-21", "0.9008053219044149d0", "-1.2148776404552516d-21" }, { "2.4821206327531197d-21", "0.22988631081892086d0", "1.0797165885654937d-20" }, { "-4.56226662576732d-22", "0.6695285124602162d0", "-6.814148375851899d-22" }, { "6.442796853653397d-21", "-0.0419134640377401d0", "-1.5371663978553802d-19" }, { "-5.584403218169678d-21", "-8.092869169805251d9", "6.9003997235062955d-31" }, { "-9.796722996869492d-21", "-3.2988270899833827d9", "2.9697594719700335d-30" }, { "9.441829923771915d-22", "5.464575083746736d9", "1.7278250877830762d-31" }, { "-6.419360319610147d-21", "-7.333962810289677d9", "8.752921831841952d-31" }, { "7.973734412555454d-21", "-9.367577614661436d9", "-8.512055880994846d-31" }, { "8.105484193881594d-21", "-8.664550975192905d9", "-9.354765431108951d-31" }, { "-5.3151708182942476d-21", "-3.406928289732576d-11", "1.560106455516696d-10" }, { "-7.026602845639829d-21", "-9.92483846943868d-11", "7.079815824989677d-11" }, { "-5.901970468193158d-21", "2.074489043942647d-11", "-2.8450236868815825d-10" }, { "-6.40466723844613d-21", "-2.551008177490094d-11", "2.510641594550906d-10" }, { "8.056066940872177d-21", "4.645883100460603d-11", "1.7340227394170724d-10" }, { "7.453765056481805d-21", "6.956136187014756d-11", "1.0715381148511711d-10" }, { "7.357434693258832d-21", "-7.093525088486332d19", "-1.0372042956753416d-40" }, { "-3.3759558579798473d-21", "9.991075630444324d19", "-3.3789713769084054d-41" }, { "6.908026973557955d-21", "-4.20805893397862d19", "-1.6416183998227845d-40" }, { "5.181767322756247d-21", "7.46986056263721d19", "6.936899664063931d-41" }, { "-5.7217313601659264d-21", "5.604979023134118d19", "-1.0208301113260054d-40" }, { "-9.340193892824771d-21", "9.147101848766205d19", "-1.021109641857176d-40" }, { "8.331002176099931d-21", "2.0276444314093977d-21", "4.108709617449606d0" }, { "-3.747505523684784d-21", "4.394623185543803d-21", "-0.8527478615259381d0" }, { "-3.310403953328861d-21", "2.3420390876737627d-21", "-1.413470838617356d0" }, { "6.23845405853013d-21", "-8.933620117412232d-21", "-0.6983119918397873d0" }, { "-4.276770609150315d-21", "6.853299965034864d-21", "-0.624045442483205d0" }, { "-8.847946637724495d-21", "6.33827952828724d-21", "-1.3959539963860554d0" }, }; cln-1.3.3/tests/timeLFRAmul.cc0000644000000000000000000000217211201634741012753 0ustar #include #include #include #include #include "float/lfloat/cl_LF.h" #include #include #include #include #include #include #include using namespace cln; using namespace std; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 4) exit(1); uintL m1 = atoi(argv[1]); cl_I m2 = cl_I(argv[2]); cl_I M2 = (cl_I)1 << (intDsize*m2); cl_I m3 = cl_I(argv[3]); cl_I M3 = (cl_I)1 << (intDsize*m3); cl_LF x = The(cl_LF)(random_F(cl_I_to_LF(1,m1))); cl_I u; cl_I v; do { u = random_I(M2); } while (zerop(u)); do { v = random_I(M3); } while (zerop(v) || gcd(u,v) > 1); cl_RA y = u / v; cl_F p; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = cl_LF_I_div(The(cl_LF)(cl_LF_I_mul(x,u)),v); } } cout << p << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { p = x * cl_RA_to_LF(y,TheLfloat(x)->len); } } cout << p << endl; } cln-1.3.3/tests/test_I_io.cc0000644000000000000000000000147111201634740012550 0ustar #include "test_I.h" #include #include int test_I_io (int iterations) { int error = 0; for (int i = iterations; i > 0; i--) { cl_I a = testrandom_I(); int base = iterations % (36-1) + 2; cl_read_flags rflags = {syntax_integer, lsyntax_standard, base}; stringstream buf; print_integer(buf, base, a); cl_I b; try { b = read_integer(buf, rflags); ASSERT1(a == b, a); } catch (runtime_exception& err) { std::cerr << "Got an error while parsing \"" << buf.str() << "\" with base = " << base << " (in decimal: " << a << ")" << std::endl; std::cerr << "Details: " << err.what() << std::endl; ++error; break; } } #if defined(_WIN32) std::cerr << "[The test is known to fail on this platform, ignore it]" << std::endl; return 0; #else return error; #endif } cln-1.3.3/tests/exam_FF_div.cc0000644000000000000000000001701611201634740013003 0ustar #include "exam.h" #include #include static div_test ffloat_div_tests[] = { { "0.73739415", "0.6416277", "1.1492554" }, { "0.6736158", "-0.25522494", "-2.6393025" }, { "-0.44216943", "0.31134832", "-1.420176" }, { "-0.7041118", "-0.26929635", "2.6146355" }, { "0.3573562", "0.73521775", "0.4860549" }, { "-0.7661392", "0.77110463", "-0.9935606" }, { "-0.91306114", "1.6586358E9", "-5.504892E-10" }, { "-0.68994707", "4.0230333E8", "-1.7149921E-9" }, { "0.28498656", "-7.617844E9", "-3.7410394E-11" }, { "-0.72419757", "-9.226896E9", "7.848767E-11" }, { "0.8352187", "8.3102536E9", "1.00504605E-10" }, { "0.9707725", "3.3669448E9", "2.8832445E-10" }, { "0.50785017", "6.048824E-11", "8.3958497E9" }, { "-0.17675805", "4.1391092E-11", "-4.270437E9" }, { "-0.42162335", "-4.4007357E-11", "9.580747E9" }, { "-7.945299E-4", "-5.4965265E-11", "1.4455128E7" }, { "-0.65178335", "-9.78151E-12", "6.6634228E10" }, { "-0.6209788", "-3.8544803E-11", "1.611057E10" }, { "0.94332725", "-4.9823833E19", "-1.8933253E-20" }, { "0.30150706", "-4.9741757E19", "-6.061448E-21" }, { "-0.8478371", "-9.85865E18", "8.5999306E-20" }, { "-0.28524554", "3.1389898E19", "-9.087176E-21" }, { "-0.5260848", "-7.936286E19", "6.6288534E-21" }, { "-0.12941593", "-5.3575864E19", "2.415564E-21" }, { "-0.20859545", "-9.867267E-21", "2.1140145E19" }, { "0.35158414", "-8.2825064E-22", "-4.2449002E20" }, { "-0.05635804", "-2.2999601E-21", "2.450392E19" }, { "-0.003138721", "-3.3988403E-21", "9.234682E17" }, { "-0.91386896", "-5.8199337E-21", "1.5702395E20" }, { "-0.5374476", "2.256708E-21", "-2.3815556E20" }, { "1.9669795E9", "-0.58137333", "-3.3833329E9" }, { "-8.9879334E8", "0.35829848", "-2.5085046E9" }, { "-9.057627E9", "0.4849478", "-1.867753E10" }, { "3.687799E8", "-0.34055912", "-1.082866E9" }, { "-5.1049994E9", "-0.16858816", "3.0280888E10" }, { "-4.512774E9", "0.9385354", "-4.8083154E9" }, { "-1.9312024E9", "-8.3940613E9", "0.2300677" }, { "-8.2104387E9", "6.769607E9", "-1.2128383" }, { "-6.9613486E9", "4.576518E9", "-1.5211015" }, { "-1.486333E9", "1.2476433E9", "-1.1913126" }, { "-7.653413E9", "5.167656E9", "-1.4810221" }, { "-2.9815204E9", "8.942396E9", "-0.33341402" }, { "9.304549E9", "-5.8002263E-11", "-1.60417E20" }, { "-2.0750719E9", "1.272735E-11", "-1.6304037E20" }, { "-1.1557549E9", "-7.2220556E-11", "1.6003129E19" }, { "-3.3273495E9", "-9.9207274E-11", "3.353937E19" }, { "-3.2167434E9", "7.7474506E-11", "-4.1520026E19" }, { "4.4169416E9", "-4.638272E-11", "-9.5228166E19" }, { "-3.732909E9", "-2.2763849E18", "1.6398409E-9" }, { "-6.243126E9", "-4.1274483E19", "1.5125873E-10" }, { "4.7162563E9", "-7.524631E19", "-6.267758E-11" }, { "-1.3657349E9", "7.728982E19", "-1.7670308E-11" }, { "-4.6216906E8", "-7.972877E19", "5.7967663E-12" }, { "4.4542986E9", "3.1531836E19", "1.4126353E-10" }, { "1.4738977E9", "-9.8130876E-21", "-1.5019714E29" }, { "-5.918336E9", "2.9877495E-21", "-1.9808676E30" }, { "-3.7166292E9", "-1.0826009E-21", "3.433056E30" }, { "7.390683E9", "-2.1678685E-22", "-3.4091935E31" }, { "6.2302886E8", "8.9466635E-21", "6.963812E28" }, { "5.2357125E9", "4.854464E-22", "1.0785356E31" }, { "-2.7721167E-11", "0.99550104", "-2.7846447E-11" }, { "5.754337E-11", "-0.6344538", "-9.06975E-11" }, { "-7.663363E-11", "0.020810604", "-3.6824317E-9" }, { "3.2576632E-11", "0.6209498", "5.2462586E-11" }, { "-9.507874E-11", "-0.19174337", "4.958645E-10" }, { "-9.681176E-11", "-0.82680905", "1.1709084E-10" }, { "6.458532E-11", "3.442031E8", "1.8763725E-19" }, { "1.9113166E-11", "-7.0712125E9", "-2.7029546E-21" }, { "-2.0099402E-12", "2.600844E9", "-7.7280303E-22" }, { "-4.9634992E-12", "8.041176E9", "-6.1726036E-22" }, { "3.2738747E-12", "7.299675E9", "4.484959E-22" }, { "9.133733E-12", "-2.6318538E9", "-3.470456E-21" }, { "-3.4146054E-11", "-1.5331155E-11", "2.227233" }, { "6.06336E-11", "4.3750472E-11", "1.385896" }, { "-4.229064E-11", "-9.169808E-11", "0.4611944" }, { "6.166104E-11", "-3.5474658E-11", "-1.7381715" }, { "-3.979801E-11", "-1.9510412E-11", "2.0398343" }, { "9.726933E-11", "-5.6926824E-11", "-1.7086731" }, { "8.041786E-11", "2.3718388E19", "3.3905282E-30" }, { "-6.747094E-11", "-6.7324465E19", "1.0021756E-30" }, { "-3.0713255E-11", "-4.8310887E19", "6.357419E-31" }, { "-2.8496396E-11", "-4.9017306E19", "5.813538E-31" }, { "-9.354275E-12", "-9.035095E19", "1.0353266E-31" }, { "4.9274265E-12", "7.241873E19", "6.8040775E-32" }, { "-4.377009E-11", "7.138917E-21", "-6.131195E9" }, { "9.422678E-12", "-5.8862136E-21", "-1.6008046E9" }, { "-6.83782E-11", "-3.6098812E-21", "1.8941952E10" }, { "-8.1755075E-11", "-6.8725736E-21", "1.1895846E10" }, { "-6.360949E-11", "4.2976342E-21", "-1.4801049E10" }, { "3.3879413E-11", "-1.7169743E-21", "-1.9732044E10" }, { "-9.948093E18", "-0.8695114", "1.1441014E19" }, { "6.2748975E19", "-0.94829553", "-6.6170272E19" }, { "-6.204444E18", "0.6874813", "-9.0248915E18" }, { "6.7599936E19", "-0.45808762", "-1.4756988E20" }, { "7.624068E19", "0.008471012", "9.0001855E21" }, { "8.342225E19", "-0.3031574", "-2.7517803E20" }, { "-6.3366795E19", "-1.4882481E9", "4.2578113E10" }, { "-1.7335874E19", "-7.42875E9", "2.3336195E9" }, { "-8.662651E19", "1.0327226E9", "-8.388168E10" }, { "-4.9590965E19", "8.334462E9", "-5.95011E9" }, { "8.191562E18", "5.930472E9", "1.3812664E9" }, { "-3.5910857E19", "-7.342098E9", "4.8910894E9" }, { "-3.6083056E19", "5.7372277E-11", "-6.2892843E29" }, { "2.2896613E19", "-4.541202E-11", "-5.0419717E29" }, { "6.1438805E19", "8.512014E-11", "7.217893E29" }, { "6.3211746E19", "-6.185377E-12", "-1.0219547E31" }, { "4.5452835E18", "2.0429606E-11", "2.2248514E29" }, { "9.226608E19", "1.3297486E-11", "6.9386104E30" }, { "1.8852943E19", "-1.623413E19", "-1.1613153" }, { "-3.117305E18", "-9.5760065E19", "0.03255329" }, { "-7.719376E19", "3.3627052E19", "-2.295585" }, { "3.1309093E19", "-7.820006E19", "-0.4003717" }, { "3.941958E19", "-9.51598E19", "-0.41424614" }, { "-3.6364467E19", "-1.0757047E19", "3.380525" }, { "2.906561E17", "-8.595159E-21", "-3.3816258E37" }, { "-7.826226E-21", "-0.21695328", "3.6073327E-20" }, { "-1.888169E-21", "0.5031878", "-3.7524144E-21" }, { "8.304594E-21", "-0.3528648", "-2.3534775E-20" }, { "-8.441606E-21", "-0.3639353", "2.3195348E-20" }, { "-7.815205E-21", "0.38263506", "-2.0424697E-20" }, { "-3.2837188E-21", "0.46961308", "-6.992392E-21" }, { "-5.1739832E-21", "-3.8917279E9", "1.3294822E-30" }, { "-5.3318596E-21", "-7.1995423E9", "7.405831E-31" }, { "-7.4979364E-22", "9.148773E9", "-8.195565E-32" }, { "4.6800053E-21", "3.9532006E8", "1.1838522E-29" }, { "4.914653E-22", "-2.414465E9", "-2.035504E-31" }, { "5.4722133E-21", "-9.977777E9", "-5.484401E-31" }, { "9.815656E-21", "6.059642E-11", "1.619841E-10" }, { "7.660357E-21", "9.7074675E-11", "7.891201E-11" }, { "9.77743E-21", "2.5170428E-11", "3.8844908E-10" }, { "8.818017E-21", "1.18070545E-11", "7.468431E-10" }, { "5.445426E-21", "9.6208916E-11", "5.6600016E-11" }, { "4.6823916E-21", "-1.9853067E-11", "-2.358523E-10" }, { "9.347429E-21", "-7.285392E-22", "-12.830372" }, { "-7.304412E-21", "6.766496E-21", "-1.079497" }, { "-2.6850204E-21", "6.894023E-21", "-0.38947076" }, { "-2.24644E-21", "-9.533858E-21", "0.23562758" }, { "-8.525939E-21", "-9.961187E-22", "8.559159" }, { "8.145676E-21", "4.304153E-22", "18.925154" }, }; cln-1.3.3/tests/test_I_sqrtp.cc0000644000000000000000000000147511201634741013317 0ustar #include "test_I.h" #define floor(a,b) ((a) / (b)) int test_I_sqrtp (int iterations) { int error = 0; int i; // Check against isqrt. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); if (a >= 0) { cl_I w; bool squarep = sqrtp(a,&w); cl_I correct_w; bool correct_squarep = isqrt(a,&correct_w); ASSERT1(squarep == correct_squarep, a); if (squarep) ASSERT1(w == correct_w, a); } } // Check certain special cases. for (i = iterations; i > 0; i--) { cl_I a = abs(testrandom_I()); cl_I w; // Check a^2 is a square. ASSERT1(sqrtp(a*a,&w) && w == a, a); // Check a^2+1 is not a square, except when a=0. if (a > 0) ASSERT1(!isqrt(a*a+1,&w) && w == a, a); // Check a^2+2*a is not a square, except when a=0. ASSERT1(isqrt(a*(a+2),&w)==(a==0) && w == a, a); } return error; } cln-1.3.3/tests/tests.cc0000644000000000000000000000127411201634741011776 0ustar #include #include #include extern int test_I (int iterations); extern int test_MI (int iterations); extern int test_nt (int iterations); using namespace std; using namespace cln; int test_all (int iterations) { int error = 0; error |= test_I(iterations); error |= test_MI(iterations); error |= test_nt(iterations); return error; } int main (int argc, char* argv[]) { int iterations = 10000; if ((argc >= 3) && !::strcmp(argv[1],"-i")) { iterations = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 1) exit(1); if (!test_all(iterations)) { cout << "Tests passed." << endl; exit(0); } else { cout << "Tests failed." << endl; exit(1); } } cln-1.3.3/tests/test_I_dpb.cc0000644000000000000000000000062011201634740012701 0ustar #include "test_I.h" int test_I_dpb (int iterations) { int error = 0; int i; // Check against ash. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); sintL s = random32() % 1024; sintL p = random32() % 1024; cl_I mask = ash(ash(1,s)-1,p); ASSERT4(dpb(a,b,cl_byte(s,p)) == logxor(logand(ash(a,p),mask),logandc2(b,mask)), a,s,p,b); } return error; } cln-1.3.3/tests/exam_DF_mul.cc0000644000000000000000000003017211201634740013012 0ustar #include "exam.h" #include #include static mul_test dfloat_mul_tests[] = { { "-0.2554913394465045d0", "0.27042187315261135d0", "-0.0690904465873934d0" }, { "-0.4489211233229662d0", "-0.42892136850270857d0", "0.19255186256545986d0" }, { "-0.44586465919973783d0", "-0.15168042462027043d0", "0.0676289408305884d0" }, { "0.5509395670465355d0", "0.3577558280766836d0", "0.19710184102894285d0" }, { "-0.42780066410606965d0", "0.22704747885906007d0", "-0.0971310622395147d0" }, { "0.20955388816500042d0", "0.605628751935113d0", "0.12691185975251945d0" }, { "0.9993471610818964d0", "-4.363771855901198d9", "-4.360923015803941d9" }, { "0.10502219375257282d0", "3.425205053451057d9", "3.5972254876582843d8" }, { "0.7768651149081368d0", "1.666066330143864d9", "1.2943088110117908d9" }, { "-0.6438389801759042d0", "2.8922130868526487d9", "-1.8621195242906134d9" }, { "-0.7427680566504474d0", "6.763974500466173d9", "-5.02406419494444d9" }, { "-0.8563035843259611d0", "2.9100478627456827d9", "-2.4918844154292307d9" }, { "0.6219502737119671d0", "2.8868752190811842d-11", "1.7954928326798375d-11" }, { "0.6767479505813657d0", "2.9324524289075574d-11", "1.9845311714405376d-11" }, { "0.7944531541461581d0", "8.282076647859848d-11", "6.579721915772496d-11" }, { "-0.4662914070981966d0", "-6.921260263903422d-11", "3.227324187348362d-11" }, { "0.037804762510578516d0", "-3.044514833184461d-11", "-1.1509716022847211d-12" }, { "-0.5364168049485208d0", "-3.695280705974925d-11", "1.9822106696869836d-11" }, { "0.10343751426551051d0", "4.8902635121181385d19", "5.058367017968255d18" }, { "-0.45511004829813784d0", "1.8210069906740634d19", "-8.287585794769196d18" }, { "-0.9675158737162977d0", "8.097401718869682d19", "-7.83436469886405d19" }, { "-0.06573561186185628d0", "2.6049125586869125d19", "-1.712355208919178d18" }, { "-0.5574365795036731d0", "-8.822383181882661d19", "4.917919103979403d19" }, { "-0.4222667103024276d0", "-1.8561723355961213d19", "7.837997859065477d18" }, { "-0.8412207478192143d0", "2.3416069046402696d-22", "-1.9698083114201234d-22" }, { "0.24291385591230452d0", "-9.448120185342916d-21", "-2.295079305344525d-21" }, { "-0.37792600430678414d0", "-2.3929024368177364d-21", "9.043400566424941d-22" }, { "-0.007648867433060369d0", "-5.3162210182098465d-21", "4.066306981313633d-23" }, { "-0.7631807323096114d0", "-4.534410248041209d-21", "3.4605745336922964d-21" }, { "0.4735366300649959d0", "-1.3895270471326203d-21", "-6.579919552833457d-22" }, { "-8.64834403600587d9", "-0.14057280586223464d0", "1.215721987203268d9" }, { "-1.5525713051163936d9", "0.10621224657238759d0", "-1.64902086280236d8" }, { "3.297132746298694d9", "0.05318660311813239d0", "1.7536329080518654d8" }, { "2.1659831568875275d9", "0.11704159596099262d0", "2.5351012550674528d8" }, { "-5.533403510176525d9", "0.37778599060251605d0", "-2.0904423264954782d9" }, { "-2.4217306331294374d9", "0.6051350227557695d0", "-1.465474021787126d9" }, { "1.4048311850866513d9", "-4.304799039580996d9", "-6.047515936334449d18" }, { "-5.070278162013437d9", "-9.116233758795675d9", "4.622184094703138d19" }, { "8.452801605894673d9", "-9.002885976919611d9", "-7.609960904339272d19" }, { "6.352601599408395d9", "-4.484034289922495d9", "-2.848528340196373d19" }, { "-6.565407710101401d8", "-6.718825369609182d9", "4.4111827884457016d18" }, { "-9.37193973536698d9", "9.577576231327314d9", "-8.976046725088279d19" }, { "-1.7766859308675253d9", "-4.079350537765101d-11", "0.0724772470752413d0" }, { "2.3810136983742104d9", "9.195156930614704d-11", "0.2189379461049417d0" }, { "-3.313966320976337d9", "-3.44704749912067d-11", "0.11423399318891611d0" }, { "6.598963960681895d9", "-2.4298605961767928d-11", "-0.1603456250365168d0" }, { "7.908258993705348d9", "1.528909719631646d-11", "0.12091014040840486d0" }, { "-5.906667889594469d9", "5.917852809041966d-11", "-0.3495479116251461d0" }, { "4.86261281419926d9", "-2.3925611132123714d19", "-1.1634098327861323d29" }, { "-9.753392818607462d9", "-2.5653634777279775d18", "2.502099772078992d28" }, { "1.5861252889272392d9", "5.12939252547053d19", "8.135859201483165d28" }, { "-8.422142961023593d8", "1.0428099441045047d19", "-8.782694430425161d27" }, { "-3.109042783121446d9", "-4.138252722536039d19", "1.286600476173335d29" }, { "-6.459303282089468d8", "1.8408981660472957d19", "-1.189091956594178d28" }, { "-1.432764110232635d9", "8.98766033001457d-21", "-1.2877197155806476d-11" }, { "8.539623949953406d9", "-3.498784805440049d-21", "-2.987830652026891d-11" }, { "7.336784327799637d9", "-1.048985206018761d-21", "-7.696178219612119d-12" }, { "-4.320357143553698d9", "2.591531476439043d-21", "-1.119634152697768d-11" }, { "-9.374098076239548d9", "5.5773248420603045d-21", "-5.228239007252054d-11" }, { "9.118926580475056d9", "-1.379170270330765d-21", "-1.2576552437120181d-11" }, { "8.145792307872788d-11", "-0.06511382435429458d0", "-5.304036895613926d-12" }, { "-6.1928426627437d-11", "0.2526275616632321d0", "-1.5644827416529785d-11" }, { "-8.555119338859813d-11", "-0.8366318482083728d0", "7.157485304113478d-11" }, { "8.243060442429263d-12", "0.3939656708074719d0", "3.2474828367081808d-12" }, { "8.600529286105945d-11", "-0.891441509265547d0", "-7.666868807288822d-11" }, { "-7.531046724969747d-11", "0.24398797995196886d0", "-1.8374848773492595d-11" }, { "-3.7666526619188126d-12", "4.659322150343885d9", "-0.017550048180330083d0" }, { "3.032501107241211d-11", "-9.592046453776636d9", "-0.2908789149178678d0" }, { "7.311626957349528d-11", "-9.061108567148174d9", "-0.6625144566303135d0" }, { "4.898078204161461d-11", "8.88014689134599d9", "0.4349565393825394d0" }, { "1.278207138618518d-11", "-4.279966992086118d9", "-0.05470684362336102d0" }, { "-8.538580654966055d-11", "-5.191059833953482d8", "0.0443242830769665d0" }, { "4.0761422500127225d-11", "1.527607426117321d-11", "6.226745171030001d-22" }, { "-9.186363051001198d-11", "8.557763803549676d-11", "-7.861472520412421d-21" }, { "-9.89183505930065d-11", "9.717968160611499d-11", "-9.612853815630427d-21" }, { "7.440627873114725d-12", "-4.535521332601712d-11", "-3.374712644646274d-22" }, { "8.701410920357686d-11", "-7.032883383151379d-12", "-6.119600827175551d-22" }, { "9.866226673114161d-11", "-2.814669610817353d-11", "-2.777016839025002d-21" }, { "5.192240545105114d-11", "-3.366056660574579d19", "-1.747737587015645d9" }, { "-1.372355669576939d-11", "-4.819955130360066d19", "6.61469275025609d8" }, { "3.637511103766519d-11", "-4.071776382810416d19", "-1.4811131804527159d9" }, { "7.446388208685151d-13", "2.7760294268649034d19", "2.0671392791169815d7" }, { "6.267855179410938d-11", "7.471751480940298d19", "4.683185621908299d9" }, { "-4.336562006766369d-11", "8.143188451558233d19", "-3.5313441652966094d9" }, { "-1.0432655006975122d-11", "-9.379512413340694d-21", "9.785321714202411d-32" }, { "-8.167646898574611d-11", "-5.810795749825724d-21", "4.746052788431461d-31" }, { "-4.33805459341994d-11", "-2.4289860591796017d-21", "1.053707413137707d-31" }, { "-1.384613082275421d-11", "2.2174009100764947d-21", "-3.070242308741339d-32" }, { "-4.910905591314494d-11", "-5.456657623752349d-21", "2.679713043437427d-31" }, { "1.3653011366548008d-11", "-3.925911962906968d-21", "-5.360052065363564d-32" }, { "7.641468950470222d19", "0.9034599537348024d0", "6.903761184457755d19" }, { "5.146778093125584d19", "-0.2791459460022878d0", "-1.436702239669392d19" }, { "-8.874303077863696d19", "-0.23153988023519345d0", "2.054755071819369d19" }, { "7.10798162637783d19", "-0.4719034863212067d0", "-3.354281310194779d19" }, { "-9.820386602197546d19", "0.03346146041258036d0", "-3.286044775256677d18" }, { "-5.210458089116161d19", "0.11173798093222442d0", "-5.822060666098161d18" }, { "3.257626718953688d18", "-6.150510855712356d9", "-2.0036068498783283d28" }, { "-7.755105754004988d19", "5.514896832715505d9", "-4.27686081601359d29" }, { "2.426235084788384d19", "8.685431434428486d9", "2.1072898472734294d29" }, { "-2.847383850475709d19", "-2.412830829567453d9", "6.870255538040273d28" }, { "1.4664659669727164d19", "-4.8673539253155d9", "-7.1378088806862425d28" }, { "-4.24770317054668d19", "1.3102543269150825d9", "-5.5655714586597015d28" }, { "2.17116835964837d19", "-3.654789326884115d-11", "-7.935162947711353d8" }, { "-1.8125809977916906d17", "-5.944782899600832d-11", "1.0775400519813456d7" }, { "-7.915462827540546d19", "9.762153025588201d-11", "-7.727195939080587d9" }, { "-4.360953588949649d19", "-7.152431005584812d-11", "3.119141966351983d9" }, { "3.550776271395866d19", "-6.387656982922894d-11", "-2.268114084477872d9" }, { "-8.278954580496595d19", "-7.359178231519021d-11", "6.092630232852524d9" }, { "-5.5022682113038156d19", "-8.979630229039327d19", "4.940833395850589d39" }, { "1.1716230943203277d19", "5.5764415854118265d19", "6.533487745596758d38" }, { "7.462799608352103d19", "6.061883497941003d19", "4.523862179431019d39" }, { "-3.2160334983646097d19", "-3.8817785710003675d19", "1.2483929917571087d39" }, { "5.868090263060238d19", "-8.37300331667736d19", "-4.91335392351655d39" }, { "-7.3652924769962656d19", "9.725738480757314d19", "-7.163290846555493d39" }, { "-6.447063647969567d19", "4.0587529685661844d-21", "-0.2616703871973161d0" }, { "-3.1999317568381926d17", "3.015031281949113d-21", "-9.647894346969533d-4" }, { "-1.5005852398726605d19", "5.391316601974659d-21", "-0.080901301164036d0" }, { "1.0084552719733576d19", "2.78150956101201d-21", "0.02805027980846861d0" }, { "-7.171404412051077d19", "1.4733392992015492d-21", "-0.10565911950742231d0" }, { "-5.909802783283228d19", "5.356071274587122d-21", "-0.31653324926018317d0" }, { "8.272641144282955d-22", "-0.16191056182923802d0", "-1.3394279754825238d-22" }, { "8.410471541398583d-21", "-0.43256058128353736d0", "-3.63803845881602d-21" }, { "-7.887238384137063d-22", "0.5589746137044918d0", "-4.408766028968254d-22" }, { "4.778995446616728d-21", "0.21608373898977795d0", "1.0326632047200663d-21" }, { "3.992449163872154d-21", "0.9593422165456676d0", "3.830125030315009d-21" }, { "-9.700320218813958d-21", "-0.42620535269852766d0", "4.134328400148262d-21" }, { "-1.7901566262876555d-21", "9.461674014776534d8", "-1.6937878433325936d-12" }, { "1.0928019952544443d-22", "8.279199780524873d9", "9.047526039267738d-13" }, { "9.942869097320962d-21", "9.523169242022762d9", "9.468762516506561d-11" }, { "-2.7432601692209267d-21", "-4.922145522647528d9", "1.3502725759388083d-11" }, { "-5.97929682563092d-21", "-6.147792689359443d8", "3.6759477312123895d-12" }, { "-1.3564305221188254d-21", "1.0862842413758955d9", "-1.473469100698958d-12" }, { "-5.446806293721964d-21", "-1.5358504316888942d-11", "8.365479797538665d-32" }, { "-1.0222776562632463d-21", "-1.9781477525280056d-11", "2.0222162481967376d-32" }, { "8.192540157543917d-21", "3.3215076993103644d-11", "2.7211585210191467d-31" }, { "9.685592607330157d-21", "6.034805605641166d-11", "5.8450668560672665d-31" }, { "6.671870463340688d-21", "-9.07657686679269d-11", "-6.055774510579552d-31" }, { "-1.109409648670322d-21", "-4.7905821901849965d-11", "5.314718104539439d-32" }, { "-3.9052432481663676d-22", "2.0306112771345453d19", "-0.007930030979680168d0" }, { "8.596834841113507d-21", "-9.453548987989818d19", "-0.8127059931212419d0" }, { "3.946325780779758d-21", "-9.084484011754447d19", "-0.35850333460668093d0" }, { "5.3518824877647604d-21", "-6.814116447592617d19", "-0.36468350485460743d0" }, { "-7.456278485417833d-22", "9.61914445493285d19", "-0.07172301984744206d0" }, { "-5.0781537010216826d-21", "9.216915512986622d19", "-0.4680491362427718d0" }, { "3.2906792172396555d-22", "4.571445785546992d-21", "1.50431616392373d-42" }, { "5.39814714322422d-21", "6.687033308557664d-21", "3.6097589751235757d-41" }, { "4.3506183844841724d-21", "7.266196706225928d-21", "3.1612448975384865d-41" }, { "6.910763289107986d-21", "3.910584203890238d-21", "2.702512175521024d-41" }, { "-4.6131515924393325d-21", "5.228174479773633d-21", "-2.411836142691841d-41" }, { "-2.1886866436065787d-21", "6.29322016055891d-22", "-1.3773886910690934d-42" }, }; cln-1.3.3/tests/exam.h0000644000000000000000000000561011201634740011425 0ustar #ifndef _EXAM_H #define _EXAM_H #include #include using namespace std; using namespace cln; // Michael Stoll 23. 3. 1993 // C++ version: Bruno Haible 1.11.1995 struct plus_test { const char * arg1; const char * arg2; const char * result; }; struct minus_test { const char * arg1; const char * arg2; const char * result; }; struct mul_test { const char * arg1; const char * arg2; const char * result; }; struct floor_test { const char * arg1; const char * arg2; const char * result1; const char * result2; }; struct div_test { const char * arg1; const char * arg2; const char * result; }; #define num_elements(array) (sizeof(array)/sizeof(array[0])) #define DO_BINOP_TEST(typename,type,rtype,opname,op) \ static int test_##typename##_##opname (void) \ { \ int error = 0; \ for (unsigned int i = 0; i < num_elements(typename##_##opname##_tests); i++) { \ opname##_test& test = typename##_##opname##_tests[i]; \ type arg1 = type(test.arg1); \ type arg2 = type(test.arg2); \ rtype computed_result = arg1 op arg2; \ rtype result = rtype(test.result); \ if (computed_result != result) { \ std::cerr << "Error in " #typename "_" #opname "_tests[" << i << "] !" << endl; \ std::cerr << "Result should be: " << result << endl; \ std::cerr << "Result computed : " << computed_result << endl << endl; \ error = 1; \ } \ } \ return error; \ } #define DO_FLOOR_TEST(typename,type) \ static int test_##typename##_floor (void) \ { \ int error = 0; \ for (unsigned int i = 0; i < num_elements(typename##_floor_tests); i++) { \ floor_test& test = typename##_floor_tests[i]; \ type arg1 = type(test.arg1); \ type arg2 = type(test.arg2); \ type##_div_t computed_result = floor2(arg1,arg2); \ cl_I result1 = cl_I(test.result1); \ type result2 = type(test.result2); \ if ((computed_result.quotient != result1) || (computed_result.remainder != result2)) { \ std::cerr << "Error in " #typename "_floor_tests[" << i << endl; \ std::cerr << "Results should be: " << result1 << ", " << result2 << endl; \ std::cerr << "Results computed : " << computed_result.quotient << ", " << computed_result.remainder << endl << endl; \ error = 1; \ } \ } \ return error; \ } #define DO_TESTS(typename,type,qtype) \ DO_BINOP_TEST(typename,type,type,plus,+) \ DO_BINOP_TEST(typename,type,type,minus,-) \ DO_BINOP_TEST(typename,type,type,mul,*) \ DO_FLOOR_TEST(typename,type) \ DO_BINOP_TEST(typename,type,qtype,div,/) \ int test_##typename (void) \ { \ int error = 0; \ error |= test_##typename##_plus(); \ error |= test_##typename##_minus(); \ error |= test_##typename##_mul(); \ error |= test_##typename##_floor(); \ error |= test_##typename##_div(); \ return error; \ } #endif /* _EXAM_H */ cln-1.3.3/tests/exam_I_mul.cc0000644000000000000000000022075011201634740012714 0ustar #include "exam.h" #include #include static mul_test integer_mul_tests[] = { { "-1412797070596191471", "-15492755620416346417", "21888119755986895161222137392796809407" }, { "16686841096925954110", "1491135775021813104", "24882345731730524499708005167300657440" }, { "13262412958100188045", "-18379071970155621919", "-243750842254847872704698616507823758355" }, { "889503034794263569", "-16600674457216690894", "-14766350309325860687849239111838240686" }, { "3148165694020236318", "-11771070679825280729", "-37057280896113409834434531491271315822" }, { "-4443818546267181727", "-12001052312087213799", "53330498839175802532024121011435050873" }, { "8305259347214213793", "-229351169208067535459370186456659711595", "-1904820941859811670566233132773219565154696335396051029835" }, { "-18273334758510166901", "290047155020180552782039318570071650475", "-5300128759437251944808204783222405076790289915320785927975" }, { "-703280433697652940", "91110448009482115063492795153459771021", "-64076195390496041906141380919369524419358692517527451740" }, { "15279634596127882146", "-220998726467849290098339792307263567896", "-3376779786638352686104608499923871317791563686466157184816" }, { "-4472497681184076830", "325612942672822430032905460436166528379", "-1456303131067722058341139305566346079551678140995111358570" }, { "-6180420673489141029", "-161157288800853703711204405567379740552", "996019839388256252540244286609069684717518686623358308008" }, { "14044956603588468379", "10163190459901171254101452124764637970005230126310661589196828892266636678427020930101076689732526935899135126391465178494895371156141265424428405590113790", "142741568963316278148132287599703960511135825069792278910440475692913696263448088587778211787403889397993501704943449376875999977937418748662459138952952917221024170426846410" }, { "2133283347509865817", "10577710515843519541178984366353275630877942729579274295972091544607384358263130633386329706527832990861547566574369528634541156662300858851752195966167381", "22565253698228972909216255630133478029433774404794962869038558824053350969301054394347471181756471783852326407546652836376109109470959746153989521923555764579738243072315277" }, { "7812722507014599311", "-5055959518947106416800910724733658104378582281318226107212861190073091017493970778425583956006925004399967175604321778956828368132273155364830637407968648", "-39500808728232764770485117356353304373275127104839804121600969932458363071148383405901570717732548020267052999198017578112731079638156026910705662052515278317807704170401528" }, { "-17560801708050275829", "9842515227842383346577123873881045824143545509071137371075701856197189100217561683579562062872293951325890789283651221922663521213150065638405410634222129", "-172842458224605375239887212582262805312641302639067963604956593404910080268476692854082531021580381176489626536608405283010496488558204787140272050713264572452317265305619941" }, { "16743386830114877156", "7347065846171565625701636575261347705942035850951855454324853850791855951431141198155170102434274509450315416946729031216385536668189501958761688618635668", "123014765528775807847206414290825117502032199391400884957413813554539073118943905948723779020186281150198999824020769031248882909461419778092564985979904308229718874140000208" }, { "12697192948029671719", "-11416780209809507417142822520376617951137069007568339428552592261458272400645205700952156716454820410468812274673183389934216970221062627926131479014990611", "-144961061169197993494569769162151457365959287966302572862364500950127981616038900865036521107816831702945678695331078399461327412574397914795455218447174498277798426197230309" }, { "17005139720743105479", "-29990519259587469661876904501488342396062731024702923152492275204626478246142153608222329335341363164148761307659972897552084842238285026253664841395295138667328930482145590159132144957515157474957872335043653264146346772142483721767458961320947069718037828473530001033848282453826154763424789967441239969918856795769965946388666154136004597297855416503729657013008165049478441197537144135384444157408972370236442813734429031404855591324183846423588871065272526864866155918285777640819778251612915859290336548446745308788013234099839998683451658620461972798204104633072664604846231692505409653434538208644416538994256", "-509992970306921990341332390474393215554862069848994183152714032617297815196921655222705396130464246880845576204295466273071779248718654338767559016551390771145212884412809612574391658668778295682412755916528976282396155832617323980694289208942491001345059122414240884660276842648466533488559879226195446807748573906940273568334343093922652142252689341425941673567630236228358747411926991658260241924294146562230425295426217833820067881064577380516936937782688004146531121831211284735538742160763820814174631414364095096099434285754767091040812242751724012532803037860394426031234340719537172735695313262283511554154662650333168783128624" }, { "-15877530153400521290", "27863984127681242643954505352420303514833683768731313003271701952957204538094398204984051331105594788039352443762851136101330385230866919393696564428736685568762923746771275677491379334452751710169529933675128178840986001684425353245791752781476028565228371147542431713985092322787978914276414008774443194161599919167210582437024618824616489802661351916633993681556274980075051797120207655478780052593534285265078265845445633803877185868676955831374479850746658711791169579387317321983669227930929736238215792068273805543745311609083833407544342964285215427999724272264458975101474080574470499647168865409458531868592", "-442411248181132450919255517905812929771246981404050821923231762557171158858876183536414772404562764742655092127161703706239729646027465795612501446223663310668879007072125975886873343449629108246953385822769744013416908613100114754904323190537317463286500657291202287742354250227377164455244103312266617146454847578457073139633297517170508179596166314955134347046515455569689877574427319658085169791949003021426613961459610227430636932814700361914589752207776142403364490846294795496119883683491811246550808038342285518518431538295199537270236275774546666026424361019715280652576803278928827199810150387207105149968313623040090578323680" }, { "-14162897687527555611", "-23016403916121951319848021112075986869602408568431399211927062304968548663313037929311574133954267816204873252195499803324830278637331653769648377216095499136975244697758388851688873078022850203685120154634090802825656419418077380419130449990938627982123188424119187922828250625318327074513352279785514062876718714640725789938556578327139793467832731546881422469843509318627826856881082450937188956068348931459011923844607158528494902828851692203126881727638511348944908726926619613375594042390434147948508706733126737304560579515324106834237197081860910657003346633962662773394999353766192391746258372744063777808796", "325978973798843759388794644178802841408656469654887121096165875654577046313115917671847505813174070119516580105483409446057747653173640660143855580491229746795572929387698247460831363721394707501497262525550824977473864621747159715947297817600227665840640555029633517390896890601028716769035575763283168066843141870124768085499453574902575378368669494153555135898430469356384416638130459557518713454927909937610851489821263029886989981438507377741962130296498574556444168140838201069779040087521405032426995145166201901368032136008107323350679784004016321425234898132080844200202007395427054392280809376612533414505539109579739614954356" }, { "10844738523441551664", "13010289169828379103330191247192587220592807931898339555723704078985668371901953113936581573750666143303899278973814509164982887504269303358034042953769514772858989849512527461308415676004712388964136857232374888643347097138114199889581495448978914022318770898259317738823514820591042321773469959130347470144905381758960436645008051488666423115693738341045851119808222048272924385188356021826450267608127588500233526688704136268009202730309974485584784539415807259862449203760469406037505772435323036790641520939576046423540699016607317147689982042035523118533555744274806239272109508745089640043900389441390176681340", "141093184161152226992592021994885140117836445291515772908453669279294934817987511015413332614094493905560980363483549300117114491702466085602279965168041684355125886388302948336158133555051817733078300668260616983283027038746214728386770752826764135491650323133831923154477800324207350667020747545837613879364064704092093040155243919335078139087599906324684688427176309081290932504214653249366429592335409761783188358003723753633106574740731573467850133547164922532633897844647383889253777956821171583261238607289172489135768839436605233457738153233579088224808850428203888700116300637190661108848906846940291749737998056247719674749760" }, { "-16402132873169057380", "8202725117980211375579199554494319645475746305836527475507064811368616698686329266053570766100878145903342129595869654087772486685252653587846560946850102095086896668181099435964053041678323706849735936082196618754721606824996486473796843333331029865501790248862590712245450877098960007272754260813822886287008295409755783478345202299352891066800825979067590290793893933819913530599309037639082839491869155044147367415785329077864525961799400923643936705317921900308490987828345313709179960659814100113658528990241758360711799009722683007157350272749544178688961738222930753008443755881419398858537860612954576778456", "-134542187307192759584182063854799850608007421111316277594191532129597970622559949723743396309231347084450105499455916612009290113746722460358793168839937004812915757145655285798961178877391232945062437277255128401572171216279188126380587081673725314534095093062983435026047851041796084651601813918099532876684901239903769891552275465470747567830660442193995685219383258617057944010709906130655663966913354414611799232001438943448374556294933488875450563987147224709383408815994320229340710143082135667640802837699940654151297907451396297241124380508001357553893328703788960812706653503939250831164194874527033594779746890593262611805280" }, { "-12094905083549825231", "-7303327854122277566083382629094740392048421584433028903125893639493993705575691832165314461496849401726460344615713884253150283931509897329926825128629833541892164122168618243719393446304446866677253728405617434021389128710195093788280203239300086905325641224801020413858421914412156234316517981228056539721130386645649016559425091470643854813419057026759188125291655398451427686659900364573485593902992038773538760663063071699966278379037038361219424927031644750173900916227834573604566165762753650347331082640552394430002401423199016978155236550541225512734287851807727860645247391524620773399994302380387697957581", "88333057189654571362020288527489792875655269960629008914349561689924145109953656394378545526256758871407020025766992398117775520525507898420898102744530402370720932219749861094609497366188371774072368034971851022164946370916317410415503705484491514312339956381120953283812334833067601825812118392757289250628861166579446800637104996060739031010579056633535166403083327528575504427815713481850979373113173151813491831551023902022537957860211597622343157802805275942920911544696695931809085743355666792408029743911424760065578742910735408262758198787195579745280191859776661700139596074108035867940154338953640690242795671183308201526211" }, { "-81618231044418675360403541307856740187", "9751573706924018395", "-795906195858402819552264165081526765614024708979523739865" }, { "-167600745660011044249531125104202473984", "-12960244919927910377", "2172146712516287908809731894157839567367040369214826131968" }, { "90306383312124738690336097936949488486", "156109477991590792", "14097682358164298866835386043901377722456291173827620912" }, { "126202800261728727198105694812165074067", "-17404362862588500316", "-2196479330029905727399352310201914876903532806486592905172" }, { "-80093647977875266525946940496137725572", "-9499399805878278852", "760841584053111508349403804472960020663660465509267203344" }, { "304052889577333477963637861956318521374", "7233536405885618691", "2199377646072361697737485358722028853038393128548297401434" }, { "-124787646062877233829165925777950698937", "-125798384154373172164515376683173327013", "15698084237137783175768362160964949930745617334715009097620154581879012485181" }, { "259623502197082370239517374851053110076", "307089583871541575627915295134832918432", "79727673252974285068387698133566605944659309374400074880377824560177225320832" }, { "-245358177397026033963771466683003477163", "-285087883756432161967673595037725276963", "69948643556453419103498093570621669430956866597291662675473644085666220495969" }, { "46731711386059374483493216849082745840", "-216522280665540473581476116002923812173", "-10118456728713381305690589407461434638634240429858378588644634276171257110320" }, { "-301422430661955757433852743238845048860", "-737194742467573013847855072675441356", "222207031145790358162820429948896977201848379524899474475604149595884654160" }, { "109781582310220385246795023904554278713", "-273317662617851276579672019029762858338", "-30005245475518685175699313262818315773200953201653075289648004177366787958994" }, { "-312236719893391897821327608828679767006", "-661158307192284418474080017860142217763949256471548515134335997907628404839044913830388499435166012788226998900468665646723366842553747501004752506346280", "206437901167986463762021023207669068873036145952740267172145693855475451354717023377588805030022300923600718715029262618794758202955817341818233889201852381575043965927328029955969846754837680" }, { "-134379788461141842858846278268259347105", "-5535479645589936472405910397299739073641612836770238183712206042659632410776896398062277742229906915852933418684231779996404071421767274180368154310128427", "743856583805332082970350662728998610690268824090148728726850517499798631519601137183443104910590855501252539324674812560702657332874686395923181633958702249128106139207076314713649515720653835" }, { "278271843790644800793473851247546123375", "-3845690285506025443856370771250487683891303505653819308540635173436088084480277686684743918745832832765066355874381847690771330587033980524869033600561589", "-1070147326395532917564114389205677334125034378502074943828571411806344559859053091006175486397820822872698474899835730026158782698085673635033947150554253148685482702599776833910878579880042875" }, { "22345490710865165412267189692679994671", "-13168094845644809414256057134926669929759930873747535851687323456073141938879368460977723280750841588750507348317544461824280674332488497533955177541413394", "-294247541053147552931885013427268298282376074124656716577088212043667912662239091316191145352314750820026626159649861330384837204227899202392764926604802655267738710003310052268554637728023374" }, { "-223445051950608517881717261787296926498", "-2609806601119499724524852022247741111662431776874117401343811680374867931883996125145979162937751368655661775097445043144114599069842524778189198926688379", "583148371568187658089071213924575304457465978545376486297236105670932990897420147110485946155066725440999079357995678147717407410446012970360780626554347417807723098476525833332400212113766742" }, { "12604140228725912459681435851589379433", "10671266866958584640992033560488052420339425977492420594983497264069815016478448589306666811246532193922229713077112601565462530332258877522384022088660628", "134502144009302626262781543880199144227907004673612064586081220538754991037447647926963488301214672345398823354945333417956344119228084327815583754032364976497975702972112644238248704660063924" }, { "-221289678591114384943252477126208006780", "20020996887149770966522122735176842174467884990518978494604707026520269232864200848420530223248762875769520715632742683760311747174524709550334825291720803698613541109690224185041740294906022358446325921538593105347423518731748623037078340006459454656405997570119591344894717789372844612253617591807770017562530034107842444403952657949565007792107071767260484233194674888488789619319597151367813735192433631007526015463229060702510632792171187339118004038505860316305860704455466207113207893106982258864355430481457640304138738182009363353560090082819036973601710432437342931523433079941958203038050750205966472435692", "-4430439966231074415853738608900692925851705818190624801199561884242897308817127146763274284287396980593383317678766559004881552228480591814939402896201244425805503258878061459604511214900528594870260206969839682573246490602076070316760182753341371682323914671418233629420599310422437691170629449435494697829163966912842611408632129590129483811802031178053300073562716917597174161526976287351465154825036851645956354853960835948518860624747958440181683978083391663149733813297698623499283645627889274004656942800842013709298338912226207338477579862672216831422765369078886850523202897989792734789430796029206661261129141144642117177625405158700499049991760" }, { "180785619668676509441152734583033930295", "-11909038209406834057075682058438206007134213485822042209417443270921391661498900475635417780140585878716264253792335317341527677051828500780153492153490249297998660274828986996948999762620400587091118252205695562417522111840305140989214300921122857271717052213225664738544344394774362885331856170636862181712515248810239601812262573113794334115259873527539564296101166439562124016438281173202196876398090029995104489712272260608848551754611421227761245487365953257890749115194455096508613617028024932657498899001119282498614739316599704645009607294747043489655424155986912576002393048535846081096337705941547991821928", "-2152982852345560218506186041143281789706715672110278207735389192913214838321097754496849942223194392302524369156102301165660674797665128931611291246607346536492650554391248756408556789391955568308599431054809433808337036546281323840555452571430884302696950144068129601527530304907460164571704857360215834011779559395577299313379666503707563751314135201994045874159291100986903645360754621200008830207429980872071814202801994486961737459218017354210479544121100423399040398021780750351097082070296255480707530391964970754186799748521538525274241709676878827522138880241734356460339681718690408853314007343934035505873192699052380699509877559455199604508760" }, { "-196121729286794751535600080816329923561", "31755463535476988506639447113088283661031267977524968610501132544098607201258848456920865390506381665724254592728643925608893982794532243733117636645689751360224314774452374503339856173343683819017479955914451013484169313685311530532055735999039466721411777061709328450052490025363788971916050033904534189719389237878257877112162843506491071470067738867693853480174965212750301808781573369342701195147083717623066339671595077736036738235636996351642097684597005928843274525502529735435418805821748637387888409663397547514467435322454217015563134545731593492200855670248739786405074231658957946422903165662016649229286", "-6227936422881500100190187768375947805694946596622670066116457374856427496311253030141271922822486386675428302332027411428470488965226898801659352566022706152307022438261392466548357753526474097246042956052374187605144719189465046544498482461077851578811186829094445089366592317045580466302238653533114619908864036973070346979261546801894831273337217021756025770590122176562027129481076270727248949609326868225755958667670279949371399535144788247565199415296122873444199709788941984099349149684384486618280260678252604631431089580057102263617056951788273430713908768738965854953667135156866028646584137788146112300214498814212865170902491169332389942607446" }, { "-149247491509558553673630984739524508601", "-9241905448313719916485289537122695595500213295294799660583133638026091750542612875183284894676615989153030773719811347110864468582634048542108726080717551794580656021381515769591713295631818532114918070215760259364277583650102628486861397602958930509695263902920994329409932518607260720657755504091822028630927071374796474717671220452208310602827254296323761245420486376569048549643478954846020045263141546849795367522490793641049509748005893155533480849922847230018411440739584477452313387881413141538766185123978087175960946255649923135634987656065468774634483495944248865774633962770893338531522570776854773975281", "1379331204929344851843348280532786532350930013132149419346606977890849868537539899667631713548510207947097949976792337278764045110931774279794402312944786743575421497528669859045492875676005849752425421867514661792129580445000023570590786705609341859529483054902802038173138834528021423393677908655442991197348183257271932188161681770513283703502340499171444058119260228931558784004778969491586252899270869275893402714040693571919281494643765571068045362364213060063345212881008657925426024923296369533374671614852576576041747836643356665301762059898161073609265572267138950725010661453917338098901465732991316661901878681888138048552901254914604845891881" }, { "-246070233154436622785727814428081917418", "29761582253452470642591719346200231425423204062498655510037025199574178834762931489817919404889920159374886981199608181795387339523762458361385170203883094308920011218315748466148953320570427838912637152446837553950810011344492780712558515815917745810385725989241835877316836808088478276603934260581342710503593237081689944686263274319354100341139245512159619947319496638082702549196795236216458749363904150768879765280332386830831409591769966706351022328535490587838695167807967607003680703048770719240872629379640571077329748828739281770075441660330884779539288220944313294762143588847790653176774089774033399559617", "-7323439484151992757431054484912931979861244043627630118213112440051387392428853497035249623931234821362770902740177541812170377563064854590834087655133962963430877452052749127605572395112726398103244974178157574726551814002744001021805127518246639418981066588073652668879613252372759895389345727455380224104332342029151667860553645106555190741775758687650292791318963679857313030729683299101577207875499929500963723267185390425716927303375831321783415003339099100562942730763231688479910689887284950156875532151104047755803876078837921949287811575034368641167438367411569736575067233548122814012421044943430647665260439418887639347030312118291762161708906" }, { "203826295936164259559522643510940430939", "428315860474710981601019542870649234168732095026625500771233691514247613083810271191136212287636290276352210600151884730196161003906066671915478570992925366265552107746965374246537358349673161970290367972281768471743836339191023211359427335141701167253694144280251188008871929010775436125645541749886873478179599464478734149706121117222690271210887178499620737860802605991262799781279373870647695125320153193063528861104479576369448865373971847676465682752435142074973627172566791961541105525781297462635428308325033717669972726101583722868689418677558787287897456521530400671342257419067050354522203242849353639864", "87302035331271280954456598486072605056704393103691656908943847729634903654600322194677794243221825233700566108459784062758955025931450719283517278054268553004951352280583820782976072352456972931479389375165173986780482062859853305469143408707179895843295115510597584169486406323435925707638987591151227843652210256611991940374072593149367903739596883229844326054223707236369465710416960023659329202073724249764308867733476242261506975691004092043954515337899900837434270833782490145948781128533218641649564543508314976001614187701395586824982250794852925954991265270537649691628899148413763865280007928191637215283244406869662872539567459561720369352296" }, { "-5899540498246269366107488541138263797694914692322476860852796858749106720144552037986906792251681094769894732746138541066810195167688318229720888479512583", "5834015210744942902", "-34418009003174534626858248456163154666511779871358190892629413477534042866009573638264296461516598238780495750056279721797403178867717911762916049857737963922333901125535866" }, { "-7558198374656605586076446665394545534375963428962439959101805545423930654069723860456022097647139432324162475685494459942871728608277717748075653794546685", "-2079670855873590264", "15718564882684481784074014915267371190416032453294568239793060140651422710113447422494938907375595456199203928496644205320139985222135619659630853564447794621716315309474840" }, { "-9442744083812363570102321552182535031605446031706376100893354933468482520577272174689455502380973733378565213055641110431767353396963744600184737808983381", "-7204974197101757391", "68034727473703353914019458883709211780958983263702756416891835054494728840771498925306650413027883039860202168095834137357212487561983607389479135319040711944281262212918971" }, { "-10658732210276096534851972646242288663170038580488752611749460640657411087860047053151548660331707024718100598181073744715506934778234716535781332588396176", "9193953347013373121", "-97995886679587166046252015742839992974979220158813197140160489510432960510418039749924861744197553021702396544307690217470606424904065359660871469041838900287446937257585296" }, { "3330096979672637104536573277593029682675932033891010715180474877149733802060455951241981993421466123791200840797318740359792251505430948855600408060492000", "-9413190658845804679", "-31346837782105095097578725347257193539696338226258990009265748336528353873277500144838721882313026604404426563737656928378230261942407473822851842589487713775609448642068000" }, { "2224201331350479188470378485954814766783857696988331736807430786504130570570323948774102396158334805040994159865821844362926631687258969480929122732089195", "10226747830478556903", "22746346139936030910929166328517425029735137934434969334578972386859485783192993228082340012742115893176871887387993591191632260444955081663604449277961804869872353878963085" }, { "-12394770820700925077767705800588617445613665027183406054209162910642613421436080064653443098327137503596792411463268187212855350864330592654862321763110243", "336135860956209890623046930607725140868", "-4166326961171213704571179876442248501325782360170764344978629523457550315208845439497110652079907652744850691289494398473488033083739905461347650605270023127087625641779424751335704552988710924" }, { "11792778994619176404079667787533709801900490264171877873621265044313417667869688303207909681289642260521608966405181881416781694320672906600599581862090088", "-197661229068721548419113517262926820105", "-2330975190212228827672814304508257223671550753091700552243633152084831515892056240354560520878171696176381845689952044935988868477421447557890739834031207059212175922089523097911477486879619240" }, { "11608994516281296345925963401821217560860934641820086911326880657644311461955556832927259499969983808078591149768068360172431078248807463030805586293656663", "-40654941048774156019243747229920736005", "-471962987694958552110784676392477007070112288398143925079396435246284471999814508543057304008480666763661066976653446723271982094424149279649226771823800871458389214002872916339341019732251315" }, { "4821517917539756801293776911844480642406562140007084392649374723119190602353617113036081438891134008988421494142194891002983491670246762173236312873933599", "-255528396376819316172341014108564420589", "-1232034741571035406264710387186737842510579499938716343220834781077329515145216794636313459582844773420679078031627466542930137302257934575129329529129776153159694412903937370462708576694469811" }, { "7638751115643228563298483305056828584775811590562130101723525925933790010789130133831569153863129513189315440899053288261039147463032870669035935364282061", "114438828287750304954799140618669114911", "874169727255956505920153418854946321208907128396839975975317705220623267360648189969313978740314703015845506506608054761304647627635292132043887080298168302864314697920637105700927041824911571" }, { "-3653826017463740005170218884285271512636869606149686475539243914909566619638259666405831445823138528809165270360144267462878986866506114069923299116957450", "215752050445782448772085819939961259625", "-788320455239949216234629350585027855111249573063377172522422069903710014529292638311216050777840734448624510386643245486023092483841464815987597578151663227035102742664709136512524899527956250" }, { "-43242564273985683175827997542883970694363047476880657467026050730764924897992516355909421962249292250047896135687573746158665836208681548975073555418266", "4424346097667245771102179669235543742385176589624011161914909311078645828684936231569739522607200308028372644149306431599085361996722603718517735348761218", "-191320070498733614136284309000213964486426347688040889144514933290125387693498098446328694172047943298442181705949005984031677324306763731212307716485454004382079159622650481983102917517993601466178931324415483972311904823997211920702201161092866663969163567426868740120661073974542958600768774774949607988" }, { "-5093597555679260616199210906198149266592665304134802327659606846977583233938836318559188141955851256260954289429418183711191354912372372976165948043123133", "-2240632735861652612028397136046974907251405868353380459030143407902436514978447480884513019736738955326732458088791830752499716417751919868492224207936623", "11412881426559848135724717164530530041659963797467536748076144863846600718211858527283843975968920120508569299672573958424908957105703597501013710262110218780710678312197455759181436286391257283676806548463507528765947919856827004176416634630489598937924092540289712219714362500246928243091408698274649199859" }, { "6049789822056553589237940133475342650218069231558204589924996117723031491205673061674252841792149409384720347601549237626288416453061224734057079515141650", "-826416247951451524584060567988229017033981218652490450160817307801130685352465013890931297548015267655971295627931896259998420078888499206031390299169584", "-4999644605638856588581238481465237523157457201817697008198975191261856978252081380810200468420738807464233192102972784271159116426108806200426852134469939032473362689081653859652824862066224063273799612269941254948709760659691148103622071316554194507524610166457990087959160807415102946877307193349131573600" }, { "-1175978338162966145239180473229656000174129248706173549637767835154921467129547950144109700900405904250603515318348888619371004435353505449762899046094747", "8633693716102199391202401198009047492431980605560930404972542822133579985462906768067706391388213605203282586546130434156768523403030127356256666478340720", "-10153036788469908062299722391986722149392791936544969945546931764708792252481931153733789787389051773529081688846141949513463792442701686406966696738286561777611293604311491896230769507535896070984747493738525389837795316954065260075941524322954935690803870500012809797698319359975893462672845329776468197840" }, { "-5083395547684319640767882199938390155755986838939007846911062687871291096073452055061784159768637502151635665247461348347470360218957222873087414506633886", "10813098236568616588240471432239693891825284805405416395976866126102880121934298269375465735278296789484402954117593716698067735458182402220278016922449294", "-54967255432446073625448401244836956268872685687128644401372608170106281377801209665004925733448944141633739594240156882328181133879414641109484442890809130544146420476457200729843868300396656004198615619691952536924980482714767859804902602805398865249514544806725162402291122143659939645240358379962457176484" }, { "-8944626200084865988157251013718979706166428261352840753194709093968177704853157211364231059892647813839391802007588961807572842923682104089512428902387812", "3814836951264415657788614449012480613328314590744410079075164918748648723114236698412482309581077603776489883375576245233128800002373843611668945838558629", "-34122290543331565327874124324135450224668275222811493728051290368641401807963502623692504750924543845019291736982354932620821594287780848608647686402233097059022704206628297180782771812500512744911371653368388270442874670230118309469599458827222162362901084328510647514081302476000779049412605744638457029748" }, { "5186176030253526423885531264483408352469356233262336223619904269047786350470477526433506158542551137478071074193659876898065998079440819597952826155782068", "21428324964794197485898135923805540163916541943812058590308650649384013587098638034673796533027113673143959572855470411726978105342739938341516634354246514986124789451866589211982659199267654387148420461876524076040233779391563396552267276880650559148637067641021059664960876301072636635299261389450890094318429077561092553337025096293793433968243940381587994428364726938534453507046761494257538813861046058298873206568935790790373886840765817404479239485444563488020955730741209738203470138117422899051269778988135668626686262669881048094388220931264751830393793846372816717368806996496715219806062282836392457741918", "111131065300898907482632501071313138589398597291097276435916516379173430095773463468344138866282820740991088290299992221985607057347883717514843661030457396422379155394966857856069231504805779448809986906434617741485942621643754096548512120178021034054648207248963478122178145159262707381679354401629366698488021743300737044695960363216253889163551918513521913593214414139637549577618641974388739304727218804595402055185824193445089425262833385286117064481648652550355832014346131722965510192584901901111154083186713580209077544982897821477349293279848852596241762198202012197892321827305803333334823616660229870976569043453639028059771892706354703750763908127611939169337399882784092285804830644630059487027413697220038110815990084742241055099963659761569486906596326424" }, { "-12615422028124847936088012564413126213419674293830655240645918456932358053670311316461359727921727680491520480380615359506308571290338231702217134487397730", "21538722931308708400287621200994476771789912594554241036641406577761480056366647329031140922034590767810855360008375309986798226712928670905618807986829790199948665185268081173685941421700542631395958882077936923141152528333121096909688700106365468854487023847026564219531968849793109908193037522063952753477768381591929787242143631287330811801315216116212154423972654430356675401769729358415036943501470085182304183033246682446978634892995900678975109490698283226559860736462409705544079080978470202336645384768211440438501339641775269445439018148409151795830925198162301321965042997632479354427154223366199106583051", "-271720079725309675925162538296715595434811519956795637977932956405490708202732964133816538801099235844279338645471102896234318181092598033040518838847055114923365599862266767493227393553801736813141780001130539648588341196802606083178208108557367013886856183999712817955194261262279080641101769944037282423238147653270651419282545398168930625797556638625301898893565965773914460998322350526545278664715332414172614761548301364063397364632709194713561073496860524124460861314674679928692398440036071116570829193414179054372604203478369755566003622621281005164747628075596444178089558747835994702060740334079222508147598079351187013336751322569865313532407367116553748939535664259669808534100091049960040092785009707220249025633808590643620557093069849490009472441113874230" }, { "10381022953674450046578890619826448644067144294659610359943634722044183130638243233110364436029778310048006743033299956844491228999113516347401915490861208", "-20974871685432829994714153210121536409377362402944992609230062091789259307033495284524234519701670462495676590513192861649457148897274608767543942797542628100823017887236899471151903799837558453043431373811892813126194662218472834650841742305925226558315372771353677064933578639099452438843500601586038910108679737480263349221244638463171088589123712367802373159421798288708123925853179931628847579314900787361946716531755600236755527982132768286927549323465697241340003870259800347640599467922823203446834792229595507968354687630029075884034263531531423883902851487995214646322431057626558858528344843531280263328354", "-217740624416854507100100919338835880277259264187442792458843251425095703739537223785767883764746809214920580060316177442387941385712712426957388995082877226019966428812240179251716274377143798847348759498926420314709056615470455134468678662646006408843897699718742372199854223008996321568642038054564397441209859567556502098420151667437837356649730396360374136203172669776530655738388121236079327354422138744456395348910073462618440421257604563050031602590345028438897601523520973759458890228893913090702884911857207117714231568437403212806578764580006787626657709435954760239671948147344463295520930250155876010414461245194991189183956653772752290656063730950237649394743456230607077768595983629559996700837383822873994717987698780007691157576205450973669241823945091632" }, { "-3984492646329789478973994496812455855595578196959138558282015917391108383154917581748539892089090551298072688793487597623310815918942283997753800645644511", "22199897116873160263914990610762123553075230334116099569358672964060004245706770678771431369917479502828754815568950371273785689812698287446020480951417047185190067265849637510591502642000414540862689426343523077229502494771352820057572619644085930901096534031496492870227890836816886496090287321502805172125273822231241073590840684742085641304915656543831190976008986490532066597410386596132766422026234488163435487889876791504407434387555507637783709991326338482319227500686541368087892665100076351075069628862376686619537655838590687615291898971286325099164241688147975845320979841704002364545072665891829427213069", "-88455326811459002089798581395024759975871889172872668466370443703433800509268320055453743803627754859670391415348970278548381190662701716228279482045339649051139909543850883613464992501666524385524517648069873862957915620016943364950043289963237718026629805297916194484838158010754666017024585366330526135823515744339445036315966714684052345462172808299142368905939297220895721123725415007532441824406115746741972351142687017849809593982432484296719999502992792447259391592152463664807498752410740679664044620898308783634092355737296495489953554685938970593890496829484673393665321572846542839714620847185428664388282452532264810310019327395691530430185946743995669191791841546685206884247468693248673484055915613115527492005264289557719000245333079386593840592027314259" }, { "-10672574004830373997900438516438419278676753890756925443116289034080220708922677740383425352837266631691319394850521121221541344600832530724104047804922665", "-7307684417326792807224298894786988180161884427390942431653062127076829842696634441114228528164049031680536693195116703321494895319862805505304314401000204515985676763063862569446064343853536464020413910728442475032187317639476018710375702206456631041987826826225461927793241495220512935434301833094232834266749666697332380140380619185254354273073522191066457437931022783436360434167505326773192959291779779370530770935758482422581712556111319611455306383173529090289274267200543081481693078804068524057891845603351773722737987393428313340760607600482724483853560340630587029610437280601010173185018227638972500038072", "77991802747865927212086621295493124451256238920588746597961055391511562690441964216934615500942858653797884925704270904527938466874924049039962754703188019915846345804228044693122758075602494985337649496117180241872910247079655077012999375809878184011356481981590430241786534827516536543734645410817621964035091467871491521760928486006653992134635010794346993161329777270345449763927429735191213854873362673179799811714902439637861750855639857969259787075469241319618538795721956528400353086156169058060112255274542232054021662809196965752800525093125763127895334967094763817500702626282397394521201385439419885607578137159972521677923972708827090645776826953976605193554447841693259586575931864396484621463004541561908426383260772786784541411548146173991869741515701880" }, { "1420855003086789510813111205540636553863493314684153860389816109865085846062678305775289632805233481596171530412925552158799875183492757047174905459819169", "13897739053062356545217161606361735964779941697726983959749295377836209520566715597422965426908191354971972501742952706730523748574796773473606175934144970768662226027157110240776527834790487577863781140089347362129598158760833470434895693782503529955845076709376071972727346128409008293671217324995682020009675316075606538241192607139905488719485728099428376369506685875348346231688684483781160648420909364963718027571565217314827671844485031440079254478598236877074793221578612249882886835580737423192061550370069895525711885220268707201966615936769696379335772521903910689934596134239331592980694745008817040569590", "19746672065138309742065153069587996891492444461032276894328314121573439684229636534026409362850111716212254549198595854140809664451286626009917828620279583631575940837712663100442879662416765138504151063632823014639305658882804073655537352377258786105147057375069447099908107785635606190515362082317465738205179108333064680370909383338688734129396788764959056886328471374018961975554190739706996184818378586233017775166959010668462907838359485424792026496574369912033757997469014639705459505746723512361959074802456098328538419933637295482429555127226978561859965498424173552676019033370307387047798600024901453757451579262061785051932535359410827170361533603618131510421439128567361259204833501190218719779570258541358012741265599985490513564378203502703406698160470710" }, { "-25117824099635104147178796272946098711514362630774369209876335291088434247131228189812265510495277875692804180473811834186270331245779845635089547499275113671007257221593872123397418355506777725721168216892830217596134983713752526559153149600553468865338887605949011743043425900799896245185282419637806859906582214420191794114207677635194054239563071023206500505880052007267243210206807805387341085613436600843317096291021780624738422589234020279836961194869688005260369009833026575446099544900581955685627511787510900479881434909308757027825050977932238481841909425598834367032841935054158448815026264505726593064239", "7846111496222858966", "-197077248428250572361351389692146917243277049539013604789802566767174747369897711991559940484392921619974209620152008632450612546796556905740493507885376190913893140368029841033442857949219716681475253727058707723386016055991276120001690579154370788782636181079931076758384034193266737114305362492836167078199155929937891579224024229182935372106924021709421948701131654358516297806197381566809357458374057189773041520552821330635689748583803171230633654728360451100477472934847975252390985102859262992904778849652221553818627134153578436315973777720706502751232660284910468721430874674021521629540714057383398858244828214000543075116874" }, { "-12000343217458212092754251360179138661969968218789048702097501439124892987400633614429800307263114371624489988815324366411323242909652002510513570900627875514001409309670202055060404640758548257776155562167062337394219073071639153822126554525439988062676648294108951003012550815746564810508912122306190725453386412796036693387315128514162061147675205485143205925649214342646148112549805850530430229663418469577245456944558387628002442451042105749848177325651852669794048215063957689756465788955050513359977166122710392613631703123491357791351447110169966270916789849428298930624807758982400706608788793481972190953569", "15463017349709835150", "-185561515374029078700596518575548896805308728003103939537818954646551372890610870275966055765608887701776880889777402229764948269089126750201922167386201171243298907675542965323275634529293654817279957832652909009385491998537031060285890512199675273422070784691446251899120095880199298512230290860589352290462643231396804350623684034400741386070220057232978556614620855818271117742675632435727751812101639747357642295230273344552327870600519422276996860893842363996198017494117619585153346745838853026029459826407782259598477529242420507010652705302341725948095720110508044256096963772599572721279996322424269691990173052929936294150350" }, { "20244597897909303129995907707212050478823487084391413473821544089492035634291726811145005824559631386634261268723753786161463497881725871168747275110149007801865428978596190887145324535224079986377522166727137028753272158887188902047835658826867304220850429481233026043496635847568448251753504834367809877190895369288045026559783632709799678639927825194847005181499299410953860627694080906167346078299421796974815616608326704894611151743720515377248152215241639534004099341398238713597030368980166731393247619511322804984829747216779359780372801101821087516269912916462719248736442644433057333788741151270815989388229", "17931151643499274580", "363008954869078360197158713265773114114991766614027768774402465306840646219477262855625957403406166192075865834283840624408916170935610374573318606346031792128003204902147985329385955814330782527184421959263266167048755628089412213360508944817963403092490479480264538027768728303095523018598016863928762335410109567604756183580676503045557867957273324581082608248341332512325136675167966306268035077761004923732568405295901819511346235524577361289712297365403327125212199451099538443576479787130510546755789504852631291774614010584650672707483555436445926222945298928326313943231688436271883746272589347954697213098866117569339490918820" }, { "18134862906191691435095953372467318196853760384894170022863300447691250350836421337333332682828557871096554531436829166444150586004379181099133295174348038948038399079336722004125999533719492457544642570217406286811480006881054375314838605871238868968956868878182133492469763282800195060849734382249696543089869191257451321764806079423169235271658993054867624410589213892458246001270123109841429271429275464249821855221014782727398959126117031823977229309775211695677345378510417534328974531801634095862859684508240122911023047425473036305928743193594967362216559973174709883576295373749738633873828863608550295977368", "15082354452174510460", "273516430292774638949326170314933525797985748367549139070674899956657807928629067317576809269188258819686207094298714770978509118959142516619521080722291318367607601498107007447014759288176261262818034997399866363248136237609824401265450913244758024085739876914482935655100890803279961929047974391299795570244708811454483314898873277493486428279875241232025231140855860469097028388778917980779775554139507550577255217032521719099071084956515691364008526064349956553916033914728254580848198941020806723485184338914882588931083516851849558411503129184026079582257756707601984686901646494090820169212279581209612798749779318126482639269280" }, { "19213874382308276075905228027166553836726993832150876980655958901416537033385379180983129528081628446454583401834309285184752924794893846406622935494758142810049493348116192315865522516744262115026742103678965417868790607689989205765793528434388393584537260717130892518011447327847533083474230074174308157934463971640826422302901570010591182715932658037868980053012095115562188975692530473556182305847290196895478280679341869546292639446526021874910117953225154204035612531584978136604161393474554294315903436682283787080297348697922389355209790646124024053098888687638640826064745026930980189268652291562437512941810", "3155416591710364359", "60627778016974262766014671335614995348970065077989108071534610098195400001445248886220725085881796599270026085183075312353388418711598523030563716616967792282609748819081238929738105086199457414615236966895805539596649555457494710621217412773036416007129418290246899690911654008867819945724649185574237527152410775686803449108977881160831441280833577932476667657759420192656716352190871667386955409426879693856001112340390304980532208752863058384169885129364117656404549585836664647784765508649117301622797243353610345828189312360124462238989888436478381583689386509617357901461416012201469794664889076397809504626996523928173064949790" }, { "-6561903839860415551587224953276060627466820222543175464705113686962550773423611522044145975606965294164125376820288981286542044306677764776675868357117109664125730405280822770267329297542599719353907954399688197248115043785617436343303277493146049939491224480136371029084354063731401026459653680017632996944506546122253686805764620116169065663214526857151412139439538335533979733329962892417175374550305659302592107472151941922230309227785266745974334776462642676959433923828440435340579340133192678341787895007461237846313005612116885419002449356480017828933592324336731295317076205553526568668826499450826560670163", "14908715577157091280", "-97829557993133908713082095435440645457469053259814412551982534425389603663024461131358343104414088618618030154957456050473312402460589893359522167472060177968099538846750606564761307960896264958539903740023783283814849937681270591589750181462708056758506230073751440847913386576449367635057595344744119561166438538811561109125506233466453974371464999669336530949393433719456191822836826214814780222021267726528396849558417851727452246676857867278196266042327956933753121947589485377148388716839519782819642328655117625818256334190717182923260613562191698788004591479576661108985313450029332968584240383859113741485244318702724563478640" }, { "-10378013547095983701124686671659666242518351347561698092030999302329372512356819420877395264401390796163955327080881297568412490286247154759694714275858127906305200295043241717769593877683535229411640745872559018085757273530771413156968541499388413497221629366848027355125816131586610997516488552323667400115617175682996681969687885201321292153656071894385242141321468096793766926179134511319941715949712230831768643024119693594235207988046511542691719002262040067921088838755337917414526554050602539873232518619281766327369577617796816586064895744680567067970817494102948032924671421242699225194947982378019119315136", "30004910492448871409155105619400474385", "-311391367570036811050052853596227388481520279736812036769684195465110674594690412517879149770622679377262288447706750813509857551308594851067359841826754786725926298013483569424123912020079066150719085450400229896983461212531213110847425940968466564079253939695853896434719530729030897976597410468081535234663568150722646854183317007227669132983719314653861536414057481478039579810285535699518386214012059191958557306338432321511585867535008319640705419431310336566447165302011113284064246284641707577414470505948868362067233709611758700034131461348997580441628136979257037186480770286846026250437141175360847735150981343952303257191661069675154710791360" }, { "6311357747888359229575837883366949670125882865462293491587368290797766017168248637163030339387377997726585769250585768079027576213724941259801478313127113803503561717311996500019522893295813684259416551410025111443510215766297835872165689077882298506134885487991732718254835036694083204758447948541157893533099634169589161496492972953698758234452126564385255035294546278732684663873459439615228706684138982066055370429797835904846166362278557095045056472775166294675997320598469599722704075215700819354957397052721573993997624711445698656580401684113096559767093466880001548887739825916626416328760047783071058963451", "-212654096583990292869707082365869207538", "-1342136080095566600483524091094048745061145155430997807005186206704767933140306297188996797343723817220160636373424666345108189275851749622201429179882167381735732553825696482751584102093819432866729465599060815670807282181979889263381844726842751894916887860819210652174987999919869623292751389157233409465756974677789790982740267208982768450215563288024088369480574425410032306456026930809228182100949940216614156925537929648841127727165386031716586596638254705402653861723407930666152691102484352058909219619985877341630210918347460471644327858114815713557305185589162775699323253049631349906791700893878999711846225062306568467992135934882289075693638" }, { "25104391676237653962996674810232896003857294806799086059884413856421530328279649263948893056601611073815235439115612155497964541323584159786678357898152394779494741995735881624055133443980324145256438160990490767324719276757840825641421547232460969806196141938571103617707677351907526127993230143577974386169402623023560579220343920203666762052525898442578990183400559087522259053245822827313206196194989095468393682721753147596892214609346047051670610252732846805143964713621673722554204896154742594858056891979146566683467510164875593192581407047920719605560716270697985110227952698114701527191421628561835164291236", "-205991315859231724218751687295926841150", "-5171286675233738337789203670843122752625713948587464573381323151628930998435518250812603433784823922283042037694290795352461861058217142213862777203850665369756106838860420507328654214723398688455622487003912073924323587826356928211672752672052670663842775836967587150049181838707784871641183683742967716787111671792311389517753578360293551031540853470719098360013225516593755039537796518619542838794169319227197212817921098393499332268929332950035803734983497370378852859829228973012039890600437082235032378948656232679080766068869430262740600476498399803176452431728914806536862849281928869092524387549297345184969051926149006293586531930828748109161400" }, { "-25971587288596053786734900662696128734726180676323130693160397208008930123341700520454723462226657743365779183466120836187720332442041321870351823609046027805781414454998487673927365486893294110931852680018706479684281928396163669935417207859889405108139261480861908067489849403284000981453574189898304616775302917687860062501465417706095450121596418236563421425311420755550335597318818628123183624214438801254105808079227429950505879366254661664881055965092586612702279548151277733307180663770432418397550642136953750720624507617115504303570076531620003848642167562950736271141440609700821621532583527124386811144839", "-182748557863603655835821910989658558236", "4746270122419629115710902425435990509747636609113505336611751359043717100752575149404352359855260443259846554733621122684788488984010741203981300775978945529551335641218319619542248418128319220383298229263331638090009313676486209764655429828385994626323209879925281409485074778611946493692237774852428345451174837474328995186242262565013937544898941834362941815633750896882758939509605799422068815435202904271722442099465950700886702949580264958171808372530471918175963644209760378395316412115175988232945569517230829200985652504383431054550902852797293952515652017940918628980037316292352828228005975466732028971159947131994753006597870175664981312344004" }, { "2117427896392849163304163145095251890404997781812823978967013619233450901604407363671467658244435728579079751353560538034596183240362499870272373308111405924505741579887345118857908796509418246599428633956038017783178050402412769812823236255234302205027282366926174916871858199918908361186936687654278623156607813451034087735179167324944824913226799346886951212979149617678949292799645035425029596869092844906629996914674904522806258932192931217652241231736891642224851547474205131131019084734780208254203537633402057673465583362982905095029133132240839391503135932501785844503813910210348239157828902668852795945482", "-296778668392678698960782643314222141731", "-628407431508980610909134894336322264939705333430111861505965183839156278363647883745193463537783397824947515214540990712455315080515980803996660089847066076833542492719707493333185909990202372284811233272987993068106356248349054482194817336258302692039392400931536481136340269417905505366385505196886218794044229758585631131853635721528813397816307666671727692971421531381290925317161326036075629905443938124481334173158440927555118173661486114828362551889594188958723424604273078091320087897088472418346754088900034854230711982602435635574895960156993014703292551046970069204857846207328434544990709459402656908170089318995291341536347275682867153109342" }, { "24743327715258194976385899813930363006464428087412805068703455203318769863096919192538751530954777047772548306936907016751357570434930538612382851621309732767199276228580401695793317612267605312672263736938703887622824117576912830029817460033437752668221355377879837833796222831371174014543622739933433581963103361464022058091243110136610854806189138108937004805781857031030005354158991203388998364340053773883952742645161560754545458260688560269655272249435540890073696261770299845722705104648358053080678920468895189601731801025555650490534399590288852165862135571140382055044665678298182909026026068995867606241201", "309156501491030456401354118244509785044", "7649560631695275371386748526795333430293346807872366006552933839286343590101586516802834568317627508914888989005968805867728947519409222814667350103434422356009252082456906520988877859152125402282765775845766265340707473525444185795403554160270722809642681642831847296672303556012796775586274347178092325226458743113317655523655255626670958156216225968018208281266858684283741496986683426354716284780229004376492833583965647875097951642088252875535823145900129967026856898970545720526282798418382467634180690243423325770596949644122541224189780082061715230852249880601371985342796525016176048518593825361248232406051886794538203297084423942036889326397844" }, { "31345149697924857384985323414506591310628538098830133854928154990821019223495435414394178930529373634315044777562902565397455028894455733092896622048288278424884040917250546068175763309233883078972879622697667174865833277342334219810618450605650614585133187005110148963483824629405555603493157452295284935004578187488673124814714326405406894084902824045787647963172437833905574178160343833139650913077173865287057167288286708807322607983179910358234015596109655900840652230258122852488289951986129788952718105898226951651151495867246384586164892018870981480003722043190639707903266193064807571586900961788679579912089", "2067227180806746570739122295766566373146995767544546241400900414826379465803168632854028593293108913670556431832056563218709444199286888840721753894461468", "64797545442006646811970698282511426059102976298051534827345388707272469591333019870381858263624490336448197115781363489554169207652559213486772008013638214870324260793199674746523791257170452738018910619029072942848422098770309928561867618844814267276213608306045020686764830302020953883994906997293368193331696747777630621086600981981357507299729947717565760536305785574555255589190221698706036770081438750974356437738060098906046001271392354762036427049946092656701257615490057677558059955825843182799904828201890893555678855718728417223845757559310912618029462136640226686626513375024547351747669476392735304999046232068947570708757930233036922714350584650744960478326257916948676866148362166017752159953504981324652709881831381637989229842766220141292801807437886652" }, { "1965759082776833678304908699214846485256126608825750175641683294458978302204367346739996602241053060915897480812220051082619942907491598551933638540412113496542245474287364500698693202553692963910123752514310355402167440783023542848697962967771951714434359320001430281377747193083851165947498546085410216620013287853719686698746328198021011905482303248172483782066908570502837009924228011993318265674390462360820566174204659723461994730913995303015012684826295802887547970851558451858623353950391701673651959262042520584275132971807158231859672678070714276061110616753309305801080136339206017351200193800253572481467", "-11092241138073130060021642325471345789108575712118027611362686690749327689527135459714040658411176246054106270789083336195599640521602432629024562630323934", "-21804673765518097879589124792137157558586438669762099454880024920520894260754279593873244443852337739758694535682558790532827482894104906218015712179591886600693703465749571299271429989154199263793230178266758966678432691901731270899259065726530463438316383699558373053423999416350780342222940065486831353604365192968606300436304827279383661172824549131179471364227618431414928702407510473319879188990689163932586727702195573766225861364297410904859137393184592815970592502081722125458353280743087607273547490382023433724488604177909671497082747464946083901888849483505451426245881736990810339421864101129619181017696837017966116165703320918568645290788634265522956017905246042460811062666193790657969385648522736090098231379029903772234867701846824572274796526421531178" }, { "-4067457132547237558852016696244696525033953641638067592741078194074861352472861925779476293767777560910963786727886946479865734639031042985368829200802420611189793957001730656623744670821921724417176679009632346904384261431052972127975733031277489967119978909321422086102208644766894305071609385305464547231057263658903212521469801833214062476735046735467944834107695748433481665714184831786462886261252526036621257865158497049125410241033365487816324425563483999957660557670189397770488996359512245971368638615503320507431381893539767352426795415898379765583574977542068222040889423739693921998717145084904555464058", "9635268828818063607505341812331931088336041632536136269505180222913464638532245578488168867093853062326136774925531196873279749483997619950077042084971972", "-39191042921786100943542578352486285322085069425292685238158202937549417928185097567102615300826629615520476316505465412722375794150552330462353356124896483739321653441446703127728441315609093330694305784991844511900128172079464896650958648496336601612657347012294121239821167759496102233234525084695798195547141521849769350204659392602605928907953707277320590923278178152903602506284861018886300148663530071056792375593665422754923886137410482547324901798328311927545105456397213670390651819229021443747424183114992653572959318104053511452473611466305149349027962240989590453237778130260105665310067480846969449221473610614214933278048389171979184119355459010233147440293881252851501522689209874112819966647846701257081192324007280573826673895648273593609466000383382376" }, { "-22047771987573494284336211037167956208924595972749016352929724093971147687332865088249749580556015503923927321586913446367676445848750229391300778587369581738560634537089081840938984779012854694220894920437076215176060179241185151442003472788530160589267677502568156006531439509890061829154786579353177129190813899423306499631144919702707240832059008168851983259611724134448165201725432622521420667808597545410136493805873769372831833878868603946583848422310946469083400330960925084024624317866822897278934924368888332618046649078771617892961267312226309927786691384460940015979582201446635756024251269978545916298961", "7481502540911026808093162425787184755732317118387068406204973030847892995155568099553397887864257088525242568880427634318737874025160499293315047534753494", "-164950462146458057264341765173378248123415893870534274075422323606836246718538063890359159423074703472625232511667875897808555123518162244263016096627959208397334135559180524195701526029092734741010866589515172934676451385008535538102832400604699294088534999994990970130226363762230944961249818769566697211068918154629209895730969522747736738946126971914549491889482944152891334838234907190697109929512401661529882587076352559260375439428815896053844621297552401396168240947357044985051323834074355418902009161796886350497072010833513601114819625605048943438304411954380599728561071485061414856047768286383287807924135081902458690495890129203192613070824670256334683011083767124852354110322463725619194174195587835939047474059288568764831570274891727391545546467943319734" }, { "22607201423790553279447786193696575272983924506336369475058795405894123712509544256099524616893423762658394830755129501447553593365768543361107397299007141714383407862976654294384881771985218996697067215804348472693636567074361380875512341556932579903687576929186215185312685712277482751425466251201421842248749944123326048360909954588266368306843116245625635467041934524547983478110533044085242847795585598341867070787331785945399446665919396062565614516404861115244243161694059679274045050270546536781907061002623188435269769778378780371158624481539046590932125320888745103158180784231722265376331553893647061533815", "10075764395489719205294189472045365742345400155046712954334138069917417587273618147303160957788995022989479371576840422540097479703418600112174202202728054", "227784835187493343385594867881830022845566753253174983274076326016001091958812135049265213053390506720261776960833046225700903422206015373488419693650378821159134369608830936915027161415300759990632038898164509761337714774392506802504397626551196717184785586630245704512525844329038355790338277254618639554796026366029578805283659986085947726260520495140332204643887370987929304924491772630534558682402396784510750317396488402942581973350428066695976988812610467654886227733900635715495731445319565054848075104982244316563526232071957624002266648721592744376122065531440026836549316222728280595228806728872537793522244957258060730038589170810090676474272044568671474692128168357087077816573419470273384256552275636517940058764711467508281344270125535855785388198570146010" }, { "21997874907846585575969651776904015812729615626636027149446399573806943459105370044846476738175828244018281160136531735881270437472624605280356112191272531838028896521621800558410217146758345955334174583639352151367532676985598470747138461153212653362188252002768647808852054182649808145379073620834551216386805267446360709820441771932135218282126427988826945094538034579367527908530151926679515746133600376612899354099328788736038811470295396365432559354070365548930628714861826464935305416998192532029724853617023971964507955475554955277722555849603716733374588174421463022213135839490633927005539569058361144905451", "-1400498192750070094581812894241996480373581610489471746158083224360249880335094841398529960182484181641387946900090289855375996313447832474435929084180606", "-30807984052781257825246153008277875918087659020905755686964119182052911551148620538090633516362197112383237624321406969368641524681503231262834662890145617622830207559490089313283375890353617292096501953380469351747504928597461154633889236826060654886877907382241867167198409355653371944304660938495445848950444683274236538890057643038410268234731745456035923559528706349316582901179686671568504971088561096469997823300883298811440849031903066114422309644669680078733839046643542078157684064686933779591609758494599988463628362190034612412739669041368897594110022347872452261447359402810277413572637740870748949093642723240662839444216981630862346445890780016393330114883270596630385367407921496982236074288475142085411632630374714528706189796772213264952893973677883306" }, #if 0 // more than two arguments { "-270155241925436273159477510619232592261228150696806729750247050 15545126743930076938536195287546926534964892301082800206802745964245668351235397 72127079799316080210744562119267314209211162112457416152560774669179705347659265 58427280233475514109627698916382980237252687770812483048907352594138577656301900 91336330475502063985843547526216808965829995610054777216888670176112782119332811 99495081134815818196404370468895496198561677002653930126818668800341380375657337 6904264296552316628911621065724553059847235903647375662685025031963599691416829398469283631386160328944460790101458427909545198569619131058877708293713734", "-16074984786353617526516141164566295497596312655026144270863093715961484079732496604871734572736757225277596743795506589617891195569235287256031608792067121393492186703333733526879481948463529609113624075923052999494363547340563039654910799974388353472433635130983731604982117092991918514078659590068643956240711810902756784590442416249652077644077280371860780741318193975770906075446772544431670392964384669681404295839302410058434872964315897505894833409101781069230919347279857855594782111721176074849502391457684148683668165019969667481755384384017844104770253558111588611189351637275389688093074751942960310850074", "17849860827147993486644896214424106325295064110723402251474432199595968349198253682890653243676378684005650871261983711134190416277366473221365848417375107498764965893729640224952922241531788638514200018520970345581414705756736222535562338748426356003659523260330725662384208724142177900990027225665451069059291754155591197426279006090296512196415617974140965334686090032257444820748820516976632201388937358434205022475303705442914044454220818215336283948743042841946229853366515552653568436171217572212088935263340599371830215580988184775240338748954666846379831467518505260487989636951404886967842600777836444030434816421999334066711024026401362115623932221335906548647785232855815515579448393689650116225664467056283988125816950714780486880294535933597118808163054631168063568847830481653855357008353733414826165759079092633441356914450038756281940532159493763482047244493174370100586359619040444818634156576789665732998111907245928253704097384811414269835758656988678207624731164159069547745777423464124959379113843649940896359346515513936964849811155238140671698227057228045173997904545787593258286212427476788605370334985423461194148838623911634821153061693257996982252745844329344589168264774527631972524787804330730506700000" }, { "6411564443509812216548163965666668398784964137255201222920640150 65325385402074288043601436729391841747319174569548241717675134253657593233436152 63305037198546989906433329294566491017476837189978173607681765241525113921707860 72383582945810879300930057856704905379805338886592055772943486702915907397618845 35525980101796892634292856352740658817031405780112750352735419884048051630180860 47579150292602967366908574298176357632207539947399443701205872093150879604391127 7775494633965874654516687741429737470333189902121089184439228657893110997221737422210698789286625633365548095171257583020272703565350668755439139356570", "-7847653632223099338936161226557020783515367997970448568586056286591257384101422312757649765574456754668588904917800060981155642916520580540801153603733496143328839018174649200566737789874193483124577734129346933208306772618814806884416239295732454033604210880463262467564639515484363761639994642888910703066277724414372379965872478153546766131136324967950786993982228851928269842355632200589446224738709869729930285189047112131897218464505263042012855229737941639093204086147932759923796947642895167078971517834730472596647456786099215405165290569214043431009370032818978995463168133051136053246705694337584724712230", "-197949741939898550383903354028842356745461597695099989904494711851411610441324234089773644533872304737431480244289438922163630848266242200711131210228027234579469457105291847132071566876246332653149194709623963836885480655282595345693084881617726426841183231475364991154699746506928116505297453355016975688761948609740314324443406930215518937775475617384099331839748494157863510168743547396262979908353122625808170296763676837551973930928848463398657587603606321137626467028732193151671337338929938959296176472483674270114824853018199281637976410726195357458134038379491704909997939715446657856320452698914513791221947734373322868574099599391493563479057703049036936132407025278683219316357543078875410080612067641232277376174351958080693019953378024732243763129075732499165068171168470237875348580987967740148512425201518758344757030205911031119619416763996490581551977913711646761182756531618786226541010835120092904291975494846126923510483263978074437667987560077422810120462938292680423746968095994108344184522240467647491991837793653579480334442342102339933473270535800619630342940590477752278184994533764839125736268376640933720554199782388890444619996919031351334561766248781813883867406045414518951152508504891407920000000" }, { "1669833986019218156514274418186396165434871163342486930502417566 58528969848472951398118375496887849181512821636583415470809040929690124231959506 50098163184827557635697120379841225459445103589988345336880332217224622666020381 90445522698871905833766573423181067004916996574451008349087758531794463581708977 92366726802191504770638415639612204654473958526592425718659284841373421985393966 69096133232785816552402133765198624674167660496399099321713067612475604030259084 323971624832697152056406152359288553860210436839331005469891386690556929684663075996719803995137130737141925308417709520389528780839777347463558171582753", "2635514624483961079560488004237441873979133312246005082134175818331132377114926863102436691793380965631848192666106793612266994709357524826644421074908075389316030912936338175907209987972553710900613011802455058538786723149316934049388525865455871552882282353445228425640452635081303490379594663330152071465360003249884180020993032086861074931796165970076448856988084523672973069824258299029863033098237556417571526135639288006133579174344589248428714474318969988990720790226604664141927030250855550010512291136517209169959021730625428868037074528890516086527430801590050720467893089085308995719513895962750896813152", "2413207990093478676325592386500172980330574558867366638913149256222218924700401110600319869300256745035993991818342784487193857053589994816247466074246569162659879368383295411190237107255160498774228460295857931362161062884154872938368166514128474751716517750517217000290486110198899480877593169193610813452614906598055909439037075588626529658637140089909227353944313408987644743661503976835580507054926908821206921014266535160031749397432350114673787218438589065861056449106115395189057409933330355574558853874223262465965933679584884152813357065227868165556818717270584803360466149860292769520737249610469675917864449261901859162854558012721179400237645357401213337423255109839806528503425658270050436129019270883446965562683284298538825840361267548675967778385927410390726055957928634152514415917053614892441910675109517307682075989998558764742821214685548219206933043196677521610851950501225469125512893859254575460130829051324112015464552874242522140166275233893076603452098841950130740353331198999756316969161591691095397245996664755249875720008141774247384884623389430842799829690618405724986702942913150258769060684255363816662231923570491001519802836627028431389746450987110456127797025006251203111629141890634728548553728" }, #endif }; cln-1.3.3/tests/test_I_plus.cc0000644000000000000000000000103611201634740013121 0ustar #include "test_I.h" int test_I_plus (int iterations) { int error = 0; int i; // Check commutativity. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); ASSERT2(a+b == b+a, a,b); } // Check associativity. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); cl_I c = testrandom_I(); ASSERT3((a+b)+c == a+(b+c), a,b,c); } // Check special case 0. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); ASSERT1(a+0 == a, a); } return error; } cln-1.3.3/tests/exam_I.cc0000644000000000000000000000024011201634740012025 0ustar #include "exam_I_plus.cc" #include "exam_I_minus.cc" #include "exam_I_mul.cc" #include "exam_I_div.cc" #include "exam_I_floor.cc" DO_TESTS(integer,cl_I,cl_RA) cln-1.3.3/tests/timeLFcos.cc0000644000000000000000000000147211201634741012521 0ustar #include #include #include #include #include #include "float/lfloat/cl_LF.h" #include #include #include #include #include using namespace cln; #include using namespace std; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); extern int cl_cos_algo; uintL len = atoi(argv[1]); #if 0 cl_LF one = cl_I_to_LF(1,len); cl_F x = scale_float(random_F(one),-1); cout << x << endl; #else cl_F x = sqrt(cl_I_to_LF(2,len))-1; #endif cl_F y; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { y = cos(x); } } cout << y << endl; } cln-1.3.3/tests/test_MI_plus.cc0000644000000000000000000000154011201634741013237 0ustar #include "test_MI.h" int test_MI_plus (int iterations) { int error = 0; int i; // Check commutativity. for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); cl_modint_ring R = find_modint_ring(m); cl_MI a = R->canonhom(testrandom_I()); cl_MI b = R->canonhom(testrandom_I()); ASSERT3(a+b == b+a, m,a,b); } // Check associativity. for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); cl_modint_ring R = find_modint_ring(m); cl_MI a = R->canonhom(testrandom_I()); cl_MI b = R->canonhom(testrandom_I()); cl_MI c = R->canonhom(testrandom_I()); ASSERT4((a+b)+c == a+(b+c), m,a,b,c); } // Check special case 0. for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); cl_modint_ring R = find_modint_ring(m); cl_MI a = R->canonhom(testrandom_I()); cl_MI z = R->zero(); ASSERT2(a+z == a, m,a); } return error; } cln-1.3.3/tests/test_I_abs.cc0000644000000000000000000000034311201634740012703 0ustar #include "test_I.h" int test_I_abs (int iterations) { int error = 0; int i; // Check against "-". for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); ASSERT1(abs(a) == (a < 0 ? -a : a), a); } return error; } cln-1.3.3/tests/test_I_GV.cc0000644000000000000000000000073011201634740012452 0ustar #include "test_I.h" #include "cln/GV_integer.h" int test_I_GV (int iterations) { int error = 0; int i; for (i = iterations; i > 0; i--) { uintL m = random32() % 70; uintL len = random32() % 64; cl_GV_I v = cl_GV_I(len,m); cl_I M = random_I((cl_I)1 << m) + 1; // 0 < M <= 2^m cl_I a = random_I(M); int j; for (j = 0; j < len; j++) v[j] = mod(a*(j*j),M); for (j = len-1; j >= 0; j--) ASSERT4(v[j] == mod(a*(j*j),M), m,len,M,j); } return error; } cln-1.3.3/tests/test_I_minus.cc0000644000000000000000000000111011201634740013262 0ustar #include "test_I.h" int test_I_minus (int iterations) { int error = 0; int i; // Check anti-commutativity. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); ASSERT2((a-b) + (b-a) == 0, a,b); } // Check associativity. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); cl_I c = testrandom_I(); ASSERT3(a-(b-c) == c-(b-a), a,b,c); } // Check special case 0. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); ASSERT1(a-0 == a, a); ASSERT1(0-(0-a) == a, a); } return error; } cln-1.3.3/tests/exam_SF_mul.cc0000644000000000000000000001534411201634740013035 0ustar #include "exam.h" #include #include static mul_test sfloat_mul_tests[] = { { "-0.56581s0", "-0.117477s0", "0.06647s0" }, { "0.73841s0", "0.08886s0", "0.065615s0" }, { "-0.75174s0", "-0.173615s0", "0.130512s0" }, { "0.557236s0", "-0.105034s0", "-0.0585284s0" }, { "-0.62105s0", "0.828835s0", "-0.51475s0" }, { "-0.54287s0", "-0.92243s0", "0.50076s0" }, { "-0.2173s0", "5.5084s9", "-1.19698s9" }, { "0.467354s0", "-7.9517s9", "-3.71625s9" }, { "-0.95485s0", "5.6451s9", "-5.3902s9" }, { "0.0472946s0", "-6.774s9", "-3.20373s8" }, { "0.196037s0", "7.3548s8", "1.44181s8" }, { "-0.25535s0", "4.91907s9", "-1.25608s9" }, { "0.047058s0", "6.612s-14", "3.11147s-15" }, { "-0.35054s0", "3.764s-14", "-1.31943s-14" }, { "0.372635s0", "1.0613s-13", "3.9548s-14" }, { "0.627266s0", "-9.519s-14", "-5.971s-14" }, { "-0.0293884s0", "1.1626s-13", "-3.41667s-15" }, { "-0.88304s0", "-1.1160s-13", "9.8547s-14" }, { "0.318016s0", "-6.86827s19", "-2.18422s19" }, { "0.605064s0", "3.4281s19", "2.07422s19" }, { "-0.65415s0", "-8.185s19", "5.3542s19" }, { "0.87548s0", "6.72325s19", "5.8861s19" }, { "0.45806s0", "-9.503s19", "-4.35295s19" }, { "-0.995384s0", "1.62797s19", "-1.62045s19" }, { "0.26301s0", "-1.3169s-23", "-3.46357s-24" }, { "0.82762s0", "-3.411s-24", "-2.82304s-24" }, { "-0.042412s0", "-3.339s-24", "1.41613s-25" }, { "0.858284s0", "-7.610s-24", "-6.53157s-24" }, { "0.75574s0", "1.0518s-23", "7.9488s-24" }, { "0.977s0", "-5.944s-24", "-5.8073s-24" }, { "1.1316s9", "0.87906s0", "9.9474s8" }, { "9.7596s9", "0.58181s0", "5.67824s9" }, { "5.5896s9", "-0.91708s0", "-5.12616s9" }, { "-7.677s9", "-0.67695s0", "5.19694s9" }, { "-4.73655s9", "0.65572s0", "-3.10588s9" }, { "-3.2158s9", "-0.30076s0", "9.6717s8" }, { "5.94916s9", "-1.02867s9", "-6.1197s18" }, { "-3.19098s9", "8.125s9", "-2.59267s19" }, { "-6.57215s9", "9.4253s9", "-6.1944s19" }, { "-5.2792s9", "3.93547s9", "-2.0776s19" }, { "2.502s9", "4.1275s9", "1.0327s19" }, { "-8.9462s9", "-4.72174s9", "4.22415s19" }, { "-8.9588s9", "-1.4190s-14", "1.27126s-4" }, { "-3.56218s9", "-9.982s-14", "3.5558s-4" }, { "-3.4449s9", "4.582s-15", "-1.57845s-5" }, { "-3.7047s9", "1.2985s-14", "-4.8105s-5" }, { "-8.9172s8", "-7.294s-14", "6.5043s-5" }, { "1.64864s9", "1.8344s-13", "3.02427s-4" }, { "-9.935s8", "-7.9116s19", "7.8602s28" }, { "-7.0441s9", "-6.3448s19", "4.4693s29" }, { "7.72866s9", "1.44264s19", "1.11497s29" }, { "3.7816s9", "-3.16285s19", "-1.19606s29" }, { "-1.06926s9", "6.67816s19", "-7.1407s28" }, { "4.04482s9", "-3.52235s19", "-1.42473s29" }, { "-8.77s8", "-3.499s-24", "3.06864s-15" }, { "-9.5508s9", "1.0006s-23", "-9.5566s-14" }, { "-2.98736s9", "-7.070s-24", "2.11207s-14" }, { "9.9779s9", "1.2683s-23", "1.26548s-13" }, { "7.4813s9", "-1.3730s-23", "-1.02719s-13" }, { "8.5804s9", "6.999s-24", "6.0054s-14" }, { "4.637s-14", "0.895805s0", "4.15384s-14" }, { "1.0125s-13", "-0.322685s0", "-3.26718s-14" }, { "2.310s-16", "0.0601425s0", "1.38928s-17" }, { "1.0579s-13", "-0.27089s0", "-2.86576s-14" }, { "9.540s-14", "-0.21251s0", "-2.02735s-14" }, { "-4.463s-14", "-0.96336s0", "4.2995s-14" }, { "3.270s-14", "-5.9141s9", "-1.93391s-4" }, { "-6.515s-14", "1.01791s9", "-6.6318s-5" }, { "3.695s-14", "8.7417s9", "3.23005s-4" }, { "-1.0900s-13", "-6.75794s9", "7.3662s-4" }, { "4.551s-14", "-7.1112s9", "-3.2363s-4" }, { "5.456s-15", "-5.44014s9", "-2.96813s-5" }, { "-3.377s-14", "3.358s-15", "-1.13399s-28" }, { "3.862s-14", "7.278s-14", "2.81079s-27" }, { "9.449s-14", "3.170s-14", "2.99533s-27" }, { "7.051s-14", "-4.234s-14", "-2.98537s-27" }, { "-8.955s-14", "9.895s-14", "-8.861s-27" }, { "-1.6752s-13", "-7.341s-14", "1.22977s-26" }, { "9.420s-14", "4.50844s19", "4246900.0s0" }, { "2.0183s-13", "9.598s19", "1.93715s7" }, { "-7.441s-14", "-5.7324s19", "4265500.0s0" }, { "7.241s-14", "-5.79135s19", "-4193500.0s0" }, { "7.987s-14", "8.1113s19", "6478500.0s0" }, { "-1.1603s-13", "7.4468s19", "-8640500.0s0" }, { "-4.432s-14", "-6.851s-24", "3.03637s-37" }, { "-5.064s-14", "-8.119s-24", "4.1115s-37" }, { "3.553s-15", "-6.404s-24", "-2.27533s-38" }, { "8.699s-14", "-3.558s-24", "-3.0951s-37" }, { "9.820s-14", "-5.771s-24", "-5.6671s-37" }, { "-3.477s-14", "7.723s-24", "-2.6853s-37" }, { "7.9082s19", "0.71604s0", "5.6626s19" }, { "-6.83905s19", "-0.36905s0", "2.52396s19" }, { "-7.7697s19", "-0.34073s0", "2.64736s19" }, { "-2.10557s19", "-0.58961s0", "1.24146s19" }, { "9.0963s19", "-0.37693s0", "-3.42865s19" }, { "-4.24076s19", "0.91147s0", "-3.8653s19" }, { "-3.5865s19", "-6.4046s9", "2.297s29" }, { "7.19225s18", "-7.7232s9", "-5.5547s28" }, { "1.98907s19", "-9.9239s9", "-1.97393s29" }, { "-4.27195s19", "7.0734s9", "-3.02173s29" }, { "-8.3115s19", "5.2947s9", "-4.40073s29" }, { "9.4386s19", "8.6548s8", "8.169s28" }, { "6.21677s19", "-3.135s-14", "-1948960.0s0" }, { "-6.30774s19", "1.5884s-13", "-1.00192s7" }, { "7.6073s19", "3.922s-14", "2983550.0s0" }, { "-1.44485s19", "-3.355s-14", "484748.0s0" }, { "3.39653s19", "-7.679s-14", "-2608200.0s0" }, { "-6.0072s19", "1.7825s-13", "-1.07078s7" }, { "1.06812s16", "-1.19583s19", "-1.2773s35" }, { "1.1438s19", "2.616s-24", "2.99218s-5" }, { "-5.79304s18", "-3.095s-24", "1.79296s-5" }, { "-7.6387s19", "8.607s-24", "-6.5746s-4" }, { "4.03933s19", "3.058s-24", "1.23523s-4" }, { "-2.06994s19", "-1.1381s-23", "2.3558s-4" }, { "3.7857s18", "-3.590s-24", "-1.35906s-5" }, { "5.656s-24", "-0.096458s0", "-5.4557s-25" }, { "-5.799s-24", "-0.148445s0", "8.6083s-25" }, { "-9.041s-24", "0.86431s0", "-7.8143s-24" }, { "-2.645s-24", "-0.911865s0", "2.41187s-24" }, { "-9.758s-24", "-0.397186s0", "3.87574s-24" }, { "-5.345s-24", "-0.27215s0", "1.45463s-24" }, { "-3.713s-24", "9.11335s8", "-3.38382s-15" }, { "-3.010s-24", "-9.5278s9", "2.86784s-14" }, { "-1.6904s-23", "-8.37655s9", "1.41599s-13" }, { "-5.074s-24", "-9.2804s9", "4.7089s-14" }, { "-6.942s-22", "-8.7038s9", "6.04217s-12" }, { "-7.643s-24", "-3.1665s9", "2.42018s-14" }, { "-2.659s-24", "-9.238s-14", "2.4564s-37" }, { "-1.7036s-23", "3.138s-14", "-5.34586s-37" }, { "7.684s-24", "8.639s-14", "6.6383s-37" }, { "-3.424s-24", "-6.046s-14", "2.07014s-37" }, { "9.3102s-22", "-1.1344s-13", "-1.05614s-34" }, { "8.070s-24", "3.573s-14", "2.8834s-37" }, { "3.557s-24", "7.9957s19", "2.84407s-4" }, { "7.281s-24", "-3.45443s19", "-2.5152s-4" }, { "-1.6093s-23", "3.22463s19", "-5.1894s-4" }, { "-1.8628s-23", "4.95593s19", "-9.2319s-4" }, { "3.463s-24", "-4.44685s19", "-1.53994s-4" }, { "-8.081s-24", "-1.54701s19", "1.25013s-4" }, }; cln-1.3.3/tests/exam_RA_mul.cc0000644000000000000000000004156111201634740013027 0ustar #include "exam.h" #include #include static mul_test rational_mul_tests[] = { { "-6520062188352981842/3213004995534018829", "-3812444292971845716/15284944374811818089", "24857373879807849010516976362973488872/49110602632729971801355498746248797781" }, { "-844583948128454879/4750740551331102615", "-1309778567130405125/4885884698278749707", "221243590680205607733892613510570975/4642314113048197066962569716783636761" }, { "-4579815856418431271/16947444571374397297", "7990245706938186906/12540719430158043191", "-36593853985314806270746820601513137526/212533147427761354206383017714519654727" }, { "-3587966953201943536/3194797554208122281", "975954052071387816/2707062718507963111", "-3501690886675668292903668827990357376/8648517352177231144330968693325176191" }, { "710265334225408429/567023629756400552", "-5578988760400430103/4131535930210536898", "-3962562316545608552741467762441538187/2342678499616965424161446427863567696" }, { "18305319006789031727/4480148641441744463", "-1641093267260986094/16028097657311023719", "-30040735777106040963634910981471804338/71808259944297590021537032075729917897" }, { "522499067029593907/142530390958606446621834761330018829110", "1567459634764499377/31663510497342378306792964160850079086", "818996196770998943862055820464495939/4513012530308148429025282037949729145117603192483641232823845248212618993460" }, { "6214041481074460220/139497414619784295310756757536261769729", "12187470171919324678/129216394212432939561557938117593031955", "15146689039532873328968703771155061832/3605070583825050709361064709099418651298807367637359842488375232197429738039" }, { "10022419596195177499/91129297586760817507648681092594591108", "239769653037576215/24086455608554015268646156321002022494", "104481394312031409685890479072416795/95433990476618390508514520731482064738017476445225501421324446942302103624" }, { "127731839927226607/59760640855511386051149338950192132591", "3679984267166095161/269870724770589242613062477043917992045", "470051161348371979221331000573148727/16127647460431744118786930146746069875784110572380855085272434637353123238595" }, { "4919926511230586366/29288587285987487013553554568227355149", "-2914615432991234299/34407808954885309804037535414452526052", "-7169846869407694119621783007930483717/503878057947370143933800273784055481319429768630967123178484618174989420874" }, { "-4322680734125283661/246950524730861178141734701180345535020", "11581515233057355754/82204027418720951285150957025638971309", "-3575942340708251875937466941988609671/1450023407574517046920597087724458064116343346221474061477327267648859624370" }, { "-5552456004563371781/36434418778024040927761226774271610950778609263056622471030041615086459120568", "233319937833204741/228703279535756717601739981368829304509550463672786894384479957768850829340", "-1295498689806330283646616799874813721/8332671062513255913250553083541810221054209355142441164334390514659539371361850837178162594438925276666798780352514152276296209564179606228713851865120" }, { "7279569964232187047/36316165899095632459738478614507512808578186173163489609755035948221062420580", "4568992288187244990/18279847281938710983382796940666233712517527808023718591530848159479207220137", "1108676634263212048809114991909788151/22128465550033953372731954247755694375180631486898426116907313824243654714198100644737500721615620412852035450119116976232805701601749863504629937973982" }, { "-8689289043809733973/34365105035540924847908154205433563929060132734873649554594240958996510665976", "281724695877043289/3383396067954681850718083474385093262190311835985400909911383280975222535225", "-2447987313255021583629117408894957197/116270761252098802423406562021935246701911690887646043563899994409915142686943691634418411056232663942535537938126289647041118885713303684881867869004600" }, { "-4176416206981759902/47077361360975682486641492558477246171356187409295624938308162261216397376441", "-10870319933050648575/51626085927005484523186190379579228801774286705829757742503501130303410401261", "2670528255498212232918897515060496450/142965876637554026205455979922464979254073063785755559223760631646970673683621524411341782655829702451013418009338618833412062193643308417898164204593653" }, { "4496049401725150702/8024116634872885909638996643719901973664008349644172107626390134736213108465", "-5231341280619167012/99267989241776204190444307671763754306088564051099822830201760217121508089279", "-23520368834947889555464127765407042424/796537923785319116837266627763277272873506235001122453584405648384893204423914484193595265931840447141766909166026026228531619859740155558402735330646735" }, { "-2488955833769033882/80573015130339486598712021266263458487997757617589137912729682647628329090307", "17723590657579960683/79078600039601362101827108583564759878924923849842119643649415446502020994810", "-22056617181258995266120581914227430703/3185800618738432636378738398589185111057563002909241393794402306079667392482341108052833514927720630087013771419748846412352850012097731569487991234153335" }, { "24410613567363183821142175154197794689/2233491913446620869", "-289777146895293391500645889398422195537/12394177861163531771", "-7073637953514043162500219088395995153310329907185649946877180402954938102993/27682296026727883467940485833673128999" }, { "15029397898618080393623393093137341347/9939158597399833599", "268484092305118852707129202725716126526/9752180454987984749", "1345051417567645337656755504737828287428006597367109244226136136424901090174/32309489404196149853047846865649927217" }, { "175291724581304230067306380062677652261/4791591464449055089", "-207911166974886786162808240992513636954/957635297799905137", "-36445107018739410292029741836217649994267718828374576884161821761303211252994/4588597118993154438342028473487092193" }, { "208446980882041538439350888438428103817/11756453246592156788", "-99855903858077543170703702663212319708/7775813092266901197", "-1734555140205305628415286772698507060801514301420325900368570916304368260453/7617998589456250715053087609460739603" }, { "-49595797981179247160347259926801311825/16426101929443877636", "104499598328969971414586784725010079457/3085074725343747115", "-1036548193567594227670217621556353400490405002875929378150074378019016735805/10135150379689493069951723318357604028" }, { "-288919818051255959565698296502103975540/9373352185361138021", "77343596824463059344208562767410464067/8355013728778983070", "-319229970313622361785032672064391711775428287673147624981393545586243098874/1118778374191039878067165437747032921" }, { "301194765217764762175383920433701358543/150076401641721289621709469985978858175", "-109319143590504335906407585568245068241/158084148208214805386290412276525928977", "-32926353787549066990014316879429253235742017240010356390402491456481443332863/23724700119685440084214937112355810539035473428177368317381421021523605836975" }, { "14575317438235510996984657523859363247/6747043355688580686998987940004831062", "-98472042392613093668204392119412188287/152397803267436514292317070561082866275", "-1435261276663720115408306632770383012566806521695455296458086302958691687889/1028234585957093005711368462502470683211464374115746651290896689614112234050" }, { "7543367187310376010646193530301789591/61115754966424662873097894247178344192", "309940239796651595482411737112678240799/200261667764086238794802895148430893795", "2337993034909171213000031444662193658341848356694420878002930517675329723209/12239143016237439360279809707749702660797878084581096344749106125186707088640" }, { "306232835922656327867425959604977465100/55646521674811091128956181530575055283", "45245255551837746690160535427248646677/3669533234425940180962041078287629087", "13855582919684583969821610044729507626133731299765443289084519977056998472700/204196760665922729081584465192637337445710456706084552841012480810023816621" }, { "-280037880297253633994139513185953058494/23798550327416056573646642830182072429", "13967268482262630670960486883264178489/7947215947745048068401387767511847243", "-434596028812829556627014314125713048434599389957141408329542154357763726174/21014690966139335562014814134594464675233042588696546668504776333756662583" }, { "87160410649223805266866345018804635271/204719779683096591635231158476535039583", "91197762560765392928084914476898132964/277206223024759381433146631560580134513", "7948834435086720002947247338196997812861466884983039250681993725808882173244/56749596904412078223459353928850191672356004665473536520452927516595919428079" }, { "272801380449749740391855824723351316848/2170368723435176720708253536680067463416474841046765138040214254204061862261", "14545537787709209389572055399030228996/8381323291479119825335849511027103148981778425333781230074116361235206363821", "3968042787871071204066360146704950989545352280096012736206796950415592924608/18190561932825050861659739926693806725838682397154479213760300500132465705680046683155463862909993066621811136554677896021527098482779305371951555659281" }, { "58980225701104541897366713189611773567/10973700523953435846969235385386214078292603476932194022615006557054104506344", "21633357583056027790037764923811848217/41236459355840549300942497778444413350482341379076368704834339005347182486274", "1275940312921345964633100864283753667394719832288287163056787891633576680039/452516555639171997520308257003811683819837367444947027711901120987864272999978391252372420644671039873982401560595091423172287702745925783369137325922256" }, { "-39569537110370574225194522625562874655/36290593978404925051095380486087641410218299612051669925683823165483928853304", "39273660356839128453616088747231247259/28875229647500294680887983884278577441525691250738380954940513956990510132534", "-1554040560950035541902707236381071410695075315482961522429891905381129320645/1047899235170633560739863801929205639611958070150694189488499584527041043137082563721218908614201921449076002548982308540689571766482794493357171683792336" }, { "8957762734053174688386697837976422606/712105675122280831038408324375785815130945929819518342973925027507219300067", "118977607972668646264715307919875588738/36563306353035936296510796886853084280648109576589600551753305930842020963283", "355257727628119695756412145322380851760544279491883270008434507085780737076/8678979318410478400681656718586483785992423192579006235728835173903750764880944673586689792087386144715446501744012435157310426693657188196381455479987" }, { "114386050140129336980347743358441052599/11994188887964574384037137314302737861703229337059619512751326848591488081229", "-50822174853799566513638003084407139228/97406657802317796912648600328217961853548397771614449630742570869667560514587", "-5813347841057137571369557065847591420664634372223088557679866032754664253572/1168313852626327929522799656188055465298138284154709873285311568978496136227795809646907486798429717114923178357702460243511883684964123937654308495387423" }, { "-22147677230189664783449572410799931501/75580058176304394102183955194485040346816524663599269056794063928343401057143", "-127672554664595215026114551202414743739/35777311684781371234035985601066874920871049301826919955489852676067316906014", "2827650531865200718433745248471704607394596478050653604940563621773668622239/2704051298527551014378337257898371613519363350219566689647796093438747503077807722203668806231503452508016974614236112792032033672965127824348803574358002" }, { "3468729773587632113679855593063165286551216344725198121609354788619580819847/7106612002452012151", "20863200733446307102600190583661606839853255577505815215312643683864543217073/5700246487811068117", "72368805556440529088812813715602124890901251289457147618293618526488567540302416253970205832659523238561757581481150988870947074663135867252252227647831/40509440107213064064897416415172689667" }, { "43306673717838918980731699770600730039727453611468399058203483818093233880231/6173575908538565981", "106634227988568775671050783423559067905086861634892257032833451008548321218936/17988169594879808463", "1539324572884864883885215269788177741067901747630436643318399808029602335378536990210735234944615096105103848497832537965483619535769637171783464984418072/37017110149885307295697375341989232401" }, { "61636028396239445662576777415312348317278054920190931147781159688109244233565/149659999183936017", "50280832809996410949441105432174396823883728565382915986396125237655209339731/3406752842984125790", "206607389257567119017662603624829733217835095238758046754428174885007999774491792658838812826043033826701244157167565054600950156595290052398436186551401/33990308513391731439280046802638562" }, { "-100579490802304807750359433955474958462342659278486016345156932756807754105945/15683759624513404963", "7314396152134987983181095955389244247502417255088677055075146925285457081540/950287995699608967", "-735678240508074701153113537069655056596152436111651040530896921701439724727486696483134676487497031899584038731663111390949471467249259023050011663755300/14904088498613295322494450308817103221" }, { "25984831699359211750216710442693374608159925357093100400945034699383345074385/10463598404993207796", "-2395913226491242076662067669730978955981403048697660449593722338244504668974/7015215522730452775", "-6225740195664363384298636893730784883811595661227613249243163802476751022407971476247993440178871949687923603921101094083879668063131450147131783163099/7340439795432595812648347200273983390" }, { "5173661857391320950903772549611256023540539838210520778403003347430938670915/2590493168574884173", "100300641976357496491877756123729102910724064566692821682523911939220592349990/15304416107565779147", "518921605664943617990486317157527087053001312760892500249127957517476408720600460633868004681188890038115877413554399588737851074382787744833707113540850/39645985375676570588146199684023740431" }, { "30299639015164203561126609159677900559022306879488518544803392527841364186955/97638167801975054493877206805944332747", "-50150465496280036231382225902610460555496341860773955714344071185921583266663/170117675960786609061777750278261277482", "-1519541000979732808188648781832621044050652591754537200855596768903085847105531546641139177813880505696192826380113425984545675787584857974943247950981165/16609978191541300835961154615181304582159561006676548938424954151558306303054" }, { "-34494394944257769716276791009665812125094062960425641316440943461722789694119/69239821080832171466311153221314488591", "-68027404272124217088707268142523090163964888591405843143848585935878552833247/257149529774225346004390673137885895872", "2346564149995340998782934409780604815295734898030424565252099571337345550054284934036215402972664245125313098735082896555892607540059632597741979943574393/17804987432587488254198543762235568841018786223139145264591718687823557996352" }, { "22330754509472350470460807673039908304726422770752644988051418230315708975569/141163736844241522445115344332946835969", "-3776092949566234532895208849184634613770861313997034923686862122594334787771/22367110097535579962848998753563258272", "-9369222740190326741203615957382420344247102784278353165345406236082475331042528539717966581690645628370939381978953360215380653092335198860022382107411/350824982641632215769272917522017419782283768012468846380070797128085153952" }, { "1376215273451682681102140384578115142238259557166158859699272578561460124263/3593386179017642636485249017714833669104405991325015697577507088650274886871", "37146275008876311604039415809582675415172661567487888072055609579242279390723/55424998453085285819414374477780690192979527887019008768378662580126754826472", "51121271019052119686352858568900325361226598163234091421115939503875711782442415328681175322030659510284806538410228985354770913411724825992699509412149/199163423413390889071651575953261174839972499014963134990506980080139461063269751906284862132821075544766093817070661266293471833091996501160433036049112" }, { "-88175289711320073148300791156190227927348022787624424521937188958291199926437/38194742314758366741668899229532351990874883495690656157862650973602784662629", "93421911195279228911508870033119580111709458306921869937709821511660370035352/66371395138592894543765954603571534463846496049156722497129962530412046587003", "-8237504085028962150049531747535213236460729066521397582683209771842938254589363802757604921456170821878391951762499073662677974506165863935238701489400824/2535038334389561782321790943041741331416028402594806464107449488311138037598457377927652600804722340759363172755193254192462811091332303758223034251210887" }, { "-88364214910455569163017945328431687038422451206033411348821431934742389780753/43010507830592044720656702803904712217809857004582018186125828892174875808576", "10405170283887792832024806983921158923908589830001636723872220129826733402834/4055629711949631304631599195955105801456753694558712994574702123032807265321", "-459722351572673455425943766571506569631562018487574498847133029199411842205331593858852090421782204158679934054007027833206633183796877753882057444427001/87217346741895687976684378003169607737518608233754137677854312677618987931466495788077930577814677920791330694741284253568592140275298729115088619596448" }, }; cln-1.3.3/tests/exam_DF.cc0000644000000000000000000000024511201634740012133 0ustar #include "exam_DF_plus.cc" #include "exam_DF_minus.cc" #include "exam_DF_mul.cc" #include "exam_DF_div.cc" #include "exam_DF_floor.cc" DO_TESTS(dfloat,cl_DF,cl_DF) cln-1.3.3/tests/timeLFatanh.cc0000644000000000000000000000173611201634741013033 0ustar #include #include #include #include #include "float/lfloat/cl_LF.h" #include #include #include #include #include #include #include using namespace cln; #include using namespace std; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); uintL len = atoi(argv[1]); #if 0 cl_LF one = cl_I_to_LF(1,len); cl_F x = scale_float(random_F(one),-1); cout << x << endl; #else cl_F x = sqrt(cl_I_to_LF(2,len))-1; #endif cl_N y; ln(cl_I_to_LF(1000,len+10)); // fill cache { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { y = atanh(x); } } cout << y << endl; { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { y = ln((1+x)/(1-x))/2; } } cout << y << endl; } cln-1.3.3/tests/exam_LF_mul.cc0000644000000000000000000003314711201634740013027 0ustar #include "exam.h" #include #include static mul_test lfloat_mul_tests[] = { { "0.49162375558276684976L0", "-0.27595139770835290185L0", "-0.13566426249969417521L0" }, { "-0.43085705615141429406L0", "0.76537655129782028376L0", "-0.32976788773950077688L0" }, { "-0.34725675573811781168L0", "-0.44040731024013641718L0", "0.15293441375734052306L0" }, { "-0.47158645084591665022L0", "-0.5531952534025612003L0", "0.26087938617692133303L0" }, { "-0.86377959068682791106L0", "-0.8711108145957097161L0", "0.7524477428743513754L0" }, { "0.07688091831246728666L0", "-0.727039245375017451L0", "-0.055895444833634576195L0" }, { "-0.65693719777446694155L0", "-5.4929597366864347663L9", "3.6085295769067602507L9" }, { "0.9553509506606886749L0", "2.7316499794256227606L9", "2.609684404716519364L9" }, { "0.86245066819702621825L0", "-5.6471738746979076876L9", "-4.8704088816580000957L9" }, { "-0.0011095142242845852372L0", "3.5868904614046262004L9", "-3979705.9878791318615L0" }, { "-0.07537979049336559763L0", "8.268739091555253606L9", "-6.2329582036573719373L8" }, { "-0.67924101443000006024L0", "-4.2094803212494913754L9", "2.8592516836286270604L9" }, { "0.30774277681107480866L0", "-2.7334742019139702906L-11", "-8.412069412384417957L-12" }, { "-0.35713749207523871768L0", "-6.5398928539622633783L-11", "2.3356409323048581577L-11" }, { "-0.14801577485738927266L0", "-9.963460779718656755L-11", "1.474749367571264873L-11" }, { "0.3104124542612814659L0", "-2.9286317751062608258L-11", "-9.09083776938307737L-12" }, { "-0.11446530018625016218L0", "6.4232974401995419684L-11", "-7.352446696780128213L-12" }, { "-0.96939447601348607505L0", "4.1094462170225605183L-11", "-3.9836744622561876338L-11" }, { "0.051486415762180288123L0", "9.676829213398296352L19", "4.9822525214063672425L18" }, { "0.6313327973134614946L0", "3.2653448877462378072L19", "2.06151932217404323L19" }, { "-0.37403303660944479204L0", "9.102796469067070187L19", "-3.4047466049628882508L19" }, { "0.8707828063294901403L0", "-5.5603708853312765524L19", "-4.8418753637615606188L19" }, { "-0.21026381134874289964L0", "-8.2572592232280544185L18", "1.7362027955704909688L18" }, { "-0.77817271482774886984L0", "-5.862569134483721118L19", "4.5620913392465632268L19" }, { "0.10774233598980040668L0", "8.42277329172514105L-21", "9.074892699629673044L-22" }, { "0.25190108887664378198L0", "9.9261121984538427104L-21", "2.5003984711022594346L-21" }, { "-0.6756036645959631085L0", "9.531794528346356556L-21", "-6.4397153135265482465L-21" }, { "-0.6857203923976410447L0", "-1.6874445000752253093L-21", "1.1571151047408247225L-21" }, { "-0.44633489376857998266L0", "2.2805928928283052886L-21", "-1.0179081865499001544L-21" }, { "0.6194914893234261562L0", "6.122106446320417613L-21", "3.7925928402275834338L-21" }, { "6.0914569120648219218L9", "-0.13082334282848865785L0", "-7.969047559320230858L8" }, { "3.6214037646489572409L9", "-0.42724054260765242458L0", "-1.5472105094100157093L9" }, { "-2.3587970682548096273L9", "0.30389573937962490564L0", "-7.168283791037869264L8" }, { "-1.2092840284272862272L9", "-0.9464357317324953064L0", "1.1445096143169982957L9" }, { "9.742195251878672378L9", "-0.8436238049826486367L0", "-8.2187478272737786206L9" }, { "-1.6670311480587791415L9", "-0.7664626357070004785L0", "1.277717087546798815L9" }, { "-9.63709082566058824L8", "3.5038182805272664595L9", "-3.376661500605117691L18" }, { "-6.819958133674458717L9", "5.570090504807835795L9", "-3.7987784043567071428L19" }, { "5.7990616985027046753L9", "5.7633314369957429715L9", "3.3421914592058566914L19" }, { "-8.4466610113280742876L9", "-8.965949996407538079L9", "7.5732340264172639616L19" }, { "-7.670563670654851578L9", "-6.431751468798164421L9", "4.9335159155244181172L19" }, { "8.268803418474998627L9", "-6.6310260568279516366L9", "-5.4830650926695757004L19" }, { "-9.461472353405244053L9", "-3.3101188730107237675L-11", "0.31318598203475886787L0" }, { "6.8579221981166585744L9", "-8.515361268298587097L-11", "-0.5839768506684770405L0" }, { "1.6137913170162297342L9", "-8.897666779537493419L-11", "-0.14358977390521366923L0" }, { "8.022366744559274285L9", "6.8759798363047156095L-11", "0.5516163197503107306L0" }, { "6.268637730252729325L8", "3.8798987053952144677L-13", "2.4321679414199160154L-4" }, { "8.165455714479826517L9", "-7.748491839935670887L-11", "-0.6326996697300302909L0" }, { "-9.245309913477613381L9", "-2.7267702243723164598L19", "2.5209835787164953515L29" }, { "9.113617507957836761L9", "-3.6781774780542862056L19", "-3.3521502661371744663L29" }, { "3695599.756951605604L0", "-4.4160607831464309996L19", "-1.6319993156879467502L26" }, { "-3.1080975558777002585L9", "4.5635619314557275256L19", "-1.41839956852540638L29" }, { "4.379846040113489209L9", "-2.380244519018666713L19", "-1.0425104531125744157L29" }, { "7.799437686108443071L9", "-8.213835920178370665L19", "-6.40633014233504056L29" }, { "-5.0032293022496024175L9", "3.9947928432298324106L-21", "-1.9986864609664499789L-11" }, { "5.1002825856458055377L9", "-8.630588067810955288L-21", "-4.4018438026138695895L-11" }, { "-1.4798783656292287931L9", "-2.1821599778945012917L-21", "3.2293313416280286032L-12" }, { "6.2153176651245460436L9", "-4.842239650508967686L-21", "-3.009605763857489489L-11" }, { "1.1476929860538426329L9", "8.143327858153323155L-21", "9.34604026593943011L-12" }, { "-6.8097130569212408313L9", "-4.5006072118169309446L-21", "3.0647843694383655263L-11" }, { "-8.088711469864653681L-11", "0.55856748494727835656L0", "-4.518091222186502735L-11" }, { "4.4880121763658923538L-11", "0.14537105272497022953L0", "6.52427054720794526L-12" }, { "2.0273639671422034382L-11", "0.5267742506127895251L0", "1.0679631345107062621L-11" }, { "-9.078881981481347403L-11", "0.86040896737522678964L0", "-7.811551470607918988L-11" }, { "-7.2713602444015266416L-11", "0.029963115152720655096L0", "-2.1787260431991794891L-12" }, { "5.8587076221559354985L-11", "0.39205420166003709617L0", "2.2969309395639195554L-11" }, { "9.465227148840012531L-12", "-8.4020295562921954743L9", "-0.07952711826157309293L0" }, { "-9.156088652050785426L-11", "-7.272635024207867507L9", "0.66588891015656744834L0" }, { "3.6865969618651574387L-11", "4.532198690564411727L9", "0.16708389923204005057L0" }, { "-7.773548969171738747L-11", "6.487140494299404015L9", "-0.5042810430233337584L0" }, { "3.181536837232243521L-12", "-8.8275599983550392825L8", "-0.0028085207317644360498L0" }, { "3.512130320642090343L-11", "-6.775467122704530228L9", "-0.23796323518164203024L0" }, { "-7.489684894543042722L-11", "1.3562671200654034619L-11", "-1.015801336211924759L-21" }, { "-6.615171167169027831L-11", "6.4492881876773102747L-11", "-4.2663145267886736825L-21" }, { "5.9969037329081164062L-12", "6.979117807067958578L-11", "4.1853097629611348155L-22" }, { "-9.1419010578306515213L-11", "-3.0321662473944421986L-11", "2.7719763824573648138L-21" }, { "8.653994294784604749L-11", "-2.618325063862645785L-12", "-2.2658970164558872502L-22" }, { "3.778177082827084054L-11", "5.7986141594804582746L-11", "2.1908191129505701787L-21" }, { "9.107023861930220456L-11", "-8.1609888558011610015L18", "-7.432232024672778029L8" }, { "-6.185675579794400257L-11", "8.145498215172660237L19", "-5.0385409394852397568L9" }, { "-5.0086846264250856304L-12", "7.333671928137704804L19", "-3.6732049841708537418L8" }, { "-6.133300578664362783L-11", "-4.647031661618042392L19", "2.8501641979273554706L9" }, { "4.014159298839782726L-12", "7.077385833663047478L18", "2.8409754155675469803L7" }, { "3.9529027598797003857L-11", "3.1931221840357166776L19", "1.2622101493907881026L9" }, { "5.2407793550579649295L-11", "8.178146405814506225L-21", "4.2859860846234161862L-31" }, { "-4.5792905534935737864L-11", "-1.1970719995732820388L-21", "5.481740499497593831L-32" }, { "4.113879746633747024L-11", "5.1093090279978304893L-21", "2.1019082929573231173L-31" }, { "1.9918804321687295055L-11", "1.8243807936344826748L-21", "3.6339484036649830696L-32" }, { "-6.1549842617771214656L-11", "7.210193834294849238L-22", "-4.4378629574447235495L-32" }, { "-3.483482946766538465L-12", "7.8771698631837073084L-22", "-2.743998688718375137L-33" }, { "-3.0540130142847980374L19", "-0.08015004741507677209L0", "2.4477928790118809798L18" }, { "-7.721729897125586787L19", "-0.71282981020428696123L0", "5.5042792570168003116L19" }, { "6.855667806362567159L18", "0.83087248440613607433L0", "5.69618574253563119L18" }, { "-1.0247670372283575993L17", "-0.21215039186338500874L0", "2.1740472851667611836L16" }, { "-4.2451902701279432204L19", "0.363650960045267158L0", "-1.5437675173068535736L19" }, { "-2.3286355030172533736L19", "0.49713327148260372132L0", "-1.1576421857055056984L19" }, { "-6.1529172975127592432L19", "-7.1685660040728041152L9", "4.4107593764821477366L29" }, { "6.7120643409032119372L19", "-2.1673488299796731996L9", "-1.45473847960048627434L29" }, { "8.1354429987417636456L19", "-7.205222753181797397L9", "-5.861767900174770815L29" }, { "7.1263614941049137416L19", "5.4835530180135407083L8", "3.907778107845448494L28" }, { "5.0833800113097826724L19", "-6.2188724451883454807L9", "-3.1612891880755627472L29" }, { "-7.0947371956905508468L19", "-2.434705753418370145L9", "1.7273597469339097183L29" }, { "6.6532780031620346828L19", "-5.126482819920582625L-11", "-3.4107915379365690604L9" }, { "3.3916052110984390742L19", "1.2477416554656457027L-11", "4.2318471007818771302L8" }, { "-2.0596546301412947634L18", "1.4681903489886446838L-11", "-3.0239650502232254483L7" }, { "5.4448198096650564945L18", "-8.328351500006325204L-11", "-4.534637322908812735L8" }, { "-9.0101064221252591136L19", "-8.313725422339249255L-11", "7.4907550819604901853L9" }, { "9.807792586975021252L19", "-8.1013942555768171325L-11", "-7.9456794524008327797L9" }, { "-6.569928333884882197L17", "1.8031274577764523257L19", "-1.1846418174451330701L37" }, { "9.966374081256518232L19", "1.1925741835931471136L18", "1.1885640433338393863L38" }, { "-5.1958776350000747272L19", "9.541066943279536452L19", "-4.957421634462466998L39" }, { "3.0864687811444473814L19", "-7.292720897062086383L17", "-2.2508755378381858676L37" }, { "-4.9023499593352016396L19", "-7.837521201177228469L19", "3.8422271741879966693L39" }, { "1.1092141282192635266L19", "-8.705681388875638857L19", "-9.656464792316359058L38" }, { "9.719341608862581484L18", "3.910223765755272544L-21", "0.038004800546468552602L0" }, { "9.0834836835472717744L19", "2.3217130663560934873L-22", "0.021089242756124079488L0" }, { "-8.9569500426805542816L19", "-6.8114530414478270673L-22", "0.061009844610312705923L0" }, { "-6.250871904307721917L18", "-1.7897852706103755451L-21", "0.01118771846280218958L0" }, { "-4.8350255195162635852L19", "-5.4114390027140489403L-21", "0.26164445675428065787L0" }, { "-3.787718813779143278L19", "4.715777953310022763L-22", "-0.017862040875357275534L0" }, { "-9.6946973380533561685L-21", "0.29842171245928506197L0", "-2.8931081813963549629L-21" }, { "-1.5138229787560283214L-21", "-0.63587548364028950173L0", "9.626029187622732088L-22" }, { "6.9088409628577453984L-21", "0.6675889882861618064L0", "4.6122661486241942486L-21" }, { "-5.9331491274547789645L-21", "0.1840021396402183602L0", "-1.0917121342561739605L-21" }, { "6.5714942924276749333L-21", "0.042451475976117785684L0", "2.789696320821885891L-22" }, { "8.381861494201174241L-21", "-0.14355711097860731382L0", "-1.2032758207303532943L-21" }, { "2.014342763215141127L-21", "-1.2338457666735291661L9", "-2.4853882910224610282L-12" }, { "-5.670580024618139724L-21", "-8.0192486381311308156L8", "4.5473791139832611237L-12" }, { "-1.9225557816894129732L-21", "7.9269598913745234357L9", "-1.5240022570382171054L-11" }, { "4.0368254062037218916L-21", "-9.5325393449487114215L8", "-3.848119701332554298L-12" }, { "4.2776037356780859957L-21", "-5.1221437260809706463L9", "-2.1910501137364030878L-11" }, { "-6.7334467986153699064L-21", "-7.7745493828541701813L9", "5.2349514652656512034L-11" }, { "-4.315187380180362795L-21", "1.3410692406986483366L-11", "-5.786965063410868682L-32" }, { "3.343397258359340776L-21", "3.0757040339096610197L-12", "1.0283300434498325547L-32" }, { "8.5537743863632264L-21", "7.5263454541513394514L-11", "6.4378660968641032133L-31" }, { "-2.842610565794174946L-21", "3.153716909493170071L-11", "-8.9647890084490369953L-32" }, { "2.8400800161467519014L-22", "2.0497242686367281441L-11", "5.8213809339661880995L-33" }, { "9.982896581447590365L-21", "1.6568727649785948007L-11", "1.654038946139843086L-31" }, { "4.678227176611232891L-21", "8.297236114758786796L19", "0.38816355482824754693L0" }, { "-2.7181316933272033506L-21", "-7.7081523870452907184L19", "0.20951773300223540615L0" }, { "3.755562697893016061L-21", "-9.043255746258523336L19", "-0.33962513948155180184L0" }, { "-6.788248742851763723L-21", "-2.3639021583849588926L19", "0.16046755854881268057L0" }, { "-4.100847017987407598L-21", "-3.6481227061862975968L19", "0.14960393120916230025L0" }, { "-2.001548479939126796L-21", "-8.705055796099425971L19", "0.17423591196468091344L0" }, { "-3.670443367722997441L-21", "3.6588667206894740936L-22", "-1.34296630883370731296L-42" }, { "-6.6783435670093499397L-22", "-8.113066551196750321L-21", "5.4181845810903550342L-42" }, { "4.816859192586505112L-21", "-1.1868626619923445382L-22", "-5.716950323755514841L-43" }, { "4.6402358755296483015L-21", "-4.244356902115351796L-22", "-1.9694817165747535215L-42" }, { "9.3247068197076461794L-21", "3.5271238356611001996L-21", "3.288939568434245211L-41" }, { "8.7860048755888267426L-21", "7.187872989134290154L-21", "6.315268712764710716L-41" }, }; cln-1.3.3/tests/test_I_evenp.cc0000644000000000000000000000036711201634740013261 0ustar #include "test_I.h" int test_I_evenp (int iterations) { int error = 0; int i; // Check against division. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I r = mod(a,2); ASSERT1(evenp(a) == (r==0), a); } return error; } cln-1.3.3/tests/exam_RA_floor.cc0000644000000000000000000004055411201634740013354 0ustar #include "exam.h" #include #include #include #include static floor_test rational_floor_tests[] = { { "13918288150951705093/1401140429528746218", "8037346830653401534/12140087246062147767", "15", "15819536596165521240797345101333717/5669989019487990500153722689252798402" }, { "-3027396677293618661/17394867614909941317", "-2291333958125929004/3188627451035828949", "0", "-3027396677293618661/17394867614909941317" }, { "2672347537044132983/1242644867650938739", "-18408840898134373335/10231522001278674776", "-2", "-9204560351304414094275545654164256161/6357074151573303338260935869140273732" }, { "2909960574201625242/1140661215026522267", "13303037060238089383/18166352033245030796", "3", "7340592943788470245594328177983578849/20721653182840810059519494723194734532" }, { "8198662690782244017/1375380265264517299", "-9940234650829186147/17690753691491997765", "-11", "-486100547007747193780627302695509498/2211955773175772955922986386719257885" }, { "3966139130172032305/18040321970861620778", "152082737803043526/946729689784517957", "1", "1011240112172972726360628393816617657/17079308423086645837394450304465310546" }, { "10199468022732280591/121419468943382552600797741323914786260", "-2627475271750260665/95465240194344921114274153619846654671", "-4", "-302411943986468199606823674581501024373007929237189061039/11591338766949818909386523271402122174353420293128216789558932652732995620460" }, { "-8471401573321747185/5927836485002954534423728282157030389", "-10006560123550811854/209494971446104969537769985569938393355", "29", "-54515717208483066409886298754350924985999966734110450701/1241851935162873209670541996670866824232223815534136678858726178724570665095" }, { "3041516402669280559/23467966340832028705164128018098446335", "6098690148519419819/74694157223362514640536233319542912231", "1", "12008521321399654679364472921217933270209469640706386252/250417138224955291159963090840561809997874350767164909187205124534624089055" }, { "12371726101368968041/23093272201098893335944386552801821150", "552920335555268471/59704833009801809998987650097493815639", "57", "10833671498697672110331389655963519805471190684307179149/1378779960416507709477447168250340219220272308941040290894608990101550964850" }, { "3936278768643199217/61530125725985401304656961990591319570", "-4622522820386904221/99931589582562481620405120529601200875", "-2", "-11699348415245273343366505594272785590391481515341739671/409920218067509498701508662179031915635595553469094563928706113041525908250" }, { "3378221394828629408/57360271731094852990248264232533113197", "-4121489923477642292/582636574825978160767401314647264235", "-1", "-234441506605160102966099186988989055202999923102442904644/33420192252492486160839993475212088893408362946965395344436948483624609295" }, { "-3136864170660359113/44018155426864484368550814560728963265607376469242388043913852619483671810359", "7592249764621265399/61218932554330370729612969835045191215382261653025522947071546902482986859295", "-1", "142161354082922159316702479104046765633220994190482626315401062617857980099757409386379034462906/2694744488243248258380889922671073488004909384816885899374920518252041793957332742201117787314100221762775952924983170065632438581816845330037820256436905" }, { "8388845076992722039/113324439625023255923060004687633012536810961583168953468887128369059333869915", "29270787347930250/338347801532036561796340241450622341080868991428994657767799334610272208941", "0", "8388845076992722039/113324439625023255923060004687633012536810961583168953468887128369059333869915" }, { "4061469742865314937/64801603451247667482343238717974543532449298971352747107214551636724513855613", "1344403291462061700/38470586305356068360716898225197866224089081322833216143931662358746898751411", "1", "759644321951821493138045865317431182965861074290543254824595494322779964610920583206631767077/27395117343919593983759778902763691133722708413625034340026933459895718790907695509798551507285536033282436777270923749566119049487283571076783727846373" }, { "-6300876868463754766/63495830134457398131576869576746882401947668656296419431644557856865817622371", "2683373787654434721/32958906466135519543294750118994566579246721224880398401534853634103601897753", "-2", "133096081053989316587079956940067402118415059770888001584265696499152144351877946562766899046184/2092753126391210514581307904104631961415819403699771474276457943469530908829049497503906750315560161637143522534287446520082226490203274292567625907432363" }, { "-472307136668592250/36283411370339306010717878389083492352344779970196813667782297535345620767127", "-3180306511295187523/75166923119981694900512094733973876755239261156251968596129974579413418042019", "0", "-472307136668592250/36283411370339306010717878389083492352344779970196813667782297535345620767127" }, { "-3148795985647001686/64429795462330994424525695145310698340316900821860011346129307089831843824641", "-11298596415200487525/56650030835870774988744337125832477562271330606264442454925440669251648355512", "0", "-3148795985647001686/64429795462330994424525695145310698340316900821860011346129307089831843824641" }, { "-102545151309532699273956369870862301497/6030775709520909501", "-3288683205470962892631604702141093469/1221554251153305018", "6", "-348033375896483356529697355308057680498851424685117674/409273316984297575168605808523732001" }, { "262657016871433510082498751402781174749/7573480743368102221", "51080528722906667824171406466289726452/1601607284756767193", "1", "33815990969774126823949725673411671713268069951579559665/12129741929543448973808409847523235653" }, { "138482489784362691982393629835416135309/3631852344347114410", "-24756007176022054565783765242491988918/219932185588761813", "-1", "-59453406054861418860933161489781197608471921856017953163/798761223827929241442393231350025330" }, { "-212217151846170123039362268732482984696/11596630494102963285", "157767757347916893207763952109296030356/10257360923209581435", "-2", "32941352246943117620876731374547894383947184420447916448/2643351654913607911070701558622724755" }, { "-66747006612989726802598039638160699571/2655077042212383298", "40811355885089157404164119163071734769/5571784139947382276", "-4", "15382315863254661753182362315746357118308047043239937263/3698379038534340915097856546560906562" }, { "68762140087929702254258676232660238758/15300356027061891153", "-35857327153107467171153230588794581375/12686181688605082704", "-2", "-37488456798327399439537660212002603897618511901320984853/32350516076608496130809185423035152952" }, { "242045811640213090811968332747485173382/200549144102874156362839425688475328049", "-14720899626826592765120758929463878529/55362986404688226126571951930830517493", "-5", "-1360940123773119189782995319087829718305547957827775584170427519233923828279/11102999538439281856672090511521389719230333671905312848993361013013608061157" }, { "-119845294654504250162135973476212065855/100235561394484311088266800183679226574", "80594461105267736432364594799413149425/61631997559252488378599155330559465978", "-1", "173031536634535211165479230108382118112369885610634326444128663790131209690/1544429468803790002857581373808877159258315141389178393568445604388376624843" }, { "-230485693234637510798211679560546639349/52735224446003804525152654032694494673", "-216057981617610709644611545583688426965/260006637986112259187147152181319007048", "5", "-2958479432060194175681245276352090941756054532611547690395592385359334844527/13711508411648488620980405764270377927416829995446554240961159998044485455304" }, { "-6594316542549343232263525515993767282/10217421010314527320204876001269664067", "150738011702184633072457541580514087744/135040956724953232085930818414328999685", "-1", "216550304321963092517168155612888510209814057236150214483836375316700196226/459923436164837338339599279302608001719626738369225259576013169605366272965" }, { "215280935061082631947114960623303029323/207354325693067193327551969107966799241", "79751059907103262336474674983968289237/4337760464235769010513178238272088134", "0", "215280935061082631947114960623303029323/207354325693067193327551969107966799241" }, { "310160128112311271225164732000676894965/86670395306350722800942425502835485142", "178141651878134061724955020964246844473/148821875093870378260620578385076958277", "2", "5093132355806944300558276298272344941234347692198850733707837927916021244991/4299483581539365588748720077960621199296398702837049138084337644406995806778" }, { "-108659820552054791199784298344597956614/11790531032698157780195997261827578010352156078055016836768011974016954903741", "-92538322534416259700833065660026629223/19585963177324586927996277066630337817907750129846119872015696245293090497388", "1", "-1037131280631376361623284528995684848351041247146708940120596004521550738167239284685366257725745514224913041700989/230928906647528953486003129436653219142752591225509660589870619206780147714239888278154624266956202529317853226309156501996262035307639197627615351928508" }, { "5394706491096230323847274166255447931/10999333470518091906908673737442830723710024941373839628113269063387717150756", "105688652677006186461732590041930264063/21972728496093720326374563200555762299989227113998910666496198593694363180514", "0", "5394706491096230323847274166255447931/10999333470518091906908673737442830723710024941373839628113269063387717150756" }, { "-191689412702065586724423672263415136270/93810201821180445246181740077575222573046098171118578720996957721548578622199", "-96035306478379345278597023485459703599/90477882577875726723065337577743037040931870384035502080606137411367114071296", "1", "-8334560691183765714134253806956288712175511004636349604358505688696669629914037375584956898475941052209595993911719/8487748424983587977143569651002086894691875550521839392659856872027244953584789975128015403703285861633097358090901236825413778659897331594626425134299904" }, { "-23269937861894460494044792238228308465/36609152344338882339480850660297061488131282119857763060331849352205685148721", "325068909216594106686082320524489871331/91177237475655724082435461235746167562462517272459785633509544221351873775622", "-1", "9778808569440655820425835535754928474979020881405653286273845718180424961228320899578451645656486131670752875977421/3337921377082244749772660717107363339434489502423902307989133990817960972244485458695718522007125256227586389900645261310720433804087640398154830854279462" }, { "-238326953836192259685740729837504392751/14355772111692545517089448796014758311054554297101342377064555342044509505629", "-2243842813596041779461072557214411973/26977869328891440663623277939723739398284518432434090329689171706564354694000", "199", "-6448765647740977471904737113847651808330060639815597135148713750030489976324569684096986913258458168828297495539/129096048048195144296601029799754739460578975322841318685536300111243981862070688561642588911885232705019881753766051653025282618058049676501115190842000" }, { "-154358049055187385619395426022892405693/9651466522903571511806795329901971873531573523740147689205585933143787251744", "234831599528611417562275088467151900111/23212020955553784427152057042945842586938059290340162186208579138883161355663", "-2", "316658791137724604029754690574124702890700231484127998714230110560397057808441246896564869593555547226559779365903/74676681060487840411987924431521223169933844488425876950176937169482763523750924018302125631058404128587876741120722730563623397211887516476096033675424" }, { "-43654015885600226452139253734240763904114948357839504394635758939147918485226/8959421350865475053", "-71396498978827369985021009185210519228191289633806094987720268011017813959395/5118659875263168828", "0", "-43654015885600226452139253734240763904114948357839504394635758939147918485226/8959421350865475053" }, { "30206748063040753946799836869317684942154090322823467523870425873885298155111/10481539418044277488", "47024848487236673350978260730205414416590483746605328718368229684499622280474/7191921838593099535", "0", "30206748063040753946799836869317684942154090322823467523870425873885298155111/10481539418044277488" }, { "-78297878369391722158254897331818780133560455296543117876032852961696240531334/3439835335342974343", "-12036259456916995957158314961009661904873237837146662571140339452059150719867/7648180594799196815", "14", "-19197805765101853520494699712598051602631126933023081616555585309855479307669655742300981287876/26308481861074724148503061769552317545" }, { "-11644466368871135752271367372638717312589950278007329817169736850185519100737/1311440431008130360", "16666792145043036974187190230561351375866940864814143604767927371030164658327/1190204555866760523", "-1", "7998208151350462202845967149504108047636942539158206705970028049633264098721802988652183702269/1560882375733744790369742288085778280" }, { "-79973663368880337215592714973251653953011156710750446016524362581184906490344/13217906252057303539", "58550120458525994168414457422879483045080411293174816365332363703279727325517/11983119832054095608", "-2", "294743007488634911900879023610601157709203210196036764662698142539282328840165292825377976700087/79195877273629847756913363266891378356" }, { "-41283916983957018057492477658728498328100012640087810269690534262888976961251/890401703093780527", "37905097813993829793947873722213455441729327992618875876994782685865871567157/6801392244603328629", "-9", "7656253348038361960592683452946138937700391767097248361228404271354846832369355003597180736924/2018657079334544839920956083927269161" }, { "-18621387073793741287833632061282985993236184599525107084971126746444001531559/112377251064249742125143336262406044187", "-80344252057643577515390451958447799739023169996897035042227858478107352127859/16565237077789941458934656364080562722", "0", "-18621387073793741287833632061282985993236184599525107084971126746444001531559/112377251064249742125143336262406044187" }, { "-11067278490740390186400140048488373691939192899502978554850454064301747327289/279730468938850077684950205987597341304", "10742600231685337944302634339424380376867728558611903252501449407612160123471/85514692364145379323997472383947484080", "-1", "85775736874497976296219552104494263998937714945890467644689458878788010379480929901293727971077618208617170461961/996711041507662039484243506170638972651237308243642442559705598573661101680" }, { "60114400703399744178227904113253512958642740092037841351403601970012663733574/137652538688206271590219421417082587275", "48818636606796573849225811493965362933035106650390076441334389457476994620122/53029693036557887125608655547988906029", "0", "60114400703399744178227904113253512958642740092037841351403601970012663733574/137652538688206271590219421417082587275" }, { "3914498366778062569843980805049542971189141573995351572704819538012574198620/2893535793927099250376915741311683101565016171163532500028982710856616653543", "-64455977862771995990556362474021252617135665526576459531278423102067698175925/3427268293660091333898426457103031174054024747619806545506815375759964110507", "-1", "-173089642940460836493548201378493831666834527213381638819285816422714170656111775323359444521902045952676537769939820706047335458029055584112252141651935/9916923483096927116177052980173451074387932639677487416966276325060341893415045555506102924285291258490295955820662010134773377007870870750288985076301" }, { "88685468991633001080737925907185943038820418099572822599681084512202985499349/12356339561700478684701129356342132279853496560835988907745653698832814553183", "6529471572210817352014560971376587702394496047549533959161274051805568907/3739659250056306079416159597801009351379164652345884310988690700223397485", "4", "8931962841313470806790103494237286341563410404854617106114803081793820819240374925219641539537617481113314045913411523358730270170471325648745013341/46208499538749877879324553712339970407875860449933229680283463405247211324108302788607460717099015088790299594129098751336540918286885704752480944755" }, { "5294621876959552948152278397535786930445255402598688035901577017296377116948/5881250468392395166026135319241737823103911942970361556821993967308880332607", "-65630221834131781450865541487035630878349246622282004360445526978282263449249/98696808137715829282209856003081855629375417101578635063186137762415694777903", "-2", "-249413266253338816038191146071217173249587815937933968995202267999853691656986532179554523041282106904325952906300316562845535251623832095499430051524242/580460649088775579832453445973177920831893989101100068436102498480125976298386547626652311003668489010795846489626845062951616643824353457996671633983121" }, }; cln-1.3.3/tests/Makefile.in0000644000000000000000000017141612172603771012407 0ustar # Makefile.in generated by automake 1.13.3 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. @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@ TESTS = $(am__EXEEXT_2) check_PROGRAMS = $(am__EXEEXT_2) EXTRA_PROGRAMS = $(am__EXEEXT_1) subdir = tests DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/autoconf/depcomp \ $(top_srcdir)/autoconf/test-driver ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alloca.m4 \ $(top_srcdir)/m4/as-underscore.m4 $(top_srcdir)/m4/cc.m4 \ $(top_srcdir)/m4/floatparam.m4 $(top_srcdir)/m4/general.m4 \ $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gmp.m4 \ $(top_srcdir)/m4/intparam.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/param.m4 \ $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/proto.m4 \ $(top_srcdir)/m4/rusage.m4 $(top_srcdir)/m4/times.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/autoconf/cl_config.h \ $(top_builddir)/include/cln/config.h \ $(top_builddir)/include/cln/host_cpu.h \ $(top_builddir)/include/cln/version.h \ $(top_builddir)/src/base/cl_base_config.h \ $(top_builddir)/src/base/cl_gmpconfig.h \ $(top_builddir)/src/timing/cl_t_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = timemul$(EXEEXT) timesquare$(EXEEXT) timediv$(EXEEXT) \ timesqrt$(EXEEXT) timegcd$(EXEEXT) timefact$(EXEEXT) \ timeprint$(EXEEXT) timeLFsqrt$(EXEEXT) timeRAtoLF$(EXEEXT) \ timeLFRAmul$(EXEEXT) timeRALFdiv$(EXEEXT) timepi$(EXEEXT) \ timeLFln$(EXEEXT) timeLFexp$(EXEEXT) timeLFsin$(EXEEXT) \ timeLFcos$(EXEEXT) timeLFsinh$(EXEEXT) timeLFcosh$(EXEEXT) \ timeLFatan$(EXEEXT) timeLFatanh$(EXEEXT) \ timeMIpow2recip$(EXEEXT) timeMIpow2div$(EXEEXT) \ timeMImisc5$(EXEEXT) timeUPMImul$(EXEEXT) \ timesqrtmodp$(EXEEXT) timeexp1$(EXEEXT) timeeuler$(EXEEXT) \ timecatalan$(EXEEXT) timezeta3$(EXEEXT) \ timerecip2adic$(EXEEXT) timediv2adic$(EXEEXT) main$(EXEEXT) am__EXEEXT_2 = exam$(EXEEXT) tests$(EXEEXT) am_exam_OBJECTS = exam.$(OBJEXT) exam_I.$(OBJEXT) \ exam_I_plus.$(OBJEXT) exam_I_minus.$(OBJEXT) \ exam_I_mul.$(OBJEXT) exam_I_div.$(OBJEXT) \ exam_I_floor.$(OBJEXT) exam_RA.$(OBJEXT) \ exam_RA_plus.$(OBJEXT) exam_RA_minus.$(OBJEXT) \ exam_RA_mul.$(OBJEXT) exam_RA_div.$(OBJEXT) \ exam_RA_floor.$(OBJEXT) exam_SF.$(OBJEXT) \ exam_SF_plus.$(OBJEXT) exam_SF_minus.$(OBJEXT) \ exam_SF_mul.$(OBJEXT) exam_SF_div.$(OBJEXT) \ exam_SF_floor.$(OBJEXT) exam_FF.$(OBJEXT) \ exam_FF_plus.$(OBJEXT) exam_FF_minus.$(OBJEXT) \ exam_FF_mul.$(OBJEXT) exam_FF_div.$(OBJEXT) \ exam_FF_floor.$(OBJEXT) exam_DF.$(OBJEXT) \ exam_DF_plus.$(OBJEXT) exam_DF_minus.$(OBJEXT) \ exam_DF_mul.$(OBJEXT) exam_DF_div.$(OBJEXT) \ exam_DF_floor.$(OBJEXT) exam_LF.$(OBJEXT) \ exam_LF_plus.$(OBJEXT) exam_LF_minus.$(OBJEXT) \ exam_LF_mul.$(OBJEXT) exam_LF_div.$(OBJEXT) \ exam_LF_floor.$(OBJEXT) exam_I_gcd.$(OBJEXT) \ exam_I_sqrtp.$(OBJEXT) exam_OBJECTS = $(am_exam_OBJECTS) exam_DEPENDENCIES = ../src/libcln.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am_main_OBJECTS = main.$(OBJEXT) main_OBJECTS = $(am_main_OBJECTS) main_DEPENDENCIES = ../src/libcln.la am_tests_OBJECTS = tests.$(OBJEXT) test_I.$(OBJEXT) \ test_I_abs.$(OBJEXT) test_I_compare.$(OBJEXT) \ test_I_plus.$(OBJEXT) test_I_minus.$(OBJEXT) \ test_I_plus1.$(OBJEXT) test_I_minus1.$(OBJEXT) \ test_I_mul.$(OBJEXT) test_I_div.$(OBJEXT) test_I_gcd.$(OBJEXT) \ test_I_xgcd.$(OBJEXT) test_I_ash.$(OBJEXT) \ test_I_evenp.$(OBJEXT) test_I_oddp.$(OBJEXT) \ test_I_lognot.$(OBJEXT) test_I_logand.$(OBJEXT) \ test_I_logandc1.$(OBJEXT) test_I_logandc2.$(OBJEXT) \ test_I_logior.$(OBJEXT) test_I_logorc1.$(OBJEXT) \ test_I_logorc2.$(OBJEXT) test_I_logxor.$(OBJEXT) \ test_I_lognand.$(OBJEXT) test_I_lognor.$(OBJEXT) \ test_I_logeqv.$(OBJEXT) test_I_boole.$(OBJEXT) \ test_I_logbitp.$(OBJEXT) test_I_logtest.$(OBJEXT) \ test_I_ldb.$(OBJEXT) test_I_ldbtest.$(OBJEXT) \ test_I_mkf.$(OBJEXT) test_I_dpb.$(OBJEXT) test_I_dpf.$(OBJEXT) \ test_I_logcount.$(OBJEXT) test_I_ilength.$(OBJEXT) \ test_I_ord2.$(OBJEXT) test_I_power2p.$(OBJEXT) \ test_I_isqrt.$(OBJEXT) test_I_sqrtp.$(OBJEXT) \ test_I_io.$(OBJEXT) test_I_GV.$(OBJEXT) test_MI.$(OBJEXT) \ test_MI_canonhom.$(OBJEXT) test_MI_plus.$(OBJEXT) \ test_MI_minus.$(OBJEXT) test_MI_mul.$(OBJEXT) \ test_MI_recip.$(OBJEXT) test_MI_div.$(OBJEXT) \ test_MI_expt.$(OBJEXT) test_nt.$(OBJEXT) \ test_nt_jacobi.$(OBJEXT) tests_OBJECTS = $(am_tests_OBJECTS) tests_DEPENDENCIES = ../src/libcln.la am_timeLFRAmul_OBJECTS = timeLFRAmul.$(OBJEXT) timeLFRAmul_OBJECTS = $(am_timeLFRAmul_OBJECTS) timeLFRAmul_DEPENDENCIES = ../src/libcln.la am_timeLFatan_OBJECTS = timeLFatan.$(OBJEXT) timeLFatan_OBJECTS = $(am_timeLFatan_OBJECTS) timeLFatan_DEPENDENCIES = ../src/libcln.la am_timeLFatanh_OBJECTS = timeLFatanh.$(OBJEXT) timeLFatanh_OBJECTS = $(am_timeLFatanh_OBJECTS) timeLFatanh_DEPENDENCIES = ../src/libcln.la am_timeLFcos_OBJECTS = timeLFcos.$(OBJEXT) timeLFcos_OBJECTS = $(am_timeLFcos_OBJECTS) timeLFcos_DEPENDENCIES = ../src/libcln.la am_timeLFcosh_OBJECTS = timeLFcosh.$(OBJEXT) timeLFcosh_OBJECTS = $(am_timeLFcosh_OBJECTS) timeLFcosh_DEPENDENCIES = ../src/libcln.la am_timeLFexp_OBJECTS = timeLFexp.$(OBJEXT) timeLFexp_OBJECTS = $(am_timeLFexp_OBJECTS) timeLFexp_DEPENDENCIES = ../src/libcln.la am_timeLFln_OBJECTS = timeLFln.$(OBJEXT) timeLFln_OBJECTS = $(am_timeLFln_OBJECTS) timeLFln_DEPENDENCIES = ../src/libcln.la am_timeLFsin_OBJECTS = timeLFsin.$(OBJEXT) timeLFsin_OBJECTS = $(am_timeLFsin_OBJECTS) timeLFsin_DEPENDENCIES = ../src/libcln.la am_timeLFsinh_OBJECTS = timeLFsinh.$(OBJEXT) timeLFsinh_OBJECTS = $(am_timeLFsinh_OBJECTS) timeLFsinh_DEPENDENCIES = ../src/libcln.la am_timeLFsqrt_OBJECTS = timeLFsqrt.$(OBJEXT) timeLFsqrt_OBJECTS = $(am_timeLFsqrt_OBJECTS) timeLFsqrt_DEPENDENCIES = ../src/libcln.la am_timeMImisc5_OBJECTS = timeMImisc5.$(OBJEXT) timeMImisc5_OBJECTS = $(am_timeMImisc5_OBJECTS) timeMImisc5_DEPENDENCIES = ../src/libcln.la am_timeMIpow2div_OBJECTS = timeMIpow2div.$(OBJEXT) timeMIpow2div_OBJECTS = $(am_timeMIpow2div_OBJECTS) timeMIpow2div_DEPENDENCIES = ../src/libcln.la am_timeMIpow2recip_OBJECTS = timeMIpow2recip.$(OBJEXT) timeMIpow2recip_OBJECTS = $(am_timeMIpow2recip_OBJECTS) timeMIpow2recip_DEPENDENCIES = ../src/libcln.la am_timeRALFdiv_OBJECTS = timeRALFdiv.$(OBJEXT) timeRALFdiv_OBJECTS = $(am_timeRALFdiv_OBJECTS) timeRALFdiv_DEPENDENCIES = ../src/libcln.la am_timeRAtoLF_OBJECTS = timeRAtoLF.$(OBJEXT) timeRAtoLF_OBJECTS = $(am_timeRAtoLF_OBJECTS) timeRAtoLF_DEPENDENCIES = ../src/libcln.la am_timeUPMImul_OBJECTS = timeUPMImul.$(OBJEXT) timeUPMImul_OBJECTS = $(am_timeUPMImul_OBJECTS) timeUPMImul_DEPENDENCIES = ../src/libcln.la am_timecatalan_OBJECTS = timecatalan.$(OBJEXT) timecatalan_OBJECTS = $(am_timecatalan_OBJECTS) timecatalan_DEPENDENCIES = ../src/libcln.la am_timediv_OBJECTS = timediv.$(OBJEXT) timediv_OBJECTS = $(am_timediv_OBJECTS) timediv_DEPENDENCIES = ../src/libcln.la am_timediv2adic_OBJECTS = timediv2adic.$(OBJEXT) timediv2adic_OBJECTS = $(am_timediv2adic_OBJECTS) timediv2adic_DEPENDENCIES = ../src/libcln.la am_timeeuler_OBJECTS = timeeuler.$(OBJEXT) timeeuler_OBJECTS = $(am_timeeuler_OBJECTS) timeeuler_DEPENDENCIES = ../src/libcln.la am_timeexp1_OBJECTS = timeexp1.$(OBJEXT) timeexp1_OBJECTS = $(am_timeexp1_OBJECTS) timeexp1_DEPENDENCIES = ../src/libcln.la am_timefact_OBJECTS = timefact.$(OBJEXT) timefact_OBJECTS = $(am_timefact_OBJECTS) timefact_DEPENDENCIES = ../src/libcln.la am_timegcd_OBJECTS = timegcd.$(OBJEXT) timegcd_OBJECTS = $(am_timegcd_OBJECTS) timegcd_DEPENDENCIES = ../src/libcln.la am_timemul_OBJECTS = timemul.$(OBJEXT) timemul_OBJECTS = $(am_timemul_OBJECTS) timemul_DEPENDENCIES = ../src/libcln.la am_timepi_OBJECTS = timepi.$(OBJEXT) timepi_OBJECTS = $(am_timepi_OBJECTS) timepi_DEPENDENCIES = ../src/libcln.la am_timeprint_OBJECTS = timeprint.$(OBJEXT) timeprint_OBJECTS = $(am_timeprint_OBJECTS) timeprint_DEPENDENCIES = ../src/libcln.la am_timerecip2adic_OBJECTS = timerecip2adic.$(OBJEXT) timerecip2adic_OBJECTS = $(am_timerecip2adic_OBJECTS) timerecip2adic_DEPENDENCIES = ../src/libcln.la am_timesqrt_OBJECTS = timesqrt.$(OBJEXT) timesqrt_OBJECTS = $(am_timesqrt_OBJECTS) timesqrt_DEPENDENCIES = ../src/libcln.la am_timesqrtmodp_OBJECTS = timesqrtmodp.$(OBJEXT) timesqrtmodp_OBJECTS = $(am_timesqrtmodp_OBJECTS) timesqrtmodp_DEPENDENCIES = ../src/libcln.la am_timesquare_OBJECTS = timesquare.$(OBJEXT) timesquare_OBJECTS = $(am_timesquare_OBJECTS) timesquare_DEPENDENCIES = ../src/libcln.la am_timezeta3_OBJECTS = timezeta3.$(OBJEXT) timezeta3_OBJECTS = $(am_timezeta3_OBJECTS) timezeta3_DEPENDENCIES = ../src/libcln.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(exam_SOURCES) $(main_SOURCES) $(tests_SOURCES) \ $(timeLFRAmul_SOURCES) $(timeLFatan_SOURCES) \ $(timeLFatanh_SOURCES) $(timeLFcos_SOURCES) \ $(timeLFcosh_SOURCES) $(timeLFexp_SOURCES) $(timeLFln_SOURCES) \ $(timeLFsin_SOURCES) $(timeLFsinh_SOURCES) \ $(timeLFsqrt_SOURCES) $(timeMImisc5_SOURCES) \ $(timeMIpow2div_SOURCES) $(timeMIpow2recip_SOURCES) \ $(timeRALFdiv_SOURCES) $(timeRAtoLF_SOURCES) \ $(timeUPMImul_SOURCES) $(timecatalan_SOURCES) \ $(timediv_SOURCES) $(timediv2adic_SOURCES) \ $(timeeuler_SOURCES) $(timeexp1_SOURCES) $(timefact_SOURCES) \ $(timegcd_SOURCES) $(timemul_SOURCES) $(timepi_SOURCES) \ $(timeprint_SOURCES) $(timerecip2adic_SOURCES) \ $(timesqrt_SOURCES) $(timesqrtmodp_SOURCES) \ $(timesquare_SOURCES) $(timezeta3_SOURCES) DIST_SOURCES = $(exam_SOURCES) $(main_SOURCES) $(tests_SOURCES) \ $(timeLFRAmul_SOURCES) $(timeLFatan_SOURCES) \ $(timeLFatanh_SOURCES) $(timeLFcos_SOURCES) \ $(timeLFcosh_SOURCES) $(timeLFexp_SOURCES) $(timeLFln_SOURCES) \ $(timeLFsin_SOURCES) $(timeLFsinh_SOURCES) \ $(timeLFsqrt_SOURCES) $(timeMImisc5_SOURCES) \ $(timeMIpow2div_SOURCES) $(timeMIpow2recip_SOURCES) \ $(timeRALFdiv_SOURCES) $(timeRAtoLF_SOURCES) \ $(timeUPMImul_SOURCES) $(timecatalan_SOURCES) \ $(timediv_SOURCES) $(timediv2adic_SOURCES) \ $(timeeuler_SOURCES) $(timeexp1_SOURCES) $(timefact_SOURCES) \ $(timegcd_SOURCES) $(timemul_SOURCES) $(timepi_SOURCES) \ $(timeprint_SOURCES) $(timerecip2adic_SOURCES) \ $(timesqrt_SOURCES) $(timesqrtmodp_SOURCES) \ $(timesquare_SOURCES) $(timezeta3_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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 am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } 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__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_DRIVER = $(SHELL) $(top_srcdir)/autoconf/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/autoconf/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS_UNDERSCORE = @AS_UNDERSCORE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLNLIB_RPATH = @CLNLIB_RPATH@ CL_VERSION = @CL_VERSION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GMP_RPATH_CFG = @GMP_RPATH_CFG@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_VERSION_INFO = @LT_VERSION_INFO@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ 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@ SED = @SED@ 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_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ ALL_TESTS = \ exam \ tests ALL_TIMINGS = \ timemul \ timesquare \ timediv \ timesqrt \ timegcd \ timefact \ timeprint \ timeLFsqrt \ timeRAtoLF \ timeLFRAmul \ timeRALFdiv \ timepi \ timeLFln \ timeLFexp \ timeLFsin \ timeLFcos \ timeLFsinh \ timeLFcosh \ timeLFatan \ timeLFatanh \ timeMIpow2recip \ timeMIpow2div \ timeMImisc5 \ timeUPMImul \ timesqrtmodp \ timeexp1 \ timeeuler \ timecatalan \ timezeta3 \ timerecip2adic \ timediv2adic \ main AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src \ -I$(top_builddir)/include -I$(top_builddir)/src DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/autoconf exam_SOURCES = exam.h exam.cc \ exam_I.cc exam_I_plus.cc exam_I_minus.cc exam_I_mul.cc \ exam_I_div.cc exam_I_floor.cc \ exam_RA.cc exam_RA_plus.cc exam_RA_minus.cc exam_RA_mul.cc \ exam_RA_div.cc exam_RA_floor.cc \ exam_SF.cc exam_SF_plus.cc exam_SF_minus.cc exam_SF_mul.cc \ exam_SF_div.cc exam_SF_floor.cc \ exam_FF.cc exam_FF_plus.cc exam_FF_minus.cc exam_FF_mul.cc \ exam_FF_div.cc exam_FF_floor.cc \ exam_DF.cc exam_DF_plus.cc exam_DF_minus.cc exam_DF_mul.cc \ exam_DF_div.cc exam_DF_floor.cc \ exam_LF.cc exam_LF_plus.cc exam_LF_minus.cc exam_LF_mul.cc \ exam_LF_div.cc exam_LF_floor.cc \ exam_I_gcd.cc exam_I_sqrtp.cc test_MI.h test.h exam_LDADD = ../src/libcln.la tests_SOURCES = test.h tests.cc test_I.cc test_I.h test_I_abs.cc test_I_compare.cc \ test_I_plus.cc test_I_minus.cc test_I_plus1.cc \ test_I_minus1.cc test_I_mul.cc test_I_div.cc \ test_I_gcd.cc test_I_xgcd.cc test_I_ash.cc \ test_I_evenp.cc test_I_oddp.cc test_I_lognot.cc \ test_I_logand.cc test_I_logandc1.cc test_I_logandc2.cc \ test_I_logior.cc test_I_logorc1.cc test_I_logorc2.cc \ test_I_logxor.cc test_I_lognand.cc test_I_lognor.cc \ test_I_logeqv.cc test_I_boole.cc test_I_logbitp.cc \ test_I_logtest.cc test_I_ldb.cc test_I_ldbtest.cc \ test_I_mkf.cc test_I_dpb.cc test_I_dpf.cc \ test_I_logcount.cc test_I_ilength.cc test_I_ord2.cc \ test_I_power2p.cc test_I_isqrt.cc test_I_sqrtp.cc \ test_I_io.cc test_I_GV.cc \ test_MI.h test_MI.cc test_MI_canonhom.cc test_MI_plus.cc \ test_MI_minus.cc test_MI_mul.cc test_MI_recip.cc \ test_MI_div.cc test_MI_expt.cc \ test_nt.h test_nt.cc test_nt_jacobi.cc tests_LDADD = ../src/libcln.la timemul_SOURCES = timemul.cc timemul_LDADD = ../src/libcln.la timesquare_SOURCES = timesquare.cc timesquare_LDADD = ../src/libcln.la timediv_SOURCES = timediv.cc timediv_LDADD = ../src/libcln.la timesqrt_SOURCES = timesqrt.cc timesqrt_LDADD = ../src/libcln.la timegcd_SOURCES = timegcd.cc timegcd_LDADD = ../src/libcln.la timefact_SOURCES = timefact.cc timefact_LDADD = ../src/libcln.la timeprint_SOURCES = timeprint.cc timeprint_LDADD = ../src/libcln.la timeLFsqrt_SOURCES = timeLFsqrt.cc timeLFsqrt_LDADD = ../src/libcln.la timeRAtoLF_SOURCES = timeRAtoLF.cc timeRAtoLF_LDADD = ../src/libcln.la timeLFRAmul_SOURCES = timeLFRAmul.cc timeLFRAmul_LDADD = ../src/libcln.la timeRALFdiv_SOURCES = timeRALFdiv.cc timeRALFdiv_LDADD = ../src/libcln.la timepi_SOURCES = timepi.cc timepi_LDADD = ../src/libcln.la timeexp1_SOURCES = timeexp1.cc timeexp1_LDADD = ../src/libcln.la timeeuler_SOURCES = timeeuler.cc timeeuler_LDADD = ../src/libcln.la timecatalan_SOURCES = timecatalan.cc timecatalan_LDADD = ../src/libcln.la timezeta3_SOURCES = timezeta3.cc timezeta3_LDADD = ../src/libcln.la timeLFln_SOURCES = timeLFln.cc timeLFln_LDADD = ../src/libcln.la timeLFexp_SOURCES = timeLFexp.cc timeLFexp_LDADD = ../src/libcln.la timeLFsin_SOURCES = timeLFsin.cc timeLFsin_LDADD = ../src/libcln.la timeLFcos_SOURCES = timeLFcos.cc timeLFcos_LDADD = ../src/libcln.la timeLFsinh_SOURCES = timeLFsinh.cc timeLFsinh_LDADD = ../src/libcln.la timeLFcosh_SOURCES = timeLFcosh.cc timeLFcosh_LDADD = ../src/libcln.la timeLFatan_SOURCES = timeLFatan.cc timeLFatan_LDADD = ../src/libcln.la timeLFatanh_SOURCES = timeLFatanh.cc timeLFatanh_LDADD = ../src/libcln.la timerecip2adic_SOURCES = timerecip2adic.cc timerecip2adic_LDADD = ../src/libcln.la timediv2adic_SOURCES = timediv2adic.cc timediv2adic_LDADD = ../src/libcln.la timeMIpow2recip_SOURCES = timeMIpow2recip.cc timeMIpow2recip_LDADD = ../src/libcln.la timeMIpow2div_SOURCES = timeMIpow2div.cc timeMIpow2div_LDADD = ../src/libcln.la timeMImisc5_SOURCES = timeMImisc5.cc timeMImisc5_LDADD = ../src/libcln.la timeUPMImul_SOURCES = timeUPMImul.cc timeUPMImul_LDADD = ../src/libcln.la timesqrtmodp_SOURCES = timesqrtmodp.cc timesqrtmodp_LDADD = ../src/libcln.la main_SOURCES = main.cc main_LDADD = ../src/libcln.la all: all-am .SUFFIXES: .SUFFIXES: .cc .lo .log .o .obj .test .test$(EXEEXT) .trs $(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) --foreign tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign tests/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): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list exam$(EXEEXT): $(exam_OBJECTS) $(exam_DEPENDENCIES) $(EXTRA_exam_DEPENDENCIES) @rm -f exam$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(exam_OBJECTS) $(exam_LDADD) $(LIBS) main$(EXEEXT): $(main_OBJECTS) $(main_DEPENDENCIES) $(EXTRA_main_DEPENDENCIES) @rm -f main$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(main_OBJECTS) $(main_LDADD) $(LIBS) tests$(EXEEXT): $(tests_OBJECTS) $(tests_DEPENDENCIES) $(EXTRA_tests_DEPENDENCIES) @rm -f tests$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(tests_OBJECTS) $(tests_LDADD) $(LIBS) timeLFRAmul$(EXEEXT): $(timeLFRAmul_OBJECTS) $(timeLFRAmul_DEPENDENCIES) $(EXTRA_timeLFRAmul_DEPENDENCIES) @rm -f timeLFRAmul$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timeLFRAmul_OBJECTS) $(timeLFRAmul_LDADD) $(LIBS) timeLFatan$(EXEEXT): $(timeLFatan_OBJECTS) $(timeLFatan_DEPENDENCIES) $(EXTRA_timeLFatan_DEPENDENCIES) @rm -f timeLFatan$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timeLFatan_OBJECTS) $(timeLFatan_LDADD) $(LIBS) timeLFatanh$(EXEEXT): $(timeLFatanh_OBJECTS) $(timeLFatanh_DEPENDENCIES) $(EXTRA_timeLFatanh_DEPENDENCIES) @rm -f timeLFatanh$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timeLFatanh_OBJECTS) $(timeLFatanh_LDADD) $(LIBS) timeLFcos$(EXEEXT): $(timeLFcos_OBJECTS) $(timeLFcos_DEPENDENCIES) $(EXTRA_timeLFcos_DEPENDENCIES) @rm -f timeLFcos$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timeLFcos_OBJECTS) $(timeLFcos_LDADD) $(LIBS) timeLFcosh$(EXEEXT): $(timeLFcosh_OBJECTS) $(timeLFcosh_DEPENDENCIES) $(EXTRA_timeLFcosh_DEPENDENCIES) @rm -f timeLFcosh$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timeLFcosh_OBJECTS) $(timeLFcosh_LDADD) $(LIBS) timeLFexp$(EXEEXT): $(timeLFexp_OBJECTS) $(timeLFexp_DEPENDENCIES) $(EXTRA_timeLFexp_DEPENDENCIES) @rm -f timeLFexp$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timeLFexp_OBJECTS) $(timeLFexp_LDADD) $(LIBS) timeLFln$(EXEEXT): $(timeLFln_OBJECTS) $(timeLFln_DEPENDENCIES) $(EXTRA_timeLFln_DEPENDENCIES) @rm -f timeLFln$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timeLFln_OBJECTS) $(timeLFln_LDADD) $(LIBS) timeLFsin$(EXEEXT): $(timeLFsin_OBJECTS) $(timeLFsin_DEPENDENCIES) $(EXTRA_timeLFsin_DEPENDENCIES) @rm -f timeLFsin$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timeLFsin_OBJECTS) $(timeLFsin_LDADD) $(LIBS) timeLFsinh$(EXEEXT): $(timeLFsinh_OBJECTS) $(timeLFsinh_DEPENDENCIES) $(EXTRA_timeLFsinh_DEPENDENCIES) @rm -f timeLFsinh$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timeLFsinh_OBJECTS) $(timeLFsinh_LDADD) $(LIBS) timeLFsqrt$(EXEEXT): $(timeLFsqrt_OBJECTS) $(timeLFsqrt_DEPENDENCIES) $(EXTRA_timeLFsqrt_DEPENDENCIES) @rm -f timeLFsqrt$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timeLFsqrt_OBJECTS) $(timeLFsqrt_LDADD) $(LIBS) timeMImisc5$(EXEEXT): $(timeMImisc5_OBJECTS) $(timeMImisc5_DEPENDENCIES) $(EXTRA_timeMImisc5_DEPENDENCIES) @rm -f timeMImisc5$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timeMImisc5_OBJECTS) $(timeMImisc5_LDADD) $(LIBS) timeMIpow2div$(EXEEXT): $(timeMIpow2div_OBJECTS) $(timeMIpow2div_DEPENDENCIES) $(EXTRA_timeMIpow2div_DEPENDENCIES) @rm -f timeMIpow2div$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timeMIpow2div_OBJECTS) $(timeMIpow2div_LDADD) $(LIBS) timeMIpow2recip$(EXEEXT): $(timeMIpow2recip_OBJECTS) $(timeMIpow2recip_DEPENDENCIES) $(EXTRA_timeMIpow2recip_DEPENDENCIES) @rm -f timeMIpow2recip$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timeMIpow2recip_OBJECTS) $(timeMIpow2recip_LDADD) $(LIBS) timeRALFdiv$(EXEEXT): $(timeRALFdiv_OBJECTS) $(timeRALFdiv_DEPENDENCIES) $(EXTRA_timeRALFdiv_DEPENDENCIES) @rm -f timeRALFdiv$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timeRALFdiv_OBJECTS) $(timeRALFdiv_LDADD) $(LIBS) timeRAtoLF$(EXEEXT): $(timeRAtoLF_OBJECTS) $(timeRAtoLF_DEPENDENCIES) $(EXTRA_timeRAtoLF_DEPENDENCIES) @rm -f timeRAtoLF$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timeRAtoLF_OBJECTS) $(timeRAtoLF_LDADD) $(LIBS) timeUPMImul$(EXEEXT): $(timeUPMImul_OBJECTS) $(timeUPMImul_DEPENDENCIES) $(EXTRA_timeUPMImul_DEPENDENCIES) @rm -f timeUPMImul$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timeUPMImul_OBJECTS) $(timeUPMImul_LDADD) $(LIBS) timecatalan$(EXEEXT): $(timecatalan_OBJECTS) $(timecatalan_DEPENDENCIES) $(EXTRA_timecatalan_DEPENDENCIES) @rm -f timecatalan$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timecatalan_OBJECTS) $(timecatalan_LDADD) $(LIBS) timediv$(EXEEXT): $(timediv_OBJECTS) $(timediv_DEPENDENCIES) $(EXTRA_timediv_DEPENDENCIES) @rm -f timediv$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timediv_OBJECTS) $(timediv_LDADD) $(LIBS) timediv2adic$(EXEEXT): $(timediv2adic_OBJECTS) $(timediv2adic_DEPENDENCIES) $(EXTRA_timediv2adic_DEPENDENCIES) @rm -f timediv2adic$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timediv2adic_OBJECTS) $(timediv2adic_LDADD) $(LIBS) timeeuler$(EXEEXT): $(timeeuler_OBJECTS) $(timeeuler_DEPENDENCIES) $(EXTRA_timeeuler_DEPENDENCIES) @rm -f timeeuler$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timeeuler_OBJECTS) $(timeeuler_LDADD) $(LIBS) timeexp1$(EXEEXT): $(timeexp1_OBJECTS) $(timeexp1_DEPENDENCIES) $(EXTRA_timeexp1_DEPENDENCIES) @rm -f timeexp1$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timeexp1_OBJECTS) $(timeexp1_LDADD) $(LIBS) timefact$(EXEEXT): $(timefact_OBJECTS) $(timefact_DEPENDENCIES) $(EXTRA_timefact_DEPENDENCIES) @rm -f timefact$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timefact_OBJECTS) $(timefact_LDADD) $(LIBS) timegcd$(EXEEXT): $(timegcd_OBJECTS) $(timegcd_DEPENDENCIES) $(EXTRA_timegcd_DEPENDENCIES) @rm -f timegcd$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timegcd_OBJECTS) $(timegcd_LDADD) $(LIBS) timemul$(EXEEXT): $(timemul_OBJECTS) $(timemul_DEPENDENCIES) $(EXTRA_timemul_DEPENDENCIES) @rm -f timemul$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timemul_OBJECTS) $(timemul_LDADD) $(LIBS) timepi$(EXEEXT): $(timepi_OBJECTS) $(timepi_DEPENDENCIES) $(EXTRA_timepi_DEPENDENCIES) @rm -f timepi$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timepi_OBJECTS) $(timepi_LDADD) $(LIBS) timeprint$(EXEEXT): $(timeprint_OBJECTS) $(timeprint_DEPENDENCIES) $(EXTRA_timeprint_DEPENDENCIES) @rm -f timeprint$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timeprint_OBJECTS) $(timeprint_LDADD) $(LIBS) timerecip2adic$(EXEEXT): $(timerecip2adic_OBJECTS) $(timerecip2adic_DEPENDENCIES) $(EXTRA_timerecip2adic_DEPENDENCIES) @rm -f timerecip2adic$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timerecip2adic_OBJECTS) $(timerecip2adic_LDADD) $(LIBS) timesqrt$(EXEEXT): $(timesqrt_OBJECTS) $(timesqrt_DEPENDENCIES) $(EXTRA_timesqrt_DEPENDENCIES) @rm -f timesqrt$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timesqrt_OBJECTS) $(timesqrt_LDADD) $(LIBS) timesqrtmodp$(EXEEXT): $(timesqrtmodp_OBJECTS) $(timesqrtmodp_DEPENDENCIES) $(EXTRA_timesqrtmodp_DEPENDENCIES) @rm -f timesqrtmodp$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timesqrtmodp_OBJECTS) $(timesqrtmodp_LDADD) $(LIBS) timesquare$(EXEEXT): $(timesquare_OBJECTS) $(timesquare_DEPENDENCIES) $(EXTRA_timesquare_DEPENDENCIES) @rm -f timesquare$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timesquare_OBJECTS) $(timesquare_LDADD) $(LIBS) timezeta3$(EXEEXT): $(timezeta3_OBJECTS) $(timezeta3_DEPENDENCIES) $(EXTRA_timezeta3_DEPENDENCIES) @rm -f timezeta3$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(timezeta3_OBJECTS) $(timezeta3_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_DF.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_DF_div.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_DF_floor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_DF_minus.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_DF_mul.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_DF_plus.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_FF.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_FF_div.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_FF_floor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_FF_minus.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_FF_mul.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_FF_plus.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_I.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_I_div.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_I_floor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_I_gcd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_I_minus.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_I_mul.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_I_plus.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_I_sqrtp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_LF.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_LF_div.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_LF_floor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_LF_minus.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_LF_mul.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_LF_plus.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_RA.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_RA_div.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_RA_floor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_RA_minus.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_RA_mul.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_RA_plus.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_SF.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_SF_div.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_SF_floor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_SF_minus.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_SF_mul.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exam_SF_plus.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_GV.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_abs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_ash.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_boole.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_compare.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_div.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_dpb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_dpf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_evenp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_gcd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_ilength.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_isqrt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_ldb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_ldbtest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_logand.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_logandc1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_logandc2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_logbitp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_logcount.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_logeqv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_logior.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_lognand.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_lognor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_lognot.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_logorc1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_logorc2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_logtest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_logxor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_minus.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_minus1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_mkf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_mul.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_oddp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_ord2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_plus.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_plus1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_power2p.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_sqrtp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_I_xgcd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_MI.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_MI_canonhom.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_MI_div.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_MI_expt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_MI_minus.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_MI_mul.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_MI_plus.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_MI_recip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_nt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_nt_jacobi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeLFRAmul.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeLFatan.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeLFatanh.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeLFcos.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeLFcosh.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeLFexp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeLFln.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeLFsin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeLFsinh.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeLFsqrt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeMImisc5.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeMIpow2div.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeMIpow2recip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeRALFdiv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeRAtoLF.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeUPMImul.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timecatalan.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timediv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timediv2adic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeeuler.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeexp1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timefact.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timegcd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timemul.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timepi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeprint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timerecip2adic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timesqrt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timesqrtmodp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timesquare.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timezeta3.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs 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 # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ else \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all $(check_PROGRAMS) @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? exam.log: exam$(EXEEXT) @p='exam$(EXEEXT)'; \ b='exam'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) tests.log: tests$(EXEEXT) @p='tests$(EXEEXT)'; \ b='tests'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) 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 $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: 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: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) 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-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -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-dvi: install-dvi-am install-dvi-am: install-exec-am: 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 -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool 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-info \ install-info-am 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 mostlyclean-libtool pdf pdf-am ps ps-am \ recheck tags tags-am uninstall uninstall-am # 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: cln-1.3.3/tests/Makefile.am0000644000000000000000000001115311201634740012355 0ustar ALL_TESTS = \ exam \ tests ALL_TIMINGS = \ timemul \ timesquare \ timediv \ timesqrt \ timegcd \ timefact \ timeprint \ timeLFsqrt \ timeRAtoLF \ timeLFRAmul \ timeRALFdiv \ timepi \ timeLFln \ timeLFexp \ timeLFsin \ timeLFcos \ timeLFsinh \ timeLFcosh \ timeLFatan \ timeLFatanh \ timeMIpow2recip \ timeMIpow2div \ timeMImisc5 \ timeUPMImul \ timesqrtmodp \ timeexp1 \ timeeuler \ timecatalan \ timezeta3 \ timerecip2adic \ timediv2adic \ main TESTS = $(ALL_TESTS) check_PROGRAMS = $(ALL_TESTS) EXTRA_PROGRAMS = $(ALL_TIMINGS) AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src \ -I$(top_builddir)/include -I$(top_builddir)/src DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/autoconf exam_SOURCES = exam.h exam.cc \ exam_I.cc exam_I_plus.cc exam_I_minus.cc exam_I_mul.cc \ exam_I_div.cc exam_I_floor.cc \ exam_RA.cc exam_RA_plus.cc exam_RA_minus.cc exam_RA_mul.cc \ exam_RA_div.cc exam_RA_floor.cc \ exam_SF.cc exam_SF_plus.cc exam_SF_minus.cc exam_SF_mul.cc \ exam_SF_div.cc exam_SF_floor.cc \ exam_FF.cc exam_FF_plus.cc exam_FF_minus.cc exam_FF_mul.cc \ exam_FF_div.cc exam_FF_floor.cc \ exam_DF.cc exam_DF_plus.cc exam_DF_minus.cc exam_DF_mul.cc \ exam_DF_div.cc exam_DF_floor.cc \ exam_LF.cc exam_LF_plus.cc exam_LF_minus.cc exam_LF_mul.cc \ exam_LF_div.cc exam_LF_floor.cc \ exam_I_gcd.cc exam_I_sqrtp.cc test_MI.h test.h exam_LDADD = ../src/libcln.la tests_SOURCES = test.h tests.cc test_I.cc test_I.h test_I_abs.cc test_I_compare.cc \ test_I_plus.cc test_I_minus.cc test_I_plus1.cc \ test_I_minus1.cc test_I_mul.cc test_I_div.cc \ test_I_gcd.cc test_I_xgcd.cc test_I_ash.cc \ test_I_evenp.cc test_I_oddp.cc test_I_lognot.cc \ test_I_logand.cc test_I_logandc1.cc test_I_logandc2.cc \ test_I_logior.cc test_I_logorc1.cc test_I_logorc2.cc \ test_I_logxor.cc test_I_lognand.cc test_I_lognor.cc \ test_I_logeqv.cc test_I_boole.cc test_I_logbitp.cc \ test_I_logtest.cc test_I_ldb.cc test_I_ldbtest.cc \ test_I_mkf.cc test_I_dpb.cc test_I_dpf.cc \ test_I_logcount.cc test_I_ilength.cc test_I_ord2.cc \ test_I_power2p.cc test_I_isqrt.cc test_I_sqrtp.cc \ test_I_io.cc test_I_GV.cc \ test_MI.h test_MI.cc test_MI_canonhom.cc test_MI_plus.cc \ test_MI_minus.cc test_MI_mul.cc test_MI_recip.cc \ test_MI_div.cc test_MI_expt.cc \ test_nt.h test_nt.cc test_nt_jacobi.cc tests_LDADD = ../src/libcln.la timemul_SOURCES = timemul.cc timemul_LDADD = ../src/libcln.la timesquare_SOURCES = timesquare.cc timesquare_LDADD = ../src/libcln.la timediv_SOURCES = timediv.cc timediv_LDADD = ../src/libcln.la timesqrt_SOURCES = timesqrt.cc timesqrt_LDADD = ../src/libcln.la timegcd_SOURCES = timegcd.cc timegcd_LDADD = ../src/libcln.la timefact_SOURCES = timefact.cc timefact_LDADD = ../src/libcln.la timeprint_SOURCES = timeprint.cc timeprint_LDADD = ../src/libcln.la timeLFsqrt_SOURCES = timeLFsqrt.cc timeLFsqrt_LDADD = ../src/libcln.la timeRAtoLF_SOURCES = timeRAtoLF.cc timeRAtoLF_LDADD = ../src/libcln.la timeLFRAmul_SOURCES = timeLFRAmul.cc timeLFRAmul_LDADD = ../src/libcln.la timeRALFdiv_SOURCES = timeRALFdiv.cc timeRALFdiv_LDADD = ../src/libcln.la timepi_SOURCES = timepi.cc timepi_LDADD = ../src/libcln.la timeexp1_SOURCES = timeexp1.cc timeexp1_LDADD = ../src/libcln.la timeeuler_SOURCES = timeeuler.cc timeeuler_LDADD = ../src/libcln.la timecatalan_SOURCES = timecatalan.cc timecatalan_LDADD = ../src/libcln.la timezeta3_SOURCES = timezeta3.cc timezeta3_LDADD = ../src/libcln.la timeLFln_SOURCES = timeLFln.cc timeLFln_LDADD = ../src/libcln.la timeLFexp_SOURCES = timeLFexp.cc timeLFexp_LDADD = ../src/libcln.la timeLFsin_SOURCES = timeLFsin.cc timeLFsin_LDADD = ../src/libcln.la timeLFcos_SOURCES = timeLFcos.cc timeLFcos_LDADD = ../src/libcln.la timeLFsinh_SOURCES = timeLFsinh.cc timeLFsinh_LDADD = ../src/libcln.la timeLFcosh_SOURCES = timeLFcosh.cc timeLFcosh_LDADD = ../src/libcln.la timeLFatan_SOURCES = timeLFatan.cc timeLFatan_LDADD = ../src/libcln.la timeLFatanh_SOURCES = timeLFatanh.cc timeLFatanh_LDADD = ../src/libcln.la timerecip2adic_SOURCES = timerecip2adic.cc timerecip2adic_LDADD = ../src/libcln.la timediv2adic_SOURCES = timediv2adic.cc timediv2adic_LDADD = ../src/libcln.la timeMIpow2recip_SOURCES = timeMIpow2recip.cc timeMIpow2recip_LDADD = ../src/libcln.la timeMIpow2div_SOURCES = timeMIpow2div.cc timeMIpow2div_LDADD = ../src/libcln.la timeMImisc5_SOURCES = timeMImisc5.cc timeMImisc5_LDADD = ../src/libcln.la timeUPMImul_SOURCES = timeUPMImul.cc timeUPMImul_LDADD = ../src/libcln.la timesqrtmodp_SOURCES = timesqrtmodp.cc timesqrtmodp_LDADD = ../src/libcln.la main_SOURCES = main.cc main_LDADD = ../src/libcln.la cln-1.3.3/tests/test_I_mul.cc0000644000000000000000000000171111201634740012733 0ustar #include "test_I.h" int test_I_mul (int iterations) { int error = 0; int i; // Check commutativity. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); ASSERT2(a*b == b*a, a,b); } // Check associativity. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); cl_I c = testrandom_I(); ASSERT3((a*b)*c == a*(b*c), a,b,c); } // Check second binomial formula. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); ASSERT2((a+b)*(a-b) == a*a-b*b, a,b); } // Check distributive formula. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b = testrandom_I(); cl_I c = testrandom_I(); ASSERT3((a+c)*(b+c) == a*b+(a+b)*c+c*c, a,b,c); } // Check special cases 0, 1, -1. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); ASSERT1(a*0 == 0, a); ASSERT1(a*1 == a, a); ASSERT1(a*-1 == -a, a); } return error; } cln-1.3.3/tests/timediv.cc0000644000000000000000000000132011201634741012265 0ustar #include #include #include #include #include #include #include using namespace cln; int main (int argc, char * argv[]) { int repetitions = 1; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc < 2) exit(1); cl_I m1; cl_I m2; if (argc > 2) { m1 = cl_I(argv[1]); m2 = cl_I(argv[2]); } else { m2 = cl_I(argv[1]); m1 = 2*m2; } cl_I M1 = (cl_I)1 << (intDsize*m1); cl_I M2 = (cl_I)1 << (intDsize*m2); cl_I a = random_I(M1); cl_I b = random_I(M2); { CL_TIMING; for (int rep = repetitions; rep > 0; rep--) { cl_I_div_t qr = floor2(a,b); } } } cln-1.3.3/tests/test_nt_jacobi.cc0000644000000000000000000000251711201634741013624 0ustar #include "test_nt.h" int test_nt_jacobi (int iterations) { int error = 0; int i; // Check special cases. for (i = iterations; i > 0; i--) { cl_I b = 1+2*abs(testrandom_I()); cl_I c = testrandom_I(); if (b==1) { ASSERT2(jacobi(b*c,b) == 1, b,c); } else { ASSERT2(jacobi(b*c,b) == 0, b,c); } } for (i = iterations; i > 0; i--) { cl_I b = 1+2*abs(testrandom_I()); if (mod(b,4)==1) { ASSERT1(jacobi(-1,b) == 1, b); } else { ASSERT1(jacobi(-1,b) == -1, b); } if (abs(mod(b,8)-4)==1) { ASSERT1(jacobi(2,b) == -1, b); } else { ASSERT1(jacobi(2,b) == 1, b); } } // Check quadratic residues. for (i = iterations; i > 0; i--) { cl_I b = 1+2*abs(testrandom_I()); cl_I c = testrandom_I(); cl_I a = mod(square(c),b); if (gcd(a,b)==1) { ASSERT2(jacobi(a,b) == 1, b,c); } else { ASSERT2(jacobi(a,b) == 0, b,c); } } // Check homomorphism (fixed b). for (i = iterations; i > 0; i--) { cl_I b = 1+2*abs(testrandom_I()); cl_I a1 = testrandom_I(); cl_I a2 = testrandom_I(); ASSERT3(jacobi(a1,b)*jacobi(a2,b) == jacobi(a1*a2,b), b,a1,a2); } // Check homomorphism (fixed a). for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I b1 = 1+2*abs(testrandom_I()); cl_I b2 = 1+2*abs(testrandom_I()); ASSERT3(jacobi(a,b1)*jacobi(a,b2) == jacobi(a,b1*b2), a,b1,b2); } return error; } cln-1.3.3/tests/test_I_minus1.cc0000644000000000000000000000033511201634740013353 0ustar #include "test_I.h" int test_I_minus1 (int iterations) { int error = 0; int i; // Check against "+". for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); ASSERT1(minus1(a) == -1+a, a); } return error; } cln-1.3.3/tests/test_I_oddp.cc0000644000000000000000000000036511201634740013070 0ustar #include "test_I.h" int test_I_oddp (int iterations) { int error = 0; int i; // Check against division. for (i = iterations; i > 0; i--) { cl_I a = testrandom_I(); cl_I r = mod(a,2); ASSERT1(oddp(a) == (r!=0), a); } return error; } cln-1.3.3/tests/test_MI_div.cc0000644000000000000000000000062511201634741013041 0ustar #include "test_MI.h" int test_MI_div (int iterations) { int error = 0; int i; // Check against multiplication. for (i = iterations; i > 0; i--) { cl_I m = testrandom_I(); cl_modint_ring R = find_modint_ring(m); cl_I ai = testrandom_I(); if (gcd(m,ai)==1) { cl_MI a = R->canonhom(ai); cl_MI b = R->canonhom(testrandom_I()); ASSERT3(a*R->div(b,a) == b, m,a,b); } } return error; } cln-1.3.3/tests/test.h0000644000000000000000000000237411201634740011456 0ustar #include using namespace std; using namespace cln; #define ASSERT(expr) \ if (!(expr)) { \ std::cerr << "Assertion failed! File " << __FILE__ << ", line " << __LINE__ << endl; \ error = 1; \ } #define ASSERT1(expr,a) \ if (!(expr)) { \ std::cerr << "Assertion failed! File " << __FILE__ << ", line " << __LINE__ << endl; \ std::cerr << #a" = " << a << endl; \ error = 1; \ } #define ASSERT2(expr,a,b) \ if (!(expr)) { \ std::cerr << "Assertion failed! File " << __FILE__ << ", line " << __LINE__ << endl; \ std::cerr << #a" = " << a << endl; \ std::cerr << #b" = " << b << endl; \ error = 1; \ } #define ASSERT3(expr,a,b,c) \ if (!(expr)) { \ std::cerr << "Assertion failed! File " << __FILE__ << ", line " << __LINE__ << endl; \ std::cerr << #a" = " << a << endl; \ std::cerr << #b" = " << b << endl; \ std::cerr << #c" = " << c << endl; \ error = 1; \ } #define ASSERT4(expr,a,b,c,d) \ if (!(expr)) { \ std::cerr << "Assertion failed! File " << __FILE__ << ", line " << __LINE__ << endl; \ std::cerr << #a" = " << a << endl; \ std::cerr << #b" = " << b << endl; \ std::cerr << #c" = " << c << endl; \ std::cerr << #d" = " << d << endl; \ error = 1; \ } cln-1.3.3/tests/exam_LF_plus.cc0000644000000000000000000003303111201634740013205 0ustar #include "exam.h" #include #include static plus_test lfloat_plus_tests[] = { { "0.31465012912061093874L0", "-0.07221963987249409544L0", "0.2424304892481168433L0" }, { "0.7168586654865411176L0", "-0.19348808923554474066L0", "0.52337057625099637695L0" }, { "-0.64115701400120904706L0", "0.70535558267169594756L0", "0.0641985686704869005L0" }, { "-0.8607621650923123159L0", "0.8368256394262067108L0", "-0.023936525666105605082L0" }, { "0.44168990042410450855L0", "-0.6041911435521196045L0", "-0.16250124312801509594L0" }, { "0.0234267775301613878L0", "-0.43594485933986284478L0", "-0.41251808180970145698L0" }, { "-0.99559578594307881024L0", "-9.836107054378142702L9", "-9.836107055373738488L9" }, { "-0.72423071295455899397L0", "9.238843039595790172L9", "9.238843038871559459L9" }, { "-0.20719390117857393156L0", "-9.029224604657100362L9", "-9.029224604864294263L9" }, { "0.20816015380514039224L0", "-7.4782571284307568003L9", "-7.4782571282225966468L9" }, { "-0.16613875159201114463L0", "-1.203554507952656804L9", "-1.2035545081187955556L9" }, { "-0.9837368636729942673L0", "7.5892747601936916704L9", "7.5892747592099548066L9" }, { "-0.92391870362276300936L0", "-5.309205414965326826L-11", "-0.9239187036758550635L0" }, { "-0.2308075581152660786L0", "-2.5400598439608570973L-11", "-0.23080755814066667704L0" }, { "0.5668336039528930528L0", "1.9300606943253841182L-12", "0.56683360395482311353L0" }, { "-0.19685144163870526662L0", "-8.548847281762266571L-11", "-0.19685144172419373944L0" }, { "0.053837363417219887007L0", "-8.4734948552444605444L-11", "0.053837363332484938454L0" }, { "0.24539562474220232599L0", "-1.3753029433519360674L-11", "0.24539562472844929655L0" }, { "-0.83198492765474177585L0", "-1.0728971972413839207L19", "-1.0728971972413839208L19" }, { "0.58494670591273850794L0", "-2.6078285749436068966L19", "-2.6078285749436068966L19" }, { "-0.6489422625947265175L0", "5.675479528094312524L19", "5.675479528094312524L19" }, { "0.82416783003308421654L0", "3.4337105673864461624L19", "3.4337105673864461624L19" }, { "0.5977825969561704576L0", "9.447212597358366985L19", "9.447212597358366985L19" }, { "0.81709616259702447027L0", "1.8840697606071622024L19", "1.8840697606071622024L19" }, { "0.99140689029640294337L0", "-7.9441986163714183364L-21", "0.99140689029640294337L0" }, { "0.49487318874207713882L0", "-2.377409962381832069L-21", "0.49487318874207713882L0" }, { "0.050320977002567080524L0", "-1.3329877923173878127L-21", "0.050320977002567080524L0" }, { "-0.25724170819862546218L0", "7.609825486664252559L-22", "-0.25724170819862546218L0" }, { "0.3667308347763138993L0", "4.077152141636570548L-21", "0.3667308347763138993L0" }, { "0.5130660492586603372L0", "-5.091230019243679202L-21", "0.5130660492586603372L0" }, { "8.916053557053472733L8", "0.59999700846599703845L0", "8.916053563053442818L8" }, { "1.250980635471676891L9", "-0.46325398810664378442L0", "1.2509806350084229029L9" }, { "-5.548594356609427516L9", "-0.21577258386321002115L0", "-5.5485943568252001L9" }, { "1.06508055885340104636L9", "0.8422978396429581549L0", "1.065080559695698886L9" }, { "6.225756677310580186L9", "0.49531151031004978726L0", "6.2257566778058916964L9" }, { "-2.273191688409860673L9", "-0.80983784631745405196L0", "-2.2731916892196985192L9" }, { "5.688674258485728496L8", "8.2409948814224157357L9", "8.809862307270988585L9" }, { "-2.7544302700606018156L9", "9.230174236450698873L9", "6.4757439663900970574L9" }, { "-4.588747139238971857L9", "6.342892129519977196L9", "1.7541449902810053392L9" }, { "1.5275587581475159762L9", "4.3720035959575018324L9", "5.8995623541050178087L9" }, { "2.8881760807020099163L9", "7.5622154923755766074L9", "1.0450391573077586524L10" }, { "6.1044519092512786468L9", "1.3858854402983849103L9", "7.490337349549663557L9" }, { "4.8767035174458515886L9", "6.3051681974292703475L-11", "4.8767035174458515886L9" }, { "-9.4188975960705796466L8", "-8.975187577611984141L-12", "-9.4188975960705796466L8" }, { "-9.689819354179956828L9", "-9.7453604450079548966L-11", "-9.689819354179956828L9" }, { "4.987209054002559248L9", "9.284991248759031191L-11", "4.987209054002559248L9" }, { "-3.5572071813296941216L9", "-6.261737879308894803L-11", "-3.5572071813296941216L9" }, { "-7.5872628366112743053L9", "2.2152240842834943001L-11", "-7.5872628366112743053L9" }, { "7.0206128338340270845L9", "5.9246012493594508704L19", "5.9246012500615121536L19" }, { "5.3017367315254228474L9", "-1.0933628665004153848L19", "-1.0933628659702417116L19" }, { "-6.339538144593375358L9", "-8.0543624921112893224L19", "-8.054362492745243137L19" }, { "-1.6010717980362600647L9", "9.973849926670833376L19", "9.973849926510726196L19" }, { "3.2030522063397198562L9", "-2.4396867565423101768L19", "-2.4396867562220049562L19" }, { "8.8622195973163761245L9", "-6.4961266512803550736L19", "-6.496126650394133114L19" }, { "5.45529926142043848L9", "6.939479435912862762L-21", "5.45529926142043848L9" }, { "-4.484627189114150671L9", "-1.6571134694524616111L-21", "-4.484627189114150671L9" }, { "8.813820141949620774L9", "-2.8267147580155665537L-21", "8.813820141949620774L9" }, { "-9.972890003927356798L9", "-3.0273462676816521264L-21", "-9.972890003927356798L9" }, { "6.792889851253184185L9", "-5.937539083879130763L-21", "6.792889851253184185L9" }, { "-3.2663407400779399923L9", "-4.0747082067253115984L-21", "-3.2663407400779399923L9" }, { "-3.4242541190221825202L-11", "-0.71988400153646663195L0", "-0.71988400157070917316L0" }, { "-7.8906347145510431055L-11", "-0.22021321631029436988L0", "-0.22021321638920071702L0" }, { "-7.486719858997914782L-11", "0.38102237422222776873L0", "0.38102237414736057013L0" }, { "-2.6956794925506179954L-12", "-0.49627581161649902356L0", "-0.49627581161919470304L0" }, { "-8.312064814531952837L-11", "0.5797009072836515581L0", "0.57970090720053090995L0" }, { "-4.0305959593285763394L-11", "0.16233584979062195143L0", "0.16233584975031599183L0" }, { "3.731977491280278192L-11", "3.0305998235716452734L9", "3.0305998235716452734L9" }, { "2.7847304030282320388L-11", "-6.146190065628934066L9", "-6.146190065628934066L9" }, { "-1.1797664511795163538L-11", "1.4888590774768513251L9", "1.4888590774768513251L9" }, { "-3.736849276790130025L-11", "1.9988395869145483342L9", "1.9988395869145483342L9" }, { "5.7818526942690563386L-12", "3.5155514714363584847L9", "3.5155514714363584847L9" }, { "1.8183862272066184134L-11", "-4.635399960322760982L9", "-4.635399960322760982L9" }, { "3.5539523819420841283L-11", "4.3044646394847154864L-11", "7.858417021426799615L-11" }, { "8.719537619908441472L-11", "-8.580989797275158101L-11", "1.3854782263328337111L-12" }, { "2.49701168436805957L-12", "-2.6066406246366064513L-11", "-2.3569394561998004944L-11" }, { "4.2774640500882048993L-11", "3.7620100241760410496L-11", "8.039474074264245949L-11" }, { "3.9907211434460210612L-11", "9.72066373418363098L-11", "1.3711384877629652041L-10" }, { "-7.851637932849992129L-11", "4.9296626910685147652L-11", "-2.9219752417814773637L-11" }, { "3.14874349918113769L-11", "-1.8148353890339025639L19", "-1.8148353890339025639L19" }, { "-8.444922682942673745L-11", "-5.0034364072191331772L19", "-5.0034364072191331772L19" }, { "4.762299619586316462L-12", "-1.3412404578328588061L19", "-1.3412404578328588061L19" }, { "-9.22833351501850052L-12", "3.1000370791158631634L19", "3.1000370791158631634L19" }, { "6.1164399913981911425L-11", "6.1863455383782109436L19", "6.1863455383782109436L19" }, { "-8.413645565754525347L-11", "-2.5034082588556447364L19", "-2.5034082588556447364L19" }, { "3.4875247204061292656L-11", "-7.8682893445087250245L-21", "3.487524719619300331L-11" }, { "-2.1647610944488691768L-11", "-8.371089558230910183L-21", "-2.1647610952859781326L-11" }, { "5.7598234760228848032L-11", "2.8011007358408259187L-21", "5.7598234763029948767L-11" }, { "-9.268425959344303144L-11", "-6.4655012698265179856L-21", "-9.2684259599908532713L-11" }, { "7.067467072298381137L-11", "-3.8206328350148818058L-21", "7.0674670719163178536L-11" }, { "7.8912028748606542386L-11", "8.456364925917236866L-21", "7.891202875706290731L-11" }, { "-6.976183652817340798L18", "0.08822040416435015717L0", "-6.976183652817340798L18" }, { "-1.2414457404200743984L19", "-0.85791705029429396234L0", "-1.2414457404200743985L19" }, { "-8.9687515173878579424L19", "-0.3328210335620137057L0", "-8.9687515173878579424L19" }, { "-5.438581645592863998L19", "-0.67774278184358142436L0", "-5.438581645592863998L19" }, { "-5.4350840695201649084L19", "-0.72739900682842943577L0", "-5.4350840695201649084L19" }, { "7.814697448090367615L19", "0.24326892882624165414L0", "7.814697448090367615L19" }, { "-2.4356768540932142124L19", "6.5169042447583127604L9", "-2.435676853441523788L19" }, { "-8.7464253032141704904L19", "6.8315507162032823036L9", "-8.7464253025310154184L19" }, { "-2.4810334273518910993L18", "-7.638114077520272164L9", "-2.4810334349900051768L18" }, { "-9.80334620432051716L19", "4.474822777555302305L9", "-9.8033462038730348824L19" }, { "-1.5185085475715921137L19", "8.496315073274781452L9", "-1.5185085467219606064L19" }, { "-9.3842548893937585184L19", "-9.948865349103608366L9", "-9.3842548903886450536L19" }, { "5.9391253980818643888L19", "5.6213951287112563564L-11", "5.9391253980818643888L19" }, { "-4.8270749631022207188L19", "6.506986668488438766L-11", "-4.8270749631022207188L19" }, { "8.953940231252599753L19", "-1.7735448342981541823L-11", "8.953940231252599753L19" }, { "-6.1065165153181616235L18", "-1.8103764902203059955L-11", "-6.1065165153181616235L18" }, { "-9.6224955477275161216L19", "9.4659333494557267205L-11", "-9.6224955477275161216L19" }, { "-9.2620034246522033504L19", "-8.920063409062509698L-11", "-9.2620034246522033504L19" }, { "5.9633456897700879935L18", "4.0390945943970882336L19", "4.6354291633740970328L19" }, { "-6.1420542659063065884L19", "-3.9869088703267959336L19", "-1.01289631362331025216L20" }, { "7.804124970286546613L19", "8.061318173712112305L19", "1.5865443143998658918L20" }, { "-7.763817772329800516L19", "-4.9349702057713961232L19", "-1.2698787978101196639L20" }, { "-3.1480955091040648274L19", "-4.706529024129812914L19", "-7.8546245332338777416L19" }, { "-4.7131343507844737428L19", "5.4602299451983202032L19", "7.470955944138464604L18" }, { "5.9403761194093478956L19", "-6.280541343011718101L-21", "5.9403761194093478956L19" }, { "-3.763295388652278206L19", "-9.963494853851408371L-21", "-3.763295388652278206L19" }, { "2.5136958358030666948L19", "5.335607709622335287L-21", "2.5136958358030666948L19" }, { "6.2273952762016960176L19", "-5.6012630121574213906L-21", "6.2273952762016960176L19" }, { "-9.3934610912833028936L19", "-2.59552531586503232L-21", "-9.3934610912833028936L19" }, { "2.9584554660239488776L19", "6.875837450751388893L-21", "2.9584554660239488776L19" }, { "-8.4905558825256936576L-21", "0.112912972443893420624L0", "0.11291297244389342062L0" }, { "-5.3259362300699140443L-21", "0.44064771529278198132L0", "0.44064771529278198132L0" }, { "-9.245572241572266517L-21", "0.043497459079983070442L0", "0.043497459079983070432L0" }, { "7.6311333407948593004L-22", "0.74437178299084331024L0", "0.74437178299084331024L0" }, { "-7.71114100404407176L-21", "-0.30667849853816871164L0", "-0.30667849853816871164L0" }, { "3.544120177696956032L-21", "0.79322122717232419205L0", "0.79322122717232419205L0" }, { "7.7913861181291523115L-21", "8.526554352243632931L9", "8.526554352243632931L9" }, { "-3.9196632415032070805L-21", "-2.5228304289307799614L9", "-2.5228304289307799614L9" }, { "7.643174046933518012L-22", "2.9248526891356128762L9", "2.9248526891356128762L9" }, { "1.8801815336593227227L-21", "6.8178694125314363L9", "6.8178694125314363L9" }, { "-2.6985037225367287349L-21", "-4.5571976978858014136L9", "-4.5571976978858014136L9" }, { "6.0444611510506986126L-21", "-8.64585025875790907L9", "-8.64585025875790907L9" }, { "-1.250177749198396931L-21", "6.428634063301101147L-11", "6.428634063176083372L-11" }, { "-1.5666058964343815161L-21", "3.552568414787808555L-11", "3.5525684146311479653L-11" }, { "-5.8078119773790503857L-21", "8.896395897015492877L-12", "8.8963958912076809L-12" }, { "6.7472260162031965506L-21", "-6.617115409846031908L-11", "-6.617115409171309306L-11" }, { "-4.16121984125470857L-21", "-3.095053467302410671L-11", "-3.095053467718532655L-11" }, { "-2.114411383443366621L-21", "9.716046816037651671L-11", "9.716046815826210533L-11" }, { "-2.3406730990296292957L-21", "7.900725768498098123L18", "7.900725768498098123L18" }, { "-4.1514248667302411754L-21", "-8.4325334951006246184L19", "-8.4325334951006246184L19" }, { "8.433933541545648577L-21", "-4.9459088765496691632L19", "-4.9459088765496691632L19" }, { "2.2922577085250648752L-21", "7.813245819908182463L19", "7.813245819908182463L19" }, { "8.887270525300553388L-21", "8.651116139112459977L19", "8.651116139112459977L19" }, { "1.1406539199130032192L-21", "2.3931812472136783544L19", "2.3931812472136783544L19" }, { "-3.778523001798117503L-21", "2.0779948578933832532L-22", "-3.5707235160087791776L-21" }, { "-1.6066062689688361383L-21", "-3.5232009896946632975L-21", "-5.1298072586634994358L-21" }, { "3.9703618511174300454L-21", "-8.036088455194107478L-21", "-4.0657266040766774324L-21" }, { "6.46657477279861825L-21", "2.6384883907642781157L-21", "9.105063163562896366L-21" }, { "4.9706631077050274314L-21", "2.3628052244020145395L-21", "7.333468332107041971L-21" }, { "7.065951142271372955L-21", "3.1965272324939519L-21", "1.02624783747653248544L-20" }, }; cln-1.3.3/INSTALL0000644000000000000000000000616711551240342010220 0ustar Prerequisites. ============= ANSI-compliant C++ compiler. GNU C++ compiler (version >= 3.4) is recommend. Non-GNU compilers might not work at the moment. GNU multiprecision library (http://gmplib.org), version > 4.0 (older 3.x versions might work too). [Optional] To build CLN documentation texinfo and TeX are necessary. If you install CLN from git, you also need git itself (http://git.or.cz), version >= 1.5.0 GNU autoconf (http://www.gnu.org/software/autoconf), version >= 2.59 GNU libtool (http://www.gnu.org/software/libtool), version >= 1.5 GNU automake (http://www.gnu.org/software/automake), version >= 1.8 Installation from a source .tar.bz2 distribution. ================================================ $ ./configure $ make $ make check [ become root if necessary ] # make install To build the manual in PDF, HTML, or PostScript formats, use one of $ make pdf $ make html $ make ps To compile and run CLN's test suite and check whether the library was compiled correctly you can use $ make check The "configure" script can be given a number of options to enable and disable various features. Most useful ones are: --prefix=DIR Install CLN into the directory DIR (default: /usr/local). --with-gmp Use GNU multiprecision library (default: yes, if available) --disable-static Don't build static version of CLN library. This option is useful if want to reduce the build time (and you don't need the static library). For a complete list, run: $ ./configure --help Installation from git. ===================== 1. Download the code. Initial download: $ git clone git://www.ginac.de/cln.git Later on you can update your copy with $ git pull 2. Make sure all required software is installed. This is *really* important step. If some package is missing, the `configure' script might be misgenerated, 3. Run $ autoreconf -iv to generate the `configure' script, and proceed in a standard way, i.e. $ ./configure $ make [become root if necessary] # make install CLN is known to work with: ========================= - Linux/x86, gcc-3.x, gcc-4.[0-5].x - Linux/x86_64, gcc-3.[3-4], gcc-4.[0-6].x, clang-2.8 - Linux/ia64, gcc-3.[2-4], gcc-4.[0-4].x - Linux/arm, gcc-3.[0-3] (*), gcc-4.[0-4].x (*) - Linux/mips, gcc-3.3, gcc-4.[0-4].x - Linux/sparc, gcc-3.[1-3], gcc-4.[0-2].x - Linux/alpha, gcc-3.[0-3], gcc-4.[0-2].x - Linux/powerpc, gcc-3.[0-3], gcc-4.[0-4].x - Linux/hppa, gcc-4.2.x (*) - Solaris 2.4 (sparc), gcc-3.[1-3], gcc-4.[0-2].x (*) - OSF/1 V4.0 (alpha), gcc-3.1 - Irix 6.5, gcc-3.0 - OS X Leopard (x86), gcc 4.0.1 - Windows/32-bit, MSVC 16.00.30319.01 (*) On these platforms, problems with the assembler routines have been reported. It may be best to add "-DNO_ASM" to CPPFLAGS before configuring. Using gcc-4.2, the "make" step takes about 15 minutes, on an x86_64 / 2 GHz. If you use g++ from gcc-3.0.4 or older on Sparc, add either "-O", "-O1" or "-O2 -fno-schedule-insns" to the CXXFLAGS. With full "-O2", g++ miscompiles the division routines. Do not use gcc-3.0 on Sparc for compiling CLN, it won't work at all. More detailed installation instructions can be found in the documentation, in the doc/ directory. cln-1.3.3/examples/0000755000000000000000000000000012173046202010773 5ustar cln-1.3.3/examples/lucaslehmer.cc0000644000000000000000000000357511201634736013626 0ustar // Check whether a mersenne number is prime, // using the Lucas-Lehmer test. // [Donald Ervin Knuth: The Art of Computer Programming, Vol. II: // Seminumerical Algorithms, second edition. Section 4.5.4, p. 391.] // We work with integers. #include using namespace std; using namespace cln; // Checks whether 2^q-1 is prime, q an odd prime. bool mersenne_prime_p (int q) { cl_I m = ((cl_I)1 << q) - 1; int i; cl_I L_i; for (i = 0, L_i = 4; i < q-2; i++) L_i = mod(L_i*L_i - 2, m); return (L_i==0); } // Same thing, but optimized. bool mersenne_prime_p_opt (int q) { cl_I m = ((cl_I)1 << q) - 1; int i; cl_I L_i; for (i = 0, L_i = 4; i < q-2; i++) { L_i = square(L_i) - 2; L_i = ldb(L_i,cl_byte(q,q)) + ldb(L_i,cl_byte(q,0)); if (L_i >= m) L_i = L_i - m; } return (L_i==0); } // Now we work with modular integers. #include // Same thing, but using modular integers. bool mersenne_prime_p_modint (int q) { cl_I m = ((cl_I)1 << q) - 1; cl_modint_ring R = find_modint_ring(m); // Z/mZ int i; cl_MI L_i; for (i = 0, L_i = R->canonhom(4); i < q-2; i++) L_i = R->minus(R->square(L_i),R->canonhom(2)); return R->equal(L_i,R->zero()); } #include // we do I/O #include // declares exit() #include int main (int argc, char* argv[]) { if (!(argc == 2)) { cerr << "Usage: lucaslehmer exponent" << endl; exit(1); } int q = atoi(argv[1]); if (!(q >= 2 && ((q % 2)==1))) { cerr << "Usage: lucaslehmer q with q odd prime" << endl; exit(1); } bool isprime; { CL_TIMING; isprime = mersenne_prime_p(q); } { CL_TIMING; isprime = mersenne_prime_p_opt(q); } { CL_TIMING; isprime = mersenne_prime_p_modint(q); } cout << "2^" << q << "-1 is "; if (isprime) cout << "prime" << endl; else cout << "composite" << endl; } // Computing time on a i486, 33 MHz: // 1279: 2.02 s // 2281: 8.74 s // 44497: 14957 s cln-1.3.3/examples/fibonacci.cc0000644000000000000000000001021511201634736013224 0ustar // Compute and print the n-th Fibonacci number. // We work with integers and real numbers. #include #include // We do I/O. #include #include // We use the timing functions. #include using namespace std; using namespace cln; // F_n is defined through the recurrence relation // F_0 = 0, F_1 = 1, F_(n+2) = F_(n+1) + F_n. // The following addition formula holds: // F_(n+m) = F_(m-1) * F_n + F_m * F_(n+1) for m >= 1, n >= 0. // (Proof: For fixed m, the LHS and the RHS satisfy the same recurrence // w.r.t. n, and the initial values (n=0, n=1) agree. Hence all values agree.) // Replace m by m+1: // F_(n+m+1) = F_m * F_n + F_(m+1) * F_(n+1) for m >= 0, n >= 0 // Now put in m = n, to get // F_(2n) = (F_(n+1)-F_n) * F_n + F_n * F_(n+1) = F_n * (2*F_(n+1) - F_n) // F_(2n+1) = F_n ^ 2 + F_(n+1) ^ 2 // hence // F_(2n+2) = F_(n+1) * (2*F_n + F_(n+1)) struct twofibs { cl_I u; // F_n cl_I v; // F_(n+1) // Constructor. twofibs (const cl_I& uu, const cl_I& vv) : u (uu), v (vv) {} }; // Returns F_n and F_(n+1). Assume n>=0. static const twofibs fibonacci2 (int n) { if (n==0) return twofibs(0,1); int m = n/2; // floor(n/2) twofibs Fm = fibonacci2(m); // Since a squaring is cheaper than a multiplication, better use // three squarings instead of one multiplication and two squarings. cl_I u2 = square(Fm.u); cl_I v2 = square(Fm.v); if (n==2*m) { // n = 2*m cl_I uv2 = square(Fm.v - Fm.u); return twofibs(v2 - uv2, u2 + v2); } else { // n = 2*m+1 cl_I uv2 = square(Fm.u + Fm.v); return twofibs(u2 + v2, uv2 - u2); } } // Returns just F_n. Assume n>=0. const cl_I fibonacci (int n) { if (n==0) return 0; int m = n/2; // floor(n/2) twofibs Fm = fibonacci2(m); if (n==2*m) { // n = 2*m // Here we don't use the squaring formula because // one multiplication is cheaper than two squarings. cl_I& u = Fm.u; cl_I& v = Fm.v; return u * ((v << 1) - u); } else { // n = 2*m+1 cl_I u2 = square(Fm.u); cl_I v2 = square(Fm.v); return u2 + v2; } } // The next routine is a variation of the above. It is mathematically // equivalent but implemented in a non-recursive way. const cl_I fibonacci_compact (int n) { if (n==0) return 0; cl_I u = 0; cl_I v = 1; cl_I m = n/2; // floor(n/2) for (uintC bit=integer_length(m); bit>0; --bit) { // Since a squaring is cheaper than a multiplication, better use // three squarings instead of one multiplication and two squarings. cl_I u2 = square(u); cl_I v2 = square(v); if (logbitp(bit-1, m)) { v = square(u + v) - u2; u = u2 + v2; } else { u = v2 - square(v - u); v = u2 + v2; } } if (n==2*m) // Here we don't use the squaring formula because // one multiplication is cheaper than two squarings. return u * ((v << 1) - u); else return square(u) + square(v); } // Returns just F_n, computed as the nearest integer to // ((1+sqrt(5))/2)^n/sqrt(5). Assume n>=0. const cl_I fibonacci_slow (int n) { // Need a precision of ((1+sqrt(5))/2)^-n. float_format_t prec = float_format((int)(0.208987641*n+5)); cl_R sqrt5 = sqrt(cl_float(5,prec)); cl_R phi = (1+sqrt5)/2; return round1( expt(phi,n)/sqrt5 ); } #ifndef TIMING int main (int argc, char* argv[]) { if (argc != 2) { cerr << "Usage: fibonacci n" << endl; return(1); } int n = atoi(argv[1]); cout << "fib(" << n << ") = " << fibonacci(n) << endl; return(0); } #else // TIMING int main (int argc, char* argv[]) { int repetitions = 100; if ((argc >= 3) && !strcmp(argv[1],"-r")) { repetitions = atoi(argv[2]); argc -= 2; argv += 2; } if (argc != 2) { cerr << "Usage: fibonacci n" << endl; return(1); } int n = atoi(argv[1]); { CL_TIMING; cout << "fib(" << n << ") = "; for (int rep = repetitions-1; rep > 0; rep--) fibonacci(n); cout << fibonacci(n) << endl; } { CL_TIMING; cout << "fib(" << n << ") = "; for (int rep = repetitions-1; rep > 0; rep--) fibonacci_compact(n); cout << fibonacci_compact(n) << endl; } { CL_TIMING; cout << "fib(" << n << ") = "; for (int rep = repetitions-1; rep > 0; rep--) fibonacci_slow(n); cout << fibonacci_slow(n) << endl; } return(0); } #endif cln-1.3.3/examples/pi.cc0000644000000000000000000000472111215252114011713 0ustar // Compute decimal Archimedes' constant Pi to arbitrary accuracy. #include #include #include #include #include #include #include #include using namespace std; using namespace cln; static void usage (ostream &os) { os << "Usage: pi [digits]\n"; os << "Compute decimal Archimedes' constant Pi to arbitrary accuracy.\n\n"; os << " --help display this help and exit\n"; os << " --version output version information and exit\n"; os << " --bibliography output recommended readings and exit\n"; } int main (int argc, char * argv[]) { long digits = 100; if (argc > 1) { if (argc == 2 && !strcmp(argv[1],"--help")) { usage(cout); return 0; } if (argc == 2 && !strcmp(argv[1],"--version")) { cout << "pi (CLN " << version_major << "." << version_minor << "." << version_patchlevel << ")" << endl; cout << "Written by Bruno Haible and Richard B. Kreckel." << endl; cout << endl; cout << "Copyright (C) 1988-2008 Bruno Haible, 2000-2009 Richard B. Kreckel." << endl; cout << "This is free software; see the source for copying conditions. There is NO" << endl; cout << "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." << endl; cout << endl; return 0; } if (argc == 2 && !strcmp(argv[1],"--bibliography")) { cout << "Recommended readings:\n"; cout << "\"Pi\", by Joerg Arndt and Christoph Haenel (1999)\n"; cout << "\"Pi: A Source Book\" by Lennart Berggren, Jonathan Borwein, Peter Borwein (1997)" << endl; return 0; } if (argc == 2 && isdigit(argv[1][0])) { digits = atol(argv[1]); } else { usage(cerr); return 1; } } if (digits) { cl_F p = pi(float_format(digits)); // make CLN believe this number has default_float_format to suppress // exponent marker which would be quite boring for 3.1416... cl_print_flags cpf; cpf.default_float_format = float_format(p); // We cannot print directly because people get dazed and confused // when they see gratuitous digits (Debian Bug #286266.) And we // must not "fix" the output routine because print-read consistency // is at stake. As a workaround, print into a buffer so we can chop // off characters from its end. stringstream buf; print_real(buf, cpf, p); istreambuf_iterator i = buf.rdbuf(); while (--digits+2>0) cout << *(i++); } cout << endl; return 0; } cln-1.3.3/examples/nextprime.cc0000644000000000000000000000111111201634736013315 0ustar // This program prints the smallest probable prime >= x, x being given on the // command line. // We work with real numbers and integers. #include #include // We do I/O. #include #include // The function nextprobprime() is part of the number theory package. #include int main (int argc, char* argv[]) { if (argc != 2) { std::cerr << "Usage: nextprime x" << std::endl; return(1); } cln::cl_R x = (cln::cl_R)argv[1]; cln::cl_I p = cln::nextprobprime(x); std::cout << p << std::endl; return(0); } cln-1.3.3/examples/contfrac.cc0000644000000000000000000000157511201634736013117 0ustar // Print the continued fraction of a real number. // We work with real numbers and integers. #include #include // We do I/O. #include #include using namespace std; using namespace cln; int main (int argc, char* argv[]) { for (int i = 1; i < argc; i++) { const char * arg = argv[i]; try { // Convert argument to its internal representation: cl_R x = arg; // Check sign. if (minusp(x)) { cout << '-'; x = -x; } cout << "["; const char* separator = "; "; for (;;) { // Split x into integral and fractional part. cl_R_div_t x_split = floor2(x); cout << x_split.quotient; x = x_split.remainder; if (zerop(x)) break; cout << separator; separator = ", "; // Invert x. x = recip(x); } cout << ']' << endl; } catch ( const runtime_exception& ) {} } } cln-1.3.3/examples/e.cc0000644000000000000000000000656411537243163011551 0ustar /* * The following program was used to compute the first 100,000,000 decimal * digits of e = exp(1), on December 18-20, 1998. * Timings on a Sun UltraSparc-II (296 MHz), running Solaris 2.6, equipped * with 512 MB RAM and 2 GB swap: * * 100 digits: * computation of e: real time: 0.002 s, run time: 0.000 s * conversion to decimal: real time: 0.003 s, run time: 0.000 s * 1000 digits: * computation of e: real time: 0.018 s, run time: 0.020 s * conversion to decimal: real time: 0.028 s, run time: 0.020 s * 10000 digits: * computation of e: real time: 0.488 s, run time: 0.480 s * conversion to decimal: real time: 1.059 s, run time: 1.060 s * 100000 digits: * computation of e: real time: 8.139 s, run time: 8.010 s * conversion to decimal: real time: 16.593 s, run time: 16.540 s * 1000000 digits: * computation of e: real time: 122.383 s, run time: 121.020 s * conversion to decimal: real time: 252.524 s, run time: 250.760 s * 10000000 digits: * computation of e: real time: 2152.061 s, run time: 2056.430 s * conversion to decimal: real time: 3579.670 s, run time: 3388.990 s * 100000000 digits: * computation of e: real time: 40061.367 s, run time: 30449.630 s * conversion to decimal: real time: 54507.003 s, run time: 40063.510 s */ #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace cln; void sum_exp1 (uintC a, uintC b, cl_I & first, cl_I & second) { switch (b - a) { case 1: first = second = b; break; case 2: { cl_I s = (a + b) >> 1; second = s * b; first = second + b; } break; default: { cl_I lp, lq, rp, rq, tmp; uintC mid = (a + b) >> 1; sum_exp1 (a, mid, lp, lq); sum_exp1 (mid, b, rp, rq); tmp = lp * rq; first = tmp + rp; second = lq * rq; } break; } } namespace cln { extern const cl_LF cl_I_to_LF(const cl_I&, uintC); } void const_exp1 (cl_LF & result, uintC dec) { uintC c = (uintC) (dec * ::log (10.0)); uintC n = dec; uintC actuallen = (uintC)(3.321928094 * dec / intDsize); n = (uintC) ((n + c) / ::log ((double)n)); n = (uintC) ((n + c) / ::log ((double)n)); n = (uintC) ((n + c) / ::log ((double)n)); n += 2; actuallen += 2; cout << "n = " << n << endl; cout << "actuallen = " << actuallen << endl; cl_I p, q; sum_exp1 (0, n, p, q); cout << "sum_exp1 ends ok" << endl; result = The(cl_LF)(cl_I_to_LF (p, actuallen) / cl_I_to_LF (q, actuallen)); cout << "const_exp1 returns ok" << endl; } int main (int argc, char *argv[]) { long digits = 100; while (argc >= 3) { if (!strcmp(argv[1],"-n")) { digits = atol(argv[2]); argc -= 2; argv += 2; continue; } break; } if (argc < 1) return(1); cl_LF c1; long l = digits; cout << "\nCalculating exp1 to " << l << " decimals" << endl; { CL_TIMING; const_exp1 (c1, l); } { CL_TIMING; cout << "@" << endl; cout << c1 << endl; cout << "@" << endl; } return(0); } cln-1.3.3/examples/perfnum.cc0000644000000000000000000000065112105263223012757 0ustar // This program prints the largest now known even perfect number. #include #include using namespace std; using namespace cln; int main () { // previous ones were 1257787, 1398269, 2976221, 3021377, 6972593, // 13466917, 20996011, 24036583, 25964951, 30402457, 32582657, 37156667, // 42643801, 43112609 int p = 57885161; cl_I x = (((cl_I)1 << p) - 1) << (p-1); cout << x << endl; } cln-1.3.3/examples/legendre.cc0000644000000000000000000000354111201634736013100 0ustar // Compute the Legendre polynomials. #include #include #include #include #include #include #include #include #include using namespace std; using namespace cln; // Computes the n-th Legendre polynomial in R[x], using the formula // P_n(x) = 1/(2^n n!) * (d/dx)^n (x^2-1)^n. (Assume n >= 0.) const cl_UP_RA legendre (const cl_rational_ring& R, int n) { cl_univpoly_rational_ring PR = find_univpoly_ring(R); cl_UP_RA b = PR->create(2); b.set_coeff(2,1); b.set_coeff(1,0); b.set_coeff(0,-1); b.finalize(); // b is now x^2-1 cl_UP_RA p = (n==0 ? PR->one() : expt_pos(b,n)); for (int i = 0; i < n; i++) p = deriv(p); cl_RA factor = recip(factorial(n)*ash(1,n)); for (int j = degree(p); j >= 0; j--) p.set_coeff(j, coeff(p,j) * factor); p.finalize(); return p; } const cl_UP_MI legendre (const cl_modint_ring& R, int n) { cl_univpoly_modint_ring PR = find_univpoly_ring(R); cl_UP_MI b = PR->create(2); b.set_coeff(2,R->canonhom(1)); b.set_coeff(1,R->canonhom(0)); b.set_coeff(0,R->canonhom(-1)); b.finalize(); // b is now x^2-1 cl_UP_MI p = (n==0 ? PR->one() : expt_pos(b,n)); for (int i = 0; i < n; i++) p = deriv(p); cl_MI factor = recip(R->canonhom(factorial(n)*ash(1,n))); for (int j = degree(p); j >= 0; j--) p.set_coeff(j, coeff(p,j) * factor); p.finalize(); return p; } int main (int argc, char* argv[]) { if (!(argc == 2 || argc == 3)) { cerr << "Usage: legendre n [m]" << endl; exit(1); } int n = atoi(argv[1]); if (!(n >= 0)) { cerr << "Usage: legendre n [m] with n >= 0" << endl; exit(1); } if (argc == 2) { cl_UP p = legendre(cl_RA_ring,n); cout << p << endl; } else { cl_I m = argv[2]; cl_UP p = legendre(find_modint_ring(m),n); cout << p << endl; } return 0; } cln-1.3.3/examples/pi.10000644000000000000000000000122711201634736011475 0ustar .TH PI 1 .SH NAME pi \- compute decimal Archimedes' constant Pi to arbitrary accuracy. .SH SYNOPSIS .B pi .I "[digits]" .br .SH "DESCRIPTION" The .BR pi command prints 100 decimal digits of Archimedes' constant pi or a number of digits specified by an integer parameter on the command line. .TP .B \-\-help Show summary of options. .TP .B \-\-version Show version of program and exit. .TP .B \-\-bibliography Output recommended readings and exit. .SH "SEE ALSO" The CLN library is documented fully by .IR "cln" , available via the Info system. .SH AUTHOR CLN was written by Bruno Haible and is maintained by Richard Kreckel . cln-1.3.3/examples/Makefile.in0000644000000000000000000006507012172603767013066 0ustar # Makefile.in generated by automake 1.13.3 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. @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@ noinst_PROGRAMS = contfrac$(EXEEXT) e$(EXEEXT) fibonacci$(EXEEXT) \ legendre$(EXEEXT) lucaslehmer$(EXEEXT) nextprime$(EXEEXT) \ perfnum$(EXEEXT) bin_PROGRAMS = pi$(EXEEXT) subdir = examples DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/autoconf/depcomp $(dist_man_MANS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alloca.m4 \ $(top_srcdir)/m4/as-underscore.m4 $(top_srcdir)/m4/cc.m4 \ $(top_srcdir)/m4/floatparam.m4 $(top_srcdir)/m4/general.m4 \ $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gmp.m4 \ $(top_srcdir)/m4/intparam.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/param.m4 \ $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/proto.m4 \ $(top_srcdir)/m4/rusage.m4 $(top_srcdir)/m4/times.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/autoconf/cl_config.h \ $(top_builddir)/include/cln/config.h \ $(top_builddir)/include/cln/host_cpu.h \ $(top_builddir)/include/cln/version.h \ $(top_builddir)/src/base/cl_base_config.h \ $(top_builddir)/src/base/cl_gmpconfig.h \ $(top_builddir)/src/timing/cl_t_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am_contfrac_OBJECTS = contfrac.$(OBJEXT) contfrac_OBJECTS = $(am_contfrac_OBJECTS) contfrac_DEPENDENCIES = ../src/libcln.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am_e_OBJECTS = e.$(OBJEXT) e_OBJECTS = $(am_e_OBJECTS) e_DEPENDENCIES = ../src/libcln.la am_fibonacci_OBJECTS = fibonacci.$(OBJEXT) fibonacci_OBJECTS = $(am_fibonacci_OBJECTS) fibonacci_DEPENDENCIES = ../src/libcln.la am_legendre_OBJECTS = legendre.$(OBJEXT) legendre_OBJECTS = $(am_legendre_OBJECTS) legendre_DEPENDENCIES = ../src/libcln.la am_lucaslehmer_OBJECTS = lucaslehmer.$(OBJEXT) lucaslehmer_OBJECTS = $(am_lucaslehmer_OBJECTS) lucaslehmer_DEPENDENCIES = ../src/libcln.la am_nextprime_OBJECTS = nextprime.$(OBJEXT) nextprime_OBJECTS = $(am_nextprime_OBJECTS) nextprime_DEPENDENCIES = ../src/libcln.la am_perfnum_OBJECTS = perfnum.$(OBJEXT) perfnum_OBJECTS = $(am_perfnum_OBJECTS) perfnum_DEPENDENCIES = ../src/libcln.la am_pi_OBJECTS = pi.$(OBJEXT) pi_OBJECTS = $(am_pi_OBJECTS) pi_DEPENDENCIES = ../src/libcln.la AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(contfrac_SOURCES) $(e_SOURCES) $(fibonacci_SOURCES) \ $(legendre_SOURCES) $(lucaslehmer_SOURCES) \ $(nextprime_SOURCES) $(perfnum_SOURCES) $(pi_SOURCES) DIST_SOURCES = $(contfrac_SOURCES) $(e_SOURCES) $(fibonacci_SOURCES) \ $(legendre_SOURCES) $(lucaslehmer_SOURCES) \ $(nextprime_SOURCES) $(perfnum_SOURCES) $(pi_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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; }; \ } man1dir = $(mandir)/man1 NROFF = nroff MANS = $(dist_man_MANS) 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@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS_UNDERSCORE = @AS_UNDERSCORE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLNLIB_RPATH = @CLNLIB_RPATH@ CL_VERSION = @CL_VERSION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GMP_RPATH_CFG = @GMP_RPATH_CFG@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_VERSION_INFO = @LT_VERSION_INFO@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ 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@ SED = @SED@ 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_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ dist_man_MANS = pi.1 contfrac_SOURCES = contfrac.cc contfrac_LDADD = ../src/libcln.la e_SOURCES = e.cc e_LDADD = ../src/libcln.la fibonacci_SOURCES = fibonacci.cc fibonacci_LDADD = ../src/libcln.la legendre_SOURCES = legendre.cc legendre_LDADD = ../src/libcln.la lucaslehmer_SOURCES = lucaslehmer.cc lucaslehmer_LDADD = ../src/libcln.la nextprime_SOURCES = nextprime.cc nextprime_LDADD = ../src/libcln.la perfnum_SOURCES = perfnum.cc perfnum_LDADD = ../src/libcln.la pi_SOURCES = pi.cc pi_LDADD = ../src/libcln.la AM_CPPFLAGS = -I../include -I$(top_srcdir)/include DEFAULT_INCLUDES = -I.@am__isrc@ all: all-am .SUFFIXES: .SUFFIXES: .cc .lo .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) --foreign examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign examples/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-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list contfrac$(EXEEXT): $(contfrac_OBJECTS) $(contfrac_DEPENDENCIES) $(EXTRA_contfrac_DEPENDENCIES) @rm -f contfrac$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(contfrac_OBJECTS) $(contfrac_LDADD) $(LIBS) e$(EXEEXT): $(e_OBJECTS) $(e_DEPENDENCIES) $(EXTRA_e_DEPENDENCIES) @rm -f e$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(e_OBJECTS) $(e_LDADD) $(LIBS) fibonacci$(EXEEXT): $(fibonacci_OBJECTS) $(fibonacci_DEPENDENCIES) $(EXTRA_fibonacci_DEPENDENCIES) @rm -f fibonacci$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(fibonacci_OBJECTS) $(fibonacci_LDADD) $(LIBS) legendre$(EXEEXT): $(legendre_OBJECTS) $(legendre_DEPENDENCIES) $(EXTRA_legendre_DEPENDENCIES) @rm -f legendre$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(legendre_OBJECTS) $(legendre_LDADD) $(LIBS) lucaslehmer$(EXEEXT): $(lucaslehmer_OBJECTS) $(lucaslehmer_DEPENDENCIES) $(EXTRA_lucaslehmer_DEPENDENCIES) @rm -f lucaslehmer$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(lucaslehmer_OBJECTS) $(lucaslehmer_LDADD) $(LIBS) nextprime$(EXEEXT): $(nextprime_OBJECTS) $(nextprime_DEPENDENCIES) $(EXTRA_nextprime_DEPENDENCIES) @rm -f nextprime$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(nextprime_OBJECTS) $(nextprime_LDADD) $(LIBS) perfnum$(EXEEXT): $(perfnum_OBJECTS) $(perfnum_DEPENDENCIES) $(EXTRA_perfnum_DEPENDENCIES) @rm -f perfnum$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(perfnum_OBJECTS) $(perfnum_LDADD) $(LIBS) pi$(EXEEXT): $(pi_OBJECTS) $(pi_DEPENDENCIES) $(EXTRA_pi_DEPENDENCIES) @rm -f pi$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pi_OBJECTS) $(pi_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/contfrac.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/e.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fibonacci.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/legendre.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lucaslehmer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nextprime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perfnum.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pi.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(dist_man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(dist_man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(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 $(PROGRAMS) $(MANS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; 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-binPROGRAMS clean-generic clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -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-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool \ clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-man1 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 mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-man uninstall-man1 # 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: cln-1.3.3/examples/Makefile.am0000644000000000000000000000130211215252114013020 0ustar noinst_PROGRAMS = contfrac e fibonacci legendre lucaslehmer nextprime perfnum bin_PROGRAMS = pi dist_man_MANS = pi.1 contfrac_SOURCES = contfrac.cc contfrac_LDADD = ../src/libcln.la e_SOURCES = e.cc e_LDADD = ../src/libcln.la fibonacci_SOURCES = fibonacci.cc fibonacci_LDADD = ../src/libcln.la legendre_SOURCES = legendre.cc legendre_LDADD = ../src/libcln.la lucaslehmer_SOURCES = lucaslehmer.cc lucaslehmer_LDADD = ../src/libcln.la nextprime_SOURCES = nextprime.cc nextprime_LDADD = ../src/libcln.la perfnum_SOURCES = perfnum.cc perfnum_LDADD = ../src/libcln.la pi_SOURCES = pi.cc pi_LDADD = ../src/libcln.la AM_CPPFLAGS = -I../include -I$(top_srcdir)/include DEFAULT_INCLUDES = -I.@am__isrc@ cln-1.3.3/m4/0000755000000000000000000000000012173046175007506 5ustar cln-1.3.3/m4/cc.m40000644000000000000000000000314311201634736010333 0ustar dnl Checks whether the stack can be marked nonexecutable by passing an option dnl to the C-compiler when acting on .s files. Appends that option to ASFLAGS. dnl This macro is adapted from one found in GLIBC-2.3.5. AC_DEFUN([CL_AS_NOEXECSTACK],[ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AM_PROG_AS]) AC_CACHE_CHECK([whether --noexecstack is desirable for .s files], cl_cv_as_noexecstack, [dnl cat > conftest.c </dev/null]) \ && grep -q .note.GNU-stack conftest.s \ && AC_TRY_COMMAND([${CCAS} $CFLAGS $CPPFLAGS -Wa,--noexecstack -c -o conftest.o conftest.s >/dev/null]) then cl_cv_as_noexecstack=yes else cl_cv_as_noexecstack=no fi rm -f conftest*]) if test "$cl_cv_as_noexecstack" = yes; then CCASFLAGS="$CCASFLAGS -Wa,--noexecstack" fi ]) dnl Checks whether the compiler supports __attribute__((flatten)). AC_DEFUN([CL_ATTRIBUTE_FLATTEN],[ AC_REQUIRE([AC_PROG_CXX]) AC_CACHE_CHECK([whether the compiler supports __attribute__((flatten))], cl_cv_have_attr_flatten, [dnl cat > conftest.cc </dev/null 2>conftest.stderr) then if grep -i "warning" conftest.stderr > /dev/null; then cl_cv_have_attr_flatten=no else cl_cv_have_attr_flatten=yes fi else cl_cv_have_attr_flatten=no fi rm -f conftest* ]) if test $cl_cv_have_attr_flatten = yes; then AC_DEFINE(CL_HAVE_ATTRIBUTE_FLATTEN, ,[Define if compiler supports __attribute__((flatten))]) fi ]) cln-1.3.3/m4/gettimeofday.m40000644000000000000000000000303311201634736012425 0ustar dnl -*- Autoconf -*- dnl Copyright (C) 1993-2003, 2006 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible, Marcus Daniels, Sam Steingold. AC_PREREQ(2.57) AC_DEFUN([CL_GETTIMEOFDAY], [AC_BEFORE([$0], [CL_TIMES_CLOCK]) AC_CHECK_FUNCS(gettimeofday)dnl if test $ac_cv_func_gettimeofday = yes; then dnl HAVE_GETTIMEOFDAY is defined CL_PROTO([gettimeofday], [ CL_PROTO_TRY([ #include #include ], [int gettimeofday (struct timeval * tp, struct timezone * tzp);], [int gettimeofday();], cl_cv_proto_gettimeofday_dots=no cl_cv_proto_gettimeofday_arg2="struct timezone *", [ CL_PROTO_TRY([ #include #include ], [int gettimeofday (struct timeval * tp, void * tzp);], [int gettimeofday();], cl_cv_proto_gettimeofday_dots=no cl_cv_proto_gettimeofday_arg2="void *", cl_cv_proto_gettimeofday_dots=yes cl_cv_proto_gettimeofday_arg2="...")]) ], [extern int gettimeofday (struct timeval *, $cl_cv_proto_gettimeofday_arg2);]) if test $cl_cv_proto_gettimeofday_dots = yes; then AC_DEFINE(GETTIMEOFDAY_DOTS,,[declaration of gettimeofday() needs dots]) else AC_DEFINE_UNQUOTED(GETTIMEOFDAY_TZP_T,$cl_cv_proto_gettimeofday_arg2,[type of `tzp' in gettimeofday() declaration]) fi fi ]) cln-1.3.3/m4/param.m40000644000000000000000000000307111201634736011046 0ustar dnl -*- Autoconf -*- dnl Copyright (C) 1993-2005 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible, Marcus Daniels, Sam Steingold. AC_PREREQ(2.13) dnl CL_MACHINE([MESSAGE], [PROGRAM_TO_RUN], [CROSS_MACRO], [DESTINATION], [CACHE_VAR]) AC_DEFUN([CL_MACHINE], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_C_CHAR_UNSIGNED])dnl cl_machine_file_c=$2 if test -z "$[$5]"; then AC_CHECKING(for [$1]) if test $cross_compiling = no; then cl_machine_file_h=$4 cat > conftest.$ac_ext <> conftest.$ac_ext ORIGCC="$CC" if test $ac_cv_prog_gcc = yes; then # gcc -O (gcc version <= 2.3.2) crashes when compiling long long shifts for # target 80386. Strip "-O". CC=`echo "$CC " | sed -e 's/-O //g'` fi AC_TRY_EVAL(ac_link) CC="$ORIGCC" if test -s conftest${ac_exeext}; then echo "creating $cl_machine_file_h" ./conftest${ac_exeext} > conftest.h if cmp -s "$cl_machine_file_h" conftest.h 2>/dev/null; then # The file exists and we would not be changing it rm -f conftest.h else rm -f "$cl_machine_file_h" mv conftest.h "$cl_machine_file_h" fi [$5]=1 else echo "creation of $cl_machine_file_h failed" fi rm -f conftest* else echo "creating $cl_machine_file_h" $3([$4]) fi fi ]) cln-1.3.3/m4/intparam.m40000644000000000000000000003036712034113706011563 0ustar # intparam.m4 serial 1 dnl Copyright (C) 2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([CL_INTPARAM_CROSS], [ AC_REQUIRE([CL_LONGLONG]) AC_REQUIRE([CL_LONGDOUBLE]) AC_REQUIRE([AC_C_BIGENDIAN]) cl_machine_file_h=$1 { CL_INTPARAM_BITSIZE([signed char], [char_bitsize]) CL_INTPARAM_BITSIZE([short], [short_bitsize]) CL_INTPARAM_BITSIZE([int], [int_bitsize]) CL_INTPARAM_BITSIZE([long], [long_bitsize]) if test $cl_cv_c_longlong = yes; then CL_INTPARAM_BITSIZE([long long], [longlong_bitsize]) fi CL_INTPARAM_BITSIZE([unsigned char], [uchar_bitsize]) CL_INTPARAM_BITSIZE([unsigned short], [ushort_bitsize]) CL_INTPARAM_BITSIZE([unsigned int], [uint_bitsize]) CL_INTPARAM_BITSIZE([unsigned long], [ulong_bitsize]) if test $cl_cv_c_longlong = yes; then CL_INTPARAM_BITSIZE([unsigned long long], [ulonglong_bitsize]) fi if test -n "$char_bitsize"; then echo "/* Integers of type char have $char_bitsize bits. */" echo "#define char_bitsize $char_bitsize" echo else echo "#error \"Integers of type char have no binary representation!!\"" fi if test -n "$short_bitsize"; then echo "/* Integers of type short have $short_bitsize bits. */" echo "#define short_bitsize $short_bitsize" echo else echo "#error \"Integers of type short have no binary representation!!\"" fi if test -n "$int_bitsize"; then echo "/* Integers of type int have $int_bitsize bits. */" echo "#define int_bitsize $int_bitsize" echo else echo "#error \"Integers of type int have no binary representation!!\"" fi if test -n "$long_bitsize"; then echo "/* Integers of type long have $long_bitsize bits. */" echo "#define long_bitsize $long_bitsize" echo else echo "#error \"Integers of type long have no binary representation!!\"" fi if test $cl_cv_c_longlong = yes; then if test -n "$longlong_bitsize"; then echo "/* Integers of type long long have $longlong_bitsize bits. */" echo "#define long_long_bitsize $longlong_bitsize" echo else echo "#error \"Integers of type long long have no binary representation!!\"" fi fi if test -n "$uchar_bitsize"; then echo "/* Integers of type unsigned char have $uchar_bitsize bits. */" echo else echo "#error \"Integers of type unsigned char have no binary representation!!\"" fi if test -n "$ushort_bitsize"; then echo "/* Integers of type unsigned short have $ushort_bitsize bits. */" echo else echo "#error \"Integers of type unsigned short have no binary representation!!\"" fi if test -n "$uint_bitsize"; then echo "/* Integers of type unsigned int have $uint_bitsize bits. */" echo else echo "#error \"Integers of type unsigned int have no binary representation!!\"" fi if test -n "$ulong_bitsize"; then echo "/* Integers of type unsigned long have $ulong_bitsize bits. */" echo else echo "#error \"Integers of type unsigned long have no binary representation!!\"" fi if test $cl_cv_c_longlong = yes; then if test -n "$ulonglong_bitsize"; then echo "/* Integers of type unsigned long long have $ulonglong_bitsize bits. */" echo else echo "#error \"Integers of type unsigned long long have no binary representation!!\"" fi fi if test "$char_bitsize" != "$uchar_bitsize"; then echo "#error \"Integer types char and unsigned char have different sizes!!\"" fi if test "$short_bitsize" != "$ushort_bitsize"; then echo "#error \"Integer types short and unsigned short have different sizes!!\"" fi if test "$int_bitsize" != "$uint_bitsize"; then echo "#error \"Integer types int and unsigned int have different sizes!!\"" fi if test "$long_bitsize" != "$ulong_bitsize"; then echo "#error \"Integer types long and unsigned long have different sizes!!\"" fi if test $cl_cv_c_longlong = yes; then if test "$longlong_bitsize" != "$ulonglong_bitsize"; then echo "#error \"Integer types long long and unsigned long long have different sizes!!\"" fi fi AC_TRY_COMPILE([], [typedef int verify[2*(sizeof(char*)<=sizeof (long))-1];], [], [echo "#error \"Type char * does not fit into a long!!\""]) _AC_COMPUTE_INT([sizeof (char *)], [pointer_size]) pointer_bitsize=`expr $pointer_size '*' $char_bitsize` echo "/* Pointers of type char * have $pointer_bitsize bits. */" echo "#define pointer_bitsize $pointer_bitsize" echo CL_INTPARAM_SIZEOF([char], [sizeof_char]) CL_INTPARAM_ALIGNOF([char], [alignment_char]) echo "/* Type char has sizeof = $sizeof_char and alignment = $alignment_char. */" echo "#define sizeof_char $sizeof_char" echo "#define alignment_char $alignment_char" echo CL_INTPARAM_SIZEOF([unsigned char], [sizeof_uchar]) CL_INTPARAM_ALIGNOF([unsigned char], [alignment_uchar]) echo "/* Type unsigned char has sizeof = $sizeof_uchar and alignment = $alignment_uchar. */" echo CL_INTPARAM_SIZEOF([short], [sizeof_short]) CL_INTPARAM_ALIGNOF([short], [alignment_short]) echo "/* Type short has sizeof = $sizeof_short and alignment = $alignment_short. */" echo "#define sizeof_short $sizeof_short" echo "#define alignment_short $alignment_short" echo CL_INTPARAM_SIZEOF([unsigned short], [sizeof_ushort]) CL_INTPARAM_ALIGNOF([unsigned short], [alignment_ushort]) echo "/* Type unsigned short has sizeof = $sizeof_ushort and alignment = $alignment_ushort. */" echo CL_INTPARAM_SIZEOF([int], [sizeof_int]) CL_INTPARAM_ALIGNOF([int], [alignment_int]) echo "/* Type int has sizeof = $sizeof_int and alignment = $alignment_int. */" echo "#define sizeof_int $sizeof_int" echo "#define alignment_int $alignment_int" echo CL_INTPARAM_SIZEOF([unsigned int], [sizeof_uint]) CL_INTPARAM_ALIGNOF([unsigned int], [alignment_uint]) echo "/* Type unsigned int has sizeof = $sizeof_uint and alignment = $alignment_uint. */" echo CL_INTPARAM_SIZEOF([long], [sizeof_long]) CL_INTPARAM_ALIGNOF([long], [alignment_long]) echo "/* Type long has sizeof = $sizeof_long and alignment = $alignment_long. */" echo "#define sizeof_long $sizeof_long" echo "#define alignment_long $alignment_long" echo CL_INTPARAM_SIZEOF([unsigned long], [sizeof_ulong]) CL_INTPARAM_ALIGNOF([unsigned long], [alignment_ulong]) echo "/* Type unsigned long has sizeof = $sizeof_ulong and alignment = $alignment_ulong. */" echo if test $cl_cv_c_longlong = yes; then CL_INTPARAM_SIZEOF([long long], [sizeof_longlong]) CL_INTPARAM_ALIGNOF([long long], [alignment_longlong]) echo "/* Type long long has sizeof = $sizeof_longlong and alignment = $alignment_longlong. */" echo "#define sizeof_long_long $sizeof_longlong" echo "#define alignment_long_long $alignment_longlong" echo CL_INTPARAM_SIZEOF([unsigned long long], [sizeof_ulonglong]) CL_INTPARAM_ALIGNOF([unsigned long long], [alignment_ulonglong]) echo "/* Type unsigned long long has sizeof = $sizeof_ulonglong and alignment = $alignment_ulonglong. */" echo fi CL_INTPARAM_SIZEOF([float], [sizeof_float]) CL_INTPARAM_ALIGNOF([float], [alignment_float]) echo "/* Type float has sizeof = $sizeof_float and alignment = $alignment_float. */" echo "#define sizeof_float $sizeof_float" echo "#define alignment_float $alignment_float" echo CL_INTPARAM_SIZEOF([double], [sizeof_double]) CL_INTPARAM_ALIGNOF([double], [alignment_double]) echo "/* Type double has sizeof = $sizeof_double and alignment = $alignment_double. */" echo "#define sizeof_double $sizeof_double" echo "#define alignment_double $alignment_double" echo if test $cl_cv_c_longdouble = yes; then CL_INTPARAM_SIZEOF([long double], [sizeof_longdouble]) CL_INTPARAM_ALIGNOF([long double], [alignment_longdouble]) echo "/* Type long double has sizeof = $sizeof_longdouble and alignment = $alignment_longdouble. */" echo "#define sizeof_long_double $sizeof_longdouble" echo "#define alignment_long_double $alignment_longdouble" echo fi CL_INTPARAM_SIZEOF([char *], [sizeof_char_ptr]) CL_INTPARAM_ALIGNOF([char *], [alignment_char_ptr]) echo "/* Type char * has sizeof = $sizeof_char_ptr and alignment = $alignment_char_ptr. */" echo CL_INTPARAM_SIZEOF([long *], [sizeof_long_ptr]) CL_INTPARAM_ALIGNOF([long *], [alignment_long_ptr]) echo "/* Type long * has sizeof = $sizeof_long_ptr and alignment = $alignment_long_ptr. */" echo CL_INTPARAM_SIZEOF([void (*)(void)], [sizeof_function_ptr]) CL_INTPARAM_ALIGNOF([void (*)(void)], [alignment_function_ptr]) echo "/* Type function * has sizeof = $sizeof_function_ptr and alignment = $alignment_function_ptr. */" echo case $ac_cv_c_bigendian in yes) echo "/* Type unsigned short is stored BIG-ENDIAN in memory (i.e. like mc68000 or sparc). */" echo "#define short_big_endian" echo "/* Type unsigned int is stored BIG-ENDIAN in memory (i.e. like mc68000 or sparc). */" echo "#define int_big_endian" echo "/* Type unsigned long is stored BIG-ENDIAN in memory (i.e. like mc68000 or sparc). */" echo "#define long_big_endian" if test $cl_cv_c_longlong = yes; then echo "/* Type unsigned long long is stored BIG-ENDIAN in memory (i.e. like mc68000 or sparc). */" echo "#define long_long_big_endian" fi ;; no) echo "/* Type unsigned short is stored LITTLE-ENDIAN in memory (i.e. like Z80 or VAX). */" echo "#define short_little_endian" echo "/* Type unsigned int is stored LITTLE-ENDIAN in memory (i.e. like Z80 or VAX). */" echo "#define int_little_endian" echo "/* Type unsigned long is stored LITTLE-ENDIAN in memory (i.e. like Z80 or VAX). */" echo "#define long_little_endian" if test $cl_cv_c_longlong = yes; then echo "/* Type unsigned long long is stored LITTLE-ENDIAN in memory (i.e. like Z80 or VAX). */" echo "#define long_long_little_endian" fi ;; *) echo "#error \"Type short is stored in memory in an obscure manner!!\"" echo "#error \"Type int is stored in memory in an obscure manner!!\"" echo "#error \"Type long is stored in memory in an obscure manner!!\"" if test $cl_cv_c_longlong = yes; then echo "#error \"Type long long is stored in memory in an obscure manner!!\"" fi ;; esac echo case $host_cpu in hppa) echo "/* Stack grows up. */" echo "#define stack_grows_up" ;; *) echo "/* Stack grows down. */" echo "#define stack_grows_down" ;; esac } > "$cl_machine_file_h" ]) dnl CL_INTPARAM_BITSIZE(type, variable) dnl puts into variable the determined bitsize of the type. AC_DEFUN([CL_INTPARAM_BITSIZE], [ n=1; x="($1)2" while true; do AC_TRY_COMPILE([], [typedef int verify[2*(($1)($x) == 0) - 1];], [$2=$n; break;], [if test $n = 1000; then $2=; break; fi;]) n=`expr $n + 1`; x="$x * ($1)2" done ]) dnl CL_INTPARAM_SIZEOF(type, variable) dnl puts into variable the determined size of the type. AC_DEFUN([CL_INTPARAM_SIZEOF], [ _AC_COMPUTE_INT([sizeof($1)], [$2]) ]) dnl CL_INTPARAM_ALIGNOF(type, variable) dnl puts into variable the determined alignment of the type. AC_DEFUN([CL_INTPARAM_ALIGNOF], [ dnl Simplify the guessing by assuming that the alignment is a power of 2. n=1 while true; do AC_TRY_COMPILE([ #ifdef __cplusplus # ifdef __GNUC__ # define alignof(type) __alignof__ (type) # else template struct alignof_helper { char slot1; type slot2; }; # define alignof(type) offsetof (alignof_helper, slot2) # endif #else # define alignof(type) offsetof (struct { char slot1; type slot2; }, slot2) #endif ], [typedef int verify[2*(alignof($1) == $n) - 1];], [$2=$n; break;] [if test $n = 0; then $2=; break; fi]) n=`expr $n '*' 2` done ]) cln-1.3.3/m4/lib-prefix.m40000644000000000000000000001503611201634736012013 0ustar # lib-prefix.m4 serial 5 (gettext-0.15) dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing dnl the basename of the libdir, either "lib" or "lib64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. The current dnl practice is that on a system supporting 32-bit and 64-bit instruction dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit dnl libraries go under $prefix/lib. We determine the compiler's default dnl mode by looking at the compiler's library search path. If at least dnl of its elements ends in /lib64 or points to a directory whose absolute dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the dnl default, namely "lib". acl_libdirstem=lib searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ]) cln-1.3.3/m4/as-underscore.m40000644000000000000000000000231011201634736012513 0ustar dnl -*- Autoconf -*- dnl Copyright (C) 1993-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible, Marcus Daniels, Sam Steingold. AC_PREREQ(2.57) AC_DEFUN([CL_AS_UNDERSCORE], [AC_BEFORE([$0], [CL_GLOBAL_CONSTRUCTORS]) m4_pattern_allow([^AS_UNDERSCORE$]) AC_CACHE_CHECK(for underscore in external names, cl_cv_prog_as_underscore, [ cat > conftest.c </dev/null 2>&1 if grep _foo conftest.s >/dev/null ; then cl_cv_prog_as_underscore=yes else cl_cv_prog_as_underscore=no fi rm -f conftest* ]) if test $cl_cv_prog_as_underscore = yes; then AS_UNDERSCORE=true AC_DEFINE(ASM_UNDERSCORE,,[symbols are prefixed by an underscore in assembly language]) else AS_UNDERSCORE=false fi AC_SUBST(AS_UNDERSCORE)dnl ]) cln-1.3.3/m4/ltoptions.m40000644000000000000000000003007312172603761012005 0ustar # Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # 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. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) cln-1.3.3/m4/times.m40000644000000000000000000000330511201634736011067 0ustar dnl -*- Autoconf -*- dnl Copyright (C) 1993-2006 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible, Marcus Daniels, Sam Steingold. AC_PREREQ(2.57) AC_DEFUN([CL_TIMES_CLOCK], [AC_REQUIRE([CL_GETTIMEOFDAY])dnl if test $ac_cv_func_gettimeofday = no -a $ac_cv_func_ftime = no; then AC_CHECK_FUNC(times, , no_times=1)dnl if test -z "$no_times"; then AC_CACHE_CHECK(for times return value, cl_cv_func_times_return, [ AC_TRY_RUN([ #include /* needed for exit() */ #include #include /* needed for CLK_TCK */ #ifndef CLK_TCK #include /* needed for CLK_TCK on SYSV PTX */ #endif #include int main () { struct tms buffer; clock_t result1; clock_t result2; int ticks; result1 = times(&buffer); if ((result1 == (clock_t)0) || (result1 == (clock_t)(-1))) exit(1); sleep(1); result2 = times(&buffer); if ((result2 == (clock_t)0) || (result2 == (clock_t)(-1))) exit(1); ticks = result2 - result1; exit(!((ticks >= CLK_TCK/2) && (ticks <= 3*CLK_TCK/2))); }], cl_cv_func_times_return=yes, cl_cv_func_times_return=no, dnl When cross-compiling, don't assume anything. cl_cv_func_times_return="guessing no") ]) case "$cl_cv_func_times_return" in *yes) AC_DEFINE(HAVE_TIMES_CLOCK,,[have the times() function and it returns the real time, but do not have the gettimeofday() or ftime() function]) ;; *no) ;; esac fi fi ]) cln-1.3.3/m4/proto.m40000644000000000000000000000255111201634736011113 0ustar dnl Copyright (C) 1993-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible, Marcus Daniels. AC_PREREQ(2.13) dnl CL_PROTO(IDENTIFIER, ACTION-IF-NOT-FOUND, FINAL-PROTOTYPE) AC_DEFUN([CL_PROTO], [AC_MSG_CHECKING([for $1 declaration]) AC_CACHE_VAL(cl_cv_proto_[$1], [$2 cl_cv_proto_$1="$3"]) cl_cv_proto_$1=`echo "[$]cl_cv_proto_$1" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([$]{ac_t:- }[$]cl_cv_proto_$1) ]) dnl CL_PROTO_RET(INCLUDES, ANSI-DECL, TRAD-DECL, CACHE-ID, TYPE-IF-OK, TYPE-IF-FAILS) AC_DEFUN([CL_PROTO_RET], [AC_TRY_COMPILE([$1] AC_LANG_EXTERN [#if defined(__STDC__) || defined(__cplusplus) $2 #else $3 #endif ], [], $4="$5", $4="$6") ]) dnl CL_PROTO_TRY(INCLUDES, ANSI-DECL, TRAD-DECL, ACTION-IF-OK, ACTION-IF-FAILS) AC_DEFUN([CL_PROTO_TRY], [AC_TRY_COMPILE([$1] AC_LANG_EXTERN [#if defined(__STDC__) || defined(__cplusplus) $2 #else $3 #endif ], [], [$4], [$5]) ]) dnl CL_PROTO_CONST(INCLUDES, ANSI-DECL, TRAD-DECL, CACHE-ID) AC_DEFUN([CL_PROTO_CONST], [CL_PROTO_TRY([$1], [$2], [$3], $4="", $4="const")] ) cln-1.3.3/m4/lib-link.m40000644000000000000000000006424411201634736011460 0ustar # lib-link.m4 serial 9 (gettext-0.16) dnl Copyright (C) 2001-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_PREREQ(2.50) dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes undefine([Name]) undefine([NAME]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and dnl the ability to compile and link the specified testcode. If found, it dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" LIBS="$LIBS $LIB[]NAME" AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) undefine([Name]) undefine([NAME]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, dnl hardcode_direct, hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ dnl Tell automake >= 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" libext="$acl_cv_libext" shlibext="$acl_cv_shlibext" hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_direct="$acl_cv_hardcode_direct" hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE(rpath, [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib$1-prefix], [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib --without-lib$1-prefix don't search for lib$1 in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" \ && { test -f "$additional_libdir/lib$name.$shlibext" \ || { test "$shlibext" = dll \ && test -f "$additional_libdir/lib$name.dll.a"; }; }; then found_dir="$additional_libdir" if test -f "$additional_libdir/lib$name.$shlibext"; then found_so="$additional_libdir/lib$name.$shlibext" else found_so="$additional_libdir/lib$name.dll.a" fi if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" \ && { test -f "$dir/lib$name.$shlibext" \ || { test "$shlibext" = dll \ && test -f "$dir/lib$name.dll.a"; }; }; then found_dir="$dir" if test -f "$dir/lib$name.$shlibext"; then found_so="$dir/lib$name.$shlibext" else found_so="$dir/lib$name.dll.a" fi if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) cln-1.3.3/m4/ltversion.m40000644000000000000000000000126212172603761011775 0ustar # ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # 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. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) cln-1.3.3/m4/alloca.m40000644000000000000000000000320511201634736011200 0ustar dnl -*- Autoconf -*- dnl Copyright (C) 1993-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible, Marcus Daniels, Sam Steingold. AC_PREREQ(2.57) AC_DEFUN([CL_ALLOCA], [# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! CL_LINK_CHECK(working alloca.h, cl_cv_header_alloca_h, [#include ], [char *p = (char *) alloca(2 * sizeof(int));], AC_DEFINE(HAVE_ALLOCA_H,,[have and it should be used (not Ultrix)])) decl="#ifdef __GNUC__ #define alloca __builtin_alloca #else #ifdef _MSC_VER #include #define alloca _alloca #else #ifdef HAVE_ALLOCA_H #include #else #ifdef _AIX #pragma alloca #else #ifndef alloca char *alloca (); #endif #endif #endif #endif #endif " CL_LINK_CHECK([alloca], cl_cv_func_alloca, $decl, [char *p = (char *) alloca(1);], , [alloca_missing=1])dnl if test -n "$alloca_missing"; then # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=alloca.${ac_objext} AC_DEFINE(NO_ALLOCA,,[need to link with an external alloca.o when using alloca()]) fi AC_SUBST(ALLOCA)dnl ]) cln-1.3.3/m4/longdouble.m40000644000000000000000000000226411201634736012103 0ustar dnl Copyright (C) 1993-2006 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible, Marcus Daniels, Paul Eggert. AC_PREREQ(2.13) AC_DEFUN([CL_LONGDOUBLE], [AC_CACHE_CHECK(for long double type, cl_cv_c_longdouble, [ AC_TRY_RUN([ #include int main() { long double x = 2.7182818284590452354L; x = x*x; exit (x==0.0L); } ], cl_cv_c_longdouble=yes, cl_cv_c_longdouble=no, [ dnl When cross-compiling, use the test from gnulib. AC_TRY_COMPILE([ /* The Stardent Vistra knows sizeof(long double), but does not support it. */ long double foo = 0.0; /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ int array [2*(sizeof(long double) >= sizeof(double)) - 1]; ], , cl_cv_c_longdouble=yes, cl_cv_c_longdouble=no)]) ]) if test $cl_cv_c_longdouble = yes; then AC_DEFINE(HAVE_LONGDOUBLE, ,[Define if compiler supports long double type]) fi ]) cln-1.3.3/m4/libtool.m40000644000000000000000000106000712172603761011417 0ustar # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # 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. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS cln-1.3.3/m4/longlong.m40000644000000000000000000000270211201634736011565 0ustar dnl -*- Autoconf -*- dnl Copyright (C) 1993-2006 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible, Marcus Daniels, Sam Steingold, Paul Eggert. AC_PREREQ(2.57) AC_DEFUN([CL_LONGLONG], [AC_CACHE_CHECK(for long long type, cl_cv_c_longlong, [ AC_TRY_RUN([ #include int main() { /* long longs don't work right with gcc-2.7.2 on m68k */ /* long longs don't work right with gcc-2.7.2 on rs6000: avcall/tests.c gets miscompiled. */ #if defined(__m68k__) || (defined(_IBMR2) || defined(__powerpc)) #if defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ <= 7) exit(1); #endif #endif { long x = 944938507; long y = 737962842; long z = 162359677; exit(!(((long long) x)*((long long) y)>>32 == z)); } }], cl_cv_c_longlong=yes, cl_cv_c_longlong=no, [ dnl When cross-compiling, use the test from gnulib. AC_TRY_LINK([long long ll = 1LL; int i = 63;], [long long llmax = (long long) -1; return ll << i | ll >> i | llmax / ll | llmax % ll;], cl_cv_c_longlong=yes, cl_cv_c_longlong=no)]) ]) if test $cl_cv_c_longlong = yes; then AC_DEFINE(HAVE_LONGLONG,,[compiler supports the `long long' type]) fi ]) cln-1.3.3/m4/floatparam.m40000644000000000000000000001217211201634736012076 0ustar # floatparam.m4 serial 1 dnl Copyright (C) 2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([CL_FLOATPARAM_CROSS], [ AC_REQUIRE([CL_LONGDOUBLE]) cl_machine_file_h=$1 { echo "/* Rounding modes, for use below */" echo "#define rounds_to_nearest 0 /* 0.5 ulp */" echo "#define rounds_to_zero 1 /* 1 ulp */" echo "#define rounds_to_infinity 2 /* 1 ulp */" echo "#define rounds_to_minus_infinity 3 /* 1 ulp */" echo for type in float double "`if test $cl_cv_c_longdouble = yes; then echo 'long double'; fi`"; do if test -n "$type"; then epsilon_bits=-1; y="($type)1.0" while true; do AC_TRY_COMPILE([], [typedef int verify[2*( (($type)(($type)1.0 + ($type)($y)) == ($type)1.0) || ($type)(($type)(($type)1.0 + ($type)($y)) - ($type)1.0) != ($type)($y) ) - 1];], [break;]) epsilon_bits=`expr $epsilon_bits + 1`; y="$y * ($type)0.5" done negepsilon_bits=-1; y="($type)-1.0" while true; do AC_TRY_COMPILE([], [typedef int verify[2*( (($type)(($type)1.0 + ($type)($y)) == ($type)1.0) || ($type)(($type)(($type)1.0 + ($type)($y)) - ($type)1.0) != ($type)($y) ) - 1];], [break;]) negepsilon_bits=`expr $negepsilon_bits + 1`; y="$y * ($type)0.5" done echo "/* Properties of type \`$type': */" echo "/* Largest n for which 1+2^(-n) is exactly represented is $epsilon_bits. */" echo "/* Largest n for which 1-2^(-n) is exactly represented is $negepsilon_bits. */" if test `expr $negepsilon_bits '<=' $epsilon_bits` = 1; then echo "#error \"No exponent jump at 1.0 for type $type!\"" else if test `expr $negepsilon_bits '>' $epsilon_bits + 1` = 1; then echo "/* Base for type '$type' is 2^"`expr $negepsilon_bits - $epsilon_bits` fi echo "#define "`echo $type | sed -e 's, ,_,g'`"_mant_bits "`expr $epsilon_bits + 1` fi x="($type)1.0" i=$epsilon_bits while test $i != 0; do x="$x * ($type)0.5" i=`expr $i - 1` done x="($type)($x)" y1="($type)(($type)1.0 + ($type)5.0*$x)" y2="($type)(($type)1.0 + ($type)6.0*$x)" ys1="($type)(($type)1.0 + ($type)5.4*$x)" ys2="($type)(($type)1.0 + ($type)5.6*$x)" z1="($type)(($type)-1.0 + ($type)(-5.0)*$x)" z2="($type)(($type)-1.0 + ($type)(-6.0)*$x)" zs1="($type)(($type)-1.0 + ($type)(-5.4)*$x)" zs2="($type)(($type)-1.0 + ($type)(-5.6)*$x)" rounds= if test -z "$rounds"; then AC_TRY_COMPILE([], [typedef int verify[2*( $ys1 == $y1 && $ys2 == $y2 && $zs1 == $z1 && $zs2 == $z2 ) - 1];], [rounds=rounds_to_nearest]) fi if test -z "$rounds"; then AC_TRY_COMPILE([], [typedef int verify[2*( $ys1 == $y1 && $ys2 == $y1 && $zs1 == $z1 && $zs2 == $z1 ) - 1];], [rounds=rounds_to_zero]) fi if test -z "$rounds"; then AC_TRY_COMPILE([], [typedef int verify[2*( $ys1 == $y2 && $ys2 == $y2 && $zs1 == $z1 && $zs2 == $z1 ) - 1];], [rounds=rounds_to_infinity]) fi if test -z "$rounds"; then AC_TRY_COMPILE([], [typedef int verify[2*( $ys1 == $y1 && $ys2 == $y1 && $zs1 == $z2 && $zs2 == $z2 ) - 1];], [rounds=rounds_to_minus_infinity]) fi if test -n "$rounds"; then echo "#define "`echo $type | sed -e 's, ,_,g'`"_rounds $rounds" else echo "#error \"Unknown rounding mode for type $type!\"" fi echo fi done dnl Words-in-a-double endianness test. Note that, assuming IEEE 754 format, dnl 2.5479915693083957 = { 0x40 0x04 0x62 0x49 0x67 0x65 0x4E 0x64 } ..bIgeNd dnl 1.4396527506122064e164 = { 0x62 0x04 0x00 0x00 0x4E 0x65 0x67 0x49 } b...NegI dnl 2.5495230282078065 = { 0x40 0x04 0x65 0x6C 0x54 0x54 0x69 0x4C } ..elTTiL dnl 1.4139248369879473e214 = { 0x6C 0x65 0x00 0x00 0x4C 0x69 0x54 0x54 } le..LiTT double_wordorder_bigendian_p= AC_TRY_COMPILE([double a[9] = { 0, 2.5479915693083957, 0, 1.4396527506122064e164, 0, 2.5495230282078065, 0, 1.4139248369879473e214, 0 };], [], [ if grep LiTTle conftest.$ac_objext >/dev/null ; then double_wordorder_bigendian_p=0 else if grep bIgeN conftest.$ac_objext >/dev/null ; then double_wordorder_bigendian_p=1 fi fi]) if test -n "$double_wordorder_bigendian_p"; then echo "#define double_wordorder_bigendian_p $double_wordorder_bigendian_p" else echo "/* Dazed and confused! Better not define anything. */" fi echo } > "$cl_machine_file_h" ]) cln-1.3.3/m4/rusage.m40000644000000000000000000000555711201634736011247 0ustar dnl -*- Autoconf -*- dnl Copyright (C) 1993-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible, Marcus Daniels, Sam Steingold, Peter Burwood, Sam Steingold. AC_PREREQ(2.57) AC_DEFUN([CL_RUSAGE], [AC_CHECK_HEADERS(sys/resource.h sys/times.h)dnl if test $ac_cv_header_sys_resource_h = yes; then dnl HAVE_SYS_RESOURCE_H defined CL_LINK_CHECK([getrusage], cl_cv_func_getrusage, [#include /* NetBSD 1.0 needs this */ #include #include ], [struct rusage x; int y = RUSAGE_SELF; getrusage(y,&x); x.ru_utime.tv_sec;])dnl if test $cl_cv_func_getrusage = yes; then CL_PROTO([getrusage], [ CL_PROTO_TRY([ #include #ifdef HAVE_UNISTD_H #include #endif #include /* NetBSD 1.0 needs this */ #include #include ], [int getrusage (int who, struct rusage * rusage);], [int getrusage();], [cl_cv_proto_getrusage_arg1="int"], [cl_cv_proto_getrusage_arg1="enum __rusage_who"]) ], [extern int getrusage ($cl_cv_proto_getrusage_arg1, struct rusage *);])dnl AC_CACHE_CHECK(whether getrusage works, cl_cv_func_getrusage_works, [ AC_TRY_RUN([ #include #include /* NetBSD 1.0 needs this */ #include #include /* for time(2) */ #include int main () { struct rusage used, prev; time_t end = time(NULL)+2; int count = 0; if ((count = getrusage(RUSAGE_SELF, &prev))) { /* getrusage is defined but does not do anything. */ /*fprintf(stderr,"getrusage failed: return=%d\n",count);*/ return 1; } while (time(NULL) < end) { count++; getrusage(RUSAGE_SELF, &used); if ((used.ru_utime.tv_usec != prev.ru_utime.tv_usec) || (used.ru_utime.tv_sec != prev.ru_utime.tv_sec) || (used.ru_stime.tv_usec != prev.ru_stime.tv_usec) || (used.ru_stime.tv_sec != prev.ru_stime.tv_sec)) { /*fprintf(stderr,"success after %d runs\n",count);*/ return 0; } } /* getrusage is defined but does not work. */ /*fprintf(stderr,"failure after %d runs\n",count);*/ return 1; }], cl_cv_func_getrusage_works=yes, cl_cv_func_getrusage_works=no, dnl When cross-compiling, don't assume anything. cl_cv_func_getrusage_works="guessing no")]) fi if test "$cl_cv_func_getrusage_works" = yes; then AC_DEFINE(HAVE_GETRUSAGE,,[have , the getrusage() function, the struct rusage type, and defines RUSAGE_SELF]) AC_DEFINE_UNQUOTED(RUSAGE_WHO_T,$cl_cv_proto_getrusage_arg1,[type of `who' in getrusage() declaration]) fi fi ]) cln-1.3.3/m4/perror.m40000644000000000000000000000176611201634736011270 0ustar dnl -*- Autoconf -*- dnl Copyright (C) 1993-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible, Marcus Daniels, Sam Steingold. AC_PREREQ(2.57) AC_DEFUN([CL_PERROR], [AC_MSG_CHECKING(for perror declaration) AC_CACHE_VAL(cl_cv_proto_perror, [ AC_TRY_COMPILE([ /* Some systems declare perror() in , some in , some don't declare it at all. */ #include #include ]AC_LANG_EXTERN[double perror ();], [], cl_cv_proto_perror=no, cl_cv_proto_perror=yes) ]) AC_MSG_RESULT([$cl_cv_proto_perror]) if test $cl_cv_proto_perror = yes; then AC_DEFINE(HAVE_PERROR_DECL,,[ or contains a declaration for perror()]) fi ]) cln-1.3.3/m4/lt~obsolete.m40000644000000000000000000001375612172603761012335 0ustar # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # 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. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) cln-1.3.3/m4/general.m40000644000000000000000000001743411201634736011373 0ustar dnl Copyright (C) 1993-2008 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible, Marcus Daniels, Sam Steingold. AC_PREREQ(2.13) dnl without AC_MSG_...: with AC_MSG_... and caching: dnl AC_TRY_CPP CL_CPP_CHECK dnl AC_TRY_COMPILE CL_COMPILE_CHECK dnl AC_TRY_LINK CL_LINK_CHECK dnl AC_TRY_RUN CL_RUN_CHECK - would require cross-compiling support dnl Usage: dnl AC_TRY_CPP(INCLUDES, dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) dnl CL_CPP_CHECK(ECHO-TEXT, CACHE-ID, dnl INCLUDES, dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) dnl AC_TRY_xxx(INCLUDES, FUNCTION-BODY, dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) dnl CL_xxx_CHECK(ECHO-TEXT, CACHE-ID, dnl INCLUDES, FUNCTION-BODY, dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) AC_DEFUN([CL_CPP_CHECK], [AC_MSG_CHECKING(for $1) AC_CACHE_VAL($2,[ AC_TRY_CPP([$3], $2=yes, $2=no) ]) AC_MSG_RESULT([$]$2) if test [$]$2 = yes; then ifelse([$4], , :, [$4]) ifelse([$5], , , [else $5 ])dnl fi ]) AC_DEFUN([CL_COMPILE_CHECK], [AC_MSG_CHECKING(for $1) AC_CACHE_VAL($2,[ AC_TRY_COMPILE([$3],[$4], $2=yes, $2=no) ]) AC_MSG_RESULT([$]$2) if test [$]$2 = yes; then ifelse([$5], , :, [$5]) ifelse([$6], , , [else $6 ])dnl fi ]) AC_DEFUN([CL_LINK_CHECK], [AC_MSG_CHECKING(for $1) AC_CACHE_VAL($2,[ AC_TRY_LINK([$3],[$4], $2=yes, $2=no) ]) AC_MSG_RESULT([$]$2) if test [$]$2 = yes; then ifelse([$5], , :, [$5]) ifelse([$6], , , [else $6 ])dnl fi ]) dnl CL_SILENT(ACTION) dnl performs ACTION, with AC_MSG_CHECKING and AC_MSG_RESULT being defined away. AC_DEFUN([CL_SILENT], [pushdef([AC_MSG_CHECKING],[:])dnl pushdef([AC_CHECKING],[:])dnl pushdef([AC_MSG_RESULT],[:])dnl $1[]dnl popdef([AC_MSG_RESULT])dnl popdef([AC_CHECKING])dnl popdef([AC_MSG_CHECKING])dnl ]) dnl Expands to the "extern ..." prefix used for system declarations. dnl AC_LANG_EXTERN() AC_DEFUN([AC_LANG_EXTERN], [extern #ifdef __cplusplus "C" #endif ]) AC_DEFUN([CL_CC_WORKS], [AC_CACHE_CHECK(whether CC works at all, cl_cv_prog_cc_works, [ AC_LANG_SAVE() AC_LANG_C() AC_TRY_RUN([ #include int main() { exit(0); } ], cl_cv_prog_cc_works=yes, cl_cv_prog_cc_works=no, AC_TRY_LINK([], [], cl_cv_prog_cc_works=yes, cl_cv_prog_cc_works=no)) AC_LANG_RESTORE() ]) case "$cl_cv_prog_cc_works" in *no) echo "Installation or configuration problem: C compiler cannot create executables."; exit 1;; *yes) ;; esac ]) AC_DEFUN([CL_CONFIG_SUBDIRS], [dnl No AC_CONFIG_AUX_DIR_DEFAULT, so we don't need install.sh. AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT]) AC_CONFIG_SUBDIRS([$1])dnl ]) AC_DEFUN([CL_CANONICAL_HOST], [AC_REQUIRE([AC_PROG_CC]) dnl Actually: AC_REQUIRE([CL_CC_WORKS]) dnl Set ac_aux_dir before the cache check, because AM_PROG_LIBTOOL needs it. ac_aux_dir=${srcdir}/$1 dnl A substitute for AC_CONFIG_AUX_DIR_DEFAULT, so we don't need install.sh. ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" dnl We have defined $ac_aux_dir. AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl dnl In autoconf-2.52, a single AC_CANONICAL_HOST has the effect of inserting dnl the code of AC_CANONICAL_BUILD *before* CL_CANONICAL_HOST, i.e. before dnl ac_aux_dir has been set. To work around this, we list AC_CANONICAL_BUILD dnl explicitly. AC_CANONICAL_BUILD AC_CANONICAL_HOST ]) AC_DEFUN([CL_CANONICAL_HOST_CPU], [AC_REQUIRE([CL_CANONICAL_HOST])AC_REQUIRE([AC_PROG_CC]) case "$host_cpu" in changequote(,)dnl i[4567]86 ) host_cpu=i386 ;; alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] ) host_cpu=alpha ;; hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) host_cpu=hppa ;; powerpc ) host_cpu=rs6000 ;; c1 | c2 | c32 | c34 | c38 | c4 ) host_cpu=convex ;; arm* ) host_cpu=arm ;; changequote([,])dnl mips ) AC_CACHE_CHECK([for 64-bit MIPS], cl_cv_host_mips64, [ AC_EGREP_CPP(yes, [#if defined(_MIPS_SZLONG) #if (_MIPS_SZLONG == 64) /* We should also check for (_MIPS_SZPTR == 64), but gcc keeps this at 32. */ yes #endif #endif ], cl_cv_host_mips64=yes, cl_cv_host_mips64=no) ]) if test $cl_cv_host_mips64 = yes; then host_cpu=mips64 fi ;; dnl UltraSPARCs running Linux have `uname -m` = "sparc64", but the C compiler dnl still generates 32-bit code. sparc | sparc64 ) AC_CACHE_CHECK([for 64-bit SPARC], cl_cv_host_sparc64, [ AC_EGREP_CPP(yes, [#if defined(__sparcv9) || defined(__arch64__) yes #endif ], cl_cv_host_sparc64=yes, cl_cv_host_sparc64=no) ]) if test $cl_cv_host_sparc64 = yes; then host_cpu=sparc64 else host_cpu=sparc fi ;; dnl MacOS X 10.5 machines on x86_64 platforms have 'uname -m' = "i386" even dnl if 64-bit programs are fully supported. dnl AMD64 running Linux have 'uname -m' = "x86_64" even if userland is purely dnl 32-bit. i386 | x86_64 ) AC_CACHE_CHECK([for 64-bit userland on x86-64], cl_cv_host_x86_64, [ AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[#if !defined __x86_64__ # error __x86_64__ not defined #endif ]]) ], [cl_cv_host_x86_64=yes], [cl_cv_host_x86_64=no]) ]) if test $cl_cv_host_x86_64 = yes; then host_cpu=x86_64 else host_cpu=i386 fi ;; dnl PowerPC64 is another case where 'uname -m' and userland may disagree. powerpc64 ) AC_CACHE_CHECK([for 64-bit userland on PowerPC64], cl_cv_host_powerpc64, [ AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[#if !defined __powerpc64__ # error __powerpc64__ not defined #endif ]]) ], [cl_cv_host_powerpc64=yes], [cl_cv_host_powerpc64=no]) ]) if test $cl_cv_host_powerpc64 = yes; then host_cpu=powerpc64 else host_cpu=rs6000 fi ;; esac dnl was AC_DEFINE_UNQUOTED(__${host_cpu}__) but KAI C++ 3.2d doesn't like this cat >> confdefs.h <= 3 yes #endif ], cl_cv_host_mipsn32=yes, cl_cv_host_mipsn32=no) ]) if test $cl_cv_host_mipsn32 = yes; then host_cpu=mipsn32 fi fi ;; dnl UltraSPARCs running Linux have `uname -m` = "sparc64", but the C compiler dnl still generates 32-bit code. sparc | sparc64 ) AC_CACHE_CHECK([for 64-bit SPARC], cl_cv_host_sparc64, [ AC_EGREP_CPP(yes, [#if defined(__sparcv9) || defined(__arch64__) yes #endif ], cl_cv_host_sparc64=yes, cl_cv_host_sparc64=no) ]) if test $cl_cv_host_sparc64 = yes; then host_cpu=sparc64 else host_cpu=sparc fi ;; esac dnl was AC_DEFINE_UNQUOTED(__${host_cpu}__) but KAI C++ 3.2d doesn't like this cat >> confdefs.h <&1 conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]* | [A-Za-z]:[\\/]*)] [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(acl_cv_path_LD, [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) cln-1.3.3/m4/gmp.m40000644000000000000000000001162312107526261010532 0ustar dnl -*- Autoconf -*- dnl Copyright (C) 1993-2008 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Richard B. Kreckel. AC_PREREQ(2.13) dnl Is the gmp header file new enough? (should be implemented with an argument) AC_DEFUN([CL_GMP_H_VERSION], [AC_CACHE_CHECK([for recent enough gmp.h], cl_cv_new_gmp_h, [ AC_TRY_CPP([#include #if !defined(__GNU_MP_VERSION) || (__GNU_MP_VERSION < 3) #error "ancient gmp.h" #endif], cl_cv_new_gmp_h="yes", cl_cv_new_gmp_h="no") ])])dnl dnl Does libgmp provide some functionality introduced in version 3.0? AC_DEFUN([CL_GMP_CHECK], [AC_CACHE_CHECK([for working libgmp], cl_cv_new_libgmp, [ SAVELIBS=$LIBS LIBS="$LIBS -lgmp" AC_TRY_LINK([#include ],[mpn_divexact_by3(0,0,0)], cl_cv_new_libgmp="yes", cl_cv_new_libgmp="no") LIBS=$SAVELIBS]) if test "$cl_cv_new_libgmp" = yes; then LIBS="$LIBS -lgmp" fi ]) dnl What is sizeof(mp_limb_t)? (It has to match sizeof(uintD) later.) AC_DEFUN([CL_GMP_SET_UINTD], [AC_CACHE_CHECK([how large gmp demands uintD to be], cl_cv_gmp_set_uintd, [ dnl Note: we don't run any of compiled programs here, so this method dnl both works for native and cross compilation cl_gmp_demands="UNKNOWN" cl_gmp_has_nails="no" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include template struct Static_Assert; template<> struct Static_Assert { }; #if defined(__GMP_BITS_PER_MP_LIMB) Static_Assert<8*sizeof(mp_limb_t) == __GMP_BITS_PER_MP_LIMB> check; #endif]], [[]])], [], [cl_gmp_has_nails="yes"]) if test "x$cl_gmp_has_nails" = "xyes"; then AC_MSG_ERROR([nails in MP libms are unsupported.]) fi AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include template struct Static_Assert; template<> struct Static_Assert { }; Static_Assert<(sizeof(mp_limb_t) > sizeof(long))> check;]], [[]])], [cl_gmp_demands='GMP_DEMANDS_UINTD_LONG_LONG'], []) if test "x$cl_gmp_demands" = "xUNKNOWN"; then AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include template struct Static_Assert; template<> struct Static_Assert { }; Static_Assert check;]], [[]])], [cl_gmp_demands='GMP_DEMANDS_UINTD_LONG'], []) fi if test "x$cl_gmp_demands" = "xUNKNOWN"; then AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include template struct Static_Assert; template<> struct Static_Assert { }; Static_Assert check;]], [[]])], [cl_gmp_demands='GMP_DEMANDS_UINTD_INT'], []) fi if test "x$cl_gmp_demands" = "xUNKNOWN"; then AC_MSG_ERROR([Don't know which C-type has sizeof(mp_limb_t)]) else cl_cv_gmp_set_uintd="$cl_gmp_demands" fi ]) AC_DEFINE_UNQUOTED($cl_cv_gmp_set_uintd) ]) dnl Whether or not to use GMP. Sets CL_USE_GMP. dnl Also sets CPPFLAGS, LDFLAGS if --with-gmp=DIR was specified. AC_DEFUN([CL_LIBGMP], [AC_ARG_WITH(gmp, AS_HELP_STRING([--with-gmp@<:@=DIR@:>@], [use external low-level functions from GNU MP (installed in prefix DIR) @<:@default=yes@:>@.]),[ with_gmp="$withval" ], with_gmp="yes") case $with_gmp in yes) dnl --with-gmp CL_GMP_H_VERSION if test "$cl_cv_new_gmp_h" = yes; then CL_GMP_CHECK if test "$cl_cv_new_libgmp" = yes; then CL_GMP_SET_UINTD AC_DEFINE(CL_USE_GMP, 1, [Define if GNU MP library is available]) else AC_MSG_WARN([The GNU MP library is too old to be used.]) fi else AC_MSG_WARN([The header file is too old to be used.]) fi ;; no) dnl --without-gmp ;; *) dnl --with-gmp=DIR case $withval in [[\\/$]]* | ?:[[\\/]]* ) ;; *) AC_MSG_ERROR([expected an absolute directory name for --with-gmp: $withval]) ;; esac saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${withval}/include" saved_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L${withval}/lib" AC_LIB_LINKFLAGS_FROM_LIBS([GMP_RPATH_CFG], [$LDFLAGS]) LDFLAGS="$GMP_RPATH_CFG $LDFLAGS" AC_MSG_NOTICE([Using "\"$LDFLAGS\"" rpath to link with GMP]) CL_GMP_H_VERSION if test "$cl_cv_new_gmp_h" = yes; then CL_GMP_CHECK if test "$cl_cv_new_libgmp" = yes; then CL_GMP_SET_UINTD AC_DEFINE(CL_USE_GMP) else AC_MSG_WARN([The GNU MP library is too old to be used.]) CPPFLAGS="$saved_CPPFLAGS" LDFLAGS="$saved_LDFLAGS" fi else AC_MSG_WARN([The header file is too old to be used.]) CPPFLAGS="$saved_CPPFLAGS" LDFLAGS="$saved_LDFLAGS" fi ;; esac ]) cln-1.3.3/m4/ltsugar.m40000644000000000000000000001042412172603761011431 0ustar # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # 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. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) cln-1.3.3/include/0000755000000000000000000000000012173046175010611 5ustar cln-1.3.3/include/cln/0000755000000000000000000000000012227130071011352 5ustar cln-1.3.3/include/cln/SV_integer.h0000644000000000000000000000323411201634736013602 0ustar // Simple vectors of integers. #ifndef _CL_SV_INTEGER_H #define _CL_SV_INTEGER_H #include "cln/number.h" #include "cln/SV_rational.h" #include "cln/integer_class.h" #include "cln/io.h" namespace cln { // A vector of integers is just a normal vector of rational numbers. typedef cl_heap_SV cl_heap_SV_I; struct cl_SV_I : public cl_SV { public: // Constructors. cl_SV_I () : cl_SV ((cl_heap_SV_I*) (cl_heap_SV_number*) cl_null_SV_number) {}; cl_SV_I (const cl_SV_I&); explicit cl_SV_I (std::size_t len) : cl_SV ((cl_heap_SV_I*) cl_make_heap_SV_number(len)) {}; // Assignment operators. cl_SV_I& operator= (const cl_SV_I&); }; inline cl_SV_I::cl_SV_I (const cl_SV_I& x) : cl_SV (as_cl_private_thing(x)) {} CL_DEFINE_ASSIGNMENT_OPERATOR(cl_SV_I,cl_SV_I) // Copy a simple vector. inline const cl_SV_I copy (const cl_SV_I& vector) { return The(cl_SV_I) (copy((const cl_SV_RA&) vector)); } // Output. inline void fprint (std::ostream& stream, const cl_SV_I& x) { extern cl_print_flags default_print_flags; extern void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* fun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_SV_number& vector); extern void print_integer (std::ostream& stream, const cl_print_flags& flags, const cl_I& z); print_vector(stream, default_print_flags, (void (*) (std::ostream&, const cl_print_flags&, const cl_number&)) (void (*) (std::ostream&, const cl_print_flags&, const cl_I&)) &print_integer, x); } CL_DEFINE_PRINT_OPERATOR(cl_SV_I) } // namespace cln #endif /* _CL_SV_INTEGER_H */ cln-1.3.3/include/cln/float_class.h0000644000000000000000000000266211201634736014033 0ustar // Abstract class of floating-point numbers. #ifndef _CL_FLOAT_CLASS_H #define _CL_FLOAT_CLASS_H #include "cln/number.h" #include "cln/real_class.h" namespace cln { class cl_F : public cl_R { public: // Default constructor. cl_F (); // Copy constructor. cl_F (const cl_F&); // Converters. // Assignment operators. cl_F& operator= (const cl_F&); // Constructors and assignment operators from C numeric types. cl_F (const float); cl_F (const double); cl_F& operator= (const float); cl_F& operator= (const double); // Other constructors. cl_F (const char *); // Private constructor. cl_F (cl_private_thing); public: // Ability to place an object at a given address. void* operator new (size_t size) { return malloc_hook(size); } void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void operator delete (void* ptr) { free_hook(ptr); } private: // Friend declarations. They are for the compiler. Just ignore them. }; // Private constructors. inline cl_F::cl_F (cl_private_thing ptr) : cl_R (ptr) {} // The assignment operators: CL_DEFINE_ASSIGNMENT_OPERATOR(cl_F, cl_F) // The default constructors. inline cl_F::cl_F () : cl_R ((cl_private_thing) cl_combine(cl_SF_tag,0)) {} // The copy constructors. CL_DEFINE_COPY_CONSTRUCTOR2(cl_F,cl_R) // Constructors and assignment operators from C numeric types. CL_DEFINE_FLOAT_CONSTRUCTOR(cl_F) CL_DEFINE_DOUBLE_CONSTRUCTOR(cl_F) } // namespace cln #endif /* _CL_FLOAT_CLASS_H */ cln-1.3.3/include/cln/null_ring.h0000644000000000000000000000071011201634736013522 0ustar // Built-in null ring. #ifndef _CL_NULL_RING_H #define _CL_NULL_RING_H #include "cln/ring.h" namespace cln { class cl_null_ring : public cl_ring { public: cl_null_ring (); }; extern const cl_null_ring cl_0_ring; // math. {0} class cl_0_ring_init_helper { static int count; public: cl_0_ring_init_helper(); ~cl_0_ring_init_helper(); }; static cl_0_ring_init_helper cl_0_ring_init_helper_instance; } // namespace cln #endif /* _CL_NULL_RING_H */ cln-1.3.3/include/cln/dfloat.h0000644000000000000000000002466411201634736013020 0ustar // Public double float operations. #ifndef _CL_DFLOAT_H #define _CL_DFLOAT_H #include "cln/number.h" #include "cln/dfloat_class.h" #include "cln/integer_class.h" #include "cln/float.h" namespace cln { CL_DEFINE_AS_CONVERSION(cl_DF) // Liefert zu einem Double-Float x : (- x), ein DF. extern const cl_DF operator- (const cl_DF& x); // compare(x,y) vergleicht zwei Double-Floats x und y. // Ergebnis: 0 falls x=y, +1 falls x>y, -1 falls x= (const cl_DF& x, const cl_DF& y) { return compare(x,y)>=0; } inline bool operator> (const cl_DF& x, const cl_DF& y) { return compare(x,y)>0; } // minusp(x) == (< x 0) extern bool minusp (const cl_DF& x); // zerop(x) stellt fest, ob ein Double-Float x = 0.0 ist. extern bool zerop (const cl_DF& x); // plusp(x) == (> x 0) extern bool plusp (const cl_DF& x); // Liefert zu zwei Double-Float x und y : (+ x y), ein DF. extern const cl_DF operator+ (const cl_DF& x, const cl_DF& y); // The C++ compiler may hesitate to do these conversions of its own: inline const cl_DF operator+ (const cl_DF& x, const double y) { return x + cl_DF(y); } inline const cl_DF operator+ (const double x, const cl_DF& y) { return cl_DF(x) + y; } // Liefert zu zwei Double-Float x und y : (- x y), ein DF. extern const cl_DF operator- (const cl_DF& x, const cl_DF& y); // The C++ compiler may hesitate to do these conversions of its own: inline const cl_DF operator- (const cl_DF& x, const double y) { return x - cl_DF(y); } inline const cl_DF operator- (const double x, const cl_DF& y) { return cl_DF(x) - y; } // Liefert zu zwei Double-Float x und y : (* x y), ein DF. extern const cl_DF operator* (const cl_DF& x, const cl_DF& y); // The C++ compiler may hesitate to do these conversions of its own: inline const cl_DF operator* (const cl_DF& x, const double y) { return x * cl_DF(y); } inline const cl_DF operator* (const double x, const cl_DF& y) { return cl_DF(x) * y; } // Liefert zu einem Double-Float x : (* x x), ein DF. inline const cl_DF square (const cl_DF& x) { return x*x; } // Liefert zu zwei Double-Float x und y : (/ x y), ein DF. extern const cl_DF operator/ (const cl_DF& x, const cl_DF& y); // The C++ compiler may hesitate to do these conversions of its own: inline const cl_DF operator/ (const cl_DF& x, const double y) { return x / cl_DF(y); } inline const cl_DF operator/ (const double x, const cl_DF& y) { return cl_DF(x) / y; } // Liefert zu einem Double-Float x>=0 : (sqrt x), ein DF. extern const cl_DF sqrt (const cl_DF& x); // recip(x) liefert (/ x), wo x ein Double-Float ist. extern const cl_DF recip (const cl_DF& x); // abs(x) liefert (abs x), wo x ein Double-Float ist. extern const cl_DF abs (const cl_DF& x); // (1+ x), wo x ein Double-Float ist. inline const cl_DF plus1 (const cl_DF& x) { extern const cl_DF cl_I_to_DF (const cl_I&); return x + cl_I_to_DF(cl_I(1)); } // (1- x), wo x ein Double-Float ist. inline const cl_DF minus1 (const cl_DF& x) { extern const cl_DF cl_I_to_DF (const cl_I&); return x + cl_I_to_DF(cl_I(-1)); } // ffloor(x) liefert (ffloor x), wo x ein DF ist. extern const cl_DF ffloor (const cl_DF& x); // fceiling(x) liefert (fceiling x), wo x ein DF ist. extern const cl_DF fceiling (const cl_DF& x); // ftruncate(x) liefert (ftruncate x), wo x ein DF ist. extern const cl_DF ftruncate (const cl_DF& x); // fround(x) liefert (fround x), wo x ein DF ist. extern const cl_DF fround (const cl_DF& x); // Return type for frounding operators. // x / y --> (q,r) with x = y*q+r. struct cl_DF_fdiv_t { cl_DF quotient; cl_DF remainder; // Constructor. cl_DF_fdiv_t () {} cl_DF_fdiv_t (const cl_DF& q, const cl_DF& r) : quotient(q), remainder(r) {} }; // ffloor2(x) liefert (ffloor x), wo x ein DF ist. inline const cl_DF_fdiv_t ffloor2 (const cl_DF& x) { cl_DF q = ffloor(x); return cl_DF_fdiv_t(q,x-q); } // fceiling2(x) liefert (fceiling x), wo x ein DF ist. inline const cl_DF_fdiv_t fceiling2 (const cl_DF& x) { cl_DF q = fceiling(x); return cl_DF_fdiv_t(q,x-q); } // ftruncate2(x) liefert (ftruncate x), wo x ein DF ist. inline const cl_DF_fdiv_t ftruncate2 (const cl_DF& x) { cl_DF q = ftruncate(x); return cl_DF_fdiv_t(q,x-q); } // fround2(x) liefert (fround x), wo x ein DF ist. inline const cl_DF_fdiv_t fround2 (const cl_DF& x) { cl_DF q = fround(x); return cl_DF_fdiv_t(q,x-q); } // Return type for rounding operators. // x / y --> (q,r) with x = y*q+r. struct cl_DF_div_t { cl_I quotient; cl_DF remainder; // Constructor. cl_DF_div_t () {} cl_DF_div_t (const cl_I& q, const cl_DF& r) : quotient(q), remainder(r) {} }; // floor2(x) liefert (floor x), wo x ein DF ist. inline const cl_DF_div_t floor2 (const cl_DF& x) { extern const cl_I cl_DF_to_I (const cl_DF& x); cl_DF q = ffloor(x); return cl_DF_div_t(cl_DF_to_I(q),x-q); } inline const cl_I floor1 (const cl_DF& x) { extern const cl_I cl_DF_to_I (const cl_DF& x); return cl_DF_to_I(ffloor(x)); } // ceiling2(x) liefert (ceiling x), wo x ein DF ist. inline const cl_DF_div_t ceiling2 (const cl_DF& x) { extern const cl_I cl_DF_to_I (const cl_DF& x); cl_DF q = fceiling(x); return cl_DF_div_t(cl_DF_to_I(q),x-q); } inline const cl_I ceiling1 (const cl_DF& x) { extern const cl_I cl_DF_to_I (const cl_DF& x); return cl_DF_to_I(fceiling(x)); } // truncate2(x) liefert (truncate x), wo x ein DF ist. inline const cl_DF_div_t truncate2 (const cl_DF& x) { extern const cl_I cl_DF_to_I (const cl_DF& x); cl_DF q = ftruncate(x); return cl_DF_div_t(cl_DF_to_I(q),x-q); } inline const cl_I truncate1 (const cl_DF& x) { extern const cl_I cl_DF_to_I (const cl_DF& x); return cl_DF_to_I(ftruncate(x)); } // round2(x) liefert (round x), wo x ein DF ist. inline const cl_DF_div_t round2 (const cl_DF& x) { extern const cl_I cl_DF_to_I (const cl_DF& x); cl_DF q = fround(x); return cl_DF_div_t(cl_DF_to_I(q),x-q); } inline const cl_I round1 (const cl_DF& x) { extern const cl_I cl_DF_to_I (const cl_DF& x); return cl_DF_to_I(fround(x)); } // floor2(x,y) liefert (floor x y). extern const cl_DF_div_t floor2 (const cl_DF& x, const cl_DF& y); inline const cl_I floor1 (const cl_DF& x, const cl_DF& y) { return floor1(x/y); } // ceiling2(x,y) liefert (ceiling x y). extern const cl_DF_div_t ceiling2 (const cl_DF& x, const cl_DF& y); inline const cl_I ceiling1 (const cl_DF& x, const cl_DF& y) { return ceiling1(x/y); } // truncate2(x,y) liefert (truncate x y). extern const cl_DF_div_t truncate2 (const cl_DF& x, const cl_DF& y); inline const cl_I truncate1 (const cl_DF& x, const cl_DF& y) { return truncate1(x/y); } // round2(x,y) liefert (round x y). extern const cl_DF_div_t round2 (const cl_DF& x, const cl_DF& y); inline const cl_I round1 (const cl_DF& x, const cl_DF& y) { return round1(x/y); } // Return type for decode_float: struct decoded_dfloat { cl_DF mantissa; cl_I exponent; cl_DF sign; // Constructor. decoded_dfloat () {} decoded_dfloat (const cl_DF& m, const cl_I& e, const cl_DF& s) : mantissa(m), exponent(e), sign(s) {} }; // decode_float(x) liefert zu einem Float x: (decode-float x). // x = 0.0 liefert (0.0, 0, 1.0). // x = (-1)^s * 2^e * m liefert ((-1)^0 * 2^0 * m, e als Integer, (-1)^s). extern const decoded_dfloat decode_float (const cl_DF& x); // float_exponent(x) liefert zu einem Float x: // den Exponenten von (decode-float x). // x = 0.0 liefert 0. // x = (-1)^s * 2^e * m liefert e. extern sintE float_exponent (const cl_DF& x); // float_radix(x) liefert (float-radix x), wo x ein Float ist. inline sintL float_radix (const cl_DF& x) { (void)x; // unused x return 2; } // float_sign(x) liefert (float-sign x), wo x ein Float ist. extern const cl_DF float_sign (const cl_DF& x); // float_digits(x) liefert (float-digits x), wo x ein Float ist. // < ergebnis: ein uintC >0 extern uintC float_digits (const cl_DF& x); // float_precision(x) liefert (float-precision x), wo x ein Float ist. // < ergebnis: ein uintC >=0 extern uintC float_precision (const cl_DF& x); // integer_decode_float(x) liefert zu einem Float x: (integer-decode-float x). // x = 0.0 liefert (0, 0, 1). // x = (-1)^s * 2^e * m bei Float-Precision p liefert // (Mantisse 2^p * m als Integer, e-p als Integer, (-1)^s als Fixnum). extern const cl_idecoded_float integer_decode_float (const cl_DF& x); // scale_float(x,delta) liefert x*2^delta, wo x ein DF ist. extern const cl_DF scale_float (const cl_DF& x, sintC delta); extern const cl_DF scale_float (const cl_DF& x, const cl_I& delta); // max(x,y) liefert (max x y), wo x und y Floats sind. extern const cl_DF max (const cl_DF& x, const cl_DF& y); // min(x,y) liefert (min x y), wo x und y Floats sind. extern const cl_DF min (const cl_DF& x, const cl_DF& y); // signum(x) liefert (signum x), wo x ein Float ist. extern const cl_DF signum (const cl_DF& x); // Konversion zu einem C "float". extern float float_approx (const cl_DF& x); // Konversion zu einem C "double". extern double double_approx (const cl_DF& x); // This could be optimized to use in-place operations. inline cl_DF& operator+= (cl_DF& x, const cl_DF& y) { return x = x + y; } inline cl_DF& operator+= (cl_DF& x, const double y) { return x = x + y; } inline cl_DF& operator++ /* prefix */ (cl_DF& x) { return x = plus1(x); } inline void operator++ /* postfix */ (cl_DF& x, int dummy) { (void)dummy; x = plus1(x); } inline cl_DF& operator-= (cl_DF& x, const cl_DF& y) { return x = x - y; } inline cl_DF& operator-= (cl_DF& x, const double y) { return x = x - y; } inline cl_DF& operator-- /* prefix */ (cl_DF& x) { return x = minus1(x); } inline void operator-- /* postfix */ (cl_DF& x, int dummy) { (void)dummy; x = minus1(x); } inline cl_DF& operator*= (cl_DF& x, const cl_DF& y) { return x = x * y; } inline cl_DF& operator*= (cl_DF& x, const double y) { return x = x * y; } inline cl_DF& operator/= (cl_DF& x, const cl_DF& y) { return x = x / y; } inline cl_DF& operator/= (cl_DF& x, const double y) { return x = x / y; } /* */ // Runtime typing support. extern cl_class cl_class_dfloat; // Debugging support. #ifdef CL_DEBUG extern int cl_DF_debug_module; CL_FORCE_LINK(cl_DF_debug_dummy, cl_DF_debug_module) #endif } // namespace cln #endif /* _CL_DFLOAT_H */ cln-1.3.3/include/cln/complex_io.h0000644000000000000000000000227511201634736013677 0ustar // I/O of complex numbers. #ifndef _CL_COMPLEX_IO_H #define _CL_COMPLEX_IO_H #include "cln/number_io.h" #include "cln/complex.h" namespace cln { // Undocumented input functions extern const cl_N read_complex (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse); extern const cl_N read_complex (std::istream& stream, const cl_read_flags& flags); // Documented input functions inline std::istream& operator>> (std::istream& stream, cl_N& result) { extern cl_read_flags cl_N_read_flags; result = read_complex(stream,cl_N_read_flags); return stream; } // Undocumented output functions // Documented output functions // Gibt eine komplexe Zahl aus. // print_complex(stream,z); // > z: komplexe Zahl // > stream: Stream extern void print_complex (std::ostream& stream, const cl_print_flags& flags, const cl_N& z); extern void print_complex (std::ostream& stream, const cl_print_number_flags& flags, const cl_N& z); inline void fprint (std::ostream& stream, const cl_N& x) { extern cl_print_flags default_print_flags; print_complex(stream,default_print_flags,x); } CL_DEFINE_PRINT_OPERATOR(cl_N) } // namespace cln #endif /* _CL_COMPLEX_IO_H */ cln-1.3.3/include/cln/ffloat_io.h0000644000000000000000000000155011201634736013476 0ustar // I/O of ffloats. #ifndef _CL_FFLOAT_IO_H #define _CL_FFLOAT_IO_H #include "cln/number_io.h" #include "cln/ffloat.h" namespace cln { inline std::istream& operator>> (std::istream& stream, cl_FF& result) { extern cl_read_flags cl_FF_read_flags; extern const cl_F read_float (std::istream&, const cl_read_flags&); result = As(cl_FF)(read_float(stream,cl_FF_read_flags)); return stream; } // The following does strictly the same as the general `fprint' for floats. // It is here only so that people don't need to include . inline void fprint (std::ostream& stream, const cl_FF& x) { extern void print_float (std::ostream& stream, const cl_print_flags& flags, const cl_F& z); extern cl_print_flags default_print_flags; print_float(stream,default_print_flags,x); } CL_DEFINE_PRINT_OPERATOR(cl_FF) } // namespace cln #endif /* _CL_FFLOAT_IO_H */ cln-1.3.3/include/cln/object.h0000644000000000000000000004620412227130071012777 0ustar // General object definitions: pointers, reference counting, garbage collection. #ifndef _CL_OBJECT_H #define _CL_OBJECT_H #include "cln/types.h" #include "cln/modules.h" #include namespace cln { // We don't have to deal with circular structures, so normal reference counting // is sufficient. Is also has the advantage of being mostly non-interrupting. // An object is either a pointer to heap allocated data // or immediate data. // It is possible to distinguish these because pointers are aligned. // cl_uint_alignment is the guaranteed alignment of a `void*' or `long' // in memory. Must be > 1. #if defined(__m68k__) #define cl_word_alignment 2 #endif #if defined(__i386__) || defined(__mips__) || defined(__mipsel__) || (defined(__sparc__) && !defined(__arch64__)) || defined(__hppa__) || defined(__arm__) || defined(__rs6000__) || defined(__m88k__) || defined(__convex__) || (defined(__s390__) && !defined(__s390x__)) || defined(__sh__) || (defined(__x86_64__) && defined(__ILP32__)) #define cl_word_alignment 4 #endif #if defined(__alpha__) || defined(__ia64__) || defined(__mips64__) || defined(__powerpc64__) || (defined(__sparc__) && defined(__arch64__)) || (defined(__x86_64__) && !defined(__ILP32__)) || defined(__s390x__) || defined(__aarch64__) #define cl_word_alignment 8 #endif #if !defined(cl_word_alignment) #error "Define cl_word_alignment for your CPU!" #endif // Four basic classes are introduced: // // gcobject rcobject // // gcpointer rcpointer // // `gcobject' = garbage collectible object (pointer or immediate), // `gcpointer' = garbage collectible pointer, // `rcobject' = reference counted object (pointer or immediate), // `rcpointer' = reference counted pointer. // // "garbage collectible" means that a reference count is maintained, and // when the reference count drops to 0, the object is freed. This is useful // for all kind of short- or long-lived objects. // "reference counted" means that a reference count is maintained, which // cannot drop to 0. This is useful for objects which are registered in a // global cache table, in order to know which objects can be thrown away // when the cache is cleaned. (If the cache were never cleaned, its objects // would never be freed, and we could get away with normal C pointers.) // // It is permissible to treat a `rcobject' as a `gcobject', and a `rcpointer' // as a `gcpointer', but this just increases the destructor and copy-constructor // overhead. // It is also permissible to treat a `gcpointer' as a `gcobject', and a // `rcpointer' as a `rcobject', but this just increases the destructor and // copy-constructor overhead. // Immediate data is a word, as wide as a pointer. typedef sintP cl_sint; typedef uintP cl_uint; // This ought to be called `cl_word'. #define cl_pointer_size intPsize // NB: (cl_pointer_size==64) implies defined(HAVE_FAST_LONGLONG) #if (cl_pointer_size==64) #define CL_WIDE_POINTERS #endif // Distinguish immediate data from pointers. inline bool cl_pointer_p (cl_uint word) { return (word & (cl_word_alignment-1)) == 0; } inline bool cl_immediate_p (cl_uint word) { return (word & (cl_word_alignment-1)) != 0; } // Immediate data: Fixnum, Short Float, maybe Single Float. // They have type tags. // |...............................|......| // cl_value cl_tag // Number of bits reserved for tagging information: #if (cl_word_alignment <= 4) #define cl_tag_len 2 #else #define cl_tag_len 3 #endif #define cl_tag_shift 0 #define cl_value_shift (cl_tag_len+cl_tag_shift) #define cl_value_len (cl_pointer_size - cl_value_shift) #define cl_tag_mask (((1UL << cl_tag_len) - 1) << cl_tag_shift) #define cl_value_mask (((1UL << cl_value_len) - 1) << cl_value_shift) // Return the tag of a word. inline cl_uint cl_tag (cl_uint word) { return (word & cl_tag_mask) >> cl_tag_shift; } // Return the value (unsigned) of a word. inline cl_uint cl_value (cl_uint word) { // This assumes cl_value_shift + cl_value_len == cl_pointer_size. return word >> cl_value_shift; } // Return a word, combining a value and a tag. inline cl_uint cl_combine (cl_uint tag, cl_uint value) { return (value << cl_value_shift) + (tag << cl_tag_shift); } inline cl_uint cl_combine (cl_uint tag, cl_sint value) { // This assumes cl_value_shift + cl_value_len == cl_pointer_size. return (value << cl_value_shift) + (tag << cl_tag_shift); } // Keep the compiler happy. inline cl_uint cl_combine (cl_uint tag, unsigned int value) { return cl_combine(tag, (cl_uint)value); } inline cl_uint cl_combine (cl_uint tag, int value) { return cl_combine(tag, (cl_sint)value); } #ifdef HAVE_LONGLONG inline cl_uint cl_combine (cl_uint tag, unsigned long long value) { return cl_combine(tag, (cl_uint)value); } inline cl_uint cl_combine (cl_uint tag, long long value) { return cl_combine(tag, (cl_uint)value); } #endif // Definition of the tags. #if !defined(CL_WIDE_POINTERS) #if (cl_word_alignment == 2) #define cl_FN_tag 1 #define cl_SF_tag 3 // must satisfy the cl_immediate_p predicate! #endif #if (cl_word_alignment == 4) #define cl_FN_tag 1 #define cl_SF_tag 2 #endif #else // CL_WIDE_POINTERS // Single Floats are immediate as well. #define cl_FN_tag 1 #define cl_SF_tag 2 #define cl_FF_tag 3 #endif // Corresponding classes. extern const struct cl_class * cl_immediate_classes [1<refcount++; } // Decrement the reference count of a garbage collected pointer. inline void cl_gc_dec_pointer_refcount (cl_heap* pointer) { if (--pointer->refcount == 0) cl_free_heap_object(pointer); } // Decrement the reference count of a reference counted pointer. inline void cl_rc_dec_pointer_refcount (cl_heap* pointer) { --pointer->refcount; } // Increment the reference count. // This must be a macro, not an inline function, because pointer_p() and // inc_pointer_refcount() are non-virtual member functions, so that the // compiler can optimize it. #define cl_inc_refcount(x) \ if ((x).pointer_p()) \ (x).inc_pointer_refcount(); \ // Decrement the reference count. // This must be a macro, not an inline function, because pointer_p() and // dec_pointer_refcount() are non-virtual member functions, so that the // compiler can optimize it. #define cl_dec_refcount(x) \ if ((x).pointer_p()) \ (x).dec_pointer_refcount(); \ // The declaration of a copy constructor. // Restriction: The base class's default constructor must do nothing or // initialize `pointer' to a constant expression. #define CL_DEFINE_COPY_CONSTRUCTOR1(_class_) \ _CL_DEFINE_COPY_CONSTRUCTOR1(_class_,_class_) #define _CL_DEFINE_COPY_CONSTRUCTOR1(_class_,_classname_) \ inline _class_::_classname_ (const _class_& x) \ { \ cl_uint x_word = x.word; \ cl_inc_refcount(x); \ this->word = x_word; \ } // The declaration of a copy constructor. // Restriction: The base class must have the usual `cl_private_thing' // constructor. Drawback: The base class must be known here. #define CL_DEFINE_COPY_CONSTRUCTOR2(_class_,_baseclass_) \ _CL_DEFINE_COPY_CONSTRUCTOR2(_class_,_class_,_baseclass_) #define _CL_DEFINE_COPY_CONSTRUCTOR2(_class_,_classname_,_baseclass_) \ inline _class_::_classname_ (const _class_& x) \ : _baseclass_ (as_cl_private_thing(x)) {} // The declaration of an assignment operator. #define CL_DEFINE_ASSIGNMENT_OPERATOR(dest_class,src_class) \ inline dest_class& dest_class::operator= (const src_class& x) \ { \ /* Be careful, we might be assigning x to itself. */ \ cl_uint x_word = x.word; \ cl_inc_refcount(x); \ cl_dec_refcount(*this); \ this->word = x_word; \ return *this; \ } // We have a small problem with destructors: The specialized destructor // of a leaf class such as `cl_SF' should be more efficient than the // general destructor for `cl_N'. Since (by C++ specs) destructing a cl_SF // would run the destructors for cl_SF, cl_F, cl_R, cl_N (in that order), // and in the last step the compiler does not know any more that the object // actually is a cl_SF, there is no way to optimize the destructor! // ("progn-reversed" method combination is evil.) // And if we define "mirror"/"shadow" classes with no destructors (such // that `cl_F' inherits from `cl_F_no_destructor' buts adds a destructor) // then we need to add explicit conversion operators cl_SF -> cl_F -> cl_R ..., // with the effect that calling an overloaded function like `as_cl_F' // (which has two signatures `as_cl_F(cl_number)' and `as_cl_F(cl_F)') // with a cl_SF argument gives an "call of overloaded function is ambiguous" // error. // There is no help: If we want overloaded functions to be callable in a way // that makes sense, `cl_SF' has to be a subclass of `cl_F', and then the // destructor of `cl_SF' will do at least as much computation as the `cl_F' // destructor. Praise C++ ! :-(( // (Even making `pointer_p()' a virtual function would not help.) // This is obnoxious. template struct cl_htentry1; // The four concrete classes of all objects. class cl_gcobject { public: /* ugh */ union { void* pointer; cl_heap* heappointer; cl_uint word; }; public: // Default constructor. (Used for objects with no initializer.) cl_gcobject (); // Destructor. (Used when a variable goes out of scope.) ~cl_gcobject (); // Copy constructor. cl_gcobject (const cl_gcobject&); // Assignment operator. cl_gcobject& operator= (const cl_gcobject&); // Distinguish immediate data from pointer. bool pointer_p() const { return cl_pointer_p(word); } // Reference counting. void inc_pointer_refcount () const { cl_inc_pointer_refcount(heappointer); } void dec_pointer_refcount () const { cl_gc_dec_pointer_refcount(heappointer); } // Return the type tag of an immediate number. cl_uint nonpointer_tag () const { return cl_tag(word); } // Return the type tag of a heap-allocated number. const cl_class * pointer_type () const { return heappointer->type; } // Private pointer manipulations. cl_private_thing _as_cl_private_thing () const; // Private constructor. cl_gcobject (cl_private_thing p) #if !(defined(__alpha__) && !defined(__GNUC__)) : pointer (p) {} #else { pointer = p; } #endif // Debugging output. void debug_print () const; // Ability to place an object at a given address. void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void* operator new (size_t size) { return ::operator new (size); } }; inline cl_gcobject::cl_gcobject () {} inline cl_gcobject::~cl_gcobject () { cl_dec_refcount(*this); } CL_DEFINE_COPY_CONSTRUCTOR1(cl_gcobject) CL_DEFINE_ASSIGNMENT_OPERATOR(cl_gcobject,cl_gcobject) class cl_gcpointer { public: /* ugh */ union { void* pointer; cl_heap* heappointer; cl_uint word; }; public: // Default constructor. (Used for objects with no initializer.) cl_gcpointer (); // Destructor. (Used when a variable goes out of scope.) ~cl_gcpointer (); // Copy constructor. cl_gcpointer (const cl_gcpointer&); // Assignment operator. cl_gcpointer& operator= (const cl_gcpointer&); // Distinguish immediate data from pointer. bool pointer_p() const { return true; } // Reference counting. void inc_pointer_refcount () const { cl_inc_pointer_refcount(heappointer); } void dec_pointer_refcount () const { cl_gc_dec_pointer_refcount(heappointer); } // Return the type tag of an immediate number. cl_uint nonpointer_tag () const { return cl_tag(word); } // Return the type tag of a heap-allocated number. const cl_class * pointer_type () const { return heappointer->type; } // Private pointer manipulations. cl_private_thing _as_cl_private_thing () const; // Private constructor. cl_gcpointer (cl_private_thing p) #if !(defined(__alpha__) && !defined(__GNUC__)) : pointer (p) {} #else { pointer = p; } #endif // Debugging output. void debug_print () const; // Ability to place an object at a given address. void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void* operator new (size_t size) { return ::operator new (size); } }; inline cl_gcpointer::cl_gcpointer () {} inline cl_gcpointer::~cl_gcpointer () { cl_dec_refcount(*this); } CL_DEFINE_COPY_CONSTRUCTOR1(cl_gcpointer) CL_DEFINE_ASSIGNMENT_OPERATOR(cl_gcpointer,cl_gcpointer) class cl_rcobject { public: /* ugh */ union { void* pointer; cl_heap* heappointer; cl_uint word; }; public: // Default constructor. (Used for objects with no initializer.) cl_rcobject (); // Destructor. (Used when a variable goes out of scope.) ~cl_rcobject (); // Copy constructor. cl_rcobject (const cl_rcobject&); // Assignment operator. cl_rcobject& operator= (const cl_rcobject&); // Distinguish immediate data from pointer. bool pointer_p() const { return cl_pointer_p(word); } // Reference counting. void inc_pointer_refcount () const { cl_inc_pointer_refcount(heappointer); } void dec_pointer_refcount () const { cl_rc_dec_pointer_refcount(heappointer); } // Return the type tag of an immediate number. cl_uint nonpointer_tag () const { return cl_tag(word); } // Return the type tag of a heap-allocated number. const cl_class * pointer_type () const { return heappointer->type; } // Private pointer manipulations. cl_private_thing _as_cl_private_thing () const; // Private constructor. cl_rcobject (cl_private_thing p) #if !(defined(__alpha__) && !defined(__GNUC__)) : pointer (p) {} #else { pointer = p; } #endif // Debugging output. void debug_print () const; // Ability to place an object at a given address. void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void* operator new (size_t size) { return ::operator new (size); } }; inline cl_rcobject::cl_rcobject () {} inline cl_rcobject::~cl_rcobject () { cl_dec_refcount(*this); } CL_DEFINE_COPY_CONSTRUCTOR1(cl_rcobject) CL_DEFINE_ASSIGNMENT_OPERATOR(cl_rcobject,cl_rcobject) class cl_rcpointer { public: /* ugh */ union { void* pointer; cl_heap* heappointer; cl_uint word; }; public: // Default constructor. (Used for objects with no initializer.) cl_rcpointer (); // Destructor. (Used when a variable goes out of scope.) ~cl_rcpointer (); // Copy constructor. cl_rcpointer (const cl_rcpointer&); // Assignment operator. cl_rcpointer& operator= (const cl_rcpointer&); // Distinguish immediate data from pointer. bool pointer_p() const { return true; } // Reference counting. void inc_pointer_refcount () const { cl_inc_pointer_refcount(heappointer); } void dec_pointer_refcount () const { cl_rc_dec_pointer_refcount(heappointer); } // Return the type tag of an immediate number. cl_uint nonpointer_tag () const { return cl_tag(word); } // Return the type tag of a heap-allocated number. const cl_class * pointer_type () const { return heappointer->type; } // Private pointer manipulations. cl_private_thing _as_cl_private_thing () const; // Private constructor. cl_rcpointer (cl_private_thing p) #if !(defined(__alpha__) && !defined(__GNUC__)) : pointer (p) {} #else { pointer = p; } #endif // Debugging output. void debug_print () const; // Ability to place an object at a given address. void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void* operator new (size_t size) { return ::operator new (size); } }; inline cl_rcpointer::cl_rcpointer () {} inline cl_rcpointer::~cl_rcpointer () { cl_dec_refcount(*this); } CL_DEFINE_COPY_CONSTRUCTOR1(cl_rcpointer) CL_DEFINE_ASSIGNMENT_OPERATOR(cl_rcpointer,cl_rcpointer) // Private pointer manipulations. inline cl_private_thing cl_gcobject::_as_cl_private_thing () const { cl_private_thing p = (cl_private_thing) pointer; cl_inc_refcount(*this); return p; } inline cl_private_thing as_cl_private_thing (const cl_gcobject& x) { return x._as_cl_private_thing(); } inline cl_private_thing cl_gcpointer::_as_cl_private_thing () const { cl_private_thing p = (cl_private_thing) pointer; cl_inc_refcount(*this); return p; } inline cl_private_thing as_cl_private_thing (const cl_gcpointer& x) { return x._as_cl_private_thing(); } inline cl_private_thing cl_rcobject::_as_cl_private_thing () const { cl_private_thing p = (cl_private_thing) pointer; cl_inc_refcount(*this); return p; } inline cl_private_thing as_cl_private_thing (const cl_rcobject& x) { return x._as_cl_private_thing(); } inline cl_private_thing cl_rcpointer::_as_cl_private_thing () const { cl_private_thing p = (cl_private_thing) pointer; cl_inc_refcount(*this); return p; } inline cl_private_thing as_cl_private_thing (const cl_rcpointer& x) { return x._as_cl_private_thing(); } // Note: When we define a function that returns a class object by value, // we normally return it as const value. The declarations // T func (...); (A) // and // const T func (...); (B) // behave identically and generate identical code, except that the code // func(...) = foo; // compiles fine with (A) but is an error (and yields a warning) with (B). // We want this warning. // Define a conversion operator from one object to another object of the // same size. #define CL_DEFINE_CONVERTER(target_class) \ operator const target_class & () const \ { \ typedef int assert1 [2*(sizeof(target_class)==sizeof(*this))-1]; \ return * (const target_class *) (void*) this; \ } } // namespace cln #endif /* _CL_OBJECT_H */ cln-1.3.3/include/cln/rational_io.h0000644000000000000000000000527511201634736014044 0ustar // I/O of rational numbers. #ifndef _CL_RATIONAL_IO_H #define _CL_RATIONAL_IO_H #include "cln/number_io.h" #include "cln/rational.h" namespace cln { // Undocumented input functions // Wandelt eine Zeichenkette mit Rational-Syntax in eine rationale Zahl um. // read_rational(base,sign,string,index1,index3,index2) // > base: Lesebasis (>=2, <=36) // > sign: Vorzeichen (/=0 falls negativ) // > string: Simple-String (enthält Ziffern mit Wert index1: Index der ersten Ziffer // > index3: Index von '/' // > index2: Index nach der letzten Ziffer // (also index3-index1 Zähler-Ziffern, index2-index3-1 Nenner-Ziffern) // < ergebnis: rationale Zahl extern const cl_RA read_rational (unsigned int base, cl_signean sign, const char * string, uintC index1, uintC index3, uintC index2); // The following does strictly the same as the general read_complex. // It is here only so that you don't need the complex and float number // readers in order to read an rational number. ("Treeshaking") extern const cl_RA read_rational (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse); extern const cl_RA read_rational (std::istream& stream, const cl_read_flags& flags); // Documented input functions inline std::istream& operator>> (std::istream& stream, cl_RA& result) { extern cl_read_flags cl_RA_read_flags; result = read_rational(stream,cl_RA_read_flags); return stream; } // Undocumented output functions // Gibt eine rationale Zahl aus. // print_rational(stream,base,z); // > z: rationale Zahl // > base: Basis (>=2, <=36) // > stream: Stream extern void print_rational (std::ostream& stream, unsigned int base, const cl_RA& z); // Documented output functions // Gibt eine Zahl aus. // print_rational(stream,flags,z); // > z: Zahl // > stream: Stream // > flags: Ausgabe-Parameter extern void print_rational (std::ostream& stream, const cl_print_flags& flags, const cl_RA& z); extern void print_rational (std::ostream& stream, const cl_print_number_flags& flags, const cl_RA& z); extern void print_rational (std::ostream& stream, const cl_print_real_flags& flags, const cl_RA& z); extern void print_rational (std::ostream& stream, const cl_print_rational_flags& flags, const cl_RA& z); // The following does strictly the same as the general `fprint' for numbers. // It is here only so that you don't need the complex and long-float number // printers in order to print an integer. ("Treeshaking") inline void fprint (std::ostream& stream, const cl_RA& x) { extern cl_print_flags default_print_flags; print_rational(stream,default_print_flags,x); } CL_DEFINE_PRINT_OPERATOR(cl_RA) } // namespace cln #endif /* _CL_RATIONAL_IO_H */ cln-1.3.3/include/cln/univpoly_modint.h0000644000000000000000000001526611201634736015004 0ustar // Univariate Polynomials over modular integers. #ifndef _CL_UNIVPOLY_MODINT_H #define _CL_UNIVPOLY_MODINT_H #include "cln/ring.h" #include "cln/univpoly.h" #include "cln/modinteger.h" #include "cln/integer_class.h" namespace cln { // Normal univariate polynomials with stricter static typing: // `cl_MI' instead of `cl_ring_element'. class cl_heap_univpoly_modint_ring; class cl_univpoly_modint_ring : public cl_univpoly_ring { public: // Default constructor. cl_univpoly_modint_ring () : cl_univpoly_ring () {} // Copy constructor. cl_univpoly_modint_ring (const cl_univpoly_modint_ring&); // Assignment operator. cl_univpoly_modint_ring& operator= (const cl_univpoly_modint_ring&); // Automatic dereferencing. cl_heap_univpoly_modint_ring* operator-> () const { return (cl_heap_univpoly_modint_ring*)heappointer; } }; // Copy constructor and assignment operator. CL_DEFINE_COPY_CONSTRUCTOR2(cl_univpoly_modint_ring,cl_univpoly_ring) CL_DEFINE_ASSIGNMENT_OPERATOR(cl_univpoly_modint_ring,cl_univpoly_modint_ring) class cl_UP_MI : public cl_UP { public: const cl_univpoly_modint_ring& ring () const { return The(cl_univpoly_modint_ring)(_ring); } // Conversion. CL_DEFINE_CONVERTER(cl_ring_element) // Destructive modification. void set_coeff (uintL index, const cl_MI& y); void finalize(); // Evaluation. const cl_MI operator() (const cl_MI& y) const; public: // Ability to place an object at a given address. void* operator new (size_t size) { return malloc_hook(size); } void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void operator delete (void* ptr) { free_hook(ptr); } }; class cl_heap_univpoly_modint_ring : public cl_heap_univpoly_ring { SUBCLASS_cl_heap_univpoly_ring() const cl_modint_ring& basering () const { return The(cl_modint_ring)(_basering); } // High-level operations. void fprint (std::ostream& stream, const cl_UP_MI& x) { cl_heap_univpoly_ring::fprint(stream,x); } bool equal (const cl_UP_MI& x, const cl_UP_MI& y) { return cl_heap_univpoly_ring::equal(x,y); } const cl_UP_MI zero () { return The2(cl_UP_MI)(cl_heap_univpoly_ring::zero()); } bool zerop (const cl_UP_MI& x) { return cl_heap_univpoly_ring::zerop(x); } const cl_UP_MI plus (const cl_UP_MI& x, const cl_UP_MI& y) { return The2(cl_UP_MI)(cl_heap_univpoly_ring::plus(x,y)); } const cl_UP_MI minus (const cl_UP_MI& x, const cl_UP_MI& y) { return The2(cl_UP_MI)(cl_heap_univpoly_ring::minus(x,y)); } const cl_UP_MI uminus (const cl_UP_MI& x) { return The2(cl_UP_MI)(cl_heap_univpoly_ring::uminus(x)); } const cl_UP_MI one () { return The2(cl_UP_MI)(cl_heap_univpoly_ring::one()); } const cl_UP_MI canonhom (const cl_I& x) { return The2(cl_UP_MI)(cl_heap_univpoly_ring::canonhom(x)); } const cl_UP_MI mul (const cl_UP_MI& x, const cl_UP_MI& y) { return The2(cl_UP_MI)(cl_heap_univpoly_ring::mul(x,y)); } const cl_UP_MI square (const cl_UP_MI& x) { return The2(cl_UP_MI)(cl_heap_univpoly_ring::square(x)); } const cl_UP_MI expt_pos (const cl_UP_MI& x, const cl_I& y) { return The2(cl_UP_MI)(cl_heap_univpoly_ring::expt_pos(x,y)); } const cl_UP_MI scalmul (const cl_MI& x, const cl_UP_MI& y) { return The2(cl_UP_MI)(cl_heap_univpoly_ring::scalmul(x,y)); } sintL degree (const cl_UP_MI& x) { return cl_heap_univpoly_ring::degree(x); } sintL ldegree (const cl_UP_MI& x) { return cl_heap_univpoly_ring::ldegree(x); } const cl_UP_MI monomial (const cl_MI& x, uintL e) { return The2(cl_UP_MI)(cl_heap_univpoly_ring::monomial(x,e)); } const cl_MI coeff (const cl_UP_MI& x, uintL index) { return The2(cl_MI)(cl_heap_univpoly_ring::coeff(x,index)); } const cl_UP_MI create (sintL deg) { return The2(cl_UP_MI)(cl_heap_univpoly_ring::create(deg)); } void set_coeff (cl_UP_MI& x, uintL index, const cl_MI& y) { cl_heap_univpoly_ring::set_coeff(x,index,y); } void finalize (cl_UP_MI& x) { cl_heap_univpoly_ring::finalize(x); } const cl_MI eval (const cl_UP_MI& x, const cl_MI& y) { return The2(cl_MI)(cl_heap_univpoly_ring::eval(x,y)); } private: // No need for any constructors. cl_heap_univpoly_modint_ring (); }; // Lookup of polynomial rings. inline const cl_univpoly_modint_ring find_univpoly_ring (const cl_modint_ring& r) { return The(cl_univpoly_modint_ring) (find_univpoly_ring((const cl_ring&)r)); } inline const cl_univpoly_modint_ring find_univpoly_ring (const cl_modint_ring& r, const cl_symbol& varname) { return The(cl_univpoly_modint_ring) (find_univpoly_ring((const cl_ring&)r,varname)); } // Operations on polynomials. // Add. inline const cl_UP_MI operator+ (const cl_UP_MI& x, const cl_UP_MI& y) { return x.ring()->plus(x,y); } // Negate. inline const cl_UP_MI operator- (const cl_UP_MI& x) { return x.ring()->uminus(x); } // Subtract. inline const cl_UP_MI operator- (const cl_UP_MI& x, const cl_UP_MI& y) { return x.ring()->minus(x,y); } // Multiply. inline const cl_UP_MI operator* (const cl_UP_MI& x, const cl_UP_MI& y) { return x.ring()->mul(x,y); } // Squaring. inline const cl_UP_MI square (const cl_UP_MI& x) { return x.ring()->square(x); } // Exponentiation x^y, where y > 0. inline const cl_UP_MI expt_pos (const cl_UP_MI& x, const cl_I& y) { return x.ring()->expt_pos(x,y); } // Scalar multiplication. #if 0 // less efficient inline const cl_UP_MI operator* (const cl_I& x, const cl_UP_MI& y) { return y.ring()->mul(y.ring()->canonhom(x),y); } inline const cl_UP_MI operator* (const cl_UP_MI& x, const cl_I& y) { return x.ring()->mul(x.ring()->canonhom(y),x); } #endif inline const cl_UP_MI operator* (const cl_I& x, const cl_UP_MI& y) { return y.ring()->scalmul(y.ring()->basering()->canonhom(x),y); } inline const cl_UP_MI operator* (const cl_UP_MI& x, const cl_I& y) { return x.ring()->scalmul(x.ring()->basering()->canonhom(y),x); } inline const cl_UP_MI operator* (const cl_MI& x, const cl_UP_MI& y) { return y.ring()->scalmul(x,y); } inline const cl_UP_MI operator* (const cl_UP_MI& x, const cl_MI& y) { return x.ring()->scalmul(y,x); } // Coefficient. inline const cl_MI coeff (const cl_UP_MI& x, uintL index) { return x.ring()->coeff(x,index); } // Destructive modification. inline void set_coeff (cl_UP_MI& x, uintL index, const cl_MI& y) { x.ring()->set_coeff(x,index,y); } inline void finalize (cl_UP_MI& x) { x.ring()->finalize(x); } inline void cl_UP_MI::set_coeff (uintL index, const cl_MI& y) { ring()->set_coeff(*this,index,y); } inline void cl_UP_MI::finalize () { ring()->finalize(*this); } // Evaluation. (No extension of the base ring allowed here for now.) inline const cl_MI cl_UP_MI::operator() (const cl_MI& y) const { return ring()->eval(*this,y); } // Derivative. inline const cl_UP_MI deriv (const cl_UP_MI& x) { return The2(cl_UP_MI)(deriv((const cl_UP&)x)); } } // namespace cln #endif /* _CL_UNIVPOLY_MODINT_H */ cln-1.3.3/include/cln/GV_complex.h0000644000000000000000000000362411201634736013603 0ustar // General vectors of complex numbers. #ifndef _CL_GV_COMPLEX_H #define _CL_GV_COMPLEX_H #include "cln/number.h" #include "cln/GV_number.h" #include "cln/complex_class.h" #include "cln/io.h" namespace cln { // A vector of complex numbers is just a normal vector of numbers. typedef cl_heap_GV cl_heap_GV_N; struct cl_GV_N : public cl_GV { public: // Constructors. cl_GV_N (); cl_GV_N (const cl_GV_N&); explicit cl_GV_N (std::size_t len); // Assignment operators. cl_GV_N& operator= (const cl_GV_N&); // Private pointer manipulations. cl_GV_N (cl_heap_GV_N* p) : cl_GV (p) {} cl_GV_N (cl_private_thing p) : cl_GV (p) {} }; inline cl_GV_N::cl_GV_N (const cl_GV_N& x) : cl_GV (as_cl_private_thing(x)) {} CL_DEFINE_ASSIGNMENT_OPERATOR(cl_GV_N,cl_GV_N) inline cl_GV_N::cl_GV_N (std::size_t len) : cl_GV ((cl_heap_GV_N*) cl_make_heap_GV_number(len)) {} inline cl_GV_N::cl_GV_N () : cl_GV ((cl_heap_GV_N*) (cl_heap_GV_number*) cl_null_GV_number) {} // Copy a vector. inline const cl_GV_N copy (const cl_GV_N& vector) { return The(cl_GV_N) (copy((const cl_GV_number&) vector)); } // Output. inline void fprint (std::ostream& stream, const cl_GV_N& x) { extern cl_print_flags default_print_flags; extern void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* fun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_GV_number& vector); extern void print_complex (std::ostream& stream, const cl_print_flags& flags, const cl_N& z); print_vector(stream, default_print_flags, (void (*) (std::ostream&, const cl_print_flags&, const cl_number&)) (void (*) (std::ostream&, const cl_print_flags&, const cl_N&)) &print_complex, x); } CL_DEFINE_PRINT_OPERATOR(cl_GV_N) } // namespace cln #endif /* _CL_GV_COMPLEX_H */ cln-1.3.3/include/cln/lfloat_io.h0000644000000000000000000000155011201634736013504 0ustar // I/O of lfloats. #ifndef _CL_LFLOAT_IO_H #define _CL_LFLOAT_IO_H #include "cln/number_io.h" #include "cln/lfloat.h" namespace cln { inline std::istream& operator>> (std::istream& stream, cl_LF& result) { extern cl_read_flags cl_LF_read_flags; extern const cl_F read_float (std::istream&, const cl_read_flags&); result = As(cl_LF)(read_float(stream,cl_LF_read_flags)); return stream; } // The following does strictly the same as the general `fprint' for floats. // It is here only so that people don't need to include . inline void fprint (std::ostream& stream, const cl_LF& x) { extern void print_float (std::ostream& stream, const cl_print_flags& flags, const cl_F& z); extern cl_print_flags default_print_flags; print_float(stream,default_print_flags,x); } CL_DEFINE_PRINT_OPERATOR(cl_LF) } // namespace cln #endif /* _CL_LFLOAT_IO_H */ cln-1.3.3/include/cln/real_ring.h0000644000000000000000000000100311201634736013467 0ustar // Built-in real number ring. #ifndef _CL_REAL_RING_H #define _CL_REAL_RING_H #include "cln/ring.h" #include "cln/real_class.h" namespace cln { typedef cl_specialized_number_ring cl_real_ring; extern const cl_real_ring cl_R_ring; // math. R extern cl_class cl_class_real_ring; class cl_R_ring_init_helper { static int count; public: cl_R_ring_init_helper(); ~cl_R_ring_init_helper(); }; static cl_R_ring_init_helper cl_R_ring_init_helper_instance; } // namespace cln #endif /* _CL_REAL_RING_H */ cln-1.3.3/include/cln/version.h0000644000000000000000000000106412173046143013217 0ustar /* include/cln/version.h. Generated from version.h.in by configure. */ /* CLN version information */ #ifndef _CL_VERSION_H #define _CL_VERSION_H /* CLN release number */ #define CL_VERSION 1.3.3 /* Major version number of CLN */ #define CL_VERSION_MAJOR 1 /* Minor version number of CLN */ #define CL_VERSION_MINOR 3 /* Patchlevel version number of CLN */ #define CL_VERSION_PATCHLEVEL 3 namespace cln { extern const int version_major; extern const int version_minor; extern const int version_patchlevel; } // namespace cln #endif /* _CL_VERSION_H */ cln-1.3.3/include/cln/real_class.h0000644000000000000000000000432011201634736013642 0ustar // Abstract class of real numbers. #ifndef _CL_REAL_CLASS_H #define _CL_REAL_CLASS_H #include "cln/number.h" #include "cln/complex_class.h" namespace cln { class cl_R : public cl_N { public: // Default constructor. cl_R (); // Copy constructor. cl_R (const cl_R&); // Converters. // Assignment operators. cl_R& operator= (const cl_R&); // Constructors and assignment operators from C numeric types. cl_R (const int); // |argument| must be < 2^29 cl_R (const unsigned int); // argument must be < 2^29 cl_R (const long); cl_R (const unsigned long); #ifdef HAVE_LONGLONG cl_R (const long long); cl_R (const unsigned long long); #endif cl_R (const float); cl_R (const double); cl_R& operator= (const int); // |argument| must be < 2^29 cl_R& operator= (const unsigned int); // argument must be < 2^29 cl_R& operator= (const long); cl_R& operator= (const unsigned long); cl_R& operator= (const float); cl_R& operator= (const double); #ifdef HAVE_LONGLONG cl_R& operator= (const long long); cl_R& operator= (const unsigned long long); #endif // Other constructors. cl_R (const char *); // Private constructor. cl_R (cl_private_thing); public: // Ability to place an object at a given address. void* operator new (size_t size) { return malloc_hook(size); } void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void operator delete (void* ptr) { free_hook(ptr); } private: // Friend declarations. They are for the compiler. Just ignore them. }; // Private constructors. inline cl_R::cl_R (cl_private_thing ptr) : cl_N (ptr) {} // The assignment operators: CL_DEFINE_ASSIGNMENT_OPERATOR(cl_R, cl_R) // The default constructors. inline cl_R::cl_R () : cl_N ((cl_private_thing) cl_combine(cl_FN_tag,0)) {} // The copy constructors. CL_DEFINE_COPY_CONSTRUCTOR2(cl_R,cl_N) // Constructors and assignment operators from C numeric types. CL_DEFINE_INT_CONSTRUCTORS(cl_R) CL_DEFINE_INT_ASSIGNMENT_OPERATORS(cl_R) CL_DEFINE_LONG_CONSTRUCTORS(cl_R) CL_DEFINE_LONG_ASSIGNMENT_OPERATORS(cl_R) #ifdef HAVE_LONGLONG CL_DEFINE_LONGLONG_CONSTRUCTORS(cl_R) CL_DEFINE_LONGLONG_ASSIGNMENT_OPERATORS(cl_R) #endif CL_DEFINE_FLOAT_CONSTRUCTOR(cl_R) CL_DEFINE_DOUBLE_CONSTRUCTOR(cl_R) } // namespace cln #endif /* _CL_REAL_CLASS_H */ cln-1.3.3/include/cln/GV_real.h0000644000000000000000000000353211201634736013055 0ustar // General vectors of real numbers. #ifndef _CL_GV_REAL_H #define _CL_GV_REAL_H #include "cln/number.h" #include "cln/GV_complex.h" #include "cln/real_class.h" #include "cln/io.h" namespace cln { // A vector of real numbers is just a normal vector of numbers. typedef cl_heap_GV cl_heap_GV_R; struct cl_GV_R : public cl_GV { public: // Constructors. cl_GV_R (); cl_GV_R (const cl_GV_R&); explicit cl_GV_R (std::size_t len); // Assignment operators. cl_GV_R& operator= (const cl_GV_R&); // Private pointer manipulations. cl_GV_R (cl_heap_GV_R* p) : cl_GV (p) {} cl_GV_R (cl_private_thing p) : cl_GV (p) {} }; inline cl_GV_R::cl_GV_R (const cl_GV_R& x) : cl_GV (as_cl_private_thing(x)) {} CL_DEFINE_ASSIGNMENT_OPERATOR(cl_GV_R,cl_GV_R) inline cl_GV_R::cl_GV_R (std::size_t len) : cl_GV ((cl_heap_GV_R*) cl_make_heap_GV_number(len)) {} inline cl_GV_R::cl_GV_R () : cl_GV ((cl_heap_GV_R*) (cl_heap_GV_number*) cl_null_GV_number) {} // Copy a vector. inline const cl_GV_R copy (const cl_GV_R& vector) { return The(cl_GV_R) (copy((const cl_GV_N&) vector)); } // Output. inline void fprint (std::ostream& stream, const cl_GV_R& x) { extern cl_print_flags default_print_flags; extern void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* fun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_GV_number& vector); extern void print_real (std::ostream& stream, const cl_print_flags& flags, const cl_R& z); print_vector(stream, default_print_flags, (void (*) (std::ostream&, const cl_print_flags&, const cl_number&)) (void (*) (std::ostream&, const cl_print_flags&, const cl_R&)) &print_real, x); } CL_DEFINE_PRINT_OPERATOR(cl_GV_R) } // namespace cln #endif /* _CL_GV_REAL_H */ cln-1.3.3/include/cln/rational_ring.h0000644000000000000000000000105011201634736014357 0ustar // Built-in rational number ring. #ifndef _CL_RATIONAL_RING_H #define _CL_RATIONAL_RING_H #include "cln/ring.h" #include "cln/rational_class.h" namespace cln { typedef cl_specialized_number_ring cl_rational_ring; extern const cl_rational_ring cl_RA_ring; // math. Q extern cl_class cl_class_rational_ring; class cl_RA_ring_init_helper { static int count; public: cl_RA_ring_init_helper(); ~cl_RA_ring_init_helper(); }; static cl_RA_ring_init_helper cl_RA_ring_init_helper_instance; } // namespace cln #endif /* _CL_RATIONAL_RING_H */ cln-1.3.3/include/cln/floatformat.h0000644000000000000000000000105611201634736014053 0ustar // Floating point format specifiers. #ifndef _CL_FLOATFORMAT_H #define _CL_FLOATFORMAT_H #include "cln/types.h" namespace cln { // Float format specifier type. (Float mantissa precision in bits.) enum float_format_t { float_format_sfloat = 17, float_format_ffloat = 24, float_format_dfloat = 53, float_format_lfloat_min = ((53+intDsize-1)/intDsize)*intDsize, // = round_up(53,intDsize) float_format_lfloat_max = ~((sintE)(1) << (intEsize-1)) // force correct underlying type of float_format_t }; } // namespace cln #endif /* _CL_FLOATFORMAT_H */ cln-1.3.3/include/cln/ring.h0000644000000000000000000004071011201634736012474 0ustar // Ring operations. #ifndef _CL_RING_H #define _CL_RING_H #include "cln/object.h" #include "cln/malloc.h" #include "cln/proplist.h" #include "cln/number.h" #include "cln/exception.h" #include "cln/io.h" namespace cln { class cl_I; // This file defines the general layout of rings, ring elements, and // operations available on ring elements. Any subclass of `cl_ring' // must implement these operations, with the same memory layout. // (Because generic packages like the polynomial rings access the base // ring's operation vectors through inline functions defined in this file.) class cl_heap_ring; // Rings are reference counted, but not freed immediately when they aren't // used any more. Hence they inherit from `cl_rcpointer'. // Vectors of function pointers are more efficient than virtual member // functions. But it constrains us not to use multiple or virtual inheritance. // // Note! We are passing raw `cl_heap_ring*' pointers to the operations // for efficiency (compared to passing `const cl_ring&', we save a memory // access, and it is easier to cast to a `cl_heap_ring_specialized*'). // These raw pointers are meant to be used downward (in the dynamic extent // of the call) only. If you need to save them in a data structure, cast // to `cl_ring'; this will correctly increment the reference count. // (This technique is safe because the inline wrapper functions make sure // that we have a `cl_ring' somewhere containing the pointer, so there // is no danger of dangling pointers.) // // Note! Because the `cl_heap_ring*' -> `cl_ring' conversion increments // the reference count, you have to use the `cl_private_thing' -> `cl_ring' // conversion if the reference count is already incremented. class cl_ring : public cl_rcpointer { public: // Constructor. Takes a cl_heap_ring*, increments its refcount. cl_ring (cl_heap_ring* r); // Private constructor. Doesn't increment the refcount. cl_ring (cl_private_thing); // Copy constructor. cl_ring (const cl_ring&); // Assignment operator. cl_ring& operator= (const cl_ring&); // Default constructor. cl_ring (); // Automatic dereferencing. cl_heap_ring* operator-> () const { return (cl_heap_ring*)heappointer; } }; CL_DEFINE_COPY_CONSTRUCTOR2(cl_ring,cl_rcpointer) CL_DEFINE_ASSIGNMENT_OPERATOR(cl_ring,cl_ring) // Normal constructor for `cl_ring'. inline cl_ring::cl_ring (cl_heap_ring* r) { cl_inc_pointer_refcount((cl_heap*)r); pointer = r; } // Private constructor for `cl_ring'. inline cl_ring::cl_ring (cl_private_thing p) { pointer = p; } inline bool operator== (const cl_ring& R1, const cl_ring& R2) { return (R1.pointer == R2.pointer); } inline bool operator!= (const cl_ring& R1, const cl_ring& R2) { return (R1.pointer != R2.pointer); } inline bool operator== (const cl_ring& R1, cl_heap_ring* R2) { return (R1.pointer == R2); } inline bool operator!= (const cl_ring& R1, cl_heap_ring* R2) { return (R1.pointer != R2); } // Representation of an element of a ring. // // In order to support true polymorphism (without C++ templates), all // ring elements share the same basic layout: // cl_ring ring; // the ring // cl_gcobject rep; // representation of the element // The representation of the element depends on the ring, of course, // but we constrain it to be a single pointer into the heap or an immediate // value. // // Any arithmetic operation on a ring R (like +, -, *) must return a value // with ring = R. This is // a. necessary if the computation is to proceed correctly (e.g. in cl_RA, // ((3/4)*4 mod 3) is 0, simplifying it to ((cl_I)4 mod (cl_I)3) = 1 // wouldn't be correct), // b. possible even if R is an extension ring of some ring R1 (e.g. cl_N // being an extension ring of cl_R). Automatic retraction from R to R1 // can be done through dynamic typing: An element of R which happens // to lie in R1 is stored using the internal representation of R1, // but with ring = R. Elements of R1 and R\R1 can be distinguished // through rep's type. // c. an advantage for the implementation of polynomials and other // entities which contain many elements of the same ring. They need // to store only the elements' representations, and a single pointer // to the ring. // // The ring operations exist in two versions: // - Low-level version, which only operates on the representation. // - High-level version, which operates on full cl_ring_elements. // We make this distinction for performance: Multiplication of polynomials // over Z/nZ, operating on the high-level operations, spends 40% of its // computing time with packing and unpacking of cl_ring_elements. // The low-level versions have an underscore prepended and are unsafe. class _cl_ring_element { public: cl_gcobject rep; // representation of the element // Default constructor. _cl_ring_element (); public: /* ugh */ // Constructor. _cl_ring_element (const cl_heap_ring* R, const cl_gcobject& r) : rep (as_cl_private_thing(r)) { (void)R; } _cl_ring_element (const cl_ring& R, const cl_gcobject& r) : rep (as_cl_private_thing(r)) { (void)R; } public: // Ability to place an object at a given address. void* operator new (size_t size) { return malloc_hook(size); } void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void operator delete (void* ptr) { free_hook(ptr); } }; class cl_ring_element : public _cl_ring_element { protected: cl_ring _ring; // ring public: const cl_ring& ring () const { return _ring; } // Default constructor. cl_ring_element (); public: /* ugh */ // Constructor. cl_ring_element (const cl_ring& R, const cl_gcobject& r) : _cl_ring_element (R,r), _ring (R) {} cl_ring_element (const cl_ring& R, const _cl_ring_element& r) : _cl_ring_element (r), _ring (R) {} public: // Debugging output. void debug_print () const; // Ability to place an object at a given address. void* operator new (size_t size) { return malloc_hook(size); } void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void operator delete (void* ptr) { free_hook(ptr); } }; // The ring operations are encoded as vectors of function pointers. You // can add more operations to the end of each vector or add new vectors, // but you must not reorder the operations nor reorder the vectors nor // change the functions' signatures incompatibly. // There should ideally be a template class for each vector, but unfortunately // you lose the ability to initialize the vector using "= { ... }" syntax // when you subclass it. struct _cl_ring_setops { // print void (* fprint) (cl_heap_ring* R, std::ostream& stream, const _cl_ring_element& x); // equality bool (* equal) (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y); // ... }; struct _cl_ring_addops { // 0 const _cl_ring_element (* zero) (cl_heap_ring* R); bool (* zerop) (cl_heap_ring* R, const _cl_ring_element& x); // x+y const _cl_ring_element (* plus) (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y); // x-y const _cl_ring_element (* minus) (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y); // -x const _cl_ring_element (* uminus) (cl_heap_ring* R, const _cl_ring_element& x); // ... }; struct _cl_ring_mulops { // 1 const _cl_ring_element (* one) (cl_heap_ring* R); // canonical homomorphism const _cl_ring_element (* canonhom) (cl_heap_ring* R, const cl_I& x); // x*y const _cl_ring_element (* mul) (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y); // x^2 const _cl_ring_element (* square) (cl_heap_ring* R, const _cl_ring_element& x); // x^y, y Integer >0 const _cl_ring_element (* expt_pos) (cl_heap_ring* R, const _cl_ring_element& x, const cl_I& y); // ... }; typedef const _cl_ring_setops cl_ring_setops; typedef const _cl_ring_addops cl_ring_addops; typedef const _cl_ring_mulops cl_ring_mulops; // Representation of a ring in memory. class cl_heap_ring : public cl_heap { public: // Allocation. void* operator new (size_t size) { return malloc_hook(size); } // Deallocation. void operator delete (void* ptr) { free_hook(ptr); } private: cl_property_list properties; protected: cl_ring_setops* setops; cl_ring_addops* addops; cl_ring_mulops* mulops; public: // More information comes here. // ... public: // Low-level operations. void _fprint (std::ostream& stream, const _cl_ring_element& x) { setops->fprint(this,stream,x); } bool _equal (const _cl_ring_element& x, const _cl_ring_element& y) { return setops->equal(this,x,y); } const _cl_ring_element _zero () { return addops->zero(this); } bool _zerop (const _cl_ring_element& x) { return addops->zerop(this,x); } const _cl_ring_element _plus (const _cl_ring_element& x, const _cl_ring_element& y) { return addops->plus(this,x,y); } const _cl_ring_element _minus (const _cl_ring_element& x, const _cl_ring_element& y) { return addops->minus(this,x,y); } const _cl_ring_element _uminus (const _cl_ring_element& x) { return addops->uminus(this,x); } const _cl_ring_element _one () { return mulops->one(this); } const _cl_ring_element _canonhom (const cl_I& x) { return mulops->canonhom(this,x); } const _cl_ring_element _mul (const _cl_ring_element& x, const _cl_ring_element& y) { return mulops->mul(this,x,y); } const _cl_ring_element _square (const _cl_ring_element& x) { return mulops->square(this,x); } const _cl_ring_element _expt_pos (const _cl_ring_element& x, const cl_I& y) { return mulops->expt_pos(this,x,y); } // High-level operations. void fprint (std::ostream& stream, const cl_ring_element& x) { if (!(x.ring() == this)) throw runtime_exception(); _fprint(stream,x); } bool equal (const cl_ring_element& x, const cl_ring_element& y) { if (!(x.ring() == this)) throw runtime_exception(); if (!(y.ring() == this)) throw runtime_exception(); return _equal(x,y); } const cl_ring_element zero () { return cl_ring_element(this,_zero()); } bool zerop (const cl_ring_element& x) { if (!(x.ring() == this)) throw runtime_exception(); return _zerop(x); } const cl_ring_element plus (const cl_ring_element& x, const cl_ring_element& y) { if (!(x.ring() == this)) throw runtime_exception(); if (!(y.ring() == this)) throw runtime_exception(); return cl_ring_element(this,_plus(x,y)); } const cl_ring_element minus (const cl_ring_element& x, const cl_ring_element& y) { if (!(x.ring() == this)) throw runtime_exception(); if (!(y.ring() == this)) throw runtime_exception(); return cl_ring_element(this,_minus(x,y)); } const cl_ring_element uminus (const cl_ring_element& x) { if (!(x.ring() == this)) throw runtime_exception(); return cl_ring_element(this,_uminus(x)); } const cl_ring_element one () { return cl_ring_element(this,_one()); } const cl_ring_element canonhom (const cl_I& x) { return cl_ring_element(this,_canonhom(x)); } const cl_ring_element mul (const cl_ring_element& x, const cl_ring_element& y) { if (!(x.ring() == this)) throw runtime_exception(); if (!(y.ring() == this)) throw runtime_exception(); return cl_ring_element(this,_mul(x,y)); } const cl_ring_element square (const cl_ring_element& x) { if (!(x.ring() == this)) throw runtime_exception(); return cl_ring_element(this,_square(x)); } const cl_ring_element expt_pos (const cl_ring_element& x, const cl_I& y) { if (!(x.ring() == this)) throw runtime_exception(); return cl_ring_element(this,_expt_pos(x,y)); } // Property operations. cl_property* get_property (const cl_symbol& key) { return properties.get_property(key); } void add_property (cl_property* new_property) { properties.add_property(new_property); } // Constructor. cl_heap_ring (cl_ring_setops* setopv, cl_ring_addops* addopv, cl_ring_mulops* mulopv) : setops (setopv), addops (addopv), mulops (mulopv) { refcount = 0; } // will be incremented by the `cl_ring' constructor }; #define SUBCLASS_cl_heap_ring() \ public: \ /* Allocation. */ \ void* operator new (size_t size) { return malloc_hook(size); } \ /* Deallocation. */ \ void operator delete (void* ptr) { free_hook(ptr); } // Operations on ring elements. // Output. inline void fprint (std::ostream& stream, const cl_ring_element& x) { x.ring()->fprint(stream,x); } CL_DEFINE_PRINT_OPERATOR(cl_ring_element) // Add. inline const cl_ring_element operator+ (const cl_ring_element& x, const cl_ring_element& y) { return x.ring()->plus(x,y); } // Negate. inline const cl_ring_element operator- (const cl_ring_element& x) { return x.ring()->uminus(x); } // Subtract. inline const cl_ring_element operator- (const cl_ring_element& x, const cl_ring_element& y) { return x.ring()->minus(x,y); } // Equality. inline bool operator== (const cl_ring_element& x, const cl_ring_element& y) { return x.ring()->equal(x,y); } inline bool operator!= (const cl_ring_element& x, const cl_ring_element& y) { return !x.ring()->equal(x,y); } // Compare against 0. inline bool zerop (const cl_ring_element& x) { return x.ring()->zerop(x); } // Multiply. inline const cl_ring_element operator* (const cl_ring_element& x, const cl_ring_element& y) { return x.ring()->mul(x,y); } // Squaring. inline const cl_ring_element square (const cl_ring_element& x) { return x.ring()->square(x); } // Exponentiation x^y, where y > 0. inline const cl_ring_element expt_pos (const cl_ring_element& x, const cl_I& y) { return x.ring()->expt_pos(x,y); } // Scalar multiplication. // [Is this operation worth being specially optimized for the case of // polynomials?? Polynomials have a faster scalar multiplication. // We should use it.??] inline const cl_ring_element operator* (const cl_I& x, const cl_ring_element& y) { return y.ring()->mul(y.ring()->canonhom(x),y); } inline const cl_ring_element operator* (const cl_ring_element& x, const cl_I& y) { return x.ring()->mul(x.ring()->canonhom(y),x); } // Ring of uninitialized elements. // Any operation results in an exception being thrown. // Thrown when an attempt is made to perform an operation on an uninitialized ring. class uninitialized_ring_exception : public runtime_exception { public: uninitialized_ring_exception (); }; // Thrown when a ring element is uninitialized. class uninitialized_exception : public runtime_exception { public: explicit uninitialized_exception (const _cl_ring_element& obj); uninitialized_exception (const _cl_ring_element& obj_x, const _cl_ring_element& obj_y); }; extern const cl_ring cl_no_ring; extern cl_class cl_class_no_ring; class cl_no_ring_init_helper { static int count; public: cl_no_ring_init_helper(); ~cl_no_ring_init_helper(); }; static cl_no_ring_init_helper cl_no_ring_init_helper_instance; inline cl_ring::cl_ring () : cl_rcpointer (as_cl_private_thing(cl_no_ring)) {} inline _cl_ring_element::_cl_ring_element () : rep ((cl_private_thing) cl_combine(cl_FN_tag,0)) {} inline cl_ring_element::cl_ring_element () : _cl_ring_element (), _ring () {} // Support for built-in number rings. // Beware, they are not optimally efficient. template struct cl_number_ring_ops { bool (* contains) (const cl_number&); bool (* equal) (const T&, const T&); bool (* zerop) (const T&); const T (* plus) (const T&, const T&); const T (* minus) (const T&, const T&); const T (* uminus) (const T&); const T (* mul) (const T&, const T&); const T (* square) (const T&); const T (* expt_pos) (const T&, const cl_I&); }; class cl_heap_number_ring : public cl_heap_ring { public: cl_number_ring_ops* ops; // Constructor. cl_heap_number_ring (cl_ring_setops* setopv, cl_ring_addops* addopv, cl_ring_mulops* mulopv, cl_number_ring_ops* opv) : cl_heap_ring (setopv,addopv,mulopv), ops (opv) {} }; class cl_number_ring : public cl_ring { public: cl_number_ring (cl_heap_number_ring* r) : cl_ring (r) {} }; template class cl_specialized_number_ring : public cl_number_ring { public: cl_specialized_number_ring (); }; // Type test. inline bool instanceof (const cl_number& x, const cl_number_ring& R) { return ((cl_heap_number_ring*) R.heappointer)->ops->contains(x); } // Hack section. // Conversions to subtypes without checking: // The2(cl_MI)(x) converts x to a cl_MI, without change of representation! #define The(type) *(const type *) & cl_identity #define The2(type) *(const type *) & cl_identity2 // This inline function is for type checking purposes only. inline const cl_ring& cl_identity (const cl_ring& r) { return r; } inline const cl_ring_element& cl_identity2 (const cl_ring_element& x) { return x; } inline const cl_gcobject& cl_identity (const _cl_ring_element& x) { return x.rep; } // Debugging support. #ifdef CL_DEBUG extern int cl_ring_debug_module; CL_FORCE_LINK(cl_ring_debug_dummy, cl_ring_debug_module) #endif } // namespace cln #endif /* _CL_RING_H */ cln-1.3.3/include/cln/config.h.in0000644000000000000000000000127211201634736013407 0ustar #ifndef _CL_CONFIG_PUBLIC_H #define _CL_CONFIG_PUBLIC_H #include "cln/host_cpu.h" #include "cln/version.h" /* * FIXME: this should not be exposed to user. Or at least it should be * renamed to CL_HAVE_LONGLONG or something like that. */ /* compiler supports the `long long' type */ #undef HAVE_LONGLONG /* * Numbers in the heap are stored as "digit" (or "limb" in GMP speak) * sequences. A digit is an unsigned int with sizeof(void *)*CHAR_BIT bits. * It should be 8 or 16 or 32 or 64 bits. If CLN is sitting on top of GMP * it should match mp_limb_t */ #undef GMP_DEMANDS_UINTD_INT #undef GMP_DEMANDS_UINTD_LONG #undef GMP_DEMANDS_UINTD_LONG_LONG #endif /* _CL_CONFIG_PUBLIC_H */ cln-1.3.3/include/cln/dfloat_class.h0000644000000000000000000000426711201634736014202 0ustar // Concrete class of double float numbers. #ifndef _CL_DFLOAT_CLASS_H #define _CL_DFLOAT_CLASS_H #include "cln/number.h" #include "cln/float_class.h" namespace cln { class cl_DF : public cl_F { public: // Default constructor. cl_DF (); // Assignment operators. cl_DF& operator= (const cl_DF&); // Optimization of method pointer_p(). bool pointer_p() const { return true; } // Faster pointer_p() gives a faster copy constructor (but not destructor!!!). cl_DF (const cl_DF& x); // Constructors and assignment operators from C numeric types. cl_DF (const double); cl_DF& operator= (const double); // Other constructors. cl_DF (const char *); // Private constructor. cl_DF (cl_private_thing); cl_DF (struct cl_heap_dfloat *); // Private pointer manipulations. operator struct cl_heap_dfloat * () const; public: // Ability to place an object at a given address. void* operator new (size_t size) { return malloc_hook(size); } void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void operator delete (void* ptr) { free_hook(ptr); } private: // Friend declarations. They are for the compiler. Just ignore them. }; // Private constructors. inline cl_DF::cl_DF (cl_private_thing ptr) : cl_F (ptr) {} // The assignment operators: CL_DEFINE_ASSIGNMENT_OPERATOR(cl_DF, cl_DF) // The default constructors. // Private pointer manipulations. Never throw away a `struct cl_heap_dfloat *'! inline cl_DF::operator struct cl_heap_dfloat * () const { struct cl_heap_dfloat * hpointer = (struct cl_heap_dfloat *) pointer; cl_inc_refcount(*this); return hpointer; } extern const cl_DF cl_DF_0; inline cl_DF::cl_DF () : cl_F ((cl_private_thing) (struct cl_heap_dfloat *) cl_DF_0) {} class cl_DF_globals_init_helper { static int count; public: cl_DF_globals_init_helper(); ~cl_DF_globals_init_helper(); }; static cl_DF_globals_init_helper cl_DF_globals_init_helper_instance; #if 0 // see cl_DF.h inline cl_DF::cl_DF (struct cl_heap_dfloat * ptr) : cl_F ((cl_private_thing) ptr) {} #endif // The copy constructors. CL_DEFINE_COPY_CONSTRUCTOR2(cl_DF,cl_F) // Constructors and assignment operators from C numeric types. CL_DEFINE_DOUBLE_CONSTRUCTOR(cl_DF) } // namespace cln #endif /* _CL_DFLOAT_CLASS_H */ cln-1.3.3/include/cln/dfloat_io.h0000644000000000000000000000155011201634736013474 0ustar // I/O of dfloats. #ifndef _CL_DFLOAT_IO_H #define _CL_DFLOAT_IO_H #include "cln/number_io.h" #include "cln/dfloat.h" namespace cln { inline std::istream& operator>> (std::istream& stream, cl_DF& result) { extern cl_read_flags cl_DF_read_flags; extern const cl_F read_float (std::istream&, const cl_read_flags&); result = As(cl_DF)(read_float(stream,cl_DF_read_flags)); return stream; } // The following does strictly the same as the general `fprint' for floats. // It is here only so that people don't need to include . inline void fprint (std::ostream& stream, const cl_DF& x) { extern void print_float (std::ostream& stream, const cl_print_flags& flags, const cl_F& z); extern cl_print_flags default_print_flags; print_float(stream,default_print_flags,x); } CL_DEFINE_PRINT_OPERATOR(cl_DF) } // namespace cln #endif /* _CL_DFLOAT_IO_H */ cln-1.3.3/include/cln/SV_number.h0000644000000000000000000000421711201634736013437 0ustar // Simple vectors of numbers. #ifndef _CL_SV_NUMBER_H #define _CL_SV_NUMBER_H #include "cln/number.h" #include "cln/SV.h" #include "cln/io.h" namespace cln { typedef cl_heap_SV cl_heap_SV_number; struct cl_SV_number : public cl_SV { public: // Constructors. cl_SV_number (); cl_SV_number (const cl_SV_number&); explicit cl_SV_number (std::size_t len); // Assignment operators. cl_SV_number& operator= (const cl_SV_number&); // Private pointer manipulations. operator cl_heap_SV_number* () const; cl_SV_number (cl_heap_SV_number* p) : cl_SV (p) {} cl_SV_number (cl_private_thing p) : cl_SV (p) {} }; inline cl_SV_number::cl_SV_number (const cl_SV_number& x) : cl_SV (as_cl_private_thing(x)) {} CL_DEFINE_ASSIGNMENT_OPERATOR(cl_SV_number,cl_SV_number) // Returns a new simple vector with uninitialized contents. extern cl_heap_SV_number* cl_make_heap_SV_number_uninit (std::size_t len); // Returns a new simple vector with all elements initialized to 0. extern cl_heap_SV_number* cl_make_heap_SV_number (std::size_t len); inline cl_SV_number::cl_SV_number (std::size_t len) : cl_SV (cl_make_heap_SV_number(len)) {} // Private pointer manipulations. Never throw away a `struct cl_heap_SV_number *'! inline cl_SV_number::operator cl_heap_SV_number* () const { cl_heap_SV_number* hpointer = (cl_heap_SV_number*)pointer; cl_inc_refcount(*this); return hpointer; } extern const cl_SV_number cl_null_SV_number; inline cl_SV_number::cl_SV_number () : cl_SV ((cl_heap_SV_number*) cl_null_SV_number) {} class cl_SV_number_init_helper { static int count; public: cl_SV_number_init_helper(); ~cl_SV_number_init_helper(); }; static cl_SV_number_init_helper cl_SV_number_init_helper_instance; // Copy a simple vector. inline const cl_SV_number copy (const cl_SV_number& vector) { return The(cl_SV_number) (copy((const cl_SV_any&) vector)); } // Debugging support. #ifdef CL_DEBUG extern int cl_SV_number_debug_module; CL_FORCE_LINK(cl_SV_number_debug_dummy, cl_SV_number_debug_module) #endif } // namespace cln #endif /* _CL_SV_NUMBER_H */ cln-1.3.3/include/cln/univpoly.h0000644000000000000000000006021011201634736013417 0ustar // Univariate Polynomials. #ifndef _CL_UNIVPOLY_H #define _CL_UNIVPOLY_H #include "cln/object.h" #include "cln/ring.h" #include "cln/malloc.h" #include "cln/proplist.h" #include "cln/symbol.h" #include "cln/V.h" #include "cln/io.h" namespace cln { // To protect against mixing elements of different polynomial rings, every // polynomial carries its ring in itself. class cl_heap_univpoly_ring; class cl_univpoly_ring : public cl_ring { public: // Default constructor. cl_univpoly_ring (); // Constructor. Takes a cl_heap_univpoly_ring*, increments its refcount. cl_univpoly_ring (cl_heap_univpoly_ring* r); // Private constructor. Doesn't increment the refcount. cl_univpoly_ring (cl_private_thing); // Copy constructor. cl_univpoly_ring (const cl_univpoly_ring&); // Assignment operator. cl_univpoly_ring& operator= (const cl_univpoly_ring&); // Automatic dereferencing. cl_heap_univpoly_ring* operator-> () const { return (cl_heap_univpoly_ring*)heappointer; } }; // Copy constructor and assignment operator. CL_DEFINE_COPY_CONSTRUCTOR2(cl_univpoly_ring,cl_ring) CL_DEFINE_ASSIGNMENT_OPERATOR(cl_univpoly_ring,cl_univpoly_ring) // Normal constructor for `cl_univpoly_ring'. inline cl_univpoly_ring::cl_univpoly_ring (cl_heap_univpoly_ring* r) : cl_ring ((cl_private_thing) (cl_inc_pointer_refcount((cl_heap*)r), r)) {} // Private constructor for `cl_univpoly_ring'. inline cl_univpoly_ring::cl_univpoly_ring (cl_private_thing p) : cl_ring (p) {} // Operations on univariate polynomial rings. inline bool operator== (const cl_univpoly_ring& R1, const cl_univpoly_ring& R2) { return (R1.pointer == R2.pointer); } inline bool operator!= (const cl_univpoly_ring& R1, const cl_univpoly_ring& R2) { return (R1.pointer != R2.pointer); } inline bool operator== (const cl_univpoly_ring& R1, cl_heap_univpoly_ring* R2) { return (R1.pointer == R2); } inline bool operator!= (const cl_univpoly_ring& R1, cl_heap_univpoly_ring* R2) { return (R1.pointer != R2); } // Representation of a univariate polynomial. class _cl_UP /* cf. _cl_ring_element */ { public: cl_gcpointer rep; // vector of coefficients, a cl_V_any // Default constructor. _cl_UP (); public: /* ugh */ // Constructor. _cl_UP (const cl_heap_univpoly_ring* R, const cl_V_any& r) : rep (as_cl_private_thing(r)) { (void)R; } _cl_UP (const cl_univpoly_ring& R, const cl_V_any& r) : rep (as_cl_private_thing(r)) { (void)R; } public: // Conversion. CL_DEFINE_CONVERTER(_cl_ring_element) public: // Ability to place an object at a given address. void* operator new (size_t size) { return malloc_hook(size); } void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void operator delete (void* ptr) { free_hook(ptr); } }; class cl_UP /* cf. cl_ring_element */ : public _cl_UP { protected: cl_univpoly_ring _ring; // polynomial ring (references the base ring) public: const cl_univpoly_ring& ring () const { return _ring; } private: // Default constructor. cl_UP (); public: /* ugh */ // Constructor. cl_UP (const cl_univpoly_ring& R, const cl_V_any& r) : _cl_UP (R,r), _ring (R) {} cl_UP (const cl_univpoly_ring& R, const _cl_UP& r) : _cl_UP (r), _ring (R) {} public: // Conversion. CL_DEFINE_CONVERTER(cl_ring_element) // Destructive modification. void set_coeff (uintL index, const cl_ring_element& y); void finalize(); // Evaluation. const cl_ring_element operator() (const cl_ring_element& y) const; // Debugging output. void debug_print () const; public: // Ability to place an object at a given address. void* operator new (size_t size) { return malloc_hook(size); } void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void operator delete (void* ptr) { free_hook(ptr); } }; // Ring operations. struct _cl_univpoly_setops /* cf. _cl_ring_setops */ { // print void (* fprint) (cl_heap_univpoly_ring* R, std::ostream& stream, const _cl_UP& x); // equality // (Be careful: This is not well-defined for polynomials with // floating-point coefficients.) bool (* equal) (cl_heap_univpoly_ring* R, const _cl_UP& x, const _cl_UP& y); }; struct _cl_univpoly_addops /* cf. _cl_ring_addops */ { // 0 const _cl_UP (* zero) (cl_heap_univpoly_ring* R); bool (* zerop) (cl_heap_univpoly_ring* R, const _cl_UP& x); // x+y const _cl_UP (* plus) (cl_heap_univpoly_ring* R, const _cl_UP& x, const _cl_UP& y); // x-y const _cl_UP (* minus) (cl_heap_univpoly_ring* R, const _cl_UP& x, const _cl_UP& y); // -x const _cl_UP (* uminus) (cl_heap_univpoly_ring* R, const _cl_UP& x); }; struct _cl_univpoly_mulops /* cf. _cl_ring_mulops */ { // 1 const _cl_UP (* one) (cl_heap_univpoly_ring* R); // canonical homomorphism const _cl_UP (* canonhom) (cl_heap_univpoly_ring* R, const cl_I& x); // x*y const _cl_UP (* mul) (cl_heap_univpoly_ring* R, const _cl_UP& x, const _cl_UP& y); // x^2 const _cl_UP (* square) (cl_heap_univpoly_ring* R, const _cl_UP& x); // x^y, y Integer >0 const _cl_UP (* expt_pos) (cl_heap_univpoly_ring* R, const _cl_UP& x, const cl_I& y); }; struct _cl_univpoly_modulops { // scalar multiplication x*y const _cl_UP (* scalmul) (cl_heap_univpoly_ring* R, const cl_ring_element& x, const _cl_UP& y); }; struct _cl_univpoly_polyops { // degree sintL (* degree) (cl_heap_univpoly_ring* R, const _cl_UP& x); // low degree sintL (* ldegree) (cl_heap_univpoly_ring* R, const _cl_UP& x); // monomial const _cl_UP (* monomial) (cl_heap_univpoly_ring* R, const cl_ring_element& x, uintL e); // coefficient (0 if index>degree) const cl_ring_element (* coeff) (cl_heap_univpoly_ring* R, const _cl_UP& x, uintL index); // create new polynomial, bounded degree const _cl_UP (* create) (cl_heap_univpoly_ring* R, sintL deg); // set coefficient in new polynomial void (* set_coeff) (cl_heap_univpoly_ring* R, _cl_UP& x, uintL index, const cl_ring_element& y); // finalize polynomial void (* finalize) (cl_heap_univpoly_ring* R, _cl_UP& x); // evaluate, substitute an element of R const cl_ring_element (* eval) (cl_heap_univpoly_ring* R, const _cl_UP& x, const cl_ring_element& y); }; typedef const _cl_univpoly_setops cl_univpoly_setops; typedef const _cl_univpoly_addops cl_univpoly_addops; typedef const _cl_univpoly_mulops cl_univpoly_mulops; typedef const _cl_univpoly_modulops cl_univpoly_modulops; typedef const _cl_univpoly_polyops cl_univpoly_polyops; // Representation of a univariate polynomial ring. class cl_heap_univpoly_ring /* cf. cl_heap_ring */ : public cl_heap { SUBCLASS_cl_heap_ring() private: cl_property_list properties; protected: cl_univpoly_setops* setops; cl_univpoly_addops* addops; cl_univpoly_mulops* mulops; cl_univpoly_modulops* modulops; cl_univpoly_polyops* polyops; protected: cl_ring _basering; // the coefficients are elements of this ring public: const cl_ring& basering () const { return _basering; } public: // Low-level operations. void _fprint (std::ostream& stream, const _cl_UP& x) { setops->fprint(this,stream,x); } bool _equal (const _cl_UP& x, const _cl_UP& y) { return setops->equal(this,x,y); } const _cl_UP _zero () { return addops->zero(this); } bool _zerop (const _cl_UP& x) { return addops->zerop(this,x); } const _cl_UP _plus (const _cl_UP& x, const _cl_UP& y) { return addops->plus(this,x,y); } const _cl_UP _minus (const _cl_UP& x, const _cl_UP& y) { return addops->minus(this,x,y); } const _cl_UP _uminus (const _cl_UP& x) { return addops->uminus(this,x); } const _cl_UP _one () { return mulops->one(this); } const _cl_UP _canonhom (const cl_I& x) { return mulops->canonhom(this,x); } const _cl_UP _mul (const _cl_UP& x, const _cl_UP& y) { return mulops->mul(this,x,y); } const _cl_UP _square (const _cl_UP& x) { return mulops->square(this,x); } const _cl_UP _expt_pos (const _cl_UP& x, const cl_I& y) { return mulops->expt_pos(this,x,y); } const _cl_UP _scalmul (const cl_ring_element& x, const _cl_UP& y) { return modulops->scalmul(this,x,y); } sintL _degree (const _cl_UP& x) { return polyops->degree(this,x); } sintL _ldegree (const _cl_UP& x) { return polyops->ldegree(this,x); } const _cl_UP _monomial (const cl_ring_element& x, uintL e) { return polyops->monomial(this,x,e); } const cl_ring_element _coeff (const _cl_UP& x, uintL index) { return polyops->coeff(this,x,index); } const _cl_UP _create (sintL deg) { return polyops->create(this,deg); } void _set_coeff (_cl_UP& x, uintL index, const cl_ring_element& y) { polyops->set_coeff(this,x,index,y); } void _finalize (_cl_UP& x) { polyops->finalize(this,x); } const cl_ring_element _eval (const _cl_UP& x, const cl_ring_element& y) { return polyops->eval(this,x,y); } // High-level operations. void fprint (std::ostream& stream, const cl_UP& x) { if (!(x.ring() == this)) throw runtime_exception(); _fprint(stream,x); } bool equal (const cl_UP& x, const cl_UP& y) { if (!(x.ring() == this)) throw runtime_exception(); if (!(y.ring() == this)) throw runtime_exception(); return _equal(x,y); } const cl_UP zero () { return cl_UP(this,_zero()); } bool zerop (const cl_UP& x) { if (!(x.ring() == this)) throw runtime_exception(); return _zerop(x); } const cl_UP plus (const cl_UP& x, const cl_UP& y) { if (!(x.ring() == this)) throw runtime_exception(); if (!(y.ring() == this)) throw runtime_exception(); return cl_UP(this,_plus(x,y)); } const cl_UP minus (const cl_UP& x, const cl_UP& y) { if (!(x.ring() == this)) throw runtime_exception(); if (!(y.ring() == this)) throw runtime_exception(); return cl_UP(this,_minus(x,y)); } const cl_UP uminus (const cl_UP& x) { if (!(x.ring() == this)) throw runtime_exception(); return cl_UP(this,_uminus(x)); } const cl_UP one () { return cl_UP(this,_one()); } const cl_UP canonhom (const cl_I& x) { return cl_UP(this,_canonhom(x)); } const cl_UP mul (const cl_UP& x, const cl_UP& y) { if (!(x.ring() == this)) throw runtime_exception(); if (!(y.ring() == this)) throw runtime_exception(); return cl_UP(this,_mul(x,y)); } const cl_UP square (const cl_UP& x) { if (!(x.ring() == this)) throw runtime_exception(); return cl_UP(this,_square(x)); } const cl_UP expt_pos (const cl_UP& x, const cl_I& y) { if (!(x.ring() == this)) throw runtime_exception(); return cl_UP(this,_expt_pos(x,y)); } const cl_UP scalmul (const cl_ring_element& x, const cl_UP& y) { if (!(y.ring() == this)) throw runtime_exception(); return cl_UP(this,_scalmul(x,y)); } sintL degree (const cl_UP& x) { if (!(x.ring() == this)) throw runtime_exception(); return _degree(x); } sintL ldegree (const cl_UP& x) { if (!(x.ring() == this)) throw runtime_exception(); return _ldegree(x); } const cl_UP monomial (const cl_ring_element& x, uintL e) { return cl_UP(this,_monomial(x,e)); } const cl_ring_element coeff (const cl_UP& x, uintL index) { if (!(x.ring() == this)) throw runtime_exception(); return _coeff(x,index); } const cl_UP create (sintL deg) { return cl_UP(this,_create(deg)); } void set_coeff (cl_UP& x, uintL index, const cl_ring_element& y) { if (!(x.ring() == this)) throw runtime_exception(); _set_coeff(x,index,y); } void finalize (cl_UP& x) { if (!(x.ring() == this)) throw runtime_exception(); _finalize(x); } const cl_ring_element eval (const cl_UP& x, const cl_ring_element& y) { if (!(x.ring() == this)) throw runtime_exception(); return _eval(x,y); } // Property operations. cl_property* get_property (const cl_symbol& key) { return properties.get_property(key); } void add_property (cl_property* new_property) { properties.add_property(new_property); } // Constructor. cl_heap_univpoly_ring (const cl_ring& r, cl_univpoly_setops*, cl_univpoly_addops*, cl_univpoly_mulops*, cl_univpoly_modulops*, cl_univpoly_polyops*); ~cl_heap_univpoly_ring () {} }; #define SUBCLASS_cl_heap_univpoly_ring() \ SUBCLASS_cl_heap_ring() // Lookup or create the "standard" univariate polynomial ring over a ring r. extern const cl_univpoly_ring find_univpoly_ring (const cl_ring& r); // Lookup or create a univariate polynomial ring with a named variable over r. extern const cl_univpoly_ring find_univpoly_ring (const cl_ring& r, const cl_symbol& varname); class cl_UP_init_helper { static int count; public: cl_UP_init_helper(); ~cl_UP_init_helper(); }; static cl_UP_init_helper cl_UP_init_helper_instance; // Operations on polynomials. // Output. inline void fprint (std::ostream& stream, const cl_UP& x) { x.ring()->fprint(stream,x); } CL_DEFINE_PRINT_OPERATOR(cl_UP) // Add. inline const cl_UP operator+ (const cl_UP& x, const cl_UP& y) { return x.ring()->plus(x,y); } // Negate. inline const cl_UP operator- (const cl_UP& x) { return x.ring()->uminus(x); } // Subtract. inline const cl_UP operator- (const cl_UP& x, const cl_UP& y) { return x.ring()->minus(x,y); } // Equality. inline bool operator== (const cl_UP& x, const cl_UP& y) { return x.ring()->equal(x,y); } inline bool operator!= (const cl_UP& x, const cl_UP& y) { return !x.ring()->equal(x,y); } // Compare against 0. inline bool zerop (const cl_UP& x) { return x.ring()->zerop(x); } // Multiply. inline const cl_UP operator* (const cl_UP& x, const cl_UP& y) { return x.ring()->mul(x,y); } // Squaring. inline const cl_UP square (const cl_UP& x) { return x.ring()->square(x); } // Exponentiation x^y, where y > 0. inline const cl_UP expt_pos (const cl_UP& x, const cl_I& y) { return x.ring()->expt_pos(x,y); } // Scalar multiplication. #if 0 // less efficient inline const cl_UP operator* (const cl_I& x, const cl_UP& y) { return y.ring()->mul(y.ring()->canonhom(x),y); } inline const cl_UP operator* (const cl_UP& x, const cl_I& y) { return x.ring()->mul(x.ring()->canonhom(y),x); } #endif inline const cl_UP operator* (const cl_I& x, const cl_UP& y) { return y.ring()->scalmul(y.ring()->basering()->canonhom(x),y); } inline const cl_UP operator* (const cl_UP& x, const cl_I& y) { return x.ring()->scalmul(x.ring()->basering()->canonhom(y),x); } inline const cl_UP operator* (const cl_ring_element& x, const cl_UP& y) { return y.ring()->scalmul(x,y); } inline const cl_UP operator* (const cl_UP& x, const cl_ring_element& y) { return x.ring()->scalmul(y,x); } // Degree. inline sintL degree (const cl_UP& x) { return x.ring()->degree(x); } // Low degree. inline sintL ldegree (const cl_UP& x) { return x.ring()->ldegree(x); } // Coefficient. inline const cl_ring_element coeff (const cl_UP& x, uintL index) { return x.ring()->coeff(x,index); } // Destructive modification. inline void set_coeff (cl_UP& x, uintL index, const cl_ring_element& y) { x.ring()->set_coeff(x,index,y); } inline void finalize (cl_UP& x) { x.ring()->finalize(x); } inline void cl_UP::set_coeff (uintL index, const cl_ring_element& y) { ring()->set_coeff(*this,index,y); } inline void cl_UP::finalize () { ring()->finalize(*this); } // Evaluation. (No extension of the base ring allowed here for now.) inline const cl_ring_element cl_UP::operator() (const cl_ring_element& y) const { return ring()->eval(*this,y); } // Derivative. extern const cl_UP deriv (const cl_UP& x); // Ring of uninitialized elements. // Any operation results in a run-time error. extern const cl_univpoly_ring cl_no_univpoly_ring; extern cl_class cl_class_no_univpoly_ring; class cl_UP_no_ring_init_helper { static int count; public: cl_UP_no_ring_init_helper(); ~cl_UP_no_ring_init_helper(); }; static cl_UP_no_ring_init_helper cl_UP_no_ring_init_helper_instance; inline cl_univpoly_ring::cl_univpoly_ring () : cl_ring (as_cl_private_thing(cl_no_univpoly_ring)) {} inline _cl_UP::_cl_UP () : rep ((cl_private_thing) cl_combine(cl_FN_tag,0)) {} inline cl_UP::cl_UP () : _cl_UP (), _ring () {} // Debugging support. #ifdef CL_DEBUG extern int cl_UP_debug_module; CL_FORCE_LINK(cl_UP_debug_dummy, cl_UP_debug_module) #endif } // namespace cln #endif /* _CL_UNIVPOLY_H */ namespace cln { // Templates for univariate polynomials of complex/real/rational/integers. #ifdef notyet // Unfortunately, this is not usable now, because of gcc-2.7 bugs: // - A template inline function is not inline in the first function that // uses it. // - Argument matching bug: User-defined conversions are not tried (or // tried with too low priority) for template functions w.r.t. normal // functions. For example, a call expt_pos(cl_UP_specialized,int) // is compiled as expt_pos(const cl_UP&, const cl_I&) instead of // expt_pos(const cl_UP_specialized&, const cl_I&). // It will, however, be usable when gcc-2.8 is released. #if defined(_CL_UNIVPOLY_COMPLEX_H) || defined(_CL_UNIVPOLY_REAL_H) || defined(_CL_UNIVPOLY_RATIONAL_H) || defined(_CL_UNIVPOLY_INTEGER_H) #ifndef _CL_UNIVPOLY_AUX_H // Normal univariate polynomials with stricter static typing: // `class T' instead of `cl_ring_element'. template class cl_univpoly_specialized_ring; template class cl_UP_specialized; template class cl_heap_univpoly_specialized_ring; template class cl_univpoly_specialized_ring : public cl_univpoly_ring { public: // Default constructor. cl_univpoly_specialized_ring () : cl_univpoly_ring () {} // Copy constructor. cl_univpoly_specialized_ring (const cl_univpoly_specialized_ring&); // Assignment operator. cl_univpoly_specialized_ring& operator= (const cl_univpoly_specialized_ring&); // Automatic dereferencing. cl_heap_univpoly_specialized_ring* operator-> () const { return (cl_heap_univpoly_specialized_ring*)heappointer; } }; // Copy constructor and assignment operator. template _CL_DEFINE_COPY_CONSTRUCTOR2(cl_univpoly_specialized_ring,cl_univpoly_specialized_ring,cl_univpoly_ring) template CL_DEFINE_ASSIGNMENT_OPERATOR(cl_univpoly_specialized_ring,cl_univpoly_specialized_ring) template class cl_UP_specialized : public cl_UP { public: const cl_univpoly_specialized_ring& ring () const { return The(cl_univpoly_specialized_ring)(_ring); } // Conversion. CL_DEFINE_CONVERTER(cl_ring_element) // Destructive modification. void set_coeff (uintL index, const T& y); void finalize(); // Evaluation. const T operator() (const T& y) const; public: // Ability to place an object at a given address. void* operator new (size_t size) { return malloc_hook(size); } void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void operator delete (void* ptr) { free_hook(ptr); } }; template class cl_heap_univpoly_specialized_ring : public cl_heap_univpoly_ring { SUBCLASS_cl_heap_univpoly_ring() // High-level operations. void fprint (std::ostream& stream, const cl_UP_specialized& x) { cl_heap_univpoly_ring::fprint(stream,x); } bool equal (const cl_UP_specialized& x, const cl_UP_specialized& y) { return cl_heap_univpoly_ring::equal(x,y); } const cl_UP_specialized zero () { return The2(cl_UP_specialized)(cl_heap_univpoly_ring::zero()); } bool zerop (const cl_UP_specialized& x) { return cl_heap_univpoly_ring::zerop(x); } const cl_UP_specialized plus (const cl_UP_specialized& x, const cl_UP_specialized& y) { return The2(cl_UP_specialized)(cl_heap_univpoly_ring::plus(x,y)); } const cl_UP_specialized minus (const cl_UP_specialized& x, const cl_UP_specialized& y) { return The2(cl_UP_specialized)(cl_heap_univpoly_ring::minus(x,y)); } const cl_UP_specialized uminus (const cl_UP_specialized& x) { return The2(cl_UP_specialized)(cl_heap_univpoly_ring::uminus(x)); } const cl_UP_specialized one () { return The2(cl_UP_specialized)(cl_heap_univpoly_ring::one()); } const cl_UP_specialized canonhom (const cl_I& x) { return The2(cl_UP_specialized)(cl_heap_univpoly_ring::canonhom(x)); } const cl_UP_specialized mul (const cl_UP_specialized& x, const cl_UP_specialized& y) { return The2(cl_UP_specialized)(cl_heap_univpoly_ring::mul(x,y)); } const cl_UP_specialized square (const cl_UP_specialized& x) { return The2(cl_UP_specialized)(cl_heap_univpoly_ring::square(x)); } const cl_UP_specialized expt_pos (const cl_UP_specialized& x, const cl_I& y) { return The2(cl_UP_specialized)(cl_heap_univpoly_ring::expt_pos(x,y)); } const cl_UP_specialized scalmul (const T& x, const cl_UP_specialized& y) { return The2(cl_UP_specialized)(cl_heap_univpoly_ring::scalmul(x,y)); } sintL degree (const cl_UP_specialized& x) { return cl_heap_univpoly_ring::degree(x); } sintL ldegree (const cl_UP_specialized& x) { return cl_heap_univpoly_ring::ldegree(x); } const cl_UP_specialized monomial (const T& x, uintL e) { return The2(cl_UP_specialized)(cl_heap_univpoly_ring::monomial(cl_ring_element(cl_C_ring??,x),e)); } const T coeff (const cl_UP_specialized& x, uintL index) { return The(T)(cl_heap_univpoly_ring::coeff(x,index)); } const cl_UP_specialized create (sintL deg) { return The2(cl_UP_specialized)(cl_heap_univpoly_ring::create(deg)); } void set_coeff (cl_UP_specialized& x, uintL index, const T& y) { cl_heap_univpoly_ring::set_coeff(x,index,cl_ring_element(cl_C_ring??,y)); } void finalize (cl_UP_specialized& x) { cl_heap_univpoly_ring::finalize(x); } const T eval (const cl_UP_specialized& x, const T& y) { return The(T)(cl_heap_univpoly_ring::eval(x,cl_ring_element(cl_C_ring??,y))); } private: // No need for any constructors. cl_heap_univpoly_specialized_ring (); }; // Lookup of polynomial rings. template inline const cl_univpoly_specialized_ring find_univpoly_ring (const cl_specialized_number_ring& r) { return The(cl_univpoly_specialized_ring) (find_univpoly_ring((const cl_ring&)r)); } template inline const cl_univpoly_specialized_ring find_univpoly_ring (const cl_specialized_number_ring& r, const cl_symbol& varname) { return The(cl_univpoly_specialized_ring) (find_univpoly_ring((const cl_ring&)r,varname)); } // Operations on polynomials. // Add. template inline const cl_UP_specialized operator+ (const cl_UP_specialized& x, const cl_UP_specialized& y) { return x.ring()->plus(x,y); } // Negate. template inline const cl_UP_specialized operator- (const cl_UP_specialized& x) { return x.ring()->uminus(x); } // Subtract. template inline const cl_UP_specialized operator- (const cl_UP_specialized& x, const cl_UP_specialized& y) { return x.ring()->minus(x,y); } // Multiply. template inline const cl_UP_specialized operator* (const cl_UP_specialized& x, const cl_UP_specialized& y) { return x.ring()->mul(x,y); } // Squaring. template inline const cl_UP_specialized square (const cl_UP_specialized& x) { return x.ring()->square(x); } // Exponentiation x^y, where y > 0. template inline const cl_UP_specialized expt_pos (const cl_UP_specialized& x, const cl_I& y) { return x.ring()->expt_pos(x,y); } // Scalar multiplication. // Need more discrimination on T ?? template inline const cl_UP_specialized operator* (const cl_I& x, const cl_UP_specialized& y) { return y.ring()->mul(y.ring()->canonhom(x),y); } template inline const cl_UP_specialized operator* (const cl_UP_specialized& x, const cl_I& y) { return x.ring()->mul(x.ring()->canonhom(y),x); } template inline const cl_UP_specialized operator* (const T& x, const cl_UP_specialized& y) { return y.ring()->scalmul(x,y); } template inline const cl_UP_specialized operator* (const cl_UP_specialized& x, const T& y) { return x.ring()->scalmul(y,x); } // Coefficient. template inline const T coeff (const cl_UP_specialized& x, uintL index) { return x.ring()->coeff(x,index); } // Destructive modification. template inline void set_coeff (cl_UP_specialized& x, uintL index, const T& y) { x.ring()->set_coeff(x,index,y); } template inline void finalize (cl_UP_specialized& x) { x.ring()->finalize(x); } template inline void cl_UP_specialized::set_coeff (uintL index, const T& y) { ring()->set_coeff(*this,index,y); } template inline void cl_UP_specialized::finalize () { ring()->finalize(*this); } // Evaluation. (No extension of the base ring allowed here for now.) template inline const T cl_UP_specialized::operator() (const T& y) const { return ring()->eval(*this,y); } // Derivative. template inline const cl_UP_specialized deriv (const cl_UP_specialized& x) { return The(cl_UP_specialized)(deriv((const cl_UP&)x)); } #endif /* _CL_UNIVPOLY_AUX_H */ #endif #endif /* notyet */ } // namespace cln cln-1.3.3/include/cln/univpoly_real.h0000644000000000000000000001540111201634736014424 0ustar // Univariate Polynomials over the real numbers. #ifndef _CL_UNIVPOLY_REAL_H #define _CL_UNIVPOLY_REAL_H #include "cln/ring.h" #include "cln/univpoly.h" #include "cln/number.h" #include "cln/real_class.h" #include "cln/integer_class.h" #include "cln/real_ring.h" namespace cln { // Normal univariate polynomials with stricter static typing: // `cl_R' instead of `cl_ring_element'. #ifdef notyet typedef cl_UP_specialized cl_UP_R; typedef cl_univpoly_specialized_ring cl_univpoly_real_ring; //typedef cl_heap_univpoly_specialized_ring cl_heap_univpoly_real_ring; #else class cl_heap_univpoly_real_ring; class cl_univpoly_real_ring : public cl_univpoly_ring { public: // Default constructor. cl_univpoly_real_ring () : cl_univpoly_ring () {} // Copy constructor. cl_univpoly_real_ring (const cl_univpoly_real_ring&); // Assignment operator. cl_univpoly_real_ring& operator= (const cl_univpoly_real_ring&); // Automatic dereferencing. cl_heap_univpoly_real_ring* operator-> () const { return (cl_heap_univpoly_real_ring*)heappointer; } }; // Copy constructor and assignment operator. CL_DEFINE_COPY_CONSTRUCTOR2(cl_univpoly_real_ring,cl_univpoly_ring) CL_DEFINE_ASSIGNMENT_OPERATOR(cl_univpoly_real_ring,cl_univpoly_real_ring) class cl_UP_R : public cl_UP { public: const cl_univpoly_real_ring& ring () const { return The(cl_univpoly_real_ring)(_ring); } // Conversion. CL_DEFINE_CONVERTER(cl_ring_element) // Destructive modification. void set_coeff (uintL index, const cl_R& y); void finalize(); // Evaluation. const cl_R operator() (const cl_R& y) const; public: // Ability to place an object at a given address. void* operator new (size_t size) { return malloc_hook(size); } void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void operator delete (void* ptr) { free_hook(ptr); } }; class cl_heap_univpoly_real_ring : public cl_heap_univpoly_ring { SUBCLASS_cl_heap_univpoly_ring() // High-level operations. void fprint (std::ostream& stream, const cl_UP_R& x) { cl_heap_univpoly_ring::fprint(stream,x); } bool equal (const cl_UP_R& x, const cl_UP_R& y) { return cl_heap_univpoly_ring::equal(x,y); } const cl_UP_R zero () { return The2(cl_UP_R)(cl_heap_univpoly_ring::zero()); } bool zerop (const cl_UP_R& x) { return cl_heap_univpoly_ring::zerop(x); } const cl_UP_R plus (const cl_UP_R& x, const cl_UP_R& y) { return The2(cl_UP_R)(cl_heap_univpoly_ring::plus(x,y)); } const cl_UP_R minus (const cl_UP_R& x, const cl_UP_R& y) { return The2(cl_UP_R)(cl_heap_univpoly_ring::minus(x,y)); } const cl_UP_R uminus (const cl_UP_R& x) { return The2(cl_UP_R)(cl_heap_univpoly_ring::uminus(x)); } const cl_UP_R one () { return The2(cl_UP_R)(cl_heap_univpoly_ring::one()); } const cl_UP_R canonhom (const cl_I& x) { return The2(cl_UP_R)(cl_heap_univpoly_ring::canonhom(x)); } const cl_UP_R mul (const cl_UP_R& x, const cl_UP_R& y) { return The2(cl_UP_R)(cl_heap_univpoly_ring::mul(x,y)); } const cl_UP_R square (const cl_UP_R& x) { return The2(cl_UP_R)(cl_heap_univpoly_ring::square(x)); } const cl_UP_R expt_pos (const cl_UP_R& x, const cl_I& y) { return The2(cl_UP_R)(cl_heap_univpoly_ring::expt_pos(x,y)); } const cl_UP_R scalmul (const cl_R& x, const cl_UP_R& y) { return The2(cl_UP_R)(cl_heap_univpoly_ring::scalmul(cl_ring_element(cl_R_ring,x),y)); } sintL degree (const cl_UP_R& x) { return cl_heap_univpoly_ring::degree(x); } sintL ldegree (const cl_UP_R& x) { return cl_heap_univpoly_ring::ldegree(x); } const cl_UP_R monomial (const cl_R& x, uintL e) { return The2(cl_UP_R)(cl_heap_univpoly_ring::monomial(cl_ring_element(cl_R_ring,x),e)); } const cl_R coeff (const cl_UP_R& x, uintL index) { return The(cl_R)(cl_heap_univpoly_ring::coeff(x,index)); } const cl_UP_R create (sintL deg) { return The2(cl_UP_R)(cl_heap_univpoly_ring::create(deg)); } void set_coeff (cl_UP_R& x, uintL index, const cl_R& y) { cl_heap_univpoly_ring::set_coeff(x,index,cl_ring_element(cl_R_ring,y)); } void finalize (cl_UP_R& x) { cl_heap_univpoly_ring::finalize(x); } const cl_R eval (const cl_UP_R& x, const cl_R& y) { return The(cl_R)(cl_heap_univpoly_ring::eval(x,cl_ring_element(cl_R_ring,y))); } private: // No need for any constructors. cl_heap_univpoly_real_ring (); }; // Lookup of polynomial rings. inline const cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& r) { return The(cl_univpoly_real_ring) (find_univpoly_ring((const cl_ring&)r)); } inline const cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& r, const cl_symbol& varname) { return The(cl_univpoly_real_ring) (find_univpoly_ring((const cl_ring&)r,varname)); } // Operations on polynomials. // Add. inline const cl_UP_R operator+ (const cl_UP_R& x, const cl_UP_R& y) { return x.ring()->plus(x,y); } // Negate. inline const cl_UP_R operator- (const cl_UP_R& x) { return x.ring()->uminus(x); } // Subtract. inline const cl_UP_R operator- (const cl_UP_R& x, const cl_UP_R& y) { return x.ring()->minus(x,y); } // Multiply. inline const cl_UP_R operator* (const cl_UP_R& x, const cl_UP_R& y) { return x.ring()->mul(x,y); } // Squaring. inline const cl_UP_R square (const cl_UP_R& x) { return x.ring()->square(x); } // Exponentiation x^y, where y > 0. inline const cl_UP_R expt_pos (const cl_UP_R& x, const cl_I& y) { return x.ring()->expt_pos(x,y); } // Scalar multiplication. #if 0 // less efficient inline const cl_UP_R operator* (const cl_I& x, const cl_UP_R& y) { return y.ring()->mul(y.ring()->canonhom(x),y); } inline const cl_UP_R operator* (const cl_UP_R& x, const cl_I& y) { return x.ring()->mul(x.ring()->canonhom(y),x); } #endif inline const cl_UP_R operator* (const cl_I& x, const cl_UP_R& y) { return y.ring()->scalmul(x,y); } inline const cl_UP_R operator* (const cl_UP_R& x, const cl_I& y) { return x.ring()->scalmul(y,x); } inline const cl_UP_R operator* (const cl_R& x, const cl_UP_R& y) { return y.ring()->scalmul(x,y); } inline const cl_UP_R operator* (const cl_UP_R& x, const cl_R& y) { return x.ring()->scalmul(y,x); } // Coefficient. inline const cl_R coeff (const cl_UP_R& x, uintL index) { return x.ring()->coeff(x,index); } // Destructive modification. inline void set_coeff (cl_UP_R& x, uintL index, const cl_R& y) { x.ring()->set_coeff(x,index,y); } inline void finalize (cl_UP_R& x) { x.ring()->finalize(x); } inline void cl_UP_R::set_coeff (uintL index, const cl_R& y) { ring()->set_coeff(*this,index,y); } inline void cl_UP_R::finalize () { ring()->finalize(*this); } // Evaluation. (No extension of the base ring allowed here for now.) inline const cl_R cl_UP_R::operator() (const cl_R& y) const { return ring()->eval(*this,y); } // Derivative. inline const cl_UP_R deriv (const cl_UP_R& x) { return The2(cl_UP_R)(deriv((const cl_UP&)x)); } #endif } // namespace cln #endif /* _CL_UNIVPOLY_REAL_H */ cln-1.3.3/include/cln/sfloat.h0000644000000000000000000002232611201634736013030 0ustar // Public short float operations. #ifndef _CL_SFLOAT_H #define _CL_SFLOAT_H #include "cln/number.h" #include "cln/sfloat_class.h" #include "cln/integer_class.h" #include "cln/float.h" namespace cln { CL_DEFINE_AS_CONVERSION(cl_SF) // Liefert zu einem Short-Float x : (- x), ein SF. extern const cl_SF operator- (const cl_SF& x); // compare(x,y) vergleicht zwei Short-Floats x und y. // Ergebnis: 0 falls x=y, +1 falls x>y, -1 falls x= (const cl_SF& x, const cl_SF& y) { return compare(x,y)>=0; } inline bool operator> (const cl_SF& x, const cl_SF& y) { return compare(x,y)>0; } // minusp(x) == (< x 0) extern bool minusp (const cl_SF& x); // zerop(x) stellt fest, ob ein Short-Float x = 0.0 ist. extern bool zerop (const cl_SF& x); // plusp(x) == (> x 0) extern bool plusp (const cl_SF& x); // Liefert zu zwei Short-Float x und y : (+ x y), ein SF. extern const cl_SF operator+ (const cl_SF& x, const cl_SF& y); // Liefert zu zwei Short-Float x und y : (- x y), ein SF. extern const cl_SF operator- (const cl_SF& x, const cl_SF& y); // Liefert zu zwei Short-Float x und y : (* x y), ein SF. extern const cl_SF operator* (const cl_SF& x, const cl_SF& y); // Liefert zu einem Short-Float x : (* x x), ein SF. inline const cl_SF square (const cl_SF& x) { return x*x; } // Liefert zu zwei Short-Float x und y : (/ x y), ein SF. extern const cl_SF operator/ (const cl_SF& x, const cl_SF& y); // Liefert zu einem Short-Float x>=0 : (sqrt x), ein SF. extern const cl_SF sqrt (const cl_SF& x); // recip(x) liefert (/ x), wo x ein Short-Float ist. extern const cl_SF recip (const cl_SF& x); // abs(x) liefert (abs x), wo x ein Short-Float ist. extern const cl_SF abs (const cl_SF& x); // (1+ x), wo x ein Short-Float ist. inline const cl_SF plus1 (const cl_SF& x) { extern const cl_SF cl_I_to_SF (const cl_I&); return x + cl_I_to_SF(cl_I(1)); } // (1- x), wo x ein Short-Float ist. inline const cl_SF minus1 (const cl_SF& x) { extern const cl_SF cl_I_to_SF (const cl_I&); return x + cl_I_to_SF(cl_I(-1)); } // ffloor(x) liefert (ffloor x), wo x ein SF ist. extern const cl_SF ffloor (const cl_SF& x); // fceiling(x) liefert (fceiling x), wo x ein SF ist. extern const cl_SF fceiling (const cl_SF& x); // ftruncate(x) liefert (ftruncate x), wo x ein SF ist. extern const cl_SF ftruncate (const cl_SF& x); // fround(x) liefert (fround x), wo x ein SF ist. extern const cl_SF fround (const cl_SF& x); // Return type for frounding operators. // x / y --> (q,r) with x = y*q+r. struct cl_SF_fdiv_t { cl_SF quotient; cl_SF remainder; // Constructor. cl_SF_fdiv_t () {} cl_SF_fdiv_t (const cl_SF& q, const cl_SF& r) : quotient(q), remainder(r) {} }; // ffloor2(x) liefert (ffloor x), wo x ein SF ist. inline const cl_SF_fdiv_t ffloor2 (const cl_SF& x) { cl_SF q = ffloor(x); return cl_SF_fdiv_t(q,x-q); } // fceiling2(x) liefert (fceiling x), wo x ein SF ist. inline const cl_SF_fdiv_t fceiling2 (const cl_SF& x) { cl_SF q = fceiling(x); return cl_SF_fdiv_t(q,x-q); } // ftruncate2(x) liefert (ftruncate x), wo x ein SF ist. inline const cl_SF_fdiv_t ftruncate2 (const cl_SF& x) { cl_SF q = ftruncate(x); return cl_SF_fdiv_t(q,x-q); } // fround2(x) liefert (fround x), wo x ein SF ist. inline const cl_SF_fdiv_t fround2 (const cl_SF& x) { cl_SF q = fround(x); return cl_SF_fdiv_t(q,x-q); } // Return type for rounding operators. // x / y --> (q,r) with x = y*q+r. struct cl_SF_div_t { cl_I quotient; cl_SF remainder; // Constructor. cl_SF_div_t () {} cl_SF_div_t (const cl_I& q, const cl_SF& r) : quotient(q), remainder(r) {} }; // floor2(x) liefert (floor x), wo x ein SF ist. inline const cl_SF_div_t floor2 (const cl_SF& x) { extern const cl_I cl_SF_to_I (const cl_SF& x); cl_SF q = ffloor(x); return cl_SF_div_t(cl_SF_to_I(q),x-q); } inline const cl_I floor1 (const cl_SF& x) { extern const cl_I cl_SF_to_I (const cl_SF& x); return cl_SF_to_I(ffloor(x)); } // ceiling2(x) liefert (ceiling x), wo x ein SF ist. inline const cl_SF_div_t ceiling2 (const cl_SF& x) { extern const cl_I cl_SF_to_I (const cl_SF& x); cl_SF q = fceiling(x); return cl_SF_div_t(cl_SF_to_I(q),x-q); } inline const cl_I ceiling1 (const cl_SF& x) { extern const cl_I cl_SF_to_I (const cl_SF& x); return cl_SF_to_I(fceiling(x)); } // truncate2(x) liefert (truncate x), wo x ein SF ist. inline const cl_SF_div_t truncate2 (const cl_SF& x) { extern const cl_I cl_SF_to_I (const cl_SF& x); cl_SF q = ftruncate(x); return cl_SF_div_t(cl_SF_to_I(q),x-q); } inline const cl_I truncate1 (const cl_SF& x) { extern const cl_I cl_SF_to_I (const cl_SF& x); return cl_SF_to_I(ftruncate(x)); } // round2(x) liefert (round x), wo x ein SF ist. inline const cl_SF_div_t round2 (const cl_SF& x) { extern const cl_I cl_SF_to_I (const cl_SF& x); cl_SF q = fround(x); return cl_SF_div_t(cl_SF_to_I(q),x-q); } inline const cl_I round1 (const cl_SF& x) { extern const cl_I cl_SF_to_I (const cl_SF& x); return cl_SF_to_I(fround(x)); } // floor2(x,y) liefert (floor x y). extern const cl_SF_div_t floor2 (const cl_SF& x, const cl_SF& y); inline const cl_I floor1 (const cl_SF& x, const cl_SF& y) { return floor1(x/y); } // ceiling2(x,y) liefert (ceiling x y). extern const cl_SF_div_t ceiling2 (const cl_SF& x, const cl_SF& y); inline const cl_I ceiling1 (const cl_SF& x, const cl_SF& y) { return ceiling1(x/y); } // truncate2(x,y) liefert (truncate x y). extern const cl_SF_div_t truncate2 (const cl_SF& x, const cl_SF& y); inline const cl_I truncate1 (const cl_SF& x, const cl_SF& y) { return truncate1(x/y); } // round2(x,y) liefert (round x y). extern const cl_SF_div_t round2 (const cl_SF& x, const cl_SF& y); inline const cl_I round1 (const cl_SF& x, const cl_SF& y) { return round1(x/y); } // Return type for decode_float: struct decoded_sfloat { cl_SF mantissa; cl_I exponent; cl_SF sign; // Constructor. decoded_sfloat () {} decoded_sfloat (const cl_SF& m, const cl_I& e, const cl_SF& s) : mantissa(m), exponent(e), sign(s) {} }; // decode_float(x) liefert zu einem Float x: (decode-float x). // x = 0.0 liefert (0.0, 0, 1.0). // x = (-1)^s * 2^e * m liefert ((-1)^0 * 2^0 * m, e als Integer, (-1)^s). extern const decoded_sfloat decode_float (const cl_SF& x); // float_exponent(x) liefert zu einem Float x: // den Exponenten von (decode-float x). // x = 0.0 liefert 0. // x = (-1)^s * 2^e * m liefert e. extern sintE float_exponent (const cl_SF& x); // float_radix(x) liefert (float-radix x), wo x ein Float ist. inline sintL float_radix (const cl_SF& x) { (void)x; // unused x return 2; } // float_sign(x) liefert (float-sign x), wo x ein Float ist. extern const cl_SF float_sign (const cl_SF& x); // float_digits(x) liefert (float-digits x), wo x ein Float ist. // < ergebnis: ein uintC >0 extern uintC float_digits (const cl_SF& x); // float_precision(x) liefert (float-precision x), wo x ein Float ist. // < ergebnis: ein uintC >=0 extern uintC float_precision (const cl_SF& x); // integer_decode_float(x) liefert zu einem Float x: (integer-decode-float x). // x = 0.0 liefert (0, 0, 1). // x = (-1)^s * 2^e * m bei Float-Precision p liefert // (Mantisse 2^p * m als Integer, e-p als Integer, (-1)^s als Fixnum). extern const cl_idecoded_float integer_decode_float (const cl_SF& x); // scale_float(x,delta) liefert x*2^delta, wo x ein SF ist. extern const cl_SF scale_float (const cl_SF& x, sintC delta); extern const cl_SF scale_float (const cl_SF& x, const cl_I& delta); // max(x,y) liefert (max x y), wo x und y Floats sind. extern const cl_SF max (const cl_SF& x, const cl_SF& y); // min(x,y) liefert (min x y), wo x und y Floats sind. extern const cl_SF min (const cl_SF& x, const cl_SF& y); // signum(x) liefert (signum x), wo x ein Float ist. extern const cl_SF signum (const cl_SF& x); // Konversion zu einem C "float". extern float float_approx (const cl_SF& x); // Konversion zu einem C "double". extern double double_approx (const cl_SF& x); // This could be optimized to use in-place operations. inline cl_SF& operator+= (cl_SF& x, const cl_SF& y) { return x = x + y; } inline cl_SF& operator++ /* prefix */ (cl_SF& x) { return x = plus1(x); } inline void operator++ /* postfix */ (cl_SF& x, int dummy) { (void)dummy; x = plus1(x); } inline cl_SF& operator-= (cl_SF& x, const cl_SF& y) { return x = x - y; } inline cl_SF& operator-- /* prefix */ (cl_SF& x) { return x = minus1(x); } inline void operator-- /* postfix */ (cl_SF& x, int dummy) { (void)dummy; x = minus1(x); } inline cl_SF& operator*= (cl_SF& x, const cl_SF& y) { return x = x * y; } inline cl_SF& operator/= (cl_SF& x, const cl_SF& y) { return x = x / y; } // Runtime typing support. extern cl_class cl_class_sfloat; CL_FORCE_LINK(cl_SF_classes_dummy, cl_class_sfloat) // Debugging support. #ifdef CL_DEBUG extern int cl_SF_debug_module; CL_FORCE_LINK(cl_SF_debug_dummy, cl_SF_debug_module) #endif } // namespace cln #endif /* _CL_SFLOAT_H */ cln-1.3.3/include/cln/GV_integer.h0000644000000000000000000000560111201634736013566 0ustar // General vectors of integers. #ifndef _CL_GV_INTEGER_H #define _CL_GV_INTEGER_H #include "cln/number.h" #include "cln/GV_rational.h" #include "cln/integer_class.h" #include "cln/io.h" namespace cln { // A vector of integers is *not* just a normal vector of numbers (the vectorops // support the maxbits() operation), but we treat can it like this nevertheless. template <> struct cl_heap_GV : cl_heap { cl_GV_inner v; // here room for the elements sintC maxbits () const; }; typedef cl_heap_GV cl_heap_GV_I; struct cl_GV_I : public cl_GV { public: // Constructors. cl_GV_I (); cl_GV_I (const cl_GV_I&); // Create a vector of unconstrained integers. explicit cl_GV_I (std::size_t len); // Create a vector of m-bit integers (>=0, <2^m). cl_GV_I (std::size_t len, sintC m); // Assignment operators. cl_GV_I& operator= (const cl_GV_I&); // Number m of bits allowed per element (-1 if unconstrained). sintC maxbits () const { return ((const cl_heap_GV_I *) pointer)->maxbits(); } // Private pointer manipulations. cl_GV_I (cl_heap_GV_I* p) : cl_GV (p) {} cl_GV_I (cl_private_thing p) : cl_GV (p) {} }; inline cl_GV_I::cl_GV_I (const cl_GV_I& x) : cl_GV (as_cl_private_thing(x)) {} CL_DEFINE_ASSIGNMENT_OPERATOR(cl_GV_I,cl_GV_I) extern cl_heap_GV_I* cl_make_heap_GV_I (std::size_t len); inline cl_GV_I::cl_GV_I (std::size_t len) : cl_GV (cl_make_heap_GV_I(len)) {} extern cl_heap_GV_I* cl_make_heap_GV_I (std::size_t len, sintC m); inline cl_GV_I::cl_GV_I (std::size_t len, sintC m) : cl_GV (cl_make_heap_GV_I(len,m)) {} // Private pointer manipulations. Never throw away a `struct cl_heap_GV_I *'! extern const cl_GV_I cl_null_GV_I; inline cl_GV_I::cl_GV_I () : cl_GV ((cl_heap_GV_I*) cl_null_GV_I) {} class cl_GV_I_init_helper { static int count; public: cl_GV_I_init_helper(); ~cl_GV_I_init_helper(); }; static cl_GV_I_init_helper cl_GV_I_init_helper_instance; // Copy a vector. extern const cl_GV_I copy (const cl_GV_I&); // Output. inline void fprint (std::ostream& stream, const cl_GV_I& x) { extern cl_print_flags default_print_flags; extern void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* fun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_GV_number& vector); extern void print_integer (std::ostream& stream, const cl_print_flags& flags, const cl_I& z); print_vector(stream, default_print_flags, (void (*) (std::ostream&, const cl_print_flags&, const cl_number&)) (void (*) (std::ostream&, const cl_print_flags&, const cl_I&)) &print_integer, x); } CL_DEFINE_PRINT_OPERATOR(cl_GV_I) // Debugging support. #ifdef CL_DEBUG extern int cl_GV_I_debug_module; CL_FORCE_LINK(cl_GV_I_debug_dummy, cl_GV_I_debug_module) #endif } // namespace cln #endif /* _CL_GV_INTEGER_H */ cln-1.3.3/include/cln/SV_real.h0000644000000000000000000000343111201634736013067 0ustar // Simple vectors of real numbers. #ifndef _CL_SV_REAL_H #define _CL_SV_REAL_H #include "cln/number.h" #include "cln/SV_complex.h" #include "cln/real_class.h" #include "cln/io.h" namespace cln { // A vector of real numbers is just a normal vector of numbers. typedef cl_heap_SV cl_heap_SV_R; struct cl_SV_R : public cl_SV { public: // Constructors. cl_SV_R () : cl_SV ((cl_heap_SV_R*) (cl_heap_SV_number*) cl_null_SV_number) {}; cl_SV_R (const cl_SV_R&); explicit cl_SV_R (std::size_t len) : cl_SV ((cl_heap_SV_R*) cl_make_heap_SV_number(len)) {}; // Assignment operators. cl_SV_R& operator= (const cl_SV_R&); // Private pointer manipulations. cl_SV_R (cl_heap_SV_R* p) : cl_SV (p) {} cl_SV_R (cl_private_thing p) : cl_SV (p) {} }; inline cl_SV_R::cl_SV_R (const cl_SV_R& x) : cl_SV (as_cl_private_thing(x)) {} CL_DEFINE_ASSIGNMENT_OPERATOR(cl_SV_R,cl_SV_R) // Copy a simple vector. inline const cl_SV_R copy (const cl_SV_R& vector) { return The(cl_SV_R) (copy((const cl_SV_N&) vector)); } // Output. inline void fprint (std::ostream& stream, const cl_SV_R& x) { extern cl_print_flags default_print_flags; extern void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* fun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_SV_number& vector); extern void print_real (std::ostream& stream, const cl_print_flags& flags, const cl_R& z); print_vector(stream, default_print_flags, (void (*) (std::ostream&, const cl_print_flags&, const cl_number&)) (void (*) (std::ostream&, const cl_print_flags&, const cl_R&)) &print_real, x); } CL_DEFINE_PRINT_OPERATOR(cl_SV_R) } // namespace cln #endif /* _CL_SV_REAL_H */ cln-1.3.3/include/cln/complex_ring.h0000644000000000000000000000103211201634736014215 0ustar // Built-in complex number ring. #ifndef _CL_COMPLEX_RING_H #define _CL_COMPLEX_RING_H #include "cln/ring.h" #include "cln/complex_class.h" namespace cln { typedef cl_specialized_number_ring cl_complex_ring; extern const cl_complex_ring cl_C_ring; // math. C extern cl_class cl_class_complex_ring; class cl_C_ring_init_helper { static int count; public: cl_C_ring_init_helper(); ~cl_C_ring_init_helper(); }; static cl_C_ring_init_helper cl_C_ring_init_helper_instance; } // namespace cln #endif /* _CL_COMPLEX_RING_H */ cln-1.3.3/include/cln/complex_class.h0000644000000000000000000000436311201634736014375 0ustar // Abstract class of complex numbers. #ifndef _CL_COMPLEX_CLASS_H #define _CL_COMPLEX_CLASS_H #include "cln/number.h" namespace cln { class cl_N : public cl_number { public: // Default constructor. cl_N (); // Copy constructor. cl_N (const cl_N&); // Converters. // Assignment operators. cl_N& operator= (const cl_N&); // Constructors and assignment operators from C numeric types. cl_N (const int); // |argument| must be < 2^29 cl_N (const unsigned int); // argument must be < 2^29 cl_N (const long); cl_N (const unsigned long); #ifdef HAVE_LONGLONG cl_N (const long long); cl_N (const unsigned long long); #endif cl_N (const float); cl_N (const double); cl_N& operator= (const int); // |argument| must be < 2^29 cl_N& operator= (const unsigned int); // argument must be < 2^29 cl_N& operator= (const long); cl_N& operator= (const unsigned long); cl_N& operator= (const float); cl_N& operator= (const double); #ifdef HAVE_LONGLONG cl_N& operator= (const long long); cl_N& operator= (const unsigned long long); #endif // Other constructors. cl_N (const char *); // Private constructor. cl_N (cl_private_thing); cl_N (struct cl_heap_complex *); public: // Ability to place an object at a given address. void* operator new (size_t size) { return malloc_hook(size); } void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void operator delete (void* ptr) { free_hook(ptr); } private: // Friend declarations. They are for the compiler. Just ignore them. }; // Private constructors. inline cl_N::cl_N (cl_private_thing ptr) : cl_number (ptr) {} // The assignment operators: CL_DEFINE_ASSIGNMENT_OPERATOR(cl_N, cl_N) // The default constructors. inline cl_N::cl_N () : cl_number ((cl_private_thing) cl_combine(cl_FN_tag,0)) {} // The copy constructors. CL_DEFINE_COPY_CONSTRUCTOR2(cl_N,cl_number) // Constructors and assignment operators from C numeric types. CL_DEFINE_INT_CONSTRUCTORS(cl_N) CL_DEFINE_INT_ASSIGNMENT_OPERATORS(cl_N) CL_DEFINE_LONG_CONSTRUCTORS(cl_N) CL_DEFINE_LONG_ASSIGNMENT_OPERATORS(cl_N) #ifdef HAVE_LONGLONG CL_DEFINE_LONGLONG_CONSTRUCTORS(cl_N) CL_DEFINE_LONGLONG_ASSIGNMENT_OPERATORS(cl_N) #endif CL_DEFINE_FLOAT_CONSTRUCTOR(cl_N) CL_DEFINE_DOUBLE_CONSTRUCTOR(cl_N) } // namespace cln #endif /* _CL_COMPLEX_CLASS_H */ cln-1.3.3/include/cln/GV_number.h0000644000000000000000000000323111201634736013416 0ustar // General vectors of numbers. #ifndef _CL_GV_NUMBER_H #define _CL_GV_NUMBER_H #include "cln/number.h" #include "cln/GV.h" namespace cln { typedef cl_heap_GV cl_heap_GV_number; struct cl_GV_number : public cl_GV { public: // Constructors. cl_GV_number (); cl_GV_number (const cl_GV_number&); explicit cl_GV_number (std::size_t len); // Assignment operators. cl_GV_number& operator= (const cl_GV_number&); // Private pointer manipulations. cl_GV_number (cl_heap_GV_number* p) : cl_GV (p) {} cl_GV_number (cl_private_thing p) : cl_GV (p) {} }; inline cl_GV_number::cl_GV_number (const cl_GV_number& x) : cl_GV (as_cl_private_thing(x)) {} CL_DEFINE_ASSIGNMENT_OPERATOR(cl_GV_number,cl_GV_number) extern cl_heap_GV_number* cl_make_heap_GV_number (std::size_t len); inline cl_GV_number::cl_GV_number (std::size_t len) : cl_GV (cl_make_heap_GV_number(len)) {} // Private pointer manipulations. Never throw away a `struct cl_heap_GV_number *'! extern const cl_GV_number cl_null_GV_number; inline cl_GV_number::cl_GV_number () : cl_GV ((cl_heap_GV_number*) cl_null_GV_number) {} class cl_GV_number_init_helper { static int count; public: cl_GV_number_init_helper(); ~cl_GV_number_init_helper(); }; static cl_GV_number_init_helper cl_GV_number_init_helper_instance; // Copy a vector. extern const cl_GV_number copy (const cl_GV_number&); // Debugging support. #ifdef CL_DEBUG extern int cl_GV_number_debug_module; CL_FORCE_LINK(cl_GV_number_debug_dummy, cl_GV_number_debug_module) #endif } // namespace cln #endif /* _CL_GV_NUMBER_H */ cln-1.3.3/include/cln/number_io.h0000644000000000000000000000166611201634736013523 0ustar // I/O of numbers. #ifndef _CL_NUMBER_IO_H #define _CL_NUMBER_IO_H #include "cln/io.h" #include "cln/number.h" #include "cln/exception.h" namespace cln { // Input. class read_number_exception : public runtime_exception { public: explicit read_number_exception(const std::string & what) : runtime_exception(what) {} }; // Finish with bad syntax. class read_number_bad_syntax_exception : public read_number_exception { public: read_number_bad_syntax_exception(const char * string, const char * string_limit); }; // Finish with junk after the number. class read_number_junk_exception : public read_number_exception { public: read_number_junk_exception(const char * string_rest, const char * string, const char * string_limit); }; // Finish with premature EOF. class read_number_eof_exception : public read_number_exception { public: read_number_eof_exception(); }; struct cl_read_flags; } // namespace cln #endif /* _CL_NUMBER_IO_H */ cln-1.3.3/include/cln/numtheory.h0000644000000000000000000000625211201634736013572 0ustar // Number theoretic operations. #ifndef _CL_NUMTHEORY_H #define _CL_NUMTHEORY_H #include "cln/number.h" #include "cln/integer.h" #include "cln/modinteger.h" #include "cln/condition.h" namespace cln { // jacobi(a,b) returns the Jacobi symbol // ( a ) // ( --- ) // ( b ) // a, b must be integers, b > 0, b odd. The result is 0 iff gcd(a,b) > 1. extern int jacobi (sintV a, sintV b); extern int jacobi (const cl_I& a, const cl_I& b); // isprobprime(n), n integer > 0, // returns true when n is probably prime. // This is pretty quick, but no caching is done. extern bool isprobprime (const cl_I& n); // nextprobprime(x) returns the smallest probable prime >= x. extern const cl_I nextprobprime (const cl_R& x); #if 0 // primitive_root(R) of R = Z/pZ, with p a probable prime, // returns // either a generator of (Z/pZ)^*, assuming p is prime, or // a proof that p is not prime, maybe even a non-trivial factor of p. struct primitive_root_t { cl_composite_condition* condition; cl_MI gen; // Constructors. primitive_root_t (cl_composite_condition* c) : condition (c) {} primitive_root_t (const cl_MI& g) : condition (NULL), gen (g) {} }; extern const primitive_root_t primitive_root (const cl_modint_ring& R); #endif // sqrt_mod_p(R,x) where x is an element of R = Z/pZ, with p a probable prime, // returns // either the square roots of x in R, assuming p is prime, or // a proof that p is not prime, maybe even a non-trivial factor of p. struct sqrt_mod_p_t { cl_composite_condition* condition; // If no condition: int solutions; // 0,1,2 cl_I factor; // zero or non-trivial factor of p cl_MI solution[2]; // max. 2 solutions // Constructors. sqrt_mod_p_t () {} sqrt_mod_p_t (cl_composite_condition* c) : condition (c) {} sqrt_mod_p_t (int s) : condition (NULL), solutions (s) {} sqrt_mod_p_t (int s, const cl_MI& x0) : condition (NULL), solutions (s) { solution[0] = x0; } sqrt_mod_p_t (int s, const cl_MI& x0, const cl_MI& x1) : condition (NULL), solutions (s) { solution[0] = x0; solution[1] = x1; } }; extern const sqrt_mod_p_t sqrt_mod_p (const cl_modint_ring& R, const cl_MI& x); // cornacchia1(d,p) solves x^2 + d*y^2 = p. // cornacchia4(d,p) solves x^2 + d*y^2 = 4*p. // d is an integer > 0, p is a probable prime. // It returns // either a nonnegative solution (x,y), if it exists, assuming p is prime, or // a proof that p is not prime, maybe even a non-trivial factor of p. struct cornacchia_t { cl_composite_condition* condition; // If no condition: int solutions; // 0,1 // If solutions=1 and d > 4 (d > 64 for cornacchia4): // All solutions are (x,y), (-x,y), (x,-y), (-x,-y). cl_I solution_x; // x >= 0 cl_I solution_y; // y >= 0 // Constructors. cornacchia_t () {} cornacchia_t (cl_composite_condition* c) : condition (c) {} cornacchia_t (int s) : condition (NULL), solutions (s) {} cornacchia_t (int s, const cl_I& x, const cl_I& y) : condition (NULL), solutions (s), solution_x (x), solution_y (y) {} }; extern const cornacchia_t cornacchia1 (const cl_I& d, const cl_I& p); extern const cornacchia_t cornacchia4 (const cl_I& d, const cl_I& p); } // namespace cln #endif /* _CL_NUMTHEORY_H */ cln-1.3.3/include/cln/sfloat_io.h0000644000000000000000000000155011201634736013513 0ustar // I/O of sfloats. #ifndef _CL_SFLOAT_IO_H #define _CL_SFLOAT_IO_H #include "cln/number_io.h" #include "cln/sfloat.h" namespace cln { inline std::istream& operator>> (std::istream& stream, cl_SF& result) { extern cl_read_flags cl_SF_read_flags; extern const cl_F read_float (std::istream&, const cl_read_flags&); result = As(cl_SF)(read_float(stream,cl_SF_read_flags)); return stream; } // The following does strictly the same as the general `fprint' for floats. // It is here only so that people don't need to include . inline void fprint (std::ostream& stream, const cl_SF& x) { extern void print_float (std::ostream& stream, const cl_print_flags& flags, const cl_F& z); extern cl_print_flags default_print_flags; print_float(stream,default_print_flags,x); } CL_DEFINE_PRINT_OPERATOR(cl_SF) } // namespace cln #endif /* _CL_SFLOAT_IO_H */ cln-1.3.3/include/cln/GV_modinteger.h0000644000000000000000000000270711201634736014272 0ustar // General vectors of modular integers. #ifndef _CL_GV_MODINTEGER_H #define _CL_GV_MODINTEGER_H #include "cln/modinteger.h" #include "cln/GV_integer.h" namespace cln { // A vector of modular integers (over the same modular integer ring) // is just a normal vector of integers, with maxbits() operation. template <> struct cl_heap_GV<_cl_MI> : cl_heap { cl_GV_inner<_cl_MI> v; // here room for the elements }; typedef cl_heap_GV<_cl_MI> cl_heap_GV_MI; struct cl_GV_MI : public cl_GV<_cl_MI,cl_GV_any> { public: // Constructors. cl_GV_MI (); cl_GV_MI (const cl_GV_MI&); // Create a vector of modular integers. cl_GV_MI (std::size_t len, cl_heap_modint_ring* R); // Assignment operators. cl_GV_MI& operator= (const cl_GV_MI&); // Number m of bits allowed per element (-1 if unconstrained). sintC maxbits () const { return ((const cl_heap_GV_I *) pointer)->maxbits(); } }; inline cl_GV_MI::cl_GV_MI (const cl_GV_MI& x) : cl_GV<_cl_MI,cl_GV_any> (as_cl_private_thing(x)) {} CL_DEFINE_ASSIGNMENT_OPERATOR(cl_GV_MI,cl_GV_MI) inline cl_GV_MI::cl_GV_MI () : cl_GV<_cl_MI,cl_GV_any> ((cl_heap_GV_MI*) (cl_heap_GV_I*) cl_null_GV_I) {} inline cl_GV_MI::cl_GV_MI (std::size_t len, cl_heap_modint_ring* R) : cl_GV<_cl_MI,cl_GV_any> ((cl_heap_GV_MI*) cl_make_heap_GV_I(len,R->bits)) {} // Copy a vector. inline const cl_GV_MI copy (const cl_GV_MI& vector) { return The(cl_GV_MI) (copy((const cl_GV_I&) vector)); } } // namespace cln #endif /* _CL_GV_MODINTEGER_H */ cln-1.3.3/include/cln/exception.h0000644000000000000000000000167011201634736013535 0ustar // Exception types. #ifndef _CL_EXCEPTION_H #define _CL_EXCEPTION_H #include namespace cln { // Base class of all exception classes thrown by CLN. class runtime_exception : public std::runtime_error { public: runtime_exception () : std::runtime_error(std::string()) {} explicit runtime_exception (const std::string & what) : std::runtime_error(what) {} }; // Thrown when an assertion is violated. class notreached_exception : public runtime_exception { public: notreached_exception (const char* filename, int lineno); }; // Thrown when a pole is encountered. class division_by_0_exception : public runtime_exception { public: division_by_0_exception (); }; // Thrown when a conversion with As(TYPE)(VALUE) fails. class as_exception : public runtime_exception { public: as_exception (const class cl_number& obj, const char * typestring, const char * filename, int line); }; } // namespace cln #endif /* _CL_EXCEPTION_H */ cln-1.3.3/include/cln/real.h0000644000000000000000000006414511201634736012470 0ustar // Public real number operations. #ifndef _CL_REAL_H #define _CL_REAL_H #include "cln/number.h" #include "cln/real_class.h" #include "cln/rational_class.h" #include "cln/integer_class.h" #include "cln/float.h" #include "cln/floatformat.h" #include "cln/random.h" namespace cln { CL_DEFINE_AS_CONVERSION(cl_R) // zerop(x) testet, ob (= x 0). extern bool zerop (const cl_R& x); // minusp(x) testet, ob (< x 0). extern bool minusp (const cl_R& x); // plusp(x) testet, ob (> x 0). extern bool plusp (const cl_R& x); // R_to_SF(x) wandelt eine reelle Zahl x in ein Short-Float um. // < ergebnis: (coerce x 'short-float) extern const cl_SF cl_R_to_SF (const cl_R& x); // R_to_FF(x) wandelt eine reelle Zahl x in ein Single-Float um. // < ergebnis: (coerce x 'single-float) extern const cl_FF cl_R_to_FF (const cl_R& x); // R_to_DF(x) wandelt eine reelle Zahl x in ein Double-Float um. // < ergebnis: (coerce x 'double-float) extern const cl_DF cl_R_to_DF (const cl_R& x); // R_to_LF(x,len) wandelt eine reelle Zahl x in ein Long-Float mit len Digits um. // > uintC len: gewünschte Anzahl Digits, >=LF_minlen // < ergebnis: (coerce x `(long-float ,len)) extern const cl_LF cl_R_to_LF (const cl_R& x, uintC len); // cl_float(x,y) wandelt eine reelle Zahl x in das Float-Format des // Floats y um und rundet dabei nötigenfalls. // > x: eine reelle Zahl // > y: ein Float // < ergebnis: (float x y) extern const cl_F cl_float (const cl_R& x, const cl_F& y); // cl_float(x,f) wandelt eine reelle Zahl x in das Float-Format f um // und rundet dabei nötigenfalls. // > x: eine reelle Zahl // > f: eine Float-Format-Spezifikation // < ergebnis: (float x f) extern const cl_F cl_float (const cl_R& x, float_format_t f); // cl_float(x) wandelt eine reelle Zahl x in ein Float um // und rundet dabei nötigenfalls. // > x: eine reelle Zahl // < ergebnis: (float x) // Abhängig von default_float_format. extern const cl_F cl_float (const cl_R& x); // Liefert (- x), wo x eine reelle Zahl ist. extern const cl_R operator- (const cl_R& x); // Liefert (+ x y), wo x und y reelle Zahlen sind. extern const cl_R operator+ (const cl_R& x, const cl_R& y); // Spezialfall: x oder y Float -> Ergebnis Float inline const cl_F operator+ (const cl_R& x, const cl_F& y) { return The(cl_F)(x + The(cl_R)(y)); } inline const cl_F operator+ (const cl_F& x, const cl_R& y) { return The(cl_F)(The(cl_R)(x) + y); } // Dem C++-Compiler muß man nun auch das Folgende sagen: inline const cl_R operator+ (const int x, const cl_R& y) { return cl_I(x) + y; } inline const cl_R operator+ (const unsigned int x, const cl_R& y) { return cl_I(x) + y; } inline const cl_R operator+ (const long x, const cl_R& y) { return cl_I(x) + y; } inline const cl_R operator+ (const unsigned long x, const cl_R& y) { return cl_I(x) + y; } #ifdef HAVE_LONGLONG inline const cl_R operator+ (const long long x, const cl_R& y) { return cl_I(x) + y; } inline const cl_R operator+ (const unsigned long long x, const cl_R& y) { return cl_I(x) + y; } #endif inline const cl_F operator+ (const float x, const cl_R& y) { return The(cl_F)(cl_R(x) + y); } inline const cl_F operator+ (const double x, const cl_R& y) { return The(cl_F)(cl_R(x) + y); } inline const cl_R operator+ (const cl_R& x, const int y) { return x + cl_I(y); } inline const cl_R operator+ (const cl_R& x, const unsigned int y) { return x + cl_I(y); } inline const cl_R operator+ (const cl_R& x, const long y) { return x + cl_I(y); } inline const cl_R operator+ (const cl_R& x, const unsigned long y) { return x + cl_I(y); } #ifdef HAVE_LONGLONG inline const cl_R operator+ (const cl_R& x, const long long y) { return x + cl_I(y); } inline const cl_R operator+ (const cl_R& x, const unsigned long long y) { return x + cl_I(y); } #endif inline const cl_F operator+ (const cl_R& x, const float y) { return The(cl_F)(x + cl_R(y)); } inline const cl_F operator+ (const cl_R& x, const double y) { return The(cl_F)(x + cl_R(y)); } // Liefert (- x y), wo x und y reelle Zahlen sind. extern const cl_R operator- (const cl_R& x, const cl_R& y); // Spezialfall: x oder y Float -> Ergebnis Float inline const cl_F operator- (const cl_R& x, const cl_F& y) { return The(cl_F)(x - The(cl_R)(y)); } inline const cl_F operator- (const cl_F& x, const cl_R& y) { return The(cl_F)(The(cl_R)(x) - y); } // Dem C++-Compiler muß man nun auch das Folgende sagen: inline const cl_R operator- (const int x, const cl_R& y) { return cl_I(x) - y; } inline const cl_R operator- (const unsigned int x, const cl_R& y) { return cl_I(x) - y; } inline const cl_R operator- (const long x, const cl_R& y) { return cl_I(x) - y; } inline const cl_R operator- (const unsigned long x, const cl_R& y) { return cl_I(x) - y; } #ifdef HAVE_LONGLONG inline const cl_R operator- (const long long x, const cl_R& y) { return cl_I(x) - y; } inline const cl_R operator- (const unsigned long long x, const cl_R& y) { return cl_I(x) - y; } #endif inline const cl_F operator- (const float x, const cl_R& y) { return The(cl_F)(cl_R(x) - y); } inline const cl_F operator- (const double x, const cl_R& y) { return The(cl_F)(cl_R(x) - y); } inline const cl_R operator- (const cl_R& x, const int y) { return x - cl_I(y); } inline const cl_R operator- (const cl_R& x, const unsigned int y) { return x - cl_I(y); } inline const cl_R operator- (const cl_R& x, const long y) { return x - cl_I(y); } inline const cl_R operator- (const cl_R& x, const unsigned long y) { return x - cl_I(y); } #ifdef HAVE_LONGLONG inline const cl_R operator- (const cl_R& x, const long long y) { return x - cl_I(y); } inline const cl_R operator- (const cl_R& x, const unsigned long long y) { return x - cl_I(y); } #endif inline const cl_F operator- (const cl_R& x, const float y) { return The(cl_F)(x - cl_R(y)); } inline const cl_F operator- (const cl_R& x, const double y) { return The(cl_F)(x - cl_R(y)); } // Liefert (* x y), wo x und y reelle Zahlen sind. extern const cl_R operator* (const cl_R& x, const cl_R& y); // Dem C++-Compiler muß man auch das Folgende sagen (wg. `int * cl_F' u.ä.): inline const cl_R operator* (const int x, const cl_R& y) { return cl_I(x) * y; } inline const cl_R operator* (const unsigned int x, const cl_R& y) { return cl_I(x) * y; } inline const cl_R operator* (const long x, const cl_R& y) { return cl_I(x) * y; } inline const cl_R operator* (const unsigned long x, const cl_R& y) { return cl_I(x) * y; } #ifdef HAVE_LONGLONG inline const cl_R operator* (const long long x, const cl_R& y) { return cl_I(x) * y; } inline const cl_R operator* (const unsigned long long x, const cl_R& y) { return cl_I(x) * y; } #endif inline const cl_R operator* (const float x, const cl_R& y) { return cl_R(x) * y; } inline const cl_R operator* (const double x, const cl_R& y) { return cl_R(x) * y; } inline const cl_R operator* (const cl_R& x, const int y) { return x * cl_I(y); } inline const cl_R operator* (const cl_R& x, const unsigned int y) { return x * cl_I(y); } inline const cl_R operator* (const cl_R& x, const long y) { return x * cl_I(y); } inline const cl_R operator* (const cl_R& x, const unsigned long y) { return x * cl_I(y); } #ifdef HAVE_LONGLONG inline const cl_R operator* (const cl_R& x, const long long y) { return x * cl_I(y); } inline const cl_R operator* (const cl_R& x, const unsigned long long y) { return x * cl_I(y); } #endif inline const cl_R operator* (const cl_R& x, const float y) { return x * cl_R(y); } inline const cl_R operator* (const cl_R& x, const double y) { return x * cl_R(y); } // Liefert (* x x), wo x eine reelle Zahl ist. extern const cl_R square (const cl_R& x); // Liefert (/ x y), wo x und y reelle Zahlen sind. extern const cl_R operator/ (const cl_R& x, const cl_R& y); // Spezialfall: x Float -> Ergebnis Float inline const cl_F operator/ (const cl_F& x, const cl_R& y) { return The(cl_F)(The(cl_R)(x) / y); } // Dem C++-Compiler muß man auch das Folgende sagen (wg. `int / cl_F' u.ä.): inline const cl_R operator/ (const int x, const cl_R& y) { return cl_I(x) / y; } inline const cl_R operator/ (const unsigned int x, const cl_R& y) { return cl_I(x) / y; } inline const cl_R operator/ (const long x, const cl_R& y) { return cl_I(x) / y; } inline const cl_R operator/ (const unsigned long x, const cl_R& y) { return cl_I(x) / y; } #ifdef HAVE_LONGLONG inline const cl_R operator/ (const long long x, const cl_R& y) { return cl_I(x) / y; } inline const cl_R operator/ (const unsigned long long x, const cl_R& y) { return cl_I(x) / y; } #endif inline const cl_F operator/ (const float x, const cl_R& y) { return The(cl_F)(cl_R(x) / y); } inline const cl_F operator/ (const double x, const cl_R& y) { return The(cl_F)(cl_R(x) / y); } inline const cl_R operator/ (const cl_R& x, const int y) { return x / cl_I(y); } inline const cl_R operator/ (const cl_R& x, const unsigned int y) { return x / cl_I(y); } inline const cl_R operator/ (const cl_R& x, const long y) { return x / cl_I(y); } inline const cl_R operator/ (const cl_R& x, const unsigned long y) { return x / cl_I(y); } #ifdef HAVE_LONGLONG inline const cl_R operator/ (const cl_R& x, const long long y) { return x / cl_I(y); } inline const cl_R operator/ (const cl_R& x, const unsigned long long y) { return x / cl_I(y); } #endif inline const cl_R operator/ (const cl_R& x, const float y) { return x / cl_R(y); } inline const cl_R operator/ (const cl_R& x, const double y) { return x / cl_R(y); } // Liefert (abs x), wo x eine reelle Zahl ist. extern const cl_R abs (const cl_R& x); // recip(x) liefert (/ x), wo x eine reelle Zahl ist. extern const cl_R recip (const cl_R& x); // (1+ x), wo x eine reelle Zahl ist. extern const cl_R plus1 (const cl_R& x); // (1- x), wo x eine reelle Zahl ist. extern const cl_R minus1 (const cl_R& x); // Return type for rounding operators. // x / y --> (q,r) with x = y*q+r. struct cl_R_div_t { cl_I quotient; cl_R remainder; // Constructor. cl_R_div_t () {} cl_R_div_t (const cl_I& q, const cl_R& r) : quotient(q), remainder(r) {} cl_R_div_t (const struct cl_I_div_t &); cl_R_div_t (const struct cl_RA_div_t &); cl_R_div_t (const struct cl_F_div_t &); }; // floor2(x) liefert (floor x), wo x eine reelle Zahl ist. extern const cl_R_div_t floor2 (const cl_R& x); extern const cl_I floor1 (const cl_R& x); // ceiling2(x) liefert (ceiling x), wo x eine reelle Zahl ist. extern const cl_R_div_t ceiling2 (const cl_R& x); extern const cl_I ceiling1 (const cl_R& x); // truncate2(x) liefert (truncate x), wo x eine reelle Zahl ist. extern const cl_R_div_t truncate2 (const cl_R& x); extern const cl_I truncate1 (const cl_R& x); // round2(x) liefert (round x), wo x eine reelle Zahl ist. extern const cl_R_div_t round2 (const cl_R& x); extern const cl_I round1 (const cl_R& x); // floor2(x,y) liefert (floor x y), wo x und y reelle Zahlen sind. extern const cl_R_div_t floor2 (const cl_R& x, const cl_R& y); extern const cl_I floor1 (const cl_R& x, const cl_R& y); // ceiling2(x,y) liefert (ceiling x y), wo x und y reelle Zahlen sind. extern const cl_R_div_t ceiling2 (const cl_R& x, const cl_R& y); extern const cl_I ceiling1 (const cl_R& x, const cl_R& y); // truncate2(x,y) liefert (truncate x y), wo x und y reelle Zahlen sind. extern const cl_R_div_t truncate2 (const cl_R& x, const cl_R& y); extern const cl_I truncate1 (const cl_R& x, const cl_R& y); // round2(x,y) liefert (round x y), wo x und y reelle Zahlen sind. extern const cl_R_div_t round2 (const cl_R& x, const cl_R& y); extern const cl_I round1 (const cl_R& x, const cl_R& y); // Return type for frounding operators. // x / y --> (q,r) with x = y*q+r. struct cl_R_fdiv_t { cl_F quotient; cl_R remainder; // Constructor. cl_R_fdiv_t () {} cl_R_fdiv_t (const cl_F& q, const cl_R& r) : quotient(q), remainder(r) {} cl_R_fdiv_t (const struct cl_F_fdiv_t &); }; // ffloor2(x) liefert (ffloor x), wo x eine reelle Zahl ist. extern const cl_R_fdiv_t ffloor2 (const cl_R& x); extern const cl_F ffloor (const cl_R& x); // fceiling2(x) liefert (fceiling x), wo x eine reelle Zahl ist. extern const cl_R_fdiv_t fceiling2 (const cl_R& x); extern const cl_F fceiling (const cl_R& x); // ftruncate2(x) liefert (ftruncate x), wo x eine reelle Zahl ist. extern const cl_R_fdiv_t ftruncate2 (const cl_R& x); extern const cl_F ftruncate (const cl_R& x); // fround2(x) liefert (fround x), wo x eine reelle Zahl ist. extern const cl_R_fdiv_t fround2 (const cl_R& x); extern const cl_F fround (const cl_R& x); // ffloor2(x,y) liefert (ffloor x y), wo x und y reelle Zahlen sind. extern const cl_R_fdiv_t ffloor2 (const cl_R& x, const cl_R& y); extern const cl_F ffloor (const cl_R& x, const cl_R& y); // fceiling2(x,y) liefert (fceiling x y), wo x und y reelle Zahlen sind. extern const cl_R_fdiv_t fceiling2 (const cl_R& x, const cl_R& y); extern const cl_F fceiling (const cl_R& x, const cl_R& y); // ftruncate2(x,y) liefert (ftruncate x y), wo x und y reelle Zahlen sind. extern const cl_R_fdiv_t ftruncate2 (const cl_R& x, const cl_R& y); extern const cl_F ftruncate (const cl_R& x, const cl_R& y); // fround2(x,y) liefert (fround x y), wo x und y reelle Zahlen sind. extern const cl_R_fdiv_t fround2 (const cl_R& x, const cl_R& y); extern const cl_F fround (const cl_R& x, const cl_R& y); // mod(x,y) = (mod x y), wo x und y reelle Zahlen sind. extern const cl_R mod (const cl_R& x, const cl_R& y); // rem(x,y) = (rem x y), wo x und y reelle Zahlen sind. extern const cl_R rem (const cl_R& x, const cl_R& y); // rational(x) liefert (rational x), wo x eine reelle Zahl ist. extern const cl_RA rational (const cl_R& x); // Spezialfall: inline const cl_RA rational (const cl_RA& x) { return x; } // equal(x,y) vergleicht zwei reelle Zahlen x und y auf Gleichheit. extern bool equal (const cl_R& x, const cl_R& y); // equal_hashcode(x) liefert einen equal-invarianten Hashcode für x. extern uint32 equal_hashcode (const cl_R& x); // compare(x,y) vergleicht zwei reelle Zahlen x und y. // Ergebnis: 0 falls x=y, +1 falls x>y, -1 falls x= (const cl_R& x, const cl_R& y) { return compare(x,y)>=0; } inline bool operator> (const cl_R& x, const cl_R& y) { return compare(x,y)>0; } // max(x,y) liefert (max x y), wo x und y reelle Zahlen sind. extern const cl_R max (const cl_R& x, const cl_R& y); // min(x,y) liefert (min x y), wo x und y reelle Zahlen sind. extern const cl_R min (const cl_R& x, const cl_R& y); // signum(x) liefert (signum x), wo x eine reelle Zahl ist. extern const cl_R signum (const cl_R& x); // sqrt(x) = (sqrt x) zieht die Wurzel aus einer reellen Zahl x >=0. extern const cl_R sqrt (const cl_R& x); // sqrt(x) = (sqrt x) zieht die Wurzel aus einer rationalen Zahl x >=0. extern const cl_R sqrt (const cl_RA& x); // (expt x y), wo x eine reelle Zahl und y ein Integer ist. extern const cl_R expt (const cl_R& x, sintL y); extern const cl_R expt (const cl_R& x, const cl_I& y); // rationalize(x) liefert (rationalize x), wo x eine reelle Zahl ist. extern const cl_RA rationalize (const cl_R& x); // Konversion zu einem C "float". extern float float_approx (const cl_R& x); // Konversion zu einem C "double". extern double double_approx (const cl_R& x); // Transcendental functions // atan(x,y) liefert zu zwei reellen Zahlen x, y den Winkel von (x,y) // in Polarkoordinaten. Ergebnis rational nur, wenn x>0 und y=0. extern const cl_R atan (const cl_R& x, const cl_R& y); // Spezialfall: y Float -> Ergebnis Float inline const cl_F atan (const cl_R& x, const cl_F& y) { return The(cl_F)(atan(x,The(cl_R)(y))); } // Dem C++-Compiler muß man nun auch das Folgende sagen: inline const cl_R atan (const cl_R& x, const int y) { return atan(x,cl_I(y)); } inline const cl_R atan (const cl_R& x, const unsigned int y) { return atan(x,cl_I(y)); } inline const cl_R atan (const cl_R& x, const long y) { return atan(x,cl_I(y)); } inline const cl_R atan (const cl_R& x, const unsigned long y) { return atan(x,cl_I(y)); } // atan(x) liefert den Arctan einer reellen Zahl x. // Ergebnis rational nur, wenn x=0. extern const cl_R atan (const cl_R& x); // Spezialfall: x Float -> Ergebnis Float inline const cl_F atan (const cl_F& x) { return The(cl_F)(atan(The(cl_R)(x))); } // Dem C++-Compiler muß man nun auch das Folgende sagen: inline const cl_R atan (const int x) { return atan(cl_I(x)); } inline const cl_R atan (const unsigned int x) { return atan(cl_I(x)); } inline const cl_R atan (const long x) { return atan(cl_I(x)); } inline const cl_R atan (const unsigned long x) { return atan(cl_I(x)); } // sin(x) liefert den Sinus (sin x) einer reellen Zahl x. extern const cl_R sin (const cl_R& x); // Dem C++-Compiler muß man nun auch das Folgende sagen: inline const cl_R sin (const int x) { return sin(cl_I(x)); } inline const cl_R sin (const unsigned int x) { return sin(cl_I(x)); } inline const cl_R sin (const long x) { return sin(cl_I(x)); } inline const cl_R sin (const unsigned long x) { return sin(cl_I(x)); } // cos(x) liefert den Cosinus (cos x) einer reellen Zahl x. extern const cl_R cos (const cl_R& x); // Dem C++-Compiler muß man nun auch das Folgende sagen: inline const cl_R cos (const int x) { return cos(cl_I(x)); } inline const cl_R cos (const unsigned int x) { return cos(cl_I(x)); } inline const cl_R cos (const long x) { return cos(cl_I(x)); } inline const cl_R cos (const unsigned long x) { return cos(cl_I(x)); } // cos_sin(x) liefert ((cos x),(sin x)), beide Werte. extern const cos_sin_t cos_sin (const cl_R& x); // tan(x) liefert den Tangens (tan x) einer reellen Zahl x. extern const cl_R tan (const cl_R& x); // Dem C++-Compiler muß man nun auch das Folgende sagen: inline const cl_R tan (const int x) { return tan(cl_I(x)); } inline const cl_R tan (const unsigned int x) { return tan(cl_I(x)); } inline const cl_R tan (const long x) { return tan(cl_I(x)); } inline const cl_R tan (const unsigned long x) { return tan(cl_I(x)); } // ln(x) liefert zu einer reellen Zahl x>0 die Zahl ln(x). extern const cl_R ln (const cl_R& x); // Dem C++-Compiler muß man nun auch das Folgende sagen: inline const cl_R ln (const int x) { return ln(cl_I(x)); } inline const cl_R ln (const unsigned int x) { return ln(cl_I(x)); } inline const cl_R ln (const long x) { return ln(cl_I(x)); } inline const cl_R ln (const unsigned long x) { return ln(cl_I(x)); } // log(a,b) liefert zu reellen Zahlen a>0, b>0 die Zahl // log(a,b)=ln(a)/ln(b). // Ergebnis rational nur, wenn a=1 oder a und b rational. extern const cl_R log (const cl_R& a, const cl_R& b); // exp(x) liefert zu einer reellen Zahl x die Zahl exp(x). extern const cl_R exp (const cl_R& x); // Dem C++-Compiler muß man nun auch das Folgende sagen: inline const cl_R exp (const int x) { return exp(cl_I(x)); } inline const cl_R exp (const unsigned int x) { return exp(cl_I(x)); } inline const cl_R exp (const long x) { return exp(cl_I(x)); } inline const cl_R exp (const unsigned long x) { return exp(cl_I(x)); } // sinh(x) liefert zu einer reellen Zahl x die Zahl sinh(x). extern const cl_R sinh (const cl_R& x); // Dem C++-Compiler muß man nun auch das Folgende sagen: inline const cl_R sinh (const int x) { return sinh(cl_I(x)); } inline const cl_R sinh (const unsigned int x) { return sinh(cl_I(x)); } inline const cl_R sinh (const long x) { return sinh(cl_I(x)); } inline const cl_R sinh (const unsigned long x) { return sinh(cl_I(x)); } // cosh(x) liefert zu einer reellen Zahl x die Zahl cosh(x). extern const cl_R cosh (const cl_R& x); // Dem C++-Compiler muß man nun auch das Folgende sagen: inline const cl_R cosh (const int x) { return cosh(cl_I(x)); } inline const cl_R cosh (const unsigned int x) { return cosh(cl_I(x)); } inline const cl_R cosh (const long x) { return cosh(cl_I(x)); } inline const cl_R cosh (const unsigned long x) { return cosh(cl_I(x)); } // cosh_sinh(x) liefert ((cosh x),(sinh x)), beide Werte. extern const cosh_sinh_t cosh_sinh (const cl_R& x); // tanh(x) liefert zu einer reellen Zahl x die Zahl tanh(x). extern const cl_R tanh (const cl_R& x); // Dem C++-Compiler muß man nun auch das Folgende sagen: inline const cl_R tanh (const int x) { return tanh(cl_I(x)); } inline const cl_R tanh (const unsigned int x) { return tanh(cl_I(x)); } inline const cl_R tanh (const long x) { return tanh(cl_I(x)); } inline const cl_R tanh (const unsigned long x) { return tanh(cl_I(x)); } // random_R(randomstate,n) liefert zu einer reellen Zahl n>0 eine Zufallszahl // x mit 0 <= x < n. extern const cl_R random_R (random_state& randomstate, const cl_R& n); inline const cl_R random_R (const cl_R& n) { return random_R(default_random_state,n); } // This could be optimized to use in-place operations. inline cl_R& operator+= (cl_R& x, const cl_R& y) { return x = x + y; } inline cl_F& operator+= (cl_F& x, const cl_R& y) { return x = x + y; } inline cl_F& operator+= (cl_F& x, const cl_RA& y) { return x = x + y; } inline cl_F& operator+= (cl_F& x, const cl_I& y) { return x = x + y; } inline cl_R& operator+= (cl_R& x, const int y) { return x = x + y; } inline cl_R& operator+= (cl_R& x, const unsigned int y) { return x = x + y; } inline cl_R& operator+= (cl_R& x, const long y) { return x = x + y; } inline cl_R& operator+= (cl_R& x, const unsigned long y) { return x = x + y; } #ifdef HAVE_LONGLONG inline cl_R& operator+= (cl_R& x, const long long y) { return x = x + y; } inline cl_R& operator+= (cl_R& x, const unsigned long long y) { return x = x + y; } #endif inline cl_F& operator+= (cl_R& x, const float y) { return static_cast(x = x + y); } inline cl_F& operator+= (cl_R& x, const double y) { return static_cast(x = x + y); } inline cl_F& operator+= (cl_F& x, const int y) { return x = x + y; } inline cl_F& operator+= (cl_F& x, const unsigned int y) { return x = x + y; } inline cl_F& operator+= (cl_F& x, const long y) { return x = x + y; } inline cl_F& operator+= (cl_F& x, const unsigned long y) { return x = x + y; } #ifdef HAVE_LONGLONG inline cl_F& operator+= (cl_F& x, const long long y) { return x = x + y; } inline cl_F& operator+= (cl_F& x, const unsigned long long y) { return x = x + y; } #endif inline cl_R& operator++ /* prefix */ (cl_R& x) { return x = plus1(x); } inline void operator++ /* postfix */ (cl_R& x, int dummy) { (void)dummy; x = plus1(x); } inline cl_R& operator-= (cl_R& x, const cl_R& y) { return x = x - y; } inline cl_F& operator-= (cl_F& x, const cl_R& y) { return x = x - y; } inline cl_F& operator-= (cl_F& x, const cl_RA& y) { return x = x - y; } inline cl_F& operator-= (cl_F& x, const cl_I& y) { return x = x - y; } inline cl_R& operator-= (cl_R& x, const int y) { return x = x - y; } inline cl_R& operator-= (cl_R& x, const unsigned int y) { return x = x - y; } inline cl_R& operator-= (cl_R& x, const long y) { return x = x - y; } inline cl_R& operator-= (cl_R& x, const unsigned long y) { return x = x - y; } #ifdef HAVE_LONGLONG inline cl_R& operator-= (cl_R& x, const long long y) { return x = x - y; } inline cl_R& operator-= (cl_R& x, const unsigned long long y) { return x = x - y; } #endif inline cl_F& operator-= (cl_R& x, const float y) { return static_cast(x = x - y); } inline cl_F& operator-= (cl_R& x, const double y) { return static_cast(x = x - y); } inline cl_F& operator-= (cl_F& x, const int y) { return x = x - y; } inline cl_F& operator-= (cl_F& x, const unsigned int y) { return x = x - y; } inline cl_F& operator-= (cl_F& x, const long y) { return x = x - y; } inline cl_F& operator-= (cl_F& x, const unsigned long y) { return x = x - y; } #ifdef HAVE_LONGLONG inline cl_F& operator-= (cl_F& x, const long long y) { return x = x - y; } inline cl_F& operator-= (cl_F& x, const unsigned long long y) { return x = x - y; } #endif inline cl_R& operator-- /* prefix */ (cl_R& x) { return x = minus1(x); } inline void operator-- /* postfix */ (cl_R& x, int dummy) { (void)dummy; x = minus1(x); } inline cl_R& operator*= (cl_R& x, const cl_R& y) { return x = x * y; } inline cl_R& operator*= (cl_R& x, const int y) { return x = x * y; } inline cl_R& operator*= (cl_R& x, const unsigned int y) { return x = x * y; } inline cl_R& operator*= (cl_R& x, const long y) { return x = x * y; } inline cl_R& operator*= (cl_R& x, const unsigned long y) { return x = x * y; } #ifdef HAVE_LONGLONG inline cl_R& operator*= (cl_R& x, const long long y) { return x = x * y; } inline cl_R& operator*= (cl_R& x, const unsigned long long y) { return x = x * y; } #endif inline cl_R& operator*= (cl_R& x, const float y) { return x = x * y; } inline cl_R& operator*= (cl_R& x, const double y) { return x = x * y; } inline cl_R& operator/= (cl_R& x, const cl_R& y) { return x = x / y; } inline cl_F& operator/= (cl_F& x, const cl_R& y) { return x = x / y; } inline cl_F& operator/= (cl_F& x, const cl_RA& y) { return x = x / y; } inline cl_F& operator/= (cl_F& x, const cl_I& y) { return x = x / y; } inline cl_R& operator/= (cl_R& x, const int y) { return x = x / y; } inline cl_R& operator/= (cl_R& x, const unsigned int y) { return x = x / y; } inline cl_R& operator/= (cl_R& x, const long y) { return x = x / y; } inline cl_R& operator/= (cl_R& x, const unsigned long y) { return x = x / y; } #ifdef HAVE_LONGLONG inline cl_R& operator/= (cl_R& x, const long long y) { return x = x / y; } inline cl_R& operator/= (cl_R& x, const unsigned long long y) { return x = x / y; } #endif inline cl_R& operator/= (cl_R& x, const float y) { return x = x / y; } inline cl_R& operator/= (cl_R& x, const double y) { return x = x / y; } inline cl_F& operator/= (cl_F& x, const int y) { return x = x / y; } inline cl_F& operator/= (cl_F& x, const unsigned int y) { return x = x / y; } inline cl_F& operator/= (cl_F& x, const long y) { return x = x / y; } inline cl_F& operator/= (cl_F& x, const unsigned long y) { return x = x / y; } #ifdef HAVE_LONGLONG inline cl_F& operator/= (cl_F& x, const long long y) { return x = x / y; } inline cl_F& operator/= (cl_F& x, const unsigned long long y) { return x = x / y; } #endif // Complex operations, trivial for reals inline const cl_R realpart (const cl_R& x) { return x; } inline const cl_R imagpart (const cl_R& x) { (void)x; // unused x return 0; } inline const cl_R conjugate (const cl_R& x) { return x; } // Debugging support. #ifdef CL_DEBUG extern int cl_R_debug_module; CL_FORCE_LINK(cl_R_debug_dummy, cl_R_debug_module) #endif } // namespace cln #endif /* _CL_REAL_H */ cln-1.3.3/include/cln/integer.h0000644000000000000000000005617611201634736013207 0ustar // Public integer operations. #ifndef _CL_INTEGER_H #define _CL_INTEGER_H #include "cln/number.h" #include "cln/integer_class.h" #include "cln/exception.h" #include "cln/random.h" namespace cln { CL_DEFINE_AS_CONVERSION(cl_I) // Konversion Integer >=0, <2^32 nach uintL. // Wandelt Integer >=0 in Unsigned Longword um. // cl_I_to_UL(obj) // > obj: Integer, sollte >=0, <2^32 sein // < ergebnis: der Wert des Integer als 32-Bit-Zahl. extern uint32 cl_I_to_UL (const cl_I& obj); // Konversion Integer >=-2^31, <2^31 nach sintL. // Wandelt Integer in Signed Longword um. // cl_I_to_L(obj) // > obj: Integer, sollte >=-2^31, <2^31 sein // < ergebnis: der Wert des Integer als 32-Bit-Zahl. extern sint32 cl_I_to_L (const cl_I& obj); // Convert an integer to a C `int' or `unsigned int'. #if (int_bitsize==32) inline int cl_I_to_int (const cl_I& x) { return cl_I_to_L(x); } inline unsigned int cl_I_to_uint (const cl_I& x) { return cl_I_to_UL(x); } #endif // Convert an integer to a 64-bit 'quad' type. #ifdef intQsize extern uint64 cl_I_to_UQ (const cl_I& obj); extern sint64 cl_I_to_Q (const cl_I& obj); #endif // Convert an integer to a C `long' or `unsigned long'. #if (long_bitsize==32) inline long cl_I_to_long (const cl_I& x) { return cl_I_to_L(x); } inline unsigned long cl_I_to_ulong (const cl_I& x) { return cl_I_to_UL(x); } #elif (long_bitsize==64) inline long cl_I_to_long (const cl_I& x) { return cl_I_to_Q(x); } inline unsigned long cl_I_to_ulong (const cl_I& x) { return cl_I_to_UQ(x); } #endif // Convert an integer to a counter type. #if (intCsize==long_bitsize) inline uintC cl_I_to_UC (const cl_I& x) { return cl_I_to_ulong(x); } inline sintC cl_I_to_C (const cl_I& x) { return cl_I_to_long(x); } #elif (intCsize==int_bitsize) inline uintC cl_I_to_UC (const cl_I& x) { return cl_I_to_uint(x); } inline sintC cl_I_to_C (const cl_I& x) { return cl_I_to_int(x); } #endif // Convert an integer to an exponent type. #if (intEsize==intLsize) inline uintE cl_I_to_UE (const cl_I& x) { return cl_I_to_UL(x); } inline sintE cl_I_to_E (const cl_I& x) { return cl_I_to_L(x); } #elif (intEsize==intQsize) inline uintE cl_I_to_UE (const cl_I& x) { return cl_I_to_UQ(x); } inline sintE cl_I_to_E (const cl_I& x) { return cl_I_to_Q(x); } #endif // Logische Operationen auf Integers: // (LOGIOR x y), wenn x, y Integers sind. // Ergebnis Integer. extern const cl_I logior (const cl_I& x, const cl_I& y); // (LOGXOR x y), wenn x, y Integers sind. // Ergebnis Integer. extern const cl_I logxor (const cl_I& x, const cl_I& y); // (LOGAND x y), wenn x, y Integers sind. // Ergebnis Integer. extern const cl_I logand (const cl_I& x, const cl_I& y); // (LOGEQV x y), wenn x, y Integers sind. // Ergebnis Integer. extern const cl_I logeqv (const cl_I& x, const cl_I& y); // (LOGNAND x y), wenn x, y Integers sind. // Ergebnis Integer. extern const cl_I lognand (const cl_I& x, const cl_I& y); // (LOGNOR x y), wenn x, y Integers sind. // Ergebnis Integer. extern const cl_I lognor (const cl_I& x, const cl_I& y); // (LOGANDC2 x y), wenn x, y Integers sind. // Ergebnis Integer. extern const cl_I logandc2 (const cl_I& x, const cl_I& y); // (LOGANDC1 x y), wenn x, y Integers sind. // Ergebnis Integer. inline const cl_I logandc1 (const cl_I& x, const cl_I& y) { return logandc2(y,x); } // (LOGORC2 x y), wenn x, y Integers sind. // Ergebnis Integer. extern const cl_I logorc2 (const cl_I& x, const cl_I& y); // (LOGORC1 x y), wenn x, y Integers sind. // Ergebnis Integer. inline const cl_I logorc1 (const cl_I& x, const cl_I& y) { return logorc2(y,x); } // (LOGNOT x), wenn x ein Integer sind. // Ergebnis Integer. extern const cl_I lognot (const cl_I& x); // Konstanten für BOOLE: typedef enum { boole_clr, boole_set, boole_1, boole_2, boole_c1, boole_c2, boole_and, boole_ior, boole_xor, boole_eqv, boole_nand, boole_nor, boole_andc1, boole_andc2, boole_orc1, boole_orc2 } cl_boole; // (BOOLE op x y), wenn x und y Integers und op ein Objekt sind. // Ergebnis Integer. extern const cl_I boole (cl_boole op, const cl_I& x, const cl_I& y); // Prüft, ob (LOGTEST x y), wo x und y Integers sind. // (LOGTEST x y) = (NOT (ZEROP (LOGAND x y))). // < ergebnis: /=0, falls ja; =0, falls nein. extern bool logtest (const cl_I& x, const cl_I& y); // Prüft, ob (LOGBITP x y), wo x und y Integers sind. // Ergebnis: /=0, wenn ja; =0, wenn nein. extern bool logbitp (uintC x, const cl_I& y); extern bool logbitp (const cl_I& x, const cl_I& y); // Prüft, ob (ODDP x), wo x ein Integer ist. // Ergebnis: /=0, falls ja; =0, falls nein. extern bool oddp (const cl_I& x); // Prüft, ob (EVENP x), wo x ein Integer ist. // Ergebnis: /=0, falls ja; =0, falls nein. inline bool evenp (const cl_I& x) { return !oddp(x); } // (ASH x y), wo x und y Integers sind. Ergebnis Integer. extern const cl_I ash (const cl_I& x, sintC y); extern const cl_I ash (const cl_I& x, const cl_I& y); // Thrown when shift amount is too large. class ash_exception : public runtime_exception { public: explicit ash_exception (const cl_I& badamount); }; // (LOGCOUNT x), wo x ein Integer ist. Ergebnis uintC. extern uintC logcount (const cl_I& x); // (INTEGER-LENGTH x), wo x ein Integer ist. Ergebnis uintC. extern uintC integer_length (const cl_I& x); // (ORD2 x) = max{n>=0: 2^n | x }, wo x ein Integer /=0 ist. Ergebnis uintC. extern uintC ord2 (const cl_I& x); // power2p(x) stellt fest, ob ein Integer x>0 eine Zweierpotenz ist. // Ergebnis: n>0, wenn x=2^(n-1), 0 sonst. extern uintC power2p (const cl_I& x); inline const cl_I operator| (const cl_I& x, const cl_I& y) { return logior(x,y); } inline const cl_I operator^ (const cl_I& x, const cl_I& y) { return logxor(x,y); } inline const cl_I operator& (const cl_I& x, const cl_I& y) { return logand(x,y); } inline const cl_I operator~ (const cl_I& x) { return lognot(x); } // This could be optimized to use in-place operations. inline cl_I& operator|= (cl_I& x, const cl_I& y) { return x = x | y; } inline cl_I& operator^= (cl_I& x, const cl_I& y) { return x = x ^ y; } inline cl_I& operator&= (cl_I& x, const cl_I& y) { return x = x & y; } // Addition/Subtraktion von Integers // (1+ x), wo x ein Integer ist. Ergebnis Integer. extern const cl_I plus1 (const cl_I& x); // (1- x), wo x ein Integer ist. Ergebnis Integer. extern const cl_I minus1 (const cl_I& x); // (+ x y), wo x und y Integers sind. Ergebnis Integer. extern const cl_I operator+ (const cl_I& x, const cl_I& y); // Dem C++-Compiler muß man auch das Folgende sagen: inline const cl_I operator+ (const int x, const cl_I& y) { return cl_I(x) + y; } inline const cl_I operator+ (const unsigned int x, const cl_I& y) { return cl_I(x) + y; } inline const cl_I operator+ (const long x, const cl_I& y) { return cl_I(x) + y; } inline const cl_I operator+ (const unsigned long x, const cl_I& y) { return cl_I(x) + y; } #ifdef HAVE_LONGLONG inline const cl_I operator+ (const long long x, const cl_I& y) { return cl_I(x) + y; } inline const cl_I operator+ (const unsigned long long x, const cl_I& y) { return cl_I(x) + y; } #endif inline const cl_I operator+ (const cl_I& x, const int y) { return x + cl_I(y); } inline const cl_I operator+ (const cl_I& x, const unsigned int y) { return x + cl_I(y); } inline const cl_I operator+ (const cl_I& x, const long y) { return x + cl_I(y); } inline const cl_I operator+ (const cl_I& x, const unsigned long y) { return x + cl_I(y); } #ifdef HAVE_LONGLONG inline const cl_I operator+ (const cl_I& x, const long long y) { return x + cl_I(y); } inline const cl_I operator+ (const cl_I& x, const unsigned long long y) { return x + cl_I(y); } #endif // (- x), wenn x ein Integer ist. Ergebnis Integer. extern const cl_I operator- (const cl_I& x); // (- x y), wo x und y Integers sind. Ergebnis Integer. extern const cl_I operator- (const cl_I& x, const cl_I& y); // Dem C++-Compiler muß man auch das Folgende sagen: inline const cl_I operator- (const int x, const cl_I& y) { return cl_I(x) - y; } inline const cl_I operator- (const unsigned int x, const cl_I& y) { return cl_I(x) - y; } inline const cl_I operator- (const long x, const cl_I& y) { return cl_I(x) - y; } inline const cl_I operator- (const unsigned long x, const cl_I& y) { return cl_I(x) - y; } #ifdef HAVE_LONGLONG inline const cl_I operator- (const long long x, const cl_I& y) { return cl_I(x) - y; } inline const cl_I operator- (const unsigned long long x, const cl_I& y) { return cl_I(x) - y; } #endif inline const cl_I operator- (const cl_I& x, const int y) { return x - cl_I(y); } inline const cl_I operator- (const cl_I& x, const unsigned int y) { return x - cl_I(y); } inline const cl_I operator- (const cl_I& x, const long y) { return x - cl_I(y); } inline const cl_I operator- (const cl_I& x, const unsigned long y) { return x - cl_I(y); } #ifdef HAVE_LONGLONG inline const cl_I operator- (const cl_I& x, const long long y) { return x - cl_I(y); } inline const cl_I operator- (const cl_I& x, const unsigned long long y) { return x - cl_I(y); } #endif // (abs x), wenn x ein Integer ist. Ergebnis Integer. extern const cl_I abs (const cl_I& x); // Shifts. inline const cl_I operator<< (const cl_I& x, sintC y) // assume 0 <= y < 2^(intCsize-1) { return ash(x,y); } inline const cl_I operator<< (const cl_I& x, const cl_I& y) // assume y >= 0 { return ash(x,y); } inline const cl_I operator>> (const cl_I& x, sintC y) // assume 0 <= y < 2^(intCsize-1) { return ash(x,-y); } inline const cl_I operator>> (const cl_I& x, const cl_I& y) // assume y >= 0 { return ash(x,-y); } // Vergleich von Integers // equal(x,y) vergleicht zwei Integers x und y auf Gleichheit. extern bool equal (const cl_I& x, const cl_I& y); // equal_hashcode(x) liefert einen equal-invarianten Hashcode für x. extern uint32 equal_hashcode (const cl_I& x); // compare(x,y) vergleicht zwei Integers x und y. // Ergebnis: 0 falls x=y, +1 falls x>y, -1 falls x= (const cl_I& x, const cl_I& y) { return compare(x,y)>=0; } inline bool operator> (const cl_I& x, const cl_I& y) { return compare(x,y)>0; } // minusp(x) == (< x 0) extern bool minusp (const cl_I& x); // plusp(x) == (> x 0) extern bool plusp (const cl_I& x); // zerop(x) stellt fest, ob ein Integer = 0 ist. extern bool zerop (const cl_I& x); // BYTE-Operationen auf Integers struct cl_byte { uintC size; uintC position; // Konstruktor: cl_byte (uintC s, uintC p) : size (s), position (p) {} }; // (LDB byte n), wo n ein Integer ist. extern const cl_I ldb (const cl_I& n, const cl_byte& b); // ldb_test(n,byte) führt (LDB-TEST byte n) aus, wobei n ein Integer ist. // Ergebnis: false wenn nein (also alle fraglichen Bits =0), true wenn ja. extern bool ldb_test (const cl_I& n, const cl_byte& b); // (MASK-FIELD byte n), wo n ein Integer ist. extern const cl_I mask_field (const cl_I& n, const cl_byte& b); // (DEPOSIT-FIELD newbyte byte n), wo n und newbyte Integers sind. extern const cl_I deposit_field (const cl_I& newbyte, const cl_I& n, const cl_byte& b); // (DPB newbyte byte n), wo n und newbyte Integers sind. extern const cl_I dpb (const cl_I& newbyte, const cl_I& n, const cl_byte& b); // Multiplikation ganzer Zahlen // (* x y), wo x und y Integers sind. Ergebnis Integer. extern const cl_I operator* (const cl_I& x, const cl_I& y); // Dem C++-Compiler muß man auch das Folgende sagen: inline const cl_I operator* (const int x, const cl_I& y) { return cl_I(x) * y; } inline const cl_I operator* (const unsigned int x, const cl_I& y) { return cl_I(x) * y; } inline const cl_I operator* (const long x, const cl_I& y) { return cl_I(x) * y; } inline const cl_I operator* (const unsigned long x, const cl_I& y) { return cl_I(x) * y; } #ifdef HAVE_LONGLONG inline const cl_I operator* (const long long x, const cl_I& y) { return cl_I(x) * y; } inline const cl_I operator* (const unsigned long long x, const cl_I& y) { return cl_I(x) * y; } #endif inline const cl_I operator* (const cl_I& x, const int y) { return x * cl_I(y); } inline const cl_I operator* (const cl_I& x, const unsigned int y) { return x * cl_I(y); } inline const cl_I operator* (const cl_I& x, const long y) { return x * cl_I(y); } inline const cl_I operator* (const cl_I& x, const unsigned long y) { return x * cl_I(y); } #ifdef HAVE_LONGLONG inline const cl_I operator* (const cl_I& x, const long long y) { return x * cl_I(y); } inline const cl_I operator* (const cl_I& x, const unsigned long long y) { return x * cl_I(y); } #endif // (EXPT x 2), wo x Integer ist. extern const cl_I square (const cl_I& x); // (EXPT x y), wo x Integer, y Integer >0 ist. extern const cl_I expt_pos (const cl_I& x, uintL y); extern const cl_I expt_pos (const cl_I& x, const cl_I& y); // Fakultät (! n), wo n Fixnum >=0 ist. Ergebnis Integer. extern const cl_I factorial (uintL n); // Double factorial (!! n), with n Fixnum >=0. Returns integer. extern const cl_I doublefactorial (uintL n); // Binomialkoeffizient (n \choose k) = n! / k! (n-k)!, wo n,k >= 0 sind. extern const cl_I binomial (uintL n, uintL k); // Division ganzer Zahlen // Return type for division operators. // x / y --> (q,r) with x = y*q+r. struct cl_I_div_t { cl_I quotient; cl_I remainder; // Constructor. cl_I_div_t () {} cl_I_div_t (const cl_I& q, const cl_I& r) : quotient(q), remainder(r) {} }; // Dividiert zwei Integers x,y >=0 und liefert den Quotienten x/y >=0. // Bei y=0 Error. Die Division muß aufgehen, sonst Error. // exquopos(x,y) // > x,y: Integers >=0 // < ergebnis: Quotient x/y, ein Integer >=0 extern const cl_I exquopos (const cl_I& x, const cl_I& y); // Dividiert zwei Integers x,y und liefert den Quotienten x/y. // Bei y=0 Error. Die Division muß aufgehen, sonst Error. // exquo(x,y) // > x,y: Integers // < ergebnis: Quotient x/y, ein Integer extern const cl_I exquo (const cl_I& x, const cl_I& y); // Thrown when quotient is no integer. class exquo_exception : public runtime_exception { public: exquo_exception (const cl_I& x, const cl_I& y); }; // mod(x,y) = (mod x y), wo x,y Integers sind. extern const cl_I mod (const cl_I& x, const cl_I& y); // rem(x,y) = (rem x y), wo x,y Integers sind. extern const cl_I rem (const cl_I& x, const cl_I& y); // Dividiert zwei Integers x,y und liefert Quotient und Rest // (q,r) := (floor x y) // floor2(x,y) // > x,y: Integers // < q,r: Quotient q, Rest r extern const cl_I_div_t floor2 (const cl_I& x, const cl_I& y); extern const cl_I floor1 (const cl_I& x, const cl_I& y); // Dividiert zwei Integers x,y und liefert Quotient und Rest // (q,r) := (ceiling x y) // ceiling2(x,y) // > x,y: Integers // < q,r: Quotient q, Rest r extern const cl_I_div_t ceiling2 (const cl_I& x, const cl_I& y); extern const cl_I ceiling1 (const cl_I& x, const cl_I& y); // Dividiert zwei Integers x,y und liefert Quotient und Rest // (q,r) := (truncate x y) // truncate2(x,y) // > x,y: Integers // < q,r: Quotient q, Rest r extern const cl_I_div_t truncate2 (const cl_I& x, const cl_I& y); extern const cl_I truncate1 (const cl_I& x, const cl_I& y); // Dividiert zwei Integers x,y und liefert Quotient und Rest // (q,r) := (round x y) // round2(x,y) // > x,y: Integers // < q,r: Quotient q, Rest r extern const cl_I_div_t round2 (const cl_I& x, const cl_I& y); extern const cl_I round1 (const cl_I& x, const cl_I& y); // ggT und kgV von Integers // Liefert den ggT zweier Integers. // gcd(a,b) // > a,b: zwei Integers // < ergebnis: (gcd a b), ein Integer >=0 extern const cl_I gcd (const cl_I& a, const cl_I& b); extern uintV gcd (uintV a, uintV b); // Liefert den ggT zweier Integers samt Beifaktoren. // g = xgcd(a,b,&u,&v) // > a,b: zwei Integers // < u, v, g: Integers mit u*a+v*b = g >= 0 extern const cl_I xgcd (const cl_I& a, const cl_I& b, cl_I* u, cl_I* v); // Im Fall A/=0, B/=0 genügt das Ergebnis (g,u,v) den Ungleichungen: // Falls |A| = |B| : g = |A|, u = (signum A), v = 0. // Falls |B| | |A|, |B| < |A| : g = |B|, u = 0, v = (signum B). // Falls |A| | |B|, |A| < |B| : g = |A|, u = (signum A), v = 0. // Sonst: |u| <= |B| / (2*g), |v| <= |A| / (2*g). // In jedem Fall |u| <= |B|/g, |v| < |A|/g. // (Beweis: Im Prinzip macht man ja mehrere Euklid-Schritte auf einmal. Im // letzten Fall - oBdA |A| > |B| - braucht man mindestens zwei Euklid-Schritte, // also gilt im Euklid-Tableau // i |A| |B| Erg. // -------------------------------------------- // 0 1 0 |A| // 1 0 1 |B| // ... ... ... ... // n-1 -(-1)^n*x[n-1] (-1)^n*y[n-1] z[n-1] // n (-1)^n*x[n] -(-1)^n*y[n] z[n] // n+1 -(-1)^n*x[n+1] (-1)^n*y[n+1] z[n+1] = 0 // -------------------------------------------- // g = z[n], |u|=x[n], |v|=y[n] // n>=2, z[0] > ... > z[n-1] > z[n] = g, g | z[n-1], also z[n-1] >= 2*g. // Da aber mit (-1)^i*x[i]*|A| - (-1)^i*y[i]*|B| = z[i] für i=0..n+1 // und x[i]*y[i+1] - x[i+1]*y[i] = (-1)^i für i=0..n, // x[i]*z[i+1] - x[i+1]*z[i] = (-1)^i*|B| für i=0..n, // y[i]*z[i+1] - y[i+1]*z[i] = -(-1)^i*|A| für i=0..n // auch |A| = y[i+1]*z[i] + y[i]*z[i+1], |B| = x[i+1]*z[i] + x[i]*z[i+1] // für i=0..n (Cramersche Regel), folgt // |A| = y[n]*z[n-1] + y[n-1]*z[n] >= y[n]*2*g + 0 = |v|*2*g, // |B| = x[n]*z[n-1] + x[n-1]*z[n] >= x[n]*2*g + 0 = |u|*2*g.) // Liefert den kgV zweier Integers. // lcm(a,b) // > a,b: zwei Integers // < ergebnis: (lcm a b), ein Integer >=0 extern const cl_I lcm (const cl_I& a, const cl_I& b); // Wurzel aus ganzen Zahlen // Zieht die Wurzel (ISQRT x) aus einem Integer. // isqrt(x,&w) // > x: Integer (sollte >=0 sein) // < w: (isqrt x) // < ergebnis: true falls x Quadratzahl, false sonst extern bool isqrt (const cl_I& x, cl_I* w); // Wenn das boolesche Ergebnis uninteressant ist: inline const cl_I isqrt (const cl_I& x) { cl_I w; isqrt(x,&w); return w; } // Stellt fest, ob ein Integer >=0 eine Quadratzahl ist. // sqrtp(x,&w) // > x: ein Integer >=0 // < w: Integer (sqrt x) falls x Quadratzahl // < ergebnis: true ..................., false sonst extern bool sqrtp (const cl_I& x, cl_I* w); // Stellt fest, ob ein Integer >=0 eine n-te Potenz ist. // rootp(x,n,&w) // > x: ein Integer >=0 // > n: ein Integer >0 // < w: Integer (expt x (/ n)) falls x eine n-te Potenz // < ergebnis: true ........................, false sonst extern bool rootp (const cl_I& x, uintL n, cl_I* w); extern bool rootp (const cl_I& x, const cl_I& n, cl_I* w); // max(x,y) liefert (max x y), wo x und y ganze Zahlen sind. extern const cl_I max (const cl_I& x, const cl_I& y); // min(x,y) liefert (min x y), wo x und y ganze Zahlen sind. extern const cl_I min (const cl_I& x, const cl_I& y); // signum(x) liefert (signum x), wo x eine ganze Zahl ist. extern const cl_I signum (const cl_I& x); // Multipliziert ein Integer mit 10 und addiert eine weitere Ziffer. // mul_10_plus_x(y,x) // > y: Integer Y (>=0) // > x: Ziffernwert X (>=0,<10) // < ergebnis: Integer Y*10+X (>=0) extern const cl_I mul_10_plus_x (const cl_I& y, unsigned char x); // 2-adische Inverse. // cl_recip2adic(n,x) // > n: >0 // > x: Integer, ungerade // < ergebnis: n-Bit-Zahl y == (x mod 2^n)^-1, d.h. y*x == 1 mod 2^n extern const cl_I cl_recip2adic (uintL n, const cl_I& x); // 2-adische Division. // cl_div2adic(n,x,y) // > n: >0 // > x: Integer // > y: Integer, ungerade // < ergebnis: n-Bit-Zahl z == (x mod 2^n)/(y mod 2^n), d.h. z*y == x mod 2^n extern const cl_I cl_div2adic (uintL n, const cl_I& x, const cl_I& y); // numerator(r) liefert den Zähler des Integer r. inline const cl_I numerator (const cl_I& r) { return r; } // denominator(r) liefert den Nenner (> 0) des Integer r. inline const cl_I denominator (const cl_I& r) { (void)r; return 1; } // Konversion zu einem C "float". extern float float_approx (const cl_I& x); // Konversion zu einem C "double". extern double double_approx (const cl_I& x); // random_I(randomstate,n) liefert zu einem Integer n>0 ein zufälliges // Integer x mit 0 <= x < n. // > randomstate: ein Random-State, wird verändert extern const cl_I random_I (random_state& randomstate, const cl_I& n); inline const cl_I random_I (const cl_I& n) { return random_I(default_random_state,n); } // testrandom_I(randomstate) liefert ein zufälliges Integer zum Testen. // > randomstate: ein Random-State, wird verändert extern const cl_I testrandom_I (random_state& randomstate); inline const cl_I testrandom_I () { return testrandom_I(default_random_state); } // This could be optimized to use in-place operations. inline cl_I& operator+= (cl_I& x, const cl_I& y) { return x = x + y; } inline cl_I& operator+= (cl_I& x, const int y) { return x = x + y; } inline cl_I& operator+= (cl_I& x, const unsigned int y) { return x = x + y; } inline cl_I& operator+= (cl_I& x, const long y) { return x = x + y; } inline cl_I& operator+= (cl_I& x, const unsigned long y) { return x = x + y; } inline cl_I& operator++ /* prefix */ (cl_I& x) { return x = plus1(x); } inline void operator++ /* postfix */ (cl_I& x, int dummy) { (void)dummy; x = plus1(x); } inline cl_I& operator-= (cl_I& x, const cl_I& y) { return x = x - y; } inline cl_I& operator-= (cl_I& x, const int y) { return x = x - y; } inline cl_I& operator-= (cl_I& x, const unsigned int y) { return x = x - y; } inline cl_I& operator-= (cl_I& x, const long y) { return x = x - y; } inline cl_I& operator-= (cl_I& x, const unsigned long y) { return x = x - y; } inline cl_I& operator-- /* prefix */ (cl_I& x) { return x = minus1(x); } inline void operator-- /* postfix */ (cl_I& x, int dummy) { (void)dummy; x = minus1(x); } inline cl_I& operator*= (cl_I& x, const cl_I& y) { return x = x * y; } inline cl_I& operator<<= (cl_I& x, sintC y) // assume 0 <= y < 2^(intCsize-1) { return x = x << y; } inline cl_I& operator<<= (cl_I& x, const cl_I& y) // assume y >= 0 { return x = x << y; } inline cl_I& operator>>= (cl_I& x, sintC y) // assume 0 <= y < 2^(intCsize-1) { return x = x >> y; } inline cl_I& operator>>= (cl_I& x, const cl_I& y) // assume y >= 0 { return x = x >> y; } #if 0 // Defining operator/ collides with the operator/ (cl_RA, cl_RA). // operator/ should perform exquo(x,y), but people believe in the C semantics. // And it would be wiser to use floor1 and mod instead of truncate1 and rem, // but again, many C compilers implement / and % like this and people believe // in it. inline const cl_I operator/ (const cl_I& x, const cl_I& y) { return truncate1(x,y); } inline const cl_I operator% (const cl_I& x, const cl_I& y) { return rem(x,y); } inline cl_I& operator/= (cl_I& x, const cl_I& y) { return x = x / y; } inline cl_I& operator%= (cl_I& x, const cl_I& y) { return x = x % y; } #endif // Runtime typing support. extern cl_class cl_class_fixnum; extern cl_class cl_class_bignum; CL_FORCE_LINK(cl_I_classes_dummy, cl_class_fixnum) // Debugging support. #ifdef CL_DEBUG extern int cl_I_debug_module; CL_FORCE_LINK(cl_I_debug_dummy, cl_I_debug_module) #endif } // namespace cln #endif /* _CL_INTEGER_H */ cln-1.3.3/include/cln/sfloat_class.h0000644000000000000000000000236711201634736014220 0ustar // Concrete class of short float numbers. #ifndef _CL_SFLOAT_CLASS_H #define _CL_SFLOAT_CLASS_H #include "cln/number.h" #include "cln/float_class.h" namespace cln { class cl_SF : public cl_F { public: // Default constructor. cl_SF (); // Assignment operators. cl_SF& operator= (const cl_SF&); // Optimization of method pointer_p(). bool pointer_p() const { return false; } // Faster pointer_p() gives a faster copy constructor (but not destructor!!!). cl_SF (const cl_SF& x); // Other constructors. cl_SF (const char *); // Private constructor. cl_SF (cl_private_thing); cl_SF (struct cl_sfloat * /* NULL! */, cl_uint); public: // Ability to place an object at a given address. void* operator new (size_t size) { return malloc_hook(size); } void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void operator delete (void* ptr) { free_hook(ptr); } }; // Private constructors. inline cl_SF::cl_SF (cl_private_thing ptr) : cl_F (ptr) {} // The assignment operators: CL_DEFINE_ASSIGNMENT_OPERATOR(cl_SF, cl_SF) // The default constructors. inline cl_SF::cl_SF () : cl_F ((cl_private_thing) cl_combine(cl_SF_tag,0)) {} // The copy constructors. CL_DEFINE_COPY_CONSTRUCTOR2(cl_SF,cl_F) } // namespace cln #endif /* _CL_SFLOAT_CLASS_H */ cln-1.3.3/include/cln/lfloat.h0000644000000000000000000003404211201634736013017 0ustar // Public long float operations. #ifndef _CL_LFLOAT_H #define _CL_LFLOAT_H #include "cln/number.h" #include "cln/lfloat_class.h" #include "cln/integer_class.h" #include "cln/float.h" namespace cln { CL_DEFINE_AS_CONVERSION(cl_LF) // Liefert zu einem Long-Float x : (- x), ein LF. extern const cl_LF operator- (const cl_LF& x); // compare(x,y) vergleicht zwei Long-Floats x und y. // Ergebnis: 0 falls x=y, +1 falls x>y, -1 falls x= (const cl_LF& x, const cl_LF& y) { return compare(x,y)>=0; } inline bool operator> (const cl_LF& x, const cl_LF& y) { return compare(x,y)>0; } // minusp(x) == (< x 0) extern bool minusp (const cl_LF& x); // zerop(x) stellt fest, ob ein Long-Float x = 0.0 ist. extern bool zerop (const cl_LF& x); // plusp(x) == (> x 0) extern bool plusp (const cl_LF& x); // Liefert zu zwei Long-Float x und y : (+ x y), ein LF. extern const cl_LF operator+ (const cl_LF& x, const cl_LF& y); // Liefert zu zwei Long-Float x und y : (- x y), ein LF. extern const cl_LF operator- (const cl_LF& x, const cl_LF& y); // Liefert zu zwei Long-Float x und y : (* x y), ein LF. extern const cl_LF operator* (const cl_LF& x, const cl_LF& y); // Spezialfall x oder y Integer oder rationale Zahl. inline const cl_R operator* (const cl_LF& x, const cl_I& y) { extern const cl_R cl_LF_I_mul (const cl_LF&, const cl_I&); return cl_LF_I_mul(x,y); } inline const cl_R operator* (const cl_I& x, const cl_LF& y) { extern const cl_R cl_LF_I_mul (const cl_LF&, const cl_I&); return cl_LF_I_mul(y,x); } inline const cl_R operator* (const cl_LF& x, const cl_RA& y) { extern const cl_R cl_LF_RA_mul (const cl_LF&, const cl_RA&); return cl_LF_RA_mul(x,y); } inline const cl_R operator* (const cl_RA& x, const cl_LF& y) { extern const cl_R cl_LF_RA_mul (const cl_LF&, const cl_RA&); return cl_LF_RA_mul(y,x); } // Dem C++-Compiler muß man auch das Folgende sagen (wg. `int * cl_LF' u.ä.): inline const cl_R operator* (const int x, const cl_LF& y) { return cl_I(x) * y; } inline const cl_R operator* (const unsigned int x, const cl_LF& y) { return cl_I(x) * y; } inline const cl_R operator* (const long x, const cl_LF& y) { return cl_I(x) * y; } inline const cl_R operator* (const unsigned long x, const cl_LF& y) { return cl_I(x) * y; } #ifdef HAVE_LONGLONG inline const cl_R operator* (const long long x, const cl_LF& y) { return cl_I(x) * y; } inline const cl_R operator* (const unsigned long long x, const cl_LF& y) { return cl_I(x) * y; } #endif inline const cl_R operator* (const cl_LF& x, const int y) { return x * cl_I(y); } inline const cl_R operator* (const cl_LF& x, const unsigned int y) { return x * cl_I(y); } inline const cl_R operator* (const cl_LF& x, const long y) { return x * cl_I(y); } inline const cl_R operator* (const cl_LF& x, const unsigned long y) { return x * cl_I(y); } #ifdef HAVE_LONGLONG inline const cl_R operator* (const cl_LF& x, const long long y) { return x * cl_I(y); } inline const cl_R operator* (const cl_LF& x, const unsigned long long y) { return x * cl_I(y); } #endif // Spezialfall x = y. // Liefert zu einem Long-Float x : (* x x), ein LF. extern const cl_LF square (const cl_LF& x); // Liefert zu zwei Long-Float x und y : (/ x y), ein LF. extern const cl_LF operator/ (const cl_LF& x, const cl_LF& y); // Spezialfall x oder y Integer oder rationale Zahl. inline const cl_LF operator/ (const cl_LF& x, const cl_I& y) { extern const cl_LF cl_LF_I_div (const cl_LF& x, const cl_I& y); return cl_LF_I_div(x,y); } inline const cl_R operator/ (const cl_I& x, const cl_LF& y) { extern const cl_R cl_I_LF_div (const cl_I& x, const cl_LF& y); return cl_I_LF_div(x,y); } inline const cl_LF operator/ (const cl_LF& x, const cl_RA& y) { extern const cl_LF cl_LF_RA_div (const cl_LF& x, const cl_RA& y); return cl_LF_RA_div(x,y); } inline const cl_R operator/ (const cl_RA& x, const cl_LF& y) { extern const cl_R cl_RA_LF_div (const cl_RA& x, const cl_LF& y); return cl_RA_LF_div(x,y); } // Dem C++-Compiler muß man nun auch das Folgende sagen: inline const cl_LF operator/ (const cl_LF& x, const int y) { return x / cl_I(y); } inline const cl_LF operator/ (const cl_LF& x, const unsigned int y) { return x / cl_I(y); } inline const cl_LF operator/ (const cl_LF& x, const long y) { return x / cl_I(y); } inline const cl_LF operator/ (const cl_LF& x, const unsigned long y) { return x / cl_I(y); } #ifdef HAVE_LONGLONG inline const cl_LF operator/ (const cl_LF& x, const long long y) { return x / cl_I(y); } inline const cl_LF operator/ (const cl_LF& x, const unsigned long long y) { return x / cl_I(y); } #endif inline const cl_R operator/ (const int x, const cl_LF& y) { return cl_I(x) / y; } inline const cl_R operator/ (const unsigned int x, const cl_LF& y) { return cl_I(x) / y; } inline const cl_R operator/ (const long x, const cl_LF& y) { return cl_I(x) / y; } inline const cl_R operator/ (const unsigned long x, const cl_LF& y) { return cl_I(x) / y; } #ifdef HAVE_LONGLONG inline const cl_R operator/ (const long long x, const cl_LF& y) { return cl_I(x) / y; } inline const cl_R operator/ (const unsigned long long x, const cl_LF& y) { return cl_I(x) / y; } #endif // Liefert zu einem Long-Float x>=0 : (sqrt x), ein LF. extern const cl_LF sqrt (const cl_LF& x); // recip(x) liefert (/ x), wo x ein Long-Float ist. extern const cl_LF recip (const cl_LF& x); // abs(x) liefert (abs x), wo x ein Long-Float ist. extern const cl_LF abs (const cl_LF& x); // (1+ x), wo x ein Long-Float ist. extern const cl_LF plus1 (const cl_LF& x); // (1- x), wo x ein Long-Float ist. extern const cl_LF minus1 (const cl_LF& x); // ffloor(x) liefert (ffloor x), wo x ein LF ist. extern const cl_LF ffloor (const cl_LF& x); // fceiling(x) liefert (fceiling x), wo x ein LF ist. extern const cl_LF fceiling (const cl_LF& x); // ftruncate(x) liefert (ftruncate x), wo x ein LF ist. extern const cl_LF ftruncate (const cl_LF& x); // fround(x) liefert (fround x), wo x ein LF ist. extern const cl_LF fround (const cl_LF& x); // Return type for frounding operators. // x / y --> (q,r) with x = y*q+r. struct cl_LF_fdiv_t { cl_LF quotient; cl_LF remainder; // Constructor. cl_LF_fdiv_t () {} cl_LF_fdiv_t (const cl_LF& q, const cl_LF& r) : quotient(q), remainder(r) {} }; // ffloor2(x) liefert (ffloor x), wo x ein LF ist. inline const cl_LF_fdiv_t ffloor2 (const cl_LF& x) { extern const cl_LF LF_LF_minus_LF (const cl_LF&, const cl_LF&); cl_LF q = ffloor(x); return cl_LF_fdiv_t(q,LF_LF_minus_LF(x,q)); } // fceiling2(x) liefert (fceiling x), wo x ein LF ist. inline const cl_LF_fdiv_t fceiling2 (const cl_LF& x) { extern const cl_LF LF_LF_minus_LF (const cl_LF&, const cl_LF&); cl_LF q = fceiling(x); return cl_LF_fdiv_t(q,LF_LF_minus_LF(x,q)); } // ftruncate2(x) liefert (ftruncate x), wo x ein LF ist. inline const cl_LF_fdiv_t ftruncate2 (const cl_LF& x) { extern const cl_LF LF_LF_minus_LF (const cl_LF&, const cl_LF&); cl_LF q = ftruncate(x); return cl_LF_fdiv_t(q,LF_LF_minus_LF(x,q)); } // fround2(x) liefert (fround x), wo x ein LF ist. inline const cl_LF_fdiv_t fround2 (const cl_LF& x) { extern const cl_LF LF_LF_minus_LF (const cl_LF&, const cl_LF&); cl_LF q = fround(x); return cl_LF_fdiv_t(q,LF_LF_minus_LF(x,q)); } // Return type for rounding operators. // x / y --> (q,r) with x = y*q+r. struct cl_LF_div_t { cl_I quotient; cl_LF remainder; // Constructor. cl_LF_div_t () {} cl_LF_div_t (const cl_I& q, const cl_LF& r) : quotient(q), remainder(r) {} }; // floor2(x) liefert (floor x), wo x ein LF ist. inline const cl_LF_div_t floor2 (const cl_LF& x) { extern const cl_LF LF_LF_minus_LF (const cl_LF&, const cl_LF&); extern const cl_I cl_LF_to_I (const cl_LF& x); cl_LF q = ffloor(x); return cl_LF_div_t(cl_LF_to_I(q),LF_LF_minus_LF(x,q)); } inline const cl_I floor1 (const cl_LF& x) { extern const cl_I cl_LF_to_I (const cl_LF& x); return cl_LF_to_I(ffloor(x)); } // ceiling2(x) liefert (ceiling x), wo x ein LF ist. inline const cl_LF_div_t ceiling2 (const cl_LF& x) { extern const cl_LF LF_LF_minus_LF (const cl_LF&, const cl_LF&); extern const cl_I cl_LF_to_I (const cl_LF& x); cl_LF q = fceiling(x); return cl_LF_div_t(cl_LF_to_I(q),LF_LF_minus_LF(x,q)); } inline const cl_I ceiling1 (const cl_LF& x) { extern const cl_I cl_LF_to_I (const cl_LF& x); return cl_LF_to_I(fceiling(x)); } // truncate2(x) liefert (truncate x), wo x ein LF ist. inline const cl_LF_div_t truncate2 (const cl_LF& x) { extern const cl_LF LF_LF_minus_LF (const cl_LF&, const cl_LF&); extern const cl_I cl_LF_to_I (const cl_LF& x); cl_LF q = ftruncate(x); return cl_LF_div_t(cl_LF_to_I(q),LF_LF_minus_LF(x,q)); } inline const cl_I truncate1 (const cl_LF& x) { extern const cl_I cl_LF_to_I (const cl_LF& x); return cl_LF_to_I(ftruncate(x)); } // round2(x) liefert (round x), wo x ein LF ist. inline const cl_LF_div_t round2 (const cl_LF& x) { extern const cl_LF LF_LF_minus_LF (const cl_LF&, const cl_LF&); extern const cl_I cl_LF_to_I (const cl_LF& x); cl_LF q = fround(x); return cl_LF_div_t(cl_LF_to_I(q),LF_LF_minus_LF(x,q)); } inline const cl_I round1 (const cl_LF& x) { extern const cl_I cl_LF_to_I (const cl_LF& x); return cl_LF_to_I(fround(x)); } // floor2(x,y) liefert (floor x y). extern const cl_LF_div_t floor2 (const cl_LF& x, const cl_LF& y); inline const cl_I floor1 (const cl_LF& x, const cl_LF& y) { return floor1(x/y); } // ceiling2(x,y) liefert (ceiling x y). extern const cl_LF_div_t ceiling2 (const cl_LF& x, const cl_LF& y); inline const cl_I ceiling1 (const cl_LF& x, const cl_LF& y) { return ceiling1(x/y); } // truncate2(x,y) liefert (truncate x y). extern const cl_LF_div_t truncate2 (const cl_LF& x, const cl_LF& y); inline const cl_I truncate1 (const cl_LF& x, const cl_LF& y) { return truncate1(x/y); } // round2(x,y) liefert (round x y). extern const cl_LF_div_t round2 (const cl_LF& x, const cl_LF& y); inline const cl_I round1 (const cl_LF& x, const cl_LF& y) { return round1(x/y); } // cl_float(x,y) returns a long float if y is a long float. inline const cl_LF cl_float (const cl_F& x, const cl_LF& y) { extern const cl_F cl_float (const cl_F& x, const cl_F& y); return The(cl_LF)(cl_float(x,(const cl_F&)y)); } inline const cl_LF cl_float (const cl_I& x, const cl_LF& y) { extern const cl_F cl_float (const cl_I& x, const cl_F& y); return The(cl_LF)(cl_float(x,(const cl_F&)y)); } inline const cl_LF cl_float (const cl_RA& x, const cl_LF& y) { extern const cl_F cl_float (const cl_RA& x, const cl_F& y); return The(cl_LF)(cl_float(x,(const cl_F&)y)); } inline const cl_LF cl_float (int x, const cl_LF& y) { return cl_float(cl_I(x),y); } inline const cl_LF cl_float (unsigned int x, const cl_LF& y) { return cl_float(cl_I(x),y); } // Return type for decode_float: struct decoded_lfloat { cl_LF mantissa; cl_I exponent; cl_LF sign; // Constructor. decoded_lfloat () {} decoded_lfloat (const cl_LF& m, const cl_I& e, const cl_LF& s) : mantissa(m), exponent(e), sign(s) {} }; // decode_float(x) liefert zu einem Float x: (decode-float x). // x = 0.0 liefert (0.0, 0, 1.0). // x = (-1)^s * 2^e * m liefert ((-1)^0 * 2^0 * m, e als Integer, (-1)^s). extern const decoded_lfloat decode_float (const cl_LF& x); // float_exponent(x) liefert zu einem Float x: // den Exponenten von (decode-float x). // x = 0.0 liefert 0. // x = (-1)^s * 2^e * m liefert e. extern sintE float_exponent (const cl_LF& x); // float_radix(x) liefert (float-radix x), wo x ein Float ist. inline sintL float_radix (const cl_LF& x) { (void)x; // unused x return 2; } // float_sign(x) liefert (float-sign x), wo x ein Float ist. extern const cl_LF float_sign (const cl_LF& x); // float_digits(x) liefert (float-digits x), wo x ein Float ist. // < ergebnis: ein uintC >0 extern uintC float_digits (const cl_LF& x); // float_precision(x) liefert (float-precision x), wo x ein Float ist. // < ergebnis: ein uintC >=0 extern uintC float_precision (const cl_LF& x); // integer_decode_float(x) liefert zu einem Float x: (integer-decode-float x). // x = 0.0 liefert (0, 0, 1). // x = (-1)^s * 2^e * m bei Float-Precision p liefert // (Mantisse 2^p * m als Integer, e-p als Integer, (-1)^s als Fixnum). extern const cl_idecoded_float integer_decode_float (const cl_LF& x); // scale_float(x,delta) liefert x*2^delta, wo x ein LF ist. extern const cl_LF scale_float (const cl_LF& x, sintC delta); extern const cl_LF scale_float (const cl_LF& x, const cl_I& delta); // max(x,y) liefert (max x y), wo x und y Floats sind. extern const cl_LF max (const cl_LF& x, const cl_LF& y); // min(x,y) liefert (min x y), wo x und y Floats sind. extern const cl_LF min (const cl_LF& x, const cl_LF& y); // signum(x) liefert (signum x), wo x ein Float ist. extern const cl_LF signum (const cl_LF& x); // Konversion zu einem C "float". extern float float_approx (const cl_LF& x); // Konversion zu einem C "double". extern double double_approx (const cl_LF& x); // This could be optimized to use in-place operations. inline cl_LF& operator+= (cl_LF& x, const cl_LF& y) { return x = x + y; } inline cl_LF& operator++ /* prefix */ (cl_LF& x) { return x = plus1(x); } inline void operator++ /* postfix */ (cl_LF& x, int dummy) { (void)dummy; x = plus1(x); } inline cl_LF& operator-= (cl_LF& x, const cl_LF& y) { return x = x - y; } inline cl_LF& operator-- /* prefix */ (cl_LF& x) { return x = minus1(x); } inline void operator-- /* postfix */ (cl_LF& x, int dummy) { (void)dummy; x = minus1(x); } inline cl_LF& operator*= (cl_LF& x, const cl_LF& y) { return x = x * y; } inline cl_LF& operator/= (cl_LF& x, const cl_LF& y) { return x = x / y; } // Runtime typing support. extern cl_class cl_class_lfloat; // Debugging support. #ifdef CL_DEBUG extern int cl_LF_debug_module; CL_FORCE_LINK(cl_LF_debug_dummy, cl_LF_debug_module) #endif } // namespace cln #endif /* _CL_LFLOAT_H */ cln-1.3.3/include/cln/float.h0000644000000000000000000006357011201634736012653 0ustar // Public float operations. #ifndef _CL_FLOAT_H #define _CL_FLOAT_H #include "cln/number.h" #include "cln/float_class.h" #include "cln/floatformat.h" #include "cln/random.h" #include "cln/integer_class.h" #include "cln/sfloat_class.h" #include "cln/ffloat_class.h" #include "cln/dfloat_class.h" #include "cln/lfloat_class.h" #include "cln/exception.h" namespace cln { CL_DEFINE_AS_CONVERSION(cl_F) // Return type for integer_decode_float: struct cl_idecoded_float { cl_I mantissa; cl_I exponent; cl_I sign; // Constructor. cl_idecoded_float () {} cl_idecoded_float (const cl_I& m, const cl_I& e, const cl_I& s) : mantissa(m), exponent(e), sign(s) {} }; // zerop(x) testet, ob (= x 0). extern bool zerop (const cl_F& x); // minusp(x) testet, ob (< x 0). extern bool minusp (const cl_F& x); // plusp(x) testet, ob (> x 0). extern bool plusp (const cl_F& x); // cl_F_to_SF(x) wandelt ein Float x in ein Short-Float um und rundet dabei. extern const cl_SF cl_F_to_SF (const cl_F& x); // cl_F_to_FF(x) wandelt ein Float x in ein Single-Float um und rundet dabei. extern const cl_FF cl_F_to_FF (const cl_F& x); // cl_F_to_DF(x) wandelt ein Float x in ein Double-Float um und rundet dabei. extern const cl_DF cl_F_to_DF (const cl_F& x); // cl_F_to_LF(x,len) wandelt ein Float x in ein Long-Float mit len Digits um // und rundet dabei. // > uintC len: gewünschte Anzahl Digits, >=LF_minlen extern const cl_LF cl_F_to_LF (const cl_F& x, uintC len); // The default float format used when converting rational numbers to floats. extern float_format_t default_float_format; // Returns the smallest float format which guarantees at least n decimal digits // in the mantissa (after the decimal point). extern float_format_t float_format (uintE n); // cl_float(x,y) wandelt ein Float x in das Float-Format des Floats y um // und rundet dabei nötigenfalls. // > x,y: Floats // < ergebnis: (float x y) extern const cl_F cl_float (const cl_F& x, const cl_F& y); // cl_float(x,f) wandelt ein Float x in das Float-Format f um // und rundet dabei nötigenfalls. // > x: ein Float // > f: eine Float-Format-Spezifikation // < ergebnis: (float x f) extern const cl_F cl_float (const cl_F& x, float_format_t f); // cl_float(x) wandelt eine reelle Zahl x in ein Float um // und rundet dabei nötigenfalls. // > x: eine reelle Zahl // < ergebnis: (float x) // Abhängig von default_float_format. inline const cl_F cl_float (const cl_F& x) { return x; } // cl_float(x,y) wandelt ein Integer x in das Float-Format des Floats y um // und rundet dabei nötigenfalls. // > x: ein Integer // > y: ein Float // < ergebnis: (float x y) extern const cl_F cl_float (const cl_I& x, const cl_F& y); // cl_float(x,y) wandelt ein Integer x in das Float-Format f um // und rundet dabei nötigenfalls. // > x: ein Integer // > f: eine Float-Format-Spezifikation // < ergebnis: (float x f) extern const cl_F cl_float (const cl_I& x, float_format_t f); // cl_float(x) wandelt ein Integer x in ein Float um und rundet dabei. // > x: ein Integer // < ergebnis: (float x) // Abhängig von default_float_format. extern const cl_F cl_float (const cl_I& x); // cl_float(x,y) wandelt eine rationale Zahl x in das Float-Format des // Floats y um und rundet dabei nötigenfalls. // > x: eine rationale Zahl // > y: ein Float // < ergebnis: (float x y) extern const cl_F cl_float (const cl_RA& x, const cl_F& y); // cl_float(x,y) wandelt eine rationale Zahl x in das Float-Format f um // und rundet dabei nötigenfalls. // > x: eine rationale Zahl // > f: eine Float-Format-Spezifikation // < ergebnis: (float x f) extern const cl_F cl_float (const cl_RA& x, float_format_t f); // cl_float(x) wandelt eine rationale Zahl x in ein Float um und rundet dabei. // > x: eine rationale Zahl // < ergebnis: (float x) // Abhängig von default_float_format. extern const cl_F cl_float (const cl_RA& x); // The C++ compilers are not clever enough to guess this: inline const cl_F cl_float (int x, const cl_F& y) { return cl_float(cl_I(x),y); } inline const cl_F cl_float (unsigned int x, const cl_F& y) { return cl_float(cl_I(x),y); } inline const cl_F cl_float (int x, float_format_t y) { return cl_float(cl_I(x),y); } inline const cl_F cl_float (unsigned int x, float_format_t y) { return cl_float(cl_I(x),y); } inline const cl_F cl_float (int x) { return cl_float(cl_I(x)); } inline const cl_F cl_float (unsigned int x) { return cl_float(cl_I(x)); } // The C++ compilers could hardly guess the following: inline const cl_F cl_float (float x, const cl_F& y) { return cl_float(cl_FF(x),y); } inline const cl_F cl_float (double x, const cl_F& y) { return cl_float(cl_DF(x),y); } inline const cl_F cl_float (float x, float_format_t y) { return cl_float(cl_FF(x),y); } inline const cl_F cl_float (double x, float_format_t y) { return cl_float(cl_DF(x),y); } inline const cl_F cl_float (float x) { return cl_float(cl_FF(x)); } inline const cl_F cl_float (double x) { return cl_float(cl_DF(x)); } // Liefert (- x), wo x ein Float ist. extern const cl_F operator- (const cl_F& x); // Liefert (+ x y), wo x und y Floats sind. extern const cl_F operator+ (const cl_F& x, const cl_F& y); // The C++ compilers could hardly guess the following: inline const cl_F operator+ (const cl_RA& x, const cl_F& y) { return cl_float(x,y) + y; } inline const cl_F operator+ (const cl_I& x, const cl_F& y) { return cl_float(x,y) + y; } inline const cl_F operator+ (const cl_F& x, const cl_RA& y) { return x + cl_float(y,x); } inline const cl_F operator+ (const cl_F& x, const cl_I& y) { return x + cl_float(y,x); } // Dem C++-Compiler muß man nun auch das Folgende sagen: inline const cl_F operator+ (const int x, const cl_F& y) { return cl_I(x) + y; } inline const cl_F operator+ (const unsigned int x, const cl_F& y) { return cl_I(x) + y; } inline const cl_F operator+ (const long x, const cl_F& y) { return cl_I(x) + y; } inline const cl_F operator+ (const unsigned long x, const cl_F& y) { return cl_I(x) + y; } #ifdef HAVE_LONGLONG inline const cl_F operator+ (const long long x, const cl_F& y) { return cl_I(x) + y; } inline const cl_F operator+ (const unsigned long long x, const cl_F& y) { return cl_I(x) + y; } #endif inline const cl_F operator+ (const float x, const cl_F& y) { return cl_F(x) + y; } inline const cl_F operator+ (const double x, const cl_F& y) { return cl_F(x) + y; } inline const cl_F operator+ (const cl_F& x, const int y) { return x + cl_I(y); } inline const cl_F operator+ (const cl_F& x, const unsigned int y) { return x + cl_I(y); } inline const cl_F operator+ (const cl_F& x, const long y) { return x + cl_I(y); } inline const cl_F operator+ (const cl_F& x, const unsigned long y) { return x + cl_I(y); } #ifdef HAVE_LONGLONG inline const cl_F operator+ (const cl_F& x, const long long y) { return x + cl_I(y); } inline const cl_F operator+ (const cl_F& x, const unsigned long long y) { return x + cl_I(y); } #endif inline const cl_F operator+ (const cl_F& x, const float y) { return x + cl_F(y); } inline const cl_F operator+ (const cl_F& x, const double y) { return x + cl_F(y); } // Liefert (- x y), wo x und y Floats sind. extern const cl_F operator- (const cl_F& x, const cl_F& y); // The C++ compilers could hardly guess the following: inline const cl_F operator- (const cl_RA& x, const cl_F& y) { return cl_float(x,y) - y; } inline const cl_F operator- (const cl_I& x, const cl_F& y) { return cl_float(x,y) - y; } inline const cl_F operator- (const cl_F& x, const cl_RA& y) { return x - cl_float(y,x); } inline const cl_F operator- (const cl_F& x, const cl_I& y) { return x - cl_float(y,x); } // Dem C++-Compiler muß man nun auch das Folgende sagen: inline const cl_F operator- (const int x, const cl_F& y) { return cl_I(x) - y; } inline const cl_F operator- (const unsigned int x, const cl_F& y) { return cl_I(x) - y; } inline const cl_F operator- (const long x, const cl_F& y) { return cl_I(x) - y; } inline const cl_F operator- (const unsigned long x, const cl_F& y) { return cl_I(x) - y; } #ifdef HAVE_LONGLONG inline const cl_F operator- (const long long x, const cl_F& y) { return cl_I(x) - y; } inline const cl_F operator- (const unsigned long long x, const cl_F& y) { return cl_I(x) - y; } #endif inline const cl_F operator- (const float x, const cl_F& y) { return cl_F(x) - y; } inline const cl_F operator- (const double x, const cl_F& y) { return cl_F(x) - y; } inline const cl_F operator- (const cl_F& x, const int y) { return x - cl_I(y); } inline const cl_F operator- (const cl_F& x, const unsigned int y) { return x - cl_I(y); } inline const cl_F operator- (const cl_F& x, const long y) { return x - cl_I(y); } inline const cl_F operator- (const cl_F& x, const unsigned long y) { return x - cl_I(y); } #ifdef HAVE_LONGLONG inline const cl_F operator- (const cl_F& x, const long long y) { return x - cl_I(y); } inline const cl_F operator- (const cl_F& x, const unsigned long long y) { return x - cl_I(y); } #endif inline const cl_F operator- (const cl_F& x, const float y) { return x - cl_F(y); } inline const cl_F operator- (const cl_F& x, const double y) { return x - cl_F(y); } // Liefert (* x y), wo x und y Floats sind. extern const cl_F operator* (const cl_F& x, const cl_F& y); // Spezialfall x oder y Integer oder rationale Zahl. inline const cl_R operator* (const cl_F& x, const cl_I& y) { extern const cl_R cl_F_I_mul (const cl_F&, const cl_I&); return cl_F_I_mul(x,y); } inline const cl_R operator* (const cl_I& x, const cl_F& y) { extern const cl_R cl_F_I_mul (const cl_F&, const cl_I&); return cl_F_I_mul(y,x); } inline const cl_R operator* (const cl_F& x, const cl_RA& y) { extern const cl_R cl_F_RA_mul (const cl_F&, const cl_RA&); return cl_F_RA_mul(x,y); } inline const cl_R operator* (const cl_RA& x, const cl_F& y) { extern const cl_R cl_F_RA_mul (const cl_F&, const cl_RA&); return cl_F_RA_mul(y,x); } // Dem C++-Compiler muß man nun auch das Folgende sagen: inline const cl_R operator* (const int x, const cl_F& y) { return cl_I(x) * y; } inline const cl_R operator* (const unsigned int x, const cl_F& y) { return cl_I(x) * y; } inline const cl_R operator* (const long x, const cl_F& y) { return cl_I(x) * y; } inline const cl_R operator* (const unsigned long x, const cl_F& y) { return cl_I(x) * y; } #ifdef HAVE_LONGLONG inline const cl_R operator* (const long long x, const cl_F& y) { return cl_I(x) * y; } inline const cl_R operator* (const unsigned long long x, const cl_F& y) { return cl_I(x) * y; } #endif inline const cl_F operator* (const float x, const cl_F& y) { return cl_F(x) * y; } inline const cl_F operator* (const double x, const cl_F& y) { return cl_F(x) * y; } inline const cl_R operator* (const cl_F& x, const int y) { return x * cl_I(y); } inline const cl_R operator* (const cl_F& x, const unsigned int y) { return x * cl_I(y); } inline const cl_R operator* (const cl_F& x, const long y) { return x * cl_I(y); } inline const cl_R operator* (const cl_F& x, const unsigned long y) { return x * cl_I(y); } #ifdef HAVE_LONGLONG inline const cl_R operator* (const cl_F& x, const long long y) { return x * cl_I(y); } inline const cl_R operator* (const cl_F& x, const unsigned long long y) { return x * cl_I(y); } #endif inline const cl_F operator* (const cl_F& x, const float y) { return x * cl_F(y); } inline const cl_F operator* (const cl_F& x, const double y) { return x * cl_F(y); } // Liefert (* x x), wo x ein Float ist. extern const cl_F square (const cl_F& x); // Liefert (/ x y), wo x und y Floats sind. extern const cl_F operator/ (const cl_F& x, const cl_F& y); // Liefert (/ x y), wo x und y ein Float und eine rationale Zahl sind. extern const cl_F operator/ (const cl_F& x, const cl_RA& y); extern const cl_F operator/ (const cl_F& x, const cl_I& y); extern const cl_R operator/ (const cl_RA& x, const cl_F& y); extern const cl_R operator/ (const cl_I& x, const cl_F& y); // The C++ compilers could hardly guess the following: inline const cl_F operator/ (const cl_F& x, const int y) { return x / cl_I(y); } inline const cl_F operator/ (const cl_F& x, const unsigned int y) { return x / cl_I(y); } inline const cl_F operator/ (const cl_F& x, const long y) { return x / cl_I(y); } inline const cl_F operator/ (const cl_F& x, const unsigned long y) { return x / cl_I(y); } #ifdef HAVE_LONGLONG inline const cl_F operator/ (const cl_F& x, const long long y) { return x / cl_I(y); } inline const cl_F operator/ (const cl_F& x, const unsigned long long y) { return x / cl_I(y); } #endif inline const cl_F operator/ (const cl_F& x, const float y) { return x / cl_F(y); } inline const cl_F operator/ (const cl_F& x, const double y) { return x / cl_F(y); } inline const cl_R operator/ (const int x, const cl_F& y) { return cl_I(x) / y; } inline const cl_R operator/ (const unsigned int x, const cl_F& y) { return cl_I(x) / y; } inline const cl_R operator/ (const long x, const cl_F& y) { return cl_I(x) / y; } inline const cl_R operator/ (const unsigned long x, const cl_F& y) { return cl_I(x) / y; } #ifdef HAVE_LONGLONG inline const cl_R operator/ (const long long x, const cl_F& y) { return cl_I(x) / y; } inline const cl_R operator/ (const unsigned long long x, const cl_F& y) { return cl_I(x) / y; } #endif inline const cl_F operator/ (const float x, const cl_F& y) { return cl_F(x) / y; } inline const cl_F operator/ (const double x, const cl_F& y) { return cl_F(x) / y; } // Liefert (abs x), wo x ein Float ist. extern const cl_F abs (const cl_F& x); // Liefert zu einem Float x>=0 : (sqrt x), ein Float. extern const cl_F sqrt (const cl_F& x); // recip(x) liefert (/ x), wo x ein Float ist. extern const cl_F recip (const cl_F& x); // (1+ x), wo x ein Float ist. inline const cl_F plus1 (const cl_F& x) // { return x + cl_I(1); } { return x + cl_float(1,x); } // (1- x), wo x ein Float ist. inline const cl_F minus1 (const cl_F& x) // { return x + cl_I(-1); } { return x + cl_float(-1,x); } // compare(x,y) vergleicht zwei Floats x und y. // Ergebnis: 0 falls x=y, +1 falls x>y, -1 falls x= (const cl_F& x, const cl_F& y) { return compare(x,y)>=0; } inline bool operator> (const cl_F& x, const cl_F& y) { return compare(x,y)>0; } // ffloor(x) liefert (ffloor x), wo x ein Float ist. extern const cl_F ffloor (const cl_F& x); // fceiling(x) liefert (fceiling x), wo x ein Float ist. extern const cl_F fceiling (const cl_F& x); // ftruncate(x) liefert (ftruncate x), wo x ein Float ist. extern const cl_F ftruncate (const cl_F& x); // fround(x) liefert (fround x), wo x ein Float ist. extern const cl_F fround (const cl_F& x); // Return type for frounding operators. // x / y --> (q,r) with x = y*q+r. struct cl_F_fdiv_t { cl_F quotient; cl_F remainder; // Constructor. cl_F_fdiv_t () {} cl_F_fdiv_t (const cl_F& q, const cl_F& r) : quotient(q), remainder(r) {} }; // ffloor2(x) liefert (ffloor x), wo x ein F ist. extern const cl_F_fdiv_t ffloor2 (const cl_F& x); // fceiling2(x) liefert (fceiling x), wo x ein F ist. extern const cl_F_fdiv_t fceiling2 (const cl_F& x); // ftruncate2(x) liefert (ftruncate x), wo x ein F ist. extern const cl_F_fdiv_t ftruncate2 (const cl_F& x); // fround2(x) liefert (fround x), wo x ein F ist. extern const cl_F_fdiv_t fround2 (const cl_F& x); // Return type for rounding operators. // x / y --> (q,r) with x = y*q+r. struct cl_F_div_t { cl_I quotient; cl_F remainder; // Constructor. cl_F_div_t () {} cl_F_div_t (const cl_I& q, const cl_F& r) : quotient(q), remainder(r) {} }; // floor2(x) liefert (floor x), wo x ein F ist. extern const cl_F_div_t floor2 (const cl_F& x); extern const cl_I floor1 (const cl_F& x); // ceiling2(x) liefert (ceiling x), wo x ein F ist. extern const cl_F_div_t ceiling2 (const cl_F& x); extern const cl_I ceiling1 (const cl_F& x); // truncate2(x) liefert (truncate x), wo x ein F ist. extern const cl_F_div_t truncate2 (const cl_F& x); extern const cl_I truncate1 (const cl_F& x); // round2(x) liefert (round x), wo x ein F ist. extern const cl_F_div_t round2 (const cl_F& x); extern const cl_I round1 (const cl_F& x); // floor2(x,y) liefert (floor x y), wo x und y Floats sind. extern const cl_F_div_t floor2 (const cl_F& x, const cl_F& y); inline const cl_I floor1 (const cl_F& x, const cl_F& y) { return floor1(x/y); } // ceiling2(x,y) liefert (ceiling x y), wo x und y Floats sind. extern const cl_F_div_t ceiling2 (const cl_F& x, const cl_F& y); inline const cl_I ceiling1 (const cl_F& x, const cl_F& y) { return ceiling1(x/y); } // truncate2(x,y) liefert (truncate x y), wo x und y Floats sind. extern const cl_F_div_t truncate2 (const cl_F& x, const cl_F& y); inline const cl_I truncate1 (const cl_F& x, const cl_F& y) { return truncate1(x/y); } // round2(x,y) liefert (round x y), wo x und y Floats sind. extern const cl_F_div_t round2 (const cl_F& x, const cl_F& y); inline const cl_I round1 (const cl_F& x, const cl_F& y) { return round1(x/y); } // Return type for decode_float: struct decoded_float { cl_F mantissa; cl_I exponent; cl_F sign; // Constructor. decoded_float () {} decoded_float (const cl_F& m, const cl_I& e, const cl_F& s) : mantissa(m), exponent(e), sign(s) {} }; // decode_float(x) liefert zu einem Float x: (decode-float x). // x = 0.0 liefert (0.0, 0, 1.0). // x = (-1)^s * 2^e * m liefert ((-1)^0 * 2^0 * m, e als Integer, (-1)^s). extern const decoded_float decode_float (const cl_F& x); // float_exponent(x) liefert zu einem Float x: // den Exponenten von (decode-float x). // x = 0.0 liefert 0. // x = (-1)^s * 2^e * m liefert e. extern sintE float_exponent (const cl_F& x); // float_radix(x) liefert (float-radix x), wo x ein Float ist. inline sintL float_radix (const cl_F& x) { (void)x; // unused x return 2; } // float_sign(x) liefert (float-sign x), wo x ein Float ist. extern const cl_F float_sign (const cl_F& x); // float_sign(x,y) liefert (float-sign x y), wo x und y Floats sind. extern const cl_F float_sign (const cl_F& x, const cl_F& y); // float_digits(x) liefert (float-digits x), wo x ein Float ist. // < ergebnis: ein uintC >0 extern uintC float_digits (const cl_F& x); // float_precision(x) liefert (float-precision x), wo x ein Float ist. // < ergebnis: ein uintC >=0 extern uintC float_precision (const cl_F& x); // Returns the floating point format of a float. inline float_format_t float_format (const cl_F& x) { return (float_format_t) float_digits(x); } // integer_decode_float(x) liefert zu einem Float x: (integer-decode-float x). // x = 0.0 liefert (0, 0, 1). // x = (-1)^s * 2^e * m bei Float-Precision p liefert // (Mantisse 2^p * m als Integer, e-p als Integer, (-1)^s als Fixnum). extern const cl_idecoded_float integer_decode_float (const cl_F& x); // rational(x) liefert (rational x), wo x ein Float ist. extern const cl_RA rational (const cl_F& x); // scale_float(x,delta) liefert x*2^delta, wo x ein Float ist. extern const cl_F scale_float (const cl_F& x, sintC delta); extern const cl_F scale_float (const cl_F& x, const cl_I& delta); // max(x,y) liefert (max x y), wo x und y Floats sind. extern const cl_F max (const cl_F& x, const cl_F& y); // min(x,y) liefert (min x y), wo x und y Floats sind. extern const cl_F min (const cl_F& x, const cl_F& y); // signum(x) liefert (signum x), wo x ein Float ist. extern const cl_F signum (const cl_F& x); // Returns the largest (most positive) floating point number in float format f. extern const cl_F most_positive_float (float_format_t f); // Returns the smallest (most negative) floating point number in float format f. extern const cl_F most_negative_float (float_format_t f); // Returns the least positive floating point number (i.e. > 0 but closest to 0) // in float format f. extern const cl_F least_positive_float (float_format_t f); // Returns the least negative floating point number (i.e. < 0 but closest to 0) // in float format f. extern const cl_F least_negative_float (float_format_t f); // Returns the smallest floating point number e > 0 such that 1+e != 1. extern const cl_F float_epsilon (float_format_t f); // Returns the smallest floating point number e > 0 such that 1-e != 1. extern const cl_F float_negative_epsilon (float_format_t f); // Konversion zu einem C "float". extern float float_approx (const cl_F& x); // Konversion zu einem C "double". extern double double_approx (const cl_F& x); // Transcendental functions // pi(y) liefert die Zahl pi im selben Float-Format wie y. // > y: ein Float extern const cl_F pi (const cl_F& y); // pi(y) liefert die Zahl pi im Float-Format f. // > f: eine Float-Format-Spezifikation extern const cl_F pi (float_format_t f); // pi() liefert die Zahl pi im Default-Float-Format. extern const cl_F pi (void); // sin(x) liefert den Sinus (sin x) eines Float x. extern const cl_F sin (const cl_F& x); // cos(x) liefert den Cosinus (cos x) eines Float x. extern const cl_F cos (const cl_F& x); // Return type for cos_sin(): struct cos_sin_t { cl_R cos; cl_R sin; // Constructor: cos_sin_t () {} cos_sin_t (const cl_R& u, const cl_R& v) : cos (u), sin (v) {} }; // cos_sin(x) liefert ((cos x),(sin x)), beide Werte. extern const cos_sin_t cos_sin (const cl_F& x); // tan(x) liefert den Tangens (tan x) eines Float x. extern const cl_F tan (const cl_F& x); // exp1(y) liefert die Zahl e = exp(1) im selben Float-Format wie y. // > y: ein Float extern const cl_F exp1 (const cl_F& y); // exp1(y) liefert die Zahl e = exp(1) im Float-Format f. // > f: eine Float-Format-Spezifikation extern const cl_F exp1 (float_format_t f); // exp1() liefert die Zahl e = exp(1) im Default-Float-Format. extern const cl_F exp1 (void); // ln(x) liefert zu einem Float x>0 die Zahl ln(x). extern const cl_F ln (const cl_F& x); // Spezialfall: x Long-Float -> Ergebnis Long-Float inline const cl_LF ln (const cl_LF& x) { return The(cl_LF)(ln(The(cl_F)(x))); } // exp(x) liefert zu einem Float x die Zahl exp(x). extern const cl_F exp (const cl_F& x); // sinh(x) liefert zu einem Float x die Zahl sinh(x). extern const cl_F sinh (const cl_F& x); // cosh(x) liefert zu einem Float x die Zahl cosh(x). extern const cl_F cosh (const cl_F& x); // Return type for cosh_sinh(): struct cosh_sinh_t { cl_R cosh; cl_R sinh; // Constructor: cosh_sinh_t () {} cosh_sinh_t (const cl_R& u, const cl_R& v) : cosh (u), sinh (v) {} }; // cosh_sinh(x) liefert ((cosh x),(sinh x)), beide Werte. extern const cosh_sinh_t cosh_sinh (const cl_F& x); // tanh(x) liefert zu einem Float x die Zahl tanh(x). extern const cl_F tanh (const cl_F& x); // eulerconst(y) liefert die Eulersche Konstante // im selben Float-Format wie y. // > y: ein Float extern const cl_F eulerconst (const cl_F& y); // eulerconst(y) liefert die Eulersche Konstante im Float-Format f. // > f: eine Float-Format-Spezifikation extern const cl_F eulerconst (float_format_t f); // eulerconst() liefert die Eulersche Konstante im Default-Float-Format. extern const cl_F eulerconst (void); // catalanconst(y) liefert die Catalansche Konstante // im selben Float-Format wie y. // > y: ein Float extern const cl_F catalanconst (const cl_F& y); // catalanconst(y) liefert die Catalansche Konstante im Float-Format f. // > f: eine Float-Format-Spezifikation extern const cl_F catalanconst (float_format_t f); // catalanconst() liefert die Catalansche Konstante im Default-Float-Format. extern const cl_F catalanconst (void); // zeta(s) returns the Riemann zeta function at s>1. extern const cl_F zeta (int s, const cl_F& y); extern const cl_F zeta (int s, float_format_t f); extern const cl_F zeta (int s); // random_F(randomstate,n) liefert zu einem Float n>0 ein zufälliges // Float x mit 0 <= x < n. // > randomstate: ein Random-State, wird verändert extern const cl_F random_F (random_state& randomstate, const cl_F& n); inline const cl_F random_F (const cl_F& n) { return random_F(default_random_state,n); } // This could be optimized to use in-place operations. inline cl_F& operator+= (cl_F& x, const cl_F& y) { return x = x + y; } inline cl_F& operator+= (cl_F& x, const float y) { return x = x + y; } inline cl_F& operator+= (cl_F& x, const double y) { return x = x + y; } inline cl_F& operator++ /* prefix */ (cl_F& x) { return x = plus1(x); } inline void operator++ /* postfix */ (cl_F& x, int dummy) { (void)dummy; x = plus1(x); } inline cl_F& operator-= (cl_F& x, const cl_F& y) { return x = x - y; } inline cl_F& operator-= (cl_F& x, const float y) { return x = x - y; } inline cl_F& operator-= (cl_F& x, const double y) { return x = x - y; } inline cl_F& operator-- /* prefix */ (cl_F& x) { return x = minus1(x); } inline void operator-- /* postfix */ (cl_F& x, int dummy) { (void)dummy; x = minus1(x); } inline cl_F& operator*= (cl_F& x, const cl_F& y) { return x = x * y; } inline cl_F& operator*= (cl_F& x, const float y) { return x = x * y; } inline cl_F& operator*= (cl_F& x, const double y) { return x = x * y; } inline cl_F& operator/= (cl_F& x, const cl_F& y) { return x = x / y; } inline cl_F& operator/= (cl_F& x, const float y) { return x = x / y; } inline cl_F& operator/= (cl_F& x, const double y) { return x = x / y; } // Thrown when a floating-point exception occurs. class floating_point_exception : public runtime_exception { public: explicit floating_point_exception(const std::string & what) : runtime_exception(what) {} }; // Thrown when NaN occurs. class floating_point_nan_exception : public floating_point_exception { public: floating_point_nan_exception(); }; // Thrown when overflow occurs. class floating_point_overflow_exception : public floating_point_exception { public: floating_point_overflow_exception(); }; // Thrown when underflow occurs. class floating_point_underflow_exception : public floating_point_exception { public: floating_point_underflow_exception(); }; // If this is true, floating point underflow returns zero instead of throwing an exception. extern bool cl_inhibit_floating_point_underflow; } // namespace cln #endif /* _CL_FLOAT_H */ cln-1.3.3/include/cln/cln.h0000644000000000000000000000671611201634736012321 0ustar // CLN exported types and functions #ifndef _CLN_H #define _CLN_H // Automatically generated by configure //#include "cln/config.h" // included by "cln/types.h" below //#include "cln/intparam.h" // included by "cln/types.h" below //#include "cln/floatparam.h" // not needed by any public header file // ============================== base ============================== // Basic types and definitions. #include "cln/types.h" #include "cln/modules.h" #include "cln/object.h" // Miscellaneous. #include "cln/random.h" #include "cln/malloc.h" #include "cln/exception.h" #include "cln/floatformat.h" #include "cln/io.h" #include "cln/condition.h" // Symbolic facilities. #include "cln/string.h" #include "cln/symbol.h" #include "cln/proplist.h" // Miscellaneous. #include "cln/input.h" #include "cln/output.h" // Abstract number classes. #include "cln/number.h" #include "cln/number_io.h" #include "cln/complex_class.h" #include "cln/real_class.h" #include "cln/rational_class.h" // Rings. #include "cln/ring.h" // ============================== integer ============================== // Integers. #include "cln/integer_class.h" #include "cln/integer.h" #include "cln/integer_io.h" #include "cln/integer_ring.h" #include "cln/null_ring.h" // ============================== rational ============================== // Rational numbers. #include "cln/rational.h" #include "cln/rational_io.h" #include "cln/rational_ring.h" // ============================== float ============================== // Floating-point numbers. #include "cln/float_class.h" #include "cln/sfloat_class.h" #include "cln/ffloat_class.h" #include "cln/dfloat_class.h" #include "cln/lfloat_class.h" #include "cln/float.h" #include "cln/float_io.h" #include "cln/sfloat.h" #include "cln/sfloat_io.h" #include "cln/ffloat.h" #include "cln/ffloat_io.h" #include "cln/dfloat.h" #include "cln/dfloat_io.h" #include "cln/lfloat.h" #include "cln/lfloat_io.h" // ============================== real ============================== // Real numbers. #include "cln/real.h" #include "cln/real_io.h" #include "cln/real_ring.h" // ============================== complex ============================== // Complex numbers. #include "cln/complex.h" #include "cln/complex_io.h" #include "cln/complex_ring.h" // ============================== modinteger ============================== // Modular integers. #include "cln/modinteger.h" // ============================== numtheory ============================== // Rings for number theory. #include "cln/numtheory.h" // ============================== vector ============================== // Vectors. #include "cln/V.h" #include "cln/GV.h" #include "cln/GV_number.h" #include "cln/GV_complex.h" #include "cln/GV_real.h" #include "cln/GV_rational.h" #include "cln/GV_integer.h" #include "cln/GV_modinteger.h" #include "cln/SV.h" #include "cln/SV_number.h" #include "cln/SV_complex.h" #include "cln/SV_real.h" #include "cln/SV_rational.h" #include "cln/SV_integer.h" #include "cln/SV_ringelt.h" // ============================== polynomial ============================== // Polynomials. #include "cln/univpoly.h" #include "cln/univpoly_complex.h" #include "cln/univpoly_real.h" #include "cln/univpoly_rational.h" #include "cln/univpoly_integer.h" #include "cln/univpoly_modint.h" // ============================== modpolynomial ============================== // ============================== timing ============================== // Environmental facilities. #include "cln/timing.h" #endif /* _CLN_H */ cln-1.3.3/include/cln/modinteger.h0000644000000000000000000003566311201634736013705 0ustar // Modular integer operations. #ifndef _CL_MODINTEGER_H #define _CL_MODINTEGER_H #include "cln/object.h" #include "cln/ring.h" #include "cln/integer.h" #include "cln/random.h" #include "cln/malloc.h" #include "cln/io.h" #include "cln/proplist.h" #include "cln/condition.h" #include "cln/exception.h" #undef random // Linux defines random() as a macro! namespace cln { // Representation of an element of a ring Z/mZ. // To protect against mixing elements of different modular rings, such as // (3 mod 4) + (2 mod 5), every modular integer carries its ring in itself. // Representation of a ring Z/mZ. class cl_heap_modint_ring; class cl_modint_ring : public cl_ring { public: // Default constructor. cl_modint_ring (); // Constructor. Takes a cl_heap_modint_ring*, increments its refcount. cl_modint_ring (cl_heap_modint_ring* r); // Copy constructor. cl_modint_ring (const cl_modint_ring&); // Assignment operator. cl_modint_ring& operator= (const cl_modint_ring&); // Automatic dereferencing. cl_heap_modint_ring* operator-> () const { return (cl_heap_modint_ring*)heappointer; } }; // Z/0Z extern const cl_modint_ring cl_modint0_ring; // Default constructor. This avoids dealing with NULL pointers. inline cl_modint_ring::cl_modint_ring () : cl_ring (as_cl_private_thing(cl_modint0_ring)) {} class cl_MI_init_helper { static int count; public: cl_MI_init_helper(); ~cl_MI_init_helper(); }; static cl_MI_init_helper cl_MI_init_helper_instance; // Copy constructor and assignment operator. CL_DEFINE_COPY_CONSTRUCTOR2(cl_modint_ring,cl_ring) CL_DEFINE_ASSIGNMENT_OPERATOR(cl_modint_ring,cl_modint_ring) // Normal constructor for `cl_modint_ring'. inline cl_modint_ring::cl_modint_ring (cl_heap_modint_ring* r) : cl_ring ((cl_private_thing) (cl_inc_pointer_refcount((cl_heap*)r), r)) {} // Operations on modular integer rings. inline bool operator== (const cl_modint_ring& R1, const cl_modint_ring& R2) { return (R1.pointer == R2.pointer); } inline bool operator!= (const cl_modint_ring& R1, const cl_modint_ring& R2) { return (R1.pointer != R2.pointer); } inline bool operator== (const cl_modint_ring& R1, cl_heap_modint_ring* R2) { return (R1.pointer == R2); } inline bool operator!= (const cl_modint_ring& R1, cl_heap_modint_ring* R2) { return (R1.pointer != R2); } // Condition raised when a probable prime is discovered to be composite. struct cl_composite_condition : public cl_condition { SUBCLASS_cl_condition() cl_I p; // the non-prime cl_I factor; // a nontrivial factor, or 0 // Constructors. cl_composite_condition (const cl_I& _p) : p (_p), factor (0) { print(std::cerr); } cl_composite_condition (const cl_I& _p, const cl_I& _f) : p (_p), factor (_f) { print(std::cerr); } // Implement general condition methods. const char * name () const; void print (std::ostream&) const; ~cl_composite_condition () {} }; // Representation of an element of a ring Z/mZ. class _cl_MI /* cf. _cl_ring_element */ { public: cl_I rep; // representative, integer >=0, 0 const _cl_MI (* expt_pos) (cl_heap_modint_ring* R, const _cl_MI& x, const cl_I& y); // x^-1 const cl_MI_x (* recip) (cl_heap_modint_ring* R, const _cl_MI& x); // x*y^-1 const cl_MI_x (* div) (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y); // x^y, y Integer const cl_MI_x (* expt) (cl_heap_modint_ring* R, const _cl_MI& x, const cl_I& y); // x -> x mod m for x>=0 const cl_I (* reduce_modulo) (cl_heap_modint_ring* R, const cl_I& x); // some inverse of canonical homomorphism const cl_I (* retract) (cl_heap_modint_ring* R, const _cl_MI& x); }; typedef const _cl_modint_setops cl_modint_setops; typedef const _cl_modint_addops cl_modint_addops; typedef const _cl_modint_mulops cl_modint_mulops; // Representation of the ring Z/mZ. // Currently rings are garbage collected only when they are not referenced // any more and when the ring table gets full. // Modular integer rings are kept unique in memory. This way, ring equality // can be checked very efficiently by a simple pointer comparison. class cl_heap_modint_ring /* cf. cl_heap_ring */ : public cl_heap { SUBCLASS_cl_heap_ring() private: cl_property_list properties; protected: cl_modint_setops* setops; cl_modint_addops* addops; cl_modint_mulops* mulops; public: cl_I modulus; // m, normalized to be >= 0 public: // Low-level operations. void _fprint (std::ostream& stream, const _cl_MI& x) { setops->fprint(this,stream,x); } bool _equal (const _cl_MI& x, const _cl_MI& y) { return setops->equal(this,x,y); } const _cl_MI _random (random_state& randomstate) { return setops->random(this,randomstate); } const _cl_MI _zero () { return addops->zero(this); } bool _zerop (const _cl_MI& x) { return addops->zerop(this,x); } const _cl_MI _plus (const _cl_MI& x, const _cl_MI& y) { return addops->plus(this,x,y); } const _cl_MI _minus (const _cl_MI& x, const _cl_MI& y) { return addops->minus(this,x,y); } const _cl_MI _uminus (const _cl_MI& x) { return addops->uminus(this,x); } const _cl_MI _one () { return mulops->one(this); } const _cl_MI _canonhom (const cl_I& x) { return mulops->canonhom(this,x); } const _cl_MI _mul (const _cl_MI& x, const _cl_MI& y) { return mulops->mul(this,x,y); } const _cl_MI _square (const _cl_MI& x) { return mulops->square(this,x); } const _cl_MI _expt_pos (const _cl_MI& x, const cl_I& y) { return mulops->expt_pos(this,x,y); } const cl_MI_x _recip (const _cl_MI& x) { return mulops->recip(this,x); } const cl_MI_x _div (const _cl_MI& x, const _cl_MI& y) { return mulops->div(this,x,y); } const cl_MI_x _expt (const _cl_MI& x, const cl_I& y) { return mulops->expt(this,x,y); } const cl_I _reduce_modulo (const cl_I& x) { return mulops->reduce_modulo(this,x); } const cl_I _retract (const _cl_MI& x) { return mulops->retract(this,x); } // High-level operations. void fprint (std::ostream& stream, const cl_MI& x) { if (!(x.ring() == this)) throw runtime_exception(); _fprint(stream,x); } bool equal (const cl_MI& x, const cl_MI& y) { if (!(x.ring() == this)) throw runtime_exception(); if (!(y.ring() == this)) throw runtime_exception(); return _equal(x,y); } const cl_MI random (random_state& randomstate = default_random_state) { return cl_MI(this,_random(randomstate)); } const cl_MI zero () { return cl_MI(this,_zero()); } bool zerop (const cl_MI& x) { if (!(x.ring() == this)) throw runtime_exception(); return _zerop(x); } const cl_MI plus (const cl_MI& x, const cl_MI& y) { if (!(x.ring() == this)) throw runtime_exception(); if (!(y.ring() == this)) throw runtime_exception(); return cl_MI(this,_plus(x,y)); } const cl_MI minus (const cl_MI& x, const cl_MI& y) { if (!(x.ring() == this)) throw runtime_exception(); if (!(y.ring() == this)) throw runtime_exception(); return cl_MI(this,_minus(x,y)); } const cl_MI uminus (const cl_MI& x) { if (!(x.ring() == this)) throw runtime_exception(); return cl_MI(this,_uminus(x)); } const cl_MI one () { return cl_MI(this,_one()); } const cl_MI canonhom (const cl_I& x) { return cl_MI(this,_canonhom(x)); } const cl_MI mul (const cl_MI& x, const cl_MI& y) { if (!(x.ring() == this)) throw runtime_exception(); if (!(y.ring() == this)) throw runtime_exception(); return cl_MI(this,_mul(x,y)); } const cl_MI square (const cl_MI& x) { if (!(x.ring() == this)) throw runtime_exception(); return cl_MI(this,_square(x)); } const cl_MI expt_pos (const cl_MI& x, const cl_I& y) { if (!(x.ring() == this)) throw runtime_exception(); return cl_MI(this,_expt_pos(x,y)); } const cl_MI_x recip (const cl_MI& x) { if (!(x.ring() == this)) throw runtime_exception(); return _recip(x); } const cl_MI_x div (const cl_MI& x, const cl_MI& y) { if (!(x.ring() == this)) throw runtime_exception(); if (!(y.ring() == this)) throw runtime_exception(); return _div(x,y); } const cl_MI_x expt (const cl_MI& x, const cl_I& y) { if (!(x.ring() == this)) throw runtime_exception(); return _expt(x,y); } const cl_I reduce_modulo (const cl_I& x) { return _reduce_modulo(x); } const cl_I retract (const cl_MI& x) { if (!(x.ring() == this)) throw runtime_exception(); return _retract(x); } // Miscellaneous. sintC bits; // number of bits needed to represent a representative, or -1 int log2_bits; // log_2(bits), or -1 // Property operations. cl_property* get_property (const cl_symbol& key) { return properties.get_property(key); } void add_property (cl_property* new_property) { properties.add_property(new_property); } // Constructor / destructor. cl_heap_modint_ring (cl_I m, cl_modint_setops*, cl_modint_addops*, cl_modint_mulops*); ~cl_heap_modint_ring () {} }; #define SUBCLASS_cl_heap_modint_ring() \ SUBCLASS_cl_heap_ring() // Lookup or create a modular integer ring Z/mZ extern const cl_modint_ring find_modint_ring (const cl_I& m); static cl_MI_init_helper cl_MI_init_helper_instance2; // Operations on modular integers. // Output. inline void fprint (std::ostream& stream, const cl_MI& x) { x.ring()->fprint(stream,x); } CL_DEFINE_PRINT_OPERATOR(cl_MI) // Add. inline const cl_MI operator+ (const cl_MI& x, const cl_MI& y) { return x.ring()->plus(x,y); } inline const cl_MI operator+ (const cl_MI& x, const cl_I& y) { return x.ring()->plus(x,x.ring()->canonhom(y)); } inline const cl_MI operator+ (const cl_I& x, const cl_MI& y) { return y.ring()->plus(y.ring()->canonhom(x),y); } // Negate. inline const cl_MI operator- (const cl_MI& x) { return x.ring()->uminus(x); } // Subtract. inline const cl_MI operator- (const cl_MI& x, const cl_MI& y) { return x.ring()->minus(x,y); } inline const cl_MI operator- (const cl_MI& x, const cl_I& y) { return x.ring()->minus(x,x.ring()->canonhom(y)); } inline const cl_MI operator- (const cl_I& x, const cl_MI& y) { return y.ring()->minus(y.ring()->canonhom(x),y); } // Shifts. extern const cl_MI operator<< (const cl_MI& x, sintC y); // assume 0 <= y < 2^(intCsize-1) extern const cl_MI operator>> (const cl_MI& x, sintC y); // assume m odd, 0 <= y < 2^(intCsize-1) // Equality. inline bool operator== (const cl_MI& x, const cl_MI& y) { return x.ring()->equal(x,y); } inline bool operator!= (const cl_MI& x, const cl_MI& y) { return !x.ring()->equal(x,y); } inline bool operator== (const cl_MI& x, const cl_I& y) { return x.ring()->equal(x,x.ring()->canonhom(y)); } inline bool operator!= (const cl_MI& x, const cl_I& y) { return !x.ring()->equal(x,x.ring()->canonhom(y)); } inline bool operator== (const cl_I& x, const cl_MI& y) { return y.ring()->equal(y.ring()->canonhom(x),y); } inline bool operator!= (const cl_I& x, const cl_MI& y) { return !y.ring()->equal(y.ring()->canonhom(x),y); } // Compare against 0. inline bool zerop (const cl_MI& x) { return x.ring()->zerop(x); } // Multiply. inline const cl_MI operator* (const cl_MI& x, const cl_MI& y) { return x.ring()->mul(x,y); } // Squaring. inline const cl_MI square (const cl_MI& x) { return x.ring()->square(x); } // Exponentiation x^y, where y > 0. inline const cl_MI expt_pos (const cl_MI& x, const cl_I& y) { return x.ring()->expt_pos(x,y); } // Reciprocal. inline const cl_MI recip (const cl_MI& x) { return x.ring()->recip(x); } // Division. inline const cl_MI div (const cl_MI& x, const cl_MI& y) { return x.ring()->div(x,y); } inline const cl_MI div (const cl_MI& x, const cl_I& y) { return x.ring()->div(x,x.ring()->canonhom(y)); } inline const cl_MI div (const cl_I& x, const cl_MI& y) { return y.ring()->div(y.ring()->canonhom(x),y); } // Exponentiation x^y. inline const cl_MI expt (const cl_MI& x, const cl_I& y) { return x.ring()->expt(x,y); } // Scalar multiplication. inline const cl_MI operator* (const cl_I& x, const cl_MI& y) { return y.ring()->mul(y.ring()->canonhom(x),y); } inline const cl_MI operator* (const cl_MI& x, const cl_I& y) { return x.ring()->mul(x.ring()->canonhom(y),x); } // TODO: implement gcd, index (= gcd), unitp, sqrtp // Debugging support. #ifdef CL_DEBUG extern int cl_MI_debug_module; CL_FORCE_LINK(cl_MI_debug_dummy, cl_MI_debug_module) #endif } // namespace cln #endif /* _CL_MODINTEGER_H */ cln-1.3.3/include/cln/SV_rational.h0000644000000000000000000000353411201634736013761 0ustar // Simple vectors of rational numbers. #ifndef _CL_SV_RATIONAL_H #define _CL_SV_RATIONAL_H #include "cln/number.h" #include "cln/SV_real.h" #include "cln/rational_class.h" #include "cln/io.h" namespace cln { // A vector of rational numbers is just a normal vector of real numbers. typedef cl_heap_SV cl_heap_SV_RA; struct cl_SV_RA : public cl_SV { public: // Constructors. cl_SV_RA () : cl_SV ((cl_heap_SV_RA*) (cl_heap_SV_number*) cl_null_SV_number) {}; cl_SV_RA (const cl_SV_RA&); explicit cl_SV_RA (std::size_t len) : cl_SV ((cl_heap_SV_RA*) cl_make_heap_SV_number(len)) {}; // Assignment operators. cl_SV_RA& operator= (const cl_SV_RA&); // Private pointer manipulations. cl_SV_RA (cl_heap_SV_RA* p) : cl_SV (p) {} cl_SV_RA (cl_private_thing p) : cl_SV (p) {} }; inline cl_SV_RA::cl_SV_RA (const cl_SV_RA& x) : cl_SV (as_cl_private_thing(x)) {} CL_DEFINE_ASSIGNMENT_OPERATOR(cl_SV_RA,cl_SV_RA) // Copy a simple vector. inline const cl_SV_RA copy (const cl_SV_RA& vector) { return The(cl_SV_RA) (copy((const cl_SV_R&) vector)); } // Output. inline void fprint (std::ostream& stream, const cl_SV_RA& x) { extern cl_print_flags default_print_flags; extern void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* fun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_SV_number& vector); extern void print_rational (std::ostream& stream, const cl_print_flags& flags, const cl_RA& z); print_vector(stream, default_print_flags, (void (*) (std::ostream&, const cl_print_flags&, const cl_number&)) (void (*) (std::ostream&, const cl_print_flags&, const cl_RA&)) &print_rational, x); } CL_DEFINE_PRINT_OPERATOR(cl_SV_RA) } // namespace cln #endif /* _CL_SV_RAATIONAL_H */ cln-1.3.3/include/cln/symbol.h0000644000000000000000000000242312034113706013033 0ustar // Symbols. #ifndef _CL_SYMBOL_H #define _CL_SYMBOL_H #include "cln/string.h" namespace cln { // Symbols are just strings, uniquified through a global hash table. #if (defined(__alpha__) && !defined(__GNUC__)) struct hashuniq; #endif struct cl_symbol : public cl_rcpointer { public: // Conversion to string. operator cl_string () const; // Constructors. cl_symbol (const cl_string&); // create or lookup a symbol from its name cl_symbol (const cl_symbol&); // Assignment operators. cl_symbol& operator= (const cl_symbol&); // Private pointer manipulations. cl_symbol (cl_private_thing p) : cl_rcpointer (p) {} public: /* ugh */ // Create a new symbol given its name. cl_symbol (struct hashuniq * null, const cl_string& s); }; CL_DEFINE_COPY_CONSTRUCTOR2(cl_symbol,cl_rcpointer) CL_DEFINE_ASSIGNMENT_OPERATOR(cl_symbol,cl_symbol) // A symbol points to a string, so to convert cl_symbol -> cl_string, we just // take the pointer and put it into a cl_string. inline cl_symbol::operator cl_string () const { return cl_string(_as_cl_private_thing()); } // Comparison. inline bool equal (const cl_symbol& s1, const cl_symbol& s2) { return (s1.pointer == s2.pointer); } // Hash code. extern unsigned long hashcode (const cl_symbol& s); } // namespace cln #endif /* _CL_SYMBOL_H */ cln-1.3.3/include/cln/V.h0000644000000000000000000000071011201634736011736 0ustar // Vectors. #ifndef _CL_V_H #define _CL_V_H #include "cln/object.h" namespace cln { struct cl_V_any : public cl_gcpointer { // Constructors. cl_V_any () {} cl_V_any (const cl_V_any&); cl_V_any (cl_private_thing p) : cl_gcpointer (p) {} // Assignment operators. cl_V_any& operator= (const cl_V_any&); }; CL_DEFINE_COPY_CONSTRUCTOR2(cl_V_any,cl_gcpointer) CL_DEFINE_ASSIGNMENT_OPERATOR(cl_V_any,cl_V_any) } // namespace cln #endif /* _CL_V_H */ cln-1.3.3/include/cln/complex.h0000644000000000000000000001143711201634736013210 0ustar // Public complex number operations. #ifndef _CL_COMPLEX_H #define _CL_COMPLEX_H #include "cln/number.h" #include "cln/complex_class.h" #include "cln/real_class.h" #include "cln/integer_class.h" namespace cln { CL_DEFINE_AS_CONVERSION(cl_N) // zerop(x) testet, ob (= x 0). extern bool zerop (const cl_N& x); // Liefert zu reellen Zahlen a und b die komplexe Zahl a+bi. // complex(a,b) extern const cl_N complex (const cl_R& a, const cl_R& b); // realpart(x) liefert den Realteil der Zahl x. extern const cl_R realpart (const cl_N& x); // imagpart(x) liefert den Imaginärteil der Zahl x. extern const cl_R imagpart (const cl_N& x); // conjugate(x) liefert die konjugiert komplexe Zahl zur Zahl x. extern const cl_N conjugate (const cl_N& x); // Liefert (- x), wo x eine Zahl ist. extern const cl_N operator- (const cl_N& x); // Liefert (+ x y), wo x und y Zahlen sind. extern const cl_N operator+ (const cl_N& x, const cl_N& y); // Liefert (- x y), wo x und y Zahlen sind. extern const cl_N operator- (const cl_N& x, const cl_N& y); // Liefert (* x y), wo x und y Zahlen sind. extern const cl_N operator* (const cl_N& x, const cl_N& y); // Liefert (* x x), wo x eine Zahl ist. extern const cl_N square (const cl_N& x); // Liefert (/ x y), wo x und y Zahlen sind. extern const cl_N operator/ (const cl_N& x, const cl_N& y); // Liefert (abs x), wo x eine Zahl ist. extern const cl_R abs (const cl_N& x); // recip(x) liefert (/ x), wo x eine Zahl ist. extern const cl_N recip (const cl_N& x); // (1+ x), wo x eine Zahl ist. extern const cl_N plus1 (const cl_N& x); // (1- x), wo x eine Zahl ist. extern const cl_N minus1 (const cl_N& x); // signum(x) liefert (signum x), wo x eine Zahl ist. extern const cl_N signum (const cl_N& x); // sqrt(x) = (sqrt x) zieht die Wurzel aus einer Zahl x. extern const cl_N sqrt (const cl_N& x); // equal(x,y) vergleicht zwei Zahlen x und y auf Gleichheit. extern bool equal (const cl_N& x, const cl_N& y); // equal_hashcode(x) liefert einen equal-invarianten Hashcode für x. extern uint32 equal_hashcode (const cl_N& x); inline bool operator== (const cl_N& x, const cl_N& y) { return equal(x,y); } inline bool operator!= (const cl_N& x, const cl_N& y) { return !equal(x,y); } // phase(x) liefert (phase x), wo x eine Zahl ist. // Ergebnis rational nur wenn (= x 0) oder wenn x reell und >0. extern const cl_R phase (const cl_N& x); // exp(x) liefert (exp x), wo x eine Zahl ist. extern const cl_N exp (const cl_N& x); // log(x) liefert (log x), wo x eine Zahl ist. extern const cl_N log (const cl_N& x); // log(a,b) liefert (log a b), wo a und b Zahlen sind. extern const cl_N log (const cl_N& a, const cl_N& b); // (expt x y), wo x eine Zahl und y ein Integer ist. extern const cl_N expt (const cl_N& x, sintL y); extern const cl_N expt (const cl_N& x, const cl_I& y); // (expt x y), wo x und y Zahlen sind. extern const cl_N expt (const cl_N& x, const cl_N& y); // sin(x) liefert (sin x), wo x eine Zahl ist. extern const cl_N sin (const cl_N& x); // cos(x) liefert (cos x), wo x eine Zahl ist. extern const cl_N cos (const cl_N& x); // tan(x) liefert (tan x), wo x eine Zahl ist. extern const cl_N tan (const cl_N& x); // cis(x) liefert (cis x), wo x eine Zahl ist. extern const cl_N cis (const cl_R& x); extern const cl_N cis (const cl_N& x); // sinh(x) liefert (sinh x), wo x eine Zahl ist. extern const cl_N sinh (const cl_N& x); // cosh(x) liefert (cosh x), wo x eine Zahl ist. extern const cl_N cosh (const cl_N& x); // tanh(x) liefert (tanh x), wo x eine Zahl ist. extern const cl_N tanh (const cl_N& x); // atan(z) liefert den Arctan einer Zahl z. extern const cl_N atan (const cl_N& z); // atanh(z) liefert den Artanh einer Zahl z. extern const cl_N atanh (const cl_N& z); // asin(z) liefert den Arcsin einer Zahl z. extern const cl_N asin (const cl_N& z); // asinh(z) liefert den Arsinh einer Zahl z. extern const cl_N asinh (const cl_N& z); // acos(z) liefert den Arccos einer Zahl z. extern const cl_N acos (const cl_N& z); // acosh(z) liefert den Arcosh einer Zahl z. extern const cl_N acosh (const cl_N& z); // This could be optimized to use in-place operations. inline cl_N& operator+= (cl_N& x, const cl_N& y) { return x = x + y; } inline cl_N& operator++ /* prefix */ (cl_N& x) { return x = plus1(x); } inline void operator++ /* postfix */ (cl_N& x, int dummy) { (void)dummy; x = plus1(x); } inline cl_N& operator-= (cl_N& x, const cl_N& y) { return x = x - y; } inline cl_N& operator-- /* prefix */ (cl_N& x) { return x = minus1(x); } inline void operator-- /* postfix */ (cl_N& x, int dummy) { (void)dummy; x = minus1(x); } inline cl_N& operator*= (cl_N& x, const cl_N& y) { return x = x * y; } inline cl_N& operator/= (cl_N& x, const cl_N& y) { return x = x / y; } // Runtime typing support. extern cl_class cl_class_complex; } // namespace cln #endif /* _CL_COMPLEX_H */ cln-1.3.3/include/cln/SV_ringelt.h0000644000000000000000000000454311201634736013615 0ustar // Simple vectors of ring elements. #ifndef _CL_SV_RINGELT_H #define _CL_SV_RINGELT_H #include "cln/ring.h" #include "cln/SV.h" #include "cln/io.h" namespace cln { typedef cl_heap_SV<_cl_ring_element> cl_heap_SV_ringelt; struct cl_SV_ringelt : public cl_SV<_cl_ring_element,cl_SV_any> { public: // Constructors. cl_SV_ringelt (); cl_SV_ringelt (const cl_SV_ringelt&); explicit cl_SV_ringelt (std::size_t len); // Assignment operators. cl_SV_ringelt& operator= (const cl_SV_ringelt&); // Private pointer manipulations. operator cl_heap_SV_ringelt* () const; cl_SV_ringelt (cl_heap_SV_ringelt* p) : cl_SV<_cl_ring_element,cl_SV_any> (p) {} cl_SV_ringelt (cl_private_thing p) : cl_SV<_cl_ring_element,cl_SV_any> (p) {} }; inline cl_SV_ringelt::cl_SV_ringelt (const cl_SV_ringelt& x) : cl_SV<_cl_ring_element,cl_SV_any> (as_cl_private_thing(x)) {} CL_DEFINE_ASSIGNMENT_OPERATOR(cl_SV_ringelt,cl_SV_ringelt) // Returns a new simple vector with uninitialized contents. extern cl_heap_SV_ringelt* cl_make_heap_SV_ringelt_uninit (std::size_t len); // Returns a new simple vector with all elements initialized to some value. extern cl_heap_SV_ringelt* cl_make_heap_SV_ringelt (std::size_t len); inline cl_SV_ringelt::cl_SV_ringelt (std::size_t len) : cl_SV<_cl_ring_element,cl_SV_any> (cl_make_heap_SV_ringelt(len)) {} // Private pointer manipulations. // Never throw away a `struct cl_heap_SV_ringelt *'! inline cl_SV_ringelt::operator cl_heap_SV_ringelt* () const { cl_heap_SV_ringelt* hpointer = (cl_heap_SV_ringelt*)pointer; cl_inc_refcount(*this); return hpointer; } extern const cl_SV_ringelt cl_null_SV_ringelt; inline cl_SV_ringelt::cl_SV_ringelt () : cl_SV<_cl_ring_element,cl_SV_any> ((cl_heap_SV_ringelt*) cl_null_SV_ringelt) {} class cl_SV_ringelt_init_helper { static int count; public: cl_SV_ringelt_init_helper(); ~cl_SV_ringelt_init_helper(); }; static cl_SV_ringelt_init_helper cl_SV_ringelt_init_helper_instance; // Copy a simple vector. inline const cl_SV_ringelt copy (const cl_SV_ringelt& vector) { return The(cl_SV_ringelt) (copy((const cl_SV_any&) vector)); } // Output. extern void fprint (std::ostream& stream, const cl_ring& R, const cl_SV_ringelt& x); // Debugging support. #ifdef CL_DEBUG extern int cl_SV_ringelt_debug_module; CL_FORCE_LINK(cl_SV_ringelt_debug_dummy, cl_SV_ringelt_debug_module) #endif } // namespace cln #endif /* _CL_SV_RINGELT_H */ cln-1.3.3/include/cln/number.h0000644000000000000000000002451611547700426013036 0ustar // Basic definitions of numbers #ifndef _CL_NUMBER_H #define _CL_NUMBER_H #include "cln/object.h" #include "cln/malloc.h" // Type hierachy: // Number (N) = // Real (R) = // Float (F) = // Short float (SF) // Single float (FF) // Double float (DF) // Long float (LF) // Rational (RA) = // Integer (I) = // Fixnum (FN) // Bignum (BN) // Ratio (RT) // Complex (C) // Constructors and assignment operators from C numeric types. #ifdef _MSC_VER // Workaround to force MSVC to tag the symbol with the cln:: namespace // When declaring inside an inlined function the symbol is placed in the // global namespace! namespace cln { extern cl_private_thing cl_I_constructor_from_L (sint32 wert); extern cl_private_thing cl_I_constructor_from_UL (uint32 wert); extern cl_private_thing cl_I_constructor_from_Q (sint64 wert); extern cl_private_thing cl_I_constructor_from_UQ (uint64 wert); } #endif #define CL_DEFINE_INT_CONSTRUCTOR(_class_,_type_) \ inline _class_::_class_ (const _type_ wert) \ { \ word = cl_combine(cl_FN_tag,wert); \ } #define CL_DEFINE_INT_CONSTRUCTORS(_class_) \ CL_DEFINE_INT_CONSTRUCTOR(_class_, int) \ CL_DEFINE_INT_CONSTRUCTOR(_class_, unsigned int) #define CL_DEFINE_INT_ASSIGNMENT_OPERATOR(_class_,_type_) \ inline _class_& _class_::operator= (const _type_ wert) \ { \ cl_dec_refcount(*this); \ word = cl_combine(cl_FN_tag,wert); \ return *this; \ } #define CL_DEFINE_INT_ASSIGNMENT_OPERATORS(_class_) \ CL_DEFINE_INT_ASSIGNMENT_OPERATOR(_class_, int) \ CL_DEFINE_INT_ASSIGNMENT_OPERATOR(_class_, unsigned int) #if (long_bitsize==32) // `long' == `sintL', `unsigned long' == `uintL'. #define CL_DEFINE_LONG_CONSTRUCTORS(_class_) \ inline _class_::_class_ (const long wert) \ { \ extern cl_private_thing cl_I_constructor_from_L (sint32 wert); \ pointer = cl_I_constructor_from_L(wert); \ } \ inline _class_::_class_ (const unsigned long wert) \ { \ extern cl_private_thing cl_I_constructor_from_UL (uint32 wert); \ pointer = cl_I_constructor_from_UL(wert); \ } #elif (long_bitsize==64) // `long' == `sintQ', `unsigned long' == `uintQ'. #define CL_DEFINE_LONG_CONSTRUCTORS(_class_) \ inline _class_::_class_ (const long wert) \ { \ extern cl_private_thing cl_I_constructor_from_Q (sint64 wert); \ pointer = cl_I_constructor_from_Q(wert); \ } \ inline _class_::_class_ (const unsigned long wert) \ { \ extern cl_private_thing cl_I_constructor_from_UQ (uint64 wert); \ pointer = cl_I_constructor_from_UQ(wert); \ } #endif #if (long_bitsize==32) // `long' == `sintL', `unsigned long' == `uintL'. #define CL_DEFINE_LONG_ASSIGNMENT_OPERATORS(_class_) \ inline _class_& _class_::operator= (const long wert) \ { \ extern cl_private_thing cl_I_constructor_from_L (sint32 wert); \ cl_dec_refcount(*this); \ pointer = cl_I_constructor_from_L(wert); \ return *this; \ } \ inline _class_& _class_::operator= (const unsigned long wert) \ { \ extern cl_private_thing cl_I_constructor_from_UL (uint32 wert); \ cl_dec_refcount(*this); \ pointer = cl_I_constructor_from_UL(wert); \ return *this; \ } #elif (long_bitsize==64) // `long' == `sintQ', `unsigned long' == `uintQ'. #define CL_DEFINE_LONG_ASSIGNMENT_OPERATORS(_class_) \ inline _class_& _class_::operator= (const long wert) \ { \ extern cl_private_thing cl_I_constructor_from_Q (sint64 wert); \ cl_dec_refcount(*this); \ pointer = cl_I_constructor_from_Q(wert); \ return *this; \ } \ inline _class_& _class_::operator= (const unsigned long wert) \ { \ extern cl_private_thing cl_I_constructor_from_UQ (uint64 wert); \ cl_dec_refcount(*this); \ pointer = cl_I_constructor_from_UQ(wert); \ return *this; \ } #endif #ifdef HAVE_LONGLONG #if (long_long_bitsize==64) // `long' == `sintQ', `unsigned long' == `uintQ'. #define CL_DEFINE_LONGLONG_CONSTRUCTORS(_class_) \ inline _class_::_class_ (const long long wert) \ { \ extern cl_private_thing cl_I_constructor_from_Q (sint64 wert); \ pointer = cl_I_constructor_from_Q(wert); \ } \ inline _class_::_class_ (const unsigned long long wert) \ { \ extern cl_private_thing cl_I_constructor_from_UQ (uint64 wert); \ pointer = cl_I_constructor_from_UQ(wert); \ } #define CL_DEFINE_LONGLONG_ASSIGNMENT_OPERATORS(_class_) \ inline _class_& _class_::operator= (const long long wert) \ { \ extern cl_private_thing cl_I_constructor_from_Q (sint64 wert); \ cl_dec_refcount(*this); \ pointer = cl_I_constructor_from_Q(wert); \ return *this; \ } \ inline _class_& _class_::operator= (const unsigned long long wert) \ { \ extern cl_private_thing cl_I_constructor_from_UQ (uint64 wert); \ cl_dec_refcount(*this); \ pointer = cl_I_constructor_from_UQ(wert); \ return *this; \ } #endif #endif namespace cln { // Constructors and assignment operators from C numeric types. // from `float': extern cl_private_thing cl_float_to_FF_pointer (const float val); #define CL_DEFINE_FLOAT_CONSTRUCTOR(_class_) \ inline _class_ :: _class_ (const float x) \ { \ pointer = cl_float_to_FF_pointer(x); \ } \ inline _class_& _class_::operator= (const float x) \ { \ cl_dec_refcount(*this); \ pointer = cl_float_to_FF_pointer(x); \ return *this; \ } // from `double': extern struct cl_heap_dfloat * cl_double_to_DF_pointer (const double val); #define CL_DEFINE_DOUBLE_CONSTRUCTOR(_class_) \ inline _class_::_class_ (const double x) \ { \ pointer = cl_double_to_DF_pointer(x); \ } \ inline _class_& _class_::operator= (const double x) \ { \ cl_dec_refcount(*this); \ pointer = cl_double_to_DF_pointer(x); \ return *this; \ } // Abstract class of all numbers. class cl_number : public cl_gcobject { public: // Default constructor. (Used for objects with no initializer.) cl_number (); // Copy constructor. (Used for function argument passing and function // return value, and of course for objects with initializers of the same type.) cl_number (const cl_number& x); // Converters. (Used for function argument passing and function return values.) // Assignment operators. (Used for assignments.) cl_number& operator= (const cl_number&); // Constructors and assignment operators from C numeric types. cl_number (const int); // |argument| must be < 2^29 cl_number (const unsigned int); // argument must be < 2^29 cl_number (const long); cl_number (const unsigned long); #ifdef HAVE_LONGLONG cl_number (const long long); cl_number (const unsigned long long); #endif cl_number (const float); cl_number (const double); cl_number& operator= (const int); // |argument| must be < 2^29 cl_number& operator= (const unsigned int); // argument must be < 2^29 cl_number& operator= (const long); cl_number& operator= (const unsigned long); cl_number& operator= (const float); cl_number& operator= (const double); #ifdef HAVE_LONGLONG cl_number& operator= (const long long); cl_number& operator= (const unsigned long long); #endif // Other constructors. // cl_number (const char *); // Private pointer manipulations. cl_number (cl_private_thing); }; // Private constructors. inline cl_number::cl_number (cl_private_thing ptr) : cl_gcobject (ptr) {} // The assignment operators: CL_DEFINE_ASSIGNMENT_OPERATOR(cl_number, cl_number) // The default constructors. inline cl_number::cl_number () : cl_gcobject ((cl_private_thing) cl_combine(cl_FN_tag,0)) {} // The copy constructors. CL_DEFINE_COPY_CONSTRUCTOR2(cl_number,cl_gcobject) // Constructors and assignment operators from C numeric types. CL_DEFINE_INT_CONSTRUCTORS(cl_number) CL_DEFINE_INT_ASSIGNMENT_OPERATORS(cl_number) CL_DEFINE_LONG_CONSTRUCTORS(cl_number) CL_DEFINE_LONG_ASSIGNMENT_OPERATORS(cl_number) #ifdef HAVE_LONGLONG CL_DEFINE_LONGLONG_CONSTRUCTORS(cl_number) CL_DEFINE_LONGLONG_ASSIGNMENT_OPERATORS(cl_number) #endif CL_DEFINE_FLOAT_CONSTRUCTOR(cl_number) CL_DEFINE_DOUBLE_CONSTRUCTOR(cl_number) // Hack section. // Conversions to subtypes without checking, template version: // the(x) converts x to a cl_I, without change of representation. template inline const type& the(const cl_number& x) { // check that sizeof(type)==sizeof(cl_number) typedef int assertion1 [1 - 2 * (sizeof(type) != sizeof(cl_number))]; return *(const type *) &x; } // Conversions to subtypes without checking, macro version: // The(cl_I)(x) converts x to a cl_I, without change of representation. #define The(type) *(const type *) & cl_identity // This inline function is for type checking purposes only. inline const cl_number& cl_identity (const cl_number& x) { return x; } } // namespace cln // Conversions to subtypes: // As(cl_I)(x) returns x as a cl_I. It first checks that x is a cl_I // and then returns it without change of representation. #if 0 // no debug information #define As(type) type##_As #define CL_DEFINE_AS_CONVERSION(_class_) \ extern const _class_& _class_##_As (const cl_number& x); \ inline const _class_& _class_##_As (const _class_& x) { return x; } #else // Line number information for ease of debugging. #define As(type) type##_As cl_as_aux #define cl_as_aux(expr) (expr,__FILE__,__LINE__) #define CL_DEFINE_AS_CONVERSION(_class_) \ extern const _class_& _class_##_As (const cl_number& x, const char * filename, int line); \ inline const _class_& _class_##_As (const _class_& x, const char * filename, int line) { (void)filename; (void)line; return x; } #endif // Mutable(type,x); // x should be a variable `const type x' or `const type& x'. // This macro introduces a new variable `type& x' whose value can be // modified. Useful for modifying the argument of a function which takes // a `const type &x'. // Warning: To apply this to a function's formal parameter, a block { ... } // must be inserted. #define Mutable(type,x) \ type __copied_##x = x; \ type& x = __copied_##x; // DeclareType(type,x); // x should be a variable of some subtype of `cl_number'. type should be // a subtype of `cl_number'. A new variable of the given type is declared, // with name x and which refers to x (by reference, with const attribute). #define DeclareType(type,x) \ const type& __tmp_##x = *(const type*) &x; \ const type& x = __tmp_##x; #endif /* _CL_NUMBER_H */ cln-1.3.3/include/cln/integer_class.h0000644000000000000000000000403611201634736014360 0ustar // Abstract class of integers. #ifndef _CL_INTEGER_CLASS_H #define _CL_INTEGER_CLASS_H #include "cln/number.h" #include "cln/rational_class.h" namespace cln { class cl_I : public cl_RA { public: // Default constructor. cl_I (); // Copy constructor. cl_I (const cl_I&); // Assignment operators. cl_I& operator= (const cl_I&); // Constructors and assignment operators from C numeric types. cl_I (const int); // |argument| must be < 2^29 cl_I (const unsigned int); // argument must be < 2^29 cl_I (const long); cl_I (const unsigned long); #ifdef HAVE_LONGLONG cl_I (const long long); cl_I (const unsigned long long); #endif cl_I& operator= (const int); // |argument| must be < 2^29 cl_I& operator= (const unsigned int); // argument must be < 2^29 cl_I& operator= (const long); cl_I& operator= (const unsigned long); #ifdef HAVE_LONGLONG cl_I& operator= (const long long); cl_I& operator= (const unsigned long long); #endif // Other constructors. cl_I (const char *); // Private constructor. cl_I (cl_private_thing); cl_I (struct cl_fixnum * /* NULL! */, cl_uint); cl_I (struct cl_heap_bignum *); public: // Ability to place an object at a given address. void* operator new (size_t size) { return malloc_hook(size); } void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void operator delete (void* ptr) { free_hook(ptr); } }; // Private constructors. inline cl_I::cl_I (cl_private_thing ptr) : cl_RA (ptr) {} // The assignment operators: CL_DEFINE_ASSIGNMENT_OPERATOR(cl_I, cl_I) // The default constructors. inline cl_I::cl_I () : cl_RA ((cl_private_thing) cl_combine(cl_FN_tag,0)) {} // The copy constructors. CL_DEFINE_COPY_CONSTRUCTOR2(cl_I,cl_RA) // Constructors and assignment operators from C numeric types. CL_DEFINE_INT_CONSTRUCTORS(cl_I) CL_DEFINE_INT_ASSIGNMENT_OPERATORS(cl_I) CL_DEFINE_LONG_CONSTRUCTORS(cl_I) CL_DEFINE_LONG_ASSIGNMENT_OPERATORS(cl_I) #ifdef HAVE_LONGLONG CL_DEFINE_LONGLONG_CONSTRUCTORS(cl_I) CL_DEFINE_LONGLONG_ASSIGNMENT_OPERATORS(cl_I) #endif } // namespace cln #endif /* _CL_INTEGER_CLASS_H */ cln-1.3.3/include/cln/string.h0000644000000000000000000001311612034113706013035 0ustar // Strings. #ifndef _CL_STRING_H #define _CL_STRING_H #include "cln/object.h" #include "cln/io.h" #include "cln/exception.h" #include namespace cln { struct cl_string; // General, reference counted and garbage collected strings. struct cl_heap_string : public cl_heap { private: unsigned long length; // length (in characters) char data[1]; // the characters, plus a '\0' at the end // Standard allocation disabled. void* operator new (size_t size) { (void)size; throw runtime_exception(); } // Standard deallocation disabled. void operator delete (void* ptr) { (void)ptr; throw runtime_exception(); } // No default constructor. cl_heap_string (); private: // Friend declarations. They are for the compiler. Just ignore them. friend class cl_string; friend cl_heap_string* cl_make_heap_string (unsigned long len); friend cl_heap_string* cl_make_heap_string (const char * s); friend cl_heap_string* cl_make_heap_string (const char * ptr, unsigned long len); friend const cl_string operator+ (const cl_string& str1, const cl_string& str2); friend const cl_string operator+ (const char* str1, const cl_string& str2); friend const cl_string operator+ (const cl_string& str1, const char* str2); }; struct cl_string : public cl_gcpointer { public: // Conversion to simple string. // NOTE! The resulting pointer is valid only as long as the string // is live, i.e. you must keep the string in a variable until you // are done with the pointer to the characters. const char * asciz () const { return &((cl_heap_string*)pointer)->data[0]; } // Return the length (number of characters). unsigned long size() const { return ((cl_heap_string*)pointer)->length; } // Return a specific character. char operator[] (unsigned long i) const { if (!(i < size())) throw runtime_exception(); // Range check. return ((cl_heap_string*)pointer)->data[i]; } // New ANSI C++ compilers also want the following. char operator[] (unsigned int i) const { return operator[]((unsigned long)i); } char operator[] (long i) const { return operator[]((unsigned long)i); } char operator[] (int i) const { return operator[]((unsigned long)i); } // Constructors. cl_string (); cl_string (const cl_string&); cl_string (const char * s); cl_string (const char * ptr, unsigned long len); // Assignment operators. cl_string& operator= (const cl_string&); cl_string& operator= (const char *); // Private pointer manipulations. operator cl_heap_string* () const; cl_string (cl_heap_string* str) { pointer = str; } cl_string (cl_private_thing p) : cl_gcpointer (p) {} }; CL_DEFINE_COPY_CONSTRUCTOR2(cl_string,cl_gcpointer) CL_DEFINE_ASSIGNMENT_OPERATOR(cl_string,cl_string) inline cl_string::cl_string (const char * s) { extern cl_heap_string* cl_make_heap_string (const char *); pointer = cl_make_heap_string(s); } inline cl_string& cl_string::operator= (const char * s) { extern cl_heap_string* cl_make_heap_string (const char *); cl_heap_string* tmp = cl_make_heap_string(s); cl_dec_refcount(*this); pointer = tmp; return *this; } // Length. inline unsigned long strlen (const cl_string& str) { return str.size(); } // Conversion to `const char *'. inline const char * asciz (const char * s) { return s; } inline const char * asciz (const cl_string& s) { return s.asciz(); } // Comparison. inline bool equal (const cl_string& str1, const cl_string& str2) { return str1.size() == str2.size() && !strcmp(str1.asciz(), str2.asciz()); } inline bool equal (const char * str1, const cl_string& str2) { return !strcmp(str1, str2.asciz()); } inline bool equal (const cl_string& str1, const char * str2) { return !strcmp(str1.asciz(), str2); } // Private pointer manipulations. Never throw away a `struct cl_heap_string *'! inline cl_string::operator cl_heap_string* () const { cl_heap_string* hpointer = (cl_heap_string*)pointer; cl_inc_refcount(*this); return hpointer; } inline cl_string::cl_string () { static const cl_string cl_null_st(NULL, 0); pointer = (cl_heap_string*) cl_null_st; } // Hash code. extern unsigned long hashcode (const cl_string& str); // Output. extern void fprint (std::ostream& stream, const cl_string& str); CL_DEFINE_PRINT_OPERATOR(cl_string) // Input. // Reads a line. Up to delim. The delimiter character is not placed in the // resulting string. The delimiter character is kept in the input stream. // If EOF is encountered, the stream's eofbit is set. extern const cl_string cl_fget (std::istream& stream, char delim = '\n'); // Reads a line. Up to delim. The delimiter character is not placed in the // resulting string. The delimiter character is extracted from the input stream. // If EOF is encountered, the stream's eofbit is set. extern const cl_string cl_fgetline (std::istream& stream, char delim = '\n'); // Like above, but only up to n-1 characters. If n-1 characters were read // before the delimiter character was seen, the stream's failbit is set. extern const cl_string cl_fget (std::istream& stream, int n, char delim = '\n'); extern const cl_string cl_fgetline (std::istream& stream, int n, char delim = '\n'); // Skips whitespace and then reads a non-whitespace string. // If stream.width() is greater than 0, at most stream.width()-1 non-whitespace // characters are read. When done, stream.width(0) is called. // If EOF is encountered, the stream's eofbit is set. extern std::istream& operator>> (std::istream& stream, cl_string& str); // Runtime typing support. extern cl_class cl_class_string; // Debugging support. #ifdef CL_DEBUG extern int cl_string_debug_module; CL_FORCE_LINK(cl_string_debug_dummy, cl_string_debug_module) #endif } // namespace cln #endif /* _CL_STRING_H */ cln-1.3.3/include/cln/proplist.h0000644000000000000000000000302711201634736013411 0ustar // Property lists. #ifndef _CL_PROPLIST_H #define _CL_PROPLIST_H #include "cln/symbol.h" #include "cln/malloc.h" namespace cln { // The only extensible way to extend objects at runtime in an extensible // and decentralized way (without having to modify the object's class) // is to add a property table to every object. // For the moment, only very few properties are planned, so lists should be // enough. Since properties represent additional information about the object, // there is no need for removing properties, so singly linked lists will be // enough. // This is the base class for all properties. struct cl_property { private: cl_property* next; public: cl_symbol key; // Constructor. cl_property (const cl_symbol& k) : next (NULL), key (k) {} // Destructor. virtual ~cl_property () {} // Allocation and deallocation. void* operator new (size_t size) { return malloc_hook(size); } void operator delete (void* ptr) { free_hook(ptr); } private: virtual void dummy (); // Friend declarations. They are for the compiler. Just ignore them. friend class cl_property_list; }; #define SUBCLASS_cl_property() \ void* operator new (size_t size) { return malloc_hook(size); } \ void operator delete (void* ptr) { free_hook(ptr); } struct cl_property_list { private: cl_property* list; public: cl_property* get_property (const cl_symbol& key); void add_property (cl_property* new_property); // Constructor. cl_property_list () : list (NULL) {} // Destructor. ~cl_property_list (); }; } // namespace cln #endif /* _CL_PROPLIST_H */ cln-1.3.3/include/cln/timing.h0000644000000000000000000000453511201634736013031 0ustar // Timing tools. #ifndef _CL_TIMING_H #define _CL_TIMING_H #include "cln/config.h" #include "cln/intparam.h" #include "cln/types.h" #include "cln/io.h" namespace cln { struct cl_timespec { uintL tv_sec; // seconds since 1970-01-01 sintL tv_nsec; // nanoseconds, >= 0, < 1000000000 // Constructors. cl_timespec () {} cl_timespec (uintL sec, sintL nsec) : tv_sec (sec), tv_nsec (nsec) {} }; struct cl_time_duration { uintL tv_sec; // seconds uintL tv_nsec; // nanoseconds // Constructors. cl_time_duration () {} cl_time_duration (uintL sec) : tv_sec (sec), tv_nsec (0) {} cl_time_duration (uintL sec, uintL nsec) : tv_sec (sec), tv_nsec (nsec) {} }; struct cl_time_consumption { cl_time_duration realtime; // elapsed time cl_time_duration usertime; // system's notion of user time/run time }; extern const cl_time_duration operator- (const cl_timespec&, const cl_timespec&); extern const cl_timespec operator+ (const cl_timespec&, const cl_time_duration&); extern const cl_timespec operator- (const cl_timespec&, const cl_time_duration&); extern const cl_time_duration operator+ (const cl_time_duration&, const cl_time_duration&); extern const cl_time_duration operator- (const cl_time_duration&, const cl_time_duration&); extern const cl_timespec cl_current_time (); extern const cl_time_consumption cl_current_time_consumption (); // Report a time consumption. // (Should better be a virtual member function of `cl_time_consumption'). extern void cl_timing_report (std::ostream&, const cl_time_consumption&); struct cl_timing { // Constructor, starts the time interval. cl_timing (cl_time_consumption& accumulator); cl_timing (std::ostream& destination = std::cerr); cl_timing (const char *, std::ostream& destination = std::cerr); // Destructor, closes the time interval and does a report. ~cl_timing (); //private: cl_time_consumption tmp; void (*report_fn) (const cl_timing&); void* report_destination; const char * comment; }; // Macro for timing. // Usage: // { CL_TIMING; computation(); } // or { CL_TIMING(accumulator); computation(); } // or { CL_TIMING(cout); computation(); } // The timing interval starts immediately and ends at the closing brace. #define CL_TIMING CL_TIMING1(__LINE__) #define CL_TIMING1(line) CL_TIMING2(line) #define CL_TIMING2(line) cl_timing cl_timing_dummy_##line } // namespace cln #endif /* _CL_TIMING_H */ cln-1.3.3/include/cln/float_io.h0000644000000000000000000000552111201634736013332 0ustar // I/O of floats. #ifndef _CL_FLOAT_IO_H #define _CL_FLOAT_IO_H #include "cln/number_io.h" #include "cln/float.h" namespace cln { // Undocumented input functions // Wandelt eine Zeichenkette mit Float-Syntax in ein Float um. // read_float(base,sign,string,index1,index4,index2,index3) // > base: Lesebasis (=10) // > sign: Vorzeichen (/=0 falls negativ) // > string: Simple-String (enthält Ziffern und evtl. Punkt und Exponentmarker) // > index1: Index vom Mantissenanfang (excl. Vorzeichen) // > index4: Index nach dem Mantissenende // > index2: Index beim Ende der Characters // > index3: Index nach dem Dezimalpunkt (=index4 falls keiner da) // (also Mantisse mit index4-index1 Characters: Ziffern und max. 1 '.') // (also index4-index3 Nachkommaziffern) // (also bei index4> (std::istream& stream, cl_F& result) { extern cl_read_flags cl_F_read_flags; result = read_float(stream,cl_F_read_flags); return stream; } // Undocumented output functions // Documented output functions // Gibt ein Float aus. // print_float(stream,z); // > z: Float // > stream: Stream extern void print_float (std::ostream& stream, const cl_print_flags& flags, const cl_F& z); extern void print_float (std::ostream& stream, const cl_print_number_flags& flags, const cl_F& z); extern void print_float (std::ostream& stream, const cl_print_real_flags& flags, const cl_F& z); extern void print_float (std::ostream& stream, const cl_print_float_flags& flags, const cl_F& z); // Gibt ein Float binär (sehr primitiv) aus. // print_float_binary(stream,z); // > z: Float // > stream: Stream extern void print_float_binary (std::ostream& stream, const cl_F& z); // The following does strictly the same as the general `fprint' for numbers. // It is here only so that you don't need the complex printer // in order to print a float. ("Treeshaking") inline void fprint (std::ostream& stream, const cl_F& x) { extern cl_print_flags default_print_flags; print_float(stream,default_print_flags,x); } CL_DEFINE_PRINT_OPERATOR(cl_F) } // namespace cln #endif /* _CL_FLOAT_IO_H */ cln-1.3.3/include/cln/condition.h0000644000000000000000000000204211201634736013517 0ustar // Conditions (a.k.a. exceptions) #ifndef _CL_CONDITION_H #define _CL_CONDITION_H #include "cln/malloc.h" #include "cln/io.h" namespace cln { struct cl_condition { // Allocation. void* operator new (size_t size) { return malloc_hook(size); } // Deallocation. void operator delete (void* ptr) { free_hook(ptr); } // Name. virtual const char * name () const = 0; // Print. virtual void print (std::ostream&) const = 0; // Virtual destructor. virtual ~cl_condition () = 0; private: virtual void dummy (); }; #define SUBCLASS_cl_condition() \ public: \ /* Allocation. */ \ void* operator new (size_t size) { return malloc_hook(size); } \ /* Deallocation. */ \ void operator delete (void* ptr) { free_hook(ptr); } // Functions which want to raise a condition return a `cl_condition*'. // The caller checks this value. NULL means no condition. The one who // disposes the condition (handles it without resignalling it) should // call `delete' on the condition pointer. } // namespace cln #endif /* _CL_CONDITION_H */ cln-1.3.3/include/cln/output.h0000644000000000000000000000354511201634736013102 0ustar // Output functions. #ifndef _CL_OUTPUT_H #define _CL_OUTPUT_H #include "cln/types.h" #include "cln/floatformat.h" #include "cln/io.h" #include "cln/string.h" namespace cln { struct cl_print_rational_flags { // Base in which rational numbers are to be printed. unsigned int rational_base; // Flag whether to print radix specifiers in Common Lisp syntax for // rational numbers (#nR or #b or #o or #x prefixes, trailing dot). bool rational_readably; // Constructor. cl_print_rational_flags () : rational_base (10), rational_readably (false) {} }; struct cl_print_float_flags { // Flag whether to prefer type specific exponent markers over 'E'. bool float_readably; // If !float_readably, the format which earns the 'E' exponent marker. float_format_t default_float_format; // Constructor. cl_print_float_flags () : float_readably (false), default_float_format (float_format_ffloat) {} }; struct cl_print_real_flags : cl_print_rational_flags, cl_print_float_flags {}; struct cl_print_complex_flags { // Flag whether to use the Common Lisp #C(realpart imagpart) syntax, bool complex_readably; // Constructor. cl_print_complex_flags () : complex_readably (false) {} }; struct cl_print_number_flags : cl_print_real_flags, cl_print_complex_flags {}; enum cl_print_vector_syntax_t { vsyntax_algebraic, // [a, b, c] vsyntax_pretty, // [a b c] vsyntax_commonlisp // #(a b c) }; struct cl_print_vector_flags { cl_print_vector_syntax_t vector_syntax; // Constructor. cl_print_vector_flags () : vector_syntax (vsyntax_pretty) {} }; struct cl_print_univpoly_flags { cl_string univpoly_varname; // Constructor. cl_print_univpoly_flags () : univpoly_varname ("x") {} }; struct cl_print_flags : cl_print_number_flags, cl_print_vector_flags, cl_print_univpoly_flags {}; extern cl_print_flags default_print_flags; } // namespace cln #endif /* _CL_OUTPUT_H */ cln-1.3.3/include/cln/univpoly_complex.h0000644000000000000000000001553311201634736015156 0ustar // Univariate Polynomials over the complex numbers. #ifndef _CL_UNIVPOLY_COMPLEX_H #define _CL_UNIVPOLY_COMPLEX_H #include "cln/ring.h" #include "cln/univpoly.h" #include "cln/number.h" #include "cln/complex_class.h" #include "cln/integer_class.h" #include "cln/complex_ring.h" namespace cln { // Normal univariate polynomials with stricter static typing: // `cl_N' instead of `cl_ring_element'. #ifdef notyet typedef cl_UP_specialized cl_UP_N; typedef cl_univpoly_specialized_ring cl_univpoly_complex_ring; //typedef cl_heap_univpoly_specialized_ring cl_heap_univpoly_complex_ring; #else class cl_heap_univpoly_complex_ring; class cl_univpoly_complex_ring : public cl_univpoly_ring { public: // Default constructor. cl_univpoly_complex_ring () : cl_univpoly_ring () {} // Copy constructor. cl_univpoly_complex_ring (const cl_univpoly_complex_ring&); // Assignment operator. cl_univpoly_complex_ring& operator= (const cl_univpoly_complex_ring&); // Automatic dereferencing. cl_heap_univpoly_complex_ring* operator-> () const { return (cl_heap_univpoly_complex_ring*)heappointer; } }; // Copy constructor and assignment operator. CL_DEFINE_COPY_CONSTRUCTOR2(cl_univpoly_complex_ring,cl_univpoly_ring) CL_DEFINE_ASSIGNMENT_OPERATOR(cl_univpoly_complex_ring,cl_univpoly_complex_ring) class cl_UP_N : public cl_UP { public: const cl_univpoly_complex_ring& ring () const { return The(cl_univpoly_complex_ring)(_ring); } // Conversion. CL_DEFINE_CONVERTER(cl_ring_element) // Destructive modification. void set_coeff (uintL index, const cl_N& y); void finalize(); // Evaluation. const cl_N operator() (const cl_N& y) const; public: // Ability to place an object at a given address. void* operator new (size_t size) { return malloc_hook(size); } void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void operator delete (void* ptr) { free_hook(ptr); } }; class cl_heap_univpoly_complex_ring : public cl_heap_univpoly_ring { SUBCLASS_cl_heap_univpoly_ring() // High-level operations. void fprint (std::ostream& stream, const cl_UP_N& x) { cl_heap_univpoly_ring::fprint(stream,x); } bool equal (const cl_UP_N& x, const cl_UP_N& y) { return cl_heap_univpoly_ring::equal(x,y); } const cl_UP_N zero () { return The2(cl_UP_N)(cl_heap_univpoly_ring::zero()); } bool zerop (const cl_UP_N& x) { return cl_heap_univpoly_ring::zerop(x); } const cl_UP_N plus (const cl_UP_N& x, const cl_UP_N& y) { return The2(cl_UP_N)(cl_heap_univpoly_ring::plus(x,y)); } const cl_UP_N minus (const cl_UP_N& x, const cl_UP_N& y) { return The2(cl_UP_N)(cl_heap_univpoly_ring::minus(x,y)); } const cl_UP_N uminus (const cl_UP_N& x) { return The2(cl_UP_N)(cl_heap_univpoly_ring::uminus(x)); } const cl_UP_N one () { return The2(cl_UP_N)(cl_heap_univpoly_ring::one()); } const cl_UP_N canonhom (const cl_I& x) { return The2(cl_UP_N)(cl_heap_univpoly_ring::canonhom(x)); } const cl_UP_N mul (const cl_UP_N& x, const cl_UP_N& y) { return The2(cl_UP_N)(cl_heap_univpoly_ring::mul(x,y)); } const cl_UP_N square (const cl_UP_N& x) { return The2(cl_UP_N)(cl_heap_univpoly_ring::square(x)); } const cl_UP_N expt_pos (const cl_UP_N& x, const cl_I& y) { return The2(cl_UP_N)(cl_heap_univpoly_ring::expt_pos(x,y)); } const cl_UP_N scalmul (const cl_N& x, const cl_UP_N& y) { return The2(cl_UP_N)(cl_heap_univpoly_ring::scalmul(cl_ring_element(cl_C_ring,x),y)); } sintL degree (const cl_UP_N& x) { return cl_heap_univpoly_ring::degree(x); } sintL ldegree (const cl_UP_N& x) { return cl_heap_univpoly_ring::ldegree(x); } const cl_UP_N monomial (const cl_N& x, uintL e) { return The2(cl_UP_N)(cl_heap_univpoly_ring::monomial(cl_ring_element(cl_C_ring,x),e)); } const cl_N coeff (const cl_UP_N& x, uintL index) { return The(cl_N)(cl_heap_univpoly_ring::coeff(x,index)); } const cl_UP_N create (sintL deg) { return The2(cl_UP_N)(cl_heap_univpoly_ring::create(deg)); } void set_coeff (cl_UP_N& x, uintL index, const cl_N& y) { cl_heap_univpoly_ring::set_coeff(x,index,cl_ring_element(cl_C_ring,y)); } void finalize (cl_UP_N& x) { cl_heap_univpoly_ring::finalize(x); } const cl_N eval (const cl_UP_N& x, const cl_N& y) { return The(cl_N)(cl_heap_univpoly_ring::eval(x,cl_ring_element(cl_C_ring,y))); } private: // No need for any constructors. cl_heap_univpoly_complex_ring (); }; // Lookup of polynomial rings. inline const cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& r) { return The(cl_univpoly_complex_ring) (find_univpoly_ring((const cl_ring&)r)); } inline const cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& r, const cl_symbol& varname) { return The(cl_univpoly_complex_ring) (find_univpoly_ring((const cl_ring&)r,varname)); } // Operations on polynomials. // Add. inline const cl_UP_N operator+ (const cl_UP_N& x, const cl_UP_N& y) { return x.ring()->plus(x,y); } // Negate. inline const cl_UP_N operator- (const cl_UP_N& x) { return x.ring()->uminus(x); } // Subtract. inline const cl_UP_N operator- (const cl_UP_N& x, const cl_UP_N& y) { return x.ring()->minus(x,y); } // Multiply. inline const cl_UP_N operator* (const cl_UP_N& x, const cl_UP_N& y) { return x.ring()->mul(x,y); } // Squaring. inline const cl_UP_N square (const cl_UP_N& x) { return x.ring()->square(x); } // Exponentiation x^y, where y > 0. inline const cl_UP_N expt_pos (const cl_UP_N& x, const cl_I& y) { return x.ring()->expt_pos(x,y); } // Scalar multiplication. #if 0 // less efficient inline const cl_UP_N operator* (const cl_I& x, const cl_UP_N& y) { return y.ring()->mul(y.ring()->canonhom(x),y); } inline const cl_UP_N operator* (const cl_UP_N& x, const cl_I& y) { return x.ring()->mul(x.ring()->canonhom(y),x); } #endif inline const cl_UP_N operator* (const cl_I& x, const cl_UP_N& y) { return y.ring()->scalmul(x,y); } inline const cl_UP_N operator* (const cl_UP_N& x, const cl_I& y) { return x.ring()->scalmul(y,x); } inline const cl_UP_N operator* (const cl_N& x, const cl_UP_N& y) { return y.ring()->scalmul(x,y); } inline const cl_UP_N operator* (const cl_UP_N& x, const cl_N& y) { return x.ring()->scalmul(y,x); } // Coefficient. inline const cl_N coeff (const cl_UP_N& x, uintL index) { return x.ring()->coeff(x,index); } // Destructive modification. inline void set_coeff (cl_UP_N& x, uintL index, const cl_N& y) { x.ring()->set_coeff(x,index,y); } inline void finalize (cl_UP_N& x) { x.ring()->finalize(x); } inline void cl_UP_N::set_coeff (uintL index, const cl_N& y) { ring()->set_coeff(*this,index,y); } inline void cl_UP_N::finalize () { ring()->finalize(*this); } // Evaluation. (No extension of the base ring allowed here for now.) inline const cl_N cl_UP_N::operator() (const cl_N& y) const { return ring()->eval(*this,y); } // Derivative. inline const cl_UP_N deriv (const cl_UP_N& x) { return The2(cl_UP_N)(deriv((const cl_UP&)x)); } #endif } // namespace cln #endif /* _CL_UNIVPOLY_COMPLEX_H */ cln-1.3.3/include/cln/real_io.h0000644000000000000000000000322011201634736013142 0ustar // I/O of real numbers. #ifndef _CL_REAL_IO_H #define _CL_REAL_IO_H #include "cln/number_io.h" #include "cln/real.h" namespace cln { // Undocumented input functions // The following does strictly the same as the general read_complex. // It is here only so that you don't need the complex number reader // in order to read an rational number. ("Treeshaking") extern const cl_R read_real (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse); extern const cl_R read_real (std::istream& stream, const cl_read_flags& flags); // Documented input functions inline std::istream& operator>> (std::istream& stream, cl_R& result) { extern cl_read_flags cl_R_read_flags; result = read_real(stream,cl_R_read_flags); return stream; } // Undocumented output functions // Documented output functions // Gibt eine Zahl aus. // print_real(stream,flags,z); // > z: Zahl // > stream: Stream // > flags: Ausgabe-Parameter extern void print_real (std::ostream& stream, const cl_print_flags& flags, const cl_R& z); extern void print_real (std::ostream& stream, const cl_print_number_flags& flags, const cl_R& z); extern void print_real (std::ostream& stream, const cl_print_real_flags& flags, const cl_R& z); // The following does strictly the same as the general `fprint' for numbers. // It is here only so that you don't need the complex number printer // in order to print an integer. ("Treeshaking") inline void fprint (std::ostream& stream, const cl_R& x) { extern cl_print_flags default_print_flags; print_real(stream,default_print_flags,x); } CL_DEFINE_PRINT_OPERATOR(cl_R) } // namespace cln #endif /* _CL_REAL_IO_H */ cln-1.3.3/include/cln/GV.h0000644000000000000000000002201111201634736012043 0ustar // General vectors. #ifndef _CL_GV_H #define _CL_GV_H #include "cln/object.h" #include "cln/V.h" #include "cln/exception.h" #include #include namespace cln { // A vector is a structure having the following interface: // v.size() returns the number of elements // v[i] returns the i-th element (0<=i class cl_GV_inner; template class cl_GV_index; template class cl_GV_constindex; template struct cl_GV_vectorops; template class cl_GV_inner { protected: std::size_t len; // number of elements public: std::size_t size() const; // number of elements cl_GV_vectorops* vectorops; // get/set element const cl_GV_index operator[] (unsigned long index); const cl_GV_constindex operator[] (unsigned long index) const; const cl_GV_index operator[] (long index); const cl_GV_constindex operator[] (long index) const; const cl_GV_index operator[] (unsigned int index); const cl_GV_constindex operator[] (unsigned int index) const; const cl_GV_index operator[] (int index); const cl_GV_constindex operator[] (int index) const; public: /* ugh */ // Constructor. cl_GV_inner (std::size_t l, cl_GV_vectorops* ops) : len (l), vectorops (ops) {} public: // Destructor. ~cl_GV_inner (); // Ability to place an object at a given address. void* operator new (size_t size, void* ptr) { (void)size; return ptr; } private: // No default constructor, copy constructor, assignment operator, new. cl_GV_inner (); cl_GV_inner (const cl_GV_inner&); cl_GV_inner& operator= (const cl_GV_inner&); void* operator new (size_t size) { (void)size; return (void*)1; } // SGI CC needs this definition // Friend declarations. They are for the compiler. Just ignore them. friend class cl_GV_index; friend class cl_GV_constindex; }; template class cl_GV_index { // This is the class of objects created by accessing a non-const vector // through []. public: cl_GV_inner* vec; std::size_t index; operator T () const; // Constructor: cl_GV_index (cl_GV_inner* v, std::size_t i) : vec (v), index (i) {} // Assignment operator. void operator= (const T& x) const; #if (defined(__sparc__) || defined(__sparc64__) || defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // maybe an SGI CC and Sun CC bug? void operator= (const cl_GV_index&) const; void operator= (const cl_GV_constindex&) const; #else private: // No assignment operator. cl_GV_index& operator= (const cl_GV_index&); #endif private: // No default constructor. cl_GV_index (); }; template class cl_GV_constindex { // This is the class of objects created by accessing a const vector // through []. It lacks the assignment operator. public: const cl_GV_inner* vec; std::size_t index; operator T () const; // Constructor: cl_GV_constindex (const cl_GV_inner* v, std::size_t i) : vec (v), index (i) {} private: // No default constructor, assignment operator. cl_GV_constindex (); cl_GV_constindex& operator= (const cl_GV_constindex&); }; template struct cl_GV_vectorops { const T (*element) (const cl_GV_inner* vec, std::size_t index); void (*set_element) (cl_GV_inner* vec, std::size_t index, const T& x); void (*do_delete) (cl_GV_inner* vec); void (*copy_elements) (const cl_GV_inner* srcvec, std::size_t srcindex, cl_GV_inner* destvec, std::size_t destindex, std::size_t count); }; // All member functions are inline. template inline std::size_t cl_GV_inner::size() const { return len; } template inline const cl_GV_index cl_GV_inner::operator[] (unsigned long index) { return cl_GV_index(this,index); } template inline const cl_GV_constindex cl_GV_inner::operator[] (unsigned long index) const { return cl_GV_constindex(this,index); } template inline const cl_GV_index cl_GV_inner::operator[] (long index) { return operator[]((unsigned long)index); } template inline const cl_GV_constindex cl_GV_inner::operator[] (long index) const { return operator[]((unsigned long)index); } template inline const cl_GV_index cl_GV_inner::operator[] (unsigned int index) { return operator[]((unsigned long)index); } template inline const cl_GV_constindex cl_GV_inner::operator[] (unsigned int index) const { return operator[]((unsigned long)index); } template inline const cl_GV_index cl_GV_inner::operator[] (int index) { return operator[]((unsigned long)index); } template inline const cl_GV_constindex cl_GV_inner::operator[] (int index) const { return operator[]((unsigned long)index); } template inline cl_GV_inner::~cl_GV_inner () { vectorops->do_delete(this); } template inline cl_GV_index::operator T () const { #ifndef CL_GV_NO_RANGECHECKS if (!(index < vec->len)) throw runtime_exception(); #endif return vec->vectorops->element(vec,index); } template inline void cl_GV_index::operator= (const T& x) const { #ifndef CL_GV_NO_RANGECHECKS if (!(index < vec->len)) throw runtime_exception(); #endif vec->vectorops->set_element(vec,index,x); } template inline cl_GV_constindex::operator T () const { #ifndef CL_GV_NO_RANGECHECKS if (!(index < vec->len)) throw runtime_exception(); #endif return vec->vectorops->element(vec,index); } #if (defined(__sparc__) || defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // maybe an SGI CC and Sun CC bug? handle "y[j] = x[i];" template inline void cl_GV_index::operator= (const cl_GV_index& x) const { operator= ((T) x); } template inline void cl_GV_index::operator= (const cl_GV_constindex& x) const { operator= ((T) x); } #endif // In memory, a vector looks like this: template struct cl_heap_GV : cl_heap { cl_GV_inner v; // here room for the elements }; // And a reference to a vector always looks like this: template struct cl_GV : public BASE { public: // Length. std::size_t size() const { return ((const cl_heap_GV *) this->pointer)->v.size(); } // Reference. Forbid modification of `const cl_GV&' arguments. const cl_GV_constindex operator[] (unsigned long index) const { return ((const cl_heap_GV *) this->pointer)->v[index]; } const cl_GV_index operator[] (unsigned long index) { return ((cl_heap_GV *) this->pointer)->v[index]; } const cl_GV_constindex operator[] (long index) const { return operator[]((unsigned long)index); } const cl_GV_index operator[] (long index) { return operator[]((unsigned long)index); } const cl_GV_constindex operator[] (unsigned int index) const { return operator[]((unsigned long)index); } const cl_GV_index operator[] (unsigned int index) { return operator[]((unsigned long)index); } const cl_GV_constindex operator[] (int index) const { return operator[]((unsigned long)index); } const cl_GV_index operator[] (int index) { return operator[]((unsigned long)index); } // Copy constructor. cl_GV (const cl_GV&); // Assignment operator. cl_GV& operator= (const cl_GV&); // Copy a piece of a vector into another vector. // (Both vectors must be of the same type. Overlapping not allowed.) static void copy_elements (const cl_GV& src, std::size_t srcindex, cl_GV& dest, std::size_t destindex, std::size_t count) { const cl_heap_GV * hsrc = (const cl_heap_GV *) src.pointer; cl_heap_GV * hdest = (cl_heap_GV *) dest.pointer; if (!(hsrc->v.vectorops == hdest->v.vectorops)) throw runtime_exception(); hsrc->v.vectorops->copy_elements(&hsrc->v,srcindex,&hdest->v,destindex,count); } // Private pointer manipulations. operator cl_heap_GV* () const; cl_GV (cl_heap_GV* p) : BASE ((cl_private_thing) p) {} cl_GV (cl_private_thing p) : BASE (p) {} protected: // Forbid use of default constructor. cl_GV (); }; #define CL_GV(T,BASE) cl_GV // Define copy constructor. template _CL_DEFINE_COPY_CONSTRUCTOR2(CL_GV(T,BASE),cl_GV,BASE) // Define assignment operator. template CL_DEFINE_ASSIGNMENT_OPERATOR(CL_GV(T,BASE),CL_GV(T,BASE)) // Private pointer manipulations. Never throw away a `struct cl_heap_GV *'! template inline CL_GV(T,BASE)::operator cl_heap_GV* () const { cl_heap_GV* hpointer = (cl_heap_GV*)this->pointer; cl_inc_refcount(*this); return hpointer; } #undef CL_GV // The "generic" general vector type. typedef cl_heap_GV cl_heap_GV_any; typedef cl_GV cl_GV_any; // Hack section. // Conversions to subtypes without checking: #define The(type) *(const type *) & cl_identity // This inline function is for type checking purposes only. inline const cl_GV_any& cl_identity (const cl_GV_any& x) { return x; } } // namespace cln #endif /* _CL_GV_H */ cln-1.3.3/include/cln/ffloat.h0000644000000000000000000002477311201634736013023 0ustar // Public single float operations. #ifndef _CL_FFLOAT_H #define _CL_FFLOAT_H #include "cln/number.h" #include "cln/ffloat_class.h" #include "cln/integer_class.h" #include "cln/float.h" namespace cln { CL_DEFINE_AS_CONVERSION(cl_FF) // Liefert zu einem Single-Float x : (- x), ein FF. extern const cl_FF operator- (const cl_FF& x); // compare(x,y) vergleicht zwei Single-Floats x und y. // Ergebnis: 0 falls x=y, +1 falls x>y, -1 falls x= (const cl_FF& x, const cl_FF& y) { return compare(x,y)>=0; } inline bool operator> (const cl_FF& x, const cl_FF& y) { return compare(x,y)>0; } // minusp(x) == (< x 0) extern bool minusp (const cl_FF& x); // zerop(x) stellt fest, ob ein Single-Float x = 0.0 ist. extern bool zerop (const cl_FF& x); // plusp(x) == (> x 0) extern bool plusp (const cl_FF& x); // Liefert zu zwei Single-Float x und y : (+ x y), ein FF. extern const cl_FF operator+ (const cl_FF& x, const cl_FF& y); // The C++ compiler may hesitate to do these conversions of its own: inline const cl_FF operator+ (const cl_FF& x, const float y) { return x + cl_FF(y); } inline const cl_FF operator+ (const float x, const cl_FF& y) { return cl_FF(x) + y; } // Liefert zu zwei Single-Float x und y : (- x y), ein FF. extern const cl_FF operator- (const cl_FF& x, const cl_FF& y); // The C++ compiler may hesitate to do these conversions of its own: inline const cl_FF operator- (const cl_FF& x, const float y) { return x - cl_FF(y); } inline const cl_FF operator- (const float x, const cl_FF& y) { return cl_FF(x) - y; } // Liefert zu zwei Single-Float x und y : (* x y), ein FF. extern const cl_FF operator* (const cl_FF& x, const cl_FF& y); // The C++ compiler may hesitate to do these conversions of its own: inline const cl_FF operator* (const cl_FF& x, const float y) { return x * cl_FF(y); } inline const cl_FF operator* (const float x, const cl_FF& y) { return cl_FF(x) * y; } // Liefert zu einem Single-Float x : (* x x), ein FF. inline const cl_FF square (const cl_FF& x) { return x*x; } // Liefert zu zwei Single-Float x und y : (/ x y), ein FF. extern const cl_FF operator/ (const cl_FF& x, const cl_FF& y); // The C++ compiler may hesitate to do these conversions of its own: inline const cl_FF operator/ (const cl_FF& x, const float y) { return x / cl_FF(y); } inline const cl_FF operator/ (const float x, const cl_FF& y) { return cl_FF(x) / y; } // Liefert zu einem Single-Float x>=0 : (sqrt x), ein FF. extern const cl_FF sqrt (const cl_FF& x); // recip(x) liefert (/ x), wo x ein Single-Float ist. extern const cl_FF recip (const cl_FF& x); // abs(x) liefert (abs x), wo x ein Single-Float ist. extern const cl_FF abs (const cl_FF& x); // (1+ x), wo x ein Single-Float ist. inline const cl_FF plus1 (const cl_FF& x) { extern const cl_FF cl_I_to_FF (const cl_I&); return x + cl_I_to_FF(cl_I(1)); } // (1- x), wo x ein Single-Float ist. inline const cl_FF minus1 (const cl_FF& x) { extern const cl_FF cl_I_to_FF (const cl_I&); return x + cl_I_to_FF(cl_I(-1)); } // ffloor(x) liefert (ffloor x), wo x ein FF ist. extern const cl_FF ffloor (const cl_FF& x); // fceiling(x) liefert (fceiling x), wo x ein FF ist. extern const cl_FF fceiling (const cl_FF& x); // ftruncate(x) liefert (ftruncate x), wo x ein FF ist. extern const cl_FF ftruncate (const cl_FF& x); // fround(x) liefert (fround x), wo x ein FF ist. extern const cl_FF fround (const cl_FF& x); // Return type for frounding operators. // x / y --> (q,r) with x = y*q+r. struct cl_FF_fdiv_t { cl_FF quotient; cl_FF remainder; // Constructor. cl_FF_fdiv_t () {} cl_FF_fdiv_t (const cl_FF& q, const cl_FF& r) : quotient(q), remainder(r) {} }; // ffloor2(x) liefert (ffloor x), wo x ein FF ist. inline const cl_FF_fdiv_t ffloor2 (const cl_FF& x) { cl_FF q = ffloor(x); return cl_FF_fdiv_t(q,x-q); } // fceiling2(x) liefert (fceiling x), wo x ein FF ist. inline const cl_FF_fdiv_t fceiling2 (const cl_FF& x) { cl_FF q = fceiling(x); return cl_FF_fdiv_t(q,x-q); } // ftruncate2(x) liefert (ftruncate x), wo x ein FF ist. inline const cl_FF_fdiv_t ftruncate2 (const cl_FF& x) { cl_FF q = ftruncate(x); return cl_FF_fdiv_t(q,x-q); } // fround2(x) liefert (fround x), wo x ein FF ist. inline const cl_FF_fdiv_t fround2 (const cl_FF& x) { cl_FF q = fround(x); return cl_FF_fdiv_t(q,x-q); } // Return type for rounding operators. // x / y --> (q,r) with x = y*q+r. struct cl_FF_div_t { cl_I quotient; cl_FF remainder; // Constructor. cl_FF_div_t () {} cl_FF_div_t (const cl_I& q, const cl_FF& r) : quotient(q), remainder(r) {} }; // floor2(x) liefert (floor x), wo x ein FF ist. inline const cl_FF_div_t floor2 (const cl_FF& x) { extern const cl_I cl_FF_to_I (const cl_FF& x); cl_FF q = ffloor(x); return cl_FF_div_t(cl_FF_to_I(q),x-q); } inline const cl_I floor1 (const cl_FF& x) { extern const cl_I cl_FF_to_I (const cl_FF& x); return cl_FF_to_I(ffloor(x)); } // ceiling2(x) liefert (ceiling x), wo x ein FF ist. inline const cl_FF_div_t ceiling2 (const cl_FF& x) { extern const cl_I cl_FF_to_I (const cl_FF& x); cl_FF q = fceiling(x); return cl_FF_div_t(cl_FF_to_I(q),x-q); } inline const cl_I ceiling1 (const cl_FF& x) { extern const cl_I cl_FF_to_I (const cl_FF& x); return cl_FF_to_I(fceiling(x)); } // truncate2(x) liefert (truncate x), wo x ein FF ist. inline const cl_FF_div_t truncate2 (const cl_FF& x) { extern const cl_I cl_FF_to_I (const cl_FF& x); cl_FF q = ftruncate(x); return cl_FF_div_t(cl_FF_to_I(q),x-q); } inline const cl_I truncate1 (const cl_FF& x) { extern const cl_I cl_FF_to_I (const cl_FF& x); return cl_FF_to_I(ftruncate(x)); } // round2(x) liefert (round x), wo x ein FF ist. inline const cl_FF_div_t round2 (const cl_FF& x) { extern const cl_I cl_FF_to_I (const cl_FF& x); cl_FF q = fround(x); return cl_FF_div_t(cl_FF_to_I(q),x-q); } inline const cl_I round1 (const cl_FF& x) { extern const cl_I cl_FF_to_I (const cl_FF& x); return cl_FF_to_I(fround(x)); } // floor2(x,y) liefert (floor x y). extern const cl_FF_div_t floor2 (const cl_FF& x, const cl_FF& y); inline const cl_I floor1 (const cl_FF& x, const cl_FF& y) { return floor1(x/y); } // ceiling2(x,y) liefert (ceiling x y). extern const cl_FF_div_t ceiling2 (const cl_FF& x, const cl_FF& y); inline const cl_I ceiling1 (const cl_FF& x, const cl_FF& y) { return ceiling1(x/y); } // truncate2(x,y) liefert (truncate x y). extern const cl_FF_div_t truncate2 (const cl_FF& x, const cl_FF& y); inline const cl_I truncate1 (const cl_FF& x, const cl_FF& y) { return truncate1(x/y); } // round2(x,y) liefert (round x y). extern const cl_FF_div_t round2 (const cl_FF& x, const cl_FF& y); inline const cl_I round1 (const cl_FF& x, const cl_FF& y) { return round1(x/y); } // Return type for decode_float: struct decoded_ffloat { cl_FF mantissa; cl_I exponent; cl_FF sign; // Constructor. decoded_ffloat () {} decoded_ffloat (const cl_FF& m, const cl_I& e, const cl_FF& s) : mantissa(m), exponent(e), sign(s) {} }; // decode_float(x) liefert zu einem Float x: (decode-float x). // x = 0.0 liefert (0.0, 0, 1.0). // x = (-1)^s * 2^e * m liefert ((-1)^0 * 2^0 * m, e als Integer, (-1)^s). extern const decoded_ffloat decode_float (const cl_FF& x); // float_exponent(x) liefert zu einem Float x: // den Exponenten von (decode-float x). // x = 0.0 liefert 0. // x = (-1)^s * 2^e * m liefert e. extern sintE float_exponent (const cl_FF& x); // float_radix(x) liefert (float-radix x), wo x ein Float ist. inline sintL float_radix (const cl_FF& x) { (void)x; // unused x return 2; } // float_sign(x) liefert (float-sign x), wo x ein Float ist. extern const cl_FF float_sign (const cl_FF& x); // float_digits(x) liefert (float-digits x), wo x ein Float ist. // < ergebnis: ein uintC >0 extern uintC float_digits (const cl_FF& x); // float_precision(x) liefert (float-precision x), wo x ein Float ist. // < ergebnis: ein uintC >=0 extern uintC float_precision (const cl_FF& x); // integer_decode_float(x) liefert zu einem Float x: (integer-decode-float x). // x = 0.0 liefert (0, 0, 1). // x = (-1)^s * 2^e * m bei Float-Precision p liefert // (Mantisse 2^p * m als Integer, e-p als Integer, (-1)^s als Fixnum). extern const cl_idecoded_float integer_decode_float (const cl_FF& x); // scale_float(x,delta) liefert x*2^delta, wo x ein FF ist. extern const cl_FF scale_float (const cl_FF& x, sintC delta); extern const cl_FF scale_float (const cl_FF& x, const cl_I& delta); // max(x,y) liefert (max x y), wo x und y Floats sind. extern const cl_FF max (const cl_FF& x, const cl_FF& y); // min(x,y) liefert (min x y), wo x und y Floats sind. extern const cl_FF min (const cl_FF& x, const cl_FF& y); // signum(x) liefert (signum x), wo x ein Float ist. extern const cl_FF signum (const cl_FF& x); // Konversion zu einem C "float". extern float float_approx (const cl_FF& x); // Konversion zu einem C "double". extern double double_approx (const cl_FF& x); // This could be optimized to use in-place operations. inline cl_FF& operator+= (cl_FF& x, const cl_FF& y) { return x = x + y; } inline cl_FF& operator+= (cl_FF& x, const float y) { return x = x + y; } inline cl_FF& operator++ /* prefix */ (cl_FF& x) { return x = plus1(x); } inline void operator++ /* postfix */ (cl_FF& x, int dummy) { (void)dummy; x = plus1(x); } inline cl_FF& operator-= (cl_FF& x, const cl_FF& y) { return x = x - y; } inline cl_FF& operator-= (cl_FF& x, const float y) { return x = x - y; } inline cl_FF& operator-- /* prefix */ (cl_FF& x) { return x = minus1(x); } inline void operator-- /* postfix */ (cl_FF& x, int dummy) { (void)dummy; x = minus1(x); } inline cl_FF& operator*= (cl_FF& x, const cl_FF& y) { return x = x * y; } inline cl_FF& operator*= (cl_FF& x, const float y) { return x = x * y; } inline cl_FF& operator/= (cl_FF& x, const cl_FF& y) { return x = x / y; } inline cl_FF& operator/= (cl_FF& x, const float y) { return x = x / y; } /* */ // Runtime typing support. extern cl_class cl_class_ffloat; #ifdef CL_WIDE_POINTERS CL_FORCE_LINK(cl_FF_classes_dummy, cl_class_ffloat) #endif // Debugging support. #ifdef CL_DEBUG extern int cl_FF_debug_module; CL_FORCE_LINK(cl_FF_debug_dummy, cl_FF_debug_module) #endif } // namespace cln #endif /* _CL_FFLOAT_H */ cln-1.3.3/include/cln/host_cpu.h.in0000644000000000000000000000204211736133052013760 0ustar // Defines CPU dependent macros #ifndef _CL_HOST_CPU_CONFIG_H #define _CL_HOST_CPU_CONFIG_H /* These definitions are adjusted by `configure' automatically. */ /* CPU */ #ifndef __i386__ #undef __i386__ #endif #ifndef __x86_64__ #undef __x86_64__ #endif #ifndef __m68k__ #undef __m68k__ #endif // NB: GCC def's __mips__ both on big-endian and little-endian systems. #ifndef __mips__ #undef __mips__ #endif #ifndef __mipsel__ #undef __mipsel__ #endif #ifndef __mips64__ #undef __mips64__ #endif #ifndef __sparc__ #undef __sparc__ #endif #ifndef __sparc64__ #undef __sparc64__ #endif #ifndef __alpha__ #undef __alpha__ #endif #ifndef __hppa__ #undef __hppa__ #endif #ifndef __arm__ #undef __arm__ #endif #ifndef __rs6000__ #undef __rs6000__ #endif #ifndef __powerpc64__ #undef __powerpc64__ #endif #ifndef __m88k__ #undef __m88k__ #endif #ifndef __convex__ #undef __convex__ #endif #ifndef __ia64__ #undef __ia64__ #endif #ifndef __s390__ #undef __s390__ #endif #ifndef __s390x__ #undef __s390x__ #endif #endif /* _CL_HOST_CPU_CONFIG_H */ cln-1.3.3/include/cln/malloc.h0000644000000000000000000000061011201634736012777 0ustar // User modifiable memory allocator. #ifndef _CL_MALLOC_H #define _CL_MALLOC_H #include namespace cln { // Function like malloc() which returns aligned memory of size (> 0) bytes. extern void* (*malloc_hook) (size_t size); // Function like free() which makes available for reuse such memory. extern void (*free_hook) (void* ptr); } // namespace cln #endif /* _CL_MALLOC_H */ cln-1.3.3/include/cln/input.h0000644000000000000000000000355511201634736012702 0ustar // Input functions. #ifndef _CL_INPUT_H #define _CL_INPUT_H #include "cln/types.h" #include "cln/floatformat.h" #include "cln/io.h" namespace cln { struct cl_read_float_flags { // The float format used when reading floats with exponent marker 'E'. float_format_t default_float_format; // The float format used when reading floats with exponent marker 'L'. float_format_t default_lfloat_format; // Flag whether floats specified with more digits than corresponding // to the exponent marker they contain, but without _nnn suffix, will // get a precision corresponding to their number of significant digits. bool mantissa_dependent_float_format; }; // Specifies the possible results of a read operation. enum cl_read_syntax_t { syntax_integer = 1 << 0, // -> cl_I syntax_ratio = 1 << 1, // -> cl_RA syntax_rational = syntax_integer | syntax_ratio, // -> cl_RA syntax_sfloat = 1 << 2, // -> cl_SF syntax_ffloat = 1 << 3, // -> cl_FF syntax_dfloat = 1 << 4, // -> cl_DF syntax_lfloat = 1 << 5, // -> cl_LF syntax_float = syntax_sfloat | syntax_ffloat | syntax_dfloat | syntax_lfloat, // -> cl_F syntax_real = syntax_rational | syntax_float, // -> cl_R syntax_complex = 1 << 6, // -> cl_N syntax_number = syntax_real | syntax_complex, // -> cl_N syntax_maybe_bad = 1 << 7 // avoid errors }; // Specifies the syntax to be applied to a read operation. enum cl_read_lsyntax_t { // Standard algebraic notation. lsyntax_standard = 0, // Extended algebraic notation: x+yi lsyntax_algebraic = 1 << 0, // Common Lisp notation: #b, #o, #x, #r, #c lsyntax_commonlisp = 1 << 1, // All of them. lsyntax_all = lsyntax_algebraic | lsyntax_commonlisp }; struct cl_read_flags { cl_read_syntax_t syntax; cl_read_lsyntax_t lsyntax; unsigned int rational_base; cl_read_float_flags float_flags; }; } // namespace cln #endif /* _CL_INPUT_H */ cln-1.3.3/include/cln/modules.h0000644000000000000000000000214311201634736013203 0ustar // Macros for correct module ordering. #ifndef _CL_MODULES_H #define _CL_MODULES_H // global constructor/destructor naming. #include "cln/config.h" // Concatenation of macroexpanded tokens. // Equivalent to CL_CONCAT in src/base/cl_macros.h which we do not want // to expose, however. #define CL_CONCATENATE_(xxx,yyy) xxx##yyy #define CL_CONCATENATE(xxx,yyy) CL_CONCATENATE_(xxx,yyy) // Sometimes a link time dependency is needed, but without requirements // on initialization order. // // CL_FORCE_LINK(dummy,external_variable) // forces a link time reference to the external_variable. #include #if 0 // This definition does not work. It gets optimized away by g++ 3.1. #define CL_FORCE_LINK(dummy,external_variable) \ static const void* const dummy[] = { &dummy, &external_variable }; #else #define CL_FORCE_LINK(dummy,external_variable) \ static const \ struct dummy { \ inline dummy () { \ if ((void*) &external_variable == (void*) this) \ abort(); \ } \ } \ CL_CONCATENATE(dummy,_instance); #endif #endif /* _CL_MODULES_H */ cln-1.3.3/include/cln/lfloat_class.h0000644000000000000000000000440011201634736014177 0ustar // Concrete class of long float numbers. #ifndef _CL_LFLOAT_CLASS_H #define _CL_LFLOAT_CLASS_H #include "cln/number.h" #include "cln/float_class.h" namespace cln { class cl_LF : public cl_F { public: // Default constructor. cl_LF (); // Assignment operators. cl_LF& operator= (const cl_LF&); // Optimization of method pointer_p(). bool pointer_p() const { return true; } // Faster pointer_p() gives a faster copy constructor (but not destructor!!!). cl_LF (const cl_LF& x); // Other constructors. cl_LF (const char *); // Private constructor. cl_LF (cl_private_thing); cl_LF (struct cl_heap_lfloat *); // Private pointer manipulations. operator struct cl_heap_lfloat * () const; public: // Ability to place an object at a given address. void* operator new (size_t size) { return malloc_hook(size); } void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void operator delete (void* ptr) { free_hook(ptr); } }; // Define this if you want the elementary cl_LF operations (+, -, *, /, // sqrt, cl_LF_I_mul) to return results which are always the correctly // rounded exact results, i.e. results which are correct within 0.5 ulp. // If you don't define this, results will be correct within 0.50001 ulp, // but often the computation will be much faster. /* #define CL_LF_PEDANTIC */ // Private constructors. inline cl_LF::cl_LF (cl_private_thing ptr) : cl_F (ptr) {} // The assignment operators: CL_DEFINE_ASSIGNMENT_OPERATOR(cl_LF, cl_LF) // The default constructors. // Private pointer manipulations. Never throw away a `struct cl_heap_lfloat *'! inline cl_LF::operator struct cl_heap_lfloat * () const { struct cl_heap_lfloat * hpointer = (struct cl_heap_lfloat *) pointer; cl_inc_refcount(*this); return hpointer; } extern const cl_LF cl_LF_0; inline cl_LF::cl_LF () : cl_F ((cl_private_thing) (struct cl_heap_lfloat *) cl_LF_0) {} class cl_LF_globals_init_helper { static int count; public: cl_LF_globals_init_helper(); ~cl_LF_globals_init_helper(); }; static cl_LF_globals_init_helper cl_LF_globals_init_helper_instance; #if 0 // see cl_LF_impl.h inline cl_LF::cl_LF (struct cl_heap_lfloat * ptr) : cl_F ((cl_private_thing) ptr) {} #endif // The copy constructors. CL_DEFINE_COPY_CONSTRUCTOR2(cl_LF,cl_F) } // namespace cln #endif /* _CL_LFLOAT_CLASS_H */ cln-1.3.3/include/cln/types.h0000644000000000000000000001334312227130071012673 0ustar // Basic type definitions #ifndef _CL_TYPES_H #define _CL_TYPES_H // CPU and other #include "cln/config.h" // char_bitsize, short_bitsize, long_bitsize, long_long_bitsize #include "cln/intparam.h" // Elementary arithmetic types of given width: // 8 bits #if (char_bitsize==8) typedef signed char sint8; typedef unsigned char uint8; #else #error "No 8 bit integer type?" #endif // 16 bits #if (short_bitsize==16) typedef short sint16; typedef unsigned short uint16; #else #error "No 16 bit integer type?" #endif // 32 bits #if (long_bitsize==32) typedef long sint32; typedef unsigned long uint32; #elif (int_bitsize==32) typedef int sint32; typedef unsigned int uint32; #else #error "No 32 bit integer type?" #endif // 64 bits #if (long_bitsize==64) typedef long sint64; typedef unsigned long uint64; #undef HAVE_LONGLONG #define HAVE_LONGLONG #elif defined(HAVE_LONGLONG) #if defined(long_long_bitsize) && (long_long_bitsize==64) typedef long long sint64; typedef unsigned long long uint64; #else // unusable type #undef HAVE_LONGLONG #endif #endif #if defined(HAVE_LONGLONG) && (defined(__alpha__) || defined(__ia64__) || defined(__mips64__) || defined(__powerpc64__) || defined(__s390x__) || (defined(__sparc__) && defined(__arch64__)) || defined(__x86_64__)) || defined(__aarch64__) // 64 bit registers in hardware #define HAVE_FAST_LONGLONG #endif // Synonyms #define intBsize 8 typedef sint8 sintB; typedef uint8 uintB; #define intWsize 16 typedef sint16 sintW; typedef uint16 uintW; #define intLsize 32 typedef sint32 sintL; typedef uint32 uintL; #ifdef HAVE_LONGLONG #define intQsize 64 typedef sint64 sintQ; typedef uint64 uintQ; #endif // Type for three values (0, +1, -1). typedef int cl_signean; #define signean_plus 1 #define signean_null 0 #define signean_minus -1 // Integer type used for counters. // Constraint: sizeof(uintC) >= sizeof(uintL) #if (defined(HAVE_FAST_LONGLONG) && (defined(__alpha__) || defined(__ia64__) || defined(__powerpc64__) || defined(__s390x__) || (defined(__sparc__) && defined(__arch64__)) || defined(__x86_64__) || defined(__aarch64__))) #define intCsize long_bitsize typedef long sintC; typedef unsigned long uintC; #else #define intCsize int_bitsize typedef int sintC; typedef unsigned int uintC; #endif // Integer type used for lfloat exponents. // Constraint: sizeof(uintE) >= sizeof(uintC) #if (defined(HAVE_LONGLONG) && (defined(__alpha__) || defined(__ia64__) || defined(__powerpc64__) || defined(__s390x__) || (defined(__sparc__) && defined(__arch64__)) || defined(__x86_64__) || defined(__i386__) || defined(__mips__) || defined(__rs6000__) || defined(__aarch64__))) #define intEsize 64 typedef sint64 sintE; typedef uint64 uintE; #else #define intEsize 32 typedef sint32 sintE; typedef uint32 uintE; #endif // Integer type as large as a pointer. // Assumption: sizeof(long) == sizeof(void*) #define intPsize long_bitsize typedef long sintP; typedef unsigned long uintP; // Integer type used for the value of a fixnum. #define intVsize long_bitsize typedef long sintV; typedef unsigned long uintV; // Numbers in the heap are stored as "digit" sequences. // A digit is an unsigned int with intDsize bits. // intDsize should be 8 or 16 or 32 or 64 and it should match mp_limb_t, // if CLN is sitting on top of GMP. #if defined(GMP_DEMANDS_UINTD_LONG_LONG) #define HAVE_FAST_LONGLONG #define intDsize long_long_bitsize typedef long long sintD; typedef unsigned long long uintD; #elif defined(GMP_DEMANDS_UINTD_LONG) #define intDsize long_bitsize typedef long sintD; typedef unsigned long uintD; #elif defined(GMP_DEMANDS_UINTD_INT) #define intDsize int_bitsize typedef int sintD; typedef unsigned int uintD; #else // we are not using GMP, so just guess something reasonable #if (defined(HAVE_FAST_LONGLONG) && (defined(__alpha__) || defined(__ia64__) || defined(__powerpc64__) || (defined(__sparc__) && defined(__arch64__)) || defined(__s390x__) || defined(__x86_64__) || defined(__aarch64__))) #define intDsize 64 typedef sint64 sintD; typedef uint64 uintD; #else #define intDsize 32 typedef sint32 sintD; typedef uint32 uintD; #endif #endif #if (intDsize==64) #define intDDsize 128 // = 2*intDsize #define log2_intDsize 6 // = log2(intDsize) #elif (intDsize==32) #define intDDsize 64 // = 2*intDsize #define log2_intDsize 5 // = log2(intDsize) #elif (intDsize==16) #define intDDsize 32 // = 2*intDsize #define log2_intDsize 4 // = log2(intDsize) #elif (intDsize==8) #define intDDsize 16 // = 2*intDsize #define log2_intDsize 3 // = log2(intDsize) #else #error "What is intDsize again?" #endif // HAVE_DD means that there are unsigned ints with 2*intDsize bits. #if (intDDsize <= (defined(HAVE_FAST_LONGLONG) ? 64 : 32)) #define HAVE_DD 1 #if (intDDsize==16) typedef sint16 sintDD; typedef uint16 uintDD; #endif #if (intDDsize==32) typedef sint32 sintDD; typedef uint32 uintDD; #endif #if (intDDsize==64) typedef sint64 sintDD; typedef uint64 uintDD; #endif #else #define HAVE_DD 0 #endif // Largest integer type which can be manipulated as efficiently as a pointer. // This is normally the same as the hardware register size. // Assumption: cl_word_size >= intPsize #ifdef HAVE_FAST_LONGLONG #define cl_word_size 64 #else #define cl_word_size 32 #endif #endif /* _CL_TYPES_H */ cln-1.3.3/include/cln/univpoly_rational.h0000644000000000000000000001610311201634736015312 0ustar // Univariate Polynomials over the rational numbers. #ifndef _CL_UNIVPOLY_RATIONAL_H #define _CL_UNIVPOLY_RATIONAL_H #include "cln/ring.h" #include "cln/univpoly.h" #include "cln/number.h" #include "cln/rational_class.h" #include "cln/integer_class.h" #include "cln/rational_ring.h" namespace cln { // Normal univariate polynomials with stricter static typing: // `cl_RA' instead of `cl_ring_element'. #ifdef notyet typedef cl_UP_specialized cl_UP_RA; typedef cl_univpoly_specialized_ring cl_univpoly_rational_ring; //typedef cl_heap_univpoly_specialized_ring cl_heap_univpoly_rational_ring; #else class cl_heap_univpoly_rational_ring; class cl_univpoly_rational_ring : public cl_univpoly_ring { public: // Default constructor. cl_univpoly_rational_ring () : cl_univpoly_ring () {} // Copy constructor. cl_univpoly_rational_ring (const cl_univpoly_rational_ring&); // Assignment operator. cl_univpoly_rational_ring& operator= (const cl_univpoly_rational_ring&); // Automatic dereferencing. cl_heap_univpoly_rational_ring* operator-> () const { return (cl_heap_univpoly_rational_ring*)heappointer; } }; // Copy constructor and assignment operator. CL_DEFINE_COPY_CONSTRUCTOR2(cl_univpoly_rational_ring,cl_univpoly_ring) CL_DEFINE_ASSIGNMENT_OPERATOR(cl_univpoly_rational_ring,cl_univpoly_rational_ring) class cl_UP_RA : public cl_UP { public: const cl_univpoly_rational_ring& ring () const { return The(cl_univpoly_rational_ring)(_ring); } // Conversion. CL_DEFINE_CONVERTER(cl_ring_element) // Destructive modification. void set_coeff (uintL index, const cl_RA& y); void finalize(); // Evaluation. const cl_RA operator() (const cl_RA& y) const; public: // Ability to place an object at a given address. void* operator new (size_t size) { return malloc_hook(size); } void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void operator delete (void* ptr) { free_hook(ptr); } }; class cl_heap_univpoly_rational_ring : public cl_heap_univpoly_ring { SUBCLASS_cl_heap_univpoly_ring() // High-level operations. void fprint (std::ostream& stream, const cl_UP_RA& x) { cl_heap_univpoly_ring::fprint(stream,x); } bool equal (const cl_UP_RA& x, const cl_UP_RA& y) { return cl_heap_univpoly_ring::equal(x,y); } const cl_UP_RA zero () { return The2(cl_UP_RA)(cl_heap_univpoly_ring::zero()); } bool zerop (const cl_UP_RA& x) { return cl_heap_univpoly_ring::zerop(x); } const cl_UP_RA plus (const cl_UP_RA& x, const cl_UP_RA& y) { return The2(cl_UP_RA)(cl_heap_univpoly_ring::plus(x,y)); } const cl_UP_RA minus (const cl_UP_RA& x, const cl_UP_RA& y) { return The2(cl_UP_RA)(cl_heap_univpoly_ring::minus(x,y)); } const cl_UP_RA uminus (const cl_UP_RA& x) { return The2(cl_UP_RA)(cl_heap_univpoly_ring::uminus(x)); } const cl_UP_RA one () { return The2(cl_UP_RA)(cl_heap_univpoly_ring::one()); } const cl_UP_RA canonhom (const cl_I& x) { return The2(cl_UP_RA)(cl_heap_univpoly_ring::canonhom(x)); } const cl_UP_RA mul (const cl_UP_RA& x, const cl_UP_RA& y) { return The2(cl_UP_RA)(cl_heap_univpoly_ring::mul(x,y)); } const cl_UP_RA square (const cl_UP_RA& x) { return The2(cl_UP_RA)(cl_heap_univpoly_ring::square(x)); } const cl_UP_RA expt_pos (const cl_UP_RA& x, const cl_I& y) { return The2(cl_UP_RA)(cl_heap_univpoly_ring::expt_pos(x,y)); } const cl_UP_RA scalmul (const cl_RA& x, const cl_UP_RA& y) { return The2(cl_UP_RA)(cl_heap_univpoly_ring::scalmul(cl_ring_element(cl_RA_ring,x),y)); } sintL degree (const cl_UP_RA& x) { return cl_heap_univpoly_ring::degree(x); } sintL ldegree (const cl_UP_RA& x) { return cl_heap_univpoly_ring::ldegree(x); } const cl_UP_RA monomial (const cl_RA& x, uintL e) { return The2(cl_UP_RA)(cl_heap_univpoly_ring::monomial(cl_ring_element(cl_RA_ring,x),e)); } const cl_RA coeff (const cl_UP_RA& x, uintL index) { return The(cl_RA)(cl_heap_univpoly_ring::coeff(x,index)); } const cl_UP_RA create (sintL deg) { return The2(cl_UP_RA)(cl_heap_univpoly_ring::create(deg)); } void set_coeff (cl_UP_RA& x, uintL index, const cl_RA& y) { cl_heap_univpoly_ring::set_coeff(x,index,cl_ring_element(cl_RA_ring,y)); } void finalize (cl_UP_RA& x) { cl_heap_univpoly_ring::finalize(x); } const cl_RA eval (const cl_UP_RA& x, const cl_RA& y) { return The(cl_RA)(cl_heap_univpoly_ring::eval(x,cl_ring_element(cl_RA_ring,y))); } private: // No need for any constructors. cl_heap_univpoly_rational_ring (); }; // Lookup of polynomial rings. inline const cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& r) { return The(cl_univpoly_rational_ring) (find_univpoly_ring((const cl_ring&)r)); } inline const cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& r, const cl_symbol& varname) { return The(cl_univpoly_rational_ring) (find_univpoly_ring((const cl_ring&)r,varname)); } // Operations on polynomials. // Add. inline const cl_UP_RA operator+ (const cl_UP_RA& x, const cl_UP_RA& y) { return x.ring()->plus(x,y); } // Negate. inline const cl_UP_RA operator- (const cl_UP_RA& x) { return x.ring()->uminus(x); } // Subtract. inline const cl_UP_RA operator- (const cl_UP_RA& x, const cl_UP_RA& y) { return x.ring()->minus(x,y); } // Multiply. inline const cl_UP_RA operator* (const cl_UP_RA& x, const cl_UP_RA& y) { return x.ring()->mul(x,y); } // Squaring. inline const cl_UP_RA square (const cl_UP_RA& x) { return x.ring()->square(x); } // Exponentiation x^y, where y > 0. inline const cl_UP_RA expt_pos (const cl_UP_RA& x, const cl_I& y) { return x.ring()->expt_pos(x,y); } // Scalar multiplication. #if 0 // less efficient inline const cl_UP_RA operator* (const cl_I& x, const cl_UP_RA& y) { return y.ring()->mul(y.ring()->canonhom(x),y); } inline const cl_UP_RA operator* (const cl_UP_RA& x, const cl_I& y) { return x.ring()->mul(x.ring()->canonhom(y),x); } #endif inline const cl_UP_RA operator* (const cl_I& x, const cl_UP_RA& y) { return y.ring()->scalmul(x,y); } inline const cl_UP_RA operator* (const cl_UP_RA& x, const cl_I& y) { return x.ring()->scalmul(y,x); } inline const cl_UP_RA operator* (const cl_RA& x, const cl_UP_RA& y) { return y.ring()->scalmul(x,y); } inline const cl_UP_RA operator* (const cl_UP_RA& x, const cl_RA& y) { return x.ring()->scalmul(y,x); } // Coefficient. inline const cl_RA coeff (const cl_UP_RA& x, uintL index) { return x.ring()->coeff(x,index); } // Destructive modification. inline void set_coeff (cl_UP_RA& x, uintL index, const cl_RA& y) { x.ring()->set_coeff(x,index,y); } inline void finalize (cl_UP_RA& x) { x.ring()->finalize(x); } inline void cl_UP_RA::set_coeff (uintL index, const cl_RA& y) { ring()->set_coeff(*this,index,y); } inline void cl_UP_RA::finalize () { ring()->finalize(*this); } // Evaluation. (No extension of the base ring allowed here for now.) inline const cl_RA cl_UP_RA::operator() (const cl_RA& y) const { return ring()->eval(*this,y); } // Derivative. inline const cl_UP_RA deriv (const cl_UP_RA& x) { return The2(cl_UP_RA)(deriv((const cl_UP&)x)); } #endif // Returns the n-th Legendre polynomial (n >= 0). extern const cl_UP_RA legendre (sintL n); } // namespace cln #endif /* _CL_UNIVPOLY_RATIONAL_H */ cln-1.3.3/include/cln/SV.h0000644000000000000000000001243011201634736012063 0ustar // Simple vectors. #ifndef _CL_SV_H #define _CL_SV_H #include "cln/object.h" #include "cln/V.h" #include "cln/exception.h" #include #include namespace cln { // A simple vector has the same operations as a vector, but it can store // _only_ cl_gcobject's. // This class is here because the general vectors always need a function // call for getting/setting the element of a vector. Our main application // of the general vectors are the bit vectors, needed for implementing // polynomials over modular integer rings. I don't want that polynomials // over other rings (in particular cl_I) be penalized by the mere existence // of polynomials over modular integer rings. // When the vectors were implemented like this: // // cl_GV --> cl_GV --> cl_GV --> cl_GV // // a bit/byte-vector (of integers with limited range) could actually be // treated correctly by all the functions which manipulate vectors of cl_N. // This is not crucial, however. Here, we'll have disjoint sets // // cl_SV --> cl_SV --> cl_SV --> cl_SV // // cl_GV // // i.e. the functions which manipulate a (simple!) vector of cl_N cannot // deal with a bit/byte-vector. // (This is the same issue as UPGRADED-ARRAY-ELEMENT-TYPE in Common Lisp.) template class cl_SV_inner; template class cl_SV_inner { protected: std::size_t len; // number of elements private: // T data[]; // the elements T * data() { return (T *) (this+1); } const T * data() const { return (const T *) (this+1); } public: std::size_t size() const { return len; } // number of elements const T & operator[] (unsigned long index) const { #ifndef CL_SV_NO_RANGECHECKS if (!(index < size())) throw runtime_exception(); #endif return data()[index]; } T & operator[] (unsigned long index) { #ifndef CL_SV_NO_RANGECHECKS if (!(index < size())) throw runtime_exception(); #endif return data()[index]; } // New ANSI C++ compilers also want the following. const T & operator[] (unsigned int index) const { return operator[]((unsigned long)index); } T & operator[] (unsigned int index) { return operator[]((unsigned long)index); } const T & operator[] (long index) const { return operator[]((unsigned long)index); } T & operator[] (long index) { return operator[]((unsigned long)index); } const T & operator[] (int index) const { return operator[]((unsigned long)index); } T & operator[] (int index) { return operator[]((unsigned long)index); } public: /* ugh */ // Constructor. cl_SV_inner (std::size_t l) : len (l) {} public: // Destructor. ~cl_SV_inner (); // Ability to place an object at a given address. void* operator new (size_t size, void* ptr) { (void)size; return ptr; } private: // No default constructor, copy constructor, assignment operator, new. cl_SV_inner (); cl_SV_inner (const cl_SV_inner&); cl_SV_inner& operator= (const cl_SV_inner&); void* operator new (size_t size); }; // All member functions are inline. template inline cl_SV_inner::~cl_SV_inner () { std::size_t i = len; while (i > 0) { i--; data()[i].~T(); } } // In memory, a simple vector looks like this: template struct cl_heap_SV : cl_heap { cl_SV_inner v; // here room for the elements }; template struct cl_SV : public BASE { public: // Length. std::size_t size() const { return ((const cl_heap_SV *) this->pointer)->v.size(); } // Reference. Forbid modification of `const cl_SV&' arguments. const T & operator[] (unsigned long index) const { return ((const cl_heap_SV *) this->pointer)->v[index]; } T & operator[] (unsigned long index) { return ((cl_heap_SV *) this->pointer)->v[index]; } // New ANSI C++ compilers also want the following. const T & operator[] (unsigned int index) const { return operator[]((unsigned long)index); } T & operator[] (unsigned int index) { return operator[]((unsigned long)index); } const T & operator[] (long index) const { return operator[]((unsigned long)index); } T & operator[] (long index) { return operator[]((unsigned long)index); } const T & operator[] (int index) const { return operator[]((unsigned long)index); } T & operator[] (int index) { return operator[]((unsigned long)index); } // Constructors. cl_SV (const cl_SV&); // Assignment operators. cl_SV& operator= (const cl_SV&); // Private pointer manipulations. cl_SV (cl_heap_SV* p) : BASE ((cl_private_thing)p) {} cl_SV (cl_private_thing p) : BASE (p) {} protected: // Forbid use of default constructor. cl_SV (); }; #define CL_SV(T,BASE) cl_SV // Define copy constructor. template _CL_DEFINE_COPY_CONSTRUCTOR2(CL_SV(T,BASE),cl_SV,BASE) // Define assignment operator. template CL_DEFINE_ASSIGNMENT_OPERATOR(CL_SV(T,BASE),CL_SV(T,BASE)) #undef CL_SV // The "generic" simple vector type. typedef cl_heap_SV cl_heap_SV_any; typedef cl_SV cl_SV_any; // Copy a simple vector. extern const cl_SV_any copy (const cl_SV_any&); // Hack section. // Conversions to subtypes without checking: #define The(type) *(const type *) & cl_identity // This inline function is for type checking purposes only. inline const cl_SV_any& cl_identity (const cl_SV_any& x) { return x; } } // namespace cln #endif /* _CL_SV_H */ cln-1.3.3/include/cln/integer_ring.h0000644000000000000000000000102311201634736014203 0ustar // Built-in integer ring. #ifndef _CL_INTEGER_RING_H #define _CL_INTEGER_RING_H #include "cln/ring.h" #include "cln/integer_class.h" namespace cln { typedef cl_specialized_number_ring cl_integer_ring; extern const cl_integer_ring cl_I_ring; // math. Z extern cl_class cl_class_integer_ring; class cl_I_ring_init_helper { static int count; public: cl_I_ring_init_helper(); ~cl_I_ring_init_helper(); }; static cl_I_ring_init_helper cl_I_ring_init_helper_instance; } // namespace cln #endif /* _CL_INTEGER_RING_H */ cln-1.3.3/include/cln/random.h0000644000000000000000000000246011201634736013015 0ustar // Public random number operations. #ifndef _CL_RANDOM_H #define _CL_RANDOM_H #include "cln/types.h" #include "cln/modules.h" namespace cln { class random_state { public: struct { uint32 hi; uint32 lo; } seed; // Constructor: random_state (); }; // random32(randomstate) liefert eine neue Zufallszahl. // > randomstate: ein Random-State, wird verändert // < ergebnis: eine 32-Bit-Zufallszahl extern uint32 random32 (random_state& randomstate); #if defined(HAVE_FAST_LONGLONG) // random64(randomstate) liefert eine neue Zufallszahl. // > randomstate: ein Random-State, wird verändert // < ergebnis: eine 64-Bit-Zufallszahl inline uint64 random64 (random_state& randomstate) { return ((uint64)random32(randomstate) << 32) | (uint64)random32(randomstate); } #endif // Ein globaler Zufallszahlengenerator. extern random_state default_random_state; class cl_random_def_init_helper { static int count; public: cl_random_def_init_helper(); ~cl_random_def_init_helper(); }; static cl_random_def_init_helper cl_random_def_init_helper_instance; // Das ist der Default-Generator. inline uint32 random32 (void) { return random32(default_random_state); } #if defined(HAVE_FAST_LONGLONG) inline uint64 random64 (void) { return random64(default_random_state); } #endif } // namespace cln #endif /* _CL_RANDOM_H */ cln-1.3.3/include/cln/SV_complex.h0000644000000000000000000000352311201634736013615 0ustar // Simple vectors of complex numbers. #ifndef _CL_SV_COMPLEX_H #define _CL_SV_COMPLEX_H #include "cln/number.h" #include "cln/SV_number.h" #include "cln/complex_class.h" #include "cln/io.h" namespace cln { // A vector of complex numbers is just a normal vector of numbers. typedef cl_heap_SV cl_heap_SV_N; struct cl_SV_N : public cl_SV { public: // Constructors. cl_SV_N () : cl_SV ((cl_heap_SV_N*) (cl_heap_SV_number*) cl_null_SV_number) {}; cl_SV_N (const cl_SV_N&); explicit cl_SV_N (std::size_t len) : cl_SV ((cl_heap_SV_N*) cl_make_heap_SV_number(len)) {}; // Assignment operators. cl_SV_N& operator= (const cl_SV_N&); // Private pointer manipulations. cl_SV_N (cl_heap_SV_N* p) : cl_SV (p) {} cl_SV_N (cl_private_thing p) : cl_SV (p) {} }; inline cl_SV_N::cl_SV_N (const cl_SV_N& x) : cl_SV (as_cl_private_thing(x)) {} CL_DEFINE_ASSIGNMENT_OPERATOR(cl_SV_N,cl_SV_N) // Copy a simple vector. inline const cl_SV_N copy (const cl_SV_N& vector) { return The(cl_SV_N) (copy((const cl_SV_number&) vector)); } // Output. inline void fprint (std::ostream& stream, const cl_SV_N& x) { extern cl_print_flags default_print_flags; extern void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* fun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_SV_number& vector); extern void print_complex (std::ostream& stream, const cl_print_flags& flags, const cl_N& z); print_vector(stream, default_print_flags, (void (*) (std::ostream&, const cl_print_flags&, const cl_number&)) (void (*) (std::ostream&, const cl_print_flags&, const cl_N&)) &print_complex, x); } CL_DEFINE_PRINT_OPERATOR(cl_SV_N) } // namespace cln #endif /* _CL_SV_COMPLEX_H */ cln-1.3.3/include/cln/integer_io.h0000644000000000000000000000654111201634736013665 0ustar // I/O of integers. #ifndef _CL_INTEGER_IO_H #define _CL_INTEGER_IO_H #include "cln/number_io.h" #include "cln/integer_class.h" namespace cln { // Undocumented input functions // Wandelt eine Zeichenkette mit Integer-Syntax in ein Integer um. // Punkte werden überlesen. // read_integer(base,sign,string,index1,index2) // > base: Lesebasis (>=2, <=36) // > sign: Vorzeichen (/=0 falls negativ) // > string: Simple-String (enthält Ziffern mit Wert index1: Index der ersten Ziffer // > index2: Index nach der letzten Ziffer // (also index2-index1 Ziffern, incl. evtl. Dezimalpunkt am Schluß) // < ergebnis: Integer extern const cl_I read_integer (unsigned int base, cl_signean sign, const char * string, uintC index1, uintC index2); // The following does strictly the same as the general read_complex. // It is here only so that you don't need the rational, complex and float number // readers in order to read an integer. ("Treeshaking") extern const cl_I read_integer (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse); extern const cl_I read_integer (std::istream& stream, const cl_read_flags& flags); // Documented input functions inline std::istream& operator>> (std::istream& stream, cl_I& result) { extern cl_read_flags cl_I_read_flags; result = read_integer(stream,cl_I_read_flags); return stream; } // Undocumented output functions // Liefert zu einem Integer >=0 (write-to-string integer :base 10 :radix nil), // also die Ziffernfolge als String. // Mit malloc_hook() alloziert, mit free_hook() freizugeben. extern char * cl_decimal_string (const cl_I& x); // Gibt ein Integer aus. // print_integer(stream,base,z); // > z: Integer // > base: Basis (>=2, <=36) // > stream: Stream extern void print_integer (std::ostream& stream, unsigned int base, const cl_I& z); // Dasselbe als String. Mit malloc_hook() alloziert, mit free_hook() freizugeben. extern char * print_integer_to_string (unsigned int base, const cl_I& z); // Documented output functions inline void fprintdecimal (std::ostream& stream, const cl_I& x) { print_integer(stream,10,x); } inline void fprintbinary (std::ostream& stream, const cl_I& x) { print_integer(stream,2,x); } inline void fprintoctal (std::ostream& stream, const cl_I& x) { print_integer(stream,8,x); } inline void fprinthexadecimal (std::ostream& stream, const cl_I& x) { print_integer(stream,16,x); } // Gibt eine Zahl aus. // print_integer(stream,flags,z); // > z: Zahl // > stream: Stream // > flags: Ausgabe-Parameter extern void print_integer (std::ostream& stream, const cl_print_flags& flags, const cl_I& z); extern void print_integer (std::ostream& stream, const cl_print_number_flags& flags, const cl_I& z); extern void print_integer (std::ostream& stream, const cl_print_real_flags& flags, const cl_I& z); extern void print_integer (std::ostream& stream, const cl_print_rational_flags& flags, const cl_I& z); // The following does strictly the same as the general `fprint' for numbers. // It is here only so that you don't need the rational number printer // in order to print an integer. ("Treeshaking") inline void fprint (std::ostream& stream, const cl_I& x) { extern cl_print_flags default_print_flags; print_integer(stream,default_print_flags,x); } CL_DEFINE_PRINT_OPERATOR(cl_I) } // namespace cln #endif /* _CL_INTEGER_IO_H */ cln-1.3.3/include/cln/rational.h0000644000000000000000000003265111201634736013353 0ustar // Public rational number operations. #ifndef _CL_RATIONAL_H #define _CL_RATIONAL_H #include "cln/number.h" #include "cln/rational_class.h" #include "cln/integer_class.h" #include "cln/exception.h" namespace cln { CL_DEFINE_AS_CONVERSION(cl_RA) // numerator(r) liefert den Zähler der rationalen Zahl r. extern const cl_I numerator (const cl_RA& r); // denominator(r) liefert den Nenner (> 0) der rationalen Zahl r. extern const cl_I denominator (const cl_RA& r); // Liefert (- r), wo r eine rationale Zahl ist. extern const cl_RA operator- (const cl_RA& r); // (+ r s), wo r und s rationale Zahlen sind. extern const cl_RA operator+ (const cl_RA& r, const cl_RA& s); // Dem C++-Compiler muß man auch das Folgende sagen: inline const cl_RA operator+ (const int x, const cl_RA& y) { return cl_I(x) + y; } inline const cl_RA operator+ (const unsigned int x, const cl_RA& y) { return cl_I(x) + y; } inline const cl_RA operator+ (const long x, const cl_RA& y) { return cl_I(x) + y; } inline const cl_RA operator+ (const unsigned long x, const cl_RA& y) { return cl_I(x) + y; } #ifdef HAVE_LONGLONG inline const cl_RA operator+ (const long long x, const cl_RA& y) { return cl_I(x) + y; } inline const cl_RA operator+ (const unsigned long long x, const cl_RA& y) { return cl_I(x) + y; } #endif inline const cl_RA operator+ (const cl_RA& x, const int y) { return x + cl_I(y); } inline const cl_RA operator+ (const cl_RA& x, const unsigned int y) { return x + cl_I(y); } inline const cl_RA operator+ (const cl_RA& x, const long y) { return x + cl_I(y); } inline const cl_RA operator+ (const cl_RA& x, const unsigned long y) { return x + cl_I(y); } #ifdef HAVE_LONGLONG inline const cl_RA operator+ (const cl_RA& x, const long long y) { return x + cl_I(y); } inline const cl_RA operator+ (const cl_RA& x, const unsigned long long y) { return x + cl_I(y); } #endif // (- r s), wo r und s rationale Zahlen sind. extern const cl_RA operator- (const cl_RA& r, const cl_RA& s); // Dem C++-Compiler muß man auch das Folgende sagen: inline const cl_RA operator- (const int x, const cl_RA& y) { return cl_I(x) - y; } inline const cl_RA operator- (const unsigned int x, const cl_RA& y) { return cl_I(x) - y; } inline const cl_RA operator- (const long x, const cl_RA& y) { return cl_I(x) - y; } inline const cl_RA operator- (const unsigned long x, const cl_RA& y) { return cl_I(x) - y; } #ifdef HAVE_LONGLONG inline const cl_RA operator- (const long long x, const cl_RA& y) { return cl_I(x) - y; } inline const cl_RA operator- (const unsigned long long x, const cl_RA& y) { return cl_I(x) - y; } #endif inline const cl_RA operator- (const cl_RA& x, const int y) { return x - cl_I(y); } inline const cl_RA operator- (const cl_RA& x, const unsigned int y) { return x - cl_I(y); } inline const cl_RA operator- (const cl_RA& x, const long y) { return x - cl_I(y); } inline const cl_RA operator- (const cl_RA& x, const unsigned long y) { return x - cl_I(y); } #ifdef HAVE_LONGLONG inline const cl_RA operator- (const cl_RA& x, const long long y) { return x - cl_I(y); } inline const cl_RA operator- (const cl_RA& x, const unsigned long long y) { return x - cl_I(y); } #endif // (1+ r), wo r eine rationale Zahl ist. extern const cl_RA plus1 (const cl_RA& r); // (1- r), wo r eine rationale Zahl ist. extern const cl_RA minus1 (const cl_RA& r); // (abs r), wo r eine rationale Zahl ist. extern const cl_RA abs (const cl_RA& r); // equal(r,s) vergleicht zwei rationale Zahlen r und s auf Gleichheit. extern bool equal (const cl_RA& r, const cl_RA& s); // equal_hashcode(r) liefert einen equal-invarianten Hashcode für r. extern uint32 equal_hashcode (const cl_RA& r); // compare(r,s) vergleicht zwei rationale Zahlen r und s. // Ergebnis: 0 falls r=s, +1 falls r>s, -1 falls r= (const cl_RA& x, const cl_RA& y) { return compare(x,y)>=0; } inline bool operator> (const cl_RA& x, const cl_RA& y) { return compare(x,y)>0; } // minusp(x) == (< x 0) extern bool minusp (const cl_RA& x); // zerop(x) stellt fest, ob eine rationale Zahl = 0 ist. extern bool zerop (const cl_RA& x); // plusp(x) == (> x 0) extern bool plusp (const cl_RA& x); // Kehrwert (/ r), wo r eine rationale Zahl ist. extern const cl_RA recip (const cl_RA& r); // Liefert (* r s), wo r und s rationale Zahlen sind. extern const cl_RA operator* (const cl_RA& r, const cl_RA& s); // Dem C++-Compiler muß man auch das Folgende sagen: inline const cl_RA operator* (const int x, const cl_RA& y) { return cl_I(x) * y; } inline const cl_RA operator* (const unsigned int x, const cl_RA& y) { return cl_I(x) * y; } inline const cl_RA operator* (const long x, const cl_RA& y) { return cl_I(x) * y; } inline const cl_RA operator* (const unsigned long x, const cl_RA& y) { return cl_I(x) * y; } #ifdef HAVE_LONGLONG inline const cl_RA operator* (const long long x, const cl_RA& y) { return cl_I(x) * y; } inline const cl_RA operator* (const unsigned long long x, const cl_RA& y) { return cl_I(x) * y; } #endif inline const cl_RA operator* (const cl_RA& x, const int y) { return x * cl_I(y); } inline const cl_RA operator* (const cl_RA& x, const unsigned int y) { return x * cl_I(y); } inline const cl_RA operator* (const cl_RA& x, const long y) { return x * cl_I(y); } inline const cl_RA operator* (const cl_RA& x, const unsigned long y) { return x * cl_I(y); } #ifdef HAVE_LONGLONG inline const cl_RA operator* (const cl_RA& x, const long long y) { return x * cl_I(y); } inline const cl_RA operator* (const cl_RA& x, const unsigned long long y) { return x * cl_I(y); } #endif // Quadrat (* r r), wo r eine rationale Zahl ist. extern const cl_RA square (const cl_RA& r); // Liefert (/ r s), wo r und s rationale Zahlen sind. extern const cl_RA operator/ (const cl_RA& r, const cl_RA& s); // Dem C++-Compiler muß man auch das Folgende sagen: inline const cl_RA operator/ (const int x, const cl_RA& y) { return cl_I(x) / y; } inline const cl_RA operator/ (const unsigned int x, const cl_RA& y) { return cl_I(x) / y; } inline const cl_RA operator/ (const long x, const cl_RA& y) { return cl_I(x) / y; } inline const cl_RA operator/ (const unsigned long x, const cl_RA& y) { return cl_I(x) / y; } #ifdef HAVE_LONGLONG inline const cl_RA operator/ (const long long x, const cl_RA& y) { return cl_I(x) / y; } inline const cl_RA operator/ (const unsigned long long x, const cl_RA& y) { return cl_I(x) / y; } #endif inline const cl_RA operator/ (const cl_RA& x, const int y) { return x / cl_I(y); } inline const cl_RA operator/ (const cl_RA& x, const unsigned int y) { return x / cl_I(y); } inline const cl_RA operator/ (const cl_RA& x, const long y) { return x / cl_I(y); } inline const cl_RA operator/ (const cl_RA& x, const unsigned long y) { return x / cl_I(y); } #ifdef HAVE_LONGLONG inline const cl_RA operator/ (const cl_RA& x, const long long y) { return x / cl_I(y); } inline const cl_RA operator/ (const cl_RA& x, const unsigned long long y) { return x / cl_I(y); } #endif // Return type for rounding operators. // x / y --> (q,r) with x = y*q+r. struct cl_RA_div_t { cl_I quotient; cl_RA remainder; // Constructor. cl_RA_div_t () {} cl_RA_div_t (const cl_I& q, const cl_RA& r) : quotient(q), remainder(r) {} }; // Liefert ganzzahligen und gebrochenen Anteil einer rationalen Zahl. // (q,r) := (floor x) // floor2(x) // > x: rationale Zahl // < q,r: Quotient q, ein Integer, Rest r, eine rationale Zahl extern const cl_RA_div_t floor2 (const cl_RA& x); extern const cl_I floor1 (const cl_RA& x); // Liefert ganzzahligen und gebrochenen Anteil einer rationalen Zahl. // (q,r) := (ceiling x) // ceiling2(x) // > x: rationale Zahl // < q,r: Quotient q, ein Integer, Rest r, eine rationale Zahl extern const cl_RA_div_t ceiling2 (const cl_RA& x); extern const cl_I ceiling1 (const cl_RA& x); // Liefert ganzzahligen und gebrochenen Anteil einer rationalen Zahl. // (q,r) := (truncate x) // truncate2(x) // > x: rationale Zahl // < q,r: Quotient q, ein Integer, Rest r, eine rationale Zahl extern const cl_RA_div_t truncate2 (const cl_RA& x); extern const cl_I truncate1 (const cl_RA& x); // Liefert ganzzahligen und gebrochenen Anteil einer rationalen Zahl. // (q,r) := (round x) // round2(x) // > x: rationale Zahl // < q,r: Quotient q, ein Integer, Rest r, eine rationale Zahl extern const cl_RA_div_t round2 (const cl_RA& x); extern const cl_I round1 (const cl_RA& x); // floor2(x,y) liefert (floor x y). extern const cl_RA_div_t floor2 (const cl_RA& x, const cl_RA& y); extern const cl_I floor1 (const cl_RA& x, const cl_RA& y); // ceiling2(x,y) liefert (ceiling x y). extern const cl_RA_div_t ceiling2 (const cl_RA& x, const cl_RA& y); extern const cl_I ceiling1 (const cl_RA& x, const cl_RA& y); // truncate2(x,y) liefert (truncate x y). extern const cl_RA_div_t truncate2 (const cl_RA& x, const cl_RA& y); extern const cl_I truncate1 (const cl_RA& x, const cl_RA& y); // round2(x,y) liefert (round x y). extern const cl_RA_div_t round2 (const cl_RA& x, const cl_RA& y); extern const cl_I round1 (const cl_RA& x, const cl_RA& y); // max(x,y) liefert (max x y), wo x und y rationale Zahlen sind. extern const cl_RA max (const cl_RA& x, const cl_RA& y); // min(x,y) liefert (min x y), wo x und y rationale Zahlen sind. extern const cl_RA min (const cl_RA& x, const cl_RA& y); // signum(x) liefert (signum x), wo x eine rationale Zahl ist. extern const cl_RA signum (const cl_RA& x); // (expt x y), wo x eine rationale Zahl und y ein Integer >0 ist. extern const cl_RA expt_pos (const cl_RA& x, uintL y); extern const cl_RA expt_pos (const cl_RA& x, const cl_I& y); // (expt x y), wo x eine rationale Zahl und y ein Integer ist. extern const cl_RA expt (const cl_RA& x, sintL y); extern const cl_RA expt (const cl_RA& x, const cl_I& y); // Stellt fest, ob eine rationale Zahl >=0 das Quadrat einer rationalen Zahl // ist. // sqrtp(x,&w) // > x: eine rationale Zahl >=0 // < w: rationale Zahl (sqrt x) falls x Quadratzahl // < ergebnis: true ..................., false sonst extern bool sqrtp (const cl_RA& x, cl_RA* w); // Stellt fest, ob eine rationale Zahl >=0 die n-te Potenz einer rationalen Zahl // ist. // rootp(x,n,&w) // > x: eine rationale Zahl >=0 // > n: ein Integer >0 // < w: exakte n-te Wurzel (expt x (/ n)) falls x eine n-te Potenz // < ergebnis: true ........................, false sonst extern bool rootp (const cl_RA& x, uintL n, cl_RA* w); extern bool rootp (const cl_RA& x, const cl_I& n, cl_RA* w); // Liefert zu Integers a>0, b>1 den Logarithmus log(a,b), // falls er eine rationale Zahl ist. // logp(a,b,&l) // > a: ein Integer >0 // > b: ein Integer >1 // < l: log(a,b) falls er eine exakte rationale Zahl ist // < ergebnis: true ......................................., false sonst extern bool logp (const cl_I& a, const cl_I& b, cl_RA* l); // Liefert zu rationalen Zahlen a>0, b>0 den Logarithmus log(a,b), // falls er eine rationale Zahl ist. // logp(a,b,&l) // > a: eine rationale Zahl >0 // > b: eine rationale Zahl >0, /=1 // < l: log(a,b) falls er eine exakte rationale Zahl ist // < ergebnis: true ......................................., false sonst extern bool logp (const cl_RA& a, const cl_RA& b, cl_RA* l); // Konversion zu einem C "float". extern float float_approx (const cl_RA& x); // Konversion zu einem C "double". extern double double_approx (const cl_RA& x); // This could be optimized to use in-place operations. inline cl_RA& operator+= (cl_RA& x, const cl_RA& y) { return x = x + y; } inline cl_RA& operator+= (cl_RA& x, const int y) { return x = x + y; } inline cl_RA& operator+= (cl_RA& x, const unsigned int y) { return x = x + y; } inline cl_RA& operator+= (cl_RA& x, const long y) { return x = x + y; } inline cl_RA& operator+= (cl_RA& x, const unsigned long y) { return x = x + y; } #ifdef HAVE_LONGLONG inline cl_RA& operator+= (cl_RA& x, const long long y) { return x = x + y; } inline cl_RA& operator+= (cl_RA& x, const unsigned long long y) { return x = x + y; } #endif inline cl_RA& operator++ /* prefix */ (cl_RA& x) { return x = plus1(x); } inline void operator++ /* postfix */ (cl_RA& x, int dummy) { (void)dummy; x = plus1(x); } inline cl_RA& operator-= (cl_RA& x, const cl_RA& y) { return x = x - y; } inline cl_RA& operator-= (cl_RA& x, const int y) { return x = x - y; } inline cl_RA& operator-= (cl_RA& x, const unsigned int y) { return x = x - y; } inline cl_RA& operator-= (cl_RA& x, const long y) { return x = x - y; } inline cl_RA& operator-= (cl_RA& x, const unsigned long y) { return x = x - y; } #ifdef HAVE_LONGLONG inline cl_RA& operator-= (cl_RA& x, const long long y) { return x = x - y; } inline cl_RA& operator-= (cl_RA& x, const unsigned long long y) { return x = x - y; } #endif inline cl_RA& operator-- /* prefix */ (cl_RA& x) { return x = minus1(x); } inline void operator-- /* postfix */ (cl_RA& x, int dummy) { (void)dummy; x = minus1(x); } inline cl_RA& operator*= (cl_RA& x, const cl_RA& y) { return x = x * y; } inline cl_RA& operator/= (cl_RA& x, const cl_RA& y) { return x = x / y; } // Runtime typing support. extern cl_class cl_class_ratio; // Debugging support. #ifdef CL_DEBUG extern int cl_RA_debug_module; CL_FORCE_LINK(cl_RA_debug_dummy, cl_RA_debug_module) #endif } // namespace cln #endif /* _CL_RATIONAL_H */ cln-1.3.3/include/cln/univpoly_integer.h0000644000000000000000000001561211201634736015142 0ustar // Univariate Polynomials over the integer numbers. #ifndef _CL_UNIVPOLY_INTEGER_H #define _CL_UNIVPOLY_INTEGER_H #include "cln/ring.h" #include "cln/univpoly.h" #include "cln/number.h" #include "cln/integer_class.h" #include "cln/integer_ring.h" namespace cln { // Normal univariate polynomials with stricter static typing: // `cl_I' instead of `cl_ring_element'. #ifdef notyet typedef cl_UP_specialized cl_UP_I; typedef cl_univpoly_specialized_ring cl_univpoly_integer_ring; //typedef cl_heap_univpoly_specialized_ring cl_heap_univpoly_integer_ring; #else class cl_heap_univpoly_integer_ring; class cl_univpoly_integer_ring : public cl_univpoly_ring { public: // Default constructor. cl_univpoly_integer_ring () : cl_univpoly_ring () {} // Copy constructor. cl_univpoly_integer_ring (const cl_univpoly_integer_ring&); // Assignment operator. cl_univpoly_integer_ring& operator= (const cl_univpoly_integer_ring&); // Automatic dereferencing. cl_heap_univpoly_integer_ring* operator-> () const { return (cl_heap_univpoly_integer_ring*)heappointer; } }; // Copy constructor and assignment operator. CL_DEFINE_COPY_CONSTRUCTOR2(cl_univpoly_integer_ring,cl_univpoly_ring) CL_DEFINE_ASSIGNMENT_OPERATOR(cl_univpoly_integer_ring,cl_univpoly_integer_ring) class cl_UP_I : public cl_UP { public: const cl_univpoly_integer_ring& ring () const { return The(cl_univpoly_integer_ring)(_ring); } // Conversion. CL_DEFINE_CONVERTER(cl_ring_element) // Destructive modification. void set_coeff (uintL index, const cl_I& y); void finalize(); // Evaluation. const cl_I operator() (const cl_I& y) const; public: // Ability to place an object at a given address. void* operator new (size_t size) { return malloc_hook(size); } void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void operator delete (void* ptr) { free_hook(ptr); } }; class cl_heap_univpoly_integer_ring : public cl_heap_univpoly_ring { SUBCLASS_cl_heap_univpoly_ring() // High-level operations. void fprint (std::ostream& stream, const cl_UP_I& x) { cl_heap_univpoly_ring::fprint(stream,x); } bool equal (const cl_UP_I& x, const cl_UP_I& y) { return cl_heap_univpoly_ring::equal(x,y); } const cl_UP_I zero () { return The2(cl_UP_I)(cl_heap_univpoly_ring::zero()); } bool zerop (const cl_UP_I& x) { return cl_heap_univpoly_ring::zerop(x); } const cl_UP_I plus (const cl_UP_I& x, const cl_UP_I& y) { return The2(cl_UP_I)(cl_heap_univpoly_ring::plus(x,y)); } const cl_UP_I minus (const cl_UP_I& x, const cl_UP_I& y) { return The2(cl_UP_I)(cl_heap_univpoly_ring::minus(x,y)); } const cl_UP_I uminus (const cl_UP_I& x) { return The2(cl_UP_I)(cl_heap_univpoly_ring::uminus(x)); } const cl_UP_I one () { return The2(cl_UP_I)(cl_heap_univpoly_ring::one()); } const cl_UP_I canonhom (const cl_I& x) { return The2(cl_UP_I)(cl_heap_univpoly_ring::canonhom(x)); } const cl_UP_I mul (const cl_UP_I& x, const cl_UP_I& y) { return The2(cl_UP_I)(cl_heap_univpoly_ring::mul(x,y)); } const cl_UP_I square (const cl_UP_I& x) { return The2(cl_UP_I)(cl_heap_univpoly_ring::square(x)); } const cl_UP_I expt_pos (const cl_UP_I& x, const cl_I& y) { return The2(cl_UP_I)(cl_heap_univpoly_ring::expt_pos(x,y)); } const cl_UP_I scalmul (const cl_I& x, const cl_UP_I& y) { return The2(cl_UP_I)(cl_heap_univpoly_ring::scalmul(cl_ring_element(cl_I_ring,x),y)); } sintL degree (const cl_UP_I& x) { return cl_heap_univpoly_ring::degree(x); } sintL ldegree (const cl_UP_I& x) { return cl_heap_univpoly_ring::ldegree(x); } const cl_UP_I monomial (const cl_I& x, uintL e) { return The2(cl_UP_I)(cl_heap_univpoly_ring::monomial(cl_ring_element(cl_I_ring,x),e)); } const cl_I coeff (const cl_UP_I& x, uintL index) { return The(cl_I)(cl_heap_univpoly_ring::coeff(x,index)); } const cl_UP_I create (sintL deg) { return The2(cl_UP_I)(cl_heap_univpoly_ring::create(deg)); } void set_coeff (cl_UP_I& x, uintL index, const cl_I& y) { cl_heap_univpoly_ring::set_coeff(x,index,cl_ring_element(cl_I_ring,y)); } void finalize (cl_UP_I& x) { cl_heap_univpoly_ring::finalize(x); } const cl_I eval (const cl_UP_I& x, const cl_I& y) { return The(cl_I)(cl_heap_univpoly_ring::eval(x,cl_ring_element(cl_I_ring,y))); } private: // No need for any constructors. cl_heap_univpoly_integer_ring (); }; // Lookup of polynomial rings. inline const cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& r) { return The(cl_univpoly_integer_ring) (find_univpoly_ring((const cl_ring&)r)); } inline const cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& r, const cl_symbol& varname) { return The(cl_univpoly_integer_ring) (find_univpoly_ring((const cl_ring&)r,varname)); } // Operations on polynomials. // Add. inline const cl_UP_I operator+ (const cl_UP_I& x, const cl_UP_I& y) { return x.ring()->plus(x,y); } // Negate. inline const cl_UP_I operator- (const cl_UP_I& x) { return x.ring()->uminus(x); } // Subtract. inline const cl_UP_I operator- (const cl_UP_I& x, const cl_UP_I& y) { return x.ring()->minus(x,y); } // Multiply. inline const cl_UP_I operator* (const cl_UP_I& x, const cl_UP_I& y) { return x.ring()->mul(x,y); } // Squaring. inline const cl_UP_I square (const cl_UP_I& x) { return x.ring()->square(x); } // Exponentiation x^y, where y > 0. inline const cl_UP_I expt_pos (const cl_UP_I& x, const cl_I& y) { return x.ring()->expt_pos(x,y); } // Scalar multiplication. #if 0 // less efficient inline const cl_UP_I operator* (const cl_I& x, const cl_UP_I& y) { return y.ring()->mul(y.ring()->canonhom(x),y); } inline const cl_UP_I operator* (const cl_UP_I& x, const cl_I& y) { return x.ring()->mul(x.ring()->canonhom(y),x); } #endif inline const cl_UP_I operator* (const cl_I& x, const cl_UP_I& y) { return y.ring()->scalmul(x,y); } inline const cl_UP_I operator* (const cl_UP_I& x, const cl_I& y) { return x.ring()->scalmul(y,x); } // Coefficient. inline const cl_I coeff (const cl_UP_I& x, uintL index) { return x.ring()->coeff(x,index); } // Destructive modification. inline void set_coeff (cl_UP_I& x, uintL index, const cl_I& y) { x.ring()->set_coeff(x,index,y); } inline void finalize (cl_UP_I& x) { x.ring()->finalize(x); } inline void cl_UP_I::set_coeff (uintL index, const cl_I& y) { ring()->set_coeff(*this,index,y); } inline void cl_UP_I::finalize () { ring()->finalize(*this); } // Evaluation. (No extension of the base ring allowed here for now.) inline const cl_I cl_UP_I::operator() (const cl_I& y) const { return ring()->eval(*this,y); } // Derivative. inline const cl_UP_I deriv (const cl_UP_I& x) { return The2(cl_UP_I)(deriv((const cl_UP&)x)); } #endif // Returns the n-th Tchebychev polynomial (n >= 0). extern const cl_UP_I tschebychev (sintL n); // Returns the n-th Hermite polynomial (n >= 0). extern const cl_UP_I hermite (sintL n); // Returns the n-th Laguerre polynomial (n >= 0). extern const cl_UP_I laguerre (sintL n); } // namespace cln #endif /* _CL_UNIVPOLY_INTEGER_H */ cln-1.3.3/include/cln/io.h0000644000000000000000000000363612034113706012144 0ustar // I/O through #ifndef _CL_IO_H #define _CL_IO_H #include "cln/types.h" #include "cln/modules.h" // I/O through #ifdef floor #undef floor #include #define floor cln_floor #else #include #endif namespace cln { // compatibility: typedef std::istream& cl_istream; typedef std::ostream& cl_ostream; extern std::ostream* cl_debugout_stream; #define cl_debugout (*cl_debugout_stream) // Elementary operations on std::ostream& inline void fprintchar (std::ostream& stream, char c) { stream.put(c); } inline void fprint (std::ostream& stream, const char * string) { stream << string; } extern void fprintdecimal (std::ostream& stream, unsigned long x); extern void fprintdecimal (std::ostream& stream, long x); inline void fprintdecimal (std::ostream& stream, unsigned int x) { fprintdecimal(stream,(unsigned long)x); } inline void fprintdecimal (std::ostream& stream, int x) { fprintdecimal(stream,(long)x); } extern void fprinthexadecimal (std::ostream& stream, unsigned long x); extern void fprinthexadecimal (std::ostream& stream, long x); inline void fprinthexadecimal (std::ostream& stream, unsigned int x) { fprinthexadecimal(stream,(unsigned long)x); } inline void fprinthexadecimal (std::ostream& stream, int x) { fprinthexadecimal(stream,(long)x); } struct cl_print_flags; struct cl_print_number_flags; struct cl_print_real_flags; struct cl_print_rational_flags; struct cl_print_float_flags; class cl_prin_globals_init_helper { static int count; public: cl_prin_globals_init_helper(); ~cl_prin_globals_init_helper(); }; static cl_prin_globals_init_helper cl_prin_globals_init_helper_instance; // Define the customary << and >> operators. #define CL_DEFINE_PRINT_OPERATOR(_class_) \ inline std::ostream& operator<< (std::ostream& stream, const _class_& x) \ { \ fprint(stream,x); \ return stream; \ } } // namespace cln #endif /* _CL_IO_H */ cln-1.3.3/include/cln/GV_rational.h0000644000000000000000000000364111201634736013744 0ustar // General vectors of rational numbers. #ifndef _CL_GV_RATIONAL_H #define _CL_GV_RATIONAL_H #include "cln/number.h" #include "cln/GV_real.h" #include "cln/rational_class.h" #include "cln/io.h" namespace cln { // A vector of rational numbers is just a normal vector of real numbers. typedef cl_heap_GV cl_heap_GV_RA; struct cl_GV_RA : public cl_GV { public: // Constructors. cl_GV_RA (); cl_GV_RA (const cl_GV_RA&); explicit cl_GV_RA (std::size_t len); // Assignment operators. cl_GV_RA& operator= (const cl_GV_RA&); // Private pointer manipulations. cl_GV_RA (cl_heap_GV_RA* p) : cl_GV (p) {} cl_GV_RA (cl_private_thing p) : cl_GV (p) {} }; inline cl_GV_RA::cl_GV_RA (const cl_GV_RA& x) : cl_GV (as_cl_private_thing(x)) {} CL_DEFINE_ASSIGNMENT_OPERATOR(cl_GV_RA,cl_GV_RA) inline cl_GV_RA::cl_GV_RA (std::size_t len) : cl_GV ((cl_heap_GV_RA*) cl_make_heap_GV_number(len)) {} inline cl_GV_RA::cl_GV_RA () : cl_GV ((cl_heap_GV_RA*) (cl_heap_GV_number*) cl_null_GV_number) {} // Copy a vector. inline const cl_GV_RA copy (const cl_GV_RA& vector) { return The(cl_GV_RA) (copy((const cl_GV_R&) vector)); } // Output. inline void fprint (std::ostream& stream, const cl_GV_RA& x) { extern cl_print_flags default_print_flags; extern void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* fun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_GV_number& vector); extern void print_rational (std::ostream& stream, const cl_print_flags& flags, const cl_RA& z); print_vector(stream, default_print_flags, (void (*) (std::ostream&, const cl_print_flags&, const cl_number&)) (void (*) (std::ostream&, const cl_print_flags&, const cl_RA&)) &print_rational, x); } CL_DEFINE_PRINT_OPERATOR(cl_GV_RA) } // namespace cln #endif /* _CL_GV_RAATIONAL_H */ cln-1.3.3/include/cln/rational_class.h0000644000000000000000000000415611201634736014537 0ustar // Abstract class of rational numbers. #ifndef _CL_RATIONAL_CLASS_H #define _CL_RATIONAL_CLASS_H #include "cln/number.h" #include "cln/real_class.h" namespace cln { class cl_RA : public cl_R { public: // Default constructor. cl_RA (); // Copy constructor. cl_RA (const cl_RA&); // Converters. // Assignment operators. cl_RA& operator= (const cl_RA&); // Constructors and assignment operators from C numeric types. cl_RA (const int); // |argument| must be < 2^29 cl_RA (const unsigned int); // argument must be < 2^29 cl_RA (const long); cl_RA (const unsigned long); #ifdef HAVE_LONGLONG cl_RA (const long long); cl_RA (const unsigned long long); #endif cl_RA& operator= (const int); // |argument| must be < 2^29 cl_RA& operator= (const unsigned int); // argument must be < 2^29 cl_RA& operator= (const long); cl_RA& operator= (const unsigned long); #ifdef HAVE_LONGLONG cl_RA& operator= (const long long); cl_RA& operator= (const unsigned long long); #endif // Other constructors. cl_RA (const char *); // Private constructor. cl_RA (cl_private_thing); cl_RA (struct cl_heap_ratio *); public: // Ability to place an object at a given address. void* operator new (size_t size) { return malloc_hook(size); } void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void operator delete (void* ptr) { free_hook(ptr); } private: // Friend declarations. They are for the compiler. Just ignore them. }; // Private constructors. inline cl_RA::cl_RA (cl_private_thing ptr) : cl_R (ptr) {} // The assignment operators: CL_DEFINE_ASSIGNMENT_OPERATOR(cl_RA, cl_RA) // The default constructors. inline cl_RA::cl_RA () : cl_R ((cl_private_thing) cl_combine(cl_FN_tag,0)) {} // The copy constructors. CL_DEFINE_COPY_CONSTRUCTOR2(cl_RA,cl_R) // Constructors and assignment operators from C numeric types. CL_DEFINE_INT_CONSTRUCTORS(cl_RA) CL_DEFINE_INT_ASSIGNMENT_OPERATORS(cl_RA) CL_DEFINE_LONG_CONSTRUCTORS(cl_RA) CL_DEFINE_LONG_ASSIGNMENT_OPERATORS(cl_RA) #ifdef HAVE_LONGLONG CL_DEFINE_LONGLONG_CONSTRUCTORS(cl_RA) CL_DEFINE_LONGLONG_ASSIGNMENT_OPERATORS(cl_RA) #endif } // namespace cln #endif /* _CL_RATIONAL_CLASS_H */ cln-1.3.3/include/cln/version.h.in0000644000000000000000000000073311201634736013630 0ustar /* CLN version information */ #ifndef _CL_VERSION_H #define _CL_VERSION_H /* CLN release number */ #undef CL_VERSION /* Major version number of CLN */ #undef CL_VERSION_MAJOR /* Minor version number of CLN */ #undef CL_VERSION_MINOR /* Patchlevel version number of CLN */ #undef CL_VERSION_PATCHLEVEL namespace cln { extern const int version_major; extern const int version_minor; extern const int version_patchlevel; } // namespace cln #endif /* _CL_VERSION_H */ cln-1.3.3/include/cln/ffloat_class.h0000644000000000000000000000460011201634736014173 0ustar // Concrete class of single float numbers. #ifndef _CL_FFLOAT_CLASS_H #define _CL_FFLOAT_CLASS_H #include "cln/number.h" #include "cln/float_class.h" namespace cln { class cl_FF : public cl_F { public: // Default constructor. cl_FF (); // Assignment operators. cl_FF& operator= (const cl_FF&); // Optimization of method pointer_p(). bool pointer_p() const #if defined(CL_WIDE_POINTERS) { return false; } #else { return true; } #endif // Faster pointer_p() gives a faster copy constructor (but not destructor!!!). cl_FF (const cl_FF& x); // Constructors and assignment operators from C numeric types. cl_FF (const float); cl_FF& operator= (const float); // Other constructors. cl_FF (const char *); // Private constructor. cl_FF (cl_private_thing); #if defined(CL_WIDE_POINTERS) cl_FF (struct cl_heap_ffloat * /* NULL! */, cl_uint); #else cl_FF (struct cl_heap_ffloat *); // Private pointer manipulations. operator struct cl_heap_ffloat * () const; #endif public: // Ability to place an object at a given address. void* operator new (size_t size) { return malloc_hook(size); } void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void operator delete (void* ptr) { free_hook(ptr); } }; // Private constructors. inline cl_FF::cl_FF (cl_private_thing ptr) : cl_F (ptr) {} // The assignment operators: CL_DEFINE_ASSIGNMENT_OPERATOR(cl_FF, cl_FF) // The default constructors. #if defined(CL_WIDE_POINTERS) inline cl_FF::cl_FF () : cl_F ((cl_private_thing) cl_combine(cl_FF_tag,0)) {} #else // Private pointer manipulations. Never throw away a `struct cl_heap_ffloat *'! inline cl_FF::operator struct cl_heap_ffloat * () const { struct cl_heap_ffloat * hpointer = (struct cl_heap_ffloat *) pointer; cl_inc_refcount(*this); return hpointer; } extern const cl_FF cl_FF_0; inline cl_FF::cl_FF () : cl_F ((cl_private_thing) (struct cl_heap_ffloat *) cl_FF_0) {} class cl_FF_globals_init_helper { static int count; public: cl_FF_globals_init_helper(); ~cl_FF_globals_init_helper(); }; static cl_FF_globals_init_helper cl_FF_globals_init_helper_instance; #if 0 // see cl_FF.h inline cl_FF::cl_FF (struct cl_heap_ffloat * ptr) : cl_F ((cl_private_thing) ptr) {} #endif #endif // The copy constructors. CL_DEFINE_COPY_CONSTRUCTOR2(cl_FF,cl_F) // Constructors and assignment operators from C numeric types. CL_DEFINE_FLOAT_CONSTRUCTOR(cl_FF) } // namespace cln #endif /* _CL_FFLOAT_CLASS_H */ cln-1.3.3/debian/0000755000000000000000000000000012227130201010370 5ustar cln-1.3.3/debian/copyright0000644000000000000000000000203211313505204012324 0ustar This package was debianized by Richard Kreckel on Fri, 14 Jan 2000 11:20:17 +0100. It was downloaded from . Copyright: 1988-2008 Bruno Haible 2000-2009 Richard B. Kreckel 2008 Alexei Sheplyakov 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, version 2, with the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL-2; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. cln-1.3.3/debian/libcln6.install0000644000000000000000000000002507664502204013325 0ustar usr/lib/libcln*.so.* cln-1.3.3/debian/shlibs0000644000000000000000000000002111164227346011610 0ustar libcln 6 libcln6 cln-1.3.3/debian/libcln-dev.doc-base0000644000000000000000000000045411164243223014021 0ustar Document: libcln-dev Title: CLN (Class Library for Numbers) documentation Author: Bruno Haible Abstract: CLN is a C++ library for computations with all kinds of numbers. Section: Science/Mathematics Format: HTML Index: /usr/share/doc/libcln-dev/html/cln.html Files: /usr/share/doc/libcln-dev/html/* cln-1.3.3/debian/compat0000644000000000000000000000000212172717117011606 0ustar 9 cln-1.3.3/debian/libcln-dev.dirs0000644000000000000000000000014111223050421013266 0ustar usr/include usr/lib/pkgconfig usr/share/aclocal usr/share/doc-base usr/share/doc/libcln-dev/html cln-1.3.3/debian/libcln-dev.install0000644000000000000000000000010512107532176014011 0ustar usr/include/* usr/lib/libcln.a usr/lib/libcln.so usr/share/info/cln* cln-1.3.3/debian/changelog0000644000000000000000000002704612227130120012253 0ustar cln (1.3.3-1ubuntu1) saucy; urgency=low * Fix build on arm64. -- William Grant Tue, 15 Oct 2013 14:02:31 +1100 cln (1.3.3-1) unstable; urgency=low * New upstream release. (Closes: #712361, #700634) -- Richard Kreckel Sun, 21 Jul 2013 23:04:56 +0200 cln (1.3.2-1.2+x32) unreleased; urgency=low * Fix autoconf test checking whether mp_limb_t needs to be long long, which is needed on x32. -- Daniel Schepler Fri, 15 Feb 2013 07:48:38 -0800 cln (1.3.2-1.2+x32) unreleased; urgency=low * Non-maintainer upload. * Fix compilation on s390x and sparc64. Thanks to Aurelien Jarno. (Closes: #639494) -- Philipp Kern Sun, 01 Apr 2012 10:00:49 +0000 cln (1.3.2-1.1) unstable; urgency=low * Non-maintainer upload. * Stop shipping .la files. Closes: #633169. -- Regis Boudin Tue, 04 Oct 2011 19:29:54 +0100 cln (1.3.2-1) unstable; urgency=low * New upstream release. -- Richard Kreckel Sat, 08 May 2011 22:52:43 +0200 cln (1.3.1-2.2) unstable; urgency=low * Non-maintainer upload. - Enable CPPFLAGS="-DNO_ASM" on arm* and sparc* (Closes: #604792) * Bump standards version to 3.9.1 -- Hector Oron Sun, 03 Apr 2011 13:12:11 +0000 cln (1.3.1-2.1) unstable; urgency=low * NMU. Change dependencies: libgmp3-dev --> libgmp-dev. -- Steve M. Robbins Wed, 16 Mar 2011 21:04:27 -0500 cln (1.3.1-2) unstable; urgency=low * debian/copyright: Clarify license (GPL v2). * debian/compat: debhelper compatibility version 6. -- Richard Kreckel Sun, 20 Dec 2009 21:39:47 +0100 cln (1.3.1-1) unstable; urgency=low * New upstream release; closes: #545922. * debhelper compatibility version 5. * Run install-docs instead of install-info from postinst/prerm scripts. -- Richard Kreckel Thu, 24 Sep 2009 10:09:23 +0200 cln (1.3.0-2) unstable; urgency=low * Leave out /usr/share/info/dir.gz; closes: #535323. -- Richard Kreckel Thu, 02 Jul 2009 19:19:56 +0200 cln (1.3.0-1) unstable; urgency=low * New upstream release. -- Richard Kreckel Tue, 30 Jun 2009 23:57:24 +0200 cln (1.3.0~beta2-1) experimental; urgency=low * Check again, fixing the Sparc breakage. -- Richard Kreckel Sun, 14 Jun 2009 21:54:12 +0200 cln (1.3.0~beta1-1) experimental; urgency=low * Check to see if current git tree is ready for prime time; closes: #504971. -- Richard Kreckel Fri, 03 May 2009 22:45:25 +0200 cln (1.2.2-2) unstable; urgency=low * Arm eabi needs -DNO_ASM; closes: #475347. * Updated to standards-version 3.8.0. -- Richard Kreckel Wed, 18 Jun 2008 22:39:16 +0100 cln (1.2.2-1) unstable; urgency=low * New upstream release; closes: #473494. -- Richard Kreckel Sat, 05 Apr 2008 23:11:27 +0100 cln (1.2.1-1) unstable; urgency=low * New upstream release. -- Richard Kreckel Mon, 24 Mar 2008 22:15:45 +0100 cln (1.2.0-1) unstable; urgency=low * New upstream release: - Support for huge numbers; closes: #286266. - Changed pi to truncate output a little bit; closes: #310385. - incremented soname version; closes: #430248. * Make libcln-dev depend on libgmp3-dev; closes: #412103. -- Richard Kreckel Sat, 19 Jan 2008 22:07:52 +0100 cln (1.2.0~beta4-1) experimental; urgency=low * Check current CVS again. * Add -DNO_ASM to CPPFLAGS on Sparc until miscompilation is sorted out. -- Richard Kreckel Sun, 06 Jan 2008 18:08:15 +0100 cln (1.2.0~beta3-1) experimental; urgency=low * Check current CVS again. -- Richard Kreckel Tue, 04 Dec 2007 09:37:45 +0100 cln (1.2.0~beta2-1) experimental; urgency=low * Check build stuff again. -- Richard Kreckel Sun, 07 Oct 2007 22:11:48 +0200 cln (1.2.0~beta1-1) experimental; urgency=low * Check to see if current CVS is ready for prime time. -- Richard Kreckel Tue, 18 Sep 2007 23:38:02 +0200 cln (1.1.13-2) unstable; urgency=low * Apply workaround for m68k build failure; closes: #388000. -- Richard Kreckel Wed, 20 Sep 2006 22:53:21 +0200 cln (1.1.13-1) unstable; urgency=low * New upstream release. -- Richard Kreckel Tue, 08 Aug 2006 22:50:58 +0200 cln (1.1.12-2) unstable; urgency=low * Apply patch from CVS: Fix 64-bit brokenness due to buggy configure. -- Richard Kreckel Mon, 07 Aug 2006 23:59:01 +0200 cln (1.1.12-1) unstable; urgency=low * New upstream release. -- Richard Kreckel Sun, 06 Aug 2006 11:29:31 +0200 cln (1.1.11-1) unstable; urgency=low * New upstream release. -- Richard Kreckel Wed, 23 Oct 2005 22:24:52 +0100 cln (1.1.10-1) unstable; urgency=low * New upstream release... * ...breaking binary compatibility, so renamed the package to libcln4. -- Richard Kreckel Sat, 22 Oct 2005 22:55:13 +0200 cln (1.1.9-6) unstable; urgency=low * Add a patch to fix the segfault on startup on mips and mipsel. -- Richard Kreckel Tue, 30 Aug 2005 22:20:58 +0200 cln (1.1.9-5) unstable; urgency=low * Add a patch to mark the library's stack as nonexecutable; closes: #321748. * Reduce optimization for ia64 and m68k. This should make it build again. * Explicitly acknowledge NMU; closes: #318210, #314831. -- Richard Kreckel Mon, 15 Aug 2005 22:58:08 +0200 cln (1.1.9-4) unstable; urgency=low * Sigh, I could've sworn that I applied the patch from upstream in 1.1.9-2. Apparently, I'm overworked. Here it goes again; closes: #320040. -- Richard Kreckel Tue, 09 Aug 2005 23:19:12 +0200 cln (1.1.9-3) unstable; urgency=low * Oops, forgot to update debian/shlibs from NMU; closes: #321531. -- Richard Kreckel Sun, 07 Aug 2005 22:24:48 +0200 cln (1.1.9-2) unstable; urgency=low * Use ${shlibs:Depends} instead of hard-wired dependencies; closes: #319556. * Include patch by Andreas Jochens for PPC64; closes: #320040. -- Richard Kreckel Tue, 04 Aug 2005 22:35:18 +0200 cln (1.1.9-1.1) unstable; urgency=low * NMU, coordinated with Maintainer * Add forward declaration of cl_string needed by gcc-4 (Closes: #314831) * debian/control: add c2 to library package name * Build against new libgmp using gcc-4 ABI (Closes: #318210) -- Martin Waitz Tue, 19 Jul 2005 10:26:24 +0200 cln (1.1.9-1) unstable; urgency=low * New upstream release. -- Richard Kreckel Wed, 03 Nov 2004 22:35:11 +0100 cln (1.1.8-2) unstable; urgency=low * Include a patch from CVS to make it work on mipsel; closes: #140647. -- Richard Kreckel Mon, 6 Sep 2004 21:48:35 +0200 cln (1.1.8-1) unstable; urgency=low * New upstream release; closes: #256312. -- Richard Kreckel Thu, 1 Jul 2004 22:38:08 +0100 cln (1.1.7-1) unstable; urgency=low * New upstream release; closes: #246319. -- Richard Kreckel Sun, 2 May 2004 22:53:35 +0100 cln (1.1.6-1) unstable; urgency=low * New upstream release... * ...breaking binary compatibility, so renamed the package to libcln3. * More detailed extended description for cln-dev; closes: #210102. -- Richard Kreckel Sat, 10 Jan 2004 23:03:22 +0100 cln (1.1.5-2) unstable; urgency=low * Registered documentation with doc-base; closes: #99192. * Changed section of libcln-dev to libdevel. * Changed section of libcln2 to libs. * Updated to standards-version 3.5.10. -- Richard Kreckel Tue, 27 May 2003 10:16:09 +0200 cln (1.1.5-1) unstable; urgency=low * New upstream release -- Richard Kreckel Fri, 28 Feb 2003 15:11:12 +0100 cln (1.1.4-1) unstable; urgency=low * New upstream release (Debian and other bugfixes). -- Richard Kreckel Fri, 4 Jan 2002 15:17:07 +0100 cln (1.1.3-3) unstable; urgency=low * Manually added __s390__ section to include/cln/config.h.in such that packages compiling against CLN on these architectures do not have to define this on the command line. -- Richard Kreckel Sat, 29 Dec 2001 18:28:50 +0100 cln (1.1.3-2) unstable; urgency=low * Backported support for s390 from upstream CVS. -- Richard Kreckel Sat, 29 Dec 2001 18:28:35 +0100 cln (1.1.3-1) unstable; urgency=low * New bugfix release from upstream. * Renamed the package to libcln2 and libcln-dev to match policy. * Segregate the pi binary into a separate Debian package, for same reason. -- Richard Kreckel Wed, 7 Nov 2001 16:18:58 +0100 cln (1.1.2-1) unstable; urgency=low * New upstream release; closes: #104906. * Remove build-dependency on libstdc++-dev; closes: #105953. -- Richard Kreckel Tue, 25 Jul 2001 13:26:36 +0200 cln (1.1.1-1) unstable; urgency=low * New upstream release. -- Richard Kreckel Thu, 31 May 2001 18:46:31 +0200 cln (1.1.0-5) unstable; urgency=low * Fixed some missing !defined(NO_ASM) preprocessor directives in upstream's CVS and backported them to the Debian package in order to... * ...switch them on by debian/rules if we are on the ARM architecture; closes: #94097. -- Richard Kreckel Sat, 21 Apr 2001 15:46:31 +0200 cln (1.1.0-4) unstable; urgency=low * Rebuild again (*ugh*) using binutils 2.11.90, since the old library occassionally resulted in ld-so assertions, PLT alloc failures and more scary stuff like that. Building large C++ libraries using binutils 2.9 is a Kamikaze combination! (This seems to make a lot of sense, since gcc-2.95.3 now depends on those new binutils anyways.) * Changed the dependencies to reflect this problem. -- Richard Kreckel Thu, 12 Apr 2001 17:52:20 +0200 cln (1.1.0-3) unstable; urgency=low * Rebuild using woody's gcc-2.95.3 since some people were reporting strange problems with the old libraries that were build using gcc-2.95.3. * Make install-info perform quiet. -- Richard Kreckel Tue, 10 Apr 2001 13:40:15 +0200 cln (1.1.0-2) unstable; urgency=low * As requested by installer, change priority from extra to optional. * Fix miscompilation on Sparc by adjusting CXXFLAGS for this architecture. * Just in case somebody decides to go for ia64: backported a one-line essential (and tested) architecture-specific patch from the CVS version. * As a gimmick, add Bruno Haible's pi example. (They'll put it into SuSE 7.2 and we don't want to hear complaints "but SuSE has this...", do we?!) -- Richard Kreckel Thu, 14 Mar 2001 17:04:58 +0100 cln (1.1.0-1) unstable; urgency=low * New upstream source closes #84290. * added dependency on libgmp3. * added Build-Depends section closes #70274. -- Richard Kreckel Fri, 14 Jan 2000 15:20:02 +0100 cln (1.0.3-1) unstable; urgency=low * New upstream source. * New upstream maintainer . * New Debian maintainer . * Entirely repackaged. -- Richard Kreckel Fri, 14 Jan 2000 15:20:02 +0100 cln (0.98-1) unstable; urgency=low * New upstream source -- John Lapeyre Sat, 1 Aug 1998 15:40:49 -0700 cln (0.1-1) unstable; urgency=low * Initial Release. -- John Lapeyre Mon, 27 Jul 1998 17:06:36 -0700 cln-1.3.3/debian/pi.dirs0000644000000000000000000000003307630165174011702 0ustar usr/bin usr/share/man/man1 cln-1.3.3/debian/control0000644000000000000000000000434212227130172012005 0ustar Source: cln Section: math Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Richard Kreckel Build-Depends: debhelper (>= 6), libgmp-dev, texinfo, dh-autoreconf Standards-Version: 3.9.4 Homepage: http://www.ginac.de/CLN/ Package: libcln6 Architecture: any Section: libs Depends: ${shlibs:Depends}, ${misc:Depends} Replaces: cln Suggests: pi Description: Class Library for Numbers (C++) CLN is a library for computations with all kinds of numbers. It has a rich set of number classes, including integers (with unlimited precision), reals with various precisions (including unlimited), rationals, complex numbers and polynomials. The kernel is written in assembly language. It uses garbage collection (automatic, without imposing any burden on the main application). Many efficient algorithms (i.e. for all transcendental functions) are implemented. Package: libcln-dev Architecture: any Section: libdevel Depends: g++, libcln6 (= ${binary:Version}), libc6-dev | libc-dev, libgmp-dev, install-info Replaces: cln-dev Provides: cln-dev Conflicts: cln-dev Recommends: info | info-browser Description: Development library for Class Library for Numbers (c++) CLN is a library for computations with all kinds of numbers. It has a rich set of number classes, including integers (with unlimited precision), reals with various precisions (including unlimited), rationals, complex numbers and polynomials. The kernel is written in assembly language. It uses garbage collection (automatic, without imposing any burden on the main application). Many efficient algorithms (i.e. for all transcendental functions) are implemented. . This package provides header files, a static library plus a manual. Package: pi Architecture: any Section: math Depends: ${shlibs:Depends} Description: Compute Archimedes' constant Pi to arbitrary precision This program computes Archimedes' constant Pi to arbitrary precision. It is extremely fast and the precision is only limited by your machine's main memory. . This is a teaser for the CLN library, to which the actual computation is delegated. You may use these decimal digits as random digits or search them for hidden messages. :-) cln-1.3.3/debian/rules0000755000000000000000000000566112173040773011476 0ustar #!/usr/bin/make -f package=cln version=$(shell expr `pwd` : '.*-\([0-9.]*\)') version_major=$(shell expr `pwd` : '.*-\([0-9]*\).[0-9.]*') DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk include /usr/share/dpkg/architecture.mk # ARM: CLN's assembler support is not working properly (it was only # 'theoretically' ported by copying from code that had once worked in # CLISP under BSD). Same for armel. ifneq (,$(findstring arm,$(DEB_HOST_ARCH))) CPPFLAGS += -DNO_ASM endif # HPPA: Assembler support is not working properly. Somebody needs to # investigate but currently I don't have the inspiration for fixing # things on exotic architectures. ifneq (,$(findstring hppa,$(DEB_HOST_ARCH))) CPPFLAGS += -DNO_ASM endif # SPARC: With some versions of GCC, there are apparently problems in # passing return values in %g1. ifneq (,$(findstring sparc,$(DEB_HOST_ARCH))) CPPFLAGS += -DNO_ASM endif debian/autoreconf-stamp: dh_autoreconf touch $@ build-indep: # There are no architecture-independent files to be uploaded # generated by this package. If there were any they would be made here. build-arch: debian/autoreconf-stamp dh_testdir ./configure --prefix=/usr `dpkg-architecture -qDEB_HOST_GNU_TYPE` CPPFLAGS="$(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ${MAKE} (cd doc; ${MAKE} cln.html) touch build build: build-indep build-arch clean: dh_testdir dh_autoreconf_clean dh_clean -rm -f build [ ! -f Makefile ] || ${MAKE} distclean -rm -f `find . -name "*~"` -rm -rf debian/tmp `find debian/* -type d ! -name CVS` debian/files* core -rm -rf debian/.libs debian/*.o -rm -f debian/*substvars binary-indep: build-indep dh_testdir dh_testroot binary-arch: build-arch dh_testdir dh_testroot dh_installdirs # I want to see what the buildd logs of the different architectures say: -${MAKE} check ${MAKE} install prefix=${CURDIR}/debian/tmp/usr bindir=${CURDIR}/debian/pi/usr/bin mandir=${CURDIR}/debian/pi/usr/share/man datadir=${CURDIR}/debian/libcln-dev/usr/share ${MAKE} install-html prefix=${CURDIR}/debian/libcln-dev/usr htmldir=${CURDIR}/debian/libcln-dev/usr/share/doc/libcln-dev/html # This installs into libdir, but we must not set libdir because it affects the .la file: mv ${CURDIR}/debian/tmp/usr/lib/pkgconfig/* ${CURDIR}/debian/libcln-dev/usr/lib/pkgconfig/ dh_installdocs ChangeLog NEWS README TODO dh_installexamples -plibcln-dev ${CURDIR}/examples/contfrac.cc ${CURDIR}/examples/e.cc ${CURDIR}/examples/fibonacci.cc ${CURDIR}/examples/legendre.cc ${CURDIR}/examples/lucaslehmer.cc ${CURDIR}/examples/nextprime.cc ${CURDIR}/examples/perfnum.cc /usr/bin/install -m 644 debian/libcln-dev.doc-base ${CURDIR}/debian/libcln-dev/usr/share/doc-base/libcln-dev dh_installchangelogs dh_install --sourcedir=debian/tmp dh_strip dh_compress dh_fixperms dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: binary binary-arch binary-indep clean cln-1.3.3/NEWS0000644000000000000000000005076412173044110007664 0ustar 2013-07-21, version 1.3.3 ========================= Implementation changes ---------------------- * Fix integer input of leading zeros in power-of-two base. * Fix several floating-poing conversion bugs involving huge numbers. * Fix bug that would set input stream fail state when reading a number at EOF. Other changes ------------- * Support the x32 ABI. 2011-05-08, version 1.3.2 ========================= Implementation changes ---------------------- * Fixed a bug in scale_float(cl_LF, cl_I) when the scale factor exceeded 2^31 on x86. Other changes ------------- * Improved portability to some non-GCC compilers. 2009-09-24, version 1.3.1 ========================= Implementation changes ---------------------- * Fixed a crash in double_approx(cl_RA) on 64-bit platforms. * Add basic support for Renesas SH (sh4). 2009-06-30, version 1.3.0 ========================= Other changes ------------- * Use the GNU autotools as build system. * Implemented a more portable module dependency mechanism. 2008-04-05, version 1.2.2 ========================= Implementation changes ---------------------- * Re-establish CLN-1.2.0 ABI and fix ARM build, both inadvertently broken in the previous release. 2008-03-24, version 1.2.1 ========================= Implementation changes ---------------------- * Fixed some bugs in the output of numbers larger than 2^32 decimal digits. Other changes ------------- * Modifying C/C++ operators like +=, ++, etc. are now enabled by default. 2008-01-19, version 1.2.0 ========================= Algorithmic changes ------------------- * Save big amounts of memory in computation of some functions and constants by: - Avoiding pre-computation of series terms and instead computing them in a streamed way. - Avoiding computation with excess precision in binary splitting algorithm by coercion of intermediate integer values to floating-point as early as possible. Implementation changes ---------------------- * Added support for huge numbers: - intC used for all counter loops. - intE is now a 64-bit type on all 64-bit platforms and even on selected 32-bit platforms. * CLN now uses C++ exceptions for error handling. The cl_abort() hook is not supported any more. Please refer to the documentation to learn about existing exception types. * Fixed a bug on i386 where comparing Z/2Z ring zeros returnd random results. * Removed cl_boolean. Use built-in C++ bool instead. Other changes ------------- * Dropped the cln-config script. Please use pkg-config instead. * Updated infrastructure to that of libtool-1.5.24. * Changed encoding of all files to UTF-8. * Fix compilation issues with GCC-4.3. * Fix linking issues on platforms that don't feature weak symbols (like win32). 2006-08-08, version 1.1.13 ========================== * Compilation fixes for 64-bit brokenness introduced in last release. 2006-08-06, version 1.1.12 ========================== Implementation changes ---------------------- * Fix rare assertion when printing quite large floats. Other changes ------------- * Compilation fixes for several platforms: *BSD, Intel Mac, and MinGW. 2005-11-23, version 1.1.11 ========================== Algorithmic changes ------------------- * Considerably improved performance of number input. 2005-10-22, version 1.1.10 ========================== Implementation changes ---------------------- * Removed the vptr of modular integer and univariate polynomial classes in order to fix some crashes in that sector of CLN. Code using this needs to be recompiled. * Many more operator signatures make the integration of CLN types with float/double easier. Other changes ------------- * Several compilation fixes. * Made it possible to cross-compile CLN. 2004-11-03, version 1.1.9 ========================= Algorithmic changes ------------------- * Input of numbers in bases 2, 4, 8, 16 and 32 is now done in linear bit complexity as opposed to O(N^2). Useful for all kinds of persistency. Implementation changes ---------------------- * Fixed several bugs in the integer input and output routines that could be blamed for random crashes in the following cases: output in base 32 for quite large numbers, input in base 2 for fixnums and input in base 3 for fixnums on a 64 bit target. * Fixed crash when radix specifiers were used in input streams. * Speed up on x86_64 and ia64 by adding some inline assembly. Other changes ------------- * Fixes for compilation on MacOS X and little endian Mips. 2004-07-01, version 1.1.8 ========================= Implementation changes ---------------------- * Fix bug in log(a,b) when b is 1/n. * Fix crash in shared library on AMD64. Other changes ------------- * Fixes for some language conformance issues. 2004-05-02, version 1.1.7 ========================= Implementation changes ---------------------- * Fixed two corner case bugs in cl_LF multiplication and sqrt. * Workaround GCC 3.[123] compiler bug. * Parallel build should work reliably now. 2004-01-01, version 1.1.6 ========================= Functional changes ------------------ * New function `sintL ldegree(const cl_UP& x)'. (Suggested by Munagala Ramanath.) Implementation changes ---------------------- * Fixed a bug in polynomial subtraction. (Reported by Munagala Ramanath.) Other changes ------------- * Provide a package control file cln.pc. * Updated infrastructure to autoconf-2.57. * Fixed compilation issues with GCC-3.4 prereleases and on Mac OSX. 2002-05-28, version 1.1.5 ========================= Other changes ------------- * Fix compilation issues with GCC-3.1. 2002-01-04, version 1.1.4 ========================= Other changes ------------- * Fix compilation issues with GMP-4.0 and on IBM s390. * Updated infrastructure to autoconf-2.52. 2001-11-05, version 1.1.3 ========================= Implementation changes ---------------------- * Fix a computation error of sin and sinh for small arguments. (Reported by Christopher Kennedy.) * Module ordering works with gcc-3.0 -fuse-cxa-atexit now. * -DNO_ASM works properly on Sparc. 2001-07-25, version 1.1.2 Implementation changes ---------------------- * Minor cleanups and portability issues. (No need to upgrade if you have been happy so far.) 2001-05-31, version 1.1.1 ========================= Implementation changes ---------------------- * Minor cleanups for GCC 3.0 and libstdc++-v3. * Fixes several little bugs and portability issues. 2000-12-14, version 1.1.0 ========================= Functional changes ------------------ * ISO/IEC 14882 fashion adjustments: Put everything into namespace cln. All fundamental data types still carry their old names. Other non-macro identifiers are now written as cln::foo instead of cl_foo, except where the cl_ comes from a data type (as in cl_I_to_int()). Headers are installed into a separate directory, #include instead of . Applications must be manually ported to the new style. We apologize for the inconvenience. Implementation changes ---------------------- * Removed internal copy of mpn subdirectory tree from libgmp-2.0.2. Configuring with --with-gmp now relies on an installed libgmp library version 3 or above. We recommend libgmp-3.1 or newer. * Adjusted several break-even points to make better use of a faster libgmp and better match present-day CPUs. * Fix several errors for architectures with 64-bit wide words. (Others than Alpha, which worked already.) * Fix compilation errors with current GCC-3.0 snapshots. Other changes ------------- * Added package tools: script cln-config and autoconf macro AC_PATH_CLN (in file cln.m4). 2000-01-13, version 1.0.3 ========================= Functional changes ------------------ * New function `cl_I doublefactorial (uintL n)'. Implementation changes ---------------------- * Fix several little configuration errors. * Fix some compilation errors with gcc-2.96 prereleases. 1999-09-07, version 1.0.2 ========================= Functional changes ------------------ * New functions `cl_I numerator (const cl_RA&)' `cl_I denominator (const cl_RA&)'. Suggested by Richard Kreckel and Sylvain Pion. * New function `cl_equal_hashcode' for the classes cl_N, cl_R, cl_RA, cl_I, cl_F, cl_SF, cl_FF, cl_DF, cl_LF. Suggested by Richard Kreckel. Implementation changes ---------------------- * Fix an endless loop when either of the functions `cl_boolean rootp (const cl_RA&, uintL, cl_RA*)', `cl_boolean rootp (const cl_RA&, const cl_I&, cl_RA*)' was called with an integer argument. Thanks to Richard Kreckel. * Fix a bug in the addition and subtraction of rational numbers which could cause unnormalized rational numbers like 3/1 to be created. 1999-06-09, version 1.0.1 ========================= Algorithmic changes ------------------- * Speed up the functions `logand', `lognand', `logandc2'. Implementation changes ---------------------- * Fix compilation errors with gcc-2.7.2, egcs-1.1.2 and gcc-2.95. * Fix compilation errors on HPPA, MIPS, some versions of DEC Alpha, OpenBSD, and SPARC with LiDIA. * Fix compilation errors on Win32. Thanks to Mumit Khan. 1999-01-12, version 1.0 ======================= Functional changes ------------------ * New include files, containing I/O functions: The file now contains only I/O functions for characters and C integers. * To access the base ring of a univariate polynomial ring, now use `R->basering()' instead of `R->basering'. * Implement `plusp', `max', `min' for the classes cl_F, cl_SF, cl_FF, cl_DF, cl_LF, cl_RA, cl_I. * Implement `abs' for the class cl_RA. * Replaced `read_number' with specialized functions `read_complex', `read_real', `read_float', `read_rational', `read_integer'. * Replaced the functions `void fprint (cl_ostream stream, int x)' `void fprint (cl_ostream stream, unsigned int x)' `void fprint (cl_ostream stream, long x)' `void fprint (cl_ostream stream, unsigned long x)' with `void fprintdecimal (cl_ostream stream, int x)' `void fprintdecimal (cl_ostream stream, unsigned int x)' `void fprintdecimal (cl_ostream stream, long x)' `void fprintdecimal (cl_ostream stream, unsigned long x)' Algorithmic changes ------------------- * The function `cl_I xgcd (const cl_I& a, const cl_I& b, cl_I* u, cl_I* v)' now normalizes the resulting u and v to be of minimum absolute value. (Suggested by the LiDIA group.) * The conversion from string to cl_F, cl_R, cl_N now chooses the format of the resulting float depending on the number of significant digits present in the input string. * Speed up the functions `cl_R operator* (const cl_RA&, const cl_LF&)' `cl_R operator* (const cl_LF&, const cl_RA&)' `cl_R operator/ (const cl_RA&, const cl_LF&)' `cl_LF operator/ (const cl_LF&, const cl_RA&)' Implementation changes ---------------------- * Fix for `cl_I ash (const cl_I& x, const cl_I& n)' when |n| is between 2^29 and 2^37. (Reported by Thomas Papanikolaou.) * Fixed a memory leak in the long-float truncate function. (Reported by Keith Briggs.) * Fixed a memory leak in the modular integer exponentiation. * Reduced the stack space consumption. The default stack size (typically 8 MB on Unix) should now be sufficient in order to run all CLN programs. * Portability fixes for m68k platforms. (Reported and fixed by Roman Hodek.) Other changes ------------- * Restructured the sources. The subpackages - base - base + integer - base + integer + rational - base + integer + rational + float - base + integer + rational + float + real - base + integer + rational + float + real + complex - base + integer + modinteger are now self-contained. * The configuration script can be called with option `--enable-shared', to build CLN as a shared library. * Updated the LiDIA interface. 1998-05-07, version 0.98 ======================== Implementation changes ---------------------- * Portability fixes for 64-bit platforms like DEC Alpha. (Reported by John Cremona and Thomas Papanikolaou.) 1998-02-27 ========== Other changes ------------- * Portability fixes for new ISO/ANSI C++ compilers. * Updated the LiDIA interface for LiDIA version 1.3 and fixed a couple of bugs. 1997-09-06 ========== Implementation changes ---------------------- * Portability fix for i686 platforms. (Reported by Michael Pfeifer.) 1997-09-01 ========== Functional changes ------------------ * New include files: , declaring general rings, , , defining vectors, , defining univariate polynomial rings. Algorithmic changes ------------------- * Speed up the internal computation of ln(2) and ln(10) by about 20%. * Speed up the computation of exp (for 1000 digits or more) by about 10%. Implementation changes ---------------------- * Portability fix for 64-bit platforms like DEC Alpha: Fixed a bug: endless loop in `sqrt' for large precision. (Reported by Blake Jones.) * Portability fix for RS/6000 platforms. 1997-02-21 ========== Algorithmic changes ------------------- * Speed up the computation of the elementary transcendental functions: exp, sinh, cosh, asinh, atanh (for 100 digits) by about 30%, log (for 100 digits) by about 25%, sin, cos (for 1000 or 10000 digits) by about 20%, asin, acos, atan (for 1000 digits) by about 25%. Implementation changes ---------------------- * Portability fix for SunOS 4 and other BSD platforms. 1997-01-31 ========== Algorithmic changes ------------------- * Fixed a bug: endless recursion in `cl_boolean sqrtp (const cl_RA&, cl_RA*)'. * Fixed a bug: Only the first 85% of the digits returned by `cl_eulerconst' for moderate precision (< 11370 digits) were correct. (Reported by Thomas Papanikolaou.) Implementation changes ---------------------- * Fix static initialization order bug. Requires g++ 2.7.0 or newer (g++ 2.8.0 or newer on HPPA). * New method `debug_print()', for pretty printing of CLN objects, intended to be called from the debugger. 1997-01-07 ========== Functional changes ------------------ * New functions `float cl_float_approx (const cl_R&)', `double cl_double_approx (const cl_R&)' for converting a real number to a C `float' or `double'. Algorithmic changes ------------------- * Speed up `cl_zeta' using Cohen-Villegas-Zagier convergence acceleration. Implementation changes ---------------------- * New function `cl_print', for pretty printing of CLN objects, intended to be called from the debugger. * Portability fixes for 64-bit platforms like DEC Alpha. 1996-11-29 ========== Functional changes ------------------ * New include files: , defining strings, , defining symbols, , defining property lists, , defining conditions/exceptions. * New functions `cl_F cl_catalanconst ()', `cl_F cl_catalanconst (const cl_F&)', `cl_F cl_catalanconst (cl_float_format_t)' which return Catalan's constant. (Suggested by Thomas Papanikolaou.) * New functions `cl_F cl_zeta (int s)', `cl_F cl_zeta (int s, const cl_F&)', `cl_F cl_zeta (int s, cl_float_format_t)' which return the Riemann zeta function at an integral point s>1. * New functions `cl_F cl_exp1 ()', `cl_F cl_exp1 (const cl_F&)', `cl_F cl_exp1 (cl_float_format_t)' which return e = exp(1). * New function `cl_I binomial (uintL n, uintL k)' which returns the binomial coefficient (n choose k). * New functions `int cl_I_to_int (const cl_I&)', `unsigned int cl_I_to_uint (const cl_I&)', `long cl_I_to_long (const cl_I&)', `unsigned long cl_I_to_ulong (const cl_I&)' for converting an integer to a C `int' or `long'. * New functions `float cl_float_approx (const cl_I&)', `float cl_float_approx (const cl_RA&)', `double cl_double_approx (const cl_I&)', `double cl_double_approx (const cl_RA&)' for converting a rational number to a C `float' or `double'. Implementation changes ---------------------- * Moved the sources to subdirectories. (Suggested by Jörg Arndt.) Other changes ------------- * New benchmark for better comparing LiDIA, Pari and CLN. * Added an interface to LiDIA, allows using CLN as a replacement of libI. (Suggested by Thomas Papanikolaou.) * Added an ILOG Talk interface, for interactive use of the library. 1996-10-13 ========== Functional changes ------------------ * New include file , defining modular integer rings. * New functions `cl_F cl_eulerconst ()', `cl_F cl_eulerconst (const cl_F&)', `cl_F cl_eulerconst (cl_float_format_t)' which return Euler's constant. Algorithmic changes ------------------- * Speed up square root of large numbers by use of Newton's algorithm. * Speed up multiplication and division of large long-floats by small integers. * Speed up the computation of pi, e, exp, log, sin, cos, tan, sinh, cosh, tanh, asin, acos, atan, asinh, acosh, atanh. All of them are now computed with asymptotically fast algorithms, of bit complexity O(log(N)^2*M(N)) = O(N^(1+epsilon)) for N digits. * Fixed several bugs in the transcendental functions routines. In particular, the `log' function went into an endless loop. * Fixed a bug: The cl_I -> cl_DF and cl_I -> cl_LF conversions didn't work correctly for negative integers. 1996-09-08 ========== Functional changes ------------------ * New include file , containing number theoretic functions, for now only the Jacobi symbol. Algorithmic changes ------------------- * Speed up squaring of large numbers by 30%. * Speed up division of large numbers by use of Newton's algorithm. The improvement is noticeable for numbers with at least about 1000 words = 32000 bits = 10000 decimal digits. * Speed up the binary-to-decimal conversion of large numbers by use of a divide-and-conquer method. The improvement is noticeable for numbers of at least 1250 words = 40000 bits = 12000 decimal digits. * Fixed a bug: The functions `cl_boolean minusp (const type&)' and `cl_boolean zerop (const type&)' were missing for type=cl_I and type=cl_RA. * Fixed a bug: The function `cl_boolean logtest (const cl_I&, const cl_I&)' didn't work correctly if both arguments were bignums. * Fixed a bug: The function `cl_I mod (const cl_I&, const cl_I&)', when called as `mod(-n*m,m)' (n>0), returned m instead of 0. * Fixed a bug: The function `uintL power2p (const cl_I&)' returned wrong values for arguments x = 2^n, n >= 29. Implementation changes ---------------------- * Speed up CLN by using the low-level addition/subtraction, shift and multiplication loops from GNU gmp-2.0.2. * Fixed a severe reference counting bug in the constructors `type::type (const long)' and `type::type (const unsigned long)' for type=cl_number, type=cl_N, type=cl_RA, type=cl_I that most often caused a core dump. * CLN's word sequences can be chosen to be stored big-endian in memory (like it was up to now) or little-endian (needed for interfacing to GMP). 1996-05-20 ========== Functional changes ------------------ * New include file , contains timing facilities. Algorithmic changes ------------------- * Speed up the multiplication of large numbers by use of an FFT based algorithm (Schönhage-Strassen). The improvement is noticeable when both factors have at least 1250 words = 40000 bits = 12000 decimal digits. * Speed up the functions `cl_I gcd (const cl_I&, const cl_I&)' and `cl_I xgcd (const cl_I&, const cl_I&, cl_I*, cl_I*)' by a factor of 1.5. Simple trick. * Speed up the function `cl_boolean sqrtp (const cl_I&, cl_I*)' using a trick from Henri Cohen. * Fixed an endless loop in the function `uint32 gcd (uint32, uint32)' which occurred when one of the arguments is zero. * Fixed an endless loop in the function `cl_I factorial (uintL)'. Implementation changes ---------------------- * now uses iostreams by default instead of stdio FILE pointers. (Reported by Tito Flagella.) * Fixed linking error when compiling without -O. (Reported by Tito Flagella.) * Fixed syntax error in . (Reported by Tito Flagella.) * Fixed syntax errors in src/cl_DS.h and src/cl_FF_plus.h. (Reported by Marcus Daniels.) * More portability fixes. * Configuration now supports the --srcdir option. (Reported by Marcus Daniels.) 1996-01-03 ========== * Compiles well on Sparc, using gcc. * Mail to beta testers. 1995-12-06 ========== * Compiles well on Linux, using gcc. cln-1.3.3/ChangeLog0000644000000000000000000000011011201634735010724 0ustar This file is not here any more. Commit log messages are tracked by git. cln-1.3.3/cln.spec.in0000644000000000000000000000520611201634736011223 0ustar %define name cln %define version @CL_VERSION@ %define release 1 Summary: Class Library for Numbers Name: %{name} Version: %{version} Release: %{release} License: GPL Group: System Environment/Libraries Source0: %{name}-%{version}.tar.bz2 URL: http://www.ginac.de/CLN/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Prefix: %{_prefix} Requires(post): /sbin/install-info Requires(preun): /sbin/install-info BuildRequires: gcc-c++ %description A GPLed collection of math classes and functions, that will bring efficiency, type safety, algebraic syntax to everyone in a memory and speed efficient library. %package devel Summary: Development files for programs using the CLN library Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel This package is necessary if you wish to develop software based on the CLN library. %prep %setup -q %build %configure make %install rm -rf ${RPM_BUILD_ROOT} %makeinstall mkdir -p ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-devel-%{version} mv ${RPM_BUILD_ROOT}%{_datadir}/dvi/cln.dvi ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-devel-%{version} rmdir ${RPM_BUILD_ROOT}%{_datadir}/dvi mv ${RPM_BUILD_ROOT}%{_datadir}/html ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-devel-%{version} %clean rm -rf ${RPM_BUILD_ROOT} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %post devel /sbin/install-info --section="Math" --info-dir=%{_infodir} %{_infodir}/cln.info.gz %{_infodir}/dir 2>/dev/null || : %preun devel if [ "$1" = 0 ]; then /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cln.info.gz %{_infodir}/dir 2>/dev/null || : fi %files %defattr(-,root,root) %doc COPYING ChangeLog FILES NEWS README TODO* %{_libdir}/*.so.* %files devel %defattr(-,root,root) %{_defaultdocdir}/%{name}-devel-%{version} %{_libdir}/*.a %{_libdir}/*.la %{_libdir}/*.so %{_libdir}/pkgconfig/cln.pc %{_includedir}/cln %{_infodir}/*.info* %{_mandir}/man1/cln-config.1* %{_bindir}/cln-config %{_datadir}/aclocal/cln.m4 %changelog * Wed Jun 20 2007 Markus Grabner Source0 is bzip2-compressed * Tue Oct 25 2005 Christian Bauer - "Copyright:" -> "License:" - Fixed broken install-info command - Added missing BuildRequires - Added release to Requires for devel - Remove processing of info files (this is supposed to be automatic) * Thu Nov 20 2003 Christian Bauer Added pkg-config metadata file to devel package * Wed Nov 6 2002 Christian Bauer Added HTML and DVI docs to devel package * Tue Nov 5 2001 Christian Bauer Added Packager cln-1.3.3/COPYING0000644000000000000000000004336311201634735010226 0ustar GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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 Appendix: 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. Copyright (C) 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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) year 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. , 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. cln-1.3.3/configure0000755000000000000000000236313112172604010011071 0ustar #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for cln 1.3.3. # # # 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 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || 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@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'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &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='cln' PACKAGE_TARNAME='cln' PACKAGE_VERSION='1.3.3' PACKAGE_STRING='cln 1.3.3' PACKAGE_BUGREPORT='' PACKAGE_URL='' ac_unique_file="src/integer/gcd/cl_I_gcd.cc" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS CLNLIB_RPATH GMP_RPATH_CFG ALLOCA CL_VERSION LT_VERSION_INFO OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP SED LIBTOOL EGREP GREP host_os host_vendor host_cpu host build_os build_vendor build_cpu build am__fastdepCCAS_FALSE am__fastdepCCAS_TRUE CCASDEPMODE CCASFLAGS CCAS AS_UNDERSCORE CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX CPP 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 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_shared enable_static with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock with_gmp enable_rpath ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP CCAS CCASFLAGS' # 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_TARNAME}' 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 cln 1.3.3 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/cln] --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 case $ac_init_help in short | recursive ) echo "Configuration of cln 1.3.3:";; esac 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-shared[=PKGS] build shared libraries [default=no] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-rpath do not hardcode runtime library paths Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-gmp[=DIR] use external low-level functions from GNU MP (installed in prefix DIR) [default=yes]. --with-gnu-ld assume the C compiler uses GNU ld default=no Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor CCAS assembler compiler command (defaults to CC) CCASFLAGS assembler compiler flags (defaults to CFLAGS) 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 cln configure 1.3.3 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_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_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_cxx_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_cxx_try_compile # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_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_cxx_preproc_warn_flag$ac_cxx_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_cxx_try_cpp # 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_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_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_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 declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #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_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_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_cxx_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_cxx_try_link # ac_fn_cxx_try_run LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_cxx_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_cxx_try_run # ac_fn_cxx_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_cxx_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_cxx_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_cxx_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_cxx_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_cxx_check_header_mongrel # ac_fn_cxx_check_func LINENO FUNC VAR # ------------------------------------ # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_cxx_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 declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #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_cxx_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_cxx_check_func # ac_fn_cxx_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_cxx_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_cxx_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_cxx_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_cxx_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_cxx_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_cxx_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 #include 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_cxx_try_run "$LINENO"; then : echo >>conftest.val; read $3 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 cln $as_me 1.3.3, 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 ac_aux_dir= for ac_dir in autoconf "$srcdir"/autoconf; 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 autoconf \"$srcdir\"/autoconf" "$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. ac_config_headers="$ac_config_headers autoconf/cl_config.h include/cln/config.h include/cln/host_cpu.h include/cln/version.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/timing/cl_t_config.h" am__api_version='1.13' # 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='cln' VERSION='1.3.3' 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: # # 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 -' 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 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; 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}gcc" $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 fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; 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="gcc" $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 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 else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; 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}cc" $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 fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; 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 ac_prog_rejected=no 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 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $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 if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi 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 fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe 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 cl.exe 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 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 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 #include 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 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 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 to if __STDC__ is defined, since # 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 #else # include #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 _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 to if __STDC__ is defined, since # 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 #else # include #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 _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 ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # 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_CXX="$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 CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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_CXX="$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_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" 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 CXX=$ac_ct_CXX fi fi fi fi # 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 { $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_cxx_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_cxx_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_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_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_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi 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 depcc="$CXX" 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_CXX_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_CXX_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_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_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; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # 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 #else # include #endif Syntax error _ACEOF if ac_fn_cxx_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 _ACEOF if ac_fn_cxx_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_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # 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 #else # include #endif Syntax error _ACEOF if ac_fn_cxx_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 _ACEOF if ac_fn_cxx_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 \"$CXXCPP\" 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 underscore in external names" >&5 $as_echo_n "checking for underscore in external names... " >&6; } if ${cl_cv_prog_as_underscore+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.c <&5 (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } >/dev/null 2>&1 if grep _foo conftest.s >/dev/null ; then cl_cv_prog_as_underscore=yes else cl_cv_prog_as_underscore=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_prog_as_underscore" >&5 $as_echo "$cl_cv_prog_as_underscore" >&6; } if test $cl_cv_prog_as_underscore = yes; then AS_UNDERSCORE=true $as_echo "#define ASM_UNDERSCORE /**/" >>confdefs.h else AS_UNDERSCORE=false fi # By default we simply use the C compiler to build assembly code. test "${CCAS+set}" = set || CCAS=$CC test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS depcc="$CCAS" 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_CCAS_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_CCAS_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 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_CCAS_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CCAS_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 $as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then am__fastdepCCAS_TRUE= am__fastdepCCAS_FALSE='#' else am__fastdepCCAS_TRUE='#' am__fastdepCCAS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether --noexecstack is desirable for .s files" >&5 $as_echo_n "checking whether --noexecstack is desirable for .s files... " >&6; } if ${cl_cv_as_noexecstack+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.c <&5 (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } \ && grep -q .note.GNU-stack conftest.s \ && { ac_try='${CCAS} $CFLAGS $CPPFLAGS -Wa,--noexecstack -c -o conftest.o conftest.s >/dev/null' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } then cl_cv_as_noexecstack=yes else cl_cv_as_noexecstack=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_as_noexecstack" >&5 $as_echo "$cl_cv_as_noexecstack" >&6; } if test "$cl_cv_as_noexecstack" = yes; then CCASFLAGS="$CCASFLAGS -Wa,--noexecstack" fi # 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 ac_aux_dir=${srcdir}/autoconf ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" { $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" case "$host_cpu" in i[4567]86 ) host_cpu=i386 ;; alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] ) host_cpu=alpha ;; hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) host_cpu=hppa ;; powerpc ) host_cpu=rs6000 ;; c1 | c2 | c32 | c34 | c38 | c4 ) host_cpu=convex ;; arm* ) host_cpu=arm ;; mips ) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit MIPS" >&5 $as_echo_n "checking for 64-bit MIPS... " >&6; } if ${cl_cv_host_mips64+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined(_MIPS_SZLONG) #if (_MIPS_SZLONG == 64) /* We should also check for (_MIPS_SZPTR == 64), but gcc keeps this at 32. */ yes #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : cl_cv_host_mips64=yes else cl_cv_host_mips64=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_host_mips64" >&5 $as_echo "$cl_cv_host_mips64" >&6; } if test $cl_cv_host_mips64 = yes; then host_cpu=mips64 fi ;; sparc | sparc64 ) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit SPARC" >&5 $as_echo_n "checking for 64-bit SPARC... " >&6; } if ${cl_cv_host_sparc64+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined(__sparcv9) || defined(__arch64__) yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : cl_cv_host_sparc64=yes else cl_cv_host_sparc64=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_host_sparc64" >&5 $as_echo "$cl_cv_host_sparc64" >&6; } if test $cl_cv_host_sparc64 = yes; then host_cpu=sparc64 else host_cpu=sparc fi ;; i386 | x86_64 ) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit userland on x86-64" >&5 $as_echo_n "checking for 64-bit userland on x86-64... " >&6; } if ${cl_cv_host_x86_64+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if !defined __x86_64__ # error __x86_64__ not defined #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cl_cv_host_x86_64=yes else cl_cv_host_x86_64=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_host_x86_64" >&5 $as_echo "$cl_cv_host_x86_64" >&6; } if test $cl_cv_host_x86_64 = yes; then host_cpu=x86_64 else host_cpu=i386 fi ;; powerpc64 ) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit userland on PowerPC64" >&5 $as_echo_n "checking for 64-bit userland on PowerPC64... " >&6; } if ${cl_cv_host_powerpc64+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if !defined __powerpc64__ # error __powerpc64__ not defined #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cl_cv_host_powerpc64=yes else cl_cv_host_powerpc64=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_host_powerpc64" >&5 $as_echo "$cl_cv_host_powerpc64" >&6; } if test $cl_cv_host_powerpc64 = yes; then host_cpu=powerpc64 else host_cpu=rs6000 fi ;; esac cat >> confdefs.h <&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.2' macro_revision='1.3337' ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_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 do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_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 '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "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_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_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_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_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 fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_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 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "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_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_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_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" 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_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # 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_DUMPBIN="$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 DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" 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_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # 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_DUMPBIN="$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_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" 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 DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $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 # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; 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_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump" $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 OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; 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_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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_OBJDUMP="objdump" $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_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" 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 OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; 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_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # 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_DLLTOOL="${ac_tool_prefix}dlltool" $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 DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; 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_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # 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_DLLTOOL="dlltool" $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_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" 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 DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar 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_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # 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_AR="$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 AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar 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_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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_AR="$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_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" 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 AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi 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 test -z "$STRIP" && STRIP=: 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 test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else 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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; 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_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # 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_MANIFEST_TOOL="${ac_tool_prefix}mt" $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 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; 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_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # 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_MANIFEST_TOOL="mt" $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_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" 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 MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; 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_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # 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_DSYMUTIL="${ac_tool_prefix}dsymutil" $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 DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; 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_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # 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_DSYMUTIL="dsymutil" $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_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" 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 DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; 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_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # 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_NMEDIT="${ac_tool_prefix}nmedit" $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 NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; 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_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # 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_NMEDIT="nmedit" $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_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" 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 NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; 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_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # 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_LIPO="${ac_tool_prefix}lipo" $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 LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; 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_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # 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_LIPO="lipo" $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_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" 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 LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; 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_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # 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_OTOOL="${ac_tool_prefix}otool" $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 OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; 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_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # 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_OTOOL="otool" $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_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" 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 OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; 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_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # 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_OTOOL64="${ac_tool_prefix}otool64" $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 OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; 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_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # 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_OTOOL64="otool64" $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_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" 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 OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac { $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 #include #include #include 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 _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 _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 #include #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 # 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 dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" 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 # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $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 dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=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_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $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 shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=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_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $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 dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=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_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $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 dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=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_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $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 dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=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_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&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 CC="$lt_save_CC" if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_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; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # 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 #else # include #endif Syntax error _ACEOF if ac_fn_cxx_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 _ACEOF if ac_fn_cxx_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_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # 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 #else # include #endif Syntax error _ACEOF if ac_fn_cxx_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 _ACEOF if ac_fn_cxx_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 \"$CXXCPP\" 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 else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes 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_config_commands="$ac_config_commands libtool" # Only expand once: LT_VERSION_INFO=6:3:0 CL_VERSION_MAJOR=1 CL_VERSION_MINOR=3 CL_VERSION_PATCHLEVEL=3 cat >>confdefs.h <<_ACEOF #define CL_VERSION_MAJOR $CL_VERSION_MAJOR _ACEOF cat >>confdefs.h <<_ACEOF #define CL_VERSION_MINOR $CL_VERSION_MINOR _ACEOF cat >>confdefs.h <<_ACEOF #define CL_VERSION_PATCHLEVEL $CL_VERSION_PATCHLEVEL _ACEOF CL_VERSION=1.3.3 cat >>confdefs.h <<_ACEOF #define CL_VERSION $CL_VERSION _ACEOF ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long type" >&5 $as_echo_n "checking for long long type... " >&6; } if ${cl_cv_c_longlong+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ long long ll = 1LL; int i = 63; int main () { long long llmax = (long long) -1; return ll << i | ll >> i | llmax / ll | llmax % ll; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : cl_cv_c_longlong=yes else cl_cv_c_longlong=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() { /* long longs don't work right with gcc-2.7.2 on m68k */ /* long longs don't work right with gcc-2.7.2 on rs6000: avcall/tests.c gets miscompiled. */ #if defined(__m68k__) || (defined(_IBMR2) || defined(__powerpc)) #if defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ <= 7) exit(1); #endif #endif { long x = 944938507; long y = 737962842; long z = 162359677; exit(!(((long long) x)*((long long) y)>>32 == z)); } } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : cl_cv_c_longlong=yes else cl_cv_c_longlong=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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_c_longlong" >&5 $as_echo "$cl_cv_c_longlong" >&6; } if test $cl_cv_c_longlong = yes; then $as_echo "#define HAVE_LONGLONG /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double type" >&5 $as_echo_n "checking for long double type... " >&6; } if ${cl_cv_c_longdouble+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* The Stardent Vistra knows sizeof(long double), but does not support it. */ long double foo = 0.0; /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ int array [2*(sizeof(long double) >= sizeof(double)) - 1]; int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : cl_cv_c_longdouble=yes else cl_cv_c_longdouble=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() { long double x = 2.7182818284590452354L; x = x*x; exit (x==0.0L); } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : cl_cv_c_longdouble=yes else cl_cv_c_longdouble=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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_c_longdouble" >&5 $as_echo "$cl_cv_c_longdouble" >&6; } if test $cl_cv_c_longdouble = yes; then $as_echo "#define HAVE_LONGDOUBLE /**/" >>confdefs.h fi for ac_header in unistd.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNISTD_H 1 _ACEOF fi done # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if ${cl_cv_header_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *p = (char *) alloca(2 * sizeof(int)); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : cl_cv_header_alloca_h=yes else cl_cv_header_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_header_alloca_h" >&5 $as_echo "$cl_cv_header_alloca_h" >&6; } if test $cl_cv_header_alloca_h = yes; then $as_echo "#define HAVE_ALLOCA_H /**/" >>confdefs.h fi decl="#ifdef __GNUC__ #define alloca __builtin_alloca #else #ifdef _MSC_VER #include #define alloca _alloca #else #ifdef HAVE_ALLOCA_H #include #else #ifdef _AIX #pragma alloca #else #ifndef alloca char *alloca (); #endif #endif #endif #endif #endif " { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if ${cl_cv_func_alloca+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $decl int main () { char *p = (char *) alloca(1); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : cl_cv_func_alloca=yes else cl_cv_func_alloca=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_func_alloca" >&5 $as_echo "$cl_cv_func_alloca" >&6; } if test $cl_cv_func_alloca = yes; then : else alloca_missing=1 fi if test -n "$alloca_missing"; then # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=alloca.${ac_objext} $as_echo "#define NO_ALLOCA /**/" >>confdefs.h fi for ac_func in gettimeofday do : ac_fn_cxx_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" if test "x$ac_cv_func_gettimeofday" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETTIMEOFDAY 1 _ACEOF fi done if test $ac_cv_func_gettimeofday = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday declaration" >&5 $as_echo_n "checking for gettimeofday declaration... " >&6; } if ${cl_cv_proto_gettimeofday+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) int gettimeofday (struct timeval * tp, struct timezone * tzp); #else int gettimeofday(); #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : cl_cv_proto_gettimeofday_dots=no cl_cv_proto_gettimeofday_arg2="struct timezone *" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) int gettimeofday (struct timeval * tp, void * tzp); #else int gettimeofday(); #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : cl_cv_proto_gettimeofday_dots=no cl_cv_proto_gettimeofday_arg2="void *" else cl_cv_proto_gettimeofday_dots=yes cl_cv_proto_gettimeofday_arg2="..." fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cl_cv_proto_gettimeofday="extern int gettimeofday (struct timeval *, $cl_cv_proto_gettimeofday_arg2);" fi cl_cv_proto_gettimeofday=`echo "$cl_cv_proto_gettimeofday" | tr -s ' ' | sed -e 's/( /(/'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- }$cl_cv_proto_gettimeofday" >&5 $as_echo "${ac_t:- }$cl_cv_proto_gettimeofday" >&6; } if test $cl_cv_proto_gettimeofday_dots = yes; then $as_echo "#define GETTIMEOFDAY_DOTS /**/" >>confdefs.h else cat >>confdefs.h <<_ACEOF #define GETTIMEOFDAY_TZP_T $cl_cv_proto_gettimeofday_arg2 _ACEOF fi fi ac_cv_func_ftime=no if test $ac_cv_func_gettimeofday = no -a $ac_cv_func_ftime = no; then ac_fn_cxx_check_func "$LINENO" "times" "ac_cv_func_times" if test "x$ac_cv_func_times" = xyes; then : else no_times=1 fi if test -z "$no_times"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for times return value" >&5 $as_echo_n "checking for times return value... " >&6; } if ${cl_cv_func_times_return+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : cl_cv_func_times_return="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* needed for exit() */ #include #include /* needed for CLK_TCK */ #ifndef CLK_TCK #include /* needed for CLK_TCK on SYSV PTX */ #endif #include int main () { struct tms buffer; clock_t result1; clock_t result2; int ticks; result1 = times(&buffer); if ((result1 == (clock_t)0) || (result1 == (clock_t)(-1))) exit(1); sleep(1); result2 = times(&buffer); if ((result2 == (clock_t)0) || (result2 == (clock_t)(-1))) exit(1); ticks = result2 - result1; exit(!((ticks >= CLK_TCK/2) && (ticks <= 3*CLK_TCK/2))); } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : cl_cv_func_times_return=yes else cl_cv_func_times_return=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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_func_times_return" >&5 $as_echo "$cl_cv_func_times_return" >&6; } case "$cl_cv_func_times_return" in *yes) $as_echo "#define HAVE_TIMES_CLOCK /**/" >>confdefs.h ;; *no) ;; esac fi fi for ac_header in sys/resource.h sys/times.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_mongrel "$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 if test $ac_cv_header_sys_resource_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getrusage" >&5 $as_echo_n "checking for getrusage... " >&6; } if ${cl_cv_func_getrusage+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* NetBSD 1.0 needs this */ #include #include int main () { struct rusage x; int y = RUSAGE_SELF; getrusage(y,&x); x.ru_utime.tv_sec; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : cl_cv_func_getrusage=yes else cl_cv_func_getrusage=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_func_getrusage" >&5 $as_echo "$cl_cv_func_getrusage" >&6; } if test $cl_cv_func_getrusage = yes; then : fi if test $cl_cv_func_getrusage = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getrusage declaration" >&5 $as_echo_n "checking for getrusage declaration... " >&6; } if ${cl_cv_proto_getrusage+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef HAVE_UNISTD_H #include #endif #include /* NetBSD 1.0 needs this */ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) int getrusage (int who, struct rusage * rusage); #else int getrusage(); #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : cl_cv_proto_getrusage_arg1="int" else cl_cv_proto_getrusage_arg1="enum __rusage_who" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cl_cv_proto_getrusage="extern int getrusage ($cl_cv_proto_getrusage_arg1, struct rusage *);" fi cl_cv_proto_getrusage=`echo "$cl_cv_proto_getrusage" | tr -s ' ' | sed -e 's/( /(/'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- }$cl_cv_proto_getrusage" >&5 $as_echo "${ac_t:- }$cl_cv_proto_getrusage" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getrusage works" >&5 $as_echo_n "checking whether getrusage works... " >&6; } if ${cl_cv_func_getrusage_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : cl_cv_func_getrusage_works="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include /* NetBSD 1.0 needs this */ #include #include /* for time(2) */ #include int main () { struct rusage used, prev; time_t end = time(NULL)+2; int count = 0; if ((count = getrusage(RUSAGE_SELF, &prev))) { /* getrusage is defined but does not do anything. */ /*fprintf(stderr,"getrusage failed: return=%d\n",count);*/ return 1; } while (time(NULL) < end) { count++; getrusage(RUSAGE_SELF, &used); if ((used.ru_utime.tv_usec != prev.ru_utime.tv_usec) || (used.ru_utime.tv_sec != prev.ru_utime.tv_sec) || (used.ru_stime.tv_usec != prev.ru_stime.tv_usec) || (used.ru_stime.tv_sec != prev.ru_stime.tv_sec)) { /*fprintf(stderr,"success after %d runs\n",count);*/ return 0; } } /* getrusage is defined but does not work. */ /*fprintf(stderr,"failure after %d runs\n",count);*/ return 1; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : cl_cv_func_getrusage_works=yes else cl_cv_func_getrusage_works=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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_func_getrusage_works" >&5 $as_echo "$cl_cv_func_getrusage_works" >&6; } fi if test "$cl_cv_func_getrusage_works" = yes; then $as_echo "#define HAVE_GETRUSAGE /**/" >>confdefs.h cat >>confdefs.h <<_ACEOF #define RUSAGE_WHO_T $cl_cv_proto_getrusage_arg1 _ACEOF fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perror declaration" >&5 $as_echo_n "checking for perror declaration... " >&6; } if ${cl_cv_proto_perror+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Some systems declare perror() in , some in , some don't declare it at all. */ #include #include extern #ifdef __cplusplus "C" #endif double perror (); int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : cl_cv_proto_perror=no else cl_cv_proto_perror=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_proto_perror" >&5 $as_echo "$cl_cv_proto_perror" >&6; } if test $cl_cv_proto_perror = yes; then $as_echo "#define HAVE_PERROR_DECL /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports __attribute__((flatten))" >&5 $as_echo_n "checking whether the compiler supports __attribute__((flatten))... " >&6; } if ${cl_cv_have_attr_flatten+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.cc <&5 (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } then if grep -i "warning" conftest.stderr > /dev/null; then cl_cv_have_attr_flatten=no else cl_cv_have_attr_flatten=yes fi else cl_cv_have_attr_flatten=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_have_attr_flatten" >&5 $as_echo "$cl_cv_have_attr_flatten" >&6; } if test $cl_cv_have_attr_flatten = yes; then $as_echo "#define CL_HAVE_ATTRIBUTE_FLATTEN /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5 $as_echo_n "checking whether char is unsigned... " >&6; } if ${ac_cv_c_char_unsigned+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((char) -1) < 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_c_char_unsigned=no else ac_cv_c_char_unsigned=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5 $as_echo "$ac_cv_c_char_unsigned" >&6; } if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h fi if test ! -d include/cln; then as_dir=include/cln; as_fn_mkdir_p 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_cxx_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 #include 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_cxx_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 #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_cxx_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 defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_cxx_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 int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_cxx_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_cxx_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_cxx_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 cl_machine_file_c=${srcdir}/autoconf/intparam.c if test -z "$cl_cv_file_intparam_h"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for integer types and behaviour..." >&5 $as_echo "$as_me: checking for integer types and behaviour..." >&6;} if test $cross_compiling = no; then cl_machine_file_h=include/cln/intparam.h cat > conftest.$ac_ext <> conftest.$ac_ext ORIGCC="$CC" if test $ac_cv_c_compiler_gnu = yes; then # gcc -O (gcc version <= 2.3.2) crashes when compiling long long shifts for # target 80386. Strip "-O". CC=`echo "$CC " | sed -e 's/-O //g'` fi { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } CC="$ORIGCC" if test -s conftest${ac_exeext}; then echo "creating $cl_machine_file_h" ./conftest${ac_exeext} > conftest.h if cmp -s "$cl_machine_file_h" conftest.h 2>/dev/null; then # The file exists and we would not be changing it rm -f conftest.h else rm -f "$cl_machine_file_h" mv conftest.h "$cl_machine_file_h" fi cl_cv_file_intparam_h=1 else echo "creation of $cl_machine_file_h failed" fi rm -f conftest* else echo "creating $cl_machine_file_h" cl_machine_file_h=include/cln/intparam.h { n=1; x="(signed char)2" while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { typedef int verify[2*((signed char)($x) == 0) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : char_bitsize=$n; break; else if test $n = 1000; then char_bitsize=; break; fi; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n + 1`; x="$x * (signed char)2" done n=1; x="(short)2" while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { typedef int verify[2*((short)($x) == 0) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : short_bitsize=$n; break; else if test $n = 1000; then short_bitsize=; break; fi; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n + 1`; x="$x * (short)2" done n=1; x="(int)2" while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { typedef int verify[2*((int)($x) == 0) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : int_bitsize=$n; break; else if test $n = 1000; then int_bitsize=; break; fi; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n + 1`; x="$x * (int)2" done n=1; x="(long)2" while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { typedef int verify[2*((long)($x) == 0) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : long_bitsize=$n; break; else if test $n = 1000; then long_bitsize=; break; fi; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n + 1`; x="$x * (long)2" done if test $cl_cv_c_longlong = yes; then n=1; x="(long long)2" while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { typedef int verify[2*((long long)($x) == 0) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : longlong_bitsize=$n; break; else if test $n = 1000; then longlong_bitsize=; break; fi; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n + 1`; x="$x * (long long)2" done fi n=1; x="(unsigned char)2" while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { typedef int verify[2*((unsigned char)($x) == 0) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : uchar_bitsize=$n; break; else if test $n = 1000; then uchar_bitsize=; break; fi; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n + 1`; x="$x * (unsigned char)2" done n=1; x="(unsigned short)2" while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { typedef int verify[2*((unsigned short)($x) == 0) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ushort_bitsize=$n; break; else if test $n = 1000; then ushort_bitsize=; break; fi; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n + 1`; x="$x * (unsigned short)2" done n=1; x="(unsigned int)2" while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { typedef int verify[2*((unsigned int)($x) == 0) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : uint_bitsize=$n; break; else if test $n = 1000; then uint_bitsize=; break; fi; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n + 1`; x="$x * (unsigned int)2" done n=1; x="(unsigned long)2" while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { typedef int verify[2*((unsigned long)($x) == 0) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ulong_bitsize=$n; break; else if test $n = 1000; then ulong_bitsize=; break; fi; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n + 1`; x="$x * (unsigned long)2" done if test $cl_cv_c_longlong = yes; then n=1; x="(unsigned long long)2" while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { typedef int verify[2*((unsigned long long)($x) == 0) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ulonglong_bitsize=$n; break; else if test $n = 1000; then ulonglong_bitsize=; break; fi; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n + 1`; x="$x * (unsigned long long)2" done fi if test -n "$char_bitsize"; then echo "/* Integers of type char have $char_bitsize bits. */" echo "#define char_bitsize $char_bitsize" echo else echo "#error \"Integers of type char have no binary representation!!\"" fi if test -n "$short_bitsize"; then echo "/* Integers of type short have $short_bitsize bits. */" echo "#define short_bitsize $short_bitsize" echo else echo "#error \"Integers of type short have no binary representation!!\"" fi if test -n "$int_bitsize"; then echo "/* Integers of type int have $int_bitsize bits. */" echo "#define int_bitsize $int_bitsize" echo else echo "#error \"Integers of type int have no binary representation!!\"" fi if test -n "$long_bitsize"; then echo "/* Integers of type long have $long_bitsize bits. */" echo "#define long_bitsize $long_bitsize" echo else echo "#error \"Integers of type long have no binary representation!!\"" fi if test $cl_cv_c_longlong = yes; then if test -n "$longlong_bitsize"; then echo "/* Integers of type long long have $longlong_bitsize bits. */" echo "#define long_long_bitsize $longlong_bitsize" echo else echo "#error \"Integers of type long long have no binary representation!!\"" fi fi if test -n "$uchar_bitsize"; then echo "/* Integers of type unsigned char have $uchar_bitsize bits. */" echo else echo "#error \"Integers of type unsigned char have no binary representation!!\"" fi if test -n "$ushort_bitsize"; then echo "/* Integers of type unsigned short have $ushort_bitsize bits. */" echo else echo "#error \"Integers of type unsigned short have no binary representation!!\"" fi if test -n "$uint_bitsize"; then echo "/* Integers of type unsigned int have $uint_bitsize bits. */" echo else echo "#error \"Integers of type unsigned int have no binary representation!!\"" fi if test -n "$ulong_bitsize"; then echo "/* Integers of type unsigned long have $ulong_bitsize bits. */" echo else echo "#error \"Integers of type unsigned long have no binary representation!!\"" fi if test $cl_cv_c_longlong = yes; then if test -n "$ulonglong_bitsize"; then echo "/* Integers of type unsigned long long have $ulonglong_bitsize bits. */" echo else echo "#error \"Integers of type unsigned long long have no binary representation!!\"" fi fi if test "$char_bitsize" != "$uchar_bitsize"; then echo "#error \"Integer types char and unsigned char have different sizes!!\"" fi if test "$short_bitsize" != "$ushort_bitsize"; then echo "#error \"Integer types short and unsigned short have different sizes!!\"" fi if test "$int_bitsize" != "$uint_bitsize"; then echo "#error \"Integer types int and unsigned int have different sizes!!\"" fi if test "$long_bitsize" != "$ulong_bitsize"; then echo "#error \"Integer types long and unsigned long have different sizes!!\"" fi if test $cl_cv_c_longlong = yes; then if test "$longlong_bitsize" != "$ulonglong_bitsize"; then echo "#error \"Integer types long long and unsigned long long have different sizes!!\"" fi fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { typedef int verify[2*(sizeof(char*)<=sizeof (long))-1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else echo "#error \"Type char * does not fit into a long!!\"" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if ac_fn_cxx_compute_int "$LINENO" "sizeof (char *)" "pointer_size" ""; then : fi pointer_bitsize=`expr $pointer_size '*' $char_bitsize` echo "/* Pointers of type char * have $pointer_bitsize bits. */" echo "#define pointer_bitsize $pointer_bitsize" echo if ac_fn_cxx_compute_int "$LINENO" "sizeof(char)" "sizeof_char" ""; then : fi n=1 while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus # ifdef __GNUC__ # define alignof(type) __alignof__ (type) # else template struct alignof_helper { char slot1; type slot2; }; # define alignof(type) offsetof (alignof_helper, slot2) # endif #else # define alignof(type) offsetof (struct { char slot1; type slot2; }, slot2) #endif int main () { typedef int verify[2*(alignof(char) == $n) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : alignment_char=$n; break; if test $n = 0; then alignment_char=; break; fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n '*' 2` done echo "/* Type char has sizeof = $sizeof_char and alignment = $alignment_char. */" echo "#define sizeof_char $sizeof_char" echo "#define alignment_char $alignment_char" echo if ac_fn_cxx_compute_int "$LINENO" "sizeof(unsigned char)" "sizeof_uchar" ""; then : fi n=1 while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus # ifdef __GNUC__ # define alignof(type) __alignof__ (type) # else template struct alignof_helper { char slot1; type slot2; }; # define alignof(type) offsetof (alignof_helper, slot2) # endif #else # define alignof(type) offsetof (struct { char slot1; type slot2; }, slot2) #endif int main () { typedef int verify[2*(alignof(unsigned char) == $n) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : alignment_uchar=$n; break; if test $n = 0; then alignment_uchar=; break; fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n '*' 2` done echo "/* Type unsigned char has sizeof = $sizeof_uchar and alignment = $alignment_uchar. */" echo if ac_fn_cxx_compute_int "$LINENO" "sizeof(short)" "sizeof_short" ""; then : fi n=1 while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus # ifdef __GNUC__ # define alignof(type) __alignof__ (type) # else template struct alignof_helper { char slot1; type slot2; }; # define alignof(type) offsetof (alignof_helper, slot2) # endif #else # define alignof(type) offsetof (struct { char slot1; type slot2; }, slot2) #endif int main () { typedef int verify[2*(alignof(short) == $n) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : alignment_short=$n; break; if test $n = 0; then alignment_short=; break; fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n '*' 2` done echo "/* Type short has sizeof = $sizeof_short and alignment = $alignment_short. */" echo "#define sizeof_short $sizeof_short" echo "#define alignment_short $alignment_short" echo if ac_fn_cxx_compute_int "$LINENO" "sizeof(unsigned short)" "sizeof_ushort" ""; then : fi n=1 while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus # ifdef __GNUC__ # define alignof(type) __alignof__ (type) # else template struct alignof_helper { char slot1; type slot2; }; # define alignof(type) offsetof (alignof_helper, slot2) # endif #else # define alignof(type) offsetof (struct { char slot1; type slot2; }, slot2) #endif int main () { typedef int verify[2*(alignof(unsigned short) == $n) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : alignment_ushort=$n; break; if test $n = 0; then alignment_ushort=; break; fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n '*' 2` done echo "/* Type unsigned short has sizeof = $sizeof_ushort and alignment = $alignment_ushort. */" echo if ac_fn_cxx_compute_int "$LINENO" "sizeof(int)" "sizeof_int" ""; then : fi n=1 while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus # ifdef __GNUC__ # define alignof(type) __alignof__ (type) # else template struct alignof_helper { char slot1; type slot2; }; # define alignof(type) offsetof (alignof_helper, slot2) # endif #else # define alignof(type) offsetof (struct { char slot1; type slot2; }, slot2) #endif int main () { typedef int verify[2*(alignof(int) == $n) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : alignment_int=$n; break; if test $n = 0; then alignment_int=; break; fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n '*' 2` done echo "/* Type int has sizeof = $sizeof_int and alignment = $alignment_int. */" echo "#define sizeof_int $sizeof_int" echo "#define alignment_int $alignment_int" echo if ac_fn_cxx_compute_int "$LINENO" "sizeof(unsigned int)" "sizeof_uint" ""; then : fi n=1 while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus # ifdef __GNUC__ # define alignof(type) __alignof__ (type) # else template struct alignof_helper { char slot1; type slot2; }; # define alignof(type) offsetof (alignof_helper, slot2) # endif #else # define alignof(type) offsetof (struct { char slot1; type slot2; }, slot2) #endif int main () { typedef int verify[2*(alignof(unsigned int) == $n) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : alignment_uint=$n; break; if test $n = 0; then alignment_uint=; break; fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n '*' 2` done echo "/* Type unsigned int has sizeof = $sizeof_uint and alignment = $alignment_uint. */" echo if ac_fn_cxx_compute_int "$LINENO" "sizeof(long)" "sizeof_long" ""; then : fi n=1 while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus # ifdef __GNUC__ # define alignof(type) __alignof__ (type) # else template struct alignof_helper { char slot1; type slot2; }; # define alignof(type) offsetof (alignof_helper, slot2) # endif #else # define alignof(type) offsetof (struct { char slot1; type slot2; }, slot2) #endif int main () { typedef int verify[2*(alignof(long) == $n) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : alignment_long=$n; break; if test $n = 0; then alignment_long=; break; fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n '*' 2` done echo "/* Type long has sizeof = $sizeof_long and alignment = $alignment_long. */" echo "#define sizeof_long $sizeof_long" echo "#define alignment_long $alignment_long" echo if ac_fn_cxx_compute_int "$LINENO" "sizeof(unsigned long)" "sizeof_ulong" ""; then : fi n=1 while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus # ifdef __GNUC__ # define alignof(type) __alignof__ (type) # else template struct alignof_helper { char slot1; type slot2; }; # define alignof(type) offsetof (alignof_helper, slot2) # endif #else # define alignof(type) offsetof (struct { char slot1; type slot2; }, slot2) #endif int main () { typedef int verify[2*(alignof(unsigned long) == $n) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : alignment_ulong=$n; break; if test $n = 0; then alignment_ulong=; break; fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n '*' 2` done echo "/* Type unsigned long has sizeof = $sizeof_ulong and alignment = $alignment_ulong. */" echo if test $cl_cv_c_longlong = yes; then if ac_fn_cxx_compute_int "$LINENO" "sizeof(long long)" "sizeof_longlong" ""; then : fi n=1 while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus # ifdef __GNUC__ # define alignof(type) __alignof__ (type) # else template struct alignof_helper { char slot1; type slot2; }; # define alignof(type) offsetof (alignof_helper, slot2) # endif #else # define alignof(type) offsetof (struct { char slot1; type slot2; }, slot2) #endif int main () { typedef int verify[2*(alignof(long long) == $n) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : alignment_longlong=$n; break; if test $n = 0; then alignment_longlong=; break; fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n '*' 2` done echo "/* Type long long has sizeof = $sizeof_longlong and alignment = $alignment_longlong. */" echo "#define sizeof_long_long $sizeof_longlong" echo "#define alignment_long_long $alignment_longlong" echo if ac_fn_cxx_compute_int "$LINENO" "sizeof(unsigned long long)" "sizeof_ulonglong" ""; then : fi n=1 while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus # ifdef __GNUC__ # define alignof(type) __alignof__ (type) # else template struct alignof_helper { char slot1; type slot2; }; # define alignof(type) offsetof (alignof_helper, slot2) # endif #else # define alignof(type) offsetof (struct { char slot1; type slot2; }, slot2) #endif int main () { typedef int verify[2*(alignof(unsigned long long) == $n) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : alignment_ulonglong=$n; break; if test $n = 0; then alignment_ulonglong=; break; fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n '*' 2` done echo "/* Type unsigned long long has sizeof = $sizeof_ulonglong and alignment = $alignment_ulonglong. */" echo fi if ac_fn_cxx_compute_int "$LINENO" "sizeof(float)" "sizeof_float" ""; then : fi n=1 while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus # ifdef __GNUC__ # define alignof(type) __alignof__ (type) # else template struct alignof_helper { char slot1; type slot2; }; # define alignof(type) offsetof (alignof_helper, slot2) # endif #else # define alignof(type) offsetof (struct { char slot1; type slot2; }, slot2) #endif int main () { typedef int verify[2*(alignof(float) == $n) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : alignment_float=$n; break; if test $n = 0; then alignment_float=; break; fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n '*' 2` done echo "/* Type float has sizeof = $sizeof_float and alignment = $alignment_float. */" echo "#define sizeof_float $sizeof_float" echo "#define alignment_float $alignment_float" echo if ac_fn_cxx_compute_int "$LINENO" "sizeof(double)" "sizeof_double" ""; then : fi n=1 while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus # ifdef __GNUC__ # define alignof(type) __alignof__ (type) # else template struct alignof_helper { char slot1; type slot2; }; # define alignof(type) offsetof (alignof_helper, slot2) # endif #else # define alignof(type) offsetof (struct { char slot1; type slot2; }, slot2) #endif int main () { typedef int verify[2*(alignof(double) == $n) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : alignment_double=$n; break; if test $n = 0; then alignment_double=; break; fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n '*' 2` done echo "/* Type double has sizeof = $sizeof_double and alignment = $alignment_double. */" echo "#define sizeof_double $sizeof_double" echo "#define alignment_double $alignment_double" echo if test $cl_cv_c_longdouble = yes; then if ac_fn_cxx_compute_int "$LINENO" "sizeof(long double)" "sizeof_longdouble" ""; then : fi n=1 while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus # ifdef __GNUC__ # define alignof(type) __alignof__ (type) # else template struct alignof_helper { char slot1; type slot2; }; # define alignof(type) offsetof (alignof_helper, slot2) # endif #else # define alignof(type) offsetof (struct { char slot1; type slot2; }, slot2) #endif int main () { typedef int verify[2*(alignof(long double) == $n) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : alignment_longdouble=$n; break; if test $n = 0; then alignment_longdouble=; break; fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n '*' 2` done echo "/* Type long double has sizeof = $sizeof_longdouble and alignment = $alignment_longdouble. */" echo "#define sizeof_long_double $sizeof_longdouble" echo "#define alignment_long_double $alignment_longdouble" echo fi if ac_fn_cxx_compute_int "$LINENO" "sizeof(char *)" "sizeof_char_ptr" ""; then : fi n=1 while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus # ifdef __GNUC__ # define alignof(type) __alignof__ (type) # else template struct alignof_helper { char slot1; type slot2; }; # define alignof(type) offsetof (alignof_helper, slot2) # endif #else # define alignof(type) offsetof (struct { char slot1; type slot2; }, slot2) #endif int main () { typedef int verify[2*(alignof(char *) == $n) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : alignment_char_ptr=$n; break; if test $n = 0; then alignment_char_ptr=; break; fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n '*' 2` done echo "/* Type char * has sizeof = $sizeof_char_ptr and alignment = $alignment_char_ptr. */" echo if ac_fn_cxx_compute_int "$LINENO" "sizeof(long *)" "sizeof_long_ptr" ""; then : fi n=1 while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus # ifdef __GNUC__ # define alignof(type) __alignof__ (type) # else template struct alignof_helper { char slot1; type slot2; }; # define alignof(type) offsetof (alignof_helper, slot2) # endif #else # define alignof(type) offsetof (struct { char slot1; type slot2; }, slot2) #endif int main () { typedef int verify[2*(alignof(long *) == $n) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : alignment_long_ptr=$n; break; if test $n = 0; then alignment_long_ptr=; break; fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n '*' 2` done echo "/* Type long * has sizeof = $sizeof_long_ptr and alignment = $alignment_long_ptr. */" echo if ac_fn_cxx_compute_int "$LINENO" "sizeof(void (*)(void))" "sizeof_function_ptr" ""; then : fi n=1 while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus # ifdef __GNUC__ # define alignof(type) __alignof__ (type) # else template struct alignof_helper { char slot1; type slot2; }; # define alignof(type) offsetof (alignof_helper, slot2) # endif #else # define alignof(type) offsetof (struct { char slot1; type slot2; }, slot2) #endif int main () { typedef int verify[2*(alignof(void (*)(void)) == $n) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : alignment_function_ptr=$n; break; if test $n = 0; then alignment_function_ptr=; break; fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext n=`expr $n '*' 2` done echo "/* Type function * has sizeof = $sizeof_function_ptr and alignment = $alignment_function_ptr. */" echo case $ac_cv_c_bigendian in yes) echo "/* Type unsigned short is stored BIG-ENDIAN in memory (i.e. like mc68000 or sparc). */" echo "#define short_big_endian" echo "/* Type unsigned int is stored BIG-ENDIAN in memory (i.e. like mc68000 or sparc). */" echo "#define int_big_endian" echo "/* Type unsigned long is stored BIG-ENDIAN in memory (i.e. like mc68000 or sparc). */" echo "#define long_big_endian" if test $cl_cv_c_longlong = yes; then echo "/* Type unsigned long long is stored BIG-ENDIAN in memory (i.e. like mc68000 or sparc). */" echo "#define long_long_big_endian" fi ;; no) echo "/* Type unsigned short is stored LITTLE-ENDIAN in memory (i.e. like Z80 or VAX). */" echo "#define short_little_endian" echo "/* Type unsigned int is stored LITTLE-ENDIAN in memory (i.e. like Z80 or VAX). */" echo "#define int_little_endian" echo "/* Type unsigned long is stored LITTLE-ENDIAN in memory (i.e. like Z80 or VAX). */" echo "#define long_little_endian" if test $cl_cv_c_longlong = yes; then echo "/* Type unsigned long long is stored LITTLE-ENDIAN in memory (i.e. like Z80 or VAX). */" echo "#define long_long_little_endian" fi ;; *) echo "#error \"Type short is stored in memory in an obscure manner!!\"" echo "#error \"Type int is stored in memory in an obscure manner!!\"" echo "#error \"Type long is stored in memory in an obscure manner!!\"" if test $cl_cv_c_longlong = yes; then echo "#error \"Type long long is stored in memory in an obscure manner!!\"" fi ;; esac echo case $host_cpu in hppa) echo "/* Stack grows up. */" echo "#define stack_grows_up" ;; *) echo "/* Stack grows down. */" echo "#define stack_grows_down" ;; esac } > "$cl_machine_file_h" fi fi cl_machine_file_c=${srcdir}/autoconf/floatparam.c if test -z "$cl_cv_file_floatparam_h"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for floating-point types and behaviour..." >&5 $as_echo "$as_me: checking for floating-point types and behaviour..." >&6;} if test $cross_compiling = no; then cl_machine_file_h=include/cln/floatparam.h cat > conftest.$ac_ext <> conftest.$ac_ext ORIGCC="$CC" if test $ac_cv_c_compiler_gnu = yes; then # gcc -O (gcc version <= 2.3.2) crashes when compiling long long shifts for # target 80386. Strip "-O". CC=`echo "$CC " | sed -e 's/-O //g'` fi { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } CC="$ORIGCC" if test -s conftest${ac_exeext}; then echo "creating $cl_machine_file_h" ./conftest${ac_exeext} > conftest.h if cmp -s "$cl_machine_file_h" conftest.h 2>/dev/null; then # The file exists and we would not be changing it rm -f conftest.h else rm -f "$cl_machine_file_h" mv conftest.h "$cl_machine_file_h" fi cl_cv_file_floatparam_h=1 else echo "creation of $cl_machine_file_h failed" fi rm -f conftest* else echo "creating $cl_machine_file_h" cl_machine_file_h=include/cln/floatparam.h { echo "/* Rounding modes, for use below */" echo "#define rounds_to_nearest 0 /* 0.5 ulp */" echo "#define rounds_to_zero 1 /* 1 ulp */" echo "#define rounds_to_infinity 2 /* 1 ulp */" echo "#define rounds_to_minus_infinity 3 /* 1 ulp */" echo for type in float double "`if test $cl_cv_c_longdouble = yes; then echo 'long double'; fi`"; do if test -n "$type"; then epsilon_bits=-1; y="($type)1.0" while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { typedef int verify[2*( (($type)(($type)1.0 + ($type)($y)) == ($type)1.0) || ($type)(($type)(($type)1.0 + ($type)($y)) - ($type)1.0) != ($type)($y) ) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : break; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext epsilon_bits=`expr $epsilon_bits + 1`; y="$y * ($type)0.5" done negepsilon_bits=-1; y="($type)-1.0" while true; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { typedef int verify[2*( (($type)(($type)1.0 + ($type)($y)) == ($type)1.0) || ($type)(($type)(($type)1.0 + ($type)($y)) - ($type)1.0) != ($type)($y) ) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : break; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext negepsilon_bits=`expr $negepsilon_bits + 1`; y="$y * ($type)0.5" done echo "/* Properties of type \`$type': */" echo "/* Largest n for which 1+2^(-n) is exactly represented is $epsilon_bits. */" echo "/* Largest n for which 1-2^(-n) is exactly represented is $negepsilon_bits. */" if test `expr $negepsilon_bits '<=' $epsilon_bits` = 1; then echo "#error \"No exponent jump at 1.0 for type $type!\"" else if test `expr $negepsilon_bits '>' $epsilon_bits + 1` = 1; then echo "/* Base for type '$type' is 2^"`expr $negepsilon_bits - $epsilon_bits` fi echo "#define "`echo $type | sed -e 's, ,_,g'`"_mant_bits "`expr $epsilon_bits + 1` fi x="($type)1.0" i=$epsilon_bits while test $i != 0; do x="$x * ($type)0.5" i=`expr $i - 1` done x="($type)($x)" y1="($type)(($type)1.0 + ($type)5.0*$x)" y2="($type)(($type)1.0 + ($type)6.0*$x)" ys1="($type)(($type)1.0 + ($type)5.4*$x)" ys2="($type)(($type)1.0 + ($type)5.6*$x)" z1="($type)(($type)-1.0 + ($type)(-5.0)*$x)" z2="($type)(($type)-1.0 + ($type)(-6.0)*$x)" zs1="($type)(($type)-1.0 + ($type)(-5.4)*$x)" zs2="($type)(($type)-1.0 + ($type)(-5.6)*$x)" rounds= if test -z "$rounds"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { typedef int verify[2*( $ys1 == $y1 && $ys2 == $y2 && $zs1 == $z1 && $zs2 == $z2 ) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : rounds=rounds_to_nearest fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test -z "$rounds"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { typedef int verify[2*( $ys1 == $y1 && $ys2 == $y1 && $zs1 == $z1 && $zs2 == $z1 ) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : rounds=rounds_to_zero fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test -z "$rounds"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { typedef int verify[2*( $ys1 == $y2 && $ys2 == $y2 && $zs1 == $z1 && $zs2 == $z1 ) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : rounds=rounds_to_infinity fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test -z "$rounds"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { typedef int verify[2*( $ys1 == $y1 && $ys2 == $y1 && $zs1 == $z2 && $zs2 == $z2 ) - 1]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : rounds=rounds_to_minus_infinity fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test -n "$rounds"; then echo "#define "`echo $type | sed -e 's, ,_,g'`"_rounds $rounds" else echo "#error \"Unknown rounding mode for type $type!\"" fi echo fi done double_wordorder_bigendian_p= cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ double a[9] = { 0, 2.5479915693083957, 0, 1.4396527506122064e164, 0, 2.5495230282078065, 0, 1.4139248369879473e214, 0 }; int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : if grep LiTTle conftest.$ac_objext >/dev/null ; then double_wordorder_bigendian_p=0 else if grep bIgeN conftest.$ac_objext >/dev/null ; then double_wordorder_bigendian_p=1 fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test -n "$double_wordorder_bigendian_p"; then echo "#define double_wordorder_bigendian_p $double_wordorder_bigendian_p" else echo "/* Dazed and confused! Better not define anything. */" fi echo } > "$cl_machine_file_h" fi fi # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 $as_echo_n "checking for ld used by GCC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 $as_echo "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } if ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 $as_echo "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" libext="$acl_cv_libext" shlibext="$acl_cv_shlibext" hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_direct="$acl_cv_hardcode_direct" hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; : else enable_rpath=yes fi acl_libdirstem=lib searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi # Check whether --with-gmp was given. if test "${with_gmp+set}" = set; then : withval=$with_gmp; with_gmp="$withval" else with_gmp="yes" fi case $with_gmp in yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recent enough gmp.h" >&5 $as_echo_n "checking for recent enough gmp.h... " >&6; } if ${cl_cv_new_gmp_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if !defined(__GNU_MP_VERSION) || (__GNU_MP_VERSION < 3) #error "ancient gmp.h" #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : cl_cv_new_gmp_h="yes" else cl_cv_new_gmp_h="no" fi rm -f conftest.err conftest.i conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_new_gmp_h" >&5 $as_echo "$cl_cv_new_gmp_h" >&6; } if test "$cl_cv_new_gmp_h" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working libgmp" >&5 $as_echo_n "checking for working libgmp... " >&6; } if ${cl_cv_new_libgmp+:} false; then : $as_echo_n "(cached) " >&6 else SAVELIBS=$LIBS LIBS="$LIBS -lgmp" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { mpn_divexact_by3(0,0,0) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : cl_cv_new_libgmp="yes" else cl_cv_new_libgmp="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$SAVELIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_new_libgmp" >&5 $as_echo "$cl_cv_new_libgmp" >&6; } if test "$cl_cv_new_libgmp" = yes; then LIBS="$LIBS -lgmp" fi if test "$cl_cv_new_libgmp" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how large gmp demands uintD to be" >&5 $as_echo_n "checking how large gmp demands uintD to be... " >&6; } if ${cl_cv_gmp_set_uintd+:} false; then : $as_echo_n "(cached) " >&6 else cl_gmp_demands="UNKNOWN" cl_gmp_has_nails="no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include template struct Static_Assert; template<> struct Static_Assert { }; #if defined(__GMP_BITS_PER_MP_LIMB) Static_Assert<8*sizeof(mp_limb_t) == __GMP_BITS_PER_MP_LIMB> check; #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else cl_gmp_has_nails="yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$cl_gmp_has_nails" = "xyes"; then as_fn_error $? "nails in MP libms are unsupported." "$LINENO" 5 fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include template struct Static_Assert; template<> struct Static_Assert { }; Static_Assert<(sizeof(mp_limb_t) > sizeof(long))> check; int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : cl_gmp_demands='GMP_DEMANDS_UINTD_LONG_LONG' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$cl_gmp_demands" = "xUNKNOWN"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include template struct Static_Assert; template<> struct Static_Assert { }; Static_Assert check; int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : cl_gmp_demands='GMP_DEMANDS_UINTD_LONG' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x$cl_gmp_demands" = "xUNKNOWN"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include template struct Static_Assert; template<> struct Static_Assert { }; Static_Assert check; int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : cl_gmp_demands='GMP_DEMANDS_UINTD_INT' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x$cl_gmp_demands" = "xUNKNOWN"; then as_fn_error $? "Don't know which C-type has sizeof(mp_limb_t)" "$LINENO" 5 else cl_cv_gmp_set_uintd="$cl_gmp_demands" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_gmp_set_uintd" >&5 $as_echo "$cl_cv_gmp_set_uintd" >&6; } cat >>confdefs.h <<_ACEOF #define $cl_cv_gmp_set_uintd 1 _ACEOF $as_echo "#define CL_USE_GMP 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The GNU MP library is too old to be used." >&5 $as_echo "$as_me: WARNING: The GNU MP library is too old to be used." >&2;} fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The header file is too old to be used." >&5 $as_echo "$as_me: WARNING: The header file is too old to be used." >&2;} fi ;; no) ;; *) case $withval in [\\/$]* | ?:[\\/]* ) ;; *) as_fn_error $? "expected an absolute directory name for --with-gmp: $withval" "$LINENO" 5 ;; esac saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${withval}/include" saved_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L${withval}/lib" GMP_RPATH_CFG= if test "$enable_rpath" != no; then if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then rpathdirs= next= for opt in $LDFLAGS; do if test -n "$next"; then dir="$next" if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n """"; then for dir in $rpathdirs; do GMP_RPATH_CFG="${GMP_RPATH_CFG}${GMP_RPATH_CFG:+ }-R$dir" done else if test -n "$hardcode_libdir_separator"; then alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" GMP_RPATH_CFG="$flag" else for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" GMP_RPATH_CFG="${GMP_RPATH_CFG}${GMP_RPATH_CFG:+ }$flag" done fi fi fi fi fi LDFLAGS="$GMP_RPATH_CFG $LDFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: Using "\"$LDFLAGS\"" rpath to link with GMP" >&5 $as_echo "$as_me: Using "\"$LDFLAGS\"" rpath to link with GMP" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recent enough gmp.h" >&5 $as_echo_n "checking for recent enough gmp.h... " >&6; } if ${cl_cv_new_gmp_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if !defined(__GNU_MP_VERSION) || (__GNU_MP_VERSION < 3) #error "ancient gmp.h" #endif _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : cl_cv_new_gmp_h="yes" else cl_cv_new_gmp_h="no" fi rm -f conftest.err conftest.i conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_new_gmp_h" >&5 $as_echo "$cl_cv_new_gmp_h" >&6; } if test "$cl_cv_new_gmp_h" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working libgmp" >&5 $as_echo_n "checking for working libgmp... " >&6; } if ${cl_cv_new_libgmp+:} false; then : $as_echo_n "(cached) " >&6 else SAVELIBS=$LIBS LIBS="$LIBS -lgmp" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { mpn_divexact_by3(0,0,0) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : cl_cv_new_libgmp="yes" else cl_cv_new_libgmp="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$SAVELIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_new_libgmp" >&5 $as_echo "$cl_cv_new_libgmp" >&6; } if test "$cl_cv_new_libgmp" = yes; then LIBS="$LIBS -lgmp" fi if test "$cl_cv_new_libgmp" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how large gmp demands uintD to be" >&5 $as_echo_n "checking how large gmp demands uintD to be... " >&6; } if ${cl_cv_gmp_set_uintd+:} false; then : $as_echo_n "(cached) " >&6 else cl_gmp_demands="UNKNOWN" cl_gmp_has_nails="no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include template struct Static_Assert; template<> struct Static_Assert { }; #if defined(__GMP_BITS_PER_MP_LIMB) Static_Assert<8*sizeof(mp_limb_t) == __GMP_BITS_PER_MP_LIMB> check; #endif int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else cl_gmp_has_nails="yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$cl_gmp_has_nails" = "xyes"; then as_fn_error $? "nails in MP libms are unsupported." "$LINENO" 5 fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include template struct Static_Assert; template<> struct Static_Assert { }; Static_Assert<(sizeof(mp_limb_t) > sizeof(long))> check; int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : cl_gmp_demands='GMP_DEMANDS_UINTD_LONG_LONG' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$cl_gmp_demands" = "xUNKNOWN"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include template struct Static_Assert; template<> struct Static_Assert { }; Static_Assert check; int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : cl_gmp_demands='GMP_DEMANDS_UINTD_LONG' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x$cl_gmp_demands" = "xUNKNOWN"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include template struct Static_Assert; template<> struct Static_Assert { }; Static_Assert check; int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : cl_gmp_demands='GMP_DEMANDS_UINTD_INT' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x$cl_gmp_demands" = "xUNKNOWN"; then as_fn_error $? "Don't know which C-type has sizeof(mp_limb_t)" "$LINENO" 5 else cl_cv_gmp_set_uintd="$cl_gmp_demands" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cl_cv_gmp_set_uintd" >&5 $as_echo "$cl_cv_gmp_set_uintd" >&6; } cat >>confdefs.h <<_ACEOF #define $cl_cv_gmp_set_uintd 1 _ACEOF $as_echo "#define CL_USE_GMP 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The GNU MP library is too old to be used." >&5 $as_echo "$as_me: WARNING: The GNU MP library is too old to be used." >&2;} CPPFLAGS="$saved_CPPFLAGS" LDFLAGS="$saved_LDFLAGS" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The header file is too old to be used." >&5 $as_echo "$as_me: WARNING: The header file is too old to be used." >&2;} CPPFLAGS="$saved_CPPFLAGS" LDFLAGS="$saved_LDFLAGS" fi ;; esac CLNLIB_LIBS='-L${libdir} -lcln' CLNLIB_RPATH= if test "$enable_rpath" != no; then if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then rpathdirs= next= for opt in $CLNLIB_LIBS; do if test -n "$next"; then dir="$next" if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n """"; then for dir in $rpathdirs; do CLNLIB_RPATH="${CLNLIB_RPATH}${CLNLIB_RPATH:+ }-R$dir" done else if test -n "$hardcode_libdir_separator"; then alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" CLNLIB_RPATH="$flag" else for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" CLNLIB_RPATH="${CLNLIB_RPATH}${CLNLIB_RPATH:+ }$flag" done fi fi fi fi fi ac_config_files="$ac_config_files Makefile src/Makefile tests/Makefile examples/Makefile doc/Makefile benchmarks/Makefile cln.spec cln.pc" 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 "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCCAS\" 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 cln $as_me 1.3.3, 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="\\ cln config.status 1.3.3 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" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _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 "autoconf/cl_config.h") CONFIG_HEADERS="$CONFIG_HEADERS autoconf/cl_config.h" ;; "include/cln/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/cln/config.h" ;; "include/cln/host_cpu.h") CONFIG_HEADERS="$CONFIG_HEADERS include/cln/host_cpu.h" ;; "include/cln/version.h") CONFIG_HEADERS="$CONFIG_HEADERS include/cln/version.h" ;; "src/base/cl_base_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/base/cl_base_config.h" ;; "src/base/cl_gmpconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS src/base/cl_gmpconfig.h" ;; "src/timing/cl_t_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/timing/cl_t_config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "benchmarks/Makefile") CONFIG_FILES="$CONFIG_FILES benchmarks/Makefile" ;; "cln.spec") CONFIG_FILES="$CONFIG_FILES cln.spec" ;; "cln.pc") CONFIG_FILES="$CONFIG_FILES cln.pc" ;; *) 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` 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 ' >$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 ' >$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 } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; 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 cln-1.3.3/autoconf/0000755000000000000000000000000012173046202010773 5ustar cln-1.3.3/autoconf/floatparam.c0000644000000000000000000001040411201634736013272 0ustar /* Determine some float parameters, much like gcc's "enquire.c". */ /* Bruno Haible 24.8.1996 */ /* This program expects to be compiled by an ANSI C or C++ compiler. */ #include typedef int boolean; #define TRUE 1 #define FALSE 0 #ifdef HAVE_LONGDOUBLE typedef long double ldouble; #endif static void header (void) { printf("/* Rounding modes, for use below */\n"); printf("#define rounds_to_nearest 0 /* 0.5 ulp */\n"); printf("#define rounds_to_zero 1 /* 1 ulp */\n"); printf("#define rounds_to_infinity 2 /* 1 ulp */\n"); printf("#define rounds_to_minus_infinity 3 /* 1 ulp */\n"); printf("\n"); } #define check(type,typeprefix,typestr,equalfn,mainfn) \ static boolean equalfn (volatile type* x, volatile type* y); \ static void mainfn (void) \ { \ int mant_bits; \ int epsilon_bits = -1; \ int negepsilon_bits = -1; \ { type x = 1.0; type y; type z; \ for (y = 1.0; ; y = 0.5*y) \ { z = x + y; if (equalfn(&x,&z)) break; \ z = z - x; if (!equalfn(&y,&z)) break; \ epsilon_bits++; \ } } \ { type x = 1.0; type y; type z; \ for (y = -1.0; ; y = 0.5*y) \ { z = x + y; if (equalfn(&x,&z)) break; \ z = z - x; if (!equalfn(&y,&z)) break; \ negepsilon_bits++; \ } } \ printf("/* Properties of type `%s': */\n",typestr); \ printf("/* Largest n for which 1+2^(-n) is exactly represented is %d. */\n",epsilon_bits); \ printf("/* Largest n for which 1-2^(-n) is exactly represented is %d. */\n",negepsilon_bits); \ if (negepsilon_bits <= epsilon_bits) \ { printf("#error \"No exponent jump at 1.0 for type %s!\"\n",typestr); \ mant_bits = -1; \ } \ else \ { if (negepsilon_bits > epsilon_bits+1) \ printf("/* Base for type `%s' is 2^%d\n",typestr,negepsilon_bits-epsilon_bits); \ mant_bits = epsilon_bits+1; \ printf("#define %s_mant_bits %d\n",typeprefix,mant_bits); \ } \ { int i; type x, y1, y2, ys1, ys2, z1, z2, zs1, zs2; \ x = 1.0; for (i = 0; i < epsilon_bits; i++) { x = 0.5*x; } \ y1 = 1.0 + 5.0*x; y2 = 1.0 + 6.0*x; \ ys1 = 1.0 + 5.4*x; ys2 = 1.0 + 5.6*x; \ z1 = -1.0 + (-5.0)*x; z2 = -1.0 + (-6.0)*x; \ zs1 = -1.0 + (-5.4)*x; zs2 = -1.0 + (-5.6)*x; \ if (equalfn(&ys1,&y1) && equalfn(&ys2,&y2) && equalfn(&zs1,&z1) && equalfn(&zs2,&z2)) \ printf("#define %s_rounds rounds_to_nearest\n",typeprefix); \ else if (equalfn(&ys1,&y1) && equalfn(&ys2,&y1) && equalfn(&zs1,&z1) && equalfn(&zs2,&z1)) \ printf("#define %s_rounds rounds_to_zero\n",typeprefix); \ else if (equalfn(&ys1,&y2) && equalfn(&ys2,&y2) && equalfn(&zs1,&z1) && equalfn(&zs2,&z1)) \ printf("#define %s_rounds rounds_to_infinity\n",typeprefix); \ else if (equalfn(&ys1,&y1) && equalfn(&ys2,&y1) && equalfn(&zs1,&z2) && equalfn(&zs2,&z2)) \ printf("#define %s_rounds rounds_to_minus_infinity\n",typeprefix); \ else \ printf("#error \"Unknown rounding mode for type %s!\"\n",typestr); \ } \ printf("\n"); \ } \ static boolean equalfn (volatile type* x, volatile type* y) \ { \ return *x == *y; \ } \ check(float,"float","float",equal_float,main_float) check(double,"double","double",equal_double,main_double) #ifdef HAVE_LONGDOUBLE check(ldouble,"long_double","long double",equal_ldouble,main_ldouble) #endif /* Some systems (arm/linux) store doubles as little endian but with higher * and lower word reversed. */ static void flipped_double (void) { typedef struct { unsigned lo, hi; } dfloat; union { dfloat eksplicit; double machine_double; } x; x.machine_double = 2; dfloat test = x.eksplicit; if (test.lo==0 && test.hi!=0) { printf("#define double_wordorder_bigendian_p 0\n"); } else if (test.lo!=0 && test.hi==0) { printf("#define double_wordorder_bigendian_p 1\n"); } else { /* Dazed and confused! Better not define anything. * Code should rely on CL_CPU_BIG_ENDIAN_P instead. */ } printf("\n"); } int main() { header(); main_float(); main_double(); #ifdef HAVE_LONGDOUBLE main_ldouble(); #endif flipped_double(); if (ferror(stdout) || fclose(stdout)) return 1; return 0; } cln-1.3.3/autoconf/config.sub0000755000000000000000000010530112172603767012774 0ustar #! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-04-24' # 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 . # # 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@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 ." version="\ GNU config.sub ($timestamp) Copyright 1992-2013 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 | 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 \ | 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 \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | 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 | 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-* \ | 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-* \ | 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-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | 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=i386-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 ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i386-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* \ | -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*) # 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 ;; 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 ;; or1k-*) 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: cln-1.3.3/autoconf/config.guess0000755000000000000000000013014512172603767013335 0ustar #! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-05-16' # 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 . # # 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@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 ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2013 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@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 #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'` ;; 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@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 /* 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 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 #include 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 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 ;; i*: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; } ;; or1k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; or32: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 ;; 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' /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 echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@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 [ "$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 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 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < 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: cln-1.3.3/autoconf/texinfo.tex0000644000000000000000000116703612172603767013225 0ustar % texinfo.tex -- TeX macros to handle Texinfo files. % % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % \def\texinfoversion{2013-02-01.11} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, % 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. % % This texinfo.tex 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 texinfo.tex file 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 . % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without % restriction. This Exception is an additional permission under section 7 % of the GNU General Public License, version 3 ("GPLv3"). % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: % http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or % http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or % http://www.gnu.org/software/texinfo/ (the Texinfo home page) % The texinfo.tex in any given distribution could well be out % of date, so if that's what you're using, please check. % % Send bug reports to bug-texinfo@gnu.org. Please include including a % complete document in each bug report with which we can reproduce the % problem. Patches are, of course, greatly appreciated. % % To process a Texinfo manual with TeX, it's most reliable to use the % texi2dvi shell script that comes with the distribution. For a simple % manual foo.texi, however, you can get away with this: % tex foo.texi % texindex foo.?? % tex foo.texi % tex foo.texi % dvips foo.dvi -o # or whatever; this makes foo.ps. % The extra TeX runs get the cross-reference information correct. % Sometimes one run after texindex suffices, and sometimes you need more % than two; texi2dvi does it as many times as necessary. % % It is possible to adapt texinfo.tex for other languages, to some % extent. You can get the existing language-specific files from the % full Texinfo distribution. % % The GNU Texinfo home page is http://www.gnu.org/software/texinfo. \message{Loading texinfo [version \texinfoversion]:} % If in a .fmt file, print the version number % and turn on active characters that we couldn't do earlier because % they might have appeared in the input file name. \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. % For @tex, we can use \tabalign. \let\+ = \relax % Save some plain tex macros whose names we will redefine. \let\ptexb=\b \let\ptexbullet=\bullet \let\ptexc=\c \let\ptexcomma=\, \let\ptexdot=\. \let\ptexdots=\dots \let\ptexend=\end \let\ptexequiv=\equiv \let\ptexexclam=\! \let\ptexfootnote=\footnote \let\ptexgtr=> \let\ptexhat=^ \let\ptexi=\i \let\ptexindent=\indent \let\ptexinsert=\insert \let\ptexlbrace=\{ \let\ptexless=< \let\ptexnewwrite\newwrite \let\ptexnoindent=\noindent \let\ptexplus=+ \let\ptexraggedright=\raggedright \let\ptexrbrace=\} \let\ptexslash=\/ \let\ptexstar=\* \let\ptext=\t \let\ptextop=\top {\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode % If this character appears in an error message or help string, it % starts a new line in the output. \newlinechar = `^^J % Use TeX 3.0's \inputlineno to get the line number, for better error % messages, but if we're using an old version of TeX, don't do anything. % \ifx\inputlineno\thisisundefined \let\linenumber = \empty % Pre-3.0. \else \def\linenumber{l.\the\inputlineno:\space} \fi % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi \ifx\putworderror\undefined \gdef\putworderror{error}\fi \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi \ifx\putwordin\undefined \gdef\putwordin{in}\fi \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi \ifx\putwordof\undefined \gdef\putwordof{of}\fi \ifx\putwordon\undefined \gdef\putwordon{on}\fi \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi % \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi % \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi % Since the category of space is not known, we have to be careful. \chardef\spacecat = 10 \def\spaceisspace{\catcode`\ =\spacecat} % sometimes characters are active, so we need control sequences. \chardef\ampChar = `\& \chardef\colonChar = `\: \chardef\commaChar = `\, \chardef\dashChar = `\- \chardef\dotChar = `\. \chardef\exclamChar= `\! \chardef\hashChar = `\# \chardef\lquoteChar= `\` \chardef\questChar = `\? \chardef\rquoteChar= `\' \chardef\semiChar = `\; \chardef\slashChar = `\/ \chardef\underChar = `\_ % Ignore a token. % \def\gobble#1{} % The following is used inside several \edef's. \def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} % Hyphenation fixes. \hyphenation{ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script ap-pen-dix bit-map bit-maps data-base data-bases eshell fall-ing half-way long-est man-u-script man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces spell-ing spell-ings stand-alone strong-est time-stamp time-stamps which-ever white-space wide-spread wrap-around } % Margin to add to right of even pages, to left of odd pages. \newdimen\bindingoffset \newdimen\normaloffset \newdimen\pagewidth \newdimen\pageheight % For a final copy, take out the rectangles % that mark overfull boxes (in case you have decided % that the text looks ok even though it passes the margin). % \def\finalout{\overfullrule=0pt } % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, % since that produces some useless output on the terminal. We also make % some effort to order the tracing commands to reduce output in the log % file; cf. trace.sty in LaTeX. % \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% \def\loggingall{% \tracingstats2 \tracingpages1 \tracinglostchars2 % 2 gives us more in etex \tracingparagraphs1 \tracingoutput1 \tracingmacros2 \tracingrestores1 \showboxbreadth\maxdimen \showboxdepth\maxdimen \ifx\eTeXversion\thisisundefined\else % etex gives us more logging \tracingscantokens1 \tracingifs1 \tracinggroups1 \tracingnesting2 \tracingassigns1 \fi \tracingcommands3 % 3 gives us more in etex \errorcontextlines16 }% % @errormsg{MSG}. Do the index-like expansions on MSG, but if things % aren't perfect, it's not the end of the world, being an error message, % after all. % \def\errormsg{\begingroup \indexnofonts \doerrormsg} \def\doerrormsg#1{\errmessage{#1}} % add check for \lastpenalty to plain's definitions. If the last thing % we did was a \nobreak, we don't want to insert more space. % \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount \removelastskip\penalty-50\smallskip\fi\fi} \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount \removelastskip\penalty-100\medskip\fi\fi} \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount \removelastskip\penalty-200\bigskip\fi\fi} % Do @cropmarks to get crop marks. % \newif\ifcropmarks \let\cropmarks = \cropmarkstrue % % Dimensions to add cropmarks at corners. % Added by P. A. MacKay, 12 Nov. 1986 % \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines \newdimen\cornerlong \cornerlong=1pc \newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in % Output a mark which sets \thischapter, \thissection and \thiscolor. % We dump everything together because we only have one kind of mark. % This works because we only use \botmark / \topmark, not \firstmark. % % A mark contains a subexpression of the \ifcase ... \fi construct. % \get*marks macros below extract the needed part using \ifcase. % % Another complication is to let the user choose whether \thischapter % (\thissection) refers to the chapter (section) in effect at the top % of a page, or that at the bottom of a page. The solution is % described on page 260 of The TeXbook. It involves outputting two % marks for the sectioning macros, one before the section break, and % one after. I won't pretend I can describe this better than DEK... \def\domark{% \toks0=\expandafter{\lastchapterdefs}% \toks2=\expandafter{\lastsectiondefs}% \toks4=\expandafter{\prevchapterdefs}% \toks6=\expandafter{\prevsectiondefs}% \toks8=\expandafter{\lastcolordefs}% \mark{% \the\toks0 \the\toks2 \noexpand\or \the\toks4 \the\toks6 \noexpand\else \the\toks8 }% } % \topmark doesn't work for the very first chapter (after the title % page or the contents), so we use \firstmark there -- this gets us % the mark with the chapter defs, unless the user sneaks in, e.g., % @setcolor (or @url, or @link, etc.) between @contents and the very % first @chapter. \def\gettopheadingmarks{% \ifcase0\topmark\fi \ifx\thischapter\empty \ifcase0\firstmark\fi \fi } \def\getbottomheadingmarks{\ifcase1\botmark\fi} \def\getcolormarks{\ifcase2\topmark\fi} % Avoid "undefined control sequence" errors. \def\lastchapterdefs{} \def\lastsectiondefs{} \def\prevchapterdefs{} \def\prevsectiondefs{} \def\lastcolordefs{} % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} \newbox\headlinebox \newbox\footlinebox % \onepageout takes a vbox as an argument. Note that \pagecontents % does insertions, but you have to call it yourself. \def\onepageout#1{% \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi % \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% % {% % Have to do this stuff outside the \shipout because we want it to % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % \indexdummies % don't expand commands in the output. \normalturnoffactive % \ in index entries must not stay \, e.g., if % the page break happens to be in the middle of an example. % We don't want .vr (or whatever) entries like this: % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} % "\acronym" won't work when it's read back in; % it needs to be % {\code {{\tt \backslashcurfont }acronym} \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi % \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize \vskip-\topandbottommargin \vtop to0pt{% \line{\ewtop\hfil\ewtop}% \nointerlineskip \line{% \vbox{\moveleft\cornerthick\nstop}% \hfill \vbox{\moveright\cornerthick\nstop}% }% \vss}% \vskip\topandbottommargin \line\bgroup \hfil % center the page within the outer (page) hsize. \ifodd\pageno\hskip\bindingoffset\fi \vbox\bgroup \fi % \unvbox\headlinebox \pagebody{#1}% \ifdim\ht\footlinebox > 0pt % Only leave this space if the footline is nonempty. % (We lessened \vsize for it in \oddfootingyyy.) % The \baselineskip=24pt in plain's \makefootline has no effect. \vskip 24pt \unvbox\footlinebox \fi % \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup \vskip\topandbottommargin plus1fill minus1fill \boxmaxdepth = \cornerthick \vbox to0pt{\vss \line{% \vbox{\moveleft\cornerthick\nsbot}% \hfill \vbox{\moveright\cornerthick\nsbot}% }% \nointerlineskip \line{\ewbot\hfil\ewbot}% }% \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox }% end of group with \indexdummies \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } \newinsert\margin \dimen\margin=\maxdimen \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} {\catcode`\@ =11 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi % marginal hacks, juha@viisa.uucp (Juha Takala) \ifvoid\margin\else % marginal info is present \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi \dimen@=\dp#1\relax \unvbox#1\relax \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } % Here are the rules for the cropmarks. Note that they are % offset so that the space between them is truly \outerhsize or \outervsize % (P. A. MacKay, 12 November, 1986) % \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} \def\nstop{\vbox {\hrule height\cornerthick depth\cornerlong width\cornerthick}} \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} \def\nsbot{\vbox {\hrule height\cornerlong depth\cornerthick width\cornerthick}} % Parse an argument, then pass it to #1. The argument is the rest of % the input line (except we remove a trailing comment). #1 should be a % macro which expects an ordinary undelimited TeX argument. % \def\parsearg{\parseargusing{}} \def\parseargusing#1#2{% \def\argtorun{#2}% \begingroup \obeylines \spaceisspace #1% \parseargline\empty% Insert the \empty token, see \finishparsearg below. } {\obeylines % \gdef\parseargline#1^^M{% \endgroup % End of the group started in \parsearg. \argremovecomment #1\comment\ArgTerm% }% } % First remove any @comment, then any @c comment. \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} % Each occurrence of `\^^M' or `\^^M' is replaced by a single space. % % \argremovec might leave us with trailing space, e.g., % @end itemize @c foo % This space token undergoes the same procedure and is eventually removed % by \finishparsearg. % \def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} \def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% \def\temp{#3}% \ifx\temp\empty % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: \let\temp\finishparsearg \else \let\temp\argcheckspaces \fi % Put the space token in: \temp#1 #3\ArgTerm } % If a _delimited_ argument is enclosed in braces, they get stripped; so % to get _exactly_ the rest of the line, we had to prevent such situation. % We prepended an \empty token at the very beginning and we expand it now, % just before passing the control to \argtorun. % (Similarly, we have to think about #3 of \argcheckspacesY above: it is % either the null string, or it ends with \^^M---thus there is no danger % that a pair of braces would be stripped. % % But first, we have to remove the trailing space token. % \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} % \parseargdef\foo{...} % is roughly equivalent to % \def\foo{\parsearg\Xfoo} % \def\Xfoo#1{...} % % Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my % favourite TeX trick. --kasal, 16nov03 \def\parseargdef#1{% \expandafter \doparseargdef \csname\string#1\endcsname #1% } \def\doparseargdef#1#2{% \def#2{\parsearg#1}% \def#1##1% } % Several utility definitions with active space: { \obeyspaces \gdef\obeyedspace{ } % Make each space character in the input produce a normal interword % space in the output. Don't allow a line break at this space, as this % is used only in environments like @example, where each line of input % should produce a line of output anyway. % \gdef\sepspaces{\obeyspaces\let =\tie} % If an index command is used in an @example environment, any spaces % therein should become regular spaces in the raw index file, not the % expansion of \tie (\leavevmode \penalty \@M \ ). \gdef\unsepspaces{\let =\space} } \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} % Define the framework for environments in texinfo.tex. It's used like this: % % \envdef\foo{...} % \def\Efoo{...} % % It's the responsibility of \envdef to insert \begingroup before the % actual body; @end closes the group after calling \Efoo. \envdef also % defines \thisenv, so the current environment is known; @end checks % whether the environment name matches. The \checkenv macro can also be % used to check whether the current environment is the one expected. % % Non-false conditionals (@iftex, @ifset) don't fit into this, so they % are not treated as environments; they don't open a group. (The % implementation of @end takes care not to call \endgroup in this % special case.) % At run-time, environments start with this: \def\startenvironment#1{\begingroup\def\thisenv{#1}} % initialize \let\thisenv\empty % ... but they get defined via ``\envdef\foo{...}'': \long\def\envdef#1#2{\def#1{\startenvironment#1#2}} \def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} % Check whether we're in the right environment: \def\checkenv#1{% \def\temp{#1}% \ifx\thisenv\temp \else \badenverr \fi } % Environment mismatch, #1 expected: \def\badenverr{% \errhelp = \EMsimple \errmessage{This command can appear only \inenvironment\temp, not \inenvironment\thisenv}% } \def\inenvironment#1{% \ifx#1\empty outside of any environment% \else in environment \expandafter\string#1% \fi } % @end foo executes the definition of \Efoo. % But first, it executes a specialized version of \checkenv % \parseargdef\end{% \if 1\csname iscond.#1\endcsname \else % The general wording of \badenverr may not be ideal. \expandafter\checkenv\csname#1\endcsname \csname E#1\endcsname \endgroup \fi } \newhelp\EMsimple{Press RETURN to continue.} % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space % at the beginning of a line will start with \penalty -- and % since \penalty is valid in vertical mode, we'd end up putting the % penalty on the vertical list instead of in the new paragraph. {\catcode`@ = 11 % Avoid using \@M directly, because that causes trouble % if the definition is written into an index file. \global\let\tiepenalty = \@M \gdef\tie{\leavevmode\penalty\tiepenalty\ } } % @: forces normal size whitespace following. \def\:{\spacefactor=1000 } % @* forces a line break. \def\*{\unskip\hfil\break\hbox{}\ignorespaces} % @/ allows a line break. \let\/=\allowbreak % @. is an end-of-sentence period. \def\.{.\spacefactor=\endofsentencespacefactor\space} % @! is an end-of-sentence bang. \def\!{!\spacefactor=\endofsentencespacefactor\space} % @? is an end-of-sentence query. \def\?{?\spacefactor=\endofsentencespacefactor\space} % @frenchspacing on|off says whether to put extra space after punctuation. % \def\onword{on} \def\offword{off} % \parseargdef\frenchspacing{% \def\temp{#1}% \ifx\temp\onword \plainfrenchspacing \else\ifx\temp\offword \plainnonfrenchspacing \else \errhelp = \EMsimple \errmessage{Unknown @frenchspacing option `\temp', must be on|off}% \fi\fi } % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would % produce a whole line of output instead of starting the paragraph. \def\w#1{\leavevmode\hbox{#1}} % @group ... @end group forces ... to be all on one page, by enclosing % it in a TeX vbox. We use \vtop instead of \vbox to construct the box % to keep its height that of a normal line. According to the rules for % \topskip (p.114 of the TeXbook), the glue inserted is % max (\topskip - \ht (first item), 0). If that height is large, % therefore, no glue is inserted, and the space between the headline and % the text is small, which looks bad. % % Another complication is that the group might be very large. This can % cause the glue on the previous page to be unduly stretched, because it % does not have much material. In this case, it's better to add an % explicit \vfill so that the extra space is at the bottom. The % threshold for doing this is if the group is more than \vfilllimit % percent of a page (\vfilllimit can be changed inside of @tex). % \newbox\groupbox \def\vfilllimit{0.7} % \envdef\group{% \ifnum\catcode`\^^M=\active \else \errhelp = \groupinvalidhelp \errmessage{@group invalid in context where filling is enabled}% \fi \startsavinginserts % \setbox\groupbox = \vtop\bgroup % Do @comment since we are called inside an environment such as % @example, where each end-of-line in the input causes an % end-of-line in the output. We don't want the end-of-line after % the `@group' to put extra space in the output. Since @group % should appear on a line by itself (according to the Texinfo % manual), we don't worry about eating any user text. \comment } % % The \vtop produces a box with normal height and large depth; thus, TeX puts % \baselineskip glue before it, and (when the next line of text is done) % \lineskip glue after it. Thus, space below is not quite equal to space % above. But it's pretty close. \def\Egroup{% % To get correct interline space between the last line of the group % and the first line afterwards, we have to propagate \prevdepth. \endgraf % Not \par, as it may have been set to \lisppar. \global\dimen1 = \prevdepth \egroup % End the \vtop. % \dimen0 is the vertical size of the group's box. \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox % \dimen2 is how much space is left on the page (more or less). \dimen2 = \pageheight \advance\dimen2 by -\pagetotal % if the group doesn't fit on the current page, and it's a big big % group, force a page break. \ifdim \dimen0 > \dimen2 \ifdim \pagetotal < \vfilllimit\pageheight \page \fi \fi \box\groupbox \prevdepth = \dimen1 \checkinserts } % % TeX puts in an \escapechar (i.e., `@') at the beginning of the help % message, so this ends up printing `@group can only ...'. % \newhelp\groupinvalidhelp{% group can only be used in environments such as @example,^^J% where each line of input produces a line of output.} % @need space-in-mils % forces a page break if there is not space-in-mils remaining. \newdimen\mil \mil=0.001in \parseargdef\need{% % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. \par % % If the @need value is less than one line space, it's useless. \dimen0 = #1\mil \dimen2 = \ht\strutbox \advance\dimen2 by \dp\strutbox \ifdim\dimen0 > \dimen2 % % Do a \strut just to make the height of this box be normal, so the % normal leading is inserted relative to the preceding line. % And a page break here is fine. \vtop to #1\mil{\strut\vfil}% % % TeX does not even consider page breaks if a penalty added to the % main vertical list is 10000 or more. But in order to see if the % empty box we just added fits on the page, we must make it consider % page breaks. On the other hand, we don't want to actually break the % page after the empty box. So we use a penalty of 9999. % % There is an extremely small chance that TeX will actually break the % page at this \penalty, if there are no other feasible breakpoints in % sight. (If the user is using lots of big @group commands, which % almost-but-not-quite fill up a page, TeX will have a hard time doing % good page breaking, for example.) However, I could not construct an % example where a page broke at this \penalty; if it happens in a real % document, then we can reconsider our strategy. \penalty9999 % % Back up by the size of the box, whether we did a page break or not. \kern -#1\mil % % Do not allow a page break right after this kern. \nobreak \fi } % @br forces paragraph break (and is undocumented). \let\br = \par % @page forces the start of a new page. % \def\page{\par\vfill\supereject} % @exdent text.... % outputs text on separate line in roman font, starting at standard page margin % This records the amount of indent in the innermost environment. % That's how much \exdent should take out. \newskip\exdentamount % This defn is used inside fill environments such as @defun. \parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} % This defn is used inside nofill environments such as @example. \parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount \leftline{\hskip\leftskip{\rm#1}}}} % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current % paragraph. For more general purposes, use the \margin insertion % class. WHICH is `l' or `r'. Not documented, written for gawk manual. % \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} % \def\doinmargin#1#2{\strut\vadjust{% \nobreak \kern-\strutdepth \vtop to \strutdepth{% \baselineskip=\strutdepth \vss % if you have multiple lines of stuff to put here, you'll need to % make the vbox yourself of the appropriate size. \ifx#1l% \llap{\ignorespaces #2\hskip\inmarginspacing}% \else \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% \fi \null }% }} \def\inleftmargin{\doinmargin l} \def\inrightmargin{\doinmargin r} % % @inmargin{TEXT [, RIGHT-TEXT]} % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; % else use TEXT for both). % \def\inmargin#1{\parseinmargin #1,,\finish} \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \def\lefttext{#1}% have both texts \def\righttext{#2}% \else \def\lefttext{#1}% have only one text \def\righttext{#1}% \fi % \ifodd\pageno \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin \else \def\temp{\inleftmargin\lefttext}% \fi \temp } % @| inserts a changebar to the left of the current line. It should % surround any changed text. This approach does *not* work if the % change spans more than two lines of output. To handle that, we would % have adopt a much more difficult approach (putting marks into the main % vertical list for the beginning and end of each change). This command % is not documented, not supported, and doesn't work. % \def\|{% % \vadjust can only be used in horizontal mode. \leavevmode % % Append this vertical mode material after the current line in the output. \vadjust{% % We want to insert a rule with the height and depth of the current % leading; that is exactly what \strutbox is supposed to record. \vskip-\baselineskip % % \vadjust-items are inserted at the left edge of the type. So % the \llap here moves out into the left-hand margin. \llap{% % % For a thicker or thinner bar, change the `1pt'. \vrule height\baselineskip width1pt % % This is the space between the bar and the text. \hskip 12pt }% }% } % @include FILE -- \input text of FILE. % \def\include{\parseargusing\filenamecatcodes\includezzz} \def\includezzz#1{% \pushthisfilestack \def\thisfile{#1}% {% \makevalueexpandable % we want to expand any @value in FILE. \turnoffactive % and allow special characters in the expansion \indexnofonts % Allow `@@' and other weird things in file names. \wlog{texinfo.tex: doing @include of #1^^J}% \edef\temp{\noexpand\input #1 }% % % This trickery is to read FILE outside of a group, in case it makes % definitions, etc. \expandafter }\temp \popthisfilestack } \def\filenamecatcodes{% \catcode`\\=\other \catcode`~=\other \catcode`^=\other \catcode`_=\other \catcode`|=\other \catcode`<=\other \catcode`>=\other \catcode`+=\other \catcode`-=\other \catcode`\`=\other \catcode`\'=\other } \def\pushthisfilestack{% \expandafter\pushthisfilestackX\popthisfilestack\StackTerm } \def\pushthisfilestackX{% \expandafter\pushthisfilestackY\thisfile\StackTerm } \def\pushthisfilestackY #1\StackTerm #2\StackTerm {% \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% } \def\popthisfilestack{\errthisfilestackempty} \def\errthisfilestackempty{\errmessage{Internal error: the stack of filenames is empty.}} % \def\thisfile{} % @center line % outputs that line, centered. % \parseargdef\center{% \ifhmode \let\centersub\centerH \else \let\centersub\centerV \fi \centersub{\hfil \ignorespaces#1\unskip \hfil}% \let\centersub\relax % don't let the definition persist, just in case } \def\centerH#1{{% \hfil\break \advance\hsize by -\leftskip \advance\hsize by -\rightskip \line{#1}% \break }} % \newcount\centerpenalty \def\centerV#1{% % The idea here is the same as in \startdefun, \cartouche, etc.: if % @center is the first thing after a section heading, we need to wipe % out the negative parskip inserted by \sectionheading, but still % prevent a page break here. \centerpenalty = \lastpenalty \ifnum\centerpenalty>10000 \vskip\parskip \fi \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi \line{\kern\leftskip #1\kern\rightskip}% } % @sp n outputs n lines of vertical space % \parseargdef\sp{\vskip #1\baselineskip} % @comment ...line which is ignored... % @c is the same as @comment % @ignore ... @end ignore is another way to write a comment % \def\comment{\begingroup \catcode`\^^M=\other% \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% \commentxxx} {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} % \let\c=\comment % @paragraphindent NCHARS % We'll use ems for NCHARS, close enough. % NCHARS can also be the word `asis' or `none'. % We cannot feasibly implement @paragraphindent asis, though. % \def\asisword{asis} % no translation, these are keywords \def\noneword{none} % \parseargdef\paragraphindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \defaultparindent = 0pt \else \defaultparindent = #1em \fi \fi \parindent = \defaultparindent } % @exampleindent NCHARS % We'll use ems for NCHARS like @paragraphindent. % It seems @exampleindent asis isn't necessary, but % I preserve it to make it similar to @paragraphindent. \parseargdef\exampleindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \lispnarrowing = 0pt \else \lispnarrowing = #1em \fi \fi } % @firstparagraphindent WORD % If WORD is `none', then suppress indentation of the first paragraph % after a section heading. If WORD is `insert', then do indent at such % paragraphs. % % The paragraph indentation is suppressed or not by calling % \suppressfirstparagraphindent, which the sectioning commands do. % We switch the definition of this back and forth according to WORD. % By default, we suppress indentation. % \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} \def\insertword{insert} % \parseargdef\firstparagraphindent{% \def\temp{#1}% \ifx\temp\noneword \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent \else\ifx\temp\insertword \let\suppressfirstparagraphindent = \relax \else \errhelp = \EMsimple \errmessage{Unknown @firstparagraphindent option `\temp'}% \fi\fi } % Here is how we actually suppress indentation. Redefine \everypar to % \kern backwards by \parindent, and then reset itself to empty. % % We also make \indent itself not actually do anything until the next % paragraph. % \gdef\dosuppressfirstparagraphindent{% \gdef\indent{% \restorefirstparagraphindent \indent }% \gdef\noindent{% \restorefirstparagraphindent \noindent }% \global\everypar = {% \kern -\parindent \restorefirstparagraphindent }% } \gdef\restorefirstparagraphindent{% \global \let \indent = \ptexindent \global \let \noindent = \ptexnoindent \global \everypar = {}% } % @refill is a no-op. \let\refill=\relax % If working on a large document in chapters, it is convenient to % be able to disable indexing, cross-referencing, and contents, for test runs. % This is done with @novalidate (before @setfilename). % \newif\iflinks \linkstrue % by default we want the aux files. \let\novalidate = \linksfalse % @setfilename is done at the beginning of every texinfo file. % So open here the files we need to have open while reading the input. % This makes it possible to make a .fmt file for texinfo. \def\setfilename{% \fixbackslash % Turn off hack to swallow `\input texinfo'. \iflinks \tryauxfile % Open the new aux file. TeX will close it automatically at exit. \immediate\openout\auxfile=\jobname.aux \fi % \openindices needs to do some work in any case. \openindices \let\setfilename=\comment % Ignore extra @setfilename cmds. % % If texinfo.cnf is present on the system, read it. % Useful for site-wide @afourpaper, etc. \openin 1 texinfo.cnf \ifeof 1 \else \input texinfo.cnf \fi \closein 1 % \comment % Ignore the actual filename. } % Called from \setfilename. % \def\openindices{% \newindex{cp}% \newcodeindex{fn}% \newcodeindex{vr}% \newcodeindex{tp}% \newcodeindex{ky}% \newcodeindex{pg}% } % @bye. \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} \message{pdf,} % adobe `portable' document format \newcount\tempnum \newcount\lnkcount \newtoks\filename \newcount\filenamelength \newcount\pgn \newtoks\toksA \newtoks\toksB \newtoks\toksC \newtoks\toksD \newbox\boxA \newcount\countA \newif\ifpdf \newif\ifpdfmakepagedest % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 % can be set). So we test for \relax and 0 as well as being undefined. \ifx\pdfoutput\thisisundefined \else \ifx\pdfoutput\relax \else \ifcase\pdfoutput \else \pdftrue \fi \fi \fi % PDF uses PostScript string constants for the names of xref targets, % for display in the outlines, and in other places. Thus, we have to % double any backslashes. Otherwise, a name like "\node" will be % interpreted as a newline (\n), followed by o, d, e. Not good. % % See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and % related messages. The final outcome is that it is up to the TeX user % to double the backslashes and otherwise make the string valid, so % that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to % do this reliably, so we use it. % #1 is a control sequence in which to do the replacements, % which we \xdef. \def\txiescapepdf#1{% \ifx\pdfescapestring\thisisundefined % No primitive available; should we give a warning or log? % Many times it won't matter. \else % The expandable \pdfescapestring primitive escapes parentheses, % backslashes, and other special chars. \xdef#1{\pdfescapestring{#1}}% \fi } \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images with PDF output, and none of those formats could be found. (.eps cannot be supported due to the design of the PDF format; use regular TeX (DVI output) for that.)} \ifpdf % % Color manipulation macros based on pdfcolor.tex, % except using rgb instead of cmyk; the latter is said to render as a % very dark gray on-screen and a very dark halftone in print, instead % of actual black. \def\rgbDarkRed{0.50 0.09 0.12} \def\rgbBlack{0 0 0} % % k sets the color for filling (usual text, etc.); % K sets the color for stroking (thin rules, e.g., normal _'s). \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} % % Set color, and create a mark which defines \thiscolor accordingly, % so that \makeheadline knows which color to restore. \def\setcolor#1{% \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% \domark \pdfsetcolor{#1}% } % \def\maincolor{\rgbBlack} \pdfsetcolor{\maincolor} \edef\thiscolor{\maincolor} \def\lastcolordefs{} % \def\makefootline{% \baselineskip24pt \line{\pdfsetcolor{\maincolor}\the\footline}% } % \def\makeheadline{% \vbox to 0pt{% \vskip-22.5pt \line{% \vbox to8.5pt{}% % Extract \thiscolor definition from the marks. \getcolormarks % Typeset the headline with \maincolor, then restore the color. \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% }% \vss }% \nointerlineskip } % % \pdfcatalog{/PageMode /UseOutlines} % % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). \def\dopdfimage#1#2#3{% \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% % % pdftex (and the PDF format) support .pdf, .png, .jpg (among % others). Let's try in that order, PDF first since if % someone has a scalable image, presumably better to use that than a % bitmap. \let\pdfimgext=\empty \begingroup \openin 1 #1.pdf \ifeof 1 \openin 1 #1.PDF \ifeof 1 \openin 1 #1.png \ifeof 1 \openin 1 #1.jpg \ifeof 1 \openin 1 #1.jpeg \ifeof 1 \openin 1 #1.JPG \ifeof 1 \errhelp = \nopdfimagehelp \errmessage{Could not find image file #1 for pdf}% \else \gdef\pdfimgext{JPG}% \fi \else \gdef\pdfimgext{jpeg}% \fi \else \gdef\pdfimgext{jpg}% \fi \else \gdef\pdfimgext{png}% \fi \else \gdef\pdfimgext{PDF}% \fi \else \gdef\pdfimgext{pdf}% \fi \closein 1 \endgroup % % without \immediate, ancient pdftex seg faults when the same image is % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) \ifnum\pdftexversion < 14 \immediate\pdfimage \else \immediate\pdfximage \fi \ifdim \wd0 >0pt width \pdfimagewidth \fi \ifdim \wd2 >0pt height \pdfimageheight \fi \ifnum\pdftexversion<13 #1.\pdfimgext \else {#1.\pdfimgext}% \fi \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} % \def\pdfmkdest#1{{% % We have to set dummies so commands such as @code, and characters % such as \, aren't expanded when present in a section title. \indexnofonts \turnoffactive \makevalueexpandable \def\pdfdestname{#1}% \txiescapepdf\pdfdestname \safewhatsit{\pdfdest name{\pdfdestname} xyz}% }} % % used to mark target names; must be expandable. \def\pdfmkpgn#1{#1} % % by default, use a color that is dark enough to print on paper as % nearly black, but still distinguishable for online viewing. \def\urlcolor{\rgbDarkRed} \def\linkcolor{\rgbDarkRed} \def\endlink{\setcolor{\maincolor}\pdfendlink} % % Adding outlines to PDF; macros for calculating structure of outlines % come from Petr Olsak \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% \else \csname#1\endcsname \fi} \def\advancenumber#1{\tempnum=\expnumber{#1}\relax \advance\tempnum by 1 \expandafter\xdef\csname#1\endcsname{\the\tempnum}} % % #1 is the section text, which is what will be displayed in the % outline by the pdf viewer. #2 is the pdf expression for the number % of subentries (or empty, for subsubsections). #3 is the node text, % which might be empty if this toc entry had no corresponding node. % #4 is the page number % \def\dopdfoutline#1#2#3#4{% % Generate a link to the node text if that exists; else, use the % page number. We could generate a destination for the section % text in the case where a section has no node, but it doesn't % seem worth the trouble, since most documents are normally structured. \edef\pdfoutlinedest{#3}% \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}% \else \txiescapepdf\pdfoutlinedest \fi % % Also escape PDF chars in the display string. \edef\pdfoutlinetext{#1}% \txiescapepdf\pdfoutlinetext % \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% } % \def\pdfmakeoutlines{% \begingroup % Read toc silently, to get counts of subentries for \pdfoutline. \def\partentry##1##2##3##4{}% ignore parts in the outlines \def\numchapentry##1##2##3##4{% \def\thischapnum{##2}% \def\thissecnum{0}% \def\thissubsecnum{0}% }% \def\numsecentry##1##2##3##4{% \advancenumber{chap\thischapnum}% \def\thissecnum{##2}% \def\thissubsecnum{0}% }% \def\numsubsecentry##1##2##3##4{% \advancenumber{sec\thissecnum}% \def\thissubsecnum{##2}% }% \def\numsubsubsecentry##1##2##3##4{% \advancenumber{subsec\thissubsecnum}% }% \def\thischapnum{0}% \def\thissecnum{0}% \def\thissubsecnum{0}% % % use \def rather than \let here because we redefine \chapentry et % al. a second time, below. \def\appentry{\numchapentry}% \def\appsecentry{\numsecentry}% \def\appsubsecentry{\numsubsecentry}% \def\appsubsubsecentry{\numsubsubsecentry}% \def\unnchapentry{\numchapentry}% \def\unnsecentry{\numsecentry}% \def\unnsubsecentry{\numsubsecentry}% \def\unnsubsubsecentry{\numsubsubsecentry}% \readdatafile{toc}% % % Read toc second time, this time actually producing the outlines. % The `-' means take the \expnumber as the absolute number of % subentries, which we calculated on our first read of the .toc above. % % We use the node names as the destinations. \def\numchapentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% \def\numsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% \def\numsubsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% \def\numsubsubsecentry##1##2##3##4{% count is always zero \dopdfoutline{##1}{}{##3}{##4}}% % % PDF outlines are displayed using system fonts, instead of % document fonts. Therefore we cannot use special characters, % since the encoding is unknown. For example, the eogonek from % Latin 2 (0xea) gets translated to a | character. Info from % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. % % TODO this right, we have to translate 8-bit characters to % their "best" equivalent, based on the @documentencoding. Too % much work for too little return. Just use the ASCII equivalents % we use for the index sort strings. % \indexnofonts \setupdatafile % We can have normal brace characters in the PDF outlines, unlike % Texinfo index files. So set that up. \def\{{\lbracecharliteral}% \def\}{\rbracecharliteral}% \catcode`\\=\active \otherbackslash \input \tocreadfilename \endgroup } {\catcode`[=1 \catcode`]=2 \catcode`{=\other \catcode`}=\other \gdef\lbracecharliteral[{]% \gdef\rbracecharliteral[}]% ] % \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces \addtokens{\filename}{\PP}% \advance\filenamelength by 1 \fi \nextsp} \def\getfilename#1{% \filenamelength=0 % If we don't expand the argument now, \skipspaces will get % snagged on things like "@value{foo}". \edef\temp{#1}% \expandafter\skipspaces\temp|\relax } \ifnum\pdftexversion < 14 \let \startlink \pdfannotlink \else \let \startlink \pdfstartlink \fi % make a live url in pdf output. \def\pdfurl#1{% \begingroup % it seems we really need yet another set of dummies; have not % tried to figure out what each command should do in the context % of @url. for now, just make @/ a no-op, that's the only one % people have actually reported a problem with. % \normalturnoffactive \def\@{@}% \let\/=\empty \makevalueexpandable % do we want to go so far as to use \indexnofonts instead of just % special-casing \var here? \def\var##1{##1}% % \leavevmode\setcolor{\urlcolor}% \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% \endgroup} \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} \def\maketoks{% \expandafter\poptoks\the\toksA|ENDTOKS|\relax \ifx\first0\adn0 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 \else \ifnum0=\countA\else\makelink\fi \ifx\first.\let\next=\done\else \let\next=\maketoks \addtokens{\toksB}{\the\toksD} \ifx\first,\addtokens{\toksB}{\space}\fi \fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next} \def\makelink{\addtokens{\toksB}% {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} \setcolor{\linkcolor}#1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \else % non-pdf mode \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax \let\setcolor = \gobble \let\pdfsetcolor = \gobble \let\pdfmakeoutlines = \relax \fi % \ifx\pdfoutput \message{fonts,} % Change the current font style to #1, remembering it in \curfontstyle. % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in % italics, not bold italics. % \def\setfontstyle#1{% \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. \csname ten#1\endcsname % change the current font } % Select #1 fonts with the current style. % \def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} \def\rm{\fam=0 \setfontstyle{rm}} \def\it{\fam=\itfam \setfontstyle{it}} \def\sl{\fam=\slfam \setfontstyle{sl}} \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} \def\tt{\fam=\ttfam \setfontstyle{tt}} % Unfortunately, we have to override this for titles and the like, since % in those cases "rm" is bold. Sigh. \def\rmisbold{\rm\def\curfontstyle{bf}} % Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf. \newfam\sffam \def\sf{\fam=\sffam \setfontstyle{sf}} \let\li = \sf % Sometimes we call it \li, not \sf. % We don't need math for this font style. \def\ttsl{\setfontstyle{ttsl}} % Set the baselineskip to #1, and the lineskip and strut size % correspondingly. There is no deep meaning behind these magic numbers % used as factors; they just match (closely enough) what Knuth defined. % \def\lineskipfactor{.08333} \def\strutheightpercent{.70833} \def\strutdepthpercent {.29167} % % can get a sort of poor man's double spacing by redefining this. \def\baselinefactor{1} % \newdimen\textleading \def\setleading#1{% \dimen0 = #1\relax \normalbaselineskip = \baselinefactor\dimen0 \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip }% } % PDF CMaps. See also LaTeX's t1.cmap. % % do nothing with this by default. \expandafter\let\csname cmapOT1\endcsname\gobble \expandafter\let\csname cmapOT1IT\endcsname\gobble \expandafter\let\csname cmapOT1TT\endcsname\gobble % if we are producing pdf, and we have \pdffontattr, then define cmaps. % (\pdffontattr was introduced many years ago, but people still run % older pdftex's; it's easy to conditionalize, so we do.) \ifpdf \ifx\pdffontattr\thisisundefined \else \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1-0) %%Title: (TeX-OT1-0 TeX OT1 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1) /Supplement 0 >> def /CMapName /TeX-OT1-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <23> <26> <0023> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 40 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1IT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1IT-0) %%Title: (TeX-OT1IT-0 TeX OT1IT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1IT) /Supplement 0 >> def /CMapName /TeX-OT1IT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <25> <26> <0025> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 42 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <23> <0023> <24> <00A3> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1IT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1TT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1TT-0) %%Title: (TeX-OT1TT-0 TeX OT1TT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1TT) /Supplement 0 >> def /CMapName /TeX-OT1TT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 5 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <21> <26> <0021> <28> <5F> <0028> <61> <7E> <0061> endbfrange 32 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <2191> <0C> <2193> <0D> <0027> <0E> <00A1> <0F> <00BF> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <20> <2423> <27> <2019> <60> <2018> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1TT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% \fi\fi % Set the font macro #1 to the font named \fontprefix#2. % #3 is the font's design size, #4 is a scale factor, #5 is the CMap % encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit). % Example: % #1 = \textrm % #2 = \rmshape % #3 = 10 % #4 = \mainmagstep % #5 = OT1 % \def\setfont#1#2#3#4#5{% \font#1=\fontprefix#2#3 scaled #4 \csname cmap#5\endcsname#1% } % This is what gets called when #5 of \setfont is empty. \let\cmap\gobble % % (end of cmaps) % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix % before you read in texinfo.tex. \ifx\fontprefix\thisisundefined \def\fontprefix{cm} \fi % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} \def\rmbshape{bx} % where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} \def\ttbshape{tt} \def\ttslshape{sltt} \def\itshape{ti} \def\itbshape{bxti} \def\slshape{sl} \def\slbshape{bxsl} \def\sfshape{ss} \def\sfbshape{ss} \def\scshape{csc} \def\scbshape{csc} % Definitions for a main text size of 11pt. (The default in Texinfo.) % \def\definetextfontsizexi{% % Text fonts (11.2pt, magstep1). \def\textnominalsize{11pt} \edef\mainmagstep{\magstephalf} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1095} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstep1}{OT1} \setfont\deftt\ttshape{10}{\magstep1}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter (and unnumbered) fonts (17.28pt). \def\chapnominalsize{17pt} \setfont\chaprm\rmbshape{12}{\magstep2}{OT1} \setfont\chapit\itbshape{10}{\magstep3}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep3}{OT1} \setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} \setfont\chapsf\sfbshape{17}{1000}{OT1} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3}{OT1} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 \def\chapecsize{1728} % Section fonts (14.4pt). \def\secnominalsize{14pt} \setfont\secrm\rmbshape{12}{\magstep1}{OT1} \setfont\secit\itbshape{10}{\magstep2}{OT1IT} \setfont\secsl\slbshape{10}{\magstep2}{OT1} \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\secsf\sfbshape{12}{\magstep1}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep2}{OT1} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 \def\sececsize{1440} % Subsection fonts (13.15pt). \def\ssecnominalsize{13pt} \setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} \setfont\ssecit\itbshape{10}{1315}{OT1IT} \setfont\ssecsl\slbshape{10}{1315}{OT1} \setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} \setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1315}{OT1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 \def\ssececsize{1200} % Reduced fonts for @acro in text (10pt). \def\reducednominalsize{10pt} \setfont\reducedrm\rmshape{10}{1000}{OT1} \setfont\reducedtt\ttshape{10}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{1000}{OT1} \setfont\reducedit\itshape{10}{1000}{OT1IT} \setfont\reducedsl\slshape{10}{1000}{OT1} \setfont\reducedsf\sfshape{10}{1000}{OT1} \setfont\reducedsc\scshape{10}{1000}{OT1} \setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} \font\reducedi=cmmi10 \font\reducedsy=cmsy10 \def\reducedecsize{1000} \textleading = 13.2pt % line spacing for 11pt CM \textfonts % reset the current fonts \rm } % end of 11pt text font size definitions, \definetextfontsizexi % Definitions to make the main text be 10pt Computer Modern, with % section, chapter, etc., sizes following suit. This is for the GNU % Press printing of the Emacs 22 manual. Maybe other manuals in the % future. Used with @smallbook, which sets the leading to 12pt. % \def\definetextfontsizex{% % Text fonts (10pt). \def\textnominalsize{10pt} \edef\mainmagstep{1000} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1000} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstephalf}{OT1} \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter fonts (14.4pt). \def\chapnominalsize{14pt} \setfont\chaprm\rmbshape{12}{\magstep1}{OT1} \setfont\chapit\itbshape{10}{\magstep2}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep2}{OT1} \setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\chapsf\sfbshape{12}{\magstep1}{OT1} \let\chapbf\chaprm \setfont\chapsc\scbshape{10}{\magstep2}{OT1} \font\chapi=cmmi12 scaled \magstep1 \font\chapsy=cmsy10 scaled \magstep2 \def\chapecsize{1440} % Section fonts (12pt). \def\secnominalsize{12pt} \setfont\secrm\rmbshape{12}{1000}{OT1} \setfont\secit\itbshape{10}{\magstep1}{OT1IT} \setfont\secsl\slbshape{10}{\magstep1}{OT1} \setfont\sectt\ttbshape{12}{1000}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} \setfont\secsf\sfbshape{12}{1000}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep1}{OT1} \font\seci=cmmi12 \font\secsy=cmsy10 scaled \magstep1 \def\sececsize{1200} % Subsection fonts (10pt). \def\ssecnominalsize{10pt} \setfont\ssecrm\rmbshape{10}{1000}{OT1} \setfont\ssecit\itbshape{10}{1000}{OT1IT} \setfont\ssecsl\slbshape{10}{1000}{OT1} \setfont\ssectt\ttbshape{10}{1000}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} \setfont\ssecsf\sfbshape{10}{1000}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1000}{OT1} \font\sseci=cmmi10 \font\ssecsy=cmsy10 \def\ssececsize{1000} % Reduced fonts for @acro in text (9pt). \def\reducednominalsize{9pt} \setfont\reducedrm\rmshape{9}{1000}{OT1} \setfont\reducedtt\ttshape{9}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{900}{OT1} \setfont\reducedit\itshape{9}{1000}{OT1IT} \setfont\reducedsl\slshape{9}{1000}{OT1} \setfont\reducedsf\sfshape{9}{1000}{OT1} \setfont\reducedsc\scshape{10}{900}{OT1} \setfont\reducedttsl\ttslshape{10}{900}{OT1TT} \font\reducedi=cmmi9 \font\reducedsy=cmsy9 \def\reducedecsize{0900} \divide\parskip by 2 % reduce space between paragraphs \textleading = 12pt % line spacing for 10pt CM \textfonts % reset the current fonts \rm } % end of 10pt text font size definitions, \definetextfontsizex % We provide the user-level command % @fonttextsize 10 % (or 11) to redefine the text font size. pt is assumed. % \def\xiword{11} \def\xword{10} \def\xwordpt{10pt} % \parseargdef\fonttextsize{% \def\textsizearg{#1}% %\wlog{doing @fonttextsize \textsizearg}% % % Set \globaldefs so that documents can use this inside @tex, since % makeinfo 4.8 does not support it, but we need it nonetheless. % \begingroup \globaldefs=1 \ifx\textsizearg\xword \definetextfontsizex \else \ifx\textsizearg\xiword \definetextfontsizexi \else \errhelp=\EMsimple \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} \fi\fi \endgroup } % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since % texinfo doesn't allow for producing subscripts and superscripts except % in the main text, we don't bother to reset \scriptfont and % \scriptscriptfont (which would also require loading a lot more fonts). % \def\resetmathfonts{% \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf \textfont\ttfam=\tentt \textfont\sffam=\tensf } % The font-changing commands redefine the meanings of \tenSTYLE, instead % of just \STYLE. We do this because \STYLE needs to also set the % current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire % \tenSTYLE to set the current font. % % Each font-changing command also sets the names \lsize (one size lower) % and \lllsize (three sizes lower). These relative commands are used in % the LaTeX logo and acronyms. % % This all needs generalizing, badly. % \def\textfonts{% \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl \def\curfontsize{text}% \def\lsize{reduced}\def\lllsize{smaller}% \resetmathfonts \setleading{\textleading}} \def\titlefonts{% \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy \let\tenttsl=\titlettsl \def\curfontsize{title}% \def\lsize{chap}\def\lllsize{subsec}% \resetmathfonts \setleading{27pt}} \def\titlefont#1{{\titlefonts\rmisbold #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl \def\curfontsize{chap}% \def\lsize{sec}\def\lllsize{text}% \resetmathfonts \setleading{19pt}} \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl \def\curfontsize{sec}% \def\lsize{subsec}\def\lllsize{reduced}% \resetmathfonts \setleading{16pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl \def\curfontsize{ssec}% \def\lsize{text}\def\lllsize{small}% \resetmathfonts \setleading{15pt}} \let\subsubsecfonts = \subsecfonts \def\reducedfonts{% \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy \let\tenttsl=\reducedttsl \def\curfontsize{reduced}% \def\lsize{small}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallfonts{% \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy \let\tenttsl=\smallttsl \def\curfontsize{small}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallerfonts{% \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy \let\tenttsl=\smallerttsl \def\curfontsize{smaller}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{9.5pt}} % Fonts for short table of contents. \setfont\shortcontrm\rmshape{12}{1000}{OT1} \setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 \setfont\shortcontsl\slshape{12}{1000}{OT1} \setfont\shortconttt\ttshape{12}{1000}{OT1TT} % Define these just so they can be easily changed for other fonts. \def\angleleft{$\langle$} \def\angleright{$\rangle$} % Set the fonts to use with the @small... environments. \let\smallexamplefonts = \smallfonts % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample % can fit this many characters: % 8.5x11=86 smallbook=72 a4=90 a5=69 % If we use \scriptfonts (8pt), then we can fit this many characters: % 8.5x11=90+ smallbook=80 a4=90+ a5=77 % For me, subjectively, the few extra characters that fit aren't worth % the additional smallness of 8pt. So I'm making the default 9pt. % % By the way, for comparison, here's what fits with @example (10pt): % 8.5x11=71 smallbook=60 a4=75 a5=58 % --karl, 24jan03. % Set up the default fonts, so we can use them for creating boxes. % \definetextfontsizexi \message{markup,} % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have % this property, we can check that font parameter. % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will % define and register \INITMACRO to be called on markup style changes. % \INITMACRO can check \currentmarkupstyle for the innermost % style and the set of \ifmarkupSTYLE switches for all styles % currently in effect. \newif\ifmarkupvar \newif\ifmarkupsamp \newif\ifmarkupkey %\newif\ifmarkupfile % @file == @samp. %\newif\ifmarkupoption % @option == @samp. \newif\ifmarkupcode \newif\ifmarkupkbd %\newif\ifmarkupenv % @env == @code. %\newif\ifmarkupcommand % @command == @code. \newif\ifmarkuptex % @tex (and part of @math, for now). \newif\ifmarkupexample \newif\ifmarkupverb \newif\ifmarkupverbatim \let\currentmarkupstyle\empty \def\setupmarkupstyle#1{% \csname markup#1true\endcsname \def\currentmarkupstyle{#1}% \markupstylesetup } \let\markupstylesetup\empty \def\defmarkupstylesetup#1{% \expandafter\def\expandafter\markupstylesetup \expandafter{\markupstylesetup #1}% \def#1% } % Markup style setup for left and right quotes. \defmarkupstylesetup\markupsetuplq{% \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuplqdefault \else \temp \fi } \defmarkupstylesetup\markupsetuprq{% \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuprqdefault \else \temp \fi } { \catcode`\'=\active \catcode`\`=\active \gdef\markupsetuplqdefault{\let`\lq} \gdef\markupsetuprqdefault{\let'\rq} \gdef\markupsetcodequoteleft{\let`\codequoteleft} \gdef\markupsetcodequoteright{\let'\codequoteright} } \let\markupsetuplqcode \markupsetcodequoteleft \let\markupsetuprqcode \markupsetcodequoteright % \let\markupsetuplqexample \markupsetcodequoteleft \let\markupsetuprqexample \markupsetcodequoteright % \let\markupsetuplqkbd \markupsetcodequoteleft \let\markupsetuprqkbd \markupsetcodequoteright % \let\markupsetuplqsamp \markupsetcodequoteleft \let\markupsetuprqsamp \markupsetcodequoteright % \let\markupsetuplqverb \markupsetcodequoteleft \let\markupsetuprqverb \markupsetcodequoteright % \let\markupsetuplqverbatim \markupsetcodequoteleft \let\markupsetuprqverbatim \markupsetcodequoteright % Allow an option to not use regular directed right quote/apostrophe % (char 0x27), but instead the undirected quote from cmtt (char 0x0d). % The undirected quote is ugly, so don't make it the default, but it % works for pasting with more pdf viewers (at least evince), the % lilypond developers report. xpdf does work with the regular 0x27. % \def\codequoteright{% \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax '% \else \char'15 \fi \else \char'15 \fi } % % and a similar option for the left quote char vs. a grave accent. % Modern fonts display ASCII 0x60 as a grave accent, so some people like % the code environments to do likewise. % \def\codequoteleft{% \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax % [Knuth] pp. 380,381,391 % \relax disables Spanish ligatures ?` and !` of \tt font. \relax`% \else \char'22 \fi \else \char'22 \fi } % Commands to set the quote options. % \parseargdef\codequoteundirected{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETtxicodequoteundirected\endcsname = t% \else\ifx\temp\offword \expandafter\let\csname SETtxicodequoteundirected\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}% \fi\fi } % \parseargdef\codequotebacktick{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETtxicodequotebacktick\endcsname = t% \else\ifx\temp\offword \expandafter\let\csname SETtxicodequotebacktick\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}% \fi\fi } % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. \def\noligaturesquoteleft{\relax\lq} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 % Font commands. % #1 is the font command (\sl or \it), #2 is the text to slant. % If we are in a monospaced environment, however, 1) always use \ttsl, % and 2) do not add an italic correction. \def\dosmartslant#1#2{% \ifusingtt {{\ttsl #2}\let\next=\relax}% {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}% \next } \def\smartslanted{\dosmartslant\sl} \def\smartitalic{\dosmartslant\it} % Output an italic correction unless \next (presumed to be the following % character) is such as not to need one. \def\smartitaliccorrection{% \ifx\next,% \else\ifx\next-% \else\ifx\next.% \else\ptexslash \fi\fi\fi \aftersmartic } % Unconditional use \ttsl, and no ic. @var is set to this for defuns. \def\ttslanted#1{{\ttsl #1}} % @cite is like \smartslanted except unconditionally use \sl. We never want % ttsl for book titles, do we? \def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} \def\aftersmartic{} \def\var#1{% \let\saveaftersmartic = \aftersmartic \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}% \smartslanted{#1}% } \let\i=\smartitalic \let\slanted=\smartslanted \let\dfn=\smartslanted \let\emph=\smartitalic % Explicit font changes: @r, @sc, undocumented @ii. \def\r#1{{\rm #1}} % roman font \def\sc#1{{\smallcaps#1}} % smallcaps font \def\ii#1{{\it #1}} % italic font % @b, explicit bold. Also @strong. \def\b#1{{\bf #1}} \let\strong=\b % @sansserif, explicit sans. \def\sansserif#1{{\sf #1}} % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. % \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } % Set sfcode to normal for the chars that usually have another value. % Can't use plain's \frenchspacing because it uses the `\x notation, and % sometimes \x has an active definition that messes things up. % \catcode`@=11 \def\plainfrenchspacing{% \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m \def\endofsentencespacefactor{1000}% for @. and friends } \def\plainnonfrenchspacing{% \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 \def\endofsentencespacefactor{3000}% for @. and friends } \catcode`@=\other \def\endofsentencespacefactor{3000}% default % @t, explicit typewriter. \def\t#1{% {\tt \rawbackslash \plainfrenchspacing #1}% \null } % @samp. \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} % @indicateurl is \samp, that is, with quotes. \let\indicateurl=\samp % @code (and similar) prints in typewriter, but with spaces the same % size as normal in the surrounding text, without hyphenation, etc. % This is a subroutine for that. \def\tclose#1{% {% % Change normal interword space to be same as for the current font. \spaceskip = \fontdimen2\font % % Switch to typewriter. \tt % % But `\ ' produces the large typewriter interword space. \def\ {{\spaceskip = 0pt{} }}% % % Turn off hyphenation. \nohyphenation % \rawbackslash \plainfrenchspacing #1% }% \null % reset spacefactor to 1000 } % We *must* turn on hyphenation at `-' and `_' in @code. % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. % % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) % and arrange explicitly to hyphenate at a dash. % -- rms. { \catcode`\-=\active \catcode`\_=\active \catcode`\'=\active \catcode`\`=\active \global\let'=\rq \global\let`=\lq % default definitions % \global\def\code{\begingroup \setupmarkupstyle{code}% % The following should really be moved into \setupmarkupstyle handlers. \catcode\dashChar=\active \catcode\underChar=\active \ifallowcodebreaks \let-\codedash \let_\codeunder \else \let-\normaldash \let_\realunder \fi \codex } } \def\codex #1{\tclose{#1}\endgroup} \def\normaldash{-} \def\codedash{-\discretionary{}{}{}} \def\codeunder{% % this is all so @math{@code{var_name}+1} can work. In math mode, _ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) % will therefore expand the active definition of _, which is us % (inside @code that is), therefore an endless loop. \ifusingtt{\ifmmode \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. \else\normalunderscore \fi \discretionary{}{}{}}% {\_}% } % An additional complication: the above will allow breaks after, e.g., % each of the four underscores in __typeof__. This is bad. % @allowcodebreaks provides a document-level way to turn breaking at - % and _ on and off. % \newif\ifallowcodebreaks \allowcodebreakstrue \def\keywordtrue{true} \def\keywordfalse{false} \parseargdef\allowcodebreaks{% \def\txiarg{#1}% \ifx\txiarg\keywordtrue \allowcodebreakstrue \else\ifx\txiarg\keywordfalse \allowcodebreaksfalse \else \errhelp = \EMsimple \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}% \fi\fi } % For @command, @env, @file, @option quotes seem unnecessary, % so use \code rather than \samp. \let\command=\code \let\env=\code \let\file=\code \let\option=\code % @uref (abbreviation for `urlref') takes an optional (comma-separated) % second argument specifying the text to display and an optional third % arg as text to display instead of (rather than in addition to) the url % itself. First (mandatory) arg is the url. % (This \urefnobreak definition isn't used now, leaving it for a while % for comparison.) \def\urefnobreak#1{\dourefnobreak #1,,,\finish} \def\dourefnobreak#1,#2,#3,#4\finish{\begingroup \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \ifpdf \unhbox0 % PDF: 2nd arg given, show only it \else \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url \fi \else \code{#1}% only url given, so show it \fi \fi \endlink \endgroup} % This \urefbreak definition is the active one. \def\urefbreak{\begingroup \urefcatcodes \dourefbreak} \let\uref=\urefbreak \def\dourefbreak#1{\urefbreakfinish #1,,,\finish} \def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \ifpdf \unhbox0 % PDF: 2nd arg given, show only it \else \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url \fi \else \urefcode{#1}% only url given, so show it \fi \fi \endlink \endgroup} % Allow line breaks around only a few characters (only). \def\urefcatcodes{% \catcode\ampChar=\active \catcode\dotChar=\active \catcode\hashChar=\active \catcode\questChar=\active \catcode\slashChar=\active } { \urefcatcodes % \global\def\urefcode{\begingroup \setupmarkupstyle{code}% \urefcatcodes \let&\urefcodeamp \let.\urefcodedot \let#\urefcodehash \let?\urefcodequest \let/\urefcodeslash \codex } % % By default, they are just regular characters. \global\def&{\normalamp} \global\def.{\normaldot} \global\def#{\normalhash} \global\def?{\normalquest} \global\def/{\normalslash} } % we put a little stretch before and after the breakable chars, to help % line breaking of long url's. The unequal skips make look better in % cmtt at least, especially for dots. \def\urefprestretch{\urefprebreak \hskip0pt plus.13em } \def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em } % \def\urefcodeamp{\urefprestretch \&\urefpoststretch} \def\urefcodedot{\urefprestretch .\urefpoststretch} \def\urefcodehash{\urefprestretch \#\urefpoststretch} \def\urefcodequest{\urefprestretch ?\urefpoststretch} \def\urefcodeslash{\futurelet\next\urefcodeslashfinish} { \catcode`\/=\active \global\def\urefcodeslashfinish{% \urefprestretch \slashChar % Allow line break only after the final / in a sequence of % slashes, to avoid line break between the slashes in http://. \ifx\next/\else \urefpoststretch \fi } } % One more complication: by default we'll break after the special % characters, but some people like to break before the special chars, so % allow that. Also allow no breaking at all, for manual control. % \parseargdef\urefbreakstyle{% \def\txiarg{#1}% \ifx\txiarg\wordnone \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak} \else\ifx\txiarg\wordbefore \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak} \else\ifx\txiarg\wordafter \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak} \else \errhelp = \EMsimple \errmessage{Unknown @urefbreakstyle setting `\txiarg'}% \fi\fi\fi } \def\wordafter{after} \def\wordbefore{before} \def\wordnone{none} \urefbreakstyle after % @url synonym for @uref, since that's how everyone uses it. % \let\url=\uref % rms does not like angle brackets --karl, 17may97. % So now @email is just like @uref, unless we are pdf. % %\def\email#1{\angleleft{\tt #1}\angleright} \ifpdf \def\email#1{\doemail#1,,\finish} \def\doemail#1,#2,#3\finish{\begingroup \unsepspaces \pdfurl{mailto:#1}% \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi \endlink \endgroup} \else \let\email=\uref \fi % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), % or `code' (@kbd uses normal tty font always). \parseargdef\kbdinputstyle{% \def\txiarg{#1}% \ifx\txiarg\worddistinct \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% \else\ifx\txiarg\wordexample \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% \else\ifx\txiarg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \else \errhelp = \EMsimple \errmessage{Unknown @kbdinputstyle setting `\txiarg'}% \fi\fi\fi } \def\worddistinct{distinct} \def\wordexample{example} \def\wordcode{code} % Default is `distinct'. \kbdinputstyle distinct % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. \def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}} \def\xkey{\key} \def\kbdsub#1#2#3\par{% \def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi } % definition of @key that produces a lozenge. Doesn't adjust to text size. %\setfont\keyrm\rmshape{8}{1000}{OT1} %\font\keysy=cmsy9 %\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% % \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% % \vbox{\hrule\kern-0.4pt % \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% % \kern-0.4pt\hrule}% % \kern-.06em\raise0.4pt\hbox{\angleright}}}} % definition of @key with no lozenge. If the current font is already % monospace, don't change it; that way, we respect @kbdinputstyle. But % if it isn't monospace, then use \tt. % \def\key#1{{\setupmarkupstyle{key}% \nohyphenation \ifmonospace\else\tt\fi #1}\null} % @clicksequence{File @click{} Open ...} \def\clicksequence#1{\begingroup #1\endgroup} % @clickstyle @arrow (by default) \parseargdef\clickstyle{\def\click{#1}} \def\click{\arrow} % Typeset a dimension, e.g., `in' or `pt'. The only reason for the % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. % \def\dmn#1{\thinspace #1} % @l was never documented to mean ``switch to the Lisp font'', % and it is not used as such in any manual I can find. We need it for % Polish suppressed-l. --karl, 22sep96. %\def\l#1{{\li #1}\null} % @acronym for "FBI", "NATO", and the like. % We print this one point size smaller, since it's intended for % all-uppercase. % \def\acronym#1{\doacronym #1,,\finish} \def\doacronym#1,#2,#3\finish{% {\selectfonts\lsize #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi \null % reset \spacefactor=1000 } % @abbr for "Comput. J." and the like. % No font change, but don't do end-of-sentence spacing. % \def\abbr#1{\doabbr #1,,\finish} \def\doabbr#1,#2,#3\finish{% {\plainfrenchspacing #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi \null % reset \spacefactor=1000 } % @asis just yields its argument. Used with @table, for example. % \def\asis#1{#1} % @math outputs its argument in math mode. % % One complication: _ usually means subscripts, but it could also mean % an actual _ character, as in @math{@var{some_variable} + 1}. So make % _ active, and distinguish by seeing if the current family is \slfam, % which is what @var uses. { \catcode`\_ = \active \gdef\mathunderscore{% \catcode`\_=\active \def_{\ifnum\fam=\slfam \_\else\sb\fi}% } } % Another complication: we want \\ (and @\) to output a math (or tt) \. % FYI, plain.tex uses \\ as a temporary control sequence (for no % particular reason), but this is not advertised and we don't care. % % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} % \def\math{% \tex \mathunderscore \let\\ = \mathbackslash \mathactive % make the texinfo accent commands work in math mode \let\"=\ddot \let\'=\acute \let\==\bar \let\^=\hat \let\`=\grave \let\u=\breve \let\v=\check \let\~=\tilde \let\dotaccent=\dot $\finishmath } \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. % Some active characters (such as <) are spaced differently in math. % We have to reset their definitions in case the @math was an argument % to a command which sets the catcodes (such as @item or @section). % { \catcode`^ = \active \catcode`< = \active \catcode`> = \active \catcode`+ = \active \catcode`' = \active \gdef\mathactive{% \let^ = \ptexhat \let< = \ptexless \let> = \ptexgtr \let+ = \ptexplus \let' = \ptexquoteright } } % ctrl is no longer a Texinfo command, but leave this definition for fun. \def\ctrl #1{{\tt \rawbackslash \hat}#1} % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. % Ignore unless FMTNAME == tex; then it is like @iftex and @tex, % except specified as a normal braced arg, so no newlines to worry about. % \def\outfmtnametex{tex} % \long\def\inlinefmt#1{\doinlinefmt #1,\finish} \long\def\doinlinefmt#1,#2,\finish{% \def\inlinefmtname{#1}% \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi } % For raw, must switch into @tex before parsing the argument, to avoid % setting catcodes prematurely. Doing it this way means that, for % example, @inlineraw{html, foo{bar} gets a parse error instead of being % ignored. But this isn't important because if people want a literal % *right* brace they would have to use a command anyway, so they may as % well use a command to get a left brace too. We could re-use the % delimiter character idea from \verb, but it seems like overkill. % \long\def\inlineraw{\tex \doinlineraw} \long\def\doinlineraw#1{\doinlinerawtwo #1,\finish} \def\doinlinerawtwo#1,#2,\finish{% \def\inlinerawname{#1}% \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi \endgroup % close group opened by \tex. } \message{glyphs,} % and logos. % @@ prints an @, as does @atchar{}. \def\@{\char64 } \let\atchar=\@ % @{ @} @lbracechar{} @rbracechar{} all generate brace characters. % Unless we're in typewriter, use \ecfont because the CM text fonts do % not have braces, and we don't want to switch into math. \def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}} \def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}} \let\{=\mylbrace \let\lbracechar=\{ \let\}=\myrbrace \let\rbracechar=\} \begingroup % Definitions to produce \{ and \} commands for indices, % and @{ and @} for the aux/toc files. \catcode`\{ = \other \catcode`\} = \other \catcode`\[ = 1 \catcode`\] = 2 \catcode`\! = 0 \catcode`\\ = \other !gdef!lbracecmd[\{]% !gdef!rbracecmd[\}]% !gdef!lbraceatcmd[@{]% !gdef!rbraceatcmd[@}]% !endgroup % @comma{} to avoid , parsing problems. \let\comma = , % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. \let\, = \ptexc \let\dotaccent = \ptexdot \def\ringaccent#1{{\accent23 #1}} \let\tieaccent = \ptext \let\ubaraccent = \ptexb \let\udotaccent = \d % Other special characters: @questiondown @exclamdown @ordf @ordm % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} \def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} \def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} % Dotless i and dotless j, used for accents. \def\imacro{i} \def\jmacro{j} \def\dotless#1{% \def\temp{#1}% \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi \else \errmessage{@dotless can be used only with i or j}% \fi\fi } % The \TeX{} logo, as in plain, but resetting the spacing so that a % period following counts as ending a sentence. (Idea found in latex.) % \edef\TeX{\TeX \spacefactor=1000 } % @LaTeX{} logo. Not quite the same results as the definition in % latex.ltx, since we use a different font for the raised A; it's most % convenient for us to use an explicitly smaller font, rather than using % the \scriptstyle font (since we don't reset \scriptstyle and % \scriptscriptstyle). % \def\LaTeX{% L\kern-.36em {\setbox0=\hbox{T}% \vbox to \ht0{\hbox{% \ifx\textnominalsize\xwordpt % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX. % Revert to plain's \scriptsize, which is 7pt. \count255=\the\fam $\fam\count255 \scriptstyle A$% \else % For 11pt, we can use our lllsize. \selectfonts\lllsize A% \fi }% \vss }}% \kern-.15em \TeX } % Some math mode symbols. \def\bullet{$\ptexbullet$} \def\geq{\ifmmode \ge\else $\ge$\fi} \def\leq{\ifmmode \le\else $\le$\fi} \def\minus{\ifmmode -\else $-$\fi} % @dots{} outputs an ellipsis using the current font. % We do .5em per period so that it has the same spacing in the cm % typewriter fonts as three actual period characters; on the other hand, % in other typewriter fonts three periods are wider than 1.5em. So do % whichever is larger. % \def\dots{% \leavevmode \setbox0=\hbox{...}% get width of three periods \ifdim\wd0 > 1.5em \dimen0 = \wd0 \else \dimen0 = 1.5em \fi \hbox to \dimen0{% \hskip 0pt plus.25fil .\hskip 0pt plus1fil .\hskip 0pt plus1fil .\hskip 0pt plus.5fil }% } % @enddots{} is an end-of-sentence ellipsis. % \def\enddots{% \dots \spacefactor=\endofsentencespacefactor } % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. % % Since these characters are used in examples, they should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % \def\point{$\star$} \def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} \def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} \def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} % The @error{} command. % Adapted from the TeXbook's \boxit. % \newbox\errorbox % {\tentt \global\dimen0 = 3em}% Width of the box. \dimen2 = .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.) \setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt} % \setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. \advance\hsize by -2\dimen2 % Rules. \vbox{% \hrule height\dimen2 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. \kern3pt\vrule width\dimen2}% Space to right. \hrule height\dimen2} \hfil} % \def\error{\leavevmode\lower.7ex\copy\errorbox} % @pounds{} is a sterling sign, which Knuth put in the CM italic font. % \def\pounds{{\it\$}} % @euro{} comes from a separate font, depending on the current style. % We use the free feym* fonts from the eurosym package by Henrik % Theiling, which support regular, slanted, bold and bold slanted (and % "outlined" (blackboard board, sort of) versions, which we don't need). % It is available from http://www.ctan.org/tex-archive/fonts/eurosym. % % Although only regular is the truly official Euro symbol, we ignore % that. The Euro is designed to be slightly taller than the regular % font height. % % feymr - regular % feymo - slanted % feybr - bold % feybo - bold slanted % % There is no good (free) typewriter version, to my knowledge. % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. % Hmm. % % Also doesn't work in math. Do we need to do math with euro symbols? % Hope not. % % \def\euro{{\eurofont e}} \def\eurofont{% % We set the font at each command, rather than predefining it in % \textfonts and the other font-switching commands, so that % installations which never need the symbol don't have to have the % font installed. % % There is only one designed size (nominal 10pt), so we always scale % that to the current nominal size. % % By the way, simply using "at 1em" works for cmr10 and the like, but % does not work for cmbx10 and other extended/shrunken fonts. % \def\eurosize{\csname\curfontsize nominalsize\endcsname}% % \ifx\curfontstyle\bfstylename % bold: \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize \else % regular: \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize \fi \thiseurofont } % Glyphs from the EC fonts. We don't use \let for the aliases, because % sometimes we redefine the original macro, and the alias should reflect % the redefinition. % % Use LaTeX names for the Icelandic letters. \def\DH{{\ecfont \char"D0}} % Eth \def\dh{{\ecfont \char"F0}} % eth \def\TH{{\ecfont \char"DE}} % Thorn \def\th{{\ecfont \char"FE}} % thorn % \def\guillemetleft{{\ecfont \char"13}} \def\guillemotleft{\guillemetleft} \def\guillemetright{{\ecfont \char"14}} \def\guillemotright{\guillemetright} \def\guilsinglleft{{\ecfont \char"0E}} \def\guilsinglright{{\ecfont \char"0F}} \def\quotedblbase{{\ecfont \char"12}} \def\quotesinglbase{{\ecfont \char"0D}} % % This positioning is not perfect (see the ogonek LaTeX package), but % we have the precomposed glyphs for the most common cases. We put the % tests to use those glyphs in the single \ogonek macro so we have fewer % dummy definitions to worry about for index entries, etc. % % ogonek is also used with other letters in Lithuanian (IOU), but using % the precomposed glyphs for those is not so easy since they aren't in % the same EC font. \def\ogonek#1{{% \def\temp{#1}% \ifx\temp\macrocharA\Aogonek \else\ifx\temp\macrochara\aogonek \else\ifx\temp\macrocharE\Eogonek \else\ifx\temp\macrochare\eogonek \else \ecfont \setbox0=\hbox{#1}% \ifdim\ht0=1ex\accent"0C #1% \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% \fi \fi\fi\fi\fi }% } \def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} \def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} % % Use the ec* fonts (cm-super in outline format) for non-CM glyphs. \def\ecfont{% % We can't distinguish serif/sans and italic/slanted, but this % is used for crude hacks anyway (like adding French and German % quotes to documents typeset with CM, where we lose kerning), so % hopefully nobody will notice/care. \edef\ecsize{\csname\curfontsize ecsize\endcsname}% \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% \ifmonospace % typewriter: \font\thisecfont = ectt\ecsize \space at \nominalsize \else \ifx\curfontstyle\bfstylename % bold: \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize \else % regular: \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize \fi \fi \thisecfont } % @registeredsymbol - R in a circle. The font for the R should really % be smaller yet, but lllsize is the best we can do for now. % Adapted from the plain.tex definition of \copyright. % \def\registeredsymbol{% $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% \hfil\crcr\Orb}}% }$% } % @textdegree - the normal degrees sign. % \def\textdegree{$^\circ$} % Laurent Siebenmann reports \Orb undefined with: % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 % so we'll define it if necessary. % \ifx\Orb\thisisundefined \def\Orb{\mathhexbox20D} \fi % Quotes. \chardef\quotedblleft="5C \chardef\quotedblright=`\" \chardef\quoteleft=`\` \chardef\quoteright=`\' \message{page headings,} \newskip\titlepagetopglue \titlepagetopglue = 1.5in \newskip\titlepagebottomglue \titlepagebottomglue = 2pc % First the title page. Must do @settitle before @titlepage. \newif\ifseenauthor \newif\iffinishedtitlepage % Do an implicit @contents or @shortcontents after @end titlepage if the % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. % \newif\ifsetcontentsaftertitlepage \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue \parseargdef\shorttitlepage{% \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}% \endgroup\page\hbox{}\page} \envdef\titlepage{% % Open one extra group, as we want to close it in the middle of \Etitlepage. \begingroup \parindent=0pt \textfonts % Leave some space at the very top of the page. \vglue\titlepagetopglue % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue % % Most title ``pages'' are actually two pages long, with space % at the top of the second. We don't want the ragged left on the second. \let\oldpage = \page \def\page{% \iffinishedtitlepage\else \finishtitlepage \fi \let\page = \oldpage \page \null }% } \def\Etitlepage{% \iffinishedtitlepage\else \finishtitlepage \fi % It is important to do the page break before ending the group, % because the headline and footline are only empty inside the group. % If we use the new definition of \page, we always get a blank page % after the title page, which we certainly don't want. \oldpage \endgroup % % Need this before the \...aftertitlepage checks so that if they are % in effect the toc pages will come out with page numbers. \HEADINGSon % % If they want short, they certainly want long too. \ifsetshortcontentsaftertitlepage \shortcontents \contents \global\let\shortcontents = \relax \global\let\contents = \relax \fi % \ifsetcontentsaftertitlepage \contents \global\let\contents = \relax \global\let\shortcontents = \relax \fi } \def\finishtitlepage{% \vskip4pt \hrule height 2pt width \hsize \vskip\titlepagebottomglue \finishedtitlepagetrue } % Settings used for typesetting titles: no hyphenation, no indentation, % don't worry much about spacing, ragged right. This should be used % inside a \vbox, and fonts need to be set appropriately first. Because % it is always used for titles, nothing else, we call \rmisbold. \par % should be specified before the end of the \vbox, since a vbox is a group. % \def\raggedtitlesettings{% \rmisbold \hyphenpenalty=10000 \parindent=0pt \tolerance=5000 \ptexraggedright } % Macros to be used within @titlepage: \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} \parseargdef\title{% \checkenv\titlepage \vbox{\titlefonts \raggedtitlesettings #1\par}% % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt } \parseargdef\subtitle{% \checkenv\titlepage {\subtitlefont \rightline{#1}}% } % @author should come last, but may come many times. % It can also be used inside @quotation. % \parseargdef\author{% \def\temp{\quotation}% \ifx\thisenv\temp \def\quotationauthor{#1}% printed in \Equotation. \else \checkenv\titlepage \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi {\secfonts\rmisbold \leftline{#1}}% \fi } % Set up page headings and footings. \let\thispage=\folio \newtoks\evenheadline % headline on even pages \newtoks\oddheadline % headline on odd pages \newtoks\evenfootline % footline on even pages \newtoks\oddfootline % footline on odd pages % Now make TeX use those variables \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}} \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}\HEADINGShook} \let\HEADINGShook=\relax % Commands to set those variables. % For example, this is what @headings on does % @evenheading @thistitle|@thispage|@thischapter % @oddheading @thischapter|@thispage|@thistitle % @evenfooting @thisfile|| % @oddfooting ||@thisfile \def\evenheading{\parsearg\evenheadingxxx} \def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} \def\evenheadingyyy #1\|#2\|#3\|#4\finish{% \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddheading{\parsearg\oddheadingxxx} \def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} \def\oddheadingyyy #1\|#2\|#3\|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% \def\evenfooting{\parsearg\evenfootingxxx} \def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} \def\evenfootingyyy #1\|#2\|#3\|#4\finish{% \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddfooting{\parsearg\oddfootingxxx} \def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} \def\oddfootingyyy #1\|#2\|#3\|#4\finish{% \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% % % Leave some space for the footline. Hopefully ok to assume % @evenfooting will not be used by itself. \global\advance\pageheight by -12pt \global\advance\vsize by -12pt } \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} % @evenheadingmarks top \thischapter <- chapter at the top of a page % @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page % % The same set of arguments for: % % @oddheadingmarks % @evenfootingmarks % @oddfootingmarks % @everyheadingmarks % @everyfootingmarks \def\evenheadingmarks{\headingmarks{even}{heading}} \def\oddheadingmarks{\headingmarks{odd}{heading}} \def\evenfootingmarks{\headingmarks{even}{footing}} \def\oddfootingmarks{\headingmarks{odd}{footing}} \def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} \headingmarks{odd}{heading}{#1} } \def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} \headingmarks{odd}{footing}{#1} } % #1 = even/odd, #2 = heading/footing, #3 = top/bottom. \def\headingmarks#1#2#3 {% \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname \global\expandafter\let\csname get#1#2marks\endcsname \temp } \everyheadingmarks bottom \everyfootingmarks bottom % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. % @headings off turns them off. % @headings on same as @headings double, retained for compatibility. % @headings after turns on double-sided headings after this page. % @headings doubleafter turns on double-sided headings after this page. % @headings singleafter turns on single-sided headings after this page. % By default, they are off at the start of a document, % and turned `on' after @end titlepage. \def\headings #1 {\csname HEADINGS#1\endcsname} \def\headingsoff{% non-global headings elimination \evenheadline={\hfil}\evenfootline={\hfil}% \oddheadline={\hfil}\oddfootline={\hfil}% } \def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting \HEADINGSoff % it's the default % When we turn headings on, set the page number to 1. % For double-sided printing, put current file name in lower left corner, % chapter name on inside top of right hand pages, document % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. \def\HEADINGSdouble{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \let\contentsalignmacro = \chappager % For single-sided printing, chapter title goes across top left of page, % page number on top right. \def\HEADINGSsingle{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } \def\HEADINGSon{\HEADINGSdouble} \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} \let\HEADINGSdoubleafter=\HEADINGSafter \def\HEADINGSdoublex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} \def\HEADINGSsinglex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } % Subroutines used in generating headings % This produces Day Month Year style of output. % Only define if not already defined, in case a txi-??.tex file has set % up a different format (e.g., txi-cs.tex does this). \ifx\today\thisisundefined \def\today{% \number\day\space \ifcase\month \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec \fi \space\number\year} \fi % @settitle line... specifies the title of the document, for headings. % It generates no output of its own. \def\thistitle{\putwordNoTitle} \def\settitle{\parsearg{\gdef\thistitle}} \message{tables,} % Tables -- @table, @ftable, @vtable, @item(x). % default indentation of table text \newdimen\tableindent \tableindent=.8in % default indentation of @itemize and @enumerate text \newdimen\itemindent \itemindent=.3in % margin between end of table item and start of table text. \newdimen\itemmargin \itemmargin=.1in % used internally for \itemindent minus \itemmargin \newdimen\itemmax % Note @table, @ftable, and @vtable define @item, @itemx, etc., with % these defs. % They also define \itemindex % to index the item name in whatever manner is desired (perhaps none). \newif\ifitemxneedsnegativevskip \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} \def\internalBitem{\smallbreak \parsearg\itemzzz} \def\internalBitemx{\itemxpar \parsearg\itemzzz} \def\itemzzz #1{\begingroup % \advance\hsize by -\rightskip \advance\hsize by -\tableindent \setbox0=\hbox{\itemindicate{#1}}% \itemindex{#1}% \nobreak % This prevents a break before @itemx. % % If the item text does not fit in the space we have, put it on a line % by itself, and do not allow a page break either before or after that % line. We do not start a paragraph here because then if the next % command is, e.g., @kindex, the whatsit would get put into the % horizontal list on a line by itself, resulting in extra blank space. \ifdim \wd0>\itemmax % % Make this a paragraph so we get the \parskip glue and wrapping, % but leave it ragged-right. \begingroup \advance\leftskip by-\tableindent \advance\hsize by\tableindent \advance\rightskip by0pt plus1fil\relax \leavevmode\unhbox0\par \endgroup % % We're going to be starting a paragraph, but we don't want the % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % % Stop a page break at the \parskip glue coming up. However, if % what follows is an environment such as @example, there will be no % \parskip glue; then the negative vskip we just inserted would % cause the example and the item to crash together. So we use this % bizarre value of 10001 as a signal to \aboveenvbreak to insert % \parskip glue after all. Section titles are handled this way also. % \penalty 10001 \endgroup \itemxneedsnegativevskipfalse \else % The item text fits into the space. Start a paragraph, so that the % following text (if any) will end up on the same line. \noindent % Do this with kerns and \unhbox so that if there is a footnote in % the item text, it can migrate to the main vertical list and % eventually be printed. \nobreak\kern-\tableindent \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 \unhbox0 \nobreak\kern\dimen0 \endgroup \itemxneedsnegativevskiptrue \fi } \def\item{\errmessage{@item while not in a list environment}} \def\itemx{\errmessage{@itemx while not in a list environment}} % @table, @ftable, @vtable. \envdef\table{% \let\itemindex\gobble \tablecheck{table}% } \envdef\ftable{% \def\itemindex ##1{\doind {fn}{\code{##1}}}% \tablecheck{ftable}% } \envdef\vtable{% \def\itemindex ##1{\doind {vr}{\code{##1}}}% \tablecheck{vtable}% } \def\tablecheck#1{% \ifnum \the\catcode`\^^M=\active \endgroup \errmessage{This command won't work in this context; perhaps the problem is that we are \inenvironment\thisenv}% \def\next{\doignore{#1}}% \else \let\next\tablex \fi \next } \def\tablex#1{% \def\itemindicate{#1}% \parsearg\tabley } \def\tabley#1{% {% \makevalueexpandable \edef\temp{\noexpand\tablez #1\space\space\space}% \expandafter }\temp \endtablez } \def\tablez #1 #2 #3 #4\endtablez{% \aboveenvbreak \ifnum 0#1>0 \advance \leftskip by #1\mil \fi \ifnum 0#2>0 \tableindent=#2\mil \fi \ifnum 0#3>0 \advance \rightskip by #3\mil \fi \itemmax=\tableindent \advance \itemmax by -\itemmargin \advance \leftskip by \tableindent \exdentamount=\tableindent \parindent = 0pt \parskip = \smallskipamount \ifdim \parskip=0pt \parskip=2pt \fi \let\item = \internalBitem \let\itemx = \internalBitemx } \def\Etable{\endgraf\afterenvbreak} \let\Eftable\Etable \let\Evtable\Etable \let\Eitemize\Etable \let\Eenumerate\Etable % This is the counter used by @enumerate, which is really @itemize \newcount \itemno \envdef\itemize{\parsearg\doitemize} \def\doitemize#1{% \aboveenvbreak \itemmax=\itemindent \advance\itemmax by -\itemmargin \advance\leftskip by \itemindent \exdentamount=\itemindent \parindent=0pt \parskip=\smallskipamount \ifdim\parskip=0pt \parskip=2pt \fi % % Try typesetting the item mark that if the document erroneously says % something like @itemize @samp (intending @table), there's an error % right away at the @itemize. It's not the best error message in the % world, but it's better than leaving it to the @item. This means if % the user wants an empty mark, they have to say @w{} not just @w. \def\itemcontents{#1}% \setbox0 = \hbox{\itemcontents}% % % @itemize with no arg is equivalent to @itemize @bullet. \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi % \let\item=\itemizeitem } % Definition of @item while inside @itemize and @enumerate. % \def\itemizeitem{% \advance\itemno by 1 % for enumerations {\let\par=\endgraf \smallbreak}% reasonable place to break {% % If the document has an @itemize directly after a section title, a % \nobreak will be last on the list, and \sectionheading will have % done a \vskip-\parskip. In that case, we don't want to zero % parskip, or the item text will crash with the heading. On the % other hand, when there is normal text preceding the item (as there % usually is), we do want to zero parskip, or there would be too much % space. In that case, we won't have a \nobreak before. At least % that's the theory. \ifnum\lastpenalty<10000 \parskip=0in \fi \noindent \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% % \vadjust{\penalty 1200}}% not good to break after first line of item. \flushcr } % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. % \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% % Allow an optional argument of an uppercase letter, lowercase letter, % or number, to specify the first label in the enumerated list. No % argument is the same as `1'. % \envparseargdef\enumerate{\enumeratey #1 \endenumeratey} \def\enumeratey #1 #2\endenumeratey{% % If we were given no argument, pretend we were given `1'. \def\thearg{#1}% \ifx\thearg\empty \def\thearg{1}\fi % % Detect if the argument is a single token. If so, it might be a % letter. Otherwise, the only valid thing it can be is a number. % (We will always have one token, because of the test we just made. % This is a good thing, since \splitoff doesn't work given nothing at % all -- the first parameter is undelimited.) \expandafter\splitoff\thearg\endmark \ifx\rest\empty % Only one token in the argument. It could still be anything. % A ``lowercase letter'' is one whose \lccode is nonzero. % An ``uppercase letter'' is one whose \lccode is both nonzero, and % not equal to itself. % Otherwise, we assume it's a number. % % We need the \relax at the end of the \ifnum lines to stop TeX from % continuing to look for a . % \ifnum\lccode\expandafter`\thearg=0\relax \numericenumerate % a number (we hope) \else % It's a letter. \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax \lowercaseenumerate % lowercase letter \else \uppercaseenumerate % uppercase letter \fi \fi \else % Multiple tokens in the argument. We hope it's a number. \numericenumerate \fi } % An @enumerate whose labels are integers. The starting integer is % given in \thearg. % \def\numericenumerate{% \itemno = \thearg \startenumeration{\the\itemno}% } % The starting (lowercase) letter is in \thearg. \def\lowercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more lowercase letters in @enumerate; get a bigger alphabet}% \fi \char\lccode\itemno }% } % The starting (uppercase) letter is in \thearg. \def\uppercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more uppercase letters in @enumerate; get a bigger alphabet} \fi \char\uccode\itemno }% } % Call \doitemize, adding a period to the first argument and supplying the % common last two arguments. Also subtract one from the initial value in % \itemno, since @item increments \itemno. % \def\startenumeration#1{% \advance\itemno by -1 \doitemize{#1.}\flushcr } % @alphaenumerate and @capsenumerate are abbreviations for giving an arg % to @enumerate. % \def\alphaenumerate{\enumerate{a}} \def\capsenumerate{\enumerate{A}} \def\Ealphaenumerate{\Eenumerate} \def\Ecapsenumerate{\Eenumerate} % @multitable macros % Amy Hendrickson, 8/18/94, 3/6/96 % % @multitable ... @end multitable will make as many columns as desired. % Contents of each column will wrap at width given in preamble. Width % can be specified either with sample text given in a template line, % or in percent of \hsize, the current width of text on page. % Table can continue over pages but will only break between lines. % To make preamble: % % Either define widths of columns in terms of percent of \hsize: % @multitable @columnfractions .25 .3 .45 % @item ... % % Numbers following @columnfractions are the percent of the total % current hsize to be used for each column. You may use as many % columns as desired. % Or use a template: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item ... % using the widest term desired in each column. % Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's % with nothing between them for as many times as empty columns are needed, % ie, @tab@tab@tab will produce two empty columns. % @item, @tab do not need to be on their own lines, but it will not hurt % if they are. % Sample multitable: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item first col stuff @tab second col stuff @tab third col % @item % first col stuff % @tab % second col stuff % @tab % third col % @item first col stuff @tab second col stuff % @tab Many paragraphs of text may be used in any column. % % They will wrap at the width determined by the template. % @item@tab@tab This will be in third column. % @end multitable % Default dimensions may be reset by user. % @multitableparskip is vertical space between paragraphs in table. % @multitableparindent is paragraph indent in table. % @multitablecolmargin is horizontal space to be left between columns. % @multitablelinespace is space to leave between table items, baseline % to baseline. % 0pt means it depends on current normal line spacing. % \newskip\multitableparskip \newskip\multitableparindent \newdimen\multitablecolspace \newskip\multitablelinespace \multitableparskip=0pt \multitableparindent=6pt \multitablecolspace=12pt \multitablelinespace=0pt % Macros used to set up halign preamble: % \let\endsetuptable\relax \def\xendsetuptable{\endsetuptable} \let\columnfractions\relax \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent % #1 is the @columnfraction, usually a decimal number like .5, but might % be just 1. We just use it, whatever it is. % \def\pickupwholefraction#1 {% \global\advance\colcount by 1 \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% \setuptable } \newcount\colcount \def\setuptable#1{% \def\firstarg{#1}% \ifx\firstarg\xendsetuptable \let\go = \relax \else \ifx\firstarg\xcolumnfractions \global\setpercenttrue \else \ifsetpercent \let\go\pickupwholefraction \else \global\advance\colcount by 1 \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a % separator; typically that is always in the input, anyway. \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi \fi \ifx\go\pickupwholefraction % Put the argument back for the \pickupwholefraction call, so % we'll always have a period there to be parsed. \def\go{\pickupwholefraction#1}% \else \let\go = \setuptable \fi% \fi \go } % multitable-only commands. % % @headitem starts a heading row, which we typeset in bold. % Assignments have to be global since we are inside the implicit group % of an alignment entry. \everycr resets \everytab so we don't have to % undo it ourselves. \def\headitemfont{\b}% for people to use in the template row; not changeable \def\headitem{% \checkenv\multitable \crcr \global\everytab={\bf}% can't use \headitemfont since the parsing differs \the\everytab % for the first item }% % % A \tab used to include \hskip1sp. But then the space in a template % line is not enough. That is bad. So let's go back to just `&' until % we again encounter the problem the 1sp was intended to solve. % --karl, nathan@acm.org, 20apr99. \def\tab{\checkenv\multitable &\the\everytab}% % @multitable ... @end multitable definitions: % \newtoks\everytab % insert after every tab. % \envdef\multitable{% \vskip\parskip \startsavinginserts % % @item within a multitable starts a normal row. % We use \def instead of \let so that if one of the multitable entries % contains an @itemize, we don't choke on the \item (seen as \crcr aka % \endtemplate) expanding \doitemize. \def\item{\crcr}% % \tolerance=9500 \hbadness=9500 \setmultitablespacing \parskip=\multitableparskip \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 % \everycr = {% \noalign{% \global\everytab={}% \global\colcount=0 % Reset the column counter. % Check for saved footnotes, etc. \checkinserts % Keeps underfull box messages off when table breaks over pages. %\filbreak % Maybe so, but it also creates really weird page breaks when the % table breaks over pages. Wouldn't \vfil be better? Wait until the % problem manifests itself, so it can be fixed for real --karl. }% }% % \parsearg\domultitable } \def\domultitable#1{% % To parse everything between @multitable and @item: \setuptable#1 \endsetuptable % % This preamble sets up a generic column definition, which will % be used as many times as user calls for columns. % \vtop will set a single line and will also let text wrap and % continue for many paragraphs if desired. \halign\bgroup &% \global\advance\colcount by 1 \multistrut \vtop{% % Use the current \colcount to find the correct column width: \hsize=\expandafter\csname col\the\colcount\endcsname % % In order to keep entries from bumping into each other % we will add a \leftskip of \multitablecolspace to all columns after % the first one. % % If a template has been used, we will add \multitablecolspace % to the width of each template entry. % % If the user has set preamble in terms of percent of \hsize we will % use that dimension as the width of the column, and the \leftskip % will keep entries from bumping into each other. Table will start at % left margin and final column will justify at right margin. % % Make sure we don't inherit \rightskip from the outer environment. \rightskip=0pt \ifnum\colcount=1 % The first column will be indented with the surrounding text. \advance\hsize by\leftskip \else \ifsetpercent \else % If user has not set preamble in terms of percent of \hsize % we will advance \hsize by \multitablecolspace. \advance\hsize by \multitablecolspace \fi % In either case we will make \leftskip=\multitablecolspace: \leftskip=\multitablecolspace \fi % Ignoring space at the beginning and end avoids an occasional spurious % blank line, when TeX decides to break the line at the space before the % box from the multistrut, so the strut ends up on a line by itself. % For example: % @multitable @columnfractions .11 .89 % @item @code{#} % @tab Legal holiday which is valid in major parts of the whole country. % Is automatically provided with highlighting sequences respectively % marking characters. \noindent\ignorespaces##\unskip\multistrut }\cr } \def\Emultitable{% \crcr \egroup % end the \halign \global\setpercentfalse } \def\setmultitablespacing{% \def\multistrut{\strut}% just use the standard line spacing % % Compute \multitablelinespace (if not defined by user) for use in % \multitableparskip calculation. We used define \multistrut based on % this, but (ironically) that caused the spacing to be off. % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. \ifdim\multitablelinespace=0pt \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip \global\advance\multitablelinespace by-\ht0 \fi % Test to see if parskip is larger than space between lines of % table. If not, do nothing. % If so, set to same dimension as multitablelinespace. \ifdim\multitableparskip>\multitablelinespace \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt % to keep parskip somewhat smaller % than skip between lines in the table. \fi% \ifdim\multitableparskip=0pt \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt % to keep parskip somewhat smaller % than skip between lines in the table. \fi} \message{conditionals,} % @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, % @ifnotxml always succeed. They currently do nothing; we don't % attempt to check whether the conditionals are properly nested. But we % have to remember that they are conditionals, so that @end doesn't % attempt to close an environment group. % \def\makecond#1{% \expandafter\let\csname #1\endcsname = \relax \expandafter\let\csname iscond.#1\endcsname = 1 } \makecond{iftex} \makecond{ifnotdocbook} \makecond{ifnothtml} \makecond{ifnotinfo} \makecond{ifnotplaintext} \makecond{ifnotxml} % Ignore @ignore, @ifhtml, @ifinfo, and the like. % \def\direntry{\doignore{direntry}} \def\documentdescription{\doignore{documentdescription}} \def\docbook{\doignore{docbook}} \def\html{\doignore{html}} \def\ifdocbook{\doignore{ifdocbook}} \def\ifhtml{\doignore{ifhtml}} \def\ifinfo{\doignore{ifinfo}} \def\ifnottex{\doignore{ifnottex}} \def\ifplaintext{\doignore{ifplaintext}} \def\ifxml{\doignore{ifxml}} \def\ignore{\doignore{ignore}} \def\menu{\doignore{menu}} \def\xml{\doignore{xml}} % Ignore text until a line `@end #1', keeping track of nested conditionals. % % A count to remember the depth of nesting. \newcount\doignorecount \def\doignore#1{\begingroup % Scan in ``verbatim'' mode: \obeylines \catcode`\@ = \other \catcode`\{ = \other \catcode`\} = \other % % Make sure that spaces turn into tokens that match what \doignoretext wants. \spaceisspace % % Count number of #1's that we've seen. \doignorecount = 0 % % Swallow text until we reach the matching `@end #1'. \dodoignore{#1}% } { \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. \obeylines % % \gdef\dodoignore#1{% % #1 contains the command name as a string, e.g., `ifinfo'. % % Define a command to find the next `@end #1'. \long\def\doignoretext##1^^M@end #1{% \doignoretextyyy##1^^M@#1\_STOP_}% % % And this command to find another #1 command, at the beginning of a % line. (Otherwise, we would consider a line `@c @ifset', for % example, to count as an @ifset for nesting.) \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% % % And now expand that command. \doignoretext ^^M% }% } \def\doignoreyyy#1{% \def\temp{#1}% \ifx\temp\empty % Nothing found. \let\next\doignoretextzzz \else % Found a nested condition, ... \advance\doignorecount by 1 \let\next\doignoretextyyy % ..., look for another. % If we're here, #1 ends with ^^M\ifinfo (for example). \fi \next #1% the token \_STOP_ is present just after this macro. } % We have to swallow the remaining "\_STOP_". % \def\doignoretextzzz#1{% \ifnum\doignorecount = 0 % We have just found the outermost @end. \let\next\enddoignore \else % Still inside a nested condition. \advance\doignorecount by -1 \let\next\doignoretext % Look for the next @end. \fi \next } % Finish off ignored text. { \obeylines% % Ignore anything after the last `@end #1'; this matters in verbatim % environments, where otherwise the newline after an ignored conditional % would result in a blank line in the output. \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% } % @set VAR sets the variable VAR to an empty value. % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. % % Since we want to separate VAR from REST-OF-LINE (which might be % empty), we can't just use \parsearg; we have to insert a space of our % own to delimit the rest of the line, and then take it out again if we % didn't need it. % We rely on the fact that \parsearg sets \catcode`\ =10. % \parseargdef\set{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% {% \makevalueexpandable \def\temp{#2}% \edef\next{\gdef\makecsname{SET#1}}% \ifx\temp\empty \next{}% \else \setzzz#2\endsetzzz \fi }% } % Remove the trailing space \setxxx inserted. \def\setzzz#1 \endsetzzz{\next{#1}} % @clear VAR clears (i.e., unsets) the variable VAR. % \parseargdef\clear{% {% \makevalueexpandable \global\expandafter\let\csname SET#1\endcsname=\relax }% } % @value{foo} gets the text saved in variable foo. \def\value{\begingroup\makevalueexpandable\valuexxx} \def\valuexxx#1{\expandablevalue{#1}\endgroup} { \catcode`\- = \active \catcode`\_ = \active % \gdef\makevalueexpandable{% \let\value = \expandablevalue % We don't want these characters active, ... \catcode`\-=\other \catcode`\_=\other % ..., but we might end up with active ones in the argument if % we're called from @code, as @code{@value{foo-bar_}}, though. % So \let them to their normal equivalents. \let-\normaldash \let_\normalunderscore } } % We have this subroutine so that we can handle at least some @value's % properly in indexes (we call \makevalueexpandable in \indexdummies). % The command has to be fully expandable (if the variable is set), since % the result winds up in the index file. This means that if the % variable's value contains other Texinfo commands, it's almost certain % it will fail (although perhaps we could fix that with sufficient work % to do a one-level expansion on the result, instead of complete). % \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax {[No value for ``#1'']}% \message{Variable `#1', used in @value, is not set.}% \else \csname SET#1\endcsname \fi } % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % % To get special treatment of `@end ifset,' call \makeond and the redefine. % \makecond{ifset} \def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} \def\doifset#1#2{% {% \makevalueexpandable \let\next=\empty \expandafter\ifx\csname SET#2\endcsname\relax #1% If not set, redefine \next. \fi \expandafter }\next } \def\ifsetfail{\doignore{ifset}} % @ifclear VAR ... @end executes the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % % The `\else' inside the `\doifset' parameter is a trick to reuse the % above code: if the variable is not set, do nothing, if it is set, % then redefine \next to \ifclearfail. % \makecond{ifclear} \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} \def\ifclearfail{\doignore{ifclear}} % @ifcommandisdefined CMD ... @end executes the `...' if CMD (written % without the @) is in fact defined. We can only feasibly check at the % TeX level, so something like `mathcode' is going to considered % defined even though it is not a Texinfo command. % \makecond{ifcommanddefined} \def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}} % \def\doifcmddefined#1#2{{% \makevalueexpandable \let\next=\empty \expandafter\ifx\csname #2\endcsname\relax #1% If not defined, \let\next as above. \fi \expandafter }\next } \def\ifcmddefinedfail{\doignore{ifcommanddefined}} % @ifcommandnotdefined CMD ... handled similar to @ifclear above. \makecond{ifcommandnotdefined} \def\ifcommandnotdefined{% \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}} \def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}} % Set the `txicommandconditionals' variable, so documents have a way to % test if the @ifcommand...defined conditionals are available. \set txicommandconditionals % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory=\comment % @defininfoenclose. \let\definfoenclose=\comment \message{indexing,} % Index generation facilities % Define \newwrite to be identical to plain tex's \newwrite % except not \outer, so it can be used within macros and \if's. \edef\newwrite{\makecsname{ptexnewwrite}} % \newindex {foo} defines an index named foo. % It automatically defines \fooindex such that % \fooindex ...rest of line... puts an entry in the index foo. % It also defines \fooindfile to be the number of the output channel for % the file that accumulates this index. The file's extension is foo. % The name of an index should be no more than 2 characters long % for the sake of vms. % \def\newindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 % Open the file \fi \expandafter\xdef\csname#1index\endcsname{% % Define @#1index \noexpand\doindex{#1}} } % @defindex foo == \newindex{foo} % \def\defindex{\parsearg\newindex} % Define @defcodeindex, like @defindex except put all entries in @code. % \def\defcodeindex{\parsearg\newcodeindex} % \def\newcodeindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 \fi \expandafter\xdef\csname#1index\endcsname{% \noexpand\docodeindex{#1}}% } % @synindex foo bar makes index foo feed into index bar. % Do this instead of @defindex foo if you don't want it as a separate index. % % @syncodeindex foo bar similar, but put all entries made for index foo % inside @code. % \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), % #3 the target index (bar). \def\dosynindex#1#2#3{% % Only do \closeout if we haven't already done it, else we'll end up % closing the target index. \expandafter \ifx\csname donesynindex#2\endcsname \relax % The \closeout helps reduce unnecessary open files; the limit on the % Acorn RISC OS is a mere 16 files. \expandafter\closeout\csname#2indfile\endcsname \expandafter\let\csname donesynindex#2\endcsname = 1 \fi % redefine \fooindfile: \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname \expandafter\let\csname#2indfile\endcsname=\temp % redefine \fooindex: \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% } % Define \doindex, the driver for all \fooindex macros. % Argument #1 is generated by the calling \fooindex macro, % and it is "foo", the name of the index. % \doindex just uses \parsearg; it calls \doind for the actual work. % This is because \doind is more useful to call from other macros. % There is also \dosubind {index}{topic}{subtopic} % which makes an entry in a two-level index such as the operation index. \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} \def\singleindexer #1{\doind{\indexname}{#1}} % like the previous two, but they put @code around the argument. \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} % Take care of Texinfo commands that can appear in an index entry. % Since there are some commands we want to expand, and others we don't, % we have to laboriously prevent expansion for those that we don't. % \def\indexdummies{% \escapechar = `\\ % use backslash in output files. \def\@{@}% change to @@ when we switch to @ as escape char in index files. \def\ {\realbackslash\space }% % % Need these unexpandable (because we define \tt as a dummy) % definitions when @{ or @} appear in index entry text. Also, more % complicated, when \tex is in effect and \{ is a \delimiter again. % We can't use \lbracecmd and \rbracecmd because texindex assumes % braces and backslashes are used only as delimiters. Perhaps we % should define @lbrace and @rbrace commands a la @comma. \def\{{{\tt\char123}}% \def\}{{\tt\char125}}% % % I don't entirely understand this, but when an index entry is % generated from a macro call, the \endinput which \scanmacro inserts % causes processing to be prematurely terminated. This is, % apparently, because \indexsorttmp is fully expanded, and \endinput % is an expandable command. The redefinition below makes \endinput % disappear altogether for that purpose -- although logging shows that % processing continues to some further point. On the other hand, it % seems \endinput does not hurt in the printed index arg, since that % is still getting written without apparent harm. % % Sample source (mac-idx3.tex, reported by Graham Percival to % help-texinfo, 22may06): % @macro funindex {WORD} % @findex xyz % @end macro % ... % @funindex commtest % % The above is not enough to reproduce the bug, but it gives the flavor. % % Sample whatsit resulting: % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} % % So: \let\endinput = \empty % % Do the redefinitions. \commondummies } % For the aux and toc files, @ is the escape character. So we want to % redefine everything using @ as the escape character (instead of % \realbackslash, still used for index files). When everything uses @, % this will be simpler. % \def\atdummies{% \def\@{@@}% \def\ {@ }% \let\{ = \lbraceatcmd \let\} = \rbraceatcmd % % Do the redefinitions. \commondummies \otherbackslash } % Called from \indexdummies and \atdummies. % \def\commondummies{% % % \definedummyword defines \#1 as \string\#1\space, thus effectively % preventing its expansion. This is used only for control words, % not control letters, because the \space would be incorrect for % control characters, but is needed to separate the control word % from whatever follows. % % For control letters, we have \definedummyletter, which omits the % space. % % These can be used both for control words that take an argument and % those that do not. If it is followed by {arg} in the input, then % that will dutifully get written to the index (or wherever). % \def\definedummyword ##1{\def##1{\string##1\space}}% \def\definedummyletter##1{\def##1{\string##1}}% \let\definedummyaccent\definedummyletter % \commondummiesnofonts % \definedummyletter\_% \definedummyletter\-% % % Non-English letters. \definedummyword\AA \definedummyword\AE \definedummyword\DH \definedummyword\L \definedummyword\O \definedummyword\OE \definedummyword\TH \definedummyword\aa \definedummyword\ae \definedummyword\dh \definedummyword\exclamdown \definedummyword\l \definedummyword\o \definedummyword\oe \definedummyword\ordf \definedummyword\ordm \definedummyword\questiondown \definedummyword\ss \definedummyword\th % % Although these internal commands shouldn't show up, sometimes they do. \definedummyword\bf \definedummyword\gtr \definedummyword\hat \definedummyword\less \definedummyword\sf \definedummyword\sl \definedummyword\tclose \definedummyword\tt % \definedummyword\LaTeX \definedummyword\TeX % % Assorted special characters. \definedummyword\arrow \definedummyword\bullet \definedummyword\comma \definedummyword\copyright \definedummyword\registeredsymbol \definedummyword\dots \definedummyword\enddots \definedummyword\entrybreak \definedummyword\equiv \definedummyword\error \definedummyword\euro \definedummyword\expansion \definedummyword\geq \definedummyword\guillemetleft \definedummyword\guillemetright \definedummyword\guilsinglleft \definedummyword\guilsinglright \definedummyword\lbracechar \definedummyword\leq \definedummyword\minus \definedummyword\ogonek \definedummyword\pounds \definedummyword\point \definedummyword\print \definedummyword\quotedblbase \definedummyword\quotedblleft \definedummyword\quotedblright \definedummyword\quoteleft \definedummyword\quoteright \definedummyword\quotesinglbase \definedummyword\rbracechar \definedummyword\result \definedummyword\textdegree % % We want to disable all macros so that they are not expanded by \write. \macrolist % \normalturnoffactive % % Handle some cases of @value -- where it does not contain any % (non-fully-expandable) commands. \makevalueexpandable } % \commondummiesnofonts: common to \commondummies and \indexnofonts. % \def\commondummiesnofonts{% % Control letters and accents. \definedummyletter\!% \definedummyaccent\"% \definedummyaccent\'% \definedummyletter\*% \definedummyaccent\,% \definedummyletter\.% \definedummyletter\/% \definedummyletter\:% \definedummyaccent\=% \definedummyletter\?% \definedummyaccent\^% \definedummyaccent\`% \definedummyaccent\~% \definedummyword\u \definedummyword\v \definedummyword\H \definedummyword\dotaccent \definedummyword\ogonek \definedummyword\ringaccent \definedummyword\tieaccent \definedummyword\ubaraccent \definedummyword\udotaccent \definedummyword\dotless % % Texinfo font commands. \definedummyword\b \definedummyword\i \definedummyword\r \definedummyword\sansserif \definedummyword\sc \definedummyword\slanted \definedummyword\t % % Commands that take arguments. \definedummyword\abbr \definedummyword\acronym \definedummyword\anchor \definedummyword\cite \definedummyword\code \definedummyword\command \definedummyword\dfn \definedummyword\dmn \definedummyword\email \definedummyword\emph \definedummyword\env \definedummyword\file \definedummyword\image \definedummyword\indicateurl \definedummyword\inforef \definedummyword\kbd \definedummyword\key \definedummyword\math \definedummyword\option \definedummyword\pxref \definedummyword\ref \definedummyword\samp \definedummyword\strong \definedummyword\tie \definedummyword\uref \definedummyword\url \definedummyword\var \definedummyword\verb \definedummyword\w \definedummyword\xref } % \indexnofonts is used when outputting the strings to sort the index % by, and when constructing control sequence names. It eliminates all % control sequences and just writes whatever the best ASCII sort string % would be for a given command (usually its argument). % \def\indexnofonts{% % Accent commands should become @asis. \def\definedummyaccent##1{\let##1\asis}% % We can just ignore other control letters. \def\definedummyletter##1{\let##1\empty}% % All control words become @asis by default; overrides below. \let\definedummyword\definedummyaccent % \commondummiesnofonts % % Don't no-op \tt, since it isn't a user-level command % and is used in the definitions of the active chars like <, >, |, etc. % Likewise with the other plain tex font commands. %\let\tt=\asis % \def\ { }% \def\@{@}% \def\_{\normalunderscore}% \def\-{}% @- shouldn't affect sorting % % Unfortunately, texindex is not prepared to handle braces in the % content at all. So for index sorting, we map @{ and @} to strings % starting with |, since that ASCII character is between ASCII { and }. \def\{{|a}% \def\lbracechar{|a}% % \def\}{|b}% \def\rbracechar{|b}% % % Non-English letters. \def\AA{AA}% \def\AE{AE}% \def\DH{DZZ}% \def\L{L}% \def\OE{OE}% \def\O{O}% \def\TH{ZZZ}% \def\aa{aa}% \def\ae{ae}% \def\dh{dzz}% \def\exclamdown{!}% \def\l{l}% \def\oe{oe}% \def\ordf{a}% \def\ordm{o}% \def\o{o}% \def\questiondown{?}% \def\ss{ss}% \def\th{zzz}% % \def\LaTeX{LaTeX}% \def\TeX{TeX}% % % Assorted special characters. % (The following {} will end up in the sort string, but that's ok.) \def\arrow{->}% \def\bullet{bullet}% \def\comma{,}% \def\copyright{copyright}% \def\dots{...}% \def\enddots{...}% \def\equiv{==}% \def\error{error}% \def\euro{euro}% \def\expansion{==>}% \def\geq{>=}% \def\guillemetleft{<<}% \def\guillemetright{>>}% \def\guilsinglleft{<}% \def\guilsinglright{>}% \def\leq{<=}% \def\minus{-}% \def\point{.}% \def\pounds{pounds}% \def\print{-|}% \def\quotedblbase{"}% \def\quotedblleft{"}% \def\quotedblright{"}% \def\quoteleft{`}% \def\quoteright{'}% \def\quotesinglbase{,}% \def\registeredsymbol{R}% \def\result{=>}% \def\textdegree{o}% % \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax \else \indexlquoteignore \fi % % We need to get rid of all macros, leaving only the arguments (if present). % Of course this is not nearly correct, but it is the best we can do for now. % makeinfo does not expand macros in the argument to @deffn, which ends up % writing an index entry, and texindex isn't prepared for an index sort entry % that starts with \. % % Since macro invocations are followed by braces, we can just redefine them % to take a single TeX argument. The case of a macro invocation that % goes to end-of-line is not handled. % \macrolist } % Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us % ignore left quotes in the sort term. {\catcode`\`=\active \gdef\indexlquoteignore{\let`=\empty}} \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax % put index entries in margin (undocumented)? % Most index entries go through here, but \dosubind is the general case. % #1 is the index name, #2 is the entry text. \def\doind#1#2{\dosubind{#1}{#2}{}} % Workhorse for all \fooindexes. % #1 is name of index, #2 is stuff to put there, #3 is subentry -- % empty if called from \doind, as we usually are (the main exception % is with most defuns, which call us directly). % \def\dosubind#1#2#3{% \iflinks {% % Store the main index entry text (including the third arg). \toks0 = {#2}% % If third arg is present, precede it with a space. \def\thirdarg{#3}% \ifx\thirdarg\empty \else \toks0 = \expandafter{\the\toks0 \space #3}% \fi % \edef\writeto{\csname#1indfile\endcsname}% % \safewhatsit\dosubindwrite }% \fi } % Write the entry in \toks0 to the index file: % \def\dosubindwrite{% % Put the index entry in the margin if desired. \ifx\SETmarginindex\relax\else \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% \fi % % Remember, we are within a group. \indexdummies % Must do this here, since \bf, etc expand at this stage \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now % so it will be output as is; and it will print as backslash. % % Process the index entry with all font commands turned off, to % get the string to sort by. {\indexnofonts \edef\temp{\the\toks0}% need full expansion \xdef\indexsorttmp{\temp}% }% % % Set up the complete index entry, with both the sort key and % the original text, including any font commands. We write % three arguments to \entry to the .?? file (four in the % subentry case), texindex reduces to two when writing the .??s % sorted result. \edef\temp{% \write\writeto{% \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% }% \temp } % Take care of unwanted page breaks/skips around a whatsit: % % If a skip is the last thing on the list now, preserve it % by backing up by \lastskip, doing the \write, then inserting % the skip again. Otherwise, the whatsit generated by the % \write or \pdfdest will make \lastskip zero. The result is that % sequences like this: % @end defun % @tindex whatever % @defun ... % will have extra space inserted, because the \medbreak in the % start of the @defun won't see the skip inserted by the @end of % the previous defun. % % But don't do any of this if we're not in vertical mode. We % don't want to do a \vskip and prematurely end a paragraph. % % Avoid page breaks due to these extra skips, too. % % But wait, there is a catch there: % We'll have to check whether \lastskip is zero skip. \ifdim is not % sufficient for this purpose, as it ignores stretch and shrink parts % of the skip. The only way seems to be to check the textual % representation of the skip. % % The following is almost like \def\zeroskipmacro{0.0pt} except that % the ``p'' and ``t'' characters have catcode \other, not 11 (letter). % \edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} % \newskip\whatsitskip \newcount\whatsitpenalty % % ..., ready, GO: % \def\safewhatsit#1{\ifhmode #1% \else % \lastskip and \lastpenalty cannot both be nonzero simultaneously. \whatsitskip = \lastskip \edef\lastskipmacro{\the\lastskip}% \whatsitpenalty = \lastpenalty % % If \lastskip is nonzero, that means the last item was a % skip. And since a skip is discardable, that means this % -\whatsitskip glue we're inserting is preceded by a % non-discardable item, therefore it is not a potential % breakpoint, therefore no \nobreak needed. \ifx\lastskipmacro\zeroskipmacro \else \vskip-\whatsitskip \fi % #1% % \ifx\lastskipmacro\zeroskipmacro % If \lastskip was zero, perhaps the last item was a penalty, and % perhaps it was >=10000, e.g., a \nobreak. In that case, we want % to re-insert the same penalty (values >10000 are used for various % signals); since we just inserted a non-discardable item, any % following glue (such as a \parskip) would be a breakpoint. For example: % @deffn deffn-whatever % @vindex index-whatever % Description. % would allow a break between the index-whatever whatsit % and the "Description." paragraph. \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi \else % On the other hand, if we had a nonzero \lastskip, % this make-up glue would be preceded by a non-discardable item % (the whatsit from the \write), so we must insert a \nobreak. \nobreak\vskip\whatsitskip \fi \fi} % The index entry written in the file actually looks like % \entry {sortstring}{page}{topic} % or % \entry {sortstring}{page}{topic}{subtopic} % The texindex program reads in these files and writes files % containing these kinds of lines: % \initial {c} % before the first topic whose initial is c % \entry {topic}{pagelist} % for a topic that is used without subtopics % \primary {topic} % for the beginning of a topic that is used with subtopics % \secondary {subtopic}{pagelist} % for each subtopic. % Define the user-accessible indexing commands % @findex, @vindex, @kindex, @cindex. \def\findex {\fnindex} \def\kindex {\kyindex} \def\cindex {\cpindex} \def\vindex {\vrindex} \def\tindex {\tpindex} \def\pindex {\pgindex} \def\cindexsub {\begingroup\obeylines\cindexsub} {\obeylines % \gdef\cindexsub "#1" #2^^M{\endgroup % \dosubind{cp}{#2}{#1}}} % Define the macros used in formatting output of the sorted index material. % @printindex causes a particular index (the ??s file) to get printed. % It does not print any chapter heading (usually an @unnumbered). % \parseargdef\printindex{\begingroup \dobreak \chapheadingskip{10000}% % \smallfonts \rm \tolerance = 9500 \plainfrenchspacing \everypar = {}% don't want the \kern\-parindent from indentation suppression. % % See if the index file exists and is nonempty. % Change catcode of @ here so that if the index file contains % \initial {@} % as its first line, TeX doesn't complain about mismatched braces % (because it thinks @} is a control sequence). \catcode`\@ = 11 \openin 1 \jobname.#1s \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, % and it loses the chapter title and the aux file entries for the % index. The easiest way to prevent this problem is to make sure % there is some text. \putwordIndexNonexistent \else % % If the index file exists but is empty, then \openin leaves \ifeof % false. We have to make TeX try to read something from the file, so % it can discover if there is anything in it. \read 1 to \temp \ifeof 1 \putwordIndexIsEmpty \else % Index files are almost Texinfo source, but we use \ as the escape % character. It would be better to use @, but that's too big a change % to make right now. \def\indexbackslash{\backslashcurfont}% \catcode`\\ = 0 \escapechar = `\\ \begindoublecolumns \input \jobname.#1s \enddoublecolumns \fi \fi \closein 1 \endgroup} % These macros are used by the sorted index file itself. % Change them to control the appearance of the index. \def\initial#1{{% % Some minor font changes for the special characters. \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt % % Remove any glue we may have, we'll be inserting our own. \removelastskip % % We like breaks before the index initials, so insert a bonus. \nobreak \vskip 0pt plus 3\baselineskip \penalty 0 \vskip 0pt plus -3\baselineskip % % Typeset the initial. Making this add up to a whole number of % baselineskips increases the chance of the dots lining up from column % to column. It still won't often be perfect, because of the stretch % we need before each entry, but it's better. % % No shrink because it confuses \balancecolumns. \vskip 1.67\baselineskip plus .5\baselineskip \leftline{\secbf #1}% % Do our best not to break after the initial. \nobreak \vskip .33\baselineskip plus .1\baselineskip }} % \entry typesets a paragraph consisting of the text (#1), dot leaders, and % then page number (#2) flushed to the right margin. It is used for index % and table of contents entries. The paragraph is indented by \leftskip. % % A straightforward implementation would start like this: % \def\entry#1#2{... % But this freezes the catcodes in the argument, and can cause problems to % @code, which sets - active. This problem was fixed by a kludge--- % ``-'' was active throughout whole index, but this isn't really right. % The right solution is to prevent \entry from swallowing the whole text. % --kasal, 21nov03 \def\entry{% \begingroup % % Start a new paragraph if necessary, so our assignments below can't % affect previous text. \par % % Do not fill out the last line with white space. \parfillskip = 0in % % No extra space above this paragraph. \parskip = 0in % % Do not prefer a separate line ending with a hyphen to fewer lines. \finalhyphendemerits = 0 % % \hangindent is only relevant when the entry text and page number % don't both fit on one line. In that case, bob suggests starting the % dots pretty far over on the line. Unfortunately, a large % indentation looks wrong when the entry text itself is broken across % lines. So we use a small indentation and put up with long leaders. % % \hangafter is reset to 1 (which is the value we want) at the start % of each paragraph, so we need not do anything with that. \hangindent = 2em % % When the entry text needs to be broken, just fill out the first line % with blank space. \rightskip = 0pt plus1fil % % A bit of stretch before each entry for the benefit of balancing % columns. \vskip 0pt plus1pt % % When reading the text of entry, convert explicit line breaks % from @* into spaces. The user might give these in long section % titles, for instance. \def\*{\unskip\space\ignorespaces}% \def\entrybreak{\hfil\break}% % % Swallow the left brace of the text (first parameter): \afterassignment\doentry \let\temp = } \def\entrybreak{\unskip\space\ignorespaces}% \def\doentry{% \bgroup % Instead of the swallowed brace. \noindent \aftergroup\finishentry % And now comes the text of the entry. } \def\finishentry#1{% % #1 is the page number. % % The following is kludged to not output a line of dots in the index if % there are no page numbers. The next person who breaks this will be % cursed by a Unix daemon. \setbox\boxA = \hbox{#1}% \ifdim\wd\boxA = 0pt \ % \else % % If we must, put the page number on a line of its own, and fill out % this line with blank space. (The \hfil is overwhelmed with the % fill leaders glue in \indexdotfill if the page number does fit.) \hfil\penalty50 \null\nobreak\indexdotfill % Have leaders before the page number. % % The `\ ' here is removed by the implicit \unskip that TeX does as % part of (the primitive) \par. Without it, a spurious underfull % \hbox ensues. \ifpdf \pdfgettoks#1.% \ \the\toksA \else \ #1% \fi \fi \par \endgroup } % Like plain.tex's \dotfill, except uses up at least 1 em. \def\indexdotfill{\cleaders \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} \def\primary #1{\line{#1\hfil}} \newskip\secondaryindent \secondaryindent=0.5cm \def\secondary#1#2{{% \parfillskip=0in \parskip=0in \hangindent=1in \hangafter=1 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill \ifpdf \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. \else #2 \fi \par }} % Define two-column mode, which we use to typeset indexes. % Adapted from the TeXbook, page 416, which is to say, % the manmac.tex format used to print the TeXbook itself. \catcode`\@=11 \newbox\partialpage \newdimen\doublecolumnhsize \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. \output = {% % % Here is a possibility not foreseen in manmac: if we accumulate a % whole lot of material, we might end up calling this \output % routine twice in a row (see the doublecol-lose test, which is % essentially a couple of indexes with @setchapternewpage off). In % that case we just ship out what is in \partialpage with the normal % output routine. Generally, \partialpage will be empty when this % runs and this will be a no-op. See the indexspread.tex test case. \ifvoid\partialpage \else \onepageout{\pagecontents\partialpage}% \fi % \global\setbox\partialpage = \vbox{% % Unvbox the main output page. \unvbox\PAGE \kern-\topskip \kern\baselineskip }% }% \eject % run that output routine to set \partialpage % % Use the double-column output routine for subsequent pages. \output = {\doublecolumnout}% % % Change the page size parameters. We could do this once outside this % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 % format, but then we repeat the same computation. Repeating a couple % of assignments once per index is clearly meaningless for the % execution time, so we may as well do it in one place. % % First we halve the line length, less a little for the gutter between % the columns. We compute the gutter based on the line length, so it % changes automatically with the paper format. The magic constant % below is chosen so that the gutter has the same value (well, +-<1pt) % as it did when we hard-coded it. % % We put the result in a separate register, \doublecolumhsize, so we % can restore it in \pagesofar, after \hsize itself has (potentially) % been clobbered. % \doublecolumnhsize = \hsize \advance\doublecolumnhsize by -.04154\hsize \divide\doublecolumnhsize by 2 \hsize = \doublecolumnhsize % % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) \vsize = 2\vsize } % The double-column output routine for all double-column pages except % the last. % \def\doublecolumnout{% \splittopskip=\topskip \splitmaxdepth=\maxdepth % Get the available space for the double columns -- the normal % (undoubled) page height minus any material left over from the % previous page. \dimen@ = \vsize \divide\dimen@ by 2 \advance\dimen@ by -\ht\partialpage % % box0 will be the left-hand column, box2 the right. \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ \onepageout\pagesofar \unvbox255 \penalty\outputpenalty } % % Re-output the contents of the output page -- any previous material, % followed by the two boxes we just split, in box0 and box2. \def\pagesofar{% \unvbox\partialpage % \hsize = \doublecolumnhsize \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% } % % All done with double columns. \def\enddoublecolumns{% % The following penalty ensures that the page builder is exercised % _before_ we change the output routine. This is necessary in the % following situation: % % The last section of the index consists only of a single entry. % Before this section, \pagetotal is less than \pagegoal, so no % break occurs before the last section starts. However, the last % section, consisting of \initial and the single \entry, does not % fit on the page and has to be broken off. Without the following % penalty the page builder will not be exercised until \eject % below, and by that time we'll already have changed the output % routine to the \balancecolumns version, so the next-to-last % double-column page will be processed with \balancecolumns, which % is wrong: The two columns will go to the main vertical list, with % the broken-off section in the recent contributions. As soon as % the output routine finishes, TeX starts reconsidering the page % break. The two columns and the broken-off section both fit on the % page, because the two columns now take up only half of the page % goal. When TeX sees \eject from below which follows the final % section, it invokes the new output routine that we've set after % \balancecolumns below; \onepageout will try to fit the two columns % and the final section into the vbox of \pageheight (see % \pagebody), causing an overfull box. % % Note that glue won't work here, because glue does not exercise the % page builder, unlike penalties (see The TeXbook, pp. 280-281). \penalty0 % \output = {% % Split the last of the double-column material. Leave it on the % current page, no automatic page break. \balancecolumns % % If we end up splitting too much material for the current page, % though, there will be another page break right after this \output % invocation ends. Having called \balancecolumns once, we do not % want to call it again. Therefore, reset \output to its normal % definition right away. (We hope \balancecolumns will never be % called on to balance too much material, but if it is, this makes % the output somewhat more palatable.) \global\output = {\onepageout{\pagecontents\PAGE}}% }% \eject \endgroup % started in \begindoublecolumns % % \pagegoal was set to the doubled \vsize above, since we restarted % the current page. We're now back to normal single-column % typesetting, so reset \pagegoal to the normal \vsize (after the % \endgroup where \vsize got restored). \pagegoal = \vsize } % % Called at the end of the double column material. \def\balancecolumns{% \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 \advance\dimen@ by \topskip \advance\dimen@ by-\baselineskip \divide\dimen@ by 2 % target to split to %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% \splittopskip = \topskip % Loop until we get a decent breakpoint. {% \vbadness = 10000 \loop \global\setbox3 = \copy0 \global\setbox1 = \vsplit3 to \dimen@ \ifdim\ht3>\dimen@ \global\advance\dimen@ by 1pt \repeat }% %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% \setbox0=\vbox to\dimen@{\unvbox1}% \setbox2=\vbox to\dimen@{\unvbox3}% % \pagesofar } \catcode`\@ = \other \message{sectioning,} % Chapters, sections, etc. % Let's start with @part. \outer\parseargdef\part{\partzzz{#1}} \def\partzzz#1{% \chapoddpage \null \vskip.3\vsize % move it down on the page a bit \begingroup \noindent \titlefonts\rmisbold #1\par % the text \let\lastnode=\empty % no node to associate with \writetocentry{part}{#1}{}% but put it in the toc \headingsoff % no headline or footline on the part page \chapoddpage \endgroup } % \unnumberedno is an oxymoron. But we count the unnumbered % sections so that we can refer to them unambiguously in the pdf % outlines by their "section number". We avoid collisions with chapter % numbers by starting them at 10000. (If a document ever has 10000 % chapters, we're in trouble anyway, I'm sure.) \newcount\unnumberedno \unnumberedno = 10000 \newcount\chapno \newcount\secno \secno=0 \newcount\subsecno \subsecno=0 \newcount\subsubsecno \subsubsecno=0 % This counter is funny since it counts through charcodes of letters A, B, ... \newcount\appendixno \appendixno = `\@ % % \def\appendixletter{\char\the\appendixno} % We do the following ugly conditional instead of the above simple % construct for the sake of pdftex, which needs the actual % letter in the expansion, not just typeset. % \def\appendixletter{% \ifnum\appendixno=`A A% \else\ifnum\appendixno=`B B% \else\ifnum\appendixno=`C C% \else\ifnum\appendixno=`D D% \else\ifnum\appendixno=`E E% \else\ifnum\appendixno=`F F% \else\ifnum\appendixno=`G G% \else\ifnum\appendixno=`H H% \else\ifnum\appendixno=`I I% \else\ifnum\appendixno=`J J% \else\ifnum\appendixno=`K K% \else\ifnum\appendixno=`L L% \else\ifnum\appendixno=`M M% \else\ifnum\appendixno=`N N% \else\ifnum\appendixno=`O O% \else\ifnum\appendixno=`P P% \else\ifnum\appendixno=`Q Q% \else\ifnum\appendixno=`R R% \else\ifnum\appendixno=`S S% \else\ifnum\appendixno=`T T% \else\ifnum\appendixno=`U U% \else\ifnum\appendixno=`V V% \else\ifnum\appendixno=`W W% \else\ifnum\appendixno=`X X% \else\ifnum\appendixno=`Y Y% \else\ifnum\appendixno=`Z Z% % The \the is necessary, despite appearances, because \appendixletter is % expanded while writing the .toc file. \char\appendixno is not % expandable, thus it is written literally, thus all appendixes come out % with the same letter (or @) in the toc without it. \else\char\the\appendixno \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} % Each @chapter defines these (using marks) as the number+name, number % and name of the chapter. Page headings and footings can use % these. @section does likewise. \def\thischapter{} \def\thischapternum{} \def\thischaptername{} \def\thissection{} \def\thissectionnum{} \def\thissectionname{} \newcount\absseclevel % used to calculate proper heading level \newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count % @raisesections: treat @section as chapter, @subsection as section, etc. \def\raisesections{\global\advance\secbase by -1} \let\up=\raisesections % original BFox name % @lowersections: treat @chapter as section, @section as subsection, etc. \def\lowersections{\global\advance\secbase by 1} \let\down=\lowersections % original BFox name % we only have subsub. \chardef\maxseclevel = 3 % % A numbered section within an unnumbered changes to unnumbered too. % To achieve this, remember the "biggest" unnum. sec. we are currently in: \chardef\unnlevel = \maxseclevel % % Trace whether the current chapter is an appendix or not: % \chapheadtype is "N" or "A", unnumbered chapters are ignored. \def\chapheadtype{N} % Choose a heading macro % #1 is heading type % #2 is heading level % #3 is text for heading \def\genhead#1#2#3{% % Compute the abs. sec. level: \absseclevel=#2 \advance\absseclevel by \secbase % Make sure \absseclevel doesn't fall outside the range: \ifnum \absseclevel < 0 \absseclevel = 0 \else \ifnum \absseclevel > 3 \absseclevel = 3 \fi \fi % The heading type: \def\headtype{#1}% \if \headtype U% \ifnum \absseclevel < \unnlevel \chardef\unnlevel = \absseclevel \fi \else % Check for appendix sections: \ifnum \absseclevel = 0 \edef\chapheadtype{\headtype}% \else \if \headtype A\if \chapheadtype N% \errmessage{@appendix... within a non-appendix chapter}% \fi\fi \fi % Check for numbered within unnumbered: \ifnum \absseclevel > \unnlevel \def\headtype{U}% \else \chardef\unnlevel = 3 \fi \fi % Now print the heading: \if \headtype U% \ifcase\absseclevel \unnumberedzzz{#3}% \or \unnumberedseczzz{#3}% \or \unnumberedsubseczzz{#3}% \or \unnumberedsubsubseczzz{#3}% \fi \else \if \headtype A% \ifcase\absseclevel \appendixzzz{#3}% \or \appendixsectionzzz{#3}% \or \appendixsubseczzz{#3}% \or \appendixsubsubseczzz{#3}% \fi \else \ifcase\absseclevel \chapterzzz{#3}% \or \seczzz{#3}% \or \numberedsubseczzz{#3}% \or \numberedsubsubseczzz{#3}% \fi \fi \fi \suppressfirstparagraphindent } % an interface: \def\numhead{\genhead N} \def\apphead{\genhead A} \def\unnmhead{\genhead U} % @chapter, @appendix, @unnumbered. Increment top-level counter, reset % all lower-level sectioning counters to zero. % % Also set \chaplevelprefix, which we prepend to @float sequence numbers % (e.g., figures), q.v. By default (before any chapter), that is empty. \let\chaplevelprefix = \empty % \outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz#1{% % section resetting is \global in case the chapter is in a group, such % as an @include file. \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\chapno by 1 % % Used for \float. \gdef\chaplevelprefix{\the\chapno.}% \resetallfloatnos % % \putwordChapter can contain complex things in translations. \toks0=\expandafter{\putwordChapter}% \message{\the\toks0 \space \the\chapno}% % % Write the actual heading. \chapmacro{#1}{Ynumbered}{\the\chapno}% % % So @section and the like are numbered underneath this chapter. \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec } \outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz % \def\appendixzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\appendixno by 1 \gdef\chaplevelprefix{\appendixletter.}% \resetallfloatnos % % \putwordAppendix can contain complex things in translations. \toks0=\expandafter{\putwordAppendix}% \message{\the\toks0 \space \appendixletter}% % \chapmacro{#1}{Yappendix}{\appendixletter}% % \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec } % normally unnmhead0 calls unnumberedzzz: \outer\parseargdef\unnumbered{\unnmhead0{#1}} \def\unnumberedzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\unnumberedno by 1 % % Since an unnumbered has no number, no prefix for figures. \global\let\chaplevelprefix = \empty \resetallfloatnos % % This used to be simply \message{#1}, but TeX fully expands the % argument to \message. Therefore, if #1 contained @-commands, TeX % expanded them. For example, in `@unnumbered The @cite{Book}', TeX % expanded @cite (which turns out to cause errors because \cite is meant % to be executed, not expanded). % % Anyway, we don't want the fully-expanded definition of @cite to appear % as a result of the \message, we just want `@cite' itself. We use % \the to achieve this: TeX expands \the only once, % simply yielding the contents of . (We also do this for % the toc entries.) \toks0 = {#1}% \message{(\the\toks0)}% % \chapmacro{#1}{Ynothing}{\the\unnumberedno}% % \global\let\section = \unnumberedsec \global\let\subsection = \unnumberedsubsec \global\let\subsubsection = \unnumberedsubsubsec } % @centerchap is like @unnumbered, but the heading is centered. \outer\parseargdef\centerchap{% % Well, we could do the following in a group, but that would break % an assumption that \chapmacro is called at the outermost level. % Thus we are safer this way: --kasal, 24feb04 \let\centerparametersmaybe = \centerparameters \unnmhead0{#1}% \let\centerparametersmaybe = \relax } % @top is like @unnumbered. \let\top\unnumbered % Sections. % \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz \def\seczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% } % normally calls appendixsectionzzz: \outer\parseargdef\appendixsection{\apphead1{#1}} \def\appendixsectionzzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% } \let\appendixsec\appendixsection % normally calls unnumberedseczzz: \outer\parseargdef\unnumberedsec{\unnmhead1{#1}} \def\unnumberedseczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% } % Subsections. % % normally calls numberedsubseczzz: \outer\parseargdef\numberedsubsec{\numhead2{#1}} \def\numberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% } % normally calls appendixsubseczzz: \outer\parseargdef\appendixsubsec{\apphead2{#1}} \def\appendixsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno}% } % normally calls unnumberedsubseczzz: \outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} \def\unnumberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno}% } % Subsubsections. % % normally numberedsubsubseczzz: \outer\parseargdef\numberedsubsubsec{\numhead3{#1}} \def\numberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynumbered}% {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% } % normally appendixsubsubseczzz: \outer\parseargdef\appendixsubsubsec{\apphead3{#1}} \def\appendixsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% } % normally unnumberedsubsubseczzz: \outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} \def\unnumberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% } % These macros control what the section commands do, according % to what kind of chapter we are in (ordinary, appendix, or unnumbered). % Define them by default for a numbered chapter. \let\section = \numberedsec \let\subsection = \numberedsubsec \let\subsubsection = \numberedsubsubsec % Define @majorheading, @heading and @subheading \def\majorheading{% {\advance\chapheadingskip by 10pt \chapbreak }% \parsearg\chapheadingzzz } \def\chapheading{\chapbreak \parsearg\chapheadingzzz} \def\chapheadingzzz#1{% \vbox{\chapfonts \raggedtitlesettings #1\par}% \nobreak\bigskip \nobreak \suppressfirstparagraphindent } % @heading, @subheading, @subsubheading. \parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} % These macros generate a chapter, section, etc. heading only % (including whitespace, linebreaking, etc. around it), % given all the information in convenient, parsed form. % Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} % Parameter controlling skip before chapter headings (if needed) \newskip\chapheadingskip % Define plain chapter starts, and page on/off switching for it. \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} % Because \domark is called before \chapoddpage, the filler page will % get the headings for the next chapter, which is wrong. But we don't % care -- we just disable all headings on the filler page. \def\chapoddpage{% \chappager \ifodd\pageno \else \begingroup \headingsoff \null \chappager \endgroup \fi } \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} \def\CHAPPAGoff{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chapbreak \global\let\pagealignmacro=\chappager} \def\CHAPPAGon{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chappager \global\let\pagealignmacro=\chappager \global\def\HEADINGSon{\HEADINGSsingle}} \def\CHAPPAGodd{% \global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage \global\def\HEADINGSon{\HEADINGSdouble}} \CHAPPAGon % Chapter opening. % % #1 is the text, #2 is the section type (Ynumbered, Ynothing, % Yappendix, Yomitfromtoc), #3 the chapter number. % % To test against our argument. \def\Ynothingkeyword{Ynothing} \def\Yomitfromtockeyword{Yomitfromtoc} \def\Yappendixkeyword{Yappendix} % \def\chapmacro#1#2#3{% % Insert the first mark before the heading break (see notes for \domark). \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% \gdef\thissection{}}% % \def\temptype{#2}% \ifx\temptype\Ynothingkeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{\thischaptername}}% \else\ifx\temptype\Yomitfromtockeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{}}% \else\ifx\temptype\Yappendixkeyword \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\appendixletter}% % \noexpand\putwordAppendix avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \else \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\the\chapno}% % \noexpand\putwordChapter avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordChapter{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \fi\fi\fi % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert the chapter heading break. \pchapsepmacro % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \domark % {% \chapfonts \rmisbold % % Have to define \lastsection before calling \donoderef, because the % xref code eventually uses it. On the other hand, it has to be called % after \pchapsepmacro, or the headline will change too soon. \gdef\lastsection{#1}% % % Only insert the separating space if we have a chapter/appendix % number, and don't print the unnumbered ``number''. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unnchap}% \else\ifx\temptype\Yomitfromtockeyword \setbox0 = \hbox{}% contents like unnumbered, but no toc entry \def\toctype{omit}% \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% \def\toctype{app}% \else \setbox0 = \hbox{#3\enspace}% \def\toctype{numchap}% \fi\fi\fi % % Write the toc entry for this chapter. Must come before the % \donoderef, because we include the current node name in the toc % entry, and \donoderef resets it to empty. \writetocentry{\toctype}{#1}{#3}% % % For pdftex, we have to write out the node definition (aka, make % the pdfdest) after any page break, but before the actual text has % been typeset. If the destination for the pdf outline is after the % text, then jumping from the outline may wind up with the text not % being visible, for instance under high magnification. \donoderef{#2}% % % Typeset the actual heading. \nobreak % Avoid page breaks at the interline glue. \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title \nobreak } % @centerchap -- centered and unnumbered. \let\centerparametersmaybe = \relax \def\centerparameters{% \advance\rightskip by 3\rightskip \leftskip = \rightskip \parfillskip = 0pt } % I don't think this chapter style is supported any more, so I'm not % updating it with the new noderef stuff. We'll see. --karl, 11aug03. % \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} % \def\unnchfopen #1{% \chapoddpage \vbox{\chapfonts \raggedtitlesettings #1\par}% \nobreak\bigskip\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% \par\penalty 5000 % } \def\centerchfopen #1{% \chapoddpage \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}% \nobreak\bigskip \nobreak } \def\CHAPFopen{% \global\let\chapmacro=\chfopen \global\let\centerchapmacro=\centerchfopen} % Section titles. These macros combine the section number parts and % call the generic \sectionheading to do the printing. % \newskip\secheadingskip \def\secheadingbreak{\dobreak \secheadingskip{-1000}} % Subsection titles. \newskip\subsecheadingskip \def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} % Subsubsection titles. \def\subsubsecheadingskip{\subsecheadingskip} \def\subsubsecheadingbreak{\subsecheadingbreak} % Print any size, any type, section title. % % #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is % the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the % section number. % \def\seckeyword{sec} % \def\sectionheading#1#2#3#4{% {% \checkenv{}% should not be in an environment. % % Switch to the right set of fonts. \csname #2fonts\endcsname \rmisbold % \def\sectionlevel{#2}% \def\temptype{#3}% % % Insert first mark before the heading break (see notes for \domark). \let\prevsectiondefs=\lastsectiondefs \ifx\temptype\Ynothingkeyword \ifx\sectionlevel\seckeyword \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% \gdef\thissection{\thissectionname}}% \fi \else\ifx\temptype\Yomitfromtockeyword % Don't redefine \thissection. \else\ifx\temptype\Yappendixkeyword \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \else \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \fi\fi\fi % % Go into vertical mode. Usually we'll already be there, but we % don't want the following whatsit to end up in a preceding paragraph % if the document didn't happen to have a blank line. \par % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert space above the heading. \csname #2headingbreak\endcsname % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevsectiondefs=\lastsectiondefs \domark % % Only insert the space after the number if we have a section number. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unn}% \gdef\lastsection{#1}% \else\ifx\temptype\Yomitfromtockeyword % for @headings -- no section number, don't include in toc, % and don't redefine \lastsection. \setbox0 = \hbox{}% \def\toctype{omit}% \let\sectionlevel=\empty \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{#4\enspace}% \def\toctype{app}% \gdef\lastsection{#1}% \else \setbox0 = \hbox{#4\enspace}% \def\toctype{num}% \gdef\lastsection{#1}% \fi\fi\fi % % Write the toc entry (before \donoderef). See comments in \chapmacro. \writetocentry{\toctype\sectionlevel}{#1}{#4}% % % Write the node reference (= pdf destination for pdftex). % Again, see comments in \chapmacro. \donoderef{#3}% % % Interline glue will be inserted when the vbox is completed. % That glue will be a valid breakpoint for the page, since it'll be % preceded by a whatsit (usually from the \donoderef, or from the % \writetocentry if there was no node). We don't want to allow that % break, since then the whatsits could end up on page n while the % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. \nobreak % % Output the actual section heading. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 % zero if no section number \unhbox0 #1}% }% % Add extra space after the heading -- half of whatever came above it. % Don't allow stretch, though. \kern .5 \csname #2headingskip\endcsname % % Do not let the kern be a potential breakpoint, as it would be if it % was followed by glue. \nobreak % % We'll almost certainly start a paragraph next, so don't let that % glue accumulate. (Not a breakpoint because it's preceded by a % discardable item.) However, when a paragraph is not started next % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out % or the negative glue will cause weirdly wrong output, typically % obscuring the section heading with something else. \vskip-\parskip % % This is so the last item on the main vertical list is a known % \penalty > 10000, so \startdefun, etc., can recognize the situation % and do the needful. \penalty 10001 } \message{toc,} % Table of contents. \newwrite\tocfile % Write an entry to the toc file, opening it if necessary. % Called from @chapter, etc. % % Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} % We append the current node name (if any) and page number as additional % arguments for the \{chap,sec,...}entry macros which will eventually % read this. The node name is used in the pdf outlines as the % destination to jump to. % % We open the .toc file for writing here instead of at @setfilename (or % any other fixed time) so that @contents can be anywhere in the document. % But if #1 is `omit', then we don't do anything. This is used for the % table of contents chapter openings themselves. % \newif\iftocfileopened \def\omitkeyword{omit}% % \def\writetocentry#1#2#3{% \edef\writetoctype{#1}% \ifx\writetoctype\omitkeyword \else \iftocfileopened\else \immediate\openout\tocfile = \jobname.toc \global\tocfileopenedtrue \fi % \iflinks {\atdummies \edef\temp{% \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% \temp }% \fi \fi % % Tell \shipout to create a pdf destination on each page, if we're % writing pdf. These are used in the table of contents. We can't % just write one on every page because the title pages are numbered % 1 and 2 (the page numbers aren't printed), and so are the first % two pages of the document. Thus, we'd have two destinations named % `1', and two named `2'. \ifpdf \global\pdfmakepagedesttrue \fi } % These characters do not print properly in the Computer Modern roman % fonts, so we must take special care. This is more or less redundant % with the Texinfo input format setup at the end of this file. % \def\activecatcodes{% \catcode`\"=\active \catcode`\$=\active \catcode`\<=\active \catcode`\>=\active \catcode`\\=\active \catcode`\^=\active \catcode`\_=\active \catcode`\|=\active \catcode`\~=\active } % Read the toc file, which is essentially Texinfo input. \def\readtocfile{% \setupdatafile \activecatcodes \input \tocreadfilename } \newskip\contentsrightmargin \contentsrightmargin=1in \newcount\savepageno \newcount\lastnegativepageno \lastnegativepageno = -1 % Prepare to read what we've written to \tocfile. % \def\startcontents#1{% % If @setchapternewpage on, and @headings double, the contents should % start on an odd page, unlike chapters. Thus, we maintain % \contentsalignmacro in parallel with \pagealignmacro. % From: Torbjorn Granlund \contentsalignmacro \immediate\closeout\tocfile % % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \chapmacro{#1}{Yomitfromtoc}{}% % \savepageno = \pageno \begingroup % Set up to handle contents files properly. \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. % % Roman numerals for page numbers. \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi } % redefined for the two-volume lispref. We always output on % \jobname.toc even if this is redefined. % \def\tocreadfilename{\jobname.toc} % Normal (long) toc. % \def\contents{% \startcontents{\putwordTOC}% \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \ifeof 1 \else \pdfmakeoutlines \fi \closein 1 \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } % And just the chapters. \def\summarycontents{% \startcontents{\putwordShortTOC}% % \let\partentry = \shortpartentry \let\numchapentry = \shortchapentry \let\appentry = \shortchapentry \let\unnchapentry = \shortunnchapentry % We want a true roman here for the page numbers. \secfonts \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl \let\tt=\shortconttt \rm \hyphenpenalty = 10000 \advance\baselineskip by 1pt % Open it up a little. \def\numsecentry##1##2##3##4{} \let\appsecentry = \numsecentry \let\unnsecentry = \numsecentry \let\numsubsecentry = \numsecentry \let\appsubsecentry = \numsecentry \let\unnsubsecentry = \numsecentry \let\numsubsubsecentry = \numsecentry \let\appsubsubsecentry = \numsecentry \let\unnsubsubsecentry = \numsecentry \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \closein 1 \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } \let\shortcontents = \summarycontents % Typeset the label for a chapter or appendix for the short contents. % The arg is, e.g., `A' for an appendix, or `3' for a chapter. % \def\shortchaplabel#1{% % This space should be enough, since a single number is .5em, and the % widest letter (M) is 1em, at least in the Computer Modern fonts. % But use \hss just in case. % (This space doesn't include the extra space that gets added after % the label; that gets put in by \shortchapentry above.) % % We'd like to right-justify chapter numbers, but that looks strange % with appendix letters. And right-justifying numbers and % left-justifying letters looks strange when there is less than 10 % chapters. Have to read the whole toc once to know how many chapters % there are before deciding ... \hbox to 1em{#1\hss}% } % These macros generate individual entries in the table of contents. % The first argument is the chapter or section name. % The last argument is the page number. % The arguments in between are the chapter number, section number, ... % Parts, in the main contents. Replace the part number, which doesn't % exist, with an empty box. Let's hope all the numbers have the same width. % Also ignore the page number, which is conventionally not printed. \def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}} \def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}} % % Parts, in the short toc. \def\shortpartentry#1#2#3#4{% \penalty-300 \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip \shortchapentry{{\bf #1}}{\numeralbox}{}{}% } % Chapters, in the main contents. \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} % % Chapters, in the short toc. % See comments in \dochapentry re vbox and related settings. \def\shortchapentry#1#2#3#4{% \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% } % Appendices, in the main contents. % Need the word Appendix, and a fixed-size box. % \def\appendixbox#1{% % We use M since it's probably the widest letter. \setbox0 = \hbox{\putwordAppendix{} M}% \hbox to \wd0{\putwordAppendix{} #1\hss}} % \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} % Unnumbered chapters. \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} % Sections. \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} \let\appsecentry=\numsecentry \def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} % Subsections. \def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} \let\appsubsecentry=\numsubsecentry \def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} % And subsubsections. \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} \let\appsubsubsecentry=\numsubsubsecentry \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} % This parameter controls the indentation of the various levels. % Same as \defaultparindent. \newdimen\tocindent \tocindent = 15pt % Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. % % If the toc has to be broken over pages, we want it to be at chapters % if at all possible; hence the \penalty. \def\dochapentry#1#2{% \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip \begingroup \chapentryfonts \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup \nobreak\vskip .25\baselineskip plus.1\baselineskip } \def\dosecentry#1#2{\begingroup \secentryfonts \leftskip=\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsecentry#1#2{\begingroup \subsecentryfonts \leftskip=2\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsubsecentry#1#2{\begingroup \subsubsecentryfonts \leftskip=3\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} % We use the same \entry macro as for the index entries. \let\tocentry = \entry % Space between chapter (or whatever) number and the title. \def\labelspace{\hskip1em \relax} \def\dopageno#1{{\rm #1}} \def\doshortpageno#1{{\rm #1}} \def\chapentryfonts{\secfonts \rm} \def\secentryfonts{\textfonts} \def\subsecentryfonts{\textfonts} \def\subsubsecentryfonts{\textfonts} \message{environments,} % @foo ... @end foo. % @tex ... @end tex escapes into raw TeX temporarily. % One exception: @ is still an escape character, so that @end tex works. % But \@ or @@ will get a plain @ character. \envdef\tex{% \setupmarkupstyle{tex}% \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie \catcode `\%=14 \catcode `\+=\other \catcode `\"=\other \catcode `\|=\other \catcode `\<=\other \catcode `\>=\other \catcode`\`=\other \catcode`\'=\other \escapechar=`\\ % % ' is active in math mode (mathcode"8000). So reset it, and all our % other math active characters (just in case), to plain's definitions. \mathactive % \let\b=\ptexb \let\bullet=\ptexbullet \let\c=\ptexc \let\,=\ptexcomma \let\.=\ptexdot \let\dots=\ptexdots \let\equiv=\ptexequiv \let\!=\ptexexclam \let\i=\ptexi \let\indent=\ptexindent \let\noindent=\ptexnoindent \let\{=\ptexlbrace \let\+=\tabalign \let\}=\ptexrbrace \let\/=\ptexslash \let\*=\ptexstar \let\t=\ptext \expandafter \let\csname top\endcsname=\ptextop % outer \let\frenchspacing=\plainfrenchspacing % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% \def\@{@}% } % There is no need to define \Etex. % Define @lisp ... @end lisp. % @lisp environment forms a group so it can rebind things, % including the definition of @end lisp (which normally is erroneous). % Amount to narrow the margins by for @lisp. \newskip\lispnarrowing \lispnarrowing=0.4in % This is the definition that ^^M gets inside @lisp, @example, and other % such environments. \null is better than a space, since it doesn't % have any width. \def\lisppar{\null\endgraf} % This space is always present above and below environments. \newskip\envskipamount \envskipamount = 0pt % Make spacing and below environment symmetrical. We use \parskip here % to help in doing that, since in @example-like environments \parskip % is reset to zero; thus the \afterenvbreak inserts no space -- but the % start of the next paragraph will insert \parskip. % \def\aboveenvbreak{{% % =10000 instead of <10000 because of a special case in \itemzzz and % \sectionheading, q.v. \ifnum \lastpenalty=10000 \else \advance\envskipamount by \parskip \endgraf \ifdim\lastskip<\envskipamount \removelastskip % it's not a good place to break if the last penalty was \nobreak % or better ... \ifnum\lastpenalty<10000 \penalty-50 \fi \vskip\envskipamount \fi \fi }} \let\afterenvbreak = \aboveenvbreak % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will % also clear it, so that its embedded environments do the narrowing again. \let\nonarrowing=\relax % @cartouche ... @end cartouche: draw rectangle w/rounded corners around % environment contents. \font\circle=lcircle10 \newdimen\circthick \newdimen\cartouter\newdimen\cartinner \newskip\normbskip\newskip\normpskip\newskip\normlskip \circthick=\fontdimen8\circle % \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth \def\ctr{{\hskip 6pt\circle\char'010}} \def\cbl{{\circle\char'012\hskip -6pt}} \def\cbr{{\hskip 6pt\circle\char'011}} \def\carttop{\hbox to \cartouter{\hskip\lskip \ctl\leaders\hrule height\circthick\hfil\ctr \hskip\rskip}} \def\cartbot{\hbox to \cartouter{\hskip\lskip \cbl\leaders\hrule height\circthick\hfil\cbr \hskip\rskip}} % \newskip\lskip\newskip\rskip \envdef\cartouche{% \ifhmode\par\fi % can't be in the midst of a paragraph. \startsavinginserts \lskip=\leftskip \rskip=\rightskip \leftskip=0pt\rightskip=0pt % we want these *outside*. \cartinner=\hsize \advance\cartinner by-\lskip \advance\cartinner by-\rskip \cartouter=\hsize \advance\cartouter by 18.4pt % allow for 3pt kerns on either % side, and for 6pt waste from % each corner char, and rule thickness \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip % Flag to tell @lisp, etc., not to narrow margin. \let\nonarrowing = t% % % If this cartouche directly follows a sectioning command, we need the % \parskip glue (backspaced over by default) or the cartouche can % collide with the section heading. \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi % \vbox\bgroup \baselineskip=0pt\parskip=0pt\lineskip=0pt \carttop \hbox\bgroup \hskip\lskip \vrule\kern3pt \vbox\bgroup \kern3pt \hsize=\cartinner \baselineskip=\normbskip \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip \comment % For explanation, see the end of def\group. } \def\Ecartouche{% \ifhmode\par\fi \kern3pt \egroup \kern3pt\vrule \hskip\rskip \egroup \cartbot \egroup \checkinserts } % This macro is called at the beginning of all the @example variants, % inside a group. \newdimen\nonfillparindent \def\nonfillstart{% \aboveenvbreak \hfuzz = 12pt % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt % Turn off paragraph indentation but redefine \indent to emulate % the normal \indent. \nonfillparindent=\parindent \parindent = 0pt \let\indent\nonfillindent % \emergencystretch = 0pt % don't try to avoid overfull boxes \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=\lispnarrowing \else \let\nonarrowing = \relax \fi \let\exdent=\nofillexdent } \begingroup \obeyspaces % We want to swallow spaces (but not other tokens) after the fake % @indent in our nonfill-environments, where spaces are normally % active and set to @tie, resulting in them not being ignored after % @indent. \gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% \gdef\nonfillindentcheck{% \ifx\temp % \expandafter\nonfillindentgobble% \else% \leavevmode\nonfillindentbox% \fi% }% \endgroup \def\nonfillindentgobble#1{\nonfillindent} \def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} % If you want all examples etc. small: @set dispenvsize small. % If you want even small examples the full size: @set dispenvsize nosmall. % This affects the following displayed environments: % @example, @display, @format, @lisp % \def\smallword{small} \def\nosmallword{nosmall} \let\SETdispenvsize\relax \def\setnormaldispenv{% \ifx\SETdispenvsize\smallword % end paragraph for sake of leading, in case document has no blank % line. This is redundant with what happens in \aboveenvbreak, but % we need to do it before changing the fonts, and it's inconvenient % to change the fonts afterward. \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } \def\setsmalldispenv{% \ifx\SETdispenvsize\nosmallword \else \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } % We often define two environments, @foo and @smallfoo. % Let's do it in one command. #1 is the env name, #2 the definition. \def\makedispenvdef#1#2{% \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}% \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}% \expandafter\let\csname E#1\endcsname \afterenvbreak \expandafter\let\csname Esmall#1\endcsname \afterenvbreak } % Define two environment synonyms (#1 and #2) for an environment. \def\maketwodispenvdef#1#2#3{% \makedispenvdef{#1}{#3}% \makedispenvdef{#2}{#3}% } % % @lisp: indented, narrowed, typewriter font; % @example: same as @lisp. % % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. % \maketwodispenvdef{lisp}{example}{% \nonfillstart \tt\setupmarkupstyle{example}% \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } % @display/@smalldisplay: same as @lisp except keep current font. % \makedispenvdef{display}{% \nonfillstart \gobble } % @format/@smallformat: same as @display except don't narrow margins. % \makedispenvdef{format}{% \let\nonarrowing = t% \nonfillstart \gobble } % @flushleft: same as @format, but doesn't obey \SETdispenvsize. \envdef\flushleft{% \let\nonarrowing = t% \nonfillstart \gobble } \let\Eflushleft = \afterenvbreak % @flushright. % \envdef\flushright{% \let\nonarrowing = t% \nonfillstart \advance\leftskip by 0pt plus 1fill\relax \gobble } \let\Eflushright = \afterenvbreak % @raggedright does more-or-less normal line breaking but no right % justification. From plain.tex. \envdef\raggedright{% \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax } \let\Eraggedright\par \envdef\raggedleft{% \parindent=0pt \leftskip0pt plus2em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedleft\par \envdef\raggedcenter{% \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedcenter\par % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. We keep \parskip nonzero in general, since % we're doing normal filling. So, when using \aboveenvbreak and % \afterenvbreak, temporarily make \parskip 0. % \makedispenvdef{quotation}{\quotationstart} % \def\quotationstart{% \indentedblockstart % same as \indentedblock, but increase right margin too. \ifx\nonarrowing\relax \advance\rightskip by \lispnarrowing \fi \parsearg\quotationlabel } % We have retained a nonzero parskip for the environment, since we're % doing normal filling. % \def\Equotation{% \par \ifx\quotationauthor\thisisundefined\else % indent a bit. \leftline{\kern 2\leftskip \sl ---\quotationauthor}% \fi {\parskip=0pt \afterenvbreak}% } \def\Esmallquotation{\Equotation} % If we're given an argument, typeset it in bold with a colon after. \def\quotationlabel#1{% \def\temp{#1}% \ifx\temp\empty \else {\bf #1: }% \fi } % @indentedblock is like @quotation, but indents only on the left and % has no optional argument. % \makedispenvdef{indentedblock}{\indentedblockstart} % \def\indentedblockstart{% {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip \parindent=0pt % % @cartouche defines \nonarrowing to inhibit narrowing at next level down. \ifx\nonarrowing\relax \advance\leftskip by \lispnarrowing \exdentamount = \lispnarrowing \else \let\nonarrowing = \relax \fi } % Keep a nonzero parskip for the environment, since we're doing normal filling. % \def\Eindentedblock{% \par {\parskip=0pt \afterenvbreak}% } \def\Esmallindentedblock{\Eindentedblock} % LaTeX-like @verbatim...@end verbatim and @verb{...} % If we want to allow any as delimiter, % we need the curly braces so that makeinfo sees the @verb command, eg: % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org % % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. % % [Knuth] p.344; only we need to do the other characters Texinfo sets % active too. Otherwise, they get lost as the first character on a % verbatim line. \def\dospecials{% \do\ \do\\\do\{\do\}\do\$\do\&% \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% \do\<\do\>\do\|\do\@\do+\do\"% % Don't do the quotes -- if we do, @set txicodequoteundirected and % @set txicodequotebacktick will not have effect on @verb and % @verbatim, and ?` and !` ligatures won't get disabled. %\do\`\do\'% } % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=\other}\dospecials} % % Setup for the @verb command. % % Eight spaces for a tab \begingroup \catcode`\^^I=\active \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} \endgroup % \def\setupverb{% \tt % easiest (and conventionally used) font for verbatim \def\par{\leavevmode\endgraf}% \setupmarkupstyle{verb}% \tabeightspaces % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces } % Setup for the @verbatim environment % % Real tab expansion. \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % % We typeset each line of the verbatim in an \hbox, so we can handle % tabs. The \global is in case the verbatim line starts with an accent, % or some other command that starts with a begin-group. Otherwise, the % entire \verbbox would disappear at the corresponding end-group, before % it is typeset. Meanwhile, we can't have nested verbatim commands % (can we?), so the \global won't be overwriting itself. \newbox\verbbox \def\starttabbox{\global\setbox\verbbox=\hbox\bgroup} % \begingroup \catcode`\^^I=\active \gdef\tabexpand{% \catcode`\^^I=\active \def^^I{\leavevmode\egroup \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab \divide\dimen\verbbox by\tabw \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox }% } \endgroup % start the verbatim environment. \def\setupverbatim{% \let\nonarrowing = t% \nonfillstart \tt % easiest (and conventionally used) font for verbatim % The \leavevmode here is for blank lines. Otherwise, we would % never \starttabox and the \egroup would end verbatim mode. \def\par{\leavevmode\egroup\box\verbbox\endgraf}% \tabexpand \setupmarkupstyle{verbatim}% % Respect line breaks, % print special symbols as themselves, and % make each space count. % Must do in this order: \obeylines \uncatcodespecials \sepspaces \everypar{\starttabbox}% } % Do the @verb magic: verbatim text is quoted by unique % delimiter characters. Before first delimiter expect a % right brace, after last delimiter expect closing brace: % % \def\doverb'{'#1'}'{#1} % % [Knuth] p. 382; only eat outer {} \begingroup \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] \endgroup % \def\verb{\begingroup\setupverb\doverb} % % % Do the @verbatim magic: define the macro \doverbatim so that % the (first) argument ends when '@end verbatim' is reached, ie: % % \def\doverbatim#1@end verbatim{#1} % % For Texinfo it's a lot easier than for LaTeX, % because texinfo's \verbatim doesn't stop at '\end{verbatim}': % we need not redefine '\', '{' and '}'. % % Inspired by LaTeX's verbatim command set [latex.ltx] % \begingroup \catcode`\ =\active \obeylines % % ignore everything up to the first ^^M, that's the newline at the end % of the @verbatim input line itself. Otherwise we get an extra blank % line in the output. \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% % We really want {...\end verbatim} in the body of the macro, but % without the active space; thus we have to use \xdef and \gobble. \endgroup % \envdef\verbatim{% \setupverbatim\doverbatim } \let\Everbatim = \afterenvbreak % @verbatiminclude FILE - insert text of file in verbatim environment. % \def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} % \def\doverbatiminclude#1{% {% \makevalueexpandable \setupverbatim \indexnofonts % Allow `@@' and other weird things in file names. \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}% \input #1 \afterenvbreak }% } % @copying ... @end copying. % Save the text away for @insertcopying later. % % We save the uninterpreted tokens, rather than creating a box. % Saving the text in a box would be much easier, but then all the % typesetting commands (@smallbook, font changes, etc.) have to be done % beforehand -- and a) we want @copying to be done first in the source % file; b) letting users define the frontmatter in as flexible order as % possible is very desirable. % \def\copying{\checkenv{}\begingroup\scanargctxt\docopying} \def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} % \def\insertcopying{% \begingroup \parindent = 0pt % paragraph indentation looks wrong on title page \scanexp\copyingtext \endgroup } \message{defuns,} % @defun etc. \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deflastargmargin \deflastargmargin=18pt \newcount\defunpenalty % Start the processing of @deffn: \def\startdefun{% \ifnum\lastpenalty<10000 \medbreak \defunpenalty=10003 % Will keep this @deffn together with the % following @def command, see below. \else % If there are two @def commands in a row, we'll have a \nobreak, % which is there to keep the function description together with its % header. But if there's nothing but headers, we need to allow a % break somewhere. Check specifically for penalty 10002, inserted % by \printdefunline, instead of 10000, since the sectioning % commands also insert a nobreak penalty, and we don't want to allow % a break between a section heading and a defun. % % As a further refinement, we avoid "club" headers by signalling % with penalty of 10003 after the very first @deffn in the % sequence (see above), and penalty of 10002 after any following % @def command. \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi % % Similarly, after a section heading, do not allow a break. % But do insert the glue. \medskip % preceded by discardable penalty, so not a breakpoint \fi % \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent } \def\dodefunx#1{% % First, check whether we are in the right environment: \checkenv#1% % % As above, allow line break if we have multiple x headers in a row. % It's not a great place, though. \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi % % And now, it's time to reuse the body of the original defun: \expandafter\gobbledefun#1% } \def\gobbledefun#1\startdefun{} % \printdefunline \deffnheader{text} % \def\printdefunline#1#2{% \begingroup % call \deffnheader: #1#2 \endheader % common ending: \interlinepenalty = 10000 \advance\rightskip by 0pt plus 1fil\relax \endgraf \nobreak\vskip -\parskip \penalty\defunpenalty % signal to \startdefun and \dodefunx % Some of the @defun-type tags do not enable magic parentheses, % rendering the following check redundant. But we don't optimize. \checkparencounts \endgroup } \def\Edefun{\endgraf\medbreak} % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; % the only thing remaining is to define \deffnheader. % \def\makedefun#1{% \expandafter\let\csname E#1\endcsname = \Edefun \edef\temp{\noexpand\domakedefun \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% \temp } % \domakedefun \deffn \deffnx \deffnheader % % Define \deffn and \deffnx, without parameters. % \deffnheader has to be defined explicitly. % \def\domakedefun#1#2#3{% \envdef#1{% \startdefun \doingtypefnfalse % distinguish typed functions from all else \parseargusing\activeparens{\printdefunline#3}% }% \def#2{\dodefunx#1}% \def#3% } \newif\ifdoingtypefn % doing typed function? \newif\ifrettypeownline % typeset return type on its own line? % @deftypefnnewline on|off says whether the return type of typed functions % are printed on their own line. This affects @deftypefn, @deftypefun, % @deftypeop, and @deftypemethod. % \parseargdef\deftypefnnewline{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETtxideftypefnnl\endcsname = \empty \else\ifx\temp\offword \expandafter\let\csname SETtxideftypefnnl\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @txideftypefnnl value `\temp', must be on|off}% \fi\fi } % Untyped functions: % @deffn category name args \makedefun{deffn}{\deffngeneral{}} % @deffn category class name args \makedefun{defop}#1 {\defopon{#1\ \putwordon}} % \defopon {category on}class name args \def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deffngeneral {subind}category name args % \def\deffngeneral#1#2 #3 #4\endheader{% % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. \dosubind{fn}{\code{#3}}{#1}% \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% } % Typed functions: % @deftypefn category type name args \makedefun{deftypefn}{\deftypefngeneral{}} % @deftypeop category class type name args \makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} % \deftypeopon {category on}class type name args \def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deftypefngeneral {subind}category type name args % \def\deftypefngeneral#1#2 #3 #4 #5\endheader{% \dosubind{fn}{\code{#4}}{#1}% \doingtypefntrue \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } % Typed variables: % @deftypevr category type var args \makedefun{deftypevr}{\deftypecvgeneral{}} % @deftypecv category class type var args \makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} % \deftypecvof {category of}class type var args \def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } % \deftypecvgeneral {subind}category type var args % \def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% \dosubind{vr}{\code{#4}}{#1}% \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } % Untyped variables: % @defvr category var args \makedefun{defvr}#1 {\deftypevrheader{#1} {} } % @defcv category class var args \makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} % \defcvof {category of}class var args \def\defcvof#1#2 {\deftypecvof{#1}#2 {} } % Types: % @deftp category name args \makedefun{deftp}#1 #2 #3\endheader{% \doind{tp}{\code{#2}}% \defname{#1}{}{#2}\defunargs{#3\unskip}% } % Remaining @defun-like shortcuts: \makedefun{defun}{\deffnheader{\putwordDeffunc} } \makedefun{defmac}{\deffnheader{\putwordDefmac} } \makedefun{defspec}{\deffnheader{\putwordDefspec} } \makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } \makedefun{defvar}{\defvrheader{\putwordDefvar} } \makedefun{defopt}{\defvrheader{\putwordDefopt} } \makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } \makedefun{defmethod}{\defopon\putwordMethodon} \makedefun{deftypemethod}{\deftypeopon\putwordMethodon} \makedefun{defivar}{\defcvof\putwordInstanceVariableof} \makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} % \defname, which formats the name of the @def (not the args). % #1 is the category, such as "Function". % #2 is the return type, if any. % #3 is the function name. % % We are followed by (but not passed) the arguments, if any. % \def\defname#1#2#3{% \par % Get the values of \leftskip and \rightskip as they were outside the @def... \advance\leftskip by -\defbodyindent % % Determine if we are typesetting the return type of a typed function % on a line by itself. \rettypeownlinefalse \ifdoingtypefn % doing a typed function specifically? % then check user option for putting return type on its own line: \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else \rettypeownlinetrue \fi \fi % % How we'll format the category name. Putting it in brackets helps % distinguish it from the body text that may end up on the next line % just below it. \def\temp{#1}% \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} % % Figure out line sizes for the paragraph shape. We'll always have at % least two. \tempnum = 2 % % The first line needs space for \box0; but if \rightskip is nonzero, % we need only space for the part of \box0 which exceeds it: \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip % % If doing a return type on its own line, we'll have another line. \ifrettypeownline \advance\tempnum by 1 \def\maybeshapeline{0in \hsize}% \else \def\maybeshapeline{}% \fi % % The continuations: \dimen2=\hsize \advance\dimen2 by -\defargsindent % % The final paragraph shape: \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2 % % Put the category name at the right margin. \noindent \hbox to 0pt{% \hfil\box0 \kern-\hsize % \hsize has to be shortened this way: \kern\leftskip % Intentionally do not respect \rightskip, since we need the space. }% % % Allow all lines to be underfull without complaint: \tolerance=10000 \hbadness=10000 \exdentamount=\defbodyindent {% % defun fonts. We use typewriter by default (used to be bold) because: % . we're printing identifiers, they should be in tt in principle. % . in languages with many accents, such as Czech or French, it's % common to leave accents off identifiers. The result looks ok in % tt, but exceedingly strange in rm. % . we don't want -- and --- to be treated as ligatures. % . this still does not fix the ?` and !` ligatures, but so far no % one has made identifiers using them :). \df \tt \def\temp{#2}% text of the return type \ifx\temp\empty\else \tclose{\temp}% typeset the return type \ifrettypeownline % put return type on its own line; prohibit line break following: \hfil\vadjust{\nobreak}\break \else \space % type on same line, so just followed by a space \fi \fi % no return type #3% output function name }% {\rm\enskip}% hskip 0.5 em of \tenrm % \boldbrax % arguments will be output next, if any. } % Print arguments in slanted roman (not ttsl), inconsistently with using % tt for the name. This is because literal text is sometimes needed in % the argument list (groff manual), and ttsl and tt are not very % distinguishable. Prevent hyphenation at `-' chars. % \def\defunargs#1{% % use sl by default (not ttsl), % tt for the names. \df \sl \hyphenchar\font=0 % % On the other hand, if an argument has two dashes (for instance), we % want a way to get ttsl. We used to recommend @var for that, so % leave the code in, but it's strange for @var to lead to typewriter. % Nowadays we recommend @code, since the difference between a ttsl hyphen % and a tt hyphen is pretty tiny. @code also disables ?` !`. \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% #1% \sl\hyphenchar\font=45 } % We want ()&[] to print specially on the defun line. % \def\activeparens{% \catcode`\(=\active \catcode`\)=\active \catcode`\[=\active \catcode`\]=\active \catcode`\&=\active } % Make control sequences which act like normal parenthesis chars. \let\lparen = ( \let\rparen = ) % Be sure that we always have a definition for `(', etc. For example, % if the fn name has parens in it, \boldbrax will not be in effect yet, % so TeX would otherwise complain about undefined control sequence. { \activeparens \global\let(=\lparen \global\let)=\rparen \global\let[=\lbrack \global\let]=\rbrack \global\let& = \& \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} \gdef\magicamp{\let&=\amprm} } \newcount\parencount % If we encounter &foo, then turn on ()-hacking afterwards \newif\ifampseen \def\amprm#1 {\ampseentrue{\bf\ }} \def\parenfont{% \ifampseen % At the first level, print parens in roman, % otherwise use the default font. \ifnum \parencount=1 \rm \fi \else % The \sf parens (in \boldbrax) actually are a little bolder than % the contained text. This is especially needed for [ and ] . \sf \fi } \def\infirstlevel#1{% \ifampseen \ifnum\parencount=1 #1% \fi \fi } \def\bfafterword#1 {#1 \bf} \def\opnr{% \global\advance\parencount by 1 {\parenfont(}% \infirstlevel \bfafterword } \def\clnr{% {\parenfont)}% \infirstlevel \sl \global\advance\parencount by -1 } \newcount\brackcount \def\lbrb{% \global\advance\brackcount by 1 {\bf[}% } \def\rbrb{% {\bf]}% \global\advance\brackcount by -1 } \def\checkparencounts{% \ifnum\parencount=0 \else \badparencount \fi \ifnum\brackcount=0 \else \badbrackcount \fi } % these should not use \errmessage; the glibc manual, at least, actually % has such constructs (when documenting function pointers). \def\badparencount{% \message{Warning: unbalanced parentheses in @def...}% \global\parencount=0 } \def\badbrackcount{% \message{Warning: unbalanced square brackets in @def...}% \global\brackcount=0 } \message{macros,} % @macro. % To do this right we need a feature of e-TeX, \scantokens, % which we arrange to emulate with a temporary file in ordinary TeX. \ifx\eTeXversion\thisisundefined \newwrite\macscribble \def\scantokens#1{% \toks0={#1}% \immediate\openout\macscribble=\jobname.tmp \immediate\write\macscribble{\the\toks0}% \immediate\closeout\macscribble \input \jobname.tmp } \fi \def\scanmacro#1{\begingroup \newlinechar`\^^M \let\xeatspaces\eatspaces % % Undo catcode changes of \startcontents and \doprintindex % When called from @insertcopying or (short)caption, we need active % backslash to get it printed correctly. Previously, we had % \catcode`\\=\other instead. We'll see whether a problem appears % with macro expansion. --kasal, 19aug04 \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ % % ... and for \example: \spaceisspace % % The \empty here causes a following catcode 5 newline to be eaten as % part of reading whitespace after a control sequence. It does not % eat a catcode 13 newline. There's no good way to handle the two % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX % would then have different behavior). See the Macro Details node in % the manual for the workaround we recommend for macros and % line-oriented commands. % \scantokens{#1\empty}% \endgroup} \def\scanexp#1{% \edef\temp{\noexpand\scanmacro{#1}}% \temp } \newcount\paramno % Count of parameters \newtoks\macname % Macro name \newif\ifrecursive % Is it recursive? % List of all defined macros in the form % \definedummyword\macro1\definedummyword\macro2... % Currently is also contains all @aliases; the list can be split % if there is a need. \def\macrolist{} % Add the macro to \macrolist \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} \def\addtomacrolistxxx#1{% \toks0 = \expandafter{\macrolist\definedummyword#1}% \xdef\macrolist{\the\toks0}% } % Utility routines. % This does \let #1 = #2, with \csnames; that is, % \let \csname#1\endcsname = \csname#2\endcsname % (except of course we have to play expansion games). % \def\cslet#1#2{% \expandafter\let \csname#1\expandafter\endcsname \csname#2\endcsname } % Trim leading and trailing spaces off a string. % Concepts from aro-bend problem 15 (see CTAN). {\catcode`\@=11 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} \def\unbrace#1{#1} \unbrace{\gdef\trim@@@ #1 } #2@{#1} } % Trim a single trailing ^^M off a string. {\catcode`\^^M=\other \catcode`\Q=3% \gdef\eatcr #1{\eatcra #1Q^^MQ}% \gdef\eatcra#1^^MQ{\eatcrb#1Q}% \gdef\eatcrb#1Q#2Q{#1}% } % Macro bodies are absorbed as an argument in a context where % all characters are catcode 10, 11 or 12, except \ which is active % (as in normal texinfo). It is necessary to change the definition of \ % to recognize macro arguments; this is the job of \mbodybackslash. % % Non-ASCII encodings make 8-bit characters active, so un-activate % them to avoid their expansion. Must do this non-globally, to % confine the change to the current group. % % It's necessary to have hard CRs when the macro is executed. This is % done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. % \def\scanctxt{% used as subroutine \catcode`\"=\other \catcode`\+=\other \catcode`\<=\other \catcode`\>=\other \catcode`\@=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\~=\other \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi } \def\scanargctxt{% used for copying and captions, not macros. \scanctxt \catcode`\\=\other \catcode`\^^M=\other } \def\macrobodyctxt{% used for @macro definitions \scanctxt \catcode`\{=\other \catcode`\}=\other \catcode`\^^M=\other \usembodybackslash } \def\macroargctxt{% used when scanning invocations \scanctxt \catcode`\\=0 } % why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes" % for the single characters \ { }. Thus, we end up with the "commands" % that would be written @\ @{ @} in a Texinfo document. % % We already have @{ and @}. For @\, we define it here, and only for % this purpose, to produce a typewriter backslash (so, the @\ that we % define for @math can't be used with @macro calls): % \def\\{\normalbackslash}% % % We would like to do this for \, too, since that is what makeinfo does. % But it is not possible, because Texinfo already has a command @, for a % cedilla accent. Documents must use @comma{} instead. % % \anythingelse will almost certainly be an error of some kind. % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N % where N is the macro parameter number. % We define \csname macarg.\endcsname to be \realbackslash, so % \\ in macro replacement text gets you a backslash. % {\catcode`@=0 @catcode`@\=@active @gdef@usembodybackslash{@let\=@mbodybackslash} @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} } \expandafter\def\csname macarg.\endcsname{\realbackslash} \def\margbackslash#1{\char`\#1 } \def\macro{\recursivefalse\parsearg\macroxxx} \def\rmacro{\recursivetrue\parsearg\macroxxx} \def\macroxxx#1{% \getargs{#1}% now \macname is the macname and \argl the arglist \ifx\argl\empty % no arguments \paramno=0\relax \else \expandafter\parsemargdef \argl;% \if\paramno>256\relax \ifx\eTeXversion\thisisundefined \errhelp = \EMsimple \errmessage{You need eTeX to compile a file with macros with more than 256 arguments} \fi \fi \fi \if1\csname ismacro.\the\macname\endcsname \message{Warning: redefining \the\macname}% \else \expandafter\ifx\csname \the\macname\endcsname \relax \else \errmessage{Macro name \the\macname\space already defined}\fi \global\cslet{macsave.\the\macname}{\the\macname}% \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% \addtomacrolist{\the\macname}% \fi \begingroup \macrobodyctxt \ifrecursive \expandafter\parsermacbody \else \expandafter\parsemacbody \fi} \parseargdef\unmacro{% \if1\csname ismacro.#1\endcsname \global\cslet{#1}{macsave.#1}% \global\expandafter\let \csname ismacro.#1\endcsname=0% % Remove the macro name from \macrolist: \begingroup \expandafter\let\csname#1\endcsname \relax \let\definedummyword\unmacrodo \xdef\macrolist{\macrolist}% \endgroup \else \errmessage{Macro #1 not defined}% \fi } % Called by \do from \dounmacro on each macro. The idea is to omit any % macro definitions that have been changed to \relax. % \def\unmacrodo#1{% \ifx #1\relax % remove this \else \noexpand\definedummyword \noexpand#1% \fi } % This makes use of the obscure feature that if the last token of a % is #, then the preceding argument is delimited by % an opening brace, and that opening brace is not consumed. \def\getargs#1{\getargsxxx#1{}} \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} \def\getmacname#1 #2\relax{\macname={#1}} \def\getmacargs#1{\def\argl{#1}} % For macro processing make @ a letter so that we can make Texinfo private macro names. \edef\texiatcatcode{\the\catcode`\@} \catcode `@=11\relax % Parse the optional {params} list. Set up \paramno and \paramlist % so \defmacro knows what to do. Define \macarg.BLAH for each BLAH % in the params list to some hook where the argument si to be expanded. If % there are less than 10 arguments that hook is to be replaced by ##N where N % is the position in that list, that is to say the macro arguments are to be % defined `a la TeX in the macro body. % % That gets used by \mbodybackslash (above). % % We need to get `macro parameter char #' into several definitions. % The technique used is stolen from LaTeX: let \hash be something % unexpandable, insert that wherever you need a #, and then redefine % it to # just before using the token list produced. % % The same technique is used to protect \eatspaces till just before % the macro is used. % % If there are 10 or more arguments, a different technique is used, where the % hook remains in the body, and when macro is to be expanded the body is % processed again to replace the arguments. % % In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the % argument N value and then \edef the body (nothing else will expand because of % the catcode regime underwhich the body was input). % % If you compile with TeX (not eTeX), and you have macros with 10 or more % arguments, you need that no macro has more than 256 arguments, otherwise an % error is produced. \def\parsemargdef#1;{% \paramno=0\def\paramlist{}% \let\hash\relax \let\xeatspaces\relax \parsemargdefxxx#1,;,% % In case that there are 10 or more arguments we parse again the arguments % list to set new definitions for the \macarg.BLAH macros corresponding to % each BLAH argument. It was anyhow needed to parse already once this list % in order to count the arguments, and as macros with at most 9 arguments % are by far more frequent than macro with 10 or more arguments, defining % twice the \macarg.BLAH macros does not cost too much processing power. \ifnum\paramno<10\relax\else \paramno0\relax \parsemmanyargdef@@#1,;,% 10 or more arguments \fi } \def\parsemargdefxxx#1,{% \if#1;\let\next=\relax \else \let\next=\parsemargdefxxx \advance\paramno by 1 \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname {\xeatspaces{\hash\the\paramno}}% \edef\paramlist{\paramlist\hash\the\paramno,}% \fi\next} \def\parsemmanyargdef@@#1,{% \if#1;\let\next=\relax \else \let\next=\parsemmanyargdef@@ \edef\tempb{\eatspaces{#1}}% \expandafter\def\expandafter\tempa \expandafter{\csname macarg.\tempb\endcsname}% % Note that we need some extra \noexpand\noexpand, this is because we % don't want \the to be expanded in the \parsermacbody as it uses an % \xdef . \expandafter\edef\tempa {\noexpand\noexpand\noexpand\the\toks\the\paramno}% \advance\paramno by 1\relax \fi\next} % These two commands read recursive and nonrecursive macro bodies. % (They're different since rec and nonrec macros end differently.) % \catcode `\@\texiatcatcode \long\def\parsemacbody#1@end macro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \long\def\parsermacbody#1@end rmacro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \catcode `\@=11\relax \let\endargs@\relax \let\nil@\relax \def\nilm@{\nil@}% \long\def\nillm@{\nil@}% % This macro is expanded during the Texinfo macro expansion, not during its % definition. It gets all the arguments values and assigns them to macros % macarg.ARGNAME % % #1 is the macro name % #2 is the list of argument names % #3 is the list of argument values \def\getargvals@#1#2#3{% \def\macargdeflist@{}% \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion. \def\paramlist{#2,\nil@}% \def\macroname{#1}% \begingroup \macroargctxt \def\argvaluelist{#3,\nil@}% \def\@tempa{#3}% \ifx\@tempa\empty \setemptyargvalues@ \else \getargvals@@ \fi } % \def\getargvals@@{% \ifx\paramlist\nilm@ % Some sanity check needed here that \argvaluelist is also empty. \ifx\argvaluelist\nillm@ \else \errhelp = \EMsimple \errmessage{Too many arguments in macro `\macroname'!}% \fi \let\next\macargexpandinbody@ \else \ifx\argvaluelist\nillm@ % No more arguments values passed to macro. Set remaining named-arg % macros to empty. \let\next\setemptyargvalues@ \else % pop current arg name into \@tempb \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}% \expandafter\@tempa\expandafter{\paramlist}% % pop current argument value into \@tempc \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}% \expandafter\@tempa\expandafter{\argvaluelist}% % Here \@tempb is the current arg name and \@tempc is the current arg value. % First place the new argument macro definition into \@tempd \expandafter\macname\expandafter{\@tempc}% \expandafter\let\csname macarg.\@tempb\endcsname\relax \expandafter\def\expandafter\@tempe\expandafter{% \csname macarg.\@tempb\endcsname}% \edef\@tempd{\long\def\@tempe{\the\macname}}% \push@\@tempd\macargdeflist@ \let\next\getargvals@@ \fi \fi \next } \def\push@#1#2{% \expandafter\expandafter\expandafter\def \expandafter\expandafter\expandafter#2% \expandafter\expandafter\expandafter{% \expandafter#1#2}% } % Replace arguments by their values in the macro body, and place the result % in macro \@tempa \def\macvalstoargs@{% % To do this we use the property that token registers that are \the'ed % within an \edef expand only once. So we are going to place all argument % values into respective token registers. % % First we save the token context, and initialize argument numbering. \begingroup \paramno0\relax % Then, for each argument number #N, we place the corresponding argument % value into a new token list register \toks#N \expandafter\putargsintokens@\saveparamlist@,;,% % Then, we expand the body so that argument are replaced by their % values. The trick for values not to be expanded themselves is that they % are within tokens and that tokens expand only once in an \edef . \edef\@tempc{\csname mac.\macroname .body\endcsname}% % Now we restore the token stack pointer to free the token list registers % which we have used, but we make sure that expanded body is saved after % group. \expandafter \endgroup \expandafter\def\expandafter\@tempa\expandafter{\@tempc}% } \def\macargexpandinbody@{% %% Define the named-macro outside of this group and then close this group. \expandafter \endgroup \macargdeflist@ % First the replace in body the macro arguments by their values, the result % is in \@tempa . \macvalstoargs@ % Then we point at the \norecurse or \gobble (for recursive) macro value % with \@tempb . \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname % Depending on whether it is recursive or not, we need some tailing % \egroup . \ifx\@tempb\gobble \let\@tempc\relax \else \let\@tempc\egroup \fi % And now we do the real job: \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}% \@tempd } \def\putargsintokens@#1,{% \if#1;\let\next\relax \else \let\next\putargsintokens@ % First we allocate the new token list register, and give it a temporary % alias \@tempb . \toksdef\@tempb\the\paramno % Then we place the argument value into that token list register. \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname \expandafter\@tempb\expandafter{\@tempa}% \advance\paramno by 1\relax \fi \next } % Save the token stack pointer into macro #1 \def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}} % Restore the token stack pointer from number in macro #1 \def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax} % newtoks that can be used non \outer . \def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi} % Tailing missing arguments are set to empty \def\setemptyargvalues@{% \ifx\paramlist\nilm@ \let\next\macargexpandinbody@ \else \expandafter\setemptyargvaluesparser@\paramlist\endargs@ \let\next\setemptyargvalues@ \fi \next } \def\setemptyargvaluesparser@#1,#2\endargs@{% \expandafter\def\expandafter\@tempa\expandafter{% \expandafter\def\csname macarg.#1\endcsname{}}% \push@\@tempa\macargdeflist@ \def\paramlist{#2}% } % #1 is the element target macro % #2 is the list macro % #3,#4\endargs@ is the list value \def\pop@#1#2#3,#4\endargs@{% \def#1{#3}% \def#2{#4}% } \long\def\longpop@#1#2#3,#4\endargs@{% \long\def#1{#3}% \long\def#2{#4}% } % This defines a Texinfo @macro. There are eight cases: recursive and % nonrecursive macros of zero, one, up to nine, and many arguments. % Much magic with \expandafter here. % \xdef is used so that macro definitions will survive the file % they're defined in; @include reads the file inside a group. % \def\defmacro{% \let\hash=##% convert placeholders to macro parameter chars \ifrecursive \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\scanmacro{\temp}}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup\noexpand\scanmacro{\temp}}% \else \ifnum\paramno<10\relax % at most 9 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{\egroup\noexpand\scanmacro{\temp}}% \else % 10 or more \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\getargvals@{\the\macname}{\argl}% }% \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble \fi \fi \else \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \else % at most 9 \ifnum\paramno<10\relax \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \expandafter\noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \else % 10 or more: \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\getargvals@{\the\macname}{\argl}% }% \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse \fi \fi \fi} \catcode `\@\texiatcatcode\relax \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} % \braceorline decides whether the next nonwhitespace character is a % {. If so it reads up to the closing }, if not, it reads the whole % line. Whatever was read is then fed to the next control sequence % as an argument (by \parsebrace or \parsearg). % \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else \expandafter\parsearg \fi \macnamexxx} % @alias. % We need some trickery to remove the optional spaces around the equal % sign. Make them active and then expand them all to nothing. % \def\alias{\parseargusing\obeyspaces\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} \def\aliasyyy #1=#2\relax{% {% \expandafter\let\obeyedspace=\empty \addtomacrolist{#1}% \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% }% \next } \message{cross references,} \newwrite\auxfile \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. % @inforef is relatively simple. \def\inforef #1{\inforefzzz #1,,,,**} \def\inforefzzz #1,#2,#3,#4**{% \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} % @node's only job in TeX is to define \lastnode, which is used in % cross-references. The @node line might or might not have commas, and % might or might not have spaces before the first comma, like: % @node foo , bar , ... % We don't want such trailing spaces in the node name. % \parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} % % also remove a trailing comma, in case of something like this: % @node Help-Cross, , , Cross-refs \def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} \def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} \let\nwnode=\node \let\lastnode=\empty % Write a cross-reference definition for the current node. #1 is the % type (Ynumbered, Yappendix, Ynothing). % \def\donoderef#1{% \ifx\lastnode\empty\else \setref{\lastnode}{#1}% \global\let\lastnode=\empty \fi } % @anchor{NAME} -- define xref target at arbitrary point. % \newcount\savesfregister % \def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} \def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} \def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an % anchor), which consists of three parts: % 1) NAME-title - the current sectioning name taken from \lastsection, % or the anchor name. % 2) NAME-snt - section number and type, passed as the SNT arg, or % empty for anchors. % 3) NAME-pg - the page number. % % This is called from \donoderef, \anchor, and \dofloat. In the case of % floats, there is an additional part, which is not written here: % 4) NAME-lof - the text as it should appear in a @listoffloats. % \def\setref#1#2{% \pdfmkdest{#1}% \iflinks {% \atdummies % preserve commands, but don't expand them \edef\writexrdef##1##2{% \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef ##1}{##2}}% these are parameters of \writexrdef }% \toks0 = \expandafter{\lastsection}% \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout }% \fi } % @xrefautosectiontitle on|off says whether @section(ing) names are used % automatically in xrefs, if the third arg is not explicitly specified. % This was provided as a "secret" @set xref-automatic-section-title % variable, now it's official. % \parseargdef\xrefautomaticsectiontitle{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETxref-automatic-section-title\endcsname = \empty \else\ifx\temp\offword \expandafter\let\csname SETxref-automatic-section-title\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @xrefautomaticsectiontitle value `\temp', must be on|off}% \fi\fi } % % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed % node name, #4 the name of the Info file, #5 the name of the printed % manual. All but the node name can be omitted. % \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} \def\ref#1{\xrefX[#1,,,,,,,]} % \newbox\toprefbox \newbox\printedrefnamebox \newbox\infofilenamebox \newbox\printedmanualbox % \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces % % Get args without leading/trailing spaces. \def\printedrefname{\ignorespaces #3}% \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}% % \def\infofilename{\ignorespaces #4}% \setbox\infofilenamebox = \hbox{\infofilename\unskip}% % \def\printedmanual{\ignorespaces #5}% \setbox\printedmanualbox = \hbox{\printedmanual\unskip}% % % If the printed reference name (arg #3) was not explicitly given in % the @xref, figure out what we want to use. \ifdim \wd\printedrefnamebox = 0pt % No printed node name was explicitly given. \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax % Not auto section-title: use node name inside the square brackets. \def\printedrefname{\ignorespaces #1}% \else % Auto section-title: use chapter/section title inside % the square brackets if we have it. \ifdim \wd\printedmanualbox > 0pt % It is in another manual, so we don't have it; use node name. \def\printedrefname{\ignorespaces #1}% \else \ifhavexrefs % We (should) know the real title if we have the xref values. \def\printedrefname{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. \def\printedrefname{\ignorespaces #1}% \fi% \fi \fi \fi % % Make link in pdf output. \ifpdf {\indexnofonts \turnoffactive \makevalueexpandable % This expands tokens, so do it after making catcode changes, so _ % etc. don't get their TeX definitions. This ignores all spaces in % #4, including (wrongly) those in the middle of the filename. \getfilename{#4}% % % This (wrongly) does not take account of leading or trailing % spaces in #1, which should be ignored. \edef\pdfxrefdest{#1}% \ifx\pdfxrefdest\empty \def\pdfxrefdest{Top}% no empty targets \else \txiescapepdf\pdfxrefdest % escape PDF special chars \fi % \leavevmode \startlink attr{/Border [0 0 0]}% \ifnum\filenamelength>0 goto file{\the\filename.pdf} name{\pdfxrefdest}% \else goto name{\pdfmkpgn{\pdfxrefdest}}% \fi }% \setcolor{\linkcolor}% \fi % % Float references are printed completely differently: "Figure 1.2" % instead of "[somenode], p.3". We distinguish them by the % LABEL-title being set to a magic string. {% % Have to otherify everything special to allow the \csname to % include an _ in the xref name, etc. \indexnofonts \turnoffactive \expandafter\global\expandafter\let\expandafter\Xthisreftitle \csname XR#1-title\endcsname }% \iffloat\Xthisreftitle % If the user specified the print name (third arg) to the ref, % print it instead of our usual "Figure 1.2". \ifdim\wd\printedrefnamebox = 0pt \refx{#1-snt}{}% \else \printedrefname \fi % % If the user also gave the printed manual name (fifth arg), append % "in MANUALNAME". \ifdim \wd\printedmanualbox > 0pt \space \putwordin{} \cite{\printedmanual}% \fi \else % node/anchor (non-float) references. % % If we use \unhbox to print the node names, TeX does not insert % empty discretionaries after hyphens, which means that it will not % find a line break at a hyphen in a node names. Since some manuals % are best written with fairly long node names, containing hyphens, % this is a loss. Therefore, we give the text of the node name % again, so it is as if TeX is seeing it for the first time. % \ifdim \wd\printedmanualbox > 0pt % Cross-manual reference with a printed manual name. % \crossmanualxref{\cite{\printedmanual\unskip}}% % \else\ifdim \wd\infofilenamebox > 0pt % Cross-manual reference with only an info filename (arg 4), no % printed manual name (arg 5). This is essentially the same as % the case above; we output the filename, since we have nothing else. % \crossmanualxref{\code{\infofilename\unskip}}% % \else % Reference within this manual. % % _ (for example) has to be the character _ for the purposes of the % control sequence corresponding to the node, but it has to expand % into the usual \leavevmode...\vrule stuff for purposes of % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. {\turnoffactive % Only output a following space if the -snt ref is nonempty; for % @unnumbered and @anchor, it won't be. \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi }% % output the `[mynode]' via the macro below so it can be overridden. \xrefprintnodename\printedrefname % % But we always want a comma and a space: ,\space % % output the `page 3'. \turnoffactive \putwordpage\tie\refx{#1-pg}{}% \fi\fi \fi \endlink \endgroup} % Output a cross-manual xref to #1. Used just above (twice). % % Only include the text "Section ``foo'' in" if the foo is neither % missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply % "see The Foo Manual", the idea being to refer to the whole manual. % % But, this being TeX, we can't easily compare our node name against the % string "Top" while ignoring the possible spaces before and after in % the input. By adding the arbitrary 7sp below, we make it much less % likely that a real node name would have the same width as "Top" (e.g., % in a monospaced font). Hopefully it will never happen in practice. % % For the same basic reason, we retypeset the "Top" at every % reference, since the current font is indeterminate. % \def\crossmanualxref#1{% \setbox\toprefbox = \hbox{Top\kern7sp}% \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}% \ifdim \wd2 > 7sp % nonempty? \ifdim \wd2 = \wd\toprefbox \else % same as Top? \putwordSection{} ``\printedrefname'' \putwordin{}\space \fi \fi #1% } % This macro is called from \xrefX for the `[nodename]' part of xref % output. It's a separate macro only so it can be changed more easily, % since square brackets don't work well in some documents. Particularly % one that Bob is working on :). % \def\xrefprintnodename#1{[#1]} % Things referred to by \setref. % \def\Ynothing{} \def\Yomitfromtoc{} \def\Ynumbered{% \ifnum\secno=0 \putwordChapter@tie \the\chapno \else \ifnum\subsecno=0 \putwordSection@tie \the\chapno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno \else \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } \def\Yappendix{% \ifnum\secno=0 \putwordAppendix@tie @char\the\appendixno{}% \else \ifnum\subsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno \else \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. % If its value is nonempty, SUFFIX is output afterward. % \def\refx#1#2{% {% \indexnofonts \otherbackslash \expandafter\global\expandafter\let\expandafter\thisrefX \csname XR#1\endcsname }% \ifx\thisrefX\relax % If not defined, say something at least. \angleleft un\-de\-fined\angleright \iflinks \ifhavexrefs {\toks0 = {#1}% avoid expansion of possibly-complex value \message{\linenumber Undefined cross reference `\the\toks0'.}}% \else \ifwarnedxrefs\else \global\warnedxrefstrue \message{Cross reference values unknown; you must run TeX again.}% \fi \fi \fi \else % It's defined, so just use it. \thisrefX \fi #2% Output the suffix in any case. } % This is the macro invoked by entries in the aux file. Usually it's % just a \def (we prepend XR to the control sequence name to avoid % collisions). But if this is a float type, we have more work to do. % \def\xrdef#1#2{% {% The node name might contain 8-bit characters, which in our current % implementation are changed to commands like @'e. Don't let these % mess up the control sequence name. \indexnofonts \turnoffactive \xdef\safexrefname{#1}% }% % \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref % % Was that xref control sequence that we just defined for a float? \expandafter\iffloat\csname XR\safexrefname\endcsname % it was a float, and we have the (safe) float type in \iffloattype. \expandafter\let\expandafter\floatlist \csname floatlist\iffloattype\endcsname % % Is this the first time we've seen this float type? \expandafter\ifx\floatlist\relax \toks0 = {\do}% yes, so just \do \else % had it before, so preserve previous elements in list. \toks0 = \expandafter{\floatlist\do}% \fi % % Remember this xref in the control sequence \floatlistFLOATTYPE, % for later use in \listoffloats. \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 {\safexrefname}}% \fi } % Read the last existing aux file, if any. No error if none exists. % \def\tryauxfile{% \openin 1 \jobname.aux \ifeof 1 \else \readdatafile{aux}% \global\havexrefstrue \fi \closein 1 } \def\setupdatafile{% \catcode`\^^@=\other \catcode`\^^A=\other \catcode`\^^B=\other \catcode`\^^C=\other \catcode`\^^D=\other \catcode`\^^E=\other \catcode`\^^F=\other \catcode`\^^G=\other \catcode`\^^H=\other \catcode`\^^K=\other \catcode`\^^L=\other \catcode`\^^N=\other \catcode`\^^P=\other \catcode`\^^Q=\other \catcode`\^^R=\other \catcode`\^^S=\other \catcode`\^^T=\other \catcode`\^^U=\other \catcode`\^^V=\other \catcode`\^^W=\other \catcode`\^^X=\other \catcode`\^^Z=\other \catcode`\^^[=\other \catcode`\^^\=\other \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. % in xref tags, i.e., node names. But since ^^e4 notation isn't % supported in the main text, it doesn't seem desirable. Furthermore, % that is not enough: for node names that actually contain a ^ % character, we would end up writing a line like this: 'xrdef {'hat % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first % argument, and \hat is not an expandable control sequence. It could % all be worked out, but why? Either we support ^^ or we don't. % % The other change necessary for this was to define \auxhat: % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. % \catcode`\^=\other % % Special characters. Should be turned off anyway, but... \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other \catcode`\"=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other \catcode`\%=\other \catcode`+=\other % avoid \+ for paranoia even though we've turned it off % % This is to support \ in node names and titles, since the \ % characters end up in a \csname. It's easier than % leaving it active and making its active definition an actual \ % character. What I don't understand is why it works in the *value* % of the xrdef. Seems like it should be a catcode12 \, and that % should not typeset properly. But it works, so I'm moving on for % now. --karl, 15jan04. \catcode`\\=\other % % Make the characters 128-255 be printing characters. {% \count1=128 \def\loop{% \catcode\count1=\other \advance\count1 by 1 \ifnum \count1<256 \loop \fi }% }% % % @ is our escape character in .aux files, and we need braces. \catcode`\{=1 \catcode`\}=2 \catcode`\@=0 } \def\readdatafile#1{% \begingroup \setupdatafile \input\jobname.#1 \endgroup} \message{insertions,} % including footnotes. \newcount \footnoteno % The trailing space in the following definition for supereject is % vital for proper filling; pages come out unaligned when you do a % pagealignmacro call if that space before the closing brace is % removed. (Generally, numeric constants should always be followed by a % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } % @footnotestyle is meaningful for Info output only. \let\footnotestyle=\comment {\catcode `\@=11 % % Auto-number footnotes. Otherwise like plain. \gdef\footnote{% \let\indent=\ptexindent \let\noindent=\ptexnoindent \global\advance\footnoteno by \@ne \edef\thisfootno{$^{\the\footnoteno}$}% % % In case the footnote comes at the end of a sentence, preserve the % extra spacing after we do the footnote number. \let\@sf\empty \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi % % Remove inadvertent blank space before typesetting the footnote number. \unskip \thisfootno\@sf \dofootnote }% % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. % % Oh yes, they do; otherwise, @ifset (and anything else that uses % \parseargline) fails inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. % \gdef\dofootnote{% \insert\footins\bgroup % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. \hsize=\pagewidth \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox % top baseline for broken footnotes \splitmaxdepth\dp\strutbox \floatingpenalty\@MM \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip \parindent\defaultparindent % \smallfonts \rm % % Because we use hanging indentation in footnotes, a @noindent appears % to exdent this text, so make it be a no-op. makeinfo does not use % hanging indentation so @noindent can still be needed within footnote % text after an @example or the like (not that this is good style). \let\noindent = \relax % % Hang the footnote text off the number. Use \everypar in case the % footnote extends for more than one paragraph. \everypar = {\hang}% \textindent{\thisfootno}% % % Don't crash into the line above the footnote text. Since this % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut % % Invoke rest of plain TeX footnote routine. \futurelet\next\fo@t } }%end \catcode `\@=11 % In case a @footnote appears in a vbox, save the footnote text and create % the real \insert just after the vbox finished. Otherwise, the insertion % would be lost. % Similarly, if a @footnote appears inside an alignment, save the footnote % text to a box and make the \insert when a row of the table is finished. % And the same can be done for other insert classes. --kasal, 16nov03. % Replace the \insert primitive by a cheating macro. % Deeper inside, just make sure that the saved insertions are not spilled % out prematurely. % \def\startsavinginserts{% \ifx \insert\ptexinsert \let\insert\saveinsert \else \let\checkinserts\relax \fi } % This \insert replacement works for both \insert\footins{foo} and % \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. % \def\saveinsert#1{% \edef\next{\noexpand\savetobox \makeSAVEname#1}% \afterassignment\next % swallow the left brace \let\temp = } \def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} \def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} \def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} \def\placesaveins#1{% \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname {\box#1}% } % eat @SAVE -- beware, all of them have catcode \other: { \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) \gdef\gobblesave @SAVE{} } % initialization: \def\newsaveins #1{% \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% \next } \def\newsaveinsX #1{% \csname newbox\endcsname #1% \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts \checksaveins #1}% } % initialize: \let\checkinserts\empty \newsaveins\footins \newsaveins\margin % @image. We use the macros from epsf.tex to support this. % If epsf.tex is not installed and @image is used, we complain. % % Check for and read epsf.tex up front. If we read it only at @image % time, we might be inside a group, and then its definitions would get % undone and the next image would fail. \openin 1 = epsf.tex \ifeof 1 \else % Do not bother showing banner with epsf.tex v2.7k (available in % doc/epsf.tex and on ctan). \def\epsfannounce{\toks0 = }% \input epsf.tex \fi \closein 1 % % We will only complain once about lack of epsf.tex. \newif\ifwarnednoepsf \newhelp\noepsfhelp{epsf.tex must be installed for images to work. It is also included in the Texinfo distribution, or you can get it from ftp://tug.org/tex/epsf.tex.} % \def\image#1{% \ifx\epsfbox\thisisundefined \ifwarnednoepsf \else \errhelp = \noepsfhelp \errmessage{epsf.tex not found, images will be ignored}% \global\warnednoepsftrue \fi \else \imagexxx #1,,,,,\finish \fi } % % Arguments to @image: % #1 is (mandatory) image filename; we tack on .eps extension. % #2 is (optional) width, #3 is (optional) height. % #4 is (ignored optional) html alt text. % #5 is (ignored optional) extension. % #6 is just the usual extra ignored arg for parsing stuff. \newif\ifimagevmode \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup \catcode`\^^M = 5 % in case we're inside an example \normalturnoffactive % allow _ et al. in names % If the image is by itself, center it. \ifvmode \imagevmodetrue \else \ifx\centersub\centerV % for @center @image, we need a vbox so we can have our vertical space \imagevmodetrue \vbox\bgroup % vbox has better behavior than vtop herev \fi\fi % \ifimagevmode \nobreak\medskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space % above and below. \nobreak\vskip\parskip \nobreak \fi % % Leave vertical mode so that indentation from an enclosing % environment such as @quotation is respected. % However, if we're at the top level, we don't want the % normal paragraph indentation. % On the other hand, if we are in the case of @center @image, we don't % want to start a paragraph, which will create a hsize-width box and % eradicate the centering. \ifx\centersub\centerV\else \noindent \fi % % Output the image. \ifpdf \dopdfimage{#1}{#2}{#3}% \else % \epsfbox itself resets \epsf?size at each figure. \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi \epsfbox{#1.eps}% \fi % \ifimagevmode \medskip % space after a standalone image \fi \ifx\centersub\centerV \egroup \fi \endgroup} % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, % etc. We don't actually implement floating yet, we always include the % float "here". But it seemed the best name for the future. % \envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} % There may be a space before second and/or third parameter; delete it. \def\eatcommaspace#1, {#1,} % #1 is the optional FLOATTYPE, the text label for this float, typically % "Figure", "Table", "Example", etc. Can't contain commas. If omitted, % this float will not be numbered and cannot be referred to. % % #2 is the optional xref label. Also must be present for the float to % be referable. % % #3 is the optional positioning argument; for now, it is ignored. It % will somehow specify the positions allowed to float to (here, top, bottom). % % We keep a separate counter for each FLOATTYPE, which we reset at each % chapter-level command. \let\resetallfloatnos=\empty % \def\dofloat#1,#2,#3,#4\finish{% \let\thiscaption=\empty \let\thisshortcaption=\empty % % don't lose footnotes inside @float. % % BEWARE: when the floats start float, we have to issue warning whenever an % insert appears inside a float which could possibly float. --kasal, 26may04 % \startsavinginserts % % We can't be used inside a paragraph. \par % \vtop\bgroup \def\floattype{#1}% \def\floatlabel{#2}% \def\floatloc{#3}% we do nothing with this yet. % \ifx\floattype\empty \let\safefloattype=\empty \else {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% \fi % % If label is given but no type, we handle that as the empty type. \ifx\floatlabel\empty \else % We want each FLOATTYPE to be numbered separately (Figure 1, % Table 1, Figure 2, ...). (And if no label, no number.) % \expandafter\getfloatno\csname\safefloattype floatno\endcsname \global\advance\floatno by 1 % {% % This magic value for \lastsection is output by \setref as the % XREFLABEL-title value. \xrefX uses it to distinguish float % labels (which have a completely different output format) from % node and anchor labels. And \xrdef uses it to construct the % lists of floats. % \edef\lastsection{\floatmagic=\safefloattype}% \setref{\floatlabel}{Yfloat}% }% \fi % % start with \parskip glue, I guess. \vskip\parskip % % Don't suppress indentation if a float happens to start a section. \restorefirstparagraphindent } % we have these possibilities: % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap % @float Foo,lbl & no caption: Foo 1.1 % @float Foo & @caption{Cap}: Foo: Cap % @float Foo & no caption: Foo % @float ,lbl & Caption{Cap}: 1.1: Cap % @float ,lbl & no caption: 1.1 % @float & @caption{Cap}: Cap % @float & no caption: % \def\Efloat{% \let\floatident = \empty % % In all cases, if we have a float type, it comes first. \ifx\floattype\empty \else \def\floatident{\floattype}\fi % % If we have an xref label, the number comes next. \ifx\floatlabel\empty \else \ifx\floattype\empty \else % if also had float type, need tie first. \appendtomacro\floatident{\tie}% \fi % the number. \appendtomacro\floatident{\chaplevelprefix\the\floatno}% \fi % % Start the printed caption with what we've constructed in % \floatident, but keep it separate; we need \floatident again. \let\captionline = \floatident % \ifx\thiscaption\empty \else \ifx\floatident\empty \else \appendtomacro\captionline{: }% had ident, so need a colon between \fi % % caption text. \appendtomacro\captionline{\scanexp\thiscaption}% \fi % % If we have anything to print, print it, with space before. % Eventually this needs to become an \insert. \ifx\captionline\empty \else \vskip.5\parskip \captionline % % Space below caption. \vskip\parskip \fi % % If have an xref label, write the list of floats info. Do this % after the caption, to avoid chance of it being a breakpoint. \ifx\floatlabel\empty \else % Write the text that goes in the lof to the aux file as % \floatlabel-lof. Besides \floatident, we include the short % caption if specified, else the full caption if specified, else nothing. {% \atdummies % % since we read the caption text in the macro world, where ^^M % is turned into a normal character, we have to scan it back, so % we don't write the literal three characters "^^M" into the aux file. \scanexp{% \xdef\noexpand\gtemp{% \ifx\thisshortcaption\empty \thiscaption \else \thisshortcaption \fi }% }% \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident \ifx\gtemp\empty \else : \gtemp \fi}}% }% \fi \egroup % end of \vtop % % place the captured inserts % % BEWARE: when the floats start floating, we have to issue warning % whenever an insert appears inside a float which could possibly % float. --kasal, 26may04 % \checkinserts } % Append the tokens #2 to the definition of macro #1, not expanding either. % \def\appendtomacro#1#2{% \expandafter\def\expandafter#1\expandafter{#1#2}% } % @caption, @shortcaption % \def\caption{\docaption\thiscaption} \def\shortcaption{\docaption\thisshortcaption} \def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} \def\defcaption#1#2{\egroup \def#1{#2}} % The parameter is the control sequence identifying the counter we are % going to use. Create it if it doesn't exist and assign it to \floatno. \def\getfloatno#1{% \ifx#1\relax % Haven't seen this figure type before. \csname newcount\endcsname #1% % % Remember to reset this floatno at the next chap. \expandafter\gdef\expandafter\resetallfloatnos \expandafter{\resetallfloatnos #1=0 }% \fi \let\floatno#1% } % \setref calls this to get the XREFLABEL-snt value. We want an @xref % to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we % first read the @float command. % \def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% % Magic string used for the XREFLABEL-title value, so \xrefX can % distinguish floats from other xref types. \def\floatmagic{!!float!!} % #1 is the control sequence we are passed; we expand into a conditional % which is true if #1 represents a float ref. That is, the magic % \lastsection value which we \setref above. % \def\iffloat#1{\expandafter\doiffloat#1==\finish} % % #1 is (maybe) the \floatmagic string. If so, #2 will be the % (safe) float type for this float. We set \iffloattype to #2. % \def\doiffloat#1=#2=#3\finish{% \def\temp{#1}% \def\iffloattype{#2}% \ifx\temp\floatmagic } % @listoffloats FLOATTYPE - print a list of floats like a table of contents. % \parseargdef\listoffloats{% \def\floattype{#1}% floattype {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% % % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax \ifhavexrefs % if the user said @listoffloats foo but never @float foo. \message{\linenumber No `\safefloattype' floats to list.}% \fi \else \begingroup \leftskip=\tocindent % indent these entries like a toc \let\do=\listoffloatsdo \csname floatlist\safefloattype\endcsname \endgroup \fi } % This is called on each entry in a list of floats. We're passed the % xref label, in the form LABEL-title, which is how we save it in the % aux file. We strip off the -title and look up \XRLABEL-lof, which % has the text we're supposed to typeset here. % % Figures without xref labels will not be included in the list (since % they won't appear in the aux file). % \def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} \def\listoffloatsdoentry#1-title\finish{{% % Can't fully expand XR#1-lof because it can contain anything. Just % pass the control sequence. On the other hand, XR#1-pg is just the % page number, and we want to fully expand that so we can get a link % in pdf output. \toksA = \expandafter{\csname XR#1-lof\endcsname}% % % use the same \entry macro we use to generate the TOC and index. \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% \writeentry }} \message{localization,} % For single-language documents, @documentlanguage is usually given very % early, just after @documentencoding. Single argument is the language % (de) or locale (de_DE) abbreviation. % { \catcode`\_ = \active \globaldefs=1 \parseargdef\documentlanguage{\begingroup \let_=\normalunderscore % normal _ character for filenames \tex % read txi-??.tex file in plain TeX. % Read the file by the name they passed if it exists. \openin 1 txi-#1.tex \ifeof 1 \documentlanguagetrywithoutunderscore{#1_\finish}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 \endgroup % end raw TeX \endgroup} % % If they passed de_DE, and txi-de_DE.tex doesn't exist, % try txi-de.tex. % \gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% \openin 1 txi-#1.tex \ifeof 1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 } }% end of special _ catcode % \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? Putting it in the current directory should work if nowhere else does.} % This macro is called from txi-??.tex files; the first argument is the % \language name to set (without the "\lang@" prefix), the second and % third args are \{left,right}hyphenmin. % % The language names to pass are determined when the format is built. % See the etex.log file created at that time, e.g., % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. % % With TeX Live 2008, etex now includes hyphenation patterns for all % available languages. This means we can support hyphenation in % Texinfo, at least to some extent. (This still doesn't solve the % accented characters problem.) % \catcode`@=11 \def\txisetlanguage#1#2#3{% % do not set the language if the name is undefined in the current TeX. \expandafter\ifx\csname lang@#1\endcsname \relax \message{no patterns for #1}% \else \global\language = \csname lang@#1\endcsname \fi % but there is no harm in adjusting the hyphenmin values regardless. \global\lefthyphenmin = #2\relax \global\righthyphenmin = #3\relax } % Helpers for encodings. % Set the catcode of characters 128 through 255 to the specified number. % \def\setnonasciicharscatcode#1{% \count255=128 \loop\ifnum\count255<256 \global\catcode\count255=#1\relax \advance\count255 by 1 \repeat } \def\setnonasciicharscatcodenonglobal#1{% \count255=128 \loop\ifnum\count255<256 \catcode\count255=#1\relax \advance\count255 by 1 \repeat } % @documentencoding sets the definition of non-ASCII characters % according to the specified encoding. % \parseargdef\documentencoding{% % Encoding being declared for the document. \def\declaredencoding{\csname #1.enc\endcsname}% % % Supported encodings: names converted to tokens in order to be able % to compare them with \ifx. \def\ascii{\csname US-ASCII.enc\endcsname}% \def\latnine{\csname ISO-8859-15.enc\endcsname}% \def\latone{\csname ISO-8859-1.enc\endcsname}% \def\lattwo{\csname ISO-8859-2.enc\endcsname}% \def\utfeight{\csname UTF-8.enc\endcsname}% % \ifx \declaredencoding \ascii \asciichardefs % \else \ifx \declaredencoding \lattwo \setnonasciicharscatcode\active \lattwochardefs % \else \ifx \declaredencoding \latone \setnonasciicharscatcode\active \latonechardefs % \else \ifx \declaredencoding \latnine \setnonasciicharscatcode\active \latninechardefs % \else \ifx \declaredencoding \utfeight \setnonasciicharscatcode\active \utfeightchardefs % \else \message{Unknown document encoding #1, ignoring.}% % \fi % utfeight \fi % latnine \fi % latone \fi % lattwo \fi % ascii } % A message to be logged when using a character that isn't available % the default font encoding (OT1). % \def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} % Take account of \c (plain) vs. \, (Texinfo) difference. \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} % First, make active non-ASCII characters in order for them to be % correctly categorized when TeX reads the replacement text of % macros containing the character definitions. \setnonasciicharscatcode\active % % Latin1 (ISO-8859-1) character definitions. \def\latonechardefs{% \gdef^^a0{\tie} \gdef^^a1{\exclamdown} \gdef^^a2{\missingcharmsg{CENT SIGN}} \gdef^^a3{{\pounds}} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\missingcharmsg{YEN SIGN}} \gdef^^a6{\missingcharmsg{BROKEN BAR}} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\copyright} \gdef^^aa{\ordf} \gdef^^ab{\guillemetleft} \gdef^^ac{$\lnot$} \gdef^^ad{\-} \gdef^^ae{\registeredsymbol} \gdef^^af{\={}} % \gdef^^b0{\textdegree} \gdef^^b1{$\pm$} \gdef^^b2{$^2$} \gdef^^b3{$^3$} \gdef^^b4{\'{}} \gdef^^b5{$\mu$} \gdef^^b6{\P} % \gdef^^b7{$^.$} \gdef^^b8{\cedilla\ } \gdef^^b9{$^1$} \gdef^^ba{\ordm} % \gdef^^bb{\guillemetright} \gdef^^bc{$1\over4$} \gdef^^bd{$1\over2$} \gdef^^be{$3\over4$} \gdef^^bf{\questiondown} % \gdef^^c0{\`A} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\~A} \gdef^^c4{\"A} \gdef^^c5{\ringaccent A} \gdef^^c6{\AE} \gdef^^c7{\cedilla C} \gdef^^c8{\`E} \gdef^^c9{\'E} \gdef^^ca{\^E} \gdef^^cb{\"E} \gdef^^cc{\`I} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\"I} % \gdef^^d0{\DH} \gdef^^d1{\~N} \gdef^^d2{\`O} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\~O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\O} \gdef^^d9{\`U} \gdef^^da{\'U} \gdef^^db{\^U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\TH} \gdef^^df{\ss} % \gdef^^e0{\`a} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\~a} \gdef^^e4{\"a} \gdef^^e5{\ringaccent a} \gdef^^e6{\ae} \gdef^^e7{\cedilla c} \gdef^^e8{\`e} \gdef^^e9{\'e} \gdef^^ea{\^e} \gdef^^eb{\"e} \gdef^^ec{\`{\dotless i}} \gdef^^ed{\'{\dotless i}} \gdef^^ee{\^{\dotless i}} \gdef^^ef{\"{\dotless i}} % \gdef^^f0{\dh} \gdef^^f1{\~n} \gdef^^f2{\`o} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\~o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\o} \gdef^^f9{\`u} \gdef^^fa{\'u} \gdef^^fb{\^u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\th} \gdef^^ff{\"y} } % Latin9 (ISO-8859-15) encoding character definitions. \def\latninechardefs{% % Encoding is almost identical to Latin1. \latonechardefs % \gdef^^a4{\euro} \gdef^^a6{\v S} \gdef^^a8{\v s} \gdef^^b4{\v Z} \gdef^^b8{\v z} \gdef^^bc{\OE} \gdef^^bd{\oe} \gdef^^be{\"Y} } % Latin2 (ISO-8859-2) character definitions. \def\lattwochardefs{% \gdef^^a0{\tie} \gdef^^a1{\ogonek{A}} \gdef^^a2{\u{}} \gdef^^a3{\L} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\v L} \gdef^^a6{\'S} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\v S} \gdef^^aa{\cedilla S} \gdef^^ab{\v T} \gdef^^ac{\'Z} \gdef^^ad{\-} \gdef^^ae{\v Z} \gdef^^af{\dotaccent Z} % \gdef^^b0{\textdegree} \gdef^^b1{\ogonek{a}} \gdef^^b2{\ogonek{ }} \gdef^^b3{\l} \gdef^^b4{\'{}} \gdef^^b5{\v l} \gdef^^b6{\'s} \gdef^^b7{\v{}} \gdef^^b8{\cedilla\ } \gdef^^b9{\v s} \gdef^^ba{\cedilla s} \gdef^^bb{\v t} \gdef^^bc{\'z} \gdef^^bd{\H{}} \gdef^^be{\v z} \gdef^^bf{\dotaccent z} % \gdef^^c0{\'R} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\u A} \gdef^^c4{\"A} \gdef^^c5{\'L} \gdef^^c6{\'C} \gdef^^c7{\cedilla C} \gdef^^c8{\v C} \gdef^^c9{\'E} \gdef^^ca{\ogonek{E}} \gdef^^cb{\"E} \gdef^^cc{\v E} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\v D} % \gdef^^d0{\DH} \gdef^^d1{\'N} \gdef^^d2{\v N} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\H O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\v R} \gdef^^d9{\ringaccent U} \gdef^^da{\'U} \gdef^^db{\H U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\cedilla T} \gdef^^df{\ss} % \gdef^^e0{\'r} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\u a} \gdef^^e4{\"a} \gdef^^e5{\'l} \gdef^^e6{\'c} \gdef^^e7{\cedilla c} \gdef^^e8{\v c} \gdef^^e9{\'e} \gdef^^ea{\ogonek{e}} \gdef^^eb{\"e} \gdef^^ec{\v e} \gdef^^ed{\'{\dotless{i}}} \gdef^^ee{\^{\dotless{i}}} \gdef^^ef{\v d} % \gdef^^f0{\dh} \gdef^^f1{\'n} \gdef^^f2{\v n} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\H o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\v r} \gdef^^f9{\ringaccent u} \gdef^^fa{\'u} \gdef^^fb{\H u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\cedilla t} \gdef^^ff{\dotaccent{}} } % UTF-8 character definitions. % % This code to support UTF-8 is based on LaTeX's utf8.def, with some % changes for Texinfo conventions. It is included here under the GPL by % permission from Frank Mittelbach and the LaTeX team. % \newcount\countUTFx \newcount\countUTFy \newcount\countUTFz \gdef\UTFviiiTwoOctets#1#2{\expandafter \UTFviiiDefined\csname u8:#1\string #2\endcsname} % \gdef\UTFviiiThreeOctets#1#2#3{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} % \gdef\UTFviiiFourOctets#1#2#3#4{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} \gdef\UTFviiiDefined#1{% \ifx #1\relax \message{\linenumber Unicode char \string #1 not defined for Texinfo}% \else \expandafter #1% \fi } \begingroup \catcode`\~13 \catcode`\"12 \def\UTFviiiLoop{% \global\catcode\countUTFx\active \uccode`\~\countUTFx \uppercase\expandafter{\UTFviiiTmp}% \advance\countUTFx by 1 \ifnum\countUTFx < \countUTFy \expandafter\UTFviiiLoop \fi} \countUTFx = "C2 \countUTFy = "E0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiTwoOctets\string~}} \UTFviiiLoop \countUTFx = "E0 \countUTFy = "F0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiThreeOctets\string~}} \UTFviiiLoop \countUTFx = "F0 \countUTFy = "F4 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiFourOctets\string~}} \UTFviiiLoop \endgroup \begingroup \catcode`\"=12 \catcode`\<=12 \catcode`\.=12 \catcode`\,=12 \catcode`\;=12 \catcode`\!=12 \catcode`\~=13 \gdef\DeclareUnicodeCharacter#1#2{% \countUTFz = "#1\relax %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% \begingroup \parseXMLCharref \def\UTFviiiTwoOctets##1##2{% \csname u8:##1\string ##2\endcsname}% \def\UTFviiiThreeOctets##1##2##3{% \csname u8:##1\string ##2\string ##3\endcsname}% \def\UTFviiiFourOctets##1##2##3##4{% \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% \expandafter\expandafter\expandafter\expandafter \expandafter\expandafter\expandafter \gdef\UTFviiiTmp{#2}% \endgroup} \gdef\parseXMLCharref{% \ifnum\countUTFz < "A0\relax \errhelp = \EMsimple \errmessage{Cannot define Unicode char value < 00A0}% \else\ifnum\countUTFz < "800\relax \parseUTFviiiA,% \parseUTFviiiB C\UTFviiiTwoOctets.,% \else\ifnum\countUTFz < "10000\relax \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% \else \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiA!% \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% \fi\fi\fi } \gdef\parseUTFviiiA#1{% \countUTFx = \countUTFz \divide\countUTFz by 64 \countUTFy = \countUTFz \multiply\countUTFz by 64 \advance\countUTFx by -\countUTFz \advance\countUTFx by 128 \uccode `#1\countUTFx \countUTFz = \countUTFy} \gdef\parseUTFviiiB#1#2#3#4{% \advance\countUTFz by "#10\relax \uccode `#3\countUTFz \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} \endgroup \def\utfeightchardefs{% \DeclareUnicodeCharacter{00A0}{\tie} \DeclareUnicodeCharacter{00A1}{\exclamdown} \DeclareUnicodeCharacter{00A3}{\pounds} \DeclareUnicodeCharacter{00A8}{\"{ }} \DeclareUnicodeCharacter{00A9}{\copyright} \DeclareUnicodeCharacter{00AA}{\ordf} \DeclareUnicodeCharacter{00AB}{\guillemetleft} \DeclareUnicodeCharacter{00AD}{\-} \DeclareUnicodeCharacter{00AE}{\registeredsymbol} \DeclareUnicodeCharacter{00AF}{\={ }} \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} \DeclareUnicodeCharacter{00B4}{\'{ }} \DeclareUnicodeCharacter{00B8}{\cedilla{ }} \DeclareUnicodeCharacter{00BA}{\ordm} \DeclareUnicodeCharacter{00BB}{\guillemetright} \DeclareUnicodeCharacter{00BF}{\questiondown} \DeclareUnicodeCharacter{00C0}{\`A} \DeclareUnicodeCharacter{00C1}{\'A} \DeclareUnicodeCharacter{00C2}{\^A} \DeclareUnicodeCharacter{00C3}{\~A} \DeclareUnicodeCharacter{00C4}{\"A} \DeclareUnicodeCharacter{00C5}{\AA} \DeclareUnicodeCharacter{00C6}{\AE} \DeclareUnicodeCharacter{00C7}{\cedilla{C}} \DeclareUnicodeCharacter{00C8}{\`E} \DeclareUnicodeCharacter{00C9}{\'E} \DeclareUnicodeCharacter{00CA}{\^E} \DeclareUnicodeCharacter{00CB}{\"E} \DeclareUnicodeCharacter{00CC}{\`I} \DeclareUnicodeCharacter{00CD}{\'I} \DeclareUnicodeCharacter{00CE}{\^I} \DeclareUnicodeCharacter{00CF}{\"I} \DeclareUnicodeCharacter{00D0}{\DH} \DeclareUnicodeCharacter{00D1}{\~N} \DeclareUnicodeCharacter{00D2}{\`O} \DeclareUnicodeCharacter{00D3}{\'O} \DeclareUnicodeCharacter{00D4}{\^O} \DeclareUnicodeCharacter{00D5}{\~O} \DeclareUnicodeCharacter{00D6}{\"O} \DeclareUnicodeCharacter{00D8}{\O} \DeclareUnicodeCharacter{00D9}{\`U} \DeclareUnicodeCharacter{00DA}{\'U} \DeclareUnicodeCharacter{00DB}{\^U} \DeclareUnicodeCharacter{00DC}{\"U} \DeclareUnicodeCharacter{00DD}{\'Y} \DeclareUnicodeCharacter{00DE}{\TH} \DeclareUnicodeCharacter{00DF}{\ss} \DeclareUnicodeCharacter{00E0}{\`a} \DeclareUnicodeCharacter{00E1}{\'a} \DeclareUnicodeCharacter{00E2}{\^a} \DeclareUnicodeCharacter{00E3}{\~a} \DeclareUnicodeCharacter{00E4}{\"a} \DeclareUnicodeCharacter{00E5}{\aa} \DeclareUnicodeCharacter{00E6}{\ae} \DeclareUnicodeCharacter{00E7}{\cedilla{c}} \DeclareUnicodeCharacter{00E8}{\`e} \DeclareUnicodeCharacter{00E9}{\'e} \DeclareUnicodeCharacter{00EA}{\^e} \DeclareUnicodeCharacter{00EB}{\"e} \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} \DeclareUnicodeCharacter{00F0}{\dh} \DeclareUnicodeCharacter{00F1}{\~n} \DeclareUnicodeCharacter{00F2}{\`o} \DeclareUnicodeCharacter{00F3}{\'o} \DeclareUnicodeCharacter{00F4}{\^o} \DeclareUnicodeCharacter{00F5}{\~o} \DeclareUnicodeCharacter{00F6}{\"o} \DeclareUnicodeCharacter{00F8}{\o} \DeclareUnicodeCharacter{00F9}{\`u} \DeclareUnicodeCharacter{00FA}{\'u} \DeclareUnicodeCharacter{00FB}{\^u} \DeclareUnicodeCharacter{00FC}{\"u} \DeclareUnicodeCharacter{00FD}{\'y} \DeclareUnicodeCharacter{00FE}{\th} \DeclareUnicodeCharacter{00FF}{\"y} \DeclareUnicodeCharacter{0100}{\=A} \DeclareUnicodeCharacter{0101}{\=a} \DeclareUnicodeCharacter{0102}{\u{A}} \DeclareUnicodeCharacter{0103}{\u{a}} \DeclareUnicodeCharacter{0104}{\ogonek{A}} \DeclareUnicodeCharacter{0105}{\ogonek{a}} \DeclareUnicodeCharacter{0106}{\'C} \DeclareUnicodeCharacter{0107}{\'c} \DeclareUnicodeCharacter{0108}{\^C} \DeclareUnicodeCharacter{0109}{\^c} \DeclareUnicodeCharacter{0118}{\ogonek{E}} \DeclareUnicodeCharacter{0119}{\ogonek{e}} \DeclareUnicodeCharacter{010A}{\dotaccent{C}} \DeclareUnicodeCharacter{010B}{\dotaccent{c}} \DeclareUnicodeCharacter{010C}{\v{C}} \DeclareUnicodeCharacter{010D}{\v{c}} \DeclareUnicodeCharacter{010E}{\v{D}} \DeclareUnicodeCharacter{0112}{\=E} \DeclareUnicodeCharacter{0113}{\=e} \DeclareUnicodeCharacter{0114}{\u{E}} \DeclareUnicodeCharacter{0115}{\u{e}} \DeclareUnicodeCharacter{0116}{\dotaccent{E}} \DeclareUnicodeCharacter{0117}{\dotaccent{e}} \DeclareUnicodeCharacter{011A}{\v{E}} \DeclareUnicodeCharacter{011B}{\v{e}} \DeclareUnicodeCharacter{011C}{\^G} \DeclareUnicodeCharacter{011D}{\^g} \DeclareUnicodeCharacter{011E}{\u{G}} \DeclareUnicodeCharacter{011F}{\u{g}} \DeclareUnicodeCharacter{0120}{\dotaccent{G}} \DeclareUnicodeCharacter{0121}{\dotaccent{g}} \DeclareUnicodeCharacter{0124}{\^H} \DeclareUnicodeCharacter{0125}{\^h} \DeclareUnicodeCharacter{0128}{\~I} \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} \DeclareUnicodeCharacter{012A}{\=I} \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} \DeclareUnicodeCharacter{012C}{\u{I}} \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} \DeclareUnicodeCharacter{0130}{\dotaccent{I}} \DeclareUnicodeCharacter{0131}{\dotless{i}} \DeclareUnicodeCharacter{0132}{IJ} \DeclareUnicodeCharacter{0133}{ij} \DeclareUnicodeCharacter{0134}{\^J} \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} \DeclareUnicodeCharacter{0139}{\'L} \DeclareUnicodeCharacter{013A}{\'l} \DeclareUnicodeCharacter{0141}{\L} \DeclareUnicodeCharacter{0142}{\l} \DeclareUnicodeCharacter{0143}{\'N} \DeclareUnicodeCharacter{0144}{\'n} \DeclareUnicodeCharacter{0147}{\v{N}} \DeclareUnicodeCharacter{0148}{\v{n}} \DeclareUnicodeCharacter{014C}{\=O} \DeclareUnicodeCharacter{014D}{\=o} \DeclareUnicodeCharacter{014E}{\u{O}} \DeclareUnicodeCharacter{014F}{\u{o}} \DeclareUnicodeCharacter{0150}{\H{O}} \DeclareUnicodeCharacter{0151}{\H{o}} \DeclareUnicodeCharacter{0152}{\OE} \DeclareUnicodeCharacter{0153}{\oe} \DeclareUnicodeCharacter{0154}{\'R} \DeclareUnicodeCharacter{0155}{\'r} \DeclareUnicodeCharacter{0158}{\v{R}} \DeclareUnicodeCharacter{0159}{\v{r}} \DeclareUnicodeCharacter{015A}{\'S} \DeclareUnicodeCharacter{015B}{\'s} \DeclareUnicodeCharacter{015C}{\^S} \DeclareUnicodeCharacter{015D}{\^s} \DeclareUnicodeCharacter{015E}{\cedilla{S}} \DeclareUnicodeCharacter{015F}{\cedilla{s}} \DeclareUnicodeCharacter{0160}{\v{S}} \DeclareUnicodeCharacter{0161}{\v{s}} \DeclareUnicodeCharacter{0162}{\cedilla{t}} \DeclareUnicodeCharacter{0163}{\cedilla{T}} \DeclareUnicodeCharacter{0164}{\v{T}} \DeclareUnicodeCharacter{0168}{\~U} \DeclareUnicodeCharacter{0169}{\~u} \DeclareUnicodeCharacter{016A}{\=U} \DeclareUnicodeCharacter{016B}{\=u} \DeclareUnicodeCharacter{016C}{\u{U}} \DeclareUnicodeCharacter{016D}{\u{u}} \DeclareUnicodeCharacter{016E}{\ringaccent{U}} \DeclareUnicodeCharacter{016F}{\ringaccent{u}} \DeclareUnicodeCharacter{0170}{\H{U}} \DeclareUnicodeCharacter{0171}{\H{u}} \DeclareUnicodeCharacter{0174}{\^W} \DeclareUnicodeCharacter{0175}{\^w} \DeclareUnicodeCharacter{0176}{\^Y} \DeclareUnicodeCharacter{0177}{\^y} \DeclareUnicodeCharacter{0178}{\"Y} \DeclareUnicodeCharacter{0179}{\'Z} \DeclareUnicodeCharacter{017A}{\'z} \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} \DeclareUnicodeCharacter{017C}{\dotaccent{z}} \DeclareUnicodeCharacter{017D}{\v{Z}} \DeclareUnicodeCharacter{017E}{\v{z}} \DeclareUnicodeCharacter{01C4}{D\v{Z}} \DeclareUnicodeCharacter{01C5}{D\v{z}} \DeclareUnicodeCharacter{01C6}{d\v{z}} \DeclareUnicodeCharacter{01C7}{LJ} \DeclareUnicodeCharacter{01C8}{Lj} \DeclareUnicodeCharacter{01C9}{lj} \DeclareUnicodeCharacter{01CA}{NJ} \DeclareUnicodeCharacter{01CB}{Nj} \DeclareUnicodeCharacter{01CC}{nj} \DeclareUnicodeCharacter{01CD}{\v{A}} \DeclareUnicodeCharacter{01CE}{\v{a}} \DeclareUnicodeCharacter{01CF}{\v{I}} \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} \DeclareUnicodeCharacter{01D1}{\v{O}} \DeclareUnicodeCharacter{01D2}{\v{o}} \DeclareUnicodeCharacter{01D3}{\v{U}} \DeclareUnicodeCharacter{01D4}{\v{u}} \DeclareUnicodeCharacter{01E2}{\={\AE}} \DeclareUnicodeCharacter{01E3}{\={\ae}} \DeclareUnicodeCharacter{01E6}{\v{G}} \DeclareUnicodeCharacter{01E7}{\v{g}} \DeclareUnicodeCharacter{01E8}{\v{K}} \DeclareUnicodeCharacter{01E9}{\v{k}} \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} \DeclareUnicodeCharacter{01F1}{DZ} \DeclareUnicodeCharacter{01F2}{Dz} \DeclareUnicodeCharacter{01F3}{dz} \DeclareUnicodeCharacter{01F4}{\'G} \DeclareUnicodeCharacter{01F5}{\'g} \DeclareUnicodeCharacter{01F8}{\`N} \DeclareUnicodeCharacter{01F9}{\`n} \DeclareUnicodeCharacter{01FC}{\'{\AE}} \DeclareUnicodeCharacter{01FD}{\'{\ae}} \DeclareUnicodeCharacter{01FE}{\'{\O}} \DeclareUnicodeCharacter{01FF}{\'{\o}} \DeclareUnicodeCharacter{021E}{\v{H}} \DeclareUnicodeCharacter{021F}{\v{h}} \DeclareUnicodeCharacter{0226}{\dotaccent{A}} \DeclareUnicodeCharacter{0227}{\dotaccent{a}} \DeclareUnicodeCharacter{0228}{\cedilla{E}} \DeclareUnicodeCharacter{0229}{\cedilla{e}} \DeclareUnicodeCharacter{022E}{\dotaccent{O}} \DeclareUnicodeCharacter{022F}{\dotaccent{o}} \DeclareUnicodeCharacter{0232}{\=Y} \DeclareUnicodeCharacter{0233}{\=y} \DeclareUnicodeCharacter{0237}{\dotless{j}} \DeclareUnicodeCharacter{02DB}{\ogonek{ }} \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} \DeclareUnicodeCharacter{1E20}{\=G} \DeclareUnicodeCharacter{1E21}{\=g} \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} \DeclareUnicodeCharacter{1E26}{\"H} \DeclareUnicodeCharacter{1E27}{\"h} \DeclareUnicodeCharacter{1E30}{\'K} \DeclareUnicodeCharacter{1E31}{\'k} \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} \DeclareUnicodeCharacter{1E3E}{\'M} \DeclareUnicodeCharacter{1E3F}{\'m} \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} \DeclareUnicodeCharacter{1E54}{\'P} \DeclareUnicodeCharacter{1E55}{\'p} \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} \DeclareUnicodeCharacter{1E7C}{\~V} \DeclareUnicodeCharacter{1E7D}{\~v} \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} \DeclareUnicodeCharacter{1E80}{\`W} \DeclareUnicodeCharacter{1E81}{\`w} \DeclareUnicodeCharacter{1E82}{\'W} \DeclareUnicodeCharacter{1E83}{\'w} \DeclareUnicodeCharacter{1E84}{\"W} \DeclareUnicodeCharacter{1E85}{\"w} \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} \DeclareUnicodeCharacter{1E8C}{\"X} \DeclareUnicodeCharacter{1E8D}{\"x} \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} \DeclareUnicodeCharacter{1E90}{\^Z} \DeclareUnicodeCharacter{1E91}{\^z} \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} \DeclareUnicodeCharacter{1E97}{\"t} \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} \DeclareUnicodeCharacter{1EBC}{\~E} \DeclareUnicodeCharacter{1EBD}{\~e} \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} \DeclareUnicodeCharacter{1EF2}{\`Y} \DeclareUnicodeCharacter{1EF3}{\`y} \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} \DeclareUnicodeCharacter{1EF8}{\~Y} \DeclareUnicodeCharacter{1EF9}{\~y} \DeclareUnicodeCharacter{2013}{--} \DeclareUnicodeCharacter{2014}{---} \DeclareUnicodeCharacter{2018}{\quoteleft} \DeclareUnicodeCharacter{2019}{\quoteright} \DeclareUnicodeCharacter{201A}{\quotesinglbase} \DeclareUnicodeCharacter{201C}{\quotedblleft} \DeclareUnicodeCharacter{201D}{\quotedblright} \DeclareUnicodeCharacter{201E}{\quotedblbase} \DeclareUnicodeCharacter{2022}{\bullet} \DeclareUnicodeCharacter{2026}{\dots} \DeclareUnicodeCharacter{2039}{\guilsinglleft} \DeclareUnicodeCharacter{203A}{\guilsinglright} \DeclareUnicodeCharacter{20AC}{\euro} \DeclareUnicodeCharacter{2192}{\expansion} \DeclareUnicodeCharacter{21D2}{\result} \DeclareUnicodeCharacter{2212}{\minus} \DeclareUnicodeCharacter{2217}{\point} \DeclareUnicodeCharacter{2261}{\equiv} }% end of \utfeightchardefs % US-ASCII character definitions. \def\asciichardefs{% nothing need be done \relax } % Make non-ASCII characters printable again for compatibility with % existing Texinfo documents that may use them, even without declaring a % document encoding. % \setnonasciicharscatcode \other \message{formatting,} \newdimen\defaultparindent \defaultparindent = 15pt \chapheadingskip = 15pt plus 4pt minus 2pt \secheadingskip = 12pt plus 3pt minus 2pt \subsecheadingskip = 9pt plus 2pt minus 2pt % Prevent underfull vbox error messages. \vbadness = 10000 % Don't be very finicky about underfull hboxes, either. \hbadness = 6666 % Following George Bush, get rid of widows and orphans. \widowpenalty=10000 \clubpenalty=10000 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're % using an old version of TeX, don't do anything. We want the amount of % stretch added to depend on the line length, hence the dependence on % \hsize. We call this whenever the paper size is set. % \def\setemergencystretch{% \ifx\emergencystretch\thisisundefined % Allow us to assign to \emergencystretch anyway. \def\emergencystretch{\dimen0}% \else \emergencystretch = .15\hsize \fi } % Parameters in order: 1) textheight; 2) textwidth; % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; % 7) physical page height; 8) physical page width. % % We also call \setleading{\textleading}, so the caller should define % \textleading. The caller should also set \parskip. % \def\internalpagesizes#1#2#3#4#5#6#7#8{% \voffset = #3\relax \topskip = #6\relax \splittopskip = \topskip % \vsize = #1\relax \advance\vsize by \topskip \outervsize = \vsize \advance\outervsize by 2\topandbottommargin \pageheight = \vsize % \hsize = #2\relax \outerhsize = \hsize \advance\outerhsize by 0.5in \pagewidth = \hsize % \normaloffset = #4\relax \bindingoffset = #5\relax % \ifpdf \pdfpageheight #7\relax \pdfpagewidth #8\relax % if we don't reset these, they will remain at "1 true in" of % whatever layout pdftex was dumped with. \pdfhorigin = 1 true in \pdfvorigin = 1 true in \fi % \setleading{\textleading} % \parindent = \defaultparindent \setemergencystretch } % @letterpaper (the default). \def\letterpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % If page is nothing but text, make it come out even. \internalpagesizes{607.2pt}{6in}% that's 46 lines {\voffset}{.25in}% {\bindingoffset}{36pt}% {11in}{8.5in}% }} % Use @smallbook to reset parameters for 7x9.25 trim size. \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt \textleading = 12pt % \internalpagesizes{7.5in}{5in}% {-.2in}{0in}% {\bindingoffset}{16pt}% {9.25in}{7in}% % \lispnarrowing = 0.3in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .5cm }} % Use @smallerbook to reset parameters for 6x9 trim size. % (Just testing, parameters still in flux.) \def\smallerbook{{\globaldefs = 1 \parskip = 1.5pt plus 1pt \textleading = 12pt % \internalpagesizes{7.4in}{4.8in}% {-.2in}{-.4in}% {0pt}{14pt}% {9in}{6in}% % \lispnarrowing = 0.25in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .4cm }} % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % Double-side printing via postscript on Laserjet 4050 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. % To change the settings for a different printer or situation, adjust % \normaloffset until the front-side and back-side texts align. Then % do the same for \bindingoffset. You can set these for testing in % your texinfo source file like this: % @tex % \global\normaloffset = -6mm % \global\bindingoffset = 10mm % @end tex \internalpagesizes{673.2pt}{160mm}% that's 51 lines {\voffset}{\hoffset}% {\bindingoffset}{44pt}% {297mm}{210mm}% % \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = 5mm }} % Use @afivepaper to print on European A5 paper. % From romildo@urano.iceb.ufop.br, 2 July 2000. % He also recommends making @example and @lisp be small. \def\afivepaper{{\globaldefs = 1 \parskip = 2pt plus 1pt minus 0.1pt \textleading = 12.5pt % \internalpagesizes{160mm}{120mm}% {\voffset}{\hoffset}% {\bindingoffset}{8pt}% {210mm}{148mm}% % \lispnarrowing = 0.2in \tolerance = 800 \hfuzz = 1.2pt \contentsrightmargin = 0pt \defbodyindent = 2mm \tableindent = 12mm }} % A specific text layout, 24x15cm overall, intended for A4 paper. \def\afourlatex{{\globaldefs = 1 \afourpaper \internalpagesizes{237mm}{150mm}% {\voffset}{4.6mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% % % Must explicitly reset to 0 because we call \afourpaper. \globaldefs = 0 }} % Use @afourwide to print on A4 paper in landscape format. \def\afourwide{{\globaldefs = 1 \afourpaper \internalpagesizes{241mm}{165mm}% {\voffset}{-2.95mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% \globaldefs = 0 }} % @pagesizes TEXTHEIGHT[,TEXTWIDTH] % Perhaps we should allow setting the margins, \topskip, \parskip, % and/or leading, also. Or perhaps we should compute them somehow. % \parseargdef\pagesizes{\pagesizesyyy #1,,\finish} \def\pagesizesyyy#1,#2,#3\finish{{% \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi \globaldefs = 1 % \parskip = 3pt plus 2pt minus 1pt \setleading{\textleading}% % \dimen0 = #1\relax \advance\dimen0 by \voffset % \dimen2 = \hsize \advance\dimen2 by \normaloffset % \internalpagesizes{#1}{\hsize}% {\voffset}{\normaloffset}% {\bindingoffset}{44pt}% {\dimen0}{\dimen2}% }} % Set default to letter. % \letterpaper \message{and turning on texinfo input format.} \def^^L{\par} % remove \outer, so ^L can appear in an @comment % DEL is a comment character, in case @c does not suffice. \catcode`\^^? = 14 % Define macros to output various characters with catcode for normal text. \catcode`\"=\other \def\normaldoublequote{"} \catcode`\$=\other \def\normaldollar{$}%$ font-lock fix \catcode`\+=\other \def\normalplus{+} \catcode`\<=\other \def\normalless{<} \catcode`\>=\other \def\normalgreater{>} \catcode`\^=\other \def\normalcaret{^} \catcode`\_=\other \def\normalunderscore{_} \catcode`\|=\other \def\normalverticalbar{|} \catcode`\~=\other \def\normaltilde{~} % This macro is used to make a character print one way in \tt % (where it can probably be output as-is), and another way in other fonts, % where something hairier probably needs to be done. % % #1 is what to print if we are indeed using \tt; #2 is what to print % otherwise. Since all the Computer Modern typewriter fonts have zero % interword stretch (and shrink), and it is reasonable to expect all % typewriter fonts to have this, we can check that font parameter. % \def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} % Same as above, but check for italic font. Actually this also catches % non-italic slanted fonts since it is impossible to distinguish them from % italic fonts. But since this is only used by $ and it uses \sl anyway % this is not a problem. \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} % Turn off all special characters except @ % (and those which the user can use as if they were ordinary). % Most of these we simply print from the \tt font, but for some, we can % use math or other variants that look better in normal text. \catcode`\"=\active \def\activedoublequote{{\tt\char34}} \let"=\activedoublequote \catcode`\~=\active \def~{{\tt\char126}} \chardef\hat=`\^ \catcode`\^=\active \def^{{\tt \hat}} \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} \let\realunder=_ % Subroutine for the previous macro. \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } \catcode`\|=\active \def|{{\tt\char124}} \chardef \less=`\< \catcode`\<=\active \def<{{\tt \less}} \chardef \gtr=`\> \catcode`\>=\active \def>{{\tt \gtr}} \catcode`\+=\active \def+{{\tt \char 43}} \catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix % If a .fmt file is being used, characters that might appear in a file % name cannot be active until we have parsed the command line. % So turn them off again, and have \everyjob (or @setfilename) turn them on. % \otherifyactive is called near the end of this file. \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} % Used sometimes to turn off (effectively) the active characters even after % parsing them. \def\turnoffactive{% \normalturnoffactive \otherbackslash } \catcode`\@=0 % \backslashcurfont outputs one backslash character in current font, % as in \char`\\. \global\chardef\backslashcurfont=`\\ \global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work % \realbackslash is an actual character `\' with catcode other, and % \doublebackslash is two of them (for the pdf outlines). {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} % In texinfo, backslash is an active character; it prints the backslash % in fixed width font. \catcode`\\=\active % @ for escape char from now on. % The story here is that in math mode, the \char of \backslashcurfont % ends up printing the roman \ from the math symbol font (because \char % in math mode uses the \mathcode, and plain.tex sets % \mathcode`\\="026E). It seems better for @backslashchar{} to always % print a typewriter backslash, hence we use an explicit \mathchar, % which is the decimal equivalent of "715c (class 7, e.g., use \fam; % ignored family value; char position "5C). We can't use " for the % usual hex value because it has already been made active. @def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}} @let@backslashchar = @normalbackslash % @backslashchar{} is for user documents. % On startup, @fixbackslash assigns: % @let \ = @normalbackslash % \rawbackslash defines an active \ to do \backslashcurfont. % \otherbackslash defines an active \ to be a literal `\' character with % catcode other. We switch back and forth between these. @gdef@rawbackslash{@let\=@backslashcurfont} @gdef@otherbackslash{@let\=@realbackslash} % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of % the literal character `\'. Also revert - to its normal character, in % case the active - from code has slipped in. % {@catcode`- = @active @gdef@normalturnoffactive{% @let-=@normaldash @let"=@normaldoublequote @let$=@normaldollar %$ font-lock fix @let+=@normalplus @let<=@normalless @let>=@normalgreater @let\=@normalbackslash @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let~=@normaltilde @markupsetuplqdefault @markupsetuprqdefault @unsepspaces } } % Make _ and + \other characters, temporarily. % This is canceled by @fixbackslash. @otherifyactive % If a .fmt file is being used, we don't want the `\input texinfo' to show up. % That is what \eatinput is for; after that, the `\' should revert to printing % a backslash. % @gdef@eatinput input texinfo{@fixbackslash} @global@let\ = @eatinput % On the other hand, perhaps the file did not have a `\input texinfo'. Then % the first `\' in the file would cause an error. This macro tries to fix % that, assuming it is called before the first `\' could plausibly occur. % Also turn back on active characters that might appear in the input % file name, in case not using a pre-dumped format. % @gdef@fixbackslash{% @ifx\@eatinput @let\ = @normalbackslash @fi @catcode`+=@active @catcode`@_=@active } % Say @foo, not \foo, in error messages. @escapechar = `@@ % These (along with & and #) are made active for url-breaking, so need % active definitions as the normal characters. @def@normaldot{.} @def@normalquest{?} @def@normalslash{/} % These look ok in all fonts, so just make them not special. % @hashchar{} gets its own user-level command, because of #line. @catcode`@& = @other @def@normalamp{&} @catcode`@# = @other @def@normalhash{#} @catcode`@% = @other @def@normalpercent{%} @let @hashchar = @normalhash @c Finally, make ` and ' active, so that txicodequoteundirected and @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we @c don't make ` and ' active, @code will not get them as active chars. @c Do this last of all since we use ` in the previous @catcode assignments. @catcode`@'=@active @catcode`@`=@active @markupsetuplqdefault @markupsetuprqdefault @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) @c page-delimiter: "^\\\\message" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: @c vim:sw=2: @ignore arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 @end ignore cln-1.3.3/autoconf/ltmain.sh0000644000000000000000000105202612172603761012631 0ustar # libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010, 2011 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. # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.3 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.2 Debian-2.4.2-1.3" TIMESTAMP="" package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs 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 BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-warning|--no-warn) opt_warning=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs 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 BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then # Remove ${wl} instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" func_resolve_sysroot "$deplib" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 cln-1.3.3/autoconf/test-driver0000755000000000000000000000761112172603771013207 0ustar #! /bin/sh # test-driver - basic testsuite driver script. scriptversion=2012-06-27.10; # UTC # Copyright (C) 2011-2013 Free Software Foundation, Inc. # # 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 . # 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 or send patches to # . # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. set -u usage_error () { echo "$0: $*" >&2 print_usage >&2 exit 2 } print_usage () { cat <$log_file 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then estatus=1 fi case $estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac # Report outcome to console. echo "${col}${res}${std}: $test_name" # Register the test result, and other relevant metadata. echo ":test-result: $res" > $trs_file echo ":global-test-result: $res" >> $trs_file echo ":recheck: $recheck" >> $trs_file echo ":copy-in-global-log: $gcopy" >> $trs_file # 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: cln-1.3.3/autoconf/missing0000755000000000000000000001533112172603767012413 0ustar #! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2012-06-26.16; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 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 . # 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 ." 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 'automa4te' 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: cln-1.3.3/autoconf/install-sh0000755000000000000000000003325512172603767013025 0ustar #!/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. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/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. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 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: cln-1.3.3/autoconf/depcomp0000755000000000000000000005601612172603767012376 0ustar #! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # 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 . # 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. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # 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: cln-1.3.3/autoconf/intparam.c0000644000000000000000000011175512034113706012764 0ustar /* Bestimmung einiger Maschinen-Parameter und -Abhängigkeiten */ /* und Ausgabe in ein Include-File */ /* Bruno Haible 10.9.1991, 12.10.1992, 6.12.1992, 24.10.1993 */ /* Auf einigen Systemen werden in die Typen uchar, ushort, uint, */ /* ulong definiert. Normalerweise reicht _POSIX_SOURCE aus, dies zu verhindern, */ /* bei AIX 3.2.5 (rs6000-ibm-aix3.2.5) jedoch nicht. Wir müssen Gewalt anwenden. */ #define _POSIX_SOURCE #define uchar os_uchar #define ushort os_ushort #define uint os_uint #define ulong os_ulong #include #undef ulong #undef uint #undef ushort #undef uchar #define loop while(1) typedef int boolean; #define TRUE 1 #define FALSE 0 #ifdef __CHAR_UNSIGNED__ typedef signed char schar; #else typedef char schar; #endif typedef unsigned char uchar; typedef unsigned short ushort; typedef unsigned /* int */ uint; typedef unsigned long ulong; #ifdef HAVE_LONGLONG typedef long long longlong; typedef unsigned long long ulonglong; #endif typedef int (function)(); static int random_table[256] = /* 2048 zufällige Bits, hier von pi */ { 0xC9,0x0F,0xDA,0xA2,0x21,0x68,0xC2,0x34,0xC4,0xC6,0x62,0x8B, 0x80,0xDC,0x1C,0xD1,0x29,0x02,0x4E,0x08,0x8A,0x67,0xCC,0x74, 0x02,0x0B,0xBE,0xA6,0x3B,0x13,0x9B,0x22,0x51,0x4A,0x08,0x79, 0x8E,0x34,0x04,0xDD,0xEF,0x95,0x19,0xB3,0xCD,0x3A,0x43,0x1B, 0x30,0x2B,0x0A,0x6D,0xF2,0x5F,0x14,0x37,0x4F,0xE1,0x35,0x6D, 0x6D,0x51,0xC2,0x45,0xE4,0x85,0xB5,0x76,0x62,0x5E,0x7E,0xC6, 0xF4,0x4C,0x42,0xE9,0xA6,0x37,0xED,0x6B,0x0B,0xFF,0x5C,0xB6, 0xF4,0x06,0xB7,0xED,0xEE,0x38,0x6B,0xFB,0x5A,0x89,0x9F,0xA5, 0xAE,0x9F,0x24,0x11,0x7C,0x4B,0x1F,0xE6,0x49,0x28,0x66,0x51, 0xEC,0xE4,0x5B,0x3D,0xC2,0x00,0x7C,0xB8,0xA1,0x63,0xBF,0x05, 0x98,0xDA,0x48,0x36,0x1C,0x55,0xD3,0x9A,0x69,0x16,0x3F,0xA8, 0xFD,0x24,0xCF,0x5F,0x83,0x65,0x5D,0x23,0xDC,0xA3,0xAD,0x96, 0x1C,0x62,0xF3,0x56,0x20,0x85,0x52,0xBB,0x9E,0xD5,0x29,0x07, 0x70,0x96,0x96,0x6D,0x67,0x0C,0x35,0x4E,0x4A,0xBC,0x98,0x04, 0xF1,0x74,0x6C,0x08,0xCA,0x18,0x21,0x7C,0x32,0x90,0x5E,0x46, 0x2E,0x36,0xCE,0x3B,0xE3,0x9E,0x77,0x2C,0x18,0x0E,0x86,0x03, 0x9B,0x27,0x83,0xA2,0xEC,0x07,0xA2,0x8F,0xB5,0xC5,0x5D,0xF0, 0x6F,0x4C,0x52,0xC9,0xDE,0x2B,0xCB,0xF6,0x95,0x58,0x17,0x18, 0x39,0x95,0x49,0x7C,0xEA,0x95,0x6A,0xE5,0x15,0xD2,0x26,0x18, 0x98,0xFA,0x05,0x10,0x15,0x72,0x8E,0x5A,0x8A,0xAA,0xC4,0x2D, 0xAD,0x33,0x17,0x0D,0x04,0x50,0x7A,0x33,0xA8,0x55,0x21,0xAB, 0xDF,0x1C,0xBA,0x65, }; #define random_table_length (8*256) static int random_position = -1; int next_random_bit(void) { random_position++; if (random_position==random_table_length) random_position = 0; return (random_table[random_position/8] >> (random_position % 8)) & 1; } void printf_underscored (const char* string) { char c; while (!((c = *string++) == '\0')) { printf("%c",(c==' ' ? '_' : c)); } } /* string_length(string) is the same as strlen(string). */ /* Better avoid to depend on . */ int string_length (char* string) { int count = 0; while (!(*string++ == '\0')) { count++; } return count; } static int char_bitsize, short_bitsize, int_bitsize, long_bitsize; static int uchar_bitsize, ushort_bitsize, uint_bitsize, ulong_bitsize; static boolean char_uchar_same, short_ushort_same, int_uint_same, long_ulong_same; static int pointer_bitsize; #ifdef HAVE_LONGLONG static int longlong_bitsize, ulonglong_bitsize; static boolean longlong_ulonglong_same; #endif void main1(void) { #define get_unsigned_integer_bitsize(type,where) \ { type x = 1; \ int bits = 0; \ loop { \ if (x==0) break; \ x = x+x; \ bits++; \ if (bits==1000) { bits = -1; break; } \ } \ where = bits; \ } #define get_signed_integer_bitsize(type,unsigned_type,where) \ { /* Signed integer overflow is "undefined behaviour" in C99, and gcc-4.3 \ (without -fwrapv option) actually does weird things when signed integer \ overflow occurs. Therefore perform the addition on the unsigned type. \ Drawback: This will not detect cases where the signed type has more bits\ than the unsigned type but the same size according to sizeof. Blech. */ \ type x = 1; \ int bits = 0; \ loop { \ if (x==0) break; \ x = (unsigned_type)x + (unsigned_type)x;\ bits++; \ if (bits==1000) { bits = -1; break; } \ } \ where = bits; \ } #define print_integer_bitsize(type,typestr,where) \ { if (where >= 0) \ { printf("/* Integers of type %s have %ld bits. */\n",typestr,(long)where); \ if (!(typestr[0] == 'u')) \ { printf("#define "); printf_underscored(typestr); printf("_bitsize %ld\n",(long)where); } \ printf("\n"); \ } \ else \ { printf("#error \"Integers of type %s have no binary representation!!\"\n",typestr); } \ if (!(where == char_bitsize * sizeof(type))) \ { printf("#error \"Formula BITSIZE(T) = SIZEOF(T) * BITSPERBYTE does not hold for type %s!!\"\n",typestr); } \ } get_signed_integer_bitsize(schar,uchar,char_bitsize); get_signed_integer_bitsize(short,ushort,short_bitsize); get_signed_integer_bitsize(int,uint,int_bitsize); get_signed_integer_bitsize(long,ulong,long_bitsize); print_integer_bitsize(schar,"char",char_bitsize); print_integer_bitsize(short,"short",short_bitsize); print_integer_bitsize(int,"int",int_bitsize); print_integer_bitsize(long,"long",long_bitsize); #ifdef HAVE_LONGLONG get_signed_integer_bitsize(longlong,ulonglong,longlong_bitsize); print_integer_bitsize(longlong,"long long",longlong_bitsize); #endif get_unsigned_integer_bitsize(uchar,uchar_bitsize); get_unsigned_integer_bitsize(ushort,ushort_bitsize); get_unsigned_integer_bitsize(uint,uint_bitsize); get_unsigned_integer_bitsize(ulong,ulong_bitsize); print_integer_bitsize(uchar,"unsigned char",uchar_bitsize); print_integer_bitsize(ushort,"unsigned short",ushort_bitsize); print_integer_bitsize(uint,"unsigned int",uint_bitsize); print_integer_bitsize(ulong,"unsigned long",ulong_bitsize); #ifdef HAVE_LONGLONG get_unsigned_integer_bitsize(ulonglong,ulonglong_bitsize); print_integer_bitsize(ulonglong,"unsigned long long",ulonglong_bitsize); #endif } void main2(void) { #define compare_integer_bitsizes(typestr1,typestr2,type1_bitsize,type2_bitsize) \ { if (!(type1_bitsize==type2_bitsize)) \ printf("#error \"Integer types %s and %s have different sizes!!\"\n",typestr1,typestr2); \ } compare_integer_bitsizes("char","unsigned char",char_bitsize,uchar_bitsize); compare_integer_bitsizes("short","unsigned short",short_bitsize,ushort_bitsize); compare_integer_bitsizes("int","unsigned int",int_bitsize,uint_bitsize); compare_integer_bitsizes("long","unsigned long",long_bitsize,ulong_bitsize); #ifdef HAVE_LONGLONG compare_integer_bitsizes("long long","unsigned long long",longlong_bitsize,ulonglong_bitsize); #endif } #define get_a_random(type,bitsize,where) \ { type x = 0; \ int i = bitsize; \ while (i>0) { x = (x<<1) + next_random_bit(); i--; } \ where = x; \ } #define get_a_random_twice(type1,type2,bitsize,where1,where2) \ { type1 x1 = 0; type2 x2 = 0; \ int i = bitsize; \ while (i>0) \ { type1 b = next_random_bit(); \ x1 = ((x1<<1) + b); x2 = ((x2<<1) + b); \ i--; \ } \ where1 = x1; where2 = x2; \ } void main3(void) { #define compare_integer_representation(type1,type2,typestr1,typestr2,type1_bitsize,type2_bitsize,where) \ { if ((type1_bitsize>=0) && (type2_bitsize>=0) && (type1_bitsize==type2_bitsize)) \ { int i,j; \ type1 sample1; type2 sample2; \ where = TRUE; \ for (i = 0; i<100; i++) \ { get_a_random_twice(type1,type2,type1_bitsize,sample1,sample2); \ if (!(sample1 == (type1)(sample2))) { where = FALSE; } \ if (!(sample2 == (type2)(sample1))) { where = FALSE; } \ } \ for (i = 0; i<100; i++) \ { get_a_random(type1,type1_bitsize,sample1); \ sample2 = (type2)(sample1); \ for (j = 0; j < type1_bitsize; j++) \ if (!( ((sample1 & ((type1)1<= 0) \ { int i,j,shc; \ type sample1,sample2; \ boolean left_works = TRUE, right_works = TRUE; \ for (i = 0; i<100; i++) \ { get_a_random(type,type_bitsize,sample1); \ for (shc = 0; shc < type_bitsize; shc++) \ { sample2 = sample1 << shc; \ for (j=0; j < type_bitsize; j++) \ { if (!( ((sample2 & ((type)1<> shc; \ for (j=0; j < type_bitsize; j++) \ { if (!( ((sample2 & ((type)1<= type_bitsize-shc ? TRUE : ((sample1 & ((type)1<<(j+shc))) == 0)) \ ) ) \ { right_works = FALSE; } \ } } } \ if (!left_works) \ { printf("#error \"Left shift of integers of type %s does not work!!\"\n",typestr); } \ if (!right_works) \ { printf("#error \"Right shift of integers of type %s does not work!!\"\n",typestr); } \ } #define test_integer_sshift(type,typestr,type_bitsize) \ if (type_bitsize >= 0) \ { int i,j,shc; \ type sample1,sample2; \ boolean left_works = TRUE, right_works = TRUE; \ for (i = 0; i<100; i++) \ { get_a_random(type,type_bitsize,sample1); \ for (shc = 0; shc < type_bitsize; shc++) \ { sample2 = sample1 << shc; \ for (j=0; j < type_bitsize; j++) \ { if (!( ((sample2 & ((type)1<> shc; \ for (j=0; j < type_bitsize; j++) \ { if (!( ((sample2 & ((type)1<=type_bitsize ? type_bitsize-1 : j+shc))) == 0) \ ) ) \ { right_works = FALSE; } \ } } } \ if (!left_works) \ { printf("#error \"Left shift of integers of type %s does not work!!\"\n",typestr); } \ if (!right_works) \ { printf("#error \"Right shift of integers of type %s does not work!!\"\n",typestr); } \ } test_integer_ushift(uchar,"unsigned char",uchar_bitsize); test_integer_ushift(ushort,"unsigned short",ushort_bitsize); test_integer_ushift(uint,"unsigned int",uint_bitsize); test_integer_ushift(ulong,"unsigned long",ulong_bitsize); #ifdef HAVE_LONGLONG test_integer_ushift(ulonglong,"unsigned long long",ulonglong_bitsize); #endif test_integer_sshift(schar,"char",char_bitsize); test_integer_sshift(short,"short",short_bitsize); test_integer_sshift(int,"int",int_bitsize); test_integer_sshift(long,"long",long_bitsize); #ifdef HAVE_LONGLONG test_integer_sshift(longlong,"long long",longlong_bitsize); #endif } void main5(void) { #define test_integer_casts(type1,type2,typestr1,typestr2,type1_bitsize,type2_bitsize,want) \ if (type1_bitsize <= type2_bitsize) \ { int i,j; \ boolean modifies = FALSE; \ boolean zero_extends = TRUE; \ boolean sign_extends = TRUE; \ for (i = 0; i<100; i++) \ { type1 sample1; \ type2 sample2; \ get_a_random(type1,type1_bitsize,sample1); \ sample2 = (type2)sample1; \ if (!(sample1 == (type1)sample2)) { modifies = TRUE; } \ for (j = 0; jdummy2) #define get_alignment(type,typestr) \ { struct { char dummy1; type dummy2; } dummy; \ long alignment = (char*)&dummy.dummy2 - (char*)&dummy; \ printf("/* Type %s has sizeof = %ld and alignment = %ld. */\n",typestr,(long)sizeof(type),alignment); \ if (!(typestr[0] == 'u') && !(typestr[string_length(typestr)-1] == '*')) \ { printf("#define sizeof_"); printf_underscored(typestr); printf(" %ld\n",(long)sizeof(type)); \ printf("#define alignment_"); printf_underscored(typestr); printf(" %ld\n",alignment); \ } \ if (!((alignment & (alignment-1)) == 0)) \ printf("#error \"The alignment %ld of type %s is not a power of two!!\"\n",alignment,typestr); \ printf("\n"); \ } get_alignment(char,"char"); get_alignment(uchar,"unsigned char"); get_alignment(short,"short"); get_alignment(ushort,"unsigned short"); get_alignment(int,"int"); get_alignment(uint,"unsigned int"); get_alignment(long,"long"); get_alignment(ulong,"unsigned long"); #ifdef HAVE_LONGLONG get_alignment(longlong,"long long"); get_alignment(ulonglong,"unsigned long long"); #endif get_alignment(float,"float"); get_alignment(double,"double"); get_alignment(char*,"char *"); get_alignment(long*,"long *"); get_alignment(function*,"function *"); } void main9(void) { #define get_endian(type,typestr,type_bitsize) \ { if (type_bitsize == uchar_bitsize * sizeof(type)) \ { union { uchar einzeln[sizeof(type)]; type gesamt; } x; \ int i,j; \ boolean big_endian = TRUE; \ boolean little_endian = TRUE; \ for (i = 0; i<100; i++) \ { type sample; \ get_a_random(type,type_bitsize,sample); \ x.gesamt = sample; \ for (j = 0; j>= uchar_bitsize) \ { if (!( (sample & (((type)1< 0) { printf("/* Stack grows up, ca. %ld bytes per function call. */\n",(long)stack_direction); printf("#define stack_grows_up\n"); } else if (stack_direction < 0) { printf("/* Stack grows down, ca. %ld bytes per function call. */\n",-(long)stack_direction); printf("#define stack_grows_down\n"); } else printf("#error \"Unknown stack model -- incorrect C semantics!!\"\n"); } int main() { main1(); main2(); main3(); main4(); main5(); main6(); main7(); main8(); main9(); main10(); if (ferror(stdout) || fclose(stdout)) return 1; return 0; } cln-1.3.3/autoconf/cl_config.h.in0000644000000000000000000001002312172603766013505 0ustar /* autoconf/cl_config.h.in. Generated from configure.ac by autoheader. */ #ifndef _CL_CONFIG_H #define _CL_CONFIG_H #include "cln/host_cpu.h" /* prevents cln/config.h from being included, so no macro gets redefined */ #define _CL_CONFIG_PUBLIC_H /* prevents cln/version.h from being included, so no macro gets redefined */ #define _CL_VERSION_H /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* symbols are prefixed by an underscore in assembly language */ #undef ASM_UNDERSCORE /* Define if compiler supports __attribute__((flatten)) */ #undef CL_HAVE_ATTRIBUTE_FLATTEN /* Define if GNU MP library is available */ #undef CL_USE_GMP /* CLN release number */ #undef CL_VERSION /* Major version number of CLN */ #undef CL_VERSION_MAJOR /* Minor version number of CLN */ #undef CL_VERSION_MINOR /* Patchlevel version number of CLN */ #undef CL_VERSION_PATCHLEVEL /* declaration of gettimeofday() needs dots */ #undef GETTIMEOFDAY_DOTS /* type of `tzp' in gettimeofday() declaration */ #undef GETTIMEOFDAY_TZP_T /* have and it should be used (not Ultrix) */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* have , the getrusage() function, the struct rusage type, and defines RUSAGE_SELF */ #undef HAVE_GETRUSAGE /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if compiler supports long double type */ #undef HAVE_LONGDOUBLE /* compiler supports the `long long' type */ #undef HAVE_LONGLONG /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* or contains a declaration for perror() */ #undef HAVE_PERROR_DECL /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_RESOURCE_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIMES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* have the times() function and it returns the real time, but do not have the gettimeofday() or ftime() function */ #undef HAVE_TIMES_CLOCK /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* need to link with an external alloca.o when using alloca() */ #undef NO_ALLOCA /* 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 /* type of `who' in getrusage() declaration */ #undef RUSAGE_WHO_T /* 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 1 if type `char' is unsigned and you are not using gcc. */ #ifndef __CHAR_UNSIGNED__ # undef __CHAR_UNSIGNED__ #endif #endif /* _CL_CONFIG_H */ cln-1.3.3/autoconf/config.rpath0000755000000000000000000004443512172473044013324 0ustar #! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2013 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # 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. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's _LT_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in ecc*) wl='-Wl,' ;; icc* | ifort*) wl='-Wl,' ;; lf95*) wl='-Wl,' ;; nagfor*) wl='-Wl,-Wl,,' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; xl* | bgxl* | bgf* | mpixl*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) wl= ;; *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; newsos6) ;; *nto* | *qnx*) ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) wl='-Qoption ld ' ;; *) wl='-Wl,' ;; esac ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's _LT_LINKER_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; haiku*) ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then : else ld_shlibs=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. # Unlike libtool.m4, here we don't care about _all_ names of the library, but # only about the one the linker finds when passed -lNAME. This is the last # element of library_names_spec in libtool.m4, or possibly two of them if the # linker has special search rules. library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) library_names_spec='$libname.a' ;; aix[4-9]*) library_names_spec='$libname$shrext' ;; amigaos*) case "$host_cpu" in powerpc*) library_names_spec='$libname$shrext' ;; m68k) library_names_spec='$libname.a' ;; esac ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32* | cegcc*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib library_names_spec='$libname$shrext' ;; dgux*) library_names_spec='$libname$shrext' ;; freebsd* | dragonfly*) case "$host_os" in freebsd[123]*) library_names_spec='$libname$shrext$versuffix' ;; *) library_names_spec='$libname$shrext' ;; esac ;; gnu*) library_names_spec='$libname$shrext' ;; haiku*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; *nto* | *qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; tpf*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <} and Richard B. Kreckel, @code{}. Copyright (C) Bruno Haible 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008. Copyright (C) Richard B. Kreckel 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013. Copyright (C) Alexei Sheplyakov 2008, 2010. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. @ignore Permission is granted to process this file through TeX and print the results, provided the printed document carries copying permission notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual). @end ignore Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the author. @end ifnottex @c For TeX only. @c prevent ugly black rectangles on overfull hbox lines: @finalout @titlepage @title CLN, a Class Library for Numbers @author @uref{http://www.ginac.de/CLN} @page @vskip 0pt plus 1filll Copyright @copyright{} Bruno Haible 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008. @sp 0 Copyright @copyright{} Richard B. Kreckel 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013. @sp 0 Copyright @copyright{} Alexei Sheplyakov 2008, 2010. @sp 2 Published by Bruno Haible, @code{} and Richard B. Kreckel, @code{}. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the authors. @end titlepage @page @iftex @c Table of contents @contents @end iftex @menu * Introduction:: * Installation:: * Ordinary number types:: * Functions on numbers:: * Input/Output:: * Rings:: * Modular integers:: * Symbolic data types:: * Univariate polynomials:: * Internals:: * Using the library:: * Customizing:: * Index:: @detailmenu --- The Detailed Node Listing --- Installation * Prerequisites:: * Building the library:: * Installing the library:: * Cleaning up:: Prerequisites * C++ compiler:: * Make utility:: * Sed utility:: Building the library * Using the GNU MP Library:: Ordinary number types * Exact numbers:: * Floating-point numbers:: * Complex numbers:: * Conversions:: Functions on numbers * Constructing numbers:: * Elementary functions:: * Elementary rational functions:: * Elementary complex functions:: * Comparisons:: * Rounding functions:: * Roots:: * Transcendental functions:: * Functions on integers:: * Functions on floating-point numbers:: * Conversion functions:: * Random number generators:: * Modifying operators:: Constructing numbers * Constructing integers:: * Constructing rational numbers:: * Constructing floating-point numbers:: * Constructing complex numbers:: Transcendental functions * Exponential and logarithmic functions:: * Trigonometric functions:: * Hyperbolic functions:: * Euler gamma:: * Riemann zeta:: Functions on integers * Logical functions:: * Number theoretic functions:: * Combinatorial functions:: Conversion functions * Conversion to floating-point numbers:: * Conversion to rational numbers:: Input/Output * Internal and printed representation:: * Input functions:: * Output functions:: Modular integers * Modular integer rings:: * Functions on modular integers:: Symbolic data types * Strings:: * Symbols:: Univariate polynomials * Univariate polynomial rings:: * Functions on univariate polynomials:: * Special polynomials:: Internals * Why C++ ?:: * Memory efficiency:: * Speed efficiency:: * Garbage collection:: Using the library * Compiler options:: * Include files:: * An Example:: * Debugging support:: * Reporting Problems:: Customizing * Error handling:: * Floating-point underflow:: * Customizing I/O:: * Customizing the memory allocator:: @end detailmenu @end menu @node Introduction @chapter Introduction @noindent CLN is a library for computations with all kinds of numbers. It has a rich set of number classes: @itemize @bullet @item Integers (with unlimited precision), @item Rational numbers, @item Floating-point numbers: @itemize @minus @item Short float, @item Single float, @item Double float, @item Long float (with unlimited precision), @end itemize @item Complex numbers, @item Modular integers (integers modulo a fixed integer), @item Univariate polynomials. @end itemize @noindent The subtypes of the complex numbers among these are exactly the types of numbers known to the Common Lisp language. Therefore @code{CLN} can be used for Common Lisp implementations, giving @samp{CLN} another meaning: it becomes an abbreviation of ``Common Lisp Numbers''. @noindent The CLN package implements @itemize @bullet @item Elementary functions (@code{+}, @code{-}, @code{*}, @code{/}, @code{sqrt}, comparisons, @dots{}), @item Logical functions (logical @code{and}, @code{or}, @code{not}, @dots{}), @item Transcendental functions (exponential, logarithmic, trigonometric, hyperbolic functions and their inverse functions). @end itemize @noindent CLN is a C++ library. Using C++ as an implementation language provides @itemize @bullet @item efficiency: it compiles to machine code, @item type safety: the C++ compiler knows about the number types and complains if, for example, you try to assign a float to an integer variable. @item algebraic syntax: You can use the @code{+}, @code{-}, @code{*}, @code{=}, @code{==}, @dots{} operators as in C or C++. @end itemize @noindent CLN is memory efficient: @itemize @bullet @item Small integers and short floats are immediate, not heap allocated. @item Heap-allocated memory is reclaimed through an automatic, non-interruptive garbage collection. @end itemize @noindent CLN is speed efficient: @itemize @bullet @item The kernel of CLN has been written in assembly language for some CPUs (@code{i386}, @code{m68k}, @code{sparc}, @code{mips}, @code{arm}). @item @cindex GMP On all CPUs, CLN may be configured to use the superefficient low-level routines from GNU GMP version 3. @item It uses Karatsuba multiplication, which is significantly faster for large numbers than the standard multiplication algorithm. @item For very large numbers (more than 12000 decimal digits), it uses @iftex Sch{@"o}nhage-Strassen @cindex Sch{@"o}nhage-Strassen multiplication @end iftex @ifinfo Schoenhage-Strassen @cindex Schoenhage-Strassen multiplication @end ifinfo multiplication, which is an asymptotically optimal multiplication algorithm, for multiplication, division and radix conversion. @item @cindex binary splitting It uses binary splitting for fast evaluation of series of rational numbers as they occur in the evaluation of elementary functions and some constants. @end itemize @noindent CLN aims at being easily integrated into larger software packages: @itemize @bullet @item The garbage collection imposes no burden on the main application. @item The library provides hooks for memory allocation and throws exceptions in case of errors. @item @cindex namespace All non-macro identifiers are hidden in namespace @code{cln} in order to avoid name clashes. @end itemize @node Installation @chapter Installation This section describes how to install the CLN package on your system. @menu * Prerequisites:: * Building the library:: * Installing the library:: * Cleaning up:: @end menu @node Prerequisites, Building the library, Installation, Installation @section Prerequisites @menu * C++ compiler:: * Make utility:: * Sed utility:: @end menu @node C++ compiler @subsection C++ compiler To build CLN, you need a C++ compiler. GNU @code{g++ 4.0.0} or newer is recommended. The following C++ features are used: classes, member functions, overloading of functions and operators, constructors and destructors, inline, const, multiple inheritance, templates and namespaces. The following C++ features are not used: @code{new}, @code{delete}, virtual inheritance. CLN relies on semi-automatic ordering of initializations of static and global variables, a feature which I could implement for GNU g++ only. Also, it is not known whether this semi-automatic ordering works on all platforms when a non-GNU assembler is being used. @node Make utility @subsection Make utility @cindex @code{make} To build CLN, you also need to have GNU @code{make} installed. @node Sed utility @subsection Sed utility @cindex @code{sed} To build CLN on HP-UX, you also need to have GNU @code{sed} installed. This is because the libtool script, which creates the CLN library, relies on @code{sed}, and the vendor's @code{sed} utility on these systems is too limited. @node Building the library @section Building the library As with any autoconfiguring GNU software, installation is as easy as this: @example $ ./configure $ make $ make check @end example If on your system, @samp{make} is not GNU @code{make}, you have to use @samp{gmake} instead of @samp{make} above. The @code{configure} command checks out some features of your system and C++ compiler and builds the @code{Makefile}s. The @code{make} command builds the library. This step may take about half an hour on an average workstation. The @code{make check} runs some test to check that no important subroutine has been miscompiled. The @code{configure} command accepts options. To get a summary of them, try @example $ ./configure --help @end example Some of the options are explained in detail in the @samp{INSTALL.generic} file. You can specify the C compiler, the C++ compiler and their options through the following environment variables when running @code{configure}: @table @code @item CC Specifies the C compiler. @item CFLAGS Flags to be given to the C compiler when compiling programs (not when linking). @item CXX Specifies the C++ compiler. @item CXXFLAGS Flags to be given to the C++ compiler when compiling programs (not when linking). @item CPPFLAGS Flags to be given to the C/C++ preprocessor. @item LDFLAGS Flags to be given to the linker. @end table Examples: @example $ CC="gcc" CFLAGS="-O" CXX="g++" CXXFLAGS="-O" ./configure @end example @example $ CC="gcc -V 3.2.3" CFLAGS="-O2 -finline-limit=1000" \ CXX="g++ -V 3.2.3" CXXFLAGS="-O2 -finline-limit=1000" \ CPPFLAGS="-DNO_ASM" ./configure @end example @example $ CC="gcc-4.2" CFLAGS="-O2" CXX="g++-4.2" CXXFLAGS="-O2" ./configure @end example Note that for these environment variables to take effect, you have to set them (assuming a Bourne-compatible shell) on the same line as the @code{configure} command. If you made the settings in earlier shell commands, you have to @code{export} the environment variables before calling @code{configure}. In a @code{csh} shell, you have to use the @samp{setenv} command for setting each of the environment variables. Currently CLN works only with the GNU @code{g++} compiler, and only in optimizing mode. So you should specify at least @code{-O} in the CXXFLAGS, or no CXXFLAGS at all. If CXXFLAGS is not set, CLN will be compiled with @code{-O}. The assembler language kernel can be turned off by specifying @code{-DNO_ASM} in the CPPFLAGS. If @code{make check} reports any problems, you may try to clean up (see @ref{Cleaning up}) and configure and compile again, this time with @code{-DNO_ASM}. If you use @code{g++} 3.2.x or earlier, I recommend adding @samp{-finline-limit=1000} to the CXXFLAGS. This is essential for good code. If you use @code{g++} from gcc-3.0.4 or older on Sparc, add either @samp{-O}, @samp{-O1} or @samp{-O2 -fno-schedule-insns} to the CXXFLAGS. With full @samp{-O2}, @code{g++} miscompiles the division routines. Also, do not use gcc-3.0 on Sparc for compiling CLN, it won't work at all. Also, please do not compile CLN with @code{g++} using the @code{-O3} optimization level. This leads to inferior code quality. Some newer versions of @code{g++} require quite an amount of memory. You might need some swap space if your machine doesn't have 512 MB of RAM. By default, both a shared and a static library are built. You can build CLN as a static (or shared) library only, by calling @code{configure} with the option @samp{--disable-shared} (or @samp{--disable-static}). While shared libraries are usually more convenient to use, they may not work on all architectures. Try disabling them if you run into linker problems. Also, they are generally slightly slower than static libraries so runtime-critical applications should be linked statically. @menu * Using the GNU MP Library:: @end menu @node Using the GNU MP Library @subsection Using the GNU MP Library @cindex GMP CLN may be configured to make use of a preinstalled @code{gmp} library for some low-level routines. Please make sure that you have at least @code{gmp} version 3.0 installed since earlier versions are unsupported and likely not to work. Using @code{gmp} is known to be quite a boost for CLN's performance. By default, CLN will autodetect @code{gmp} and use it. If you do not want CLN to make use of a preinstalled @code{gmp} library, then you can explicitly specify so by calling @code{configure} with the option @samp{--without-gmp}. If you have installed the @code{gmp} library and its header files in some place where the compiler cannot find it by default, you must help @code{configure} and specify the prefix that was used when @code{gmp} was configured. Here is an example: @example $ ./configure --with-gmp=/opt/gmp-4.2.2 @end example This assumes that the @code{gmp} header files have been installed in @file{/opt/gmp-4.2.2/include/} and the library in @file{/opt/gmp-4.2.2/lib/}. More uncommon GMP installations can be handled by setting CPPFLAGS and LDFLAGS appropriately prior to running @code{configure}. @node Installing the library @section Installing the library @cindex installation As with any autoconfiguring GNU software, installation is as easy as this: @example $ make install @end example The @samp{make install} command installs the library and the include files into public places (@file{/usr/local/lib/} and @file{/usr/local/include/}, if you haven't specified a @code{--prefix} option to @code{configure}). This step may require superuser privileges. If you have already built the library and wish to install it, but didn't specify @code{--prefix=@dots{}} at configure time, just re-run @code{configure}, giving it the same options as the first time, plus the @code{--prefix=@dots{}} option. @node Cleaning up @section Cleaning up You can remove system-dependent files generated by @code{make} through @example $ make clean @end example You can remove all files generated by @code{make}, thus reverting to a virgin distribution of CLN, through @example $ make distclean @end example @node Ordinary number types @chapter Ordinary number types CLN implements the following class hierarchy: @example Number cl_number | | Real or complex number cl_N | | Real number cl_R | +-------------------+-------------------+ | | Rational number Floating-point number cl_RA cl_F | | | +--------------+--------------+--------------+ Integer | | | | cl_I Short-Float Single-Float Double-Float Long-Float cl_SF cl_FF cl_DF cl_LF @end example @cindex @code{cl_number} @cindex abstract class The base class @code{cl_number} is an abstract base class. It is not useful to declare a variable of this type except if you want to completely disable compile-time type checking and use run-time type checking instead. @cindex @code{cl_N} @cindex real number @cindex complex number The class @code{cl_N} comprises real and complex numbers. There is no special class for complex numbers since complex numbers with imaginary part @code{0} are automatically converted to real numbers. @cindex @code{cl_R} The class @code{cl_R} comprises real numbers of different kinds. It is an abstract class. @cindex @code{cl_RA} @cindex rational number @cindex integer The class @code{cl_RA} comprises exact real numbers: rational numbers, including integers. There is no special class for non-integral rational numbers since rational numbers with denominator @code{1} are automatically converted to integers. @cindex @code{cl_F} The class @code{cl_F} implements floating-point approximations to real numbers. It is an abstract class. @menu * Exact numbers:: * Floating-point numbers:: * Complex numbers:: * Conversions:: @end menu @node Exact numbers @section Exact numbers @cindex exact number Some numbers are represented as exact numbers: there is no loss of information when such a number is converted from its mathematical value to its internal representation. On exact numbers, the elementary operations (@code{+}, @code{-}, @code{*}, @code{/}, comparisons, @dots{}) compute the completely correct result. In CLN, the exact numbers are: @itemize @bullet @item rational numbers (including integers), @item complex numbers whose real and imaginary parts are both rational numbers. @end itemize Rational numbers are always normalized to the form @code{@var{numerator}/@var{denominator}} where the numerator and denominator are coprime integers and the denominator is positive. If the resulting denominator is @code{1}, the rational number is converted to an integer. @cindex immediate numbers Small integers (typically in the range @code{-2^29}@dots{}@code{2^29-1}, for 32-bit machines) are especially efficient, because they consume no heap allocation. Otherwise the distinction between these immediate integers (called ``fixnums'') and heap allocated integers (called ``bignums'') is completely transparent. @node Floating-point numbers @section Floating-point numbers @cindex floating-point number Not all real numbers can be represented exactly. (There is an easy mathematical proof for this: Only a countable set of numbers can be stored exactly in a computer, even if one assumes that it has unlimited storage. But there are uncountably many real numbers.) So some approximation is needed. CLN implements ordinary floating-point numbers, with mantissa and exponent. @cindex rounding error The elementary operations (@code{+}, @code{-}, @code{*}, @code{/}, @dots{}) only return approximate results. For example, the value of the expression @code{(cl_F) 0.3 + (cl_F) 0.4} prints as @samp{0.70000005}, not as @samp{0.7}. Rounding errors like this one are inevitable when computing with floating-point numbers. Nevertheless, CLN rounds the floating-point results of the operations @code{+}, @code{-}, @code{*}, @code{/}, @code{sqrt} according to the ``round-to-even'' rule: It first computes the exact mathematical result and then returns the floating-point number which is nearest to this. If two floating-point numbers are equally distant from the ideal result, the one with a @code{0} in its least significant mantissa bit is chosen. Similarly, testing floating point numbers for equality @samp{x == y} is gambling with random errors. Better check for @samp{abs(x - y) < epsilon} for some well-chosen @code{epsilon}. Floating point numbers come in four flavors: @itemize @bullet @item @cindex @code{cl_SF} Short floats, type @code{cl_SF}. They have 1 sign bit, 8 exponent bits (including the exponent's sign), and 17 mantissa bits (including the ``hidden'' bit). They don't consume heap allocation. @item @cindex @code{cl_FF} Single floats, type @code{cl_FF}. They have 1 sign bit, 8 exponent bits (including the exponent's sign), and 24 mantissa bits (including the ``hidden'' bit). In CLN, they are represented as IEEE single-precision floating point numbers. This corresponds closely to the C/C++ type @samp{float}. @item @cindex @code{cl_DF} Double floats, type @code{cl_DF}. They have 1 sign bit, 11 exponent bits (including the exponent's sign), and 53 mantissa bits (including the ``hidden'' bit). In CLN, they are represented as IEEE double-precision floating point numbers. This corresponds closely to the C/C++ type @samp{double}. @item @cindex @code{cl_LF} Long floats, type @code{cl_LF}. They have 1 sign bit, 32 exponent bits (including the exponent's sign), and n mantissa bits (including the ``hidden'' bit), where n >= 64. The precision of a long float is unlimited, but once created, a long float has a fixed precision. (No ``lazy recomputation''.) @end itemize Of course, computations with long floats are more expensive than those with smaller floating-point formats. CLN does not implement features like NaNs, denormalized numbers and gradual underflow. If the exponent range of some floating-point type is too limited for your application, choose another floating-point type with larger exponent range. @cindex @code{cl_F} As a user of CLN, you can forget about the differences between the four floating-point types and just declare all your floating-point variables as being of type @code{cl_F}. This has the advantage that when you change the precision of some computation (say, from @code{cl_DF} to @code{cl_LF}), you don't have to change the code, only the precision of the initial values. Also, many transcendental functions have been declared as returning a @code{cl_F} when the argument is a @code{cl_F}, but such declarations are missing for the types @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF}. (Such declarations would be wrong if the floating point contagion rule happened to change in the future.) @node Complex numbers @section Complex numbers @cindex complex number Complex numbers, as implemented by the class @code{cl_N}, have a real part and an imaginary part, both real numbers. A complex number whose imaginary part is the exact number @code{0} is automatically converted to a real number. Complex numbers can arise from real numbers alone, for example through application of @code{sqrt} or transcendental functions. @node Conversions @section Conversions @cindex conversion Conversions from any class to any its superclasses (``base classes'' in C++ terminology) is done automatically. Conversions from the C built-in types @samp{long} and @samp{unsigned long} are provided for the classes @code{cl_I}, @code{cl_RA}, @code{cl_R}, @code{cl_N} and @code{cl_number}. Conversions from the C built-in types @samp{int} and @samp{unsigned int} are provided for the classes @code{cl_I}, @code{cl_RA}, @code{cl_R}, @code{cl_N} and @code{cl_number}. However, these conversions emphasize efficiency. On 32-bit systems, their range is therefore limited: @itemize @minus @item The conversion from @samp{int} works only if the argument is < 2^29 and >= -2^29. @item The conversion from @samp{unsigned int} works only if the argument is < 2^29. @end itemize In a declaration like @samp{cl_I x = 10;} the C++ compiler is able to do the conversion of @code{10} from @samp{int} to @samp{cl_I} at compile time already. On the other hand, code like @samp{cl_I x = 1000000000;} is in error on 32-bit machines. So, if you want to be sure that an @samp{int} whose magnitude is not guaranteed to be < 2^29 is correctly converted to a @samp{cl_I}, first convert it to a @samp{long}. Similarly, if a large @samp{unsigned int} is to be converted to a @samp{cl_I}, first convert it to an @samp{unsigned long}. On 64-bit machines there is no such restriction. There, conversions from arbitrary 32-bit @samp{int} values always works correctly. Conversions from the C built-in type @samp{float} are provided for the classes @code{cl_FF}, @code{cl_F}, @code{cl_R}, @code{cl_N} and @code{cl_number}. Conversions from the C built-in type @samp{double} are provided for the classes @code{cl_DF}, @code{cl_F}, @code{cl_R}, @code{cl_N} and @code{cl_number}. Conversions from @samp{const char *} are provided for the classes @code{cl_I}, @code{cl_RA}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF}, @code{cl_F}, @code{cl_R}, @code{cl_N}. The easiest way to specify a value which is outside of the range of the C++ built-in types is therefore to specify it as a string, like this: @cindex Rubik's cube @example cl_I order_of_rubiks_cube_group = "43252003274489856000"; @end example Note that this conversion is done at runtime, not at compile-time. Conversions from @code{cl_I} to the C built-in types @samp{int}, @samp{unsigned int}, @samp{long}, @samp{unsigned long} are provided through the functions @table @code @item int cl_I_to_int (const cl_I& x) @cindex @code{cl_I_to_int ()} @itemx unsigned int cl_I_to_uint (const cl_I& x) @cindex @code{cl_I_to_uint ()} @itemx long cl_I_to_long (const cl_I& x) @cindex @code{cl_I_to_long ()} @itemx unsigned long cl_I_to_ulong (const cl_I& x) @cindex @code{cl_I_to_ulong ()} Returns @code{x} as element of the C type @var{ctype}. If @code{x} is not representable in the range of @var{ctype}, a runtime error occurs. @end table Conversions from the classes @code{cl_I}, @code{cl_RA}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF}, @code{cl_F} and @code{cl_R} to the C built-in types @samp{float} and @samp{double} are provided through the functions @table @code @item float float_approx (const @var{type}& x) @cindex @code{float_approx ()} @itemx double double_approx (const @var{type}& x) @cindex @code{double_approx ()} Returns an approximation of @code{x} of C type @var{ctype}. If @code{abs(x)} is too close to 0 (underflow), 0 is returned. If @code{abs(x)} is too large (overflow), an IEEE infinity is returned. @end table Conversions from any class to any of its subclasses (``derived classes'' in C++ terminology) are not provided. Instead, you can assert and check that a value belongs to a certain subclass, and return it as element of that class, using the @samp{As} and @samp{The} macros. @cindex cast @cindex @code{As()()} @code{As(@var{type})(@var{value})} checks that @var{value} belongs to @var{type} and returns it as such. @cindex @code{The()()} @code{The(@var{type})(@var{value})} assumes that @var{value} belongs to @var{type} and returns it as such. It is your responsibility to ensure that this assumption is valid. Since macros and namespaces don't go together well, there is an equivalent to @samp{The}: the template @samp{the}. Example: @example @group cl_I x = @dots{}; if (!(x >= 0)) abort(); cl_I ten_x_a = The(cl_I)(expt(10,x)); // If x >= 0, 10^x is an integer. // In general, it would be a rational number. cl_I ten_x_b = the(expt(10,x)); // The same as above. @end group @end example @node Functions on numbers @chapter Functions on numbers Each of the number classes declares its mathematical operations in the corresponding include file. For example, if your code operates with objects of type @code{cl_I}, it should @code{#include }. @menu * Constructing numbers:: * Elementary functions:: * Elementary rational functions:: * Elementary complex functions:: * Comparisons:: * Rounding functions:: * Roots:: * Transcendental functions:: * Functions on integers:: * Functions on floating-point numbers:: * Conversion functions:: * Random number generators:: * Modifying operators:: @end menu @node Constructing numbers @section Constructing numbers Here is how to create number objects ``from nothing''. @menu * Constructing integers:: * Constructing rational numbers:: * Constructing floating-point numbers:: * Constructing complex numbers:: @end menu @node Constructing integers @subsection Constructing integers @code{cl_I} objects are most easily constructed from C integers and from strings. See @ref{Conversions}. @node Constructing rational numbers @subsection Constructing rational numbers @code{cl_RA} objects can be constructed from strings. The syntax for rational numbers is described in @ref{Internal and printed representation}. Another standard way to produce a rational number is through application of @samp{operator /} or @samp{recip} on integers. @node Constructing floating-point numbers @subsection Constructing floating-point numbers @code{cl_F} objects with low precision are most easily constructed from C @samp{float} and @samp{double}. See @ref{Conversions}. To construct a @code{cl_F} with high precision, you can use the conversion from @samp{const char *}, but you have to specify the desired precision within the string. (See @ref{Internal and printed representation}.) Example: @example cl_F e = "0.271828182845904523536028747135266249775724709369996e+1_40"; @end example will set @samp{e} to the given value, with a precision of 40 decimal digits. The programmatic way to construct a @code{cl_F} with high precision is through the @code{cl_float} conversion function, see @ref{Conversion to floating-point numbers}. For example, to compute @code{e} to 40 decimal places, first construct 1.0 to 40 decimal places and then apply the exponential function: @example float_format_t precision = float_format(40); cl_F e = exp(cl_float(1,precision)); @end example @node Constructing complex numbers @subsection Constructing complex numbers Non-real @code{cl_N} objects are normally constructed through the function @example cl_N complex (const cl_R& realpart, const cl_R& imagpart) @end example See @ref{Elementary complex functions}. @node Elementary functions @section Elementary functions Each of the classes @code{cl_N}, @code{cl_R}, @code{cl_RA}, @code{cl_I}, @code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF} defines the following operations: @table @code @item @var{type} operator + (const @var{type}&, const @var{type}&) @cindex @code{operator + ()} Addition. @item @var{type} operator - (const @var{type}&, const @var{type}&) @cindex @code{operator - ()} Subtraction. @item @var{type} operator - (const @var{type}&) Returns the negative of the argument. @item @var{type} plus1 (const @var{type}& x) @cindex @code{plus1 ()} Returns @code{x + 1}. @item @var{type} minus1 (const @var{type}& x) @cindex @code{minus1 ()} Returns @code{x - 1}. @item @var{type} operator * (const @var{type}&, const @var{type}&) @cindex @code{operator * ()} Multiplication. @item @var{type} square (const @var{type}& x) @cindex @code{square ()} Returns @code{x * x}. @end table Each of the classes @code{cl_N}, @code{cl_R}, @code{cl_RA}, @code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF} defines the following operations: @table @code @item @var{type} operator / (const @var{type}&, const @var{type}&) @cindex @code{operator / ()} Division. @item @var{type} recip (const @var{type}&) @cindex @code{recip ()} Returns the reciprocal of the argument. @end table The class @code{cl_I} doesn't define a @samp{/} operation because in the C/C++ language this operator, applied to integral types, denotes the @samp{floor} or @samp{truncate} operation (which one of these, is implementation dependent). (@xref{Rounding functions}.) Instead, @code{cl_I} defines an ``exact quotient'' function: @table @code @item cl_I exquo (const cl_I& x, const cl_I& y) @cindex @code{exquo ()} Checks that @code{y} divides @code{x}, and returns the quotient @code{x}/@code{y}. @end table The following exponentiation functions are defined: @table @code @item cl_I expt_pos (const cl_I& x, const cl_I& y) @cindex @code{expt_pos ()} @itemx cl_RA expt_pos (const cl_RA& x, const cl_I& y) @code{y} must be > 0. Returns @code{x^y}. @item cl_RA expt (const cl_RA& x, const cl_I& y) @cindex @code{expt ()} @itemx cl_R expt (const cl_R& x, const cl_I& y) @itemx cl_N expt (const cl_N& x, const cl_I& y) Returns @code{x^y}. @end table Each of the classes @code{cl_R}, @code{cl_RA}, @code{cl_I}, @code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF} defines the following operation: @table @code @item @var{type} abs (const @var{type}& x) @cindex @code{abs ()} Returns the absolute value of @code{x}. This is @code{x} if @code{x >= 0}, and @code{-x} if @code{x <= 0}. @end table The class @code{cl_N} implements this as follows: @table @code @item cl_R abs (const cl_N x) Returns the absolute value of @code{x}. @end table Each of the classes @code{cl_N}, @code{cl_R}, @code{cl_RA}, @code{cl_I}, @code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF} defines the following operation: @table @code @item @var{type} signum (const @var{type}& x) @cindex @code{signum ()} Returns the sign of @code{x}, in the same number format as @code{x}. This is defined as @code{x / abs(x)} if @code{x} is non-zero, and @code{x} if @code{x} is zero. If @code{x} is real, the value is either 0 or 1 or -1. @end table @node Elementary rational functions @section Elementary rational functions Each of the classes @code{cl_RA}, @code{cl_I} defines the following operations: @table @code @item cl_I numerator (const @var{type}& x) @cindex @code{numerator ()} Returns the numerator of @code{x}. @item cl_I denominator (const @var{type}& x) @cindex @code{denominator ()} Returns the denominator of @code{x}. @end table The numerator and denominator of a rational number are normalized in such a way that they have no factor in common and the denominator is positive. @node Elementary complex functions @section Elementary complex functions The class @code{cl_N} defines the following operation: @table @code @item cl_N complex (const cl_R& a, const cl_R& b) @cindex @code{complex ()} Returns the complex number @code{a+bi}, that is, the complex number with real part @code{a} and imaginary part @code{b}. @end table Each of the classes @code{cl_N}, @code{cl_R} defines the following operations: @table @code @item cl_R realpart (const @var{type}& x) @cindex @code{realpart ()} Returns the real part of @code{x}. @item cl_R imagpart (const @var{type}& x) @cindex @code{imagpart ()} Returns the imaginary part of @code{x}. @item @var{type} conjugate (const @var{type}& x) @cindex @code{conjugate ()} Returns the complex conjugate of @code{x}. @end table We have the relations @itemize @w{} @item @code{x = complex(realpart(x), imagpart(x))} @item @code{conjugate(x) = complex(realpart(x), -imagpart(x))} @end itemize @node Comparisons @section Comparisons @cindex comparison Each of the classes @code{cl_N}, @code{cl_R}, @code{cl_RA}, @code{cl_I}, @code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF} defines the following operations: @table @code @item bool operator == (const @var{type}&, const @var{type}&) @cindex @code{operator == ()} @itemx bool operator != (const @var{type}&, const @var{type}&) @cindex @code{operator != ()} Comparison, as in C and C++. @item uint32 equal_hashcode (const @var{type}&) @cindex @code{equal_hashcode ()} Returns a 32-bit hash code that is the same for any two numbers which are the same according to @code{==}. This hash code depends on the number's value, not its type or precision. @item bool zerop (const @var{type}& x) @cindex @code{zerop ()} Compare against zero: @code{x == 0} @end table Each of the classes @code{cl_R}, @code{cl_RA}, @code{cl_I}, @code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF} defines the following operations: @table @code @item cl_signean compare (const @var{type}& x, const @var{type}& y) @cindex @code{compare ()} Compares @code{x} and @code{y}. Returns +1 if @code{x}>@code{y}, -1 if @code{x}<@code{y}, 0 if @code{x}=@code{y}. @item bool operator <= (const @var{type}&, const @var{type}&) @cindex @code{operator <= ()} @itemx bool operator < (const @var{type}&, const @var{type}&) @cindex @code{operator < ()} @itemx bool operator >= (const @var{type}&, const @var{type}&) @cindex @code{operator >= ()} @itemx bool operator > (const @var{type}&, const @var{type}&) @cindex @code{operator > ()} Comparison, as in C and C++. @item bool minusp (const @var{type}& x) @cindex @code{minusp ()} Compare against zero: @code{x < 0} @item bool plusp (const @var{type}& x) @cindex @code{plusp ()} Compare against zero: @code{x > 0} @item @var{type} max (const @var{type}& x, const @var{type}& y) @cindex @code{max ()} Return the maximum of @code{x} and @code{y}. @item @var{type} min (const @var{type}& x, const @var{type}& y) @cindex @code{min ()} Return the minimum of @code{x} and @code{y}. @end table When a floating point number and a rational number are compared, the float is first converted to a rational number using the function @code{rational}. Since a floating point number actually represents an interval of real numbers, the result might be surprising. For example, @code{(cl_F)(cl_R)"1/3" == (cl_R)"1/3"} returns false because there is no floating point number whose value is exactly @code{1/3}. @node Rounding functions @section Rounding functions @cindex rounding When a real number is to be converted to an integer, there is no ``best'' rounding. The desired rounding function depends on the application. The Common Lisp and ISO Lisp standards offer four rounding functions: @table @code @item floor(x) This is the largest integer <=@code{x}. @item ceiling(x) This is the smallest integer >=@code{x}. @item truncate(x) Among the integers between 0 and @code{x} (inclusive) the one nearest to @code{x}. @item round(x) The integer nearest to @code{x}. If @code{x} is exactly halfway between two integers, choose the even one. @end table These functions have different advantages: @code{floor} and @code{ceiling} are translation invariant: @code{floor(x+n) = floor(x) + n} and @code{ceiling(x+n) = ceiling(x) + n} for every @code{x} and every integer @code{n}. On the other hand, @code{truncate} and @code{round} are symmetric: @code{truncate(-x) = -truncate(x)} and @code{round(-x) = -round(x)}, and furthermore @code{round} is unbiased: on the ``average'', it rounds down exactly as often as it rounds up. The functions are related like this: @itemize @w{} @item @code{ceiling(m/n) = floor((m+n-1)/n) = floor((m-1)/n)+1} for rational numbers @code{m/n} (@code{m}, @code{n} integers, @code{n}>0), and @item @code{truncate(x) = sign(x) * floor(abs(x))} @end itemize Each of the classes @code{cl_R}, @code{cl_RA}, @code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF} defines the following operations: @table @code @item cl_I floor1 (const @var{type}& x) @cindex @code{floor1 ()} Returns @code{floor(x)}. @item cl_I ceiling1 (const @var{type}& x) @cindex @code{ceiling1 ()} Returns @code{ceiling(x)}. @item cl_I truncate1 (const @var{type}& x) @cindex @code{truncate1 ()} Returns @code{truncate(x)}. @item cl_I round1 (const @var{type}& x) @cindex @code{round1 ()} Returns @code{round(x)}. @end table Each of the classes @code{cl_R}, @code{cl_RA}, @code{cl_I}, @code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF} defines the following operations: @table @code @item cl_I floor1 (const @var{type}& x, const @var{type}& y) Returns @code{floor(x/y)}. @item cl_I ceiling1 (const @var{type}& x, const @var{type}& y) Returns @code{ceiling(x/y)}. @item cl_I truncate1 (const @var{type}& x, const @var{type}& y) Returns @code{truncate(x/y)}. @item cl_I round1 (const @var{type}& x, const @var{type}& y) Returns @code{round(x/y)}. @end table These functions are called @samp{floor1}, @dots{} here instead of @samp{floor}, @dots{}, because on some systems, system dependent include files define @samp{floor} and @samp{ceiling} as macros. In many cases, one needs both the quotient and the remainder of a division. It is more efficient to compute both at the same time than to perform two divisions, one for quotient and the next one for the remainder. The following functions therefore return a structure containing both the quotient and the remainder. The suffix @samp{2} indicates the number of ``return values''. The remainder is defined as follows: @itemize @bullet @item for the computation of @code{quotient = floor(x)}, @code{remainder = x - quotient}, @item for the computation of @code{quotient = floor(x,y)}, @code{remainder = x - quotient*y}, @end itemize and similarly for the other three operations. Each of the classes @code{cl_R}, @code{cl_RA}, @code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF} defines the following operations: @table @code @item struct @var{type}_div_t @{ cl_I quotient; @var{type} remainder; @}; @itemx @var{type}_div_t floor2 (const @var{type}& x) @itemx @var{type}_div_t ceiling2 (const @var{type}& x) @itemx @var{type}_div_t truncate2 (const @var{type}& x) @itemx @var{type}_div_t round2 (const @var{type}& x) @end table Each of the classes @code{cl_R}, @code{cl_RA}, @code{cl_I}, @code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF} defines the following operations: @table @code @item struct @var{type}_div_t @{ cl_I quotient; @var{type} remainder; @}; @itemx @var{type}_div_t floor2 (const @var{type}& x, const @var{type}& y) @cindex @code{floor2 ()} @itemx @var{type}_div_t ceiling2 (const @var{type}& x, const @var{type}& y) @cindex @code{ceiling2 ()} @itemx @var{type}_div_t truncate2 (const @var{type}& x, const @var{type}& y) @cindex @code{truncate2 ()} @itemx @var{type}_div_t round2 (const @var{type}& x, const @var{type}& y) @cindex @code{round2 ()} @end table Sometimes, one wants the quotient as a floating-point number (of the same format as the argument, if the argument is a float) instead of as an integer. The prefix @samp{f} indicates this. Each of the classes @code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF} defines the following operations: @table @code @item @var{type} ffloor (const @var{type}& x) @cindex @code{ffloor ()} @itemx @var{type} fceiling (const @var{type}& x) @cindex @code{fceiling ()} @itemx @var{type} ftruncate (const @var{type}& x) @cindex @code{ftruncate ()} @itemx @var{type} fround (const @var{type}& x) @cindex @code{fround ()} @end table and similarly for class @code{cl_R}, but with return type @code{cl_F}. The class @code{cl_R} defines the following operations: @table @code @item cl_F ffloor (const @var{type}& x, const @var{type}& y) @itemx cl_F fceiling (const @var{type}& x, const @var{type}& y) @itemx cl_F ftruncate (const @var{type}& x, const @var{type}& y) @itemx cl_F fround (const @var{type}& x, const @var{type}& y) @end table These functions also exist in versions which return both the quotient and the remainder. The suffix @samp{2} indicates this. Each of the classes @code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF} defines the following operations: @cindex @code{cl_F_fdiv_t} @cindex @code{cl_SF_fdiv_t} @cindex @code{cl_FF_fdiv_t} @cindex @code{cl_DF_fdiv_t} @cindex @code{cl_LF_fdiv_t} @table @code @item struct @var{type}_fdiv_t @{ @var{type} quotient; @var{type} remainder; @}; @itemx @var{type}_fdiv_t ffloor2 (const @var{type}& x) @cindex @code{ffloor2 ()} @itemx @var{type}_fdiv_t fceiling2 (const @var{type}& x) @cindex @code{fceiling2 ()} @itemx @var{type}_fdiv_t ftruncate2 (const @var{type}& x) @cindex @code{ftruncate2 ()} @itemx @var{type}_fdiv_t fround2 (const @var{type}& x) @cindex @code{fround2 ()} @end table and similarly for class @code{cl_R}, but with quotient type @code{cl_F}. @cindex @code{cl_R_fdiv_t} The class @code{cl_R} defines the following operations: @table @code @item struct @var{type}_fdiv_t @{ cl_F quotient; cl_R remainder; @}; @itemx @var{type}_fdiv_t ffloor2 (const @var{type}& x, const @var{type}& y) @itemx @var{type}_fdiv_t fceiling2 (const @var{type}& x, const @var{type}& y) @itemx @var{type}_fdiv_t ftruncate2 (const @var{type}& x, const @var{type}& y) @itemx @var{type}_fdiv_t fround2 (const @var{type}& x, const @var{type}& y) @end table Other applications need only the remainder of a division. The remainder of @samp{floor} and @samp{ffloor} is called @samp{mod} (abbreviation of ``modulo''). The remainder @samp{truncate} and @samp{ftruncate} is called @samp{rem} (abbreviation of ``remainder''). @itemize @bullet @item @code{mod(x,y) = floor2(x,y).remainder = x - floor(x/y)*y} @item @code{rem(x,y) = truncate2(x,y).remainder = x - truncate(x/y)*y} @end itemize If @code{x} and @code{y} are both >= 0, @code{mod(x,y) = rem(x,y) >= 0}. In general, @code{mod(x,y)} has the sign of @code{y} or is zero, and @code{rem(x,y)} has the sign of @code{x} or is zero. The classes @code{cl_R}, @code{cl_I} define the following operations: @table @code @item @var{type} mod (const @var{type}& x, const @var{type}& y) @cindex @code{mod ()} @itemx @var{type} rem (const @var{type}& x, const @var{type}& y) @cindex @code{rem ()} @end table @node Roots @section Roots Each of the classes @code{cl_R}, @code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF} defines the following operation: @table @code @item @var{type} sqrt (const @var{type}& x) @cindex @code{sqrt ()} @code{x} must be >= 0. This function returns the square root of @code{x}, normalized to be >= 0. If @code{x} is the square of a rational number, @code{sqrt(x)} will be a rational number, else it will return a floating-point approximation. @end table The classes @code{cl_RA}, @code{cl_I} define the following operation: @table @code @item bool sqrtp (const @var{type}& x, @var{type}* root) @cindex @code{sqrtp ()} This tests whether @code{x} is a perfect square. If so, it returns true and the exact square root in @code{*root}, else it returns false. @end table Furthermore, for integers, similarly: @table @code @item bool isqrt (const @var{type}& x, @var{type}* root) @cindex @code{isqrt ()} @code{x} should be >= 0. This function sets @code{*root} to @code{floor(sqrt(x))} and returns the same value as @code{sqrtp}: the boolean value @code{(expt(*root,2) == x)}. @end table For @code{n}th roots, the classes @code{cl_RA}, @code{cl_I} define the following operation: @table @code @item bool rootp (const @var{type}& x, const cl_I& n, @var{type}* root) @cindex @code{rootp ()} @code{x} must be >= 0. @code{n} must be > 0. This tests whether @code{x} is an @code{n}th power of a rational number. If so, it returns true and the exact root in @code{*root}, else it returns false. @end table The only square root function which accepts negative numbers is the one for class @code{cl_N}: @table @code @item cl_N sqrt (const cl_N& z) @cindex @code{sqrt ()} Returns the square root of @code{z}, as defined by the formula @code{sqrt(z) = exp(log(z)/2)}. Conversion to a floating-point type or to a complex number are done if necessary. The range of the result is the right half plane @code{realpart(sqrt(z)) >= 0} including the positive imaginary axis and 0, but excluding the negative imaginary axis. The result is an exact number only if @code{z} is an exact number. @end table @node Transcendental functions @section Transcendental functions @cindex transcendental functions The transcendental functions return an exact result if the argument is exact and the result is exact as well. Otherwise they must return inexact numbers even if the argument is exact. For example, @code{cos(0) = 1} returns the rational number @code{1}. @menu * Exponential and logarithmic functions:: * Trigonometric functions:: * Hyperbolic functions:: * Euler gamma:: * Riemann zeta:: @end menu @node Exponential and logarithmic functions @subsection Exponential and logarithmic functions @table @code @item cl_R exp (const cl_R& x) @cindex @code{exp ()} @itemx cl_N exp (const cl_N& x) Returns the exponential function of @code{x}. This is @code{e^x} where @code{e} is the base of the natural logarithms. The range of the result is the entire complex plane excluding 0. @item cl_R ln (const cl_R& x) @cindex @code{ln ()} @code{x} must be > 0. Returns the (natural) logarithm of x. @item cl_N log (const cl_N& x) @cindex @code{log ()} Returns the (natural) logarithm of x. If @code{x} is real and positive, this is @code{ln(x)}. In general, @code{log(x) = log(abs(x)) + i*phase(x)}. The range of the result is the strip in the complex plane @code{-pi < imagpart(log(x)) <= pi}. @item cl_R phase (const cl_N& x) @cindex @code{phase ()} Returns the angle part of @code{x} in its polar representation as a complex number. That is, @code{phase(x) = atan(realpart(x),imagpart(x))}. This is also the imaginary part of @code{log(x)}. The range of the result is the interval @code{-pi < phase(x) <= pi}. The result will be an exact number only if @code{zerop(x)} or if @code{x} is real and positive. @item cl_R log (const cl_R& a, const cl_R& b) @code{a} and @code{b} must be > 0. Returns the logarithm of @code{a} with respect to base @code{b}. @code{log(a,b) = ln(a)/ln(b)}. The result can be exact only if @code{a = 1} or if @code{a} and @code{b} are both rational. @item cl_N log (const cl_N& a, const cl_N& b) Returns the logarithm of @code{a} with respect to base @code{b}. @code{log(a,b) = log(a)/log(b)}. @item cl_N expt (const cl_N& x, const cl_N& y) @cindex @code{expt ()} Exponentiation: Returns @code{x^y = exp(y*log(x))}. @end table The constant e = exp(1) = 2.71828@dots{} is returned by the following functions: @table @code @item cl_F exp1 (float_format_t f) @cindex @code{exp1 ()} Returns e as a float of format @code{f}. @item cl_F exp1 (const cl_F& y) Returns e in the float format of @code{y}. @item cl_F exp1 (void) Returns e as a float of format @code{default_float_format}. @end table @node Trigonometric functions @subsection Trigonometric functions @table @code @item cl_R sin (const cl_R& x) @cindex @code{sin ()} Returns @code{sin(x)}. The range of the result is the interval @code{-1 <= sin(x) <= 1}. @item cl_N sin (const cl_N& z) Returns @code{sin(z)}. The range of the result is the entire complex plane. @item cl_R cos (const cl_R& x) @cindex @code{cos ()} Returns @code{cos(x)}. The range of the result is the interval @code{-1 <= cos(x) <= 1}. @item cl_N cos (const cl_N& x) Returns @code{cos(z)}. The range of the result is the entire complex plane. @item struct cos_sin_t @{ cl_R cos; cl_R sin; @}; @cindex @code{cos_sin_t} @itemx cos_sin_t cos_sin (const cl_R& x) Returns both @code{sin(x)} and @code{cos(x)}. This is more efficient than @cindex @code{cos_sin ()} computing them separately. The relation @code{cos^2 + sin^2 = 1} will hold only approximately. @item cl_R tan (const cl_R& x) @cindex @code{tan ()} @itemx cl_N tan (const cl_N& x) Returns @code{tan(x) = sin(x)/cos(x)}. @item cl_N cis (const cl_R& x) @cindex @code{cis ()} @itemx cl_N cis (const cl_N& x) Returns @code{exp(i*x)}. The name @samp{cis} means ``cos + i sin'', because @code{e^(i*x) = cos(x) + i*sin(x)}. @cindex @code{asin} @cindex @code{asin ()} @item cl_N asin (const cl_N& z) Returns @code{arcsin(z)}. This is defined as @code{arcsin(z) = log(iz+sqrt(1-z^2))/i} and satisfies @code{arcsin(-z) = -arcsin(z)}. The range of the result is the strip in the complex domain @code{-pi/2 <= realpart(arcsin(z)) <= pi/2}, excluding the numbers with @code{realpart = -pi/2} and @code{imagpart < 0} and the numbers with @code{realpart = pi/2} and @code{imagpart > 0}. @ignore Proof: This follows from arcsin(z) = arsinh(iz)/i and the corresponding results for arsinh. @end ignore @item cl_N acos (const cl_N& z) @cindex @code{acos ()} Returns @code{arccos(z)}. This is defined as @code{arccos(z) = pi/2 - arcsin(z) = log(z+i*sqrt(1-z^2))/i} @ignore Kahan's formula: @code{arccos(z) = 2*log(sqrt((1+z)/2)+i*sqrt((1-z)/2))/i} @end ignore and satisfies @code{arccos(-z) = pi - arccos(z)}. The range of the result is the strip in the complex domain @code{0 <= realpart(arcsin(z)) <= pi}, excluding the numbers with @code{realpart = 0} and @code{imagpart < 0} and the numbers with @code{realpart = pi} and @code{imagpart > 0}. @ignore Proof: This follows from the results about arcsin. @end ignore @cindex @code{atan} @cindex @code{atan ()} @item cl_R atan (const cl_R& x, const cl_R& y) Returns the angle of the polar representation of the complex number @code{x+iy}. This is @code{atan(y/x)} if @code{x>0}. The range of the result is the interval @code{-pi < atan(x,y) <= pi}. The result will be an exact number only if @code{x > 0} and @code{y} is the exact @code{0}. WARNING: In Common Lisp, this function is called as @code{(atan y x)}, with reversed order of arguments. @item cl_R atan (const cl_R& x) Returns @code{arctan(x)}. This is the same as @code{atan(1,x)}. The range of the result is the interval @code{-pi/2 < atan(x) < pi/2}. The result will be an exact number only if @code{x} is the exact @code{0}. @item cl_N atan (const cl_N& z) Returns @code{arctan(z)}. This is defined as @code{arctan(z) = (log(1+iz)-log(1-iz)) / 2i} and satisfies @code{arctan(-z) = -arctan(z)}. The range of the result is the strip in the complex domain @code{-pi/2 <= realpart(arctan(z)) <= pi/2}, excluding the numbers with @code{realpart = -pi/2} and @code{imagpart >= 0} and the numbers with @code{realpart = pi/2} and @code{imagpart <= 0}. @ignore Proof: arctan(z) = artanh(iz)/i, we know the range of the artanh function. @end ignore @end table @cindex pi @cindex Archimedes' constant Archimedes' constant pi = 3.14@dots{} is returned by the following functions: @table @code @item cl_F pi (float_format_t f) @cindex @code{pi ()} Returns pi as a float of format @code{f}. @item cl_F pi (const cl_F& y) Returns pi in the float format of @code{y}. @item cl_F pi (void) Returns pi as a float of format @code{default_float_format}. @end table @node Hyperbolic functions @subsection Hyperbolic functions @table @code @item cl_R sinh (const cl_R& x) @cindex @code{sinh ()} Returns @code{sinh(x)}. @item cl_N sinh (const cl_N& z) Returns @code{sinh(z)}. The range of the result is the entire complex plane. @item cl_R cosh (const cl_R& x) @cindex @code{cosh ()} Returns @code{cosh(x)}. The range of the result is the interval @code{cosh(x) >= 1}. @item cl_N cosh (const cl_N& z) Returns @code{cosh(z)}. The range of the result is the entire complex plane. @item struct cosh_sinh_t @{ cl_R cosh; cl_R sinh; @}; @cindex @code{cosh_sinh_t} @itemx cosh_sinh_t cosh_sinh (const cl_R& x) @cindex @code{cosh_sinh ()} Returns both @code{sinh(x)} and @code{cosh(x)}. This is more efficient than computing them separately. The relation @code{cosh^2 - sinh^2 = 1} will hold only approximately. @item cl_R tanh (const cl_R& x) @cindex @code{tanh ()} @itemx cl_N tanh (const cl_N& x) Returns @code{tanh(x) = sinh(x)/cosh(x)}. @item cl_N asinh (const cl_N& z) @cindex @code{asinh ()} Returns @code{arsinh(z)}. This is defined as @code{arsinh(z) = log(z+sqrt(1+z^2))} and satisfies @code{arsinh(-z) = -arsinh(z)}. @ignore Proof: Knowing the range of log, we know -pi < imagpart(arsinh(z)) <= pi. Actually, z+sqrt(1+z^2) can never be real and <0, so -pi < imagpart(arsinh(z)) < pi. We have (z+sqrt(1+z^2))*(-z+sqrt(1+(-z)^2)) = (1+z^2)-z^2 = 1, hence the logs of both factors sum up to 0 mod 2*pi*i, hence to 0. @end ignore The range of the result is the strip in the complex domain @code{-pi/2 <= imagpart(arsinh(z)) <= pi/2}, excluding the numbers with @code{imagpart = -pi/2} and @code{realpart > 0} and the numbers with @code{imagpart = pi/2} and @code{realpart < 0}. @ignore Proof: Write z = x+iy. Because of arsinh(-z) = -arsinh(z), we may assume that z is in Range(sqrt), that is, x>=0 and, if x=0, then y>=0. If x > 0, then Re(z+sqrt(1+z^2)) = x + Re(sqrt(1+z^2)) >= x > 0, so -pi/2 < imagpart(log(z+sqrt(1+z^2))) < pi/2. If x = 0 and y >= 0, arsinh(z) = log(i*y+sqrt(1-y^2)). If y <= 1, the realpart is 0 and the imagpart is >= 0 and <= pi/2. If y >= 1, the imagpart is pi/2 and the realpart is log(y+sqrt(y^2-1)) >= log(y) >= 0. @end ignore @ignore Moreover, if z is in Range(sqrt), log(sqrt(1+z^2)+z) = 2 artanh(z/(1+sqrt(1+z^2))) (for a proof, see file src/cl_C_asinh.cc). @end ignore @item cl_N acosh (const cl_N& z) @cindex @code{acosh ()} Returns @code{arcosh(z)}. This is defined as @code{arcosh(z) = 2*log(sqrt((z+1)/2)+sqrt((z-1)/2))}. The range of the result is the half-strip in the complex domain @code{-pi < imagpart(arcosh(z)) <= pi, realpart(arcosh(z)) >= 0}, excluding the numbers with @code{realpart = 0} and @code{-pi < imagpart < 0}. @ignore Proof: sqrt((z+1)/2) and sqrt((z-1)/2)) lie in Range(sqrt), hence does their sum, hence its log has an imagpart <= pi/2 and > -pi/2. If z is in Range(sqrt), we have sqrt(z+1)*sqrt(z-1) = sqrt(z^2-1) ==> (sqrt((z+1)/2)+sqrt((z-1)/2))^2 = (z+1)/2 + sqrt(z^2-1) + (z-1)/2 = z + sqrt(z^2-1) ==> arcosh(z) = log(z+sqrt(z^2-1)) mod 2*pi*i and since the imagpart of both expressions is > -pi, <= pi ==> arcosh(z) = log(z+sqrt(z^2-1)) To prove that the realpart of this is >= 0, write z = x+iy with x>=0, z^2-1 = u+iv with u = x^2-y^2-1, v = 2xy, sqrt(z^2-1) = p+iq with p = sqrt((sqrt(u^2+v^2)+u)/2) >= 0, q = sqrt((sqrt(u^2+v^2)-u)/2) * sign(v), then |z+sqrt(z^2-1)|^2 = |x+iy + p+iq|^2 = (x+p)^2 + (y+q)^2 = x^2 + 2xp + p^2 + y^2 + 2yq + q^2 >= x^2 + p^2 + y^2 + q^2 (since x>=0, p>=0, yq>=0) = x^2 + y^2 + sqrt(u^2+v^2) >= x^2 + y^2 + |u| >= x^2 + y^2 - u = 1 + 2*y^2 >= 1 hence realpart(log(z+sqrt(z^2-1))) = log(|z+sqrt(z^2-1)|) >= 0. Equality holds only if y = 0 and u <= 0, i.e. 0 <= x < 1. In this case arcosh(z) = log(x+i*sqrt(1-x^2)) has imagpart >=0. Otherwise, -z is in Range(sqrt). If y != 0, sqrt((z+1)/2) = i^sign(y) * sqrt((-z-1)/2), sqrt((z-1)/2) = i^sign(y) * sqrt((-z+1)/2), hence arcosh(z) = sign(y)*pi/2*i + arcosh(-z), and this has realpart > 0. If y = 0 and -1<=x<=0, we still have sqrt(z+1)*sqrt(z-1) = sqrt(z^2-1), ==> arcosh(z) = log(z+sqrt(z^2-1)) = log(x+i*sqrt(1-x^2)) has realpart = 0 and imagpart > 0. If y = 0 and x<=-1, however, sqrt(z+1)*sqrt(z-1) = - sqrt(z^2-1), ==> arcosh(z) = log(z-sqrt(z^2-1)) = pi*i + arcosh(-z). This has realpart >= 0 and imagpart = pi. @end ignore @item cl_N atanh (const cl_N& z) @cindex @code{atanh ()} Returns @code{artanh(z)}. This is defined as @code{artanh(z) = (log(1+z)-log(1-z)) / 2} and satisfies @code{artanh(-z) = -artanh(z)}. The range of the result is the strip in the complex domain @code{-pi/2 <= imagpart(artanh(z)) <= pi/2}, excluding the numbers with @code{imagpart = -pi/2} and @code{realpart <= 0} and the numbers with @code{imagpart = pi/2} and @code{realpart >= 0}. @ignore Proof: Write z = x+iy. Examine imagpart(artanh(z)) = (atan(1+x,y) - atan(1-x,-y))/2. Case 1: y = 0. x > 1 ==> imagpart = -pi/2, realpart = 1/2 log((x+1)/(x-1)) > 0, x < -1 ==> imagpart = pi/2, realpart = 1/2 log((-x-1)/(-x+1)) < 0, |x| < 1 ==> imagpart = 0 Case 2: y > 0. imagpart(artanh(z)) = (atan(1+x,y) - atan(1-x,-y))/2 = ((pi/2 - atan((1+x)/y)) - (-pi/2 - atan((1-x)/-y)))/2 = (pi - atan((1+x)/y) - atan((1-x)/y))/2 > (pi - pi/2 - pi/2 )/2 = 0 and (1+x)/y > (1-x)/y ==> atan((1+x)/y) > atan((-1+x)/y) = - atan((1-x)/y) ==> imagpart < pi/2. Hence 0 < imagpart < pi/2. Case 3: y < 0. By artanh(z) = -artanh(-z) and case 2, -pi/2 < imagpart < 0. @end ignore @end table @node Euler gamma @subsection Euler gamma @cindex Euler's constant Euler's constant C = 0.577@dots{} is returned by the following functions: @table @code @item cl_F eulerconst (float_format_t f) @cindex @code{eulerconst ()} Returns Euler's constant as a float of format @code{f}. @item cl_F eulerconst (const cl_F& y) Returns Euler's constant in the float format of @code{y}. @item cl_F eulerconst (void) Returns Euler's constant as a float of format @code{default_float_format}. @end table Catalan's constant G = 0.915@dots{} is returned by the following functions: @cindex Catalan's constant @table @code @item cl_F catalanconst (float_format_t f) @cindex @code{catalanconst ()} Returns Catalan's constant as a float of format @code{f}. @item cl_F catalanconst (const cl_F& y) Returns Catalan's constant in the float format of @code{y}. @item cl_F catalanconst (void) Returns Catalan's constant as a float of format @code{default_float_format}. @end table @node Riemann zeta @subsection Riemann zeta @cindex Riemann's zeta Riemann's zeta function at an integral point @code{s>1} is returned by the following functions: @table @code @item cl_F zeta (int s, float_format_t f) @cindex @code{zeta ()} Returns Riemann's zeta function at @code{s} as a float of format @code{f}. @item cl_F zeta (int s, const cl_F& y) Returns Riemann's zeta function at @code{s} in the float format of @code{y}. @item cl_F zeta (int s) Returns Riemann's zeta function at @code{s} as a float of format @code{default_float_format}. @end table @node Functions on integers @section Functions on integers @menu * Logical functions:: * Number theoretic functions:: * Combinatorial functions:: @end menu @node Logical functions @subsection Logical functions Integers, when viewed as in two's complement notation, can be thought as infinite bit strings where the bits' values eventually are constant. For example, @example 17 = ......00010001 -6 = ......11111010 @end example The logical operations view integers as such bit strings and operate on each of the bit positions in parallel. @table @code @item cl_I lognot (const cl_I& x) @cindex @code{lognot ()} @itemx cl_I operator ~ (const cl_I& x) @cindex @code{operator ~ ()} Logical not, like @code{~x} in C. This is the same as @code{-1-x}. @item cl_I logand (const cl_I& x, const cl_I& y) @cindex @code{logand ()} @itemx cl_I operator & (const cl_I& x, const cl_I& y) @cindex @code{operator & ()} Logical and, like @code{x & y} in C. @item cl_I logior (const cl_I& x, const cl_I& y) @cindex @code{logior ()} @itemx cl_I operator | (const cl_I& x, const cl_I& y) @cindex @code{operator | ()} Logical (inclusive) or, like @code{x | y} in C. @item cl_I logxor (const cl_I& x, const cl_I& y) @cindex @code{logxor ()} @itemx cl_I operator ^ (const cl_I& x, const cl_I& y) @cindex @code{operator ^ ()} Exclusive or, like @code{x ^ y} in C. @item cl_I logeqv (const cl_I& x, const cl_I& y) @cindex @code{logeqv ()} Bitwise equivalence, like @code{~(x ^ y)} in C. @item cl_I lognand (const cl_I& x, const cl_I& y) @cindex @code{lognand ()} Bitwise not and, like @code{~(x & y)} in C. @item cl_I lognor (const cl_I& x, const cl_I& y) @cindex @code{lognor ()} Bitwise not or, like @code{~(x | y)} in C. @item cl_I logandc1 (const cl_I& x, const cl_I& y) @cindex @code{logandc1 ()} Logical and, complementing the first argument, like @code{~x & y} in C. @item cl_I logandc2 (const cl_I& x, const cl_I& y) @cindex @code{logandc2 ()} Logical and, complementing the second argument, like @code{x & ~y} in C. @item cl_I logorc1 (const cl_I& x, const cl_I& y) @cindex @code{logorc1 ()} Logical or, complementing the first argument, like @code{~x | y} in C. @item cl_I logorc2 (const cl_I& x, const cl_I& y) @cindex @code{logorc2 ()} Logical or, complementing the second argument, like @code{x | ~y} in C. @end table These operations are all available though the function @table @code @item cl_I boole (cl_boole op, const cl_I& x, const cl_I& y) @cindex @code{boole ()} @end table where @code{op} must have one of the 16 values (each one stands for a function which combines two bits into one bit): @code{boole_clr}, @code{boole_set}, @code{boole_1}, @code{boole_2}, @code{boole_c1}, @code{boole_c2}, @code{boole_and}, @code{boole_ior}, @code{boole_xor}, @code{boole_eqv}, @code{boole_nand}, @code{boole_nor}, @code{boole_andc1}, @code{boole_andc2}, @code{boole_orc1}, @code{boole_orc2}. @cindex @code{boole_clr} @cindex @code{boole_set} @cindex @code{boole_1} @cindex @code{boole_2} @cindex @code{boole_c1} @cindex @code{boole_c2} @cindex @code{boole_and} @cindex @code{boole_xor} @cindex @code{boole_eqv} @cindex @code{boole_nand} @cindex @code{boole_nor} @cindex @code{boole_andc1} @cindex @code{boole_andc2} @cindex @code{boole_orc1} @cindex @code{boole_orc2} Other functions that view integers as bit strings: @table @code @item bool logtest (const cl_I& x, const cl_I& y) @cindex @code{logtest ()} Returns true if some bit is set in both @code{x} and @code{y}, i.e. if @code{logand(x,y) != 0}. @item bool logbitp (const cl_I& n, const cl_I& x) @cindex @code{logbitp ()} Returns true if the @code{n}th bit (from the right) of @code{x} is set. Bit 0 is the least significant bit. @item uintC logcount (const cl_I& x) @cindex @code{logcount ()} Returns the number of one bits in @code{x}, if @code{x} >= 0, or the number of zero bits in @code{x}, if @code{x} < 0. @end table The following functions operate on intervals of bits in integers. The type @example struct cl_byte @{ uintC size; uintC position; @}; @end example @cindex @code{cl_byte} represents the bit interval containing the bits @code{position}@dots{}@code{position+size-1} of an integer. The constructor @code{cl_byte(size,position)} constructs a @code{cl_byte}. @table @code @item cl_I ldb (const cl_I& n, const cl_byte& b) @cindex @code{ldb ()} extracts the bits of @code{n} described by the bit interval @code{b} and returns them as a nonnegative integer with @code{b.size} bits. @item bool ldb_test (const cl_I& n, const cl_byte& b) @cindex @code{ldb_test ()} Returns true if some bit described by the bit interval @code{b} is set in @code{n}. @item cl_I dpb (const cl_I& newbyte, const cl_I& n, const cl_byte& b) @cindex @code{dpb ()} Returns @code{n}, with the bits described by the bit interval @code{b} replaced by @code{newbyte}. Only the lowest @code{b.size} bits of @code{newbyte} are relevant. @end table The functions @code{ldb} and @code{dpb} implicitly shift. The following functions are their counterparts without shifting: @table @code @item cl_I mask_field (const cl_I& n, const cl_byte& b) @cindex @code{mask_field ()} returns an integer with the bits described by the bit interval @code{b} copied from the corresponding bits in @code{n}, the other bits zero. @item cl_I deposit_field (const cl_I& newbyte, const cl_I& n, const cl_byte& b) @cindex @code{deposit_field ()} returns an integer where the bits described by the bit interval @code{b} come from @code{newbyte} and the other bits come from @code{n}. @end table The following relations hold: @itemize @w{} @item @code{ldb (n, b) = mask_field(n, b) >> b.position}, @item @code{dpb (newbyte, n, b) = deposit_field (newbyte << b.position, n, b)}, @item @code{deposit_field(newbyte,n,b) = n ^ mask_field(n,b) ^ mask_field(new_byte,b)}. @end itemize The following operations on integers as bit strings are efficient shortcuts for common arithmetic operations: @table @code @item bool oddp (const cl_I& x) @cindex @code{oddp ()} Returns true if the least significant bit of @code{x} is 1. Equivalent to @code{mod(x,2) != 0}. @item bool evenp (const cl_I& x) @cindex @code{evenp ()} Returns true if the least significant bit of @code{x} is 0. Equivalent to @code{mod(x,2) == 0}. @item cl_I operator << (const cl_I& x, const cl_I& n) @cindex @code{operator << ()} Shifts @code{x} by @code{n} bits to the left. @code{n} should be >=0. Equivalent to @code{x * expt(2,n)}. @item cl_I operator >> (const cl_I& x, const cl_I& n) @cindex @code{operator >> ()} Shifts @code{x} by @code{n} bits to the right. @code{n} should be >=0. Bits shifted out to the right are thrown away. Equivalent to @code{floor(x / expt(2,n))}. @item cl_I ash (const cl_I& x, const cl_I& y) @cindex @code{ash ()} Shifts @code{x} by @code{y} bits to the left (if @code{y}>=0) or by @code{-y} bits to the right (if @code{y}<=0). In other words, this returns @code{floor(x * expt(2,y))}. @item uintC integer_length (const cl_I& x) @cindex @code{integer_length ()} Returns the number of bits (excluding the sign bit) needed to represent @code{x} in two's complement notation. This is the smallest n >= 0 such that -2^n <= x < 2^n. If x > 0, this is the unique n > 0 such that 2^(n-1) <= x < 2^n. @item uintC ord2 (const cl_I& x) @cindex @code{ord2 ()} @code{x} must be non-zero. This function returns the number of 0 bits at the right of @code{x} in two's complement notation. This is the largest n >= 0 such that 2^n divides @code{x}. @item uintC power2p (const cl_I& x) @cindex @code{power2p ()} @code{x} must be > 0. This function checks whether @code{x} is a power of 2. If @code{x} = 2^(n-1), it returns n. Else it returns 0. (See also the function @code{logp}.) @end table @node Number theoretic functions @subsection Number theoretic functions @table @code @item uint32 gcd (unsigned long a, unsigned long b) @cindex @code{gcd ()} @itemx cl_I gcd (const cl_I& a, const cl_I& b) This function returns the greatest common divisor of @code{a} and @code{b}, normalized to be >= 0. @item cl_I xgcd (const cl_I& a, const cl_I& b, cl_I* u, cl_I* v) @cindex @code{xgcd ()} This function (``extended gcd'') returns the greatest common divisor @code{g} of @code{a} and @code{b} and at the same time the representation of @code{g} as an integral linear combination of @code{a} and @code{b}: @code{u} and @code{v} with @code{u*a+v*b = g}, @code{g} >= 0. @code{u} and @code{v} will be normalized to be of smallest possible absolute value, in the following sense: If @code{a} and @code{b} are non-zero, and @code{abs(a) != abs(b)}, @code{u} and @code{v} will satisfy the inequalities @code{abs(u) <= abs(b)/(2*g)}, @code{abs(v) <= abs(a)/(2*g)}. @item cl_I lcm (const cl_I& a, const cl_I& b) @cindex @code{lcm ()} This function returns the least common multiple of @code{a} and @code{b}, normalized to be >= 0. @item bool logp (const cl_I& a, const cl_I& b, cl_RA* l) @cindex @code{logp ()} @itemx bool logp (const cl_RA& a, const cl_RA& b, cl_RA* l) @code{a} must be > 0. @code{b} must be >0 and != 1. If log(a,b) is rational number, this function returns true and sets *l = log(a,b), else it returns false. @item int jacobi (signed long a, signed long b) @cindex @code{jacobi()} @itemx int jacobi (const cl_I& a, const cl_I& b) Returns the Jacobi symbol @tex $\left({a\over b}\right)$, @end tex @ifnottex (a/b), @end ifnottex @code{a,b} must be integers, @code{b>0} and odd. The result is 0 iff gcd(a,b)>1. @item bool isprobprime (const cl_I& n) @cindex prime @cindex @code{isprobprime()} Returns true if @code{n} is a small prime or passes the Miller-Rabin primality test. The probability of a false positive is 1:10^30. @item cl_I nextprobprime (const cl_R& x) @cindex @code{nextprobprime()} Returns the smallest probable prime >=@code{x}. @end table @node Combinatorial functions @subsection Combinatorial functions @table @code @item cl_I factorial (uintL n) @cindex @code{factorial ()} @code{n} must be a small integer >= 0. This function returns the factorial @code{n}! = @code{1*2*@dots{}*n}. @item cl_I doublefactorial (uintL n) @cindex @code{doublefactorial ()} @code{n} must be a small integer >= 0. This function returns the doublefactorial @code{n}!! = @code{1*3*@dots{}*n} or @code{n}!! = @code{2*4*@dots{}*n}, respectively. @item cl_I binomial (uintL n, uintL k) @cindex @code{binomial ()} @code{n} and @code{k} must be small integers >= 0. This function returns the binomial coefficient @tex ${n \choose k} = {n! \over k! (n-k)!}$ @end tex @ifinfo (@code{n} choose @code{k}) = @code{n}! / @code{k}! @code{(n-k)}! @end ifinfo for 0 <= k <= n, 0 else. @end table @node Functions on floating-point numbers @section Functions on floating-point numbers Recall that a floating-point number consists of a sign @code{s}, an exponent @code{e} and a mantissa @code{m}. The value of the number is @code{(-1)^s * 2^e * m}. Each of the classes @code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF} defines the following operations. @table @code @item @var{type} scale_float (const @var{type}& x, sintC delta) @cindex @code{scale_float ()} @itemx @var{type} scale_float (const @var{type}& x, const cl_I& delta) Returns @code{x*2^delta}. This is more efficient than an explicit multiplication because it copies @code{x} and modifies the exponent. @end table The following functions provide an abstract interface to the underlying representation of floating-point numbers. @table @code @item sintE float_exponent (const @var{type}& x) @cindex @code{float_exponent ()} Returns the exponent @code{e} of @code{x}. For @code{x = 0.0}, this is 0. For @code{x} non-zero, this is the unique integer with @code{2^(e-1) <= abs(x) < 2^e}. @item sintL float_radix (const @var{type}& x) @cindex @code{float_radix ()} Returns the base of the floating-point representation. This is always @code{2}. @item @var{type} float_sign (const @var{type}& x) @cindex @code{float_sign ()} Returns the sign @code{s} of @code{x} as a float. The value is 1 for @code{x} >= 0, -1 for @code{x} < 0. @item uintC float_digits (const @var{type}& x) @cindex @code{float_digits ()} Returns the number of mantissa bits in the floating-point representation of @code{x}, including the hidden bit. The value only depends on the type of @code{x}, not on its value. @item uintC float_precision (const @var{type}& x) @cindex @code{float_precision ()} Returns the number of significant mantissa bits in the floating-point representation of @code{x}. Since denormalized numbers are not supported, this is the same as @code{float_digits(x)} if @code{x} is non-zero, and 0 if @code{x} = 0. @end table The complete internal representation of a float is encoded in the type @cindex @code{decoded_float} @cindex @code{decoded_sfloat} @cindex @code{decoded_ffloat} @cindex @code{decoded_dfloat} @cindex @code{decoded_lfloat} @code{decoded_float} (or @code{decoded_sfloat}, @code{decoded_ffloat}, @code{decoded_dfloat}, @code{decoded_lfloat}, respectively), defined by @example struct decoded_@var{type}float @{ @var{type} mantissa; cl_I exponent; @var{type} sign; @}; @end example and returned by the function @table @code @item decoded_@var{type}float decode_float (const @var{type}& x) @cindex @code{decode_float ()} For @code{x} non-zero, this returns @code{(-1)^s}, @code{e}, @code{m} with @code{x = (-1)^s * 2^e * m} and @code{0.5 <= m < 1.0}. For @code{x} = 0, it returns @code{(-1)^s}=1, @code{e}=0, @code{m}=0. @code{e} is the same as returned by the function @code{float_exponent}. @end table A complete decoding in terms of integers is provided as type @cindex @code{cl_idecoded_float} @example struct cl_idecoded_float @{ cl_I mantissa; cl_I exponent; cl_I sign; @}; @end example by the following function: @table @code @item cl_idecoded_float integer_decode_float (const @var{type}& x) @cindex @code{integer_decode_float ()} For @code{x} non-zero, this returns @code{(-1)^s}, @code{e}, @code{m} with @code{x = (-1)^s * 2^e * m} and @code{m} an integer with @code{float_digits(x)} bits. For @code{x} = 0, it returns @code{(-1)^s}=1, @code{e}=0, @code{m}=0. WARNING: The exponent @code{e} is not the same as the one returned by the functions @code{decode_float} and @code{float_exponent}. @end table Some other function, implemented only for class @code{cl_F}: @table @code @item cl_F float_sign (const cl_F& x, const cl_F& y) @cindex @code{float_sign ()} This returns a floating point number whose precision and absolute value is that of @code{y} and whose sign is that of @code{x}. If @code{x} is zero, it is treated as positive. Same for @code{y}. @end table @node Conversion functions @section Conversion functions @cindex conversion @menu * Conversion to floating-point numbers:: * Conversion to rational numbers:: @end menu @node Conversion to floating-point numbers @subsection Conversion to floating-point numbers The type @code{float_format_t} describes a floating-point format. @cindex @code{float_format_t} @table @code @item float_format_t float_format (uintE n) @cindex @code{float_format ()} Returns the smallest float format which guarantees at least @code{n} decimal digits in the mantissa (after the decimal point). @item float_format_t float_format (const cl_F& x) Returns the floating point format of @code{x}. @item float_format_t default_float_format @cindex @code{default_float_format} Global variable: the default float format used when converting rational numbers to floats. @end table To convert a real number to a float, each of the types @code{cl_R}, @code{cl_F}, @code{cl_I}, @code{cl_RA}, @code{int}, @code{unsigned int}, @code{float}, @code{double} defines the following operations: @table @code @item cl_F cl_float (const @var{type}&x, float_format_t f) @cindex @code{cl_float ()} Returns @code{x} as a float of format @code{f}. @item cl_F cl_float (const @var{type}&x, const cl_F& y) Returns @code{x} in the float format of @code{y}. @item cl_F cl_float (const @var{type}&x) Returns @code{x} as a float of format @code{default_float_format} if it is an exact number, or @code{x} itself if it is already a float. @end table Of course, converting a number to a float can lose precision. Every floating-point format has some characteristic numbers: @table @code @item cl_F most_positive_float (float_format_t f) @cindex @code{most_positive_float ()} Returns the largest (most positive) floating point number in float format @code{f}. @item cl_F most_negative_float (float_format_t f) @cindex @code{most_negative_float ()} Returns the smallest (most negative) floating point number in float format @code{f}. @item cl_F least_positive_float (float_format_t f) @cindex @code{least_positive_float ()} Returns the least positive floating point number (i.e. > 0 but closest to 0) in float format @code{f}. @item cl_F least_negative_float (float_format_t f) @cindex @code{least_negative_float ()} Returns the least negative floating point number (i.e. < 0 but closest to 0) in float format @code{f}. @item cl_F float_epsilon (float_format_t f) @cindex @code{float_epsilon ()} Returns the smallest floating point number e > 0 such that @code{1+e != 1}. @item cl_F float_negative_epsilon (float_format_t f) @cindex @code{float_negative_epsilon ()} Returns the smallest floating point number e > 0 such that @code{1-e != 1}. @end table @node Conversion to rational numbers @subsection Conversion to rational numbers Each of the classes @code{cl_R}, @code{cl_RA}, @code{cl_F} defines the following operation: @table @code @item cl_RA rational (const @var{type}& x) @cindex @code{rational ()} Returns the value of @code{x} as an exact number. If @code{x} is already an exact number, this is @code{x}. If @code{x} is a floating-point number, the value is a rational number whose denominator is a power of 2. @end table In order to convert back, say, @code{(cl_F)(cl_R)"1/3"} to @code{1/3}, there is the function @table @code @item cl_RA rationalize (const cl_R& x) @cindex @code{rationalize ()} If @code{x} is a floating-point number, it actually represents an interval of real numbers, and this function returns the rational number with smallest denominator (and smallest numerator, in magnitude) which lies in this interval. If @code{x} is already an exact number, this function returns @code{x}. @end table If @code{x} is any float, one has @itemize @w{} @item @code{cl_float(rational(x),x) = x} @item @code{cl_float(rationalize(x),x) = x} @end itemize @node Random number generators @section Random number generators A random generator is a machine which produces (pseudo-)random numbers. The include file @code{} defines a class @code{random_state} which contains the state of a random generator. If you make a copy of the random number generator, the original one and the copy will produce the same sequence of random numbers. The following functions return (pseudo-)random numbers in different formats. Calling one of these modifies the state of the random number generator in a complicated but deterministic way. The global variable @cindex @code{random_state} @cindex @code{default_random_state} @example random_state default_random_state @end example contains a default random number generator. It is used when the functions below are called without @code{random_state} argument. @table @code @item uint32 random32 (random_state& randomstate) @itemx uint32 random32 () @cindex @code{random32 ()} Returns a random unsigned 32-bit number. All bits are equally random. @item cl_I random_I (random_state& randomstate, const cl_I& n) @itemx cl_I random_I (const cl_I& n) @cindex @code{random_I ()} @code{n} must be an integer > 0. This function returns a random integer @code{x} in the range @code{0 <= x < n}. @item cl_F random_F (random_state& randomstate, const cl_F& n) @itemx cl_F random_F (const cl_F& n) @cindex @code{random_F ()} @code{n} must be a float > 0. This function returns a random floating-point number of the same format as @code{n} in the range @code{0 <= x < n}. @item cl_R random_R (random_state& randomstate, const cl_R& n) @itemx cl_R random_R (const cl_R& n) @cindex @code{random_R ()} Behaves like @code{random_I} if @code{n} is an integer and like @code{random_F} if @code{n} is a float. @end table @node Modifying operators @section Modifying operators @cindex modifying operators The modifying C/C++ operators @code{+=}, @code{-=}, @code{*=}, @code{/=}, @code{&=}, @code{|=}, @code{^=}, @code{<<=}, @code{>>=} are all available. For the classes @code{cl_N}, @code{cl_R}, @code{cl_RA}, @code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF}: @table @code @item @var{type}& operator += (@var{type}&, const @var{type}&) @cindex @code{operator += ()} @itemx @var{type}& operator -= (@var{type}&, const @var{type}&) @cindex @code{operator -= ()} @itemx @var{type}& operator *= (@var{type}&, const @var{type}&) @cindex @code{operator *= ()} @itemx @var{type}& operator /= (@var{type}&, const @var{type}&) @cindex @code{operator /= ()} @end table For the class @code{cl_I}: @table @code @item @var{type}& operator += (@var{type}&, const @var{type}&) @itemx @var{type}& operator -= (@var{type}&, const @var{type}&) @itemx @var{type}& operator *= (@var{type}&, const @var{type}&) @itemx @var{type}& operator &= (@var{type}&, const @var{type}&) @cindex @code{operator &= ()} @itemx @var{type}& operator |= (@var{type}&, const @var{type}&) @cindex @code{operator |= ()} @itemx @var{type}& operator ^= (@var{type}&, const @var{type}&) @cindex @code{operator ^= ()} @itemx @var{type}& operator <<= (@var{type}&, const @var{type}&) @cindex @code{operator <<= ()} @itemx @var{type}& operator >>= (@var{type}&, const @var{type}&) @cindex @code{operator >>= ()} @end table For the classes @code{cl_N}, @code{cl_R}, @code{cl_RA}, @code{cl_I}, @code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF}: @table @code @item @var{type}& operator ++ (@var{type}& x) @cindex @code{operator ++ ()} The prefix operator @code{++x}. @item void operator ++ (@var{type}& x, int) The postfix operator @code{x++}. @item @var{type}& operator -- (@var{type}& x) @cindex @code{operator -- ()} The prefix operator @code{--x}. @item void operator -- (@var{type}& x, int) The postfix operator @code{x--}. @end table Note that by using these modifying operators, you don't gain efficiency: In CLN @samp{x += y;} is exactly the same as @samp{x = x+y;}, not more efficient. @node Input/Output @chapter Input/Output @cindex Input/Output @menu * Internal and printed representation:: * Input functions:: * Output functions:: @end menu @node Internal and printed representation @section Internal and printed representation @cindex representation All computations deal with the internal representations of the numbers. Every number has an external representation as a sequence of ASCII characters. Several external representations may denote the same number, for example, "20.0" and "20.000". Converting an internal to an external representation is called ``printing'', @cindex printing converting an external to an internal representation is called ``reading''. @cindex reading In CLN, it is always true that conversion of an internal to an external representation and then back to an internal representation will yield the same internal representation. Symbolically: @code{read(print(x)) == x}. This is called ``print-read consistency''. Different types of numbers have different external representations (case is insignificant): @table @asis @item Integers External representation: @var{sign}@{@var{digit}@}+. The reader also accepts the Common Lisp syntaxes @var{sign}@{@var{digit}@}+@code{.} with a trailing dot for decimal integers and the @code{#@var{n}R}, @code{#b}, @code{#o}, @code{#x} prefixes. @item Rational numbers External representation: @var{sign}@{@var{digit}@}+@code{/}@{@var{digit}@}+. The @code{#@var{n}R}, @code{#b}, @code{#o}, @code{#x} prefixes are allowed here as well. @item Floating-point numbers External representation: @var{sign}@{@var{digit}@}*@var{exponent} or @var{sign}@{@var{digit}@}*@code{.}@{@var{digit}@}*@var{exponent} or @var{sign}@{@var{digit}@}*@code{.}@{@var{digit}@}+. A precision specifier of the form _@var{prec} may be appended. There must be at least one digit in the non-exponent part. The exponent has the syntax @var{expmarker} @var{expsign} @{@var{digit}@}+. The exponent marker is @itemize @w{} @item @samp{s} for short-floats, @item @samp{f} for single-floats, @item @samp{d} for double-floats, @item @samp{L} for long-floats, @end itemize or @samp{e}, which denotes a default float format. The precision specifying suffix has the syntax _@var{prec} where @var{prec} denotes the number of valid mantissa digits (in decimal, excluding leading zeroes), cf. also function @samp{float_format}. @item Complex numbers External representation: @itemize @w{} @item In algebraic notation: @code{@var{realpart}+@var{imagpart}i}. Of course, if @var{imagpart} is negative, its printed representation begins with a @samp{-}, and the @samp{+} between @var{realpart} and @var{imagpart} may be omitted. Note that this notation cannot be used when the @var{imagpart} is rational and the rational number's base is >18, because the @samp{i} is then read as a digit. @item In Common Lisp notation: @code{#C(@var{realpart} @var{imagpart})}. @end itemize @end table @node Input functions @section Input functions Including @code{} defines flexible input functions: @table @code @item cl_N read_complex (std::istream& stream, const cl_read_flags& flags) @itemx cl_R read_real (std::istream& stream, const cl_read_flags& flags) @itemx cl_F read_float (std::istream& stream, const cl_read_flags& flags) @itemx cl_RA read_rational (std::istream& stream, const cl_read_flags& flags) @itemx cl_I read_integer (std::istream& stream, const cl_read_flags& flags) Reads a number from @code{stream}. The @code{flags} are parameters which affect the input syntax. Whitespace before the number is silently skipped. @item cl_N read_complex (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse) @itemx cl_R read_real (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse) @itemx cl_F read_float (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse) @itemx cl_RA read_rational (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse) @itemx cl_I read_integer (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse) Reads a number from a string in memory. The @code{flags} are parameters which affect the input syntax. The string starts at @code{string} and ends at @code{string_limit} (exclusive limit). @code{string_limit} may also be @code{NULL}, denoting the entire string, i.e. equivalent to @code{string_limit = string + strlen(string)}. If @code{end_of_parse} is @code{NULL}, the string in memory must contain exactly one number and nothing more, else an exception will be thrown. If @code{end_of_parse} is not @code{NULL}, @code{*end_of_parse} will be assigned a pointer past the last parsed character (i.e. @code{string_limit} if nothing came after the number). Whitespace is not allowed. @end table The structure @code{cl_read_flags} contains the following fields: @table @code @item cl_read_syntax_t syntax The possible results of the read operation. Possible values are @code{syntax_number}, @code{syntax_real}, @code{syntax_rational}, @code{syntax_integer}, @code{syntax_float}, @code{syntax_sfloat}, @code{syntax_ffloat}, @code{syntax_dfloat}, @code{syntax_lfloat}. @item cl_read_lsyntax_t lsyntax Specifies the language-dependent syntax variant for the read operation. Possible values are @table @code @item lsyntax_standard accept standard algebraic notation only, no complex numbers, @item lsyntax_algebraic accept the algebraic notation @code{@var{x}+@var{y}i} for complex numbers, @item lsyntax_commonlisp accept the @code{#b}, @code{#o}, @code{#x} syntaxes for binary, octal, hexadecimal numbers, @code{#@var{base}R} for rational numbers in a given base, @code{#c(@var{realpart} @var{imagpart})} for complex numbers, @item lsyntax_all accept all of these extensions. @end table @item unsigned int rational_base The base in which rational numbers are read. @item float_format_t float_flags.default_float_format The float format used when reading floats with exponent marker @samp{e}. @item float_format_t float_flags.default_lfloat_format The float format used when reading floats with exponent marker @samp{l}. @item bool float_flags.mantissa_dependent_float_format When this flag is true, floats specified with more digits than corresponding to the exponent marker they contain, but without @var{_nnn} suffix, will get a precision corresponding to their number of significant digits. @end table @node Output functions @section Output functions Including @code{} defines a number of simple output functions that write to @code{std::ostream&}: @table @code @item void fprintchar (std::ostream& stream, char c) Prints the character @code{x} literally on the @code{stream}. @item void fprint (std::ostream& stream, const char * string) Prints the @code{string} literally on the @code{stream}. @item void fprintdecimal (std::ostream& stream, int x) @itemx void fprintdecimal (std::ostream& stream, const cl_I& x) Prints the integer @code{x} in decimal on the @code{stream}. @item void fprintbinary (std::ostream& stream, const cl_I& x) Prints the integer @code{x} in binary (base 2, without prefix) on the @code{stream}. @item void fprintoctal (std::ostream& stream, const cl_I& x) Prints the integer @code{x} in octal (base 8, without prefix) on the @code{stream}. @item void fprinthexadecimal (std::ostream& stream, const cl_I& x) Prints the integer @code{x} in hexadecimal (base 16, without prefix) on the @code{stream}. @end table Each of the classes @code{cl_N}, @code{cl_R}, @code{cl_RA}, @code{cl_I}, @code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF} defines, in @code{}, the following output functions: @table @code @item void fprint (std::ostream& stream, const @var{type}& x) @itemx std::ostream& operator<< (std::ostream& stream, const @var{type}& x) Prints the number @code{x} on the @code{stream}. The output may depend on the global printer settings in the variable @code{default_print_flags}. The @code{ostream} flags and settings (flags, width and locale) are ignored. @end table The most flexible output function, defined in @code{}, are the following: @example void print_complex (std::ostream& stream, const cl_print_flags& flags, const cl_N& z); void print_real (std::ostream& stream, const cl_print_flags& flags, const cl_R& z); void print_float (std::ostream& stream, const cl_print_flags& flags, const cl_F& z); void print_rational (std::ostream& stream, const cl_print_flags& flags, const cl_RA& z); void print_integer (std::ostream& stream, const cl_print_flags& flags, const cl_I& z); @end example Prints the number @code{x} on the @code{stream}. The @code{flags} are parameters which affect the output. The structure type @code{cl_print_flags} contains the following fields: @table @code @item unsigned int rational_base The base in which rational numbers are printed. Default is @code{10}. @item bool rational_readably If this flag is true, rational numbers are printed with radix specifiers in Common Lisp syntax (@code{#@var{n}R} or @code{#b} or @code{#o} or @code{#x} prefixes, trailing dot). Default is false. @item bool float_readably If this flag is true, type specific exponent markers have precedence over 'E'. Default is false. @item float_format_t default_float_format Floating point numbers of this format will be printed using the 'E' exponent marker. Default is @code{float_format_ffloat}. @item bool complex_readably If this flag is true, complex numbers will be printed using the Common Lisp syntax @code{#C(@var{realpart} @var{imagpart})}. Default is false. @item cl_string univpoly_varname Univariate polynomials with no explicit indeterminate name will be printed using this variable name. Default is @code{"x"}. @end table The global variable @code{default_print_flags} contains the default values, used by the function @code{fprint}. @node Rings @chapter Rings CLN has a class of abstract rings. @example Ring cl_ring @end example Rings can be compared for equality: @table @code @item bool operator== (const cl_ring&, const cl_ring&) @itemx bool operator!= (const cl_ring&, const cl_ring&) These compare two rings for equality. @end table Given a ring @code{R}, the following members can be used. @table @code @item void R->fprint (std::ostream& stream, const cl_ring_element& x) @cindex @code{fprint ()} @itemx bool R->equal (const cl_ring_element& x, const cl_ring_element& y) @cindex @code{equal ()} @itemx cl_ring_element R->zero () @cindex @code{zero ()} @itemx bool R->zerop (const cl_ring_element& x) @cindex @code{zerop ()} @itemx cl_ring_element R->plus (const cl_ring_element& x, const cl_ring_element& y) @cindex @code{plus ()} @itemx cl_ring_element R->minus (const cl_ring_element& x, const cl_ring_element& y) @cindex @code{minus ()} @itemx cl_ring_element R->uminus (const cl_ring_element& x) @cindex @code{uminus ()} @itemx cl_ring_element R->one () @cindex @code{one ()} @itemx cl_ring_element R->canonhom (const cl_I& x) @cindex @code{canonhom ()} @itemx cl_ring_element R->mul (const cl_ring_element& x, const cl_ring_element& y) @cindex @code{mul ()} @itemx cl_ring_element R->square (const cl_ring_element& x) @cindex @code{square ()} @itemx cl_ring_element R->expt_pos (const cl_ring_element& x, const cl_I& y) @cindex @code{expt_pos ()} @end table The following rings are built-in. @table @code @item cl_null_ring cl_0_ring The null ring, containing only zero. @item cl_complex_ring cl_C_ring The ring of complex numbers. This corresponds to the type @code{cl_N}. @item cl_real_ring cl_R_ring The ring of real numbers. This corresponds to the type @code{cl_R}. @item cl_rational_ring cl_RA_ring The ring of rational numbers. This corresponds to the type @code{cl_RA}. @item cl_integer_ring cl_I_ring The ring of integers. This corresponds to the type @code{cl_I}. @end table Type tests can be performed for any of @code{cl_C_ring}, @code{cl_R_ring}, @code{cl_RA_ring}, @code{cl_I_ring}: @table @code @item bool instanceof (const cl_number& x, const cl_number_ring& R) @cindex @code{instanceof ()} Tests whether the given number is an element of the number ring R. @end table @node Modular integers @chapter Modular integers @cindex modular integer @menu * Modular integer rings:: * Functions on modular integers:: @end menu @node Modular integer rings @section Modular integer rings @cindex ring CLN implements modular integers, i.e. integers modulo a fixed integer N. The modulus is explicitly part of every modular integer. CLN doesn't allow you to (accidentally) mix elements of different modular rings, e.g. @code{(3 mod 4) + (2 mod 5)} will result in a runtime error. (Ideally one would imagine a generic data type @code{cl_MI(N)}, but C++ doesn't have generic types. So one has to live with runtime checks.) The class of modular integer rings is @example Ring cl_ring | | Modular integer ring cl_modint_ring @end example @cindex @code{cl_modint_ring} and the class of all modular integers (elements of modular integer rings) is @example Modular integer cl_MI @end example Modular integer rings are constructed using the function @table @code @item cl_modint_ring find_modint_ring (const cl_I& N) @cindex @code{find_modint_ring ()} This function returns the modular ring @samp{Z/NZ}. It takes care of finding out about special cases of @code{N}, like powers of two and odd numbers for which Montgomery multiplication will be a win, @cindex Montgomery multiplication and precomputes any necessary auxiliary data for computing modulo @code{N}. There is a cache table of rings, indexed by @code{N} (or, more precisely, by @code{abs(N)}). This ensures that the precomputation costs are reduced to a minimum. @end table Modular integer rings can be compared for equality: @table @code @item bool operator== (const cl_modint_ring&, const cl_modint_ring&) @cindex @code{operator == ()} @itemx bool operator!= (const cl_modint_ring&, const cl_modint_ring&) @cindex @code{operator != ()} These compare two modular integer rings for equality. Two different calls to @code{find_modint_ring} with the same argument necessarily return the same ring because it is memoized in the cache table. @end table @node Functions on modular integers @section Functions on modular integers Given a modular integer ring @code{R}, the following members can be used. @table @code @item cl_I R->modulus @cindex @code{modulus} This is the ring's modulus, normalized to be nonnegative: @code{abs(N)}. @item cl_MI R->zero() @cindex @code{zero ()} This returns @code{0 mod N}. @item cl_MI R->one() @cindex @code{one ()} This returns @code{1 mod N}. @item cl_MI R->canonhom (const cl_I& x) @cindex @code{canonhom ()} This returns @code{x mod N}. @item cl_I R->retract (const cl_MI& x) @cindex @code{retract ()} This is a partial inverse function to @code{R->canonhom}. It returns the standard representative (@code{>=0}, @code{random(random_state& randomstate) @itemx cl_MI R->random() @cindex @code{random ()} This returns a random integer modulo @code{N}. @end table The following operations are defined on modular integers. @table @code @item cl_modint_ring x.ring () @cindex @code{ring ()} Returns the ring to which the modular integer @code{x} belongs. @item cl_MI operator+ (const cl_MI&, const cl_MI&) @cindex @code{operator + ()} Returns the sum of two modular integers. One of the arguments may also be a plain integer. @item cl_MI operator- (const cl_MI&, const cl_MI&) @cindex @code{operator - ()} Returns the difference of two modular integers. One of the arguments may also be a plain integer. @item cl_MI operator- (const cl_MI&) Returns the negative of a modular integer. @item cl_MI operator* (const cl_MI&, const cl_MI&) @cindex @code{operator * ()} Returns the product of two modular integers. One of the arguments may also be a plain integer. @item cl_MI square (const cl_MI&) @cindex @code{square ()} Returns the square of a modular integer. @item cl_MI recip (const cl_MI& x) @cindex @code{recip ()} Returns the reciprocal @code{x^-1} of a modular integer @code{x}. @code{x} must be coprime to the modulus, otherwise an error message is issued. @item cl_MI div (const cl_MI& x, const cl_MI& y) @cindex @code{div ()} Returns the quotient @code{x*y^-1} of two modular integers @code{x}, @code{y}. @code{y} must be coprime to the modulus, otherwise an error message is issued. @item cl_MI expt_pos (const cl_MI& x, const cl_I& y) @cindex @code{expt_pos ()} @code{y} must be > 0. Returns @code{x^y}. @item cl_MI expt (const cl_MI& x, const cl_I& y) @cindex @code{expt ()} Returns @code{x^y}. If @code{y} is negative, @code{x} must be coprime to the modulus, else an error message is issued. @item cl_MI operator<< (const cl_MI& x, const cl_I& y) @cindex @code{operator << ()} Returns @code{x*2^y}. @item cl_MI operator>> (const cl_MI& x, const cl_I& y) @cindex @code{operator >> ()} Returns @code{x*2^-y}. When @code{y} is positive, the modulus must be odd, or an error message is issued. @item bool operator== (const cl_MI&, const cl_MI&) @cindex @code{operator == ()} @itemx bool operator!= (const cl_MI&, const cl_MI&) @cindex @code{operator != ()} Compares two modular integers, belonging to the same modular integer ring, for equality. @item bool zerop (const cl_MI& x) @cindex @code{zerop ()} Returns true if @code{x} is @code{0 mod N}. @end table The following output functions are defined (see also the chapter on input/output). @table @code @item void fprint (std::ostream& stream, const cl_MI& x) @cindex @code{fprint ()} @itemx std::ostream& operator<< (std::ostream& stream, const cl_MI& x) @cindex @code{operator << ()} Prints the modular integer @code{x} on the @code{stream}. The output may depend on the global printer settings in the variable @code{default_print_flags}. @end table @node Symbolic data types @chapter Symbolic data types @cindex symbolic type CLN implements two symbolic (non-numeric) data types: strings and symbols. @menu * Strings:: * Symbols:: @end menu @node Strings @section Strings @cindex string @cindex @code{cl_string} The class @example String cl_string @end example implements immutable strings. Strings are constructed through the following constructors: @table @code @item cl_string (const char * s) Returns an immutable copy of the (zero-terminated) C string @code{s}. @item cl_string (const char * ptr, unsigned long len) Returns an immutable copy of the @code{len} characters at @code{ptr[0]}, @dots{}, @code{ptr[len-1]}. NUL characters are allowed. @end table The following functions are available on strings: @table @code @item operator = Assignment from @code{cl_string} and @code{const char *}. @item s.size() @cindex @code{size()} @itemx strlen(s) @cindex @code{strlen ()} Returns the length of the string @code{s}. @item s[i] @cindex @code{operator [] ()} Returns the @code{i}th character of the string @code{s}. @code{i} must be in the range @code{0 <= i < s.size()}. @item bool equal (const cl_string& s1, const cl_string& s2) @cindex @code{equal ()} Compares two strings for equality. One of the arguments may also be a plain @code{const char *}. @end table @node Symbols @section Symbols @cindex symbol @cindex @code{cl_symbol} Symbols are uniquified strings: all symbols with the same name are shared. This means that comparison of two symbols is fast (effectively just a pointer comparison), whereas comparison of two strings must in the worst case walk both strings until their end. Symbols are used, for example, as tags for properties, as names of variables in polynomial rings, etc. Symbols are constructed through the following constructor: @table @code @item cl_symbol (const cl_string& s) Looks up or creates a new symbol with a given name. @end table The following operations are available on symbols: @table @code @item cl_string (const cl_symbol& sym) Conversion to @code{cl_string}: Returns the string which names the symbol @code{sym}. @item bool equal (const cl_symbol& sym1, const cl_symbol& sym2) @cindex @code{equal ()} Compares two symbols for equality. This is very fast. @end table @node Univariate polynomials @chapter Univariate polynomials @cindex polynomial @cindex univariate polynomial @menu * Univariate polynomial rings:: * Functions on univariate polynomials:: * Special polynomials:: @end menu @node Univariate polynomial rings @section Univariate polynomial rings CLN implements univariate polynomials (polynomials in one variable) over an arbitrary ring. The indeterminate variable may be either unnamed (and will be printed according to @code{default_print_flags.univpoly_varname}, which defaults to @samp{x}) or carry a given name. The base ring and the indeterminate are explicitly part of every polynomial. CLN doesn't allow you to (accidentally) mix elements of different polynomial rings, e.g. @code{(a^2+1) * (b^3-1)} will result in a runtime error. (Ideally this should return a multivariate polynomial, but they are not yet implemented in CLN.) The classes of univariate polynomial rings are @example Ring cl_ring | | Univariate polynomial ring cl_univpoly_ring | +----------------+-------------------+ | | | Complex polynomial ring | Modular integer polynomial ring cl_univpoly_complex_ring | cl_univpoly_modint_ring | | +----------------+ | | Real polynomial ring | cl_univpoly_real_ring | | | +----------------+ | | Rational polynomial ring | cl_univpoly_rational_ring | | | +----------------+ | Integer polynomial ring cl_univpoly_integer_ring @end example and the corresponding classes of univariate polynomials are @example Univariate polynomial cl_UP | +----------------+-------------------+ | | | Complex polynomial | Modular integer polynomial cl_UP_N | cl_UP_MI | | +----------------+ | | Real polynomial | cl_UP_R | | | +----------------+ | | Rational polynomial | cl_UP_RA | | | +----------------+ | Integer polynomial cl_UP_I @end example Univariate polynomial rings are constructed using the functions @table @code @item cl_univpoly_ring find_univpoly_ring (const cl_ring& R) @itemx cl_univpoly_ring find_univpoly_ring (const cl_ring& R, const cl_symbol& varname) This function returns the polynomial ring @samp{R[X]}, unnamed or named. @code{R} may be an arbitrary ring. This function takes care of finding out about special cases of @code{R}, such as the rings of complex numbers, real numbers, rational numbers, integers, or modular integer rings. There is a cache table of rings, indexed by @code{R} and @code{varname}. This ensures that two calls of this function with the same arguments will return the same polynomial ring. @item cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& R) @cindex @code{find_univpoly_ring ()} @item cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& R, const cl_symbol& varname) @item cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& R) @item cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& R, const cl_symbol& varname) @item cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& R) @item cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& R, const cl_symbol& varname) @item cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& R) @item cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& R, const cl_symbol& varname) @item cl_univpoly_modint_ring find_univpoly_ring (const cl_modint_ring& R) @item cl_univpoly_modint_ring find_univpoly_ring (const cl_modint_ring& R, const cl_symbol& varname) These functions are equivalent to the general @code{find_univpoly_ring}, only the return type is more specific, according to the base ring's type. @end table @node Functions on univariate polynomials @section Functions on univariate polynomials Given a univariate polynomial ring @code{R}, the following members can be used. @table @code @item cl_ring R->basering() @cindex @code{basering ()} This returns the base ring, as passed to @samp{find_univpoly_ring}. @item cl_UP R->zero() @cindex @code{zero ()} This returns @code{0 in R}, a polynomial of degree -1. @item cl_UP R->one() @cindex @code{one ()} This returns @code{1 in R}, a polynomial of degree == 0. @item cl_UP R->canonhom (const cl_I& x) @cindex @code{canonhom ()} This returns @code{x in R}, a polynomial of degree <= 0. @item cl_UP R->monomial (const cl_ring_element& x, uintL e) @cindex @code{monomial ()} This returns a sparse polynomial: @code{x * X^e}, where @code{X} is the indeterminate. @item cl_UP R->create (sintL degree) @cindex @code{create ()} Creates a new polynomial with a given degree. The zero polynomial has degree @code{-1}. After creating the polynomial, you should put in the coefficients, using the @code{set_coeff} member function, and then call the @code{finalize} member function. @end table The following are the only destructive operations on univariate polynomials. @table @code @item void set_coeff (cl_UP& x, uintL index, const cl_ring_element& y) @cindex @code{set_coeff ()} This changes the coefficient of @code{X^index} in @code{x} to be @code{y}. After changing a polynomial and before applying any "normal" operation on it, you should call its @code{finalize} member function. @item void finalize (cl_UP& x) @cindex @code{finalize ()} This function marks the endpoint of destructive modifications of a polynomial. It normalizes the internal representation so that subsequent computations have less overhead. Doing normal computations on unnormalized polynomials may produce wrong results or crash the program. @end table The following operations are defined on univariate polynomials. @table @code @item cl_univpoly_ring x.ring () @cindex @code{ring ()} Returns the ring to which the univariate polynomial @code{x} belongs. @item cl_UP operator+ (const cl_UP&, const cl_UP&) @cindex @code{operator + ()} Returns the sum of two univariate polynomials. @item cl_UP operator- (const cl_UP&, const cl_UP&) @cindex @code{operator - ()} Returns the difference of two univariate polynomials. @item cl_UP operator- (const cl_UP&) Returns the negative of a univariate polynomial. @item cl_UP operator* (const cl_UP&, const cl_UP&) @cindex @code{operator * ()} Returns the product of two univariate polynomials. One of the arguments may also be a plain integer or an element of the base ring. @item cl_UP square (const cl_UP&) @cindex @code{square ()} Returns the square of a univariate polynomial. @item cl_UP expt_pos (const cl_UP& x, const cl_I& y) @cindex @code{expt_pos ()} @code{y} must be > 0. Returns @code{x^y}. @item bool operator== (const cl_UP&, const cl_UP&) @cindex @code{operator == ()} @itemx bool operator!= (const cl_UP&, const cl_UP&) @cindex @code{operator != ()} Compares two univariate polynomials, belonging to the same univariate polynomial ring, for equality. @item bool zerop (const cl_UP& x) @cindex @code{zerop ()} Returns true if @code{x} is @code{0 in R}. @item sintL degree (const cl_UP& x) @cindex @code{degree ()} Returns the degree of the polynomial. The zero polynomial has degree @code{-1}. @item sintL ldegree (const cl_UP& x) @cindex @code{degree ()} Returns the low degree of the polynomial. This is the degree of the first non-vanishing polynomial coefficient. The zero polynomial has ldegree @code{-1}. @item cl_ring_element coeff (const cl_UP& x, uintL index) @cindex @code{coeff ()} Returns the coefficient of @code{X^index} in the polynomial @code{x}. @item cl_ring_element x (const cl_ring_element& y) @cindex @code{operator () ()} Evaluation: If @code{x} is a polynomial and @code{y} belongs to the base ring, then @samp{x(y)} returns the value of the substitution of @code{y} into @code{x}. @item cl_UP deriv (const cl_UP& x) @cindex @code{deriv ()} Returns the derivative of the polynomial @code{x} with respect to the indeterminate @code{X}. @end table The following output functions are defined (see also the chapter on input/output). @table @code @item void fprint (std::ostream& stream, const cl_UP& x) @cindex @code{fprint ()} @itemx std::ostream& operator<< (std::ostream& stream, const cl_UP& x) @cindex @code{operator << ()} Prints the univariate polynomial @code{x} on the @code{stream}. The output may depend on the global printer settings in the variable @code{default_print_flags}. @end table @node Special polynomials @section Special polynomials The following functions return special polynomials. @table @code @item cl_UP_I tschebychev (sintL n) @cindex @code{tschebychev ()} @cindex Chebyshev polynomial Returns the n-th Chebyshev polynomial (n >= 0). @item cl_UP_I hermite (sintL n) @cindex @code{hermite ()} @cindex Hermite polynomial Returns the n-th Hermite polynomial (n >= 0). @item cl_UP_RA legendre (sintL n) @cindex @code{legendre ()} @cindex Legende polynomial Returns the n-th Legendre polynomial (n >= 0). @item cl_UP_I laguerre (sintL n) @cindex @code{laguerre ()} @cindex Laguerre polynomial Returns the n-th Laguerre polynomial (n >= 0). @end table Information how to derive the differential equation satisfied by each of these polynomials from their definition can be found in the @code{doc/polynomial/} directory. @node Internals @chapter Internals @menu * Why C++ ?:: * Memory efficiency:: * Speed efficiency:: * Garbage collection:: @end menu @node Why C++ ? @section Why C++ ? @cindex advocacy Using C++ as an implementation language provides @itemize @bullet @item Efficiency: It compiles to machine code. @item @cindex portability Portability: It runs on all platforms supporting a C++ compiler. Because of the availability of GNU C++, this includes all currently used 32-bit and 64-bit platforms, independently of the quality of the vendor's C++ compiler. @item Type safety: The C++ compilers knows about the number types and complains if, for example, you try to assign a float to an integer variable. However, a drawback is that C++ doesn't know about generic types, hence a restriction like that @code{operator+ (const cl_MI&, const cl_MI&)} requires that both arguments belong to the same modular ring cannot be expressed as a compile-time information. @item Algebraic syntax: The elementary operations @code{+}, @code{-}, @code{*}, @code{=}, @code{==}, ... can be used in infix notation, which is more convenient than Lisp notation @samp{(+ x y)} or C notation @samp{add(x,y,&z)}. @end itemize With these language features, there is no need for two separate languages, one for the implementation of the library and one in which the library's users can program. This means that a prototype implementation of an algorithm can be integrated into the library immediately after it has been tested and debugged. No need to rewrite it in a low-level language after having prototyped in a high-level language. @node Memory efficiency @section Memory efficiency In order to save memory allocations, CLN implements: @itemize @bullet @item Object sharing: An operation like @code{x+0} returns @code{x} without copying it. @item @cindex garbage collection @cindex reference counting Garbage collection: A reference counting mechanism makes sure that any number object's storage is freed immediately when the last reference to the object is gone. @item @cindex immediate numbers Small integers are represented as immediate values instead of pointers to heap allocated storage. This means that integers @code{>= -2^29}, @code{< 2^29} don't consume heap memory, unless they were explicitly allocated on the heap. @end itemize @node Speed efficiency @section Speed efficiency Speed efficiency is obtained by the combination of the following tricks and algorithms: @itemize @bullet @item Small integers, being represented as immediate values, don't require memory access, just a couple of instructions for each elementary operation. @item The kernel of CLN has been written in assembly language for some CPUs (@code{i386}, @code{m68k}, @code{sparc}, @code{mips}, @code{arm}). @item On all CPUs, CLN may be configured to use the superefficient low-level routines from GNU GMP version 3. @item For large numbers, CLN uses, instead of the standard @code{O(N^2)} algorithm, the Karatsuba multiplication, which is an @iftex @tex $O(N^{1.6})$ @end tex @end iftex @ifinfo @code{O(N^1.6)} @end ifinfo algorithm. @item For very large numbers (more than 12000 decimal digits), CLN uses @iftex Sch{@"o}nhage-Strassen @cindex Sch{@"o}nhage-Strassen multiplication @end iftex @ifinfo Schoenhage-Strassen @cindex Schoenhage-Strassen multiplication @end ifinfo multiplication, which is an asymptotically optimal multiplication algorithm. @item These fast multiplication algorithms also give improvements in the speed of division and radix conversion. @end itemize @node Garbage collection @section Garbage collection @cindex garbage collection All the number classes are reference count classes: They only contain a pointer to an object in the heap. Upon construction, assignment and destruction of number objects, only the objects' reference count are manipulated. Memory occupied by number objects are automatically reclaimed as soon as their reference count drops to zero. For number rings, another strategy is implemented: There is a cache of, for example, the modular integer rings. A modular integer ring is destroyed only if its reference count dropped to zero and the cache is about to be resized. The effect of this strategy is that recently used rings remain cached, whereas undue memory consumption through cached rings is avoided. @node Using the library @chapter Using the library For the following discussion, we will assume that you have installed the CLN source in @code{$CLN_DIR} and built it in @code{$CLN_TARGETDIR}. For example, for me it's @code{CLN_DIR="$HOME/cln"} and @code{CLN_TARGETDIR="$HOME/cln/linuxelf"}. You might define these as environment variables, or directly substitute the appropriate values. @menu * Compiler options:: * Include files:: * An Example:: * Debugging support:: * Reporting Problems:: @end menu @node Compiler options @section Compiler options @cindex compiler options Until you have installed CLN in a public place, the following options are needed: When you compile CLN application code, add the flags @example -I$CLN_DIR/include -I$CLN_TARGETDIR/include @end example to the C++ compiler's command line (@code{make} variable CFLAGS or CXXFLAGS). When you link CLN application code to form an executable, add the flags @example $CLN_TARGETDIR/src/libcln.a @end example to the C/C++ compiler's command line (@code{make} variable LIBS). If you did a @code{make install}, the include files are installed in a public directory (normally @code{/usr/local/include}), hence you don't need special flags for compiling. The library has been installed to a public directory as well (normally @code{/usr/local/lib}), hence when linking a CLN application it is sufficient to give the flag @code{-lcln}. @cindex @code{pkg-config} To make the creation of software packages that use CLN easier, the @code{pkg-config} utility can be used. CLN provides all the necessary metainformation in a file called @code{cln.pc} (installed in @code{/usr/local/lib/pkgconfig} by default). A program using CLN can be compiled and linked using @footnote{If you installed CLN to non-standard location @var{prefix}, you need to set the @env{PKG_CONFIG_PATH} environment variable to @var{prefix}/lib/pkgconfig for this to work.} @example g++ `pkg-config --libs cln` `pkg-config --cflags cln` prog.cc -o prog @end example Software using GNU autoconf can check for CLN with the @code{PKG_CHECK_MODULES} macro supplied with @code{pkg-config}. @example PKG_CHECK_MODULES([CLN], [cln >= @var{MIN-VERSION}]) @end example This will check for CLN version at least @var{MIN-VERSION}. If the required version was found, the variables @var{CLN_CFLAGS} and @var{CLN_LIBS} are set. Otherwise the configure script aborts. If this is not the desired behaviour, use the following code instead @footnote{See the @code{pkg-config} documentation for more details.} @example PKG_CHECK_MODULES([CLN], [cln >= @var{MIN-VERSION}], [], [AC_MSG_WARNING([No suitable version of CLN can be found])]) @end example @node Include files @section Include files @cindex include files @cindex header files Here is a summary of the include files and their contents. @table @code @item General definitions, reference counting, garbage collection. @item The class cl_number. @item Functions for class cl_N, the complex numbers. @item Functions for class cl_R, the real numbers. @item Functions for class cl_F, the floats. @item Functions for class cl_SF, the short-floats. @item Functions for class cl_FF, the single-floats. @item Functions for class cl_DF, the double-floats. @item Functions for class cl_LF, the long-floats. @item Functions for class cl_RA, the rational numbers. @item Functions for class cl_I, the integers. @item Input/Output. @item Input/Output for class cl_N, the complex numbers. @item Input/Output for class cl_R, the real numbers. @item Input/Output for class cl_F, the floats. @item Input/Output for class cl_SF, the short-floats. @item Input/Output for class cl_FF, the single-floats. @item Input/Output for class cl_DF, the double-floats. @item Input/Output for class cl_LF, the long-floats. @item Input/Output for class cl_RA, the rational numbers. @item Input/Output for class cl_I, the integers. @item Flags for customizing input operations. @item Flags for customizing output operations. @item @code{malloc_hook}, @code{free_hook}. @item Exception base class. @item Conditions. @item Strings. @item Symbols. @item Property lists. @item General rings. @item The null ring. @item The ring of complex numbers. @item The ring of real numbers. @item The ring of rational numbers. @item The ring of integers. @item Number threory functions. @item Modular integers. @item Vectors. @item General vectors. @item General vectors over cl_number. @item General vectors over cl_N. @item General vectors over cl_R. @item General vectors over cl_RA. @item General vectors over cl_I. @item General vectors of modular integers. @item Simple vectors. @item Simple vectors over cl_number. @item Simple vectors over cl_N. @item Simple vectors over cl_R. @item Simple vectors over cl_RA. @item Simple vectors over cl_I. @item Simple vectors of general ring elements. @item Univariate polynomials. @item Univariate polynomials over the integers. @item Univariate polynomials over the rational numbers. @item Univariate polynomials over the real numbers. @item Univariate polynomials over the complex numbers. @item Univariate polynomials over modular integer rings. @item Timing facilities. @item Includes all of the above. @end table @node An Example @section An Example A function which computes the nth Fibonacci number can be written as follows. @cindex Fibonacci number @example #include #include using namespace cln; // Returns F_n, computed as the nearest integer to // ((1+sqrt(5))/2)^n/sqrt(5). Assume n>=0. const cl_I fibonacci (int n) @{ // Need a precision of ((1+sqrt(5))/2)^-n. float_format_t prec = float_format((int)(0.208987641*n+5)); cl_R sqrt5 = sqrt(cl_float(5,prec)); cl_R phi = (1+sqrt5)/2; return round1( expt(phi,n)/sqrt5 ); @} @end example Let's explain what is going on in detail. The include file @code{} is necessary because the type @code{cl_I} is used in the function, and the include file @code{} is needed for the type @code{cl_R} and the floating point number functions. The order of the include files does not matter. In order not to write out @code{cln::}@var{foo} in this simple example we can safely import the whole namespace @code{cln}. Then comes the function declaration. The argument is an @code{int}, the result an integer. The return type is defined as @samp{const cl_I}, not simply @samp{cl_I}, because that allows the compiler to detect typos like @samp{fibonacci(n) = 100}. It would be possible to declare the return type as @code{const cl_R} (real number) or even @code{const cl_N} (complex number). We use the most specialized possible return type because functions which call @samp{fibonacci} will be able to profit from the compiler's type analysis: Adding two integers is slightly more efficient than adding the same objects declared as complex numbers, because it needs less type dispatch. Also, when linking to CLN as a non-shared library, this minimizes the size of the resulting executable program. The result will be computed as expt(phi,n)/sqrt(5), rounded to the nearest integer. In order to get a correct result, the absolute error should be less than 1/2, i.e. the relative error should be less than sqrt(5)/(2*expt(phi,n)). To this end, the first line computes a floating point precision for sqrt(5) and phi. Then sqrt(5) is computed by first converting the integer 5 to a floating point number and than taking the square root. The converse, first taking the square root of 5, and then converting to the desired precision, would not work in CLN: The square root would be computed to a default precision (normally single-float precision), and the following conversion could not help about the lacking accuracy. This is because CLN is not a symbolic computer algebra system and does not represent sqrt(5) in a non-numeric way. The type @code{cl_R} for sqrt5 and, in the following line, phi is the only possible choice. You cannot write @code{cl_F} because the C++ compiler can only infer that @code{cl_float(5,prec)} is a real number. You cannot write @code{cl_N} because a @samp{round1} does not exist for general complex numbers. When the function returns, all the local variables in the function are automatically reclaimed (garbage collected). Only the result survives and gets passed to the caller. The file @code{fibonacci.cc} in the subdirectory @code{examples} contains this implementation together with an even faster algorithm. @node Debugging support @section Debugging support @cindex debugging When debugging a CLN application with GNU @code{gdb}, two facilities are available from the library: @itemize @bullet @item The library does type checks, range checks, consistency checks at many places. When one of these fails, an exception of a type derived from @code{runtime_exception} is thrown. When an exception is cought, the stack has already been unwound, so it is may not be possible to tell at which point the exception was thrown. For debugging, it is best to set up a catchpoint at the event of throwning a C++ exception: @example (gdb) catch throw @end example When this catchpoint is hit, look at the stack's backtrace: @example (gdb) where @end example When control over the type of exception is required, it may be possible to set a breakpoint at the @code{g++} runtime library function @code{__raise_exception}. Refer to the documentation of GNU @code{gdb} for details. @item The debugger's normal @code{print} command doesn't know about CLN's types and therefore prints mostly useless hexadecimal addresses. CLN offers a function @code{cl_print}, callable from the debugger, for printing number objects. In order to get this function, you have to define the macro @samp{CL_DEBUG} and then include all the header files for which you want @code{cl_print} debugging support. For example: @cindex @code{CL_DEBUG} @example #define CL_DEBUG #include @end example Now, if you have in your program a variable @code{cl_string s}, and inspect it under @code{gdb}, the output may look like this: @example (gdb) print s $7 = @{ = @{ = @{pointer = 0x8055b60, heappointer = 0x8055b60, word = 134568800@}@}, @} (gdb) call cl_print(s) (cl_string) "" $8 = 134568800 @end example Note that the output of @code{cl_print} goes to the program's error output, not to gdb's standard output. Note, however, that the above facility does not work with all CLN types, only with number objects and similar. Therefore CLN offers a member function @code{debug_print()} on all CLN types. The same macro @samp{CL_DEBUG} is needed for this member function to be implemented. Under @code{gdb}, you call it like this: @cindex @code{debug_print ()} @example (gdb) print s $7 = @{ = @{ = @{pointer = 0x8055b60, heappointer = 0x8055b60, word = 134568800@}@}, @} (gdb) call s.debug_print() (cl_string) "" (gdb) define cprint >call ($1).debug_print() >end (gdb) cprint s (cl_string) "" @end example Unfortunately, this feature does not seem to work under all circumstances. @end itemize @node Reporting Problems @section Reporting Problems @cindex bugreports @cindex mailing list If you encounter any problem, please don't hesitate to send a detailed bugreport to the @code{cln-list@@ginac.de} mailing list. Please think about your bug: consider including a short description of your operating system and compilation environment with corresponding version numbers. A description of your configuration options may also be helpful. Also, a short test program together with the output you get and the output you expect will help us to reproduce it quickly. Finally, do not forget to report the version number of CLN. @node Customizing @chapter Customizing @cindex customizing @menu * Error handling:: * Floating-point underflow:: * Customizing I/O:: * Customizing the memory allocator:: @end menu @node Error handling @section Error handling @cindex exception @cindex error handling @cindex @code{runtime_exception} CLN signals abnormal situations by throwning exceptions. All exceptions thrown by the library are of type @code{runtime_exception} or of a derived type. Class @code{cln::runtime_exception} in turn is derived from the C++ standard library class @code{std::runtime_error} and inherits the @code{.what()} member function that can be used to query details about the cause of error. The most important classes thrown by the library are @cindex @code{floating_point_exception} @cindex @code{read_number_exception} @example Exception base class runtime_exception | +----------------+----------------+ | | Malformed number input Floating-point error read_number_exception floating_poing_exception @end example CLN has many more exception classes that allow for more fine-grained control but I refrain from documenting them all here. They are all declared in the public header files and they are all subclasses of the above exceptions, so catching those you are always on the safe side. @node Floating-point underflow @section Floating-point underflow @cindex underflow @cindex @code{floating_point_underflow_exception} Floating point underflow denotes the situation when a floating-point number is to be created which is so close to @code{0} that its exponent is too low to be represented internally. By default, this causes the exception @code{floating_point_underflow_exception} (subclass of @code{floating_point_exception}) to be thrown. If you set the global variable @example bool cl_inhibit_floating_point_underflow @end example to @code{true}, the exception will be inhibited, and a floating-point zero will be generated instead. The default value of @code{cl_inhibit_floating_point_underflow} is @code{false}. @node Customizing I/O @section Customizing I/O The output of the function @code{fprint} may be customized by changing the value of the global variable @code{default_print_flags}. @cindex @code{default_print_flags} @node Customizing the memory allocator @section Customizing the memory allocator Every memory allocation of CLN is done through the function pointer @code{malloc_hook}. Freeing of this memory is done through the function pointer @code{free_hook}. The default versions of these functions, provided in the library, call @code{malloc} and @code{free} and check the @code{malloc} result against @code{NULL}. If you want to provide another memory allocator, you need to define the variables @code{malloc_hook} and @code{free_hook} yourself, like this: @example #include namespace cln @{ void* (*malloc_hook) (size_t size) = @dots{}; void (*free_hook) (void* ptr) = @dots{}; @} @end example @cindex @code{malloc_hook ()} @cindex @code{free_hook ()} The @code{cl_malloc_hook} function must not return a @code{NULL} pointer. It is not possible to change the memory allocator at runtime, because it is already called at program startup by the constructors of some global variables. @c Indices @node Index, , Customizing, Top @unnumbered Index @printindex my @bye cln-1.3.3/doc/cln.info0000644000000000000000000047606012172605326011377 0ustar This is cln.info, produced by makeinfo version 5.1 from cln.texi. INFO-DIR-SECTION Mathematics START-INFO-DIR-ENTRY * CLN: (cln). Class Library for Numbers (C++). END-INFO-DIR-ENTRY  File: cln.info, Node: Top, Next: Introduction, Up: (dir) CLN *** This manual documents CLN, a Class Library for Numbers. Published by Bruno Haible, '' and Richard B. Kreckel, ''. Copyright (C) Bruno Haible 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008. Copyright (C) Richard B. Kreckel 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013. Copyright (C) Alexei Sheplyakov 2008, 2010. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the author. * Menu: * Introduction:: * Installation:: * Ordinary number types:: * Functions on numbers:: * Input/Output:: * Rings:: * Modular integers:: * Symbolic data types:: * Univariate polynomials:: * Internals:: * Using the library:: * Customizing:: * Index:: -- The Detailed Node Listing -- Installation * Prerequisites:: * Building the library:: * Installing the library:: * Cleaning up:: Prerequisites * C++ compiler:: * Make utility:: * Sed utility:: Building the library * Using the GNU MP Library:: Ordinary number types * Exact numbers:: * Floating-point numbers:: * Complex numbers:: * Conversions:: Functions on numbers * Constructing numbers:: * Elementary functions:: * Elementary rational functions:: * Elementary complex functions:: * Comparisons:: * Rounding functions:: * Roots:: * Transcendental functions:: * Functions on integers:: * Functions on floating-point numbers:: * Conversion functions:: * Random number generators:: * Modifying operators:: Constructing numbers * Constructing integers:: * Constructing rational numbers:: * Constructing floating-point numbers:: * Constructing complex numbers:: Transcendental functions * Exponential and logarithmic functions:: * Trigonometric functions:: * Hyperbolic functions:: * Euler gamma:: * Riemann zeta:: Functions on integers * Logical functions:: * Number theoretic functions:: * Combinatorial functions:: Conversion functions * Conversion to floating-point numbers:: * Conversion to rational numbers:: Input/Output * Internal and printed representation:: * Input functions:: * Output functions:: Modular integers * Modular integer rings:: * Functions on modular integers:: Symbolic data types * Strings:: * Symbols:: Univariate polynomials * Univariate polynomial rings:: * Functions on univariate polynomials:: * Special polynomials:: Internals * Why C++ ?:: * Memory efficiency:: * Speed efficiency:: * Garbage collection:: Using the library * Compiler options:: * Include files:: * An Example:: * Debugging support:: * Reporting Problems:: Customizing * Error handling:: * Floating-point underflow:: * Customizing I/O:: * Customizing the memory allocator::  File: cln.info, Node: Introduction, Next: Installation, Prev: Top, Up: Top 1 Introduction ************** CLN is a library for computations with all kinds of numbers. It has a rich set of number classes: * Integers (with unlimited precision), * Rational numbers, * Floating-point numbers: - Short float, - Single float, - Double float, - Long float (with unlimited precision), * Complex numbers, * Modular integers (integers modulo a fixed integer), * Univariate polynomials. The subtypes of the complex numbers among these are exactly the types of numbers known to the Common Lisp language. Therefore 'CLN' can be used for Common Lisp implementations, giving 'CLN' another meaning: it becomes an abbreviation of "Common Lisp Numbers". The CLN package implements * Elementary functions ('+', '-', '*', '/', 'sqrt', comparisons, ...), * Logical functions (logical 'and', 'or', 'not', ...), * Transcendental functions (exponential, logarithmic, trigonometric, hyperbolic functions and their inverse functions). CLN is a C++ library. Using C++ as an implementation language provides * efficiency: it compiles to machine code, * type safety: the C++ compiler knows about the number types and complains if, for example, you try to assign a float to an integer variable. * algebraic syntax: You can use the '+', '-', '*', '=', '==', ... operators as in C or C++. CLN is memory efficient: * Small integers and short floats are immediate, not heap allocated. * Heap-allocated memory is reclaimed through an automatic, non-interruptive garbage collection. CLN is speed efficient: * The kernel of CLN has been written in assembly language for some CPUs ('i386', 'm68k', 'sparc', 'mips', 'arm'). * On all CPUs, CLN may be configured to use the superefficient low-level routines from GNU GMP version 3. * It uses Karatsuba multiplication, which is significantly faster for large numbers than the standard multiplication algorithm. * For very large numbers (more than 12000 decimal digits), it uses Schoenhage-Strassen multiplication, which is an asymptotically optimal multiplication algorithm, for multiplication, division and radix conversion. * It uses binary splitting for fast evaluation of series of rational numbers as they occur in the evaluation of elementary functions and some constants. CLN aims at being easily integrated into larger software packages: * The garbage collection imposes no burden on the main application. * The library provides hooks for memory allocation and throws exceptions in case of errors. * All non-macro identifiers are hidden in namespace 'cln' in order to avoid name clashes.  File: cln.info, Node: Installation, Next: Ordinary number types, Prev: Introduction, Up: Top 2 Installation ************** This section describes how to install the CLN package on your system. * Menu: * Prerequisites:: * Building the library:: * Installing the library:: * Cleaning up::  File: cln.info, Node: Prerequisites, Next: Building the library, Prev: Installation, Up: Installation 2.1 Prerequisites ================= * Menu: * C++ compiler:: * Make utility:: * Sed utility::  File: cln.info, Node: C++ compiler, Next: Make utility, Up: Prerequisites 2.1.1 C++ compiler ------------------ To build CLN, you need a C++ compiler. GNU 'g++ 4.0.0' or newer is recommended. The following C++ features are used: classes, member functions, overloading of functions and operators, constructors and destructors, inline, const, multiple inheritance, templates and namespaces. The following C++ features are not used: 'new', 'delete', virtual inheritance. CLN relies on semi-automatic ordering of initializations of static and global variables, a feature which I could implement for GNU g++ only. Also, it is not known whether this semi-automatic ordering works on all platforms when a non-GNU assembler is being used.  File: cln.info, Node: Make utility, Next: Sed utility, Prev: C++ compiler, Up: Prerequisites 2.1.2 Make utility ------------------ To build CLN, you also need to have GNU 'make' installed.  File: cln.info, Node: Sed utility, Prev: Make utility, Up: Prerequisites 2.1.3 Sed utility ----------------- To build CLN on HP-UX, you also need to have GNU 'sed' installed. This is because the libtool script, which creates the CLN library, relies on 'sed', and the vendor's 'sed' utility on these systems is too limited.  File: cln.info, Node: Building the library, Next: Installing the library, Prev: Prerequisites, Up: Installation 2.2 Building the library ======================== As with any autoconfiguring GNU software, installation is as easy as this: $ ./configure $ make $ make check If on your system, 'make' is not GNU 'make', you have to use 'gmake' instead of 'make' above. The 'configure' command checks out some features of your system and C++ compiler and builds the 'Makefile's. The 'make' command builds the library. This step may take about half an hour on an average workstation. The 'make check' runs some test to check that no important subroutine has been miscompiled. The 'configure' command accepts options. To get a summary of them, try $ ./configure --help Some of the options are explained in detail in the 'INSTALL.generic' file. You can specify the C compiler, the C++ compiler and their options through the following environment variables when running 'configure': 'CC' Specifies the C compiler. 'CFLAGS' Flags to be given to the C compiler when compiling programs (not when linking). 'CXX' Specifies the C++ compiler. 'CXXFLAGS' Flags to be given to the C++ compiler when compiling programs (not when linking). 'CPPFLAGS' Flags to be given to the C/C++ preprocessor. 'LDFLAGS' Flags to be given to the linker. Examples: $ CC="gcc" CFLAGS="-O" CXX="g++" CXXFLAGS="-O" ./configure $ CC="gcc -V 3.2.3" CFLAGS="-O2 -finline-limit=1000" \ CXX="g++ -V 3.2.3" CXXFLAGS="-O2 -finline-limit=1000" \ CPPFLAGS="-DNO_ASM" ./configure $ CC="gcc-4.2" CFLAGS="-O2" CXX="g++-4.2" CXXFLAGS="-O2" ./configure Note that for these environment variables to take effect, you have to set them (assuming a Bourne-compatible shell) on the same line as the 'configure' command. If you made the settings in earlier shell commands, you have to 'export' the environment variables before calling 'configure'. In a 'csh' shell, you have to use the 'setenv' command for setting each of the environment variables. Currently CLN works only with the GNU 'g++' compiler, and only in optimizing mode. So you should specify at least '-O' in the CXXFLAGS, or no CXXFLAGS at all. If CXXFLAGS is not set, CLN will be compiled with '-O'. The assembler language kernel can be turned off by specifying '-DNO_ASM' in the CPPFLAGS. If 'make check' reports any problems, you may try to clean up (see *note Cleaning up::) and configure and compile again, this time with '-DNO_ASM'. If you use 'g++' 3.2.x or earlier, I recommend adding '-finline-limit=1000' to the CXXFLAGS. This is essential for good code. If you use 'g++' from gcc-3.0.4 or older on Sparc, add either '-O', '-O1' or '-O2 -fno-schedule-insns' to the CXXFLAGS. With full '-O2', 'g++' miscompiles the division routines. Also, do not use gcc-3.0 on Sparc for compiling CLN, it won't work at all. Also, please do not compile CLN with 'g++' using the '-O3' optimization level. This leads to inferior code quality. Some newer versions of 'g++' require quite an amount of memory. You might need some swap space if your machine doesn't have 512 MB of RAM. By default, both a shared and a static library are built. You can build CLN as a static (or shared) library only, by calling 'configure' with the option '--disable-shared' (or '--disable-static'). While shared libraries are usually more convenient to use, they may not work on all architectures. Try disabling them if you run into linker problems. Also, they are generally slightly slower than static libraries so runtime-critical applications should be linked statically. * Menu: * Using the GNU MP Library::  File: cln.info, Node: Using the GNU MP Library, Up: Building the library 2.2.1 Using the GNU MP Library ------------------------------ CLN may be configured to make use of a preinstalled 'gmp' library for some low-level routines. Please make sure that you have at least 'gmp' version 3.0 installed since earlier versions are unsupported and likely not to work. Using 'gmp' is known to be quite a boost for CLN's performance. By default, CLN will autodetect 'gmp' and use it. If you do not want CLN to make use of a preinstalled 'gmp' library, then you can explicitly specify so by calling 'configure' with the option '--without-gmp'. If you have installed the 'gmp' library and its header files in some place where the compiler cannot find it by default, you must help 'configure' and specify the prefix that was used when 'gmp' was configured. Here is an example: $ ./configure --with-gmp=/opt/gmp-4.2.2 This assumes that the 'gmp' header files have been installed in '/opt/gmp-4.2.2/include/' and the library in '/opt/gmp-4.2.2/lib/'. More uncommon GMP installations can be handled by setting CPPFLAGS and LDFLAGS appropriately prior to running 'configure'.  File: cln.info, Node: Installing the library, Next: Cleaning up, Prev: Building the library, Up: Installation 2.3 Installing the library ========================== As with any autoconfiguring GNU software, installation is as easy as this: $ make install The 'make install' command installs the library and the include files into public places ('/usr/local/lib/' and '/usr/local/include/', if you haven't specified a '--prefix' option to 'configure'). This step may require superuser privileges. If you have already built the library and wish to install it, but didn't specify '--prefix=...' at configure time, just re-run 'configure', giving it the same options as the first time, plus the '--prefix=...' option.  File: cln.info, Node: Cleaning up, Prev: Installing the library, Up: Installation 2.4 Cleaning up =============== You can remove system-dependent files generated by 'make' through $ make clean You can remove all files generated by 'make', thus reverting to a virgin distribution of CLN, through $ make distclean  File: cln.info, Node: Ordinary number types, Next: Functions on numbers, Prev: Installation, Up: Top 3 Ordinary number types *********************** CLN implements the following class hierarchy: Number cl_number | | Real or complex number cl_N | | Real number cl_R | +-------------------+-------------------+ | | Rational number Floating-point number cl_RA cl_F | | | +--------------+--------------+--------------+ Integer | | | | cl_I Short-Float Single-Float Double-Float Long-Float cl_SF cl_FF cl_DF cl_LF The base class 'cl_number' is an abstract base class. It is not useful to declare a variable of this type except if you want to completely disable compile-time type checking and use run-time type checking instead. The class 'cl_N' comprises real and complex numbers. There is no special class for complex numbers since complex numbers with imaginary part '0' are automatically converted to real numbers. The class 'cl_R' comprises real numbers of different kinds. It is an abstract class. The class 'cl_RA' comprises exact real numbers: rational numbers, including integers. There is no special class for non-integral rational numbers since rational numbers with denominator '1' are automatically converted to integers. The class 'cl_F' implements floating-point approximations to real numbers. It is an abstract class. * Menu: * Exact numbers:: * Floating-point numbers:: * Complex numbers:: * Conversions::  File: cln.info, Node: Exact numbers, Next: Floating-point numbers, Up: Ordinary number types 3.1 Exact numbers ================= Some numbers are represented as exact numbers: there is no loss of information when such a number is converted from its mathematical value to its internal representation. On exact numbers, the elementary operations ('+', '-', '*', '/', comparisons, ...) compute the completely correct result. In CLN, the exact numbers are: * rational numbers (including integers), * complex numbers whose real and imaginary parts are both rational numbers. Rational numbers are always normalized to the form 'NUMERATOR/DENOMINATOR' where the numerator and denominator are coprime integers and the denominator is positive. If the resulting denominator is '1', the rational number is converted to an integer. Small integers (typically in the range '-2^29'...'2^29-1', for 32-bit machines) are especially efficient, because they consume no heap allocation. Otherwise the distinction between these immediate integers (called "fixnums") and heap allocated integers (called "bignums") is completely transparent.  File: cln.info, Node: Floating-point numbers, Next: Complex numbers, Prev: Exact numbers, Up: Ordinary number types 3.2 Floating-point numbers ========================== Not all real numbers can be represented exactly. (There is an easy mathematical proof for this: Only a countable set of numbers can be stored exactly in a computer, even if one assumes that it has unlimited storage. But there are uncountably many real numbers.) So some approximation is needed. CLN implements ordinary floating-point numbers, with mantissa and exponent. The elementary operations ('+', '-', '*', '/', ...) only return approximate results. For example, the value of the expression '(cl_F) 0.3 + (cl_F) 0.4' prints as '0.70000005', not as '0.7'. Rounding errors like this one are inevitable when computing with floating-point numbers. Nevertheless, CLN rounds the floating-point results of the operations '+', '-', '*', '/', 'sqrt' according to the "round-to-even" rule: It first computes the exact mathematical result and then returns the floating-point number which is nearest to this. If two floating-point numbers are equally distant from the ideal result, the one with a '0' in its least significant mantissa bit is chosen. Similarly, testing floating point numbers for equality 'x == y' is gambling with random errors. Better check for 'abs(x - y) < epsilon' for some well-chosen 'epsilon'. Floating point numbers come in four flavors: * Short floats, type 'cl_SF'. They have 1 sign bit, 8 exponent bits (including the exponent's sign), and 17 mantissa bits (including the "hidden" bit). They don't consume heap allocation. * Single floats, type 'cl_FF'. They have 1 sign bit, 8 exponent bits (including the exponent's sign), and 24 mantissa bits (including the "hidden" bit). In CLN, they are represented as IEEE single-precision floating point numbers. This corresponds closely to the C/C++ type 'float'. * Double floats, type 'cl_DF'. They have 1 sign bit, 11 exponent bits (including the exponent's sign), and 53 mantissa bits (including the "hidden" bit). In CLN, they are represented as IEEE double-precision floating point numbers. This corresponds closely to the C/C++ type 'double'. * Long floats, type 'cl_LF'. They have 1 sign bit, 32 exponent bits (including the exponent's sign), and n mantissa bits (including the "hidden" bit), where n >= 64. The precision of a long float is unlimited, but once created, a long float has a fixed precision. (No "lazy recomputation".) Of course, computations with long floats are more expensive than those with smaller floating-point formats. CLN does not implement features like NaNs, denormalized numbers and gradual underflow. If the exponent range of some floating-point type is too limited for your application, choose another floating-point type with larger exponent range. As a user of CLN, you can forget about the differences between the four floating-point types and just declare all your floating-point variables as being of type 'cl_F'. This has the advantage that when you change the precision of some computation (say, from 'cl_DF' to 'cl_LF'), you don't have to change the code, only the precision of the initial values. Also, many transcendental functions have been declared as returning a 'cl_F' when the argument is a 'cl_F', but such declarations are missing for the types 'cl_SF', 'cl_FF', 'cl_DF', 'cl_LF'. (Such declarations would be wrong if the floating point contagion rule happened to change in the future.)  File: cln.info, Node: Complex numbers, Next: Conversions, Prev: Floating-point numbers, Up: Ordinary number types 3.3 Complex numbers =================== Complex numbers, as implemented by the class 'cl_N', have a real part and an imaginary part, both real numbers. A complex number whose imaginary part is the exact number '0' is automatically converted to a real number. Complex numbers can arise from real numbers alone, for example through application of 'sqrt' or transcendental functions.  File: cln.info, Node: Conversions, Prev: Complex numbers, Up: Ordinary number types 3.4 Conversions =============== Conversions from any class to any its superclasses ("base classes" in C++ terminology) is done automatically. Conversions from the C built-in types 'long' and 'unsigned long' are provided for the classes 'cl_I', 'cl_RA', 'cl_R', 'cl_N' and 'cl_number'. Conversions from the C built-in types 'int' and 'unsigned int' are provided for the classes 'cl_I', 'cl_RA', 'cl_R', 'cl_N' and 'cl_number'. However, these conversions emphasize efficiency. On 32-bit systems, their range is therefore limited: - The conversion from 'int' works only if the argument is < 2^29 and >= -2^29. - The conversion from 'unsigned int' works only if the argument is < 2^29. In a declaration like 'cl_I x = 10;' the C++ compiler is able to do the conversion of '10' from 'int' to 'cl_I' at compile time already. On the other hand, code like 'cl_I x = 1000000000;' is in error on 32-bit machines. So, if you want to be sure that an 'int' whose magnitude is not guaranteed to be < 2^29 is correctly converted to a 'cl_I', first convert it to a 'long'. Similarly, if a large 'unsigned int' is to be converted to a 'cl_I', first convert it to an 'unsigned long'. On 64-bit machines there is no such restriction. There, conversions from arbitrary 32-bit 'int' values always works correctly. Conversions from the C built-in type 'float' are provided for the classes 'cl_FF', 'cl_F', 'cl_R', 'cl_N' and 'cl_number'. Conversions from the C built-in type 'double' are provided for the classes 'cl_DF', 'cl_F', 'cl_R', 'cl_N' and 'cl_number'. Conversions from 'const char *' are provided for the classes 'cl_I', 'cl_RA', 'cl_SF', 'cl_FF', 'cl_DF', 'cl_LF', 'cl_F', 'cl_R', 'cl_N'. The easiest way to specify a value which is outside of the range of the C++ built-in types is therefore to specify it as a string, like this: cl_I order_of_rubiks_cube_group = "43252003274489856000"; Note that this conversion is done at runtime, not at compile-time. Conversions from 'cl_I' to the C built-in types 'int', 'unsigned int', 'long', 'unsigned long' are provided through the functions 'int cl_I_to_int (const cl_I& x)' 'unsigned int cl_I_to_uint (const cl_I& x)' 'long cl_I_to_long (const cl_I& x)' 'unsigned long cl_I_to_ulong (const cl_I& x)' Returns 'x' as element of the C type CTYPE. If 'x' is not representable in the range of CTYPE, a runtime error occurs. Conversions from the classes 'cl_I', 'cl_RA', 'cl_SF', 'cl_FF', 'cl_DF', 'cl_LF', 'cl_F' and 'cl_R' to the C built-in types 'float' and 'double' are provided through the functions 'float float_approx (const TYPE& x)' 'double double_approx (const TYPE& x)' Returns an approximation of 'x' of C type CTYPE. If 'abs(x)' is too close to 0 (underflow), 0 is returned. If 'abs(x)' is too large (overflow), an IEEE infinity is returned. Conversions from any class to any of its subclasses ("derived classes" in C++ terminology) are not provided. Instead, you can assert and check that a value belongs to a certain subclass, and return it as element of that class, using the 'As' and 'The' macros. 'As(TYPE)(VALUE)' checks that VALUE belongs to TYPE and returns it as such. 'The(TYPE)(VALUE)' assumes that VALUE belongs to TYPE and returns it as such. It is your responsibility to ensure that this assumption is valid. Since macros and namespaces don't go together well, there is an equivalent to 'The': the template 'the'. Example: cl_I x = ...; if (!(x >= 0)) abort(); cl_I ten_x_a = The(cl_I)(expt(10,x)); // If x >= 0, 10^x is an integer. // In general, it would be a rational number. cl_I ten_x_b = the(expt(10,x)); // The same as above.  File: cln.info, Node: Functions on numbers, Next: Input/Output, Prev: Ordinary number types, Up: Top 4 Functions on numbers ********************** Each of the number classes declares its mathematical operations in the corresponding include file. For example, if your code operates with objects of type 'cl_I', it should '#include '. * Menu: * Constructing numbers:: * Elementary functions:: * Elementary rational functions:: * Elementary complex functions:: * Comparisons:: * Rounding functions:: * Roots:: * Transcendental functions:: * Functions on integers:: * Functions on floating-point numbers:: * Conversion functions:: * Random number generators:: * Modifying operators::  File: cln.info, Node: Constructing numbers, Next: Elementary functions, Up: Functions on numbers 4.1 Constructing numbers ======================== Here is how to create number objects "from nothing". * Menu: * Constructing integers:: * Constructing rational numbers:: * Constructing floating-point numbers:: * Constructing complex numbers::  File: cln.info, Node: Constructing integers, Next: Constructing rational numbers, Up: Constructing numbers 4.1.1 Constructing integers --------------------------- 'cl_I' objects are most easily constructed from C integers and from strings. See *note Conversions::.  File: cln.info, Node: Constructing rational numbers, Next: Constructing floating-point numbers, Prev: Constructing integers, Up: Constructing numbers 4.1.2 Constructing rational numbers ----------------------------------- 'cl_RA' objects can be constructed from strings. The syntax for rational numbers is described in *note Internal and printed representation::. Another standard way to produce a rational number is through application of 'operator /' or 'recip' on integers.  File: cln.info, Node: Constructing floating-point numbers, Next: Constructing complex numbers, Prev: Constructing rational numbers, Up: Constructing numbers 4.1.3 Constructing floating-point numbers ----------------------------------------- 'cl_F' objects with low precision are most easily constructed from C 'float' and 'double'. See *note Conversions::. To construct a 'cl_F' with high precision, you can use the conversion from 'const char *', but you have to specify the desired precision within the string. (See *note Internal and printed representation::.) Example: cl_F e = "0.271828182845904523536028747135266249775724709369996e+1_40"; will set 'e' to the given value, with a precision of 40 decimal digits. The programmatic way to construct a 'cl_F' with high precision is through the 'cl_float' conversion function, see *note Conversion to floating-point numbers::. For example, to compute 'e' to 40 decimal places, first construct 1.0 to 40 decimal places and then apply the exponential function: float_format_t precision = float_format(40); cl_F e = exp(cl_float(1,precision));  File: cln.info, Node: Constructing complex numbers, Prev: Constructing floating-point numbers, Up: Constructing numbers 4.1.4 Constructing complex numbers ---------------------------------- Non-real 'cl_N' objects are normally constructed through the function cl_N complex (const cl_R& realpart, const cl_R& imagpart) See *note Elementary complex functions::.  File: cln.info, Node: Elementary functions, Next: Elementary rational functions, Prev: Constructing numbers, Up: Functions on numbers 4.2 Elementary functions ======================== Each of the classes 'cl_N', 'cl_R', 'cl_RA', 'cl_I', 'cl_F', 'cl_SF', 'cl_FF', 'cl_DF', 'cl_LF' defines the following operations: 'TYPE operator + (const TYPE&, const TYPE&)' Addition. 'TYPE operator - (const TYPE&, const TYPE&)' Subtraction. 'TYPE operator - (const TYPE&)' Returns the negative of the argument. 'TYPE plus1 (const TYPE& x)' Returns 'x + 1'. 'TYPE minus1 (const TYPE& x)' Returns 'x - 1'. 'TYPE operator * (const TYPE&, const TYPE&)' Multiplication. 'TYPE square (const TYPE& x)' Returns 'x * x'. Each of the classes 'cl_N', 'cl_R', 'cl_RA', 'cl_F', 'cl_SF', 'cl_FF', 'cl_DF', 'cl_LF' defines the following operations: 'TYPE operator / (const TYPE&, const TYPE&)' Division. 'TYPE recip (const TYPE&)' Returns the reciprocal of the argument. The class 'cl_I' doesn't define a '/' operation because in the C/C++ language this operator, applied to integral types, denotes the 'floor' or 'truncate' operation (which one of these, is implementation dependent). (*Note Rounding functions::.) Instead, 'cl_I' defines an "exact quotient" function: 'cl_I exquo (const cl_I& x, const cl_I& y)' Checks that 'y' divides 'x', and returns the quotient 'x'/'y'. The following exponentiation functions are defined: 'cl_I expt_pos (const cl_I& x, const cl_I& y)' 'cl_RA expt_pos (const cl_RA& x, const cl_I& y)' 'y' must be > 0. Returns 'x^y'. 'cl_RA expt (const cl_RA& x, const cl_I& y)' 'cl_R expt (const cl_R& x, const cl_I& y)' 'cl_N expt (const cl_N& x, const cl_I& y)' Returns 'x^y'. Each of the classes 'cl_R', 'cl_RA', 'cl_I', 'cl_F', 'cl_SF', 'cl_FF', 'cl_DF', 'cl_LF' defines the following operation: 'TYPE abs (const TYPE& x)' Returns the absolute value of 'x'. This is 'x' if 'x >= 0', and '-x' if 'x <= 0'. The class 'cl_N' implements this as follows: 'cl_R abs (const cl_N x)' Returns the absolute value of 'x'. Each of the classes 'cl_N', 'cl_R', 'cl_RA', 'cl_I', 'cl_F', 'cl_SF', 'cl_FF', 'cl_DF', 'cl_LF' defines the following operation: 'TYPE signum (const TYPE& x)' Returns the sign of 'x', in the same number format as 'x'. This is defined as 'x / abs(x)' if 'x' is non-zero, and 'x' if 'x' is zero. If 'x' is real, the value is either 0 or 1 or -1.  File: cln.info, Node: Elementary rational functions, Next: Elementary complex functions, Prev: Elementary functions, Up: Functions on numbers 4.3 Elementary rational functions ================================= Each of the classes 'cl_RA', 'cl_I' defines the following operations: 'cl_I numerator (const TYPE& x)' Returns the numerator of 'x'. 'cl_I denominator (const TYPE& x)' Returns the denominator of 'x'. The numerator and denominator of a rational number are normalized in such a way that they have no factor in common and the denominator is positive.  File: cln.info, Node: Elementary complex functions, Next: Comparisons, Prev: Elementary rational functions, Up: Functions on numbers 4.4 Elementary complex functions ================================ The class 'cl_N' defines the following operation: 'cl_N complex (const cl_R& a, const cl_R& b)' Returns the complex number 'a+bi', that is, the complex number with real part 'a' and imaginary part 'b'. Each of the classes 'cl_N', 'cl_R' defines the following operations: 'cl_R realpart (const TYPE& x)' Returns the real part of 'x'. 'cl_R imagpart (const TYPE& x)' Returns the imaginary part of 'x'. 'TYPE conjugate (const TYPE& x)' Returns the complex conjugate of 'x'. We have the relations 'x = complex(realpart(x), imagpart(x))' 'conjugate(x) = complex(realpart(x), -imagpart(x))'  File: cln.info, Node: Comparisons, Next: Rounding functions, Prev: Elementary complex functions, Up: Functions on numbers 4.5 Comparisons =============== Each of the classes 'cl_N', 'cl_R', 'cl_RA', 'cl_I', 'cl_F', 'cl_SF', 'cl_FF', 'cl_DF', 'cl_LF' defines the following operations: 'bool operator == (const TYPE&, const TYPE&)' 'bool operator != (const TYPE&, const TYPE&)' Comparison, as in C and C++. 'uint32 equal_hashcode (const TYPE&)' Returns a 32-bit hash code that is the same for any two numbers which are the same according to '=='. This hash code depends on the number's value, not its type or precision. 'bool zerop (const TYPE& x)' Compare against zero: 'x == 0' Each of the classes 'cl_R', 'cl_RA', 'cl_I', 'cl_F', 'cl_SF', 'cl_FF', 'cl_DF', 'cl_LF' defines the following operations: 'cl_signean compare (const TYPE& x, const TYPE& y)' Compares 'x' and 'y'. Returns +1 if 'x'>'y', -1 if 'x'<'y', 0 if 'x'='y'. 'bool operator <= (const TYPE&, const TYPE&)' 'bool operator < (const TYPE&, const TYPE&)' 'bool operator >= (const TYPE&, const TYPE&)' 'bool operator > (const TYPE&, const TYPE&)' Comparison, as in C and C++. 'bool minusp (const TYPE& x)' Compare against zero: 'x < 0' 'bool plusp (const TYPE& x)' Compare against zero: 'x > 0' 'TYPE max (const TYPE& x, const TYPE& y)' Return the maximum of 'x' and 'y'. 'TYPE min (const TYPE& x, const TYPE& y)' Return the minimum of 'x' and 'y'. When a floating point number and a rational number are compared, the float is first converted to a rational number using the function 'rational'. Since a floating point number actually represents an interval of real numbers, the result might be surprising. For example, '(cl_F)(cl_R)"1/3" == (cl_R)"1/3"' returns false because there is no floating point number whose value is exactly '1/3'.  File: cln.info, Node: Rounding functions, Next: Roots, Prev: Comparisons, Up: Functions on numbers 4.6 Rounding functions ====================== When a real number is to be converted to an integer, there is no "best" rounding. The desired rounding function depends on the application. The Common Lisp and ISO Lisp standards offer four rounding functions: 'floor(x)' This is the largest integer <='x'. 'ceiling(x)' This is the smallest integer >='x'. 'truncate(x)' Among the integers between 0 and 'x' (inclusive) the one nearest to 'x'. 'round(x)' The integer nearest to 'x'. If 'x' is exactly halfway between two integers, choose the even one. These functions have different advantages: 'floor' and 'ceiling' are translation invariant: 'floor(x+n) = floor(x) + n' and 'ceiling(x+n) = ceiling(x) + n' for every 'x' and every integer 'n'. On the other hand, 'truncate' and 'round' are symmetric: 'truncate(-x) = -truncate(x)' and 'round(-x) = -round(x)', and furthermore 'round' is unbiased: on the "average", it rounds down exactly as often as it rounds up. The functions are related like this: 'ceiling(m/n) = floor((m+n-1)/n) = floor((m-1)/n)+1' for rational numbers 'm/n' ('m', 'n' integers, 'n'>0), and 'truncate(x) = sign(x) * floor(abs(x))' Each of the classes 'cl_R', 'cl_RA', 'cl_F', 'cl_SF', 'cl_FF', 'cl_DF', 'cl_LF' defines the following operations: 'cl_I floor1 (const TYPE& x)' Returns 'floor(x)'. 'cl_I ceiling1 (const TYPE& x)' Returns 'ceiling(x)'. 'cl_I truncate1 (const TYPE& x)' Returns 'truncate(x)'. 'cl_I round1 (const TYPE& x)' Returns 'round(x)'. Each of the classes 'cl_R', 'cl_RA', 'cl_I', 'cl_F', 'cl_SF', 'cl_FF', 'cl_DF', 'cl_LF' defines the following operations: 'cl_I floor1 (const TYPE& x, const TYPE& y)' Returns 'floor(x/y)'. 'cl_I ceiling1 (const TYPE& x, const TYPE& y)' Returns 'ceiling(x/y)'. 'cl_I truncate1 (const TYPE& x, const TYPE& y)' Returns 'truncate(x/y)'. 'cl_I round1 (const TYPE& x, const TYPE& y)' Returns 'round(x/y)'. These functions are called 'floor1', ... here instead of 'floor', ..., because on some systems, system dependent include files define 'floor' and 'ceiling' as macros. In many cases, one needs both the quotient and the remainder of a division. It is more efficient to compute both at the same time than to perform two divisions, one for quotient and the next one for the remainder. The following functions therefore return a structure containing both the quotient and the remainder. The suffix '2' indicates the number of "return values". The remainder is defined as follows: * for the computation of 'quotient = floor(x)', 'remainder = x - quotient', * for the computation of 'quotient = floor(x,y)', 'remainder = x - quotient*y', and similarly for the other three operations. Each of the classes 'cl_R', 'cl_RA', 'cl_F', 'cl_SF', 'cl_FF', 'cl_DF', 'cl_LF' defines the following operations: 'struct TYPE_div_t { cl_I quotient; TYPE remainder; };' 'TYPE_div_t floor2 (const TYPE& x)' 'TYPE_div_t ceiling2 (const TYPE& x)' 'TYPE_div_t truncate2 (const TYPE& x)' 'TYPE_div_t round2 (const TYPE& x)' Each of the classes 'cl_R', 'cl_RA', 'cl_I', 'cl_F', 'cl_SF', 'cl_FF', 'cl_DF', 'cl_LF' defines the following operations: 'struct TYPE_div_t { cl_I quotient; TYPE remainder; };' 'TYPE_div_t floor2 (const TYPE& x, const TYPE& y)' 'TYPE_div_t ceiling2 (const TYPE& x, const TYPE& y)' 'TYPE_div_t truncate2 (const TYPE& x, const TYPE& y)' 'TYPE_div_t round2 (const TYPE& x, const TYPE& y)' Sometimes, one wants the quotient as a floating-point number (of the same format as the argument, if the argument is a float) instead of as an integer. The prefix 'f' indicates this. Each of the classes 'cl_F', 'cl_SF', 'cl_FF', 'cl_DF', 'cl_LF' defines the following operations: 'TYPE ffloor (const TYPE& x)' 'TYPE fceiling (const TYPE& x)' 'TYPE ftruncate (const TYPE& x)' 'TYPE fround (const TYPE& x)' and similarly for class 'cl_R', but with return type 'cl_F'. The class 'cl_R' defines the following operations: 'cl_F ffloor (const TYPE& x, const TYPE& y)' 'cl_F fceiling (const TYPE& x, const TYPE& y)' 'cl_F ftruncate (const TYPE& x, const TYPE& y)' 'cl_F fround (const TYPE& x, const TYPE& y)' These functions also exist in versions which return both the quotient and the remainder. The suffix '2' indicates this. Each of the classes 'cl_F', 'cl_SF', 'cl_FF', 'cl_DF', 'cl_LF' defines the following operations: 'struct TYPE_fdiv_t { TYPE quotient; TYPE remainder; };' 'TYPE_fdiv_t ffloor2 (const TYPE& x)' 'TYPE_fdiv_t fceiling2 (const TYPE& x)' 'TYPE_fdiv_t ftruncate2 (const TYPE& x)' 'TYPE_fdiv_t fround2 (const TYPE& x)' and similarly for class 'cl_R', but with quotient type 'cl_F'. The class 'cl_R' defines the following operations: 'struct TYPE_fdiv_t { cl_F quotient; cl_R remainder; };' 'TYPE_fdiv_t ffloor2 (const TYPE& x, const TYPE& y)' 'TYPE_fdiv_t fceiling2 (const TYPE& x, const TYPE& y)' 'TYPE_fdiv_t ftruncate2 (const TYPE& x, const TYPE& y)' 'TYPE_fdiv_t fround2 (const TYPE& x, const TYPE& y)' Other applications need only the remainder of a division. The remainder of 'floor' and 'ffloor' is called 'mod' (abbreviation of "modulo"). The remainder 'truncate' and 'ftruncate' is called 'rem' (abbreviation of "remainder"). * 'mod(x,y) = floor2(x,y).remainder = x - floor(x/y)*y' * 'rem(x,y) = truncate2(x,y).remainder = x - truncate(x/y)*y' If 'x' and 'y' are both >= 0, 'mod(x,y) = rem(x,y) >= 0'. In general, 'mod(x,y)' has the sign of 'y' or is zero, and 'rem(x,y)' has the sign of 'x' or is zero. The classes 'cl_R', 'cl_I' define the following operations: 'TYPE mod (const TYPE& x, const TYPE& y)' 'TYPE rem (const TYPE& x, const TYPE& y)'  File: cln.info, Node: Roots, Next: Transcendental functions, Prev: Rounding functions, Up: Functions on numbers 4.7 Roots ========= Each of the classes 'cl_R', 'cl_F', 'cl_SF', 'cl_FF', 'cl_DF', 'cl_LF' defines the following operation: 'TYPE sqrt (const TYPE& x)' 'x' must be >= 0. This function returns the square root of 'x', normalized to be >= 0. If 'x' is the square of a rational number, 'sqrt(x)' will be a rational number, else it will return a floating-point approximation. The classes 'cl_RA', 'cl_I' define the following operation: 'bool sqrtp (const TYPE& x, TYPE* root)' This tests whether 'x' is a perfect square. If so, it returns true and the exact square root in '*root', else it returns false. Furthermore, for integers, similarly: 'bool isqrt (const TYPE& x, TYPE* root)' 'x' should be >= 0. This function sets '*root' to 'floor(sqrt(x))' and returns the same value as 'sqrtp': the boolean value '(expt(*root,2) == x)'. For 'n'th roots, the classes 'cl_RA', 'cl_I' define the following operation: 'bool rootp (const TYPE& x, const cl_I& n, TYPE* root)' 'x' must be >= 0. 'n' must be > 0. This tests whether 'x' is an 'n'th power of a rational number. If so, it returns true and the exact root in '*root', else it returns false. The only square root function which accepts negative numbers is the one for class 'cl_N': 'cl_N sqrt (const cl_N& z)' Returns the square root of 'z', as defined by the formula 'sqrt(z) = exp(log(z)/2)'. Conversion to a floating-point type or to a complex number are done if necessary. The range of the result is the right half plane 'realpart(sqrt(z)) >= 0' including the positive imaginary axis and 0, but excluding the negative imaginary axis. The result is an exact number only if 'z' is an exact number.  File: cln.info, Node: Transcendental functions, Next: Functions on integers, Prev: Roots, Up: Functions on numbers 4.8 Transcendental functions ============================ The transcendental functions return an exact result if the argument is exact and the result is exact as well. Otherwise they must return inexact numbers even if the argument is exact. For example, 'cos(0) = 1' returns the rational number '1'. * Menu: * Exponential and logarithmic functions:: * Trigonometric functions:: * Hyperbolic functions:: * Euler gamma:: * Riemann zeta::  File: cln.info, Node: Exponential and logarithmic functions, Next: Trigonometric functions, Up: Transcendental functions 4.8.1 Exponential and logarithmic functions ------------------------------------------- 'cl_R exp (const cl_R& x)' 'cl_N exp (const cl_N& x)' Returns the exponential function of 'x'. This is 'e^x' where 'e' is the base of the natural logarithms. The range of the result is the entire complex plane excluding 0. 'cl_R ln (const cl_R& x)' 'x' must be > 0. Returns the (natural) logarithm of x. 'cl_N log (const cl_N& x)' Returns the (natural) logarithm of x. If 'x' is real and positive, this is 'ln(x)'. In general, 'log(x) = log(abs(x)) + i*phase(x)'. The range of the result is the strip in the complex plane '-pi < imagpart(log(x)) <= pi'. 'cl_R phase (const cl_N& x)' Returns the angle part of 'x' in its polar representation as a complex number. That is, 'phase(x) = atan(realpart(x),imagpart(x))'. This is also the imaginary part of 'log(x)'. The range of the result is the interval '-pi < phase(x) <= pi'. The result will be an exact number only if 'zerop(x)' or if 'x' is real and positive. 'cl_R log (const cl_R& a, const cl_R& b)' 'a' and 'b' must be > 0. Returns the logarithm of 'a' with respect to base 'b'. 'log(a,b) = ln(a)/ln(b)'. The result can be exact only if 'a = 1' or if 'a' and 'b' are both rational. 'cl_N log (const cl_N& a, const cl_N& b)' Returns the logarithm of 'a' with respect to base 'b'. 'log(a,b) = log(a)/log(b)'. 'cl_N expt (const cl_N& x, const cl_N& y)' Exponentiation: Returns 'x^y = exp(y*log(x))'. The constant e = exp(1) = 2.71828... is returned by the following functions: 'cl_F exp1 (float_format_t f)' Returns e as a float of format 'f'. 'cl_F exp1 (const cl_F& y)' Returns e in the float format of 'y'. 'cl_F exp1 (void)' Returns e as a float of format 'default_float_format'.  File: cln.info, Node: Trigonometric functions, Next: Hyperbolic functions, Prev: Exponential and logarithmic functions, Up: Transcendental functions 4.8.2 Trigonometric functions ----------------------------- 'cl_R sin (const cl_R& x)' Returns 'sin(x)'. The range of the result is the interval '-1 <= sin(x) <= 1'. 'cl_N sin (const cl_N& z)' Returns 'sin(z)'. The range of the result is the entire complex plane. 'cl_R cos (const cl_R& x)' Returns 'cos(x)'. The range of the result is the interval '-1 <= cos(x) <= 1'. 'cl_N cos (const cl_N& x)' Returns 'cos(z)'. The range of the result is the entire complex plane. 'struct cos_sin_t { cl_R cos; cl_R sin; };' 'cos_sin_t cos_sin (const cl_R& x)' Returns both 'sin(x)' and 'cos(x)'. This is more efficient than computing them separately. The relation 'cos^2 + sin^2 = 1' will hold only approximately. 'cl_R tan (const cl_R& x)' 'cl_N tan (const cl_N& x)' Returns 'tan(x) = sin(x)/cos(x)'. 'cl_N cis (const cl_R& x)' 'cl_N cis (const cl_N& x)' Returns 'exp(i*x)'. The name 'cis' means "cos + i sin", because 'e^(i*x) = cos(x) + i*sin(x)'. 'cl_N asin (const cl_N& z)' Returns 'arcsin(z)'. This is defined as 'arcsin(z) = log(iz+sqrt(1-z^2))/i' and satisfies 'arcsin(-z) = -arcsin(z)'. The range of the result is the strip in the complex domain '-pi/2 <= realpart(arcsin(z)) <= pi/2', excluding the numbers with 'realpart = -pi/2' and 'imagpart < 0' and the numbers with 'realpart = pi/2' and 'imagpart > 0'. 'cl_N acos (const cl_N& z)' Returns 'arccos(z)'. This is defined as 'arccos(z) = pi/2 - arcsin(z) = log(z+i*sqrt(1-z^2))/i' and satisfies 'arccos(-z) = pi - arccos(z)'. The range of the result is the strip in the complex domain '0 <= realpart(arcsin(z)) <= pi', excluding the numbers with 'realpart = 0' and 'imagpart < 0' and the numbers with 'realpart = pi' and 'imagpart > 0'. 'cl_R atan (const cl_R& x, const cl_R& y)' Returns the angle of the polar representation of the complex number 'x+iy'. This is 'atan(y/x)' if 'x>0'. The range of the result is the interval '-pi < atan(x,y) <= pi'. The result will be an exact number only if 'x > 0' and 'y' is the exact '0'. WARNING: In Common Lisp, this function is called as '(atan y x)', with reversed order of arguments. 'cl_R atan (const cl_R& x)' Returns 'arctan(x)'. This is the same as 'atan(1,x)'. The range of the result is the interval '-pi/2 < atan(x) < pi/2'. The result will be an exact number only if 'x' is the exact '0'. 'cl_N atan (const cl_N& z)' Returns 'arctan(z)'. This is defined as 'arctan(z) = (log(1+iz)-log(1-iz)) / 2i' and satisfies 'arctan(-z) = -arctan(z)'. The range of the result is the strip in the complex domain '-pi/2 <= realpart(arctan(z)) <= pi/2', excluding the numbers with 'realpart = -pi/2' and 'imagpart >= 0' and the numbers with 'realpart = pi/2' and 'imagpart <= 0'. Archimedes' constant pi = 3.14... is returned by the following functions: 'cl_F pi (float_format_t f)' Returns pi as a float of format 'f'. 'cl_F pi (const cl_F& y)' Returns pi in the float format of 'y'. 'cl_F pi (void)' Returns pi as a float of format 'default_float_format'.  File: cln.info, Node: Hyperbolic functions, Next: Euler gamma, Prev: Trigonometric functions, Up: Transcendental functions 4.8.3 Hyperbolic functions -------------------------- 'cl_R sinh (const cl_R& x)' Returns 'sinh(x)'. 'cl_N sinh (const cl_N& z)' Returns 'sinh(z)'. The range of the result is the entire complex plane. 'cl_R cosh (const cl_R& x)' Returns 'cosh(x)'. The range of the result is the interval 'cosh(x) >= 1'. 'cl_N cosh (const cl_N& z)' Returns 'cosh(z)'. The range of the result is the entire complex plane. 'struct cosh_sinh_t { cl_R cosh; cl_R sinh; };' 'cosh_sinh_t cosh_sinh (const cl_R& x)' Returns both 'sinh(x)' and 'cosh(x)'. This is more efficient than computing them separately. The relation 'cosh^2 - sinh^2 = 1' will hold only approximately. 'cl_R tanh (const cl_R& x)' 'cl_N tanh (const cl_N& x)' Returns 'tanh(x) = sinh(x)/cosh(x)'. 'cl_N asinh (const cl_N& z)' Returns 'arsinh(z)'. This is defined as 'arsinh(z) = log(z+sqrt(1+z^2))' and satisfies 'arsinh(-z) = -arsinh(z)'. The range of the result is the strip in the complex domain '-pi/2 <= imagpart(arsinh(z)) <= pi/2', excluding the numbers with 'imagpart = -pi/2' and 'realpart > 0' and the numbers with 'imagpart = pi/2' and 'realpart < 0'. 'cl_N acosh (const cl_N& z)' Returns 'arcosh(z)'. This is defined as 'arcosh(z) = 2*log(sqrt((z+1)/2)+sqrt((z-1)/2))'. The range of the result is the half-strip in the complex domain '-pi < imagpart(arcosh(z)) <= pi, realpart(arcosh(z)) >= 0', excluding the numbers with 'realpart = 0' and '-pi < imagpart < 0'. 'cl_N atanh (const cl_N& z)' Returns 'artanh(z)'. This is defined as 'artanh(z) = (log(1+z)-log(1-z)) / 2' and satisfies 'artanh(-z) = -artanh(z)'. The range of the result is the strip in the complex domain '-pi/2 <= imagpart(artanh(z)) <= pi/2', excluding the numbers with 'imagpart = -pi/2' and 'realpart <= 0' and the numbers with 'imagpart = pi/2' and 'realpart >= 0'.  File: cln.info, Node: Euler gamma, Next: Riemann zeta, Prev: Hyperbolic functions, Up: Transcendental functions 4.8.4 Euler gamma ----------------- Euler's constant C = 0.577... is returned by the following functions: 'cl_F eulerconst (float_format_t f)' Returns Euler's constant as a float of format 'f'. 'cl_F eulerconst (const cl_F& y)' Returns Euler's constant in the float format of 'y'. 'cl_F eulerconst (void)' Returns Euler's constant as a float of format 'default_float_format'. Catalan's constant G = 0.915... is returned by the following functions: 'cl_F catalanconst (float_format_t f)' Returns Catalan's constant as a float of format 'f'. 'cl_F catalanconst (const cl_F& y)' Returns Catalan's constant in the float format of 'y'. 'cl_F catalanconst (void)' Returns Catalan's constant as a float of format 'default_float_format'.  File: cln.info, Node: Riemann zeta, Prev: Euler gamma, Up: Transcendental functions 4.8.5 Riemann zeta ------------------ Riemann's zeta function at an integral point 's>1' is returned by the following functions: 'cl_F zeta (int s, float_format_t f)' Returns Riemann's zeta function at 's' as a float of format 'f'. 'cl_F zeta (int s, const cl_F& y)' Returns Riemann's zeta function at 's' in the float format of 'y'. 'cl_F zeta (int s)' Returns Riemann's zeta function at 's' as a float of format 'default_float_format'.  File: cln.info, Node: Functions on integers, Next: Functions on floating-point numbers, Prev: Transcendental functions, Up: Functions on numbers 4.9 Functions on integers ========================= * Menu: * Logical functions:: * Number theoretic functions:: * Combinatorial functions::  File: cln.info, Node: Logical functions, Next: Number theoretic functions, Up: Functions on integers 4.9.1 Logical functions ----------------------- Integers, when viewed as in two's complement notation, can be thought as infinite bit strings where the bits' values eventually are constant. For example, 17 = ......00010001 -6 = ......11111010 The logical operations view integers as such bit strings and operate on each of the bit positions in parallel. 'cl_I lognot (const cl_I& x)' 'cl_I operator ~ (const cl_I& x)' Logical not, like '~x' in C. This is the same as '-1-x'. 'cl_I logand (const cl_I& x, const cl_I& y)' 'cl_I operator & (const cl_I& x, const cl_I& y)' Logical and, like 'x & y' in C. 'cl_I logior (const cl_I& x, const cl_I& y)' 'cl_I operator | (const cl_I& x, const cl_I& y)' Logical (inclusive) or, like 'x | y' in C. 'cl_I logxor (const cl_I& x, const cl_I& y)' 'cl_I operator ^ (const cl_I& x, const cl_I& y)' Exclusive or, like 'x ^ y' in C. 'cl_I logeqv (const cl_I& x, const cl_I& y)' Bitwise equivalence, like '~(x ^ y)' in C. 'cl_I lognand (const cl_I& x, const cl_I& y)' Bitwise not and, like '~(x & y)' in C. 'cl_I lognor (const cl_I& x, const cl_I& y)' Bitwise not or, like '~(x | y)' in C. 'cl_I logandc1 (const cl_I& x, const cl_I& y)' Logical and, complementing the first argument, like '~x & y' in C. 'cl_I logandc2 (const cl_I& x, const cl_I& y)' Logical and, complementing the second argument, like 'x & ~y' in C. 'cl_I logorc1 (const cl_I& x, const cl_I& y)' Logical or, complementing the first argument, like '~x | y' in C. 'cl_I logorc2 (const cl_I& x, const cl_I& y)' Logical or, complementing the second argument, like 'x | ~y' in C. These operations are all available though the function 'cl_I boole (cl_boole op, const cl_I& x, const cl_I& y)' where 'op' must have one of the 16 values (each one stands for a function which combines two bits into one bit): 'boole_clr', 'boole_set', 'boole_1', 'boole_2', 'boole_c1', 'boole_c2', 'boole_and', 'boole_ior', 'boole_xor', 'boole_eqv', 'boole_nand', 'boole_nor', 'boole_andc1', 'boole_andc2', 'boole_orc1', 'boole_orc2'. Other functions that view integers as bit strings: 'bool logtest (const cl_I& x, const cl_I& y)' Returns true if some bit is set in both 'x' and 'y', i.e. if 'logand(x,y) != 0'. 'bool logbitp (const cl_I& n, const cl_I& x)' Returns true if the 'n'th bit (from the right) of 'x' is set. Bit 0 is the least significant bit. 'uintC logcount (const cl_I& x)' Returns the number of one bits in 'x', if 'x' >= 0, or the number of zero bits in 'x', if 'x' < 0. The following functions operate on intervals of bits in integers. The type struct cl_byte { uintC size; uintC position; }; represents the bit interval containing the bits 'position'...'position+size-1' of an integer. The constructor 'cl_byte(size,position)' constructs a 'cl_byte'. 'cl_I ldb (const cl_I& n, const cl_byte& b)' extracts the bits of 'n' described by the bit interval 'b' and returns them as a nonnegative integer with 'b.size' bits. 'bool ldb_test (const cl_I& n, const cl_byte& b)' Returns true if some bit described by the bit interval 'b' is set in 'n'. 'cl_I dpb (const cl_I& newbyte, const cl_I& n, const cl_byte& b)' Returns 'n', with the bits described by the bit interval 'b' replaced by 'newbyte'. Only the lowest 'b.size' bits of 'newbyte' are relevant. The functions 'ldb' and 'dpb' implicitly shift. The following functions are their counterparts without shifting: 'cl_I mask_field (const cl_I& n, const cl_byte& b)' returns an integer with the bits described by the bit interval 'b' copied from the corresponding bits in 'n', the other bits zero. 'cl_I deposit_field (const cl_I& newbyte, const cl_I& n, const cl_byte& b)' returns an integer where the bits described by the bit interval 'b' come from 'newbyte' and the other bits come from 'n'. The following relations hold: 'ldb (n, b) = mask_field(n, b) >> b.position', 'dpb (newbyte, n, b) = deposit_field (newbyte << b.position, n, b)', 'deposit_field(newbyte,n,b) = n ^ mask_field(n,b) ^ mask_field(new_byte,b)'. The following operations on integers as bit strings are efficient shortcuts for common arithmetic operations: 'bool oddp (const cl_I& x)' Returns true if the least significant bit of 'x' is 1. Equivalent to 'mod(x,2) != 0'. 'bool evenp (const cl_I& x)' Returns true if the least significant bit of 'x' is 0. Equivalent to 'mod(x,2) == 0'. 'cl_I operator << (const cl_I& x, const cl_I& n)' Shifts 'x' by 'n' bits to the left. 'n' should be >=0. Equivalent to 'x * expt(2,n)'. 'cl_I operator >> (const cl_I& x, const cl_I& n)' Shifts 'x' by 'n' bits to the right. 'n' should be >=0. Bits shifted out to the right are thrown away. Equivalent to 'floor(x / expt(2,n))'. 'cl_I ash (const cl_I& x, const cl_I& y)' Shifts 'x' by 'y' bits to the left (if 'y'>=0) or by '-y' bits to the right (if 'y'<=0). In other words, this returns 'floor(x * expt(2,y))'. 'uintC integer_length (const cl_I& x)' Returns the number of bits (excluding the sign bit) needed to represent 'x' in two's complement notation. This is the smallest n >= 0 such that -2^n <= x < 2^n. If x > 0, this is the unique n > 0 such that 2^(n-1) <= x < 2^n. 'uintC ord2 (const cl_I& x)' 'x' must be non-zero. This function returns the number of 0 bits at the right of 'x' in two's complement notation. This is the largest n >= 0 such that 2^n divides 'x'. 'uintC power2p (const cl_I& x)' 'x' must be > 0. This function checks whether 'x' is a power of 2. If 'x' = 2^(n-1), it returns n. Else it returns 0. (See also the function 'logp'.)  File: cln.info, Node: Number theoretic functions, Next: Combinatorial functions, Prev: Logical functions, Up: Functions on integers 4.9.2 Number theoretic functions -------------------------------- 'uint32 gcd (unsigned long a, unsigned long b)' 'cl_I gcd (const cl_I& a, const cl_I& b)' This function returns the greatest common divisor of 'a' and 'b', normalized to be >= 0. 'cl_I xgcd (const cl_I& a, const cl_I& b, cl_I* u, cl_I* v)' This function ("extended gcd") returns the greatest common divisor 'g' of 'a' and 'b' and at the same time the representation of 'g' as an integral linear combination of 'a' and 'b': 'u' and 'v' with 'u*a+v*b = g', 'g' >= 0. 'u' and 'v' will be normalized to be of smallest possible absolute value, in the following sense: If 'a' and 'b' are non-zero, and 'abs(a) != abs(b)', 'u' and 'v' will satisfy the inequalities 'abs(u) <= abs(b)/(2*g)', 'abs(v) <= abs(a)/(2*g)'. 'cl_I lcm (const cl_I& a, const cl_I& b)' This function returns the least common multiple of 'a' and 'b', normalized to be >= 0. 'bool logp (const cl_I& a, const cl_I& b, cl_RA* l)' 'bool logp (const cl_RA& a, const cl_RA& b, cl_RA* l)' 'a' must be > 0. 'b' must be >0 and != 1. If log(a,b) is rational number, this function returns true and sets *l = log(a,b), else it returns false. 'int jacobi (signed long a, signed long b)' 'int jacobi (const cl_I& a, const cl_I& b)' Returns the Jacobi symbol (a/b), 'a,b' must be integers, 'b>0' and odd. The result is 0 iff gcd(a,b)>1. 'bool isprobprime (const cl_I& n)' Returns true if 'n' is a small prime or passes the Miller-Rabin primality test. The probability of a false positive is 1:10^30. 'cl_I nextprobprime (const cl_R& x)' Returns the smallest probable prime >='x'.  File: cln.info, Node: Combinatorial functions, Prev: Number theoretic functions, Up: Functions on integers 4.9.3 Combinatorial functions ----------------------------- 'cl_I factorial (uintL n)' 'n' must be a small integer >= 0. This function returns the factorial 'n'! = '1*2*...*n'. 'cl_I doublefactorial (uintL n)' 'n' must be a small integer >= 0. This function returns the doublefactorial 'n'!! = '1*3*...*n' or 'n'!! = '2*4*...*n', respectively. 'cl_I binomial (uintL n, uintL k)' 'n' and 'k' must be small integers >= 0. This function returns the binomial coefficient ('n' choose 'k') = 'n'! / 'k'! '(n-k)'! for 0 <= k <= n, 0 else.  File: cln.info, Node: Functions on floating-point numbers, Next: Conversion functions, Prev: Functions on integers, Up: Functions on numbers 4.10 Functions on floating-point numbers ======================================== Recall that a floating-point number consists of a sign 's', an exponent 'e' and a mantissa 'm'. The value of the number is '(-1)^s * 2^e * m'. Each of the classes 'cl_F', 'cl_SF', 'cl_FF', 'cl_DF', 'cl_LF' defines the following operations. 'TYPE scale_float (const TYPE& x, sintC delta)' 'TYPE scale_float (const TYPE& x, const cl_I& delta)' Returns 'x*2^delta'. This is more efficient than an explicit multiplication because it copies 'x' and modifies the exponent. The following functions provide an abstract interface to the underlying representation of floating-point numbers. 'sintE float_exponent (const TYPE& x)' Returns the exponent 'e' of 'x'. For 'x = 0.0', this is 0. For 'x' non-zero, this is the unique integer with '2^(e-1) <= abs(x) < 2^e'. 'sintL float_radix (const TYPE& x)' Returns the base of the floating-point representation. This is always '2'. 'TYPE float_sign (const TYPE& x)' Returns the sign 's' of 'x' as a float. The value is 1 for 'x' >= 0, -1 for 'x' < 0. 'uintC float_digits (const TYPE& x)' Returns the number of mantissa bits in the floating-point representation of 'x', including the hidden bit. The value only depends on the type of 'x', not on its value. 'uintC float_precision (const TYPE& x)' Returns the number of significant mantissa bits in the floating-point representation of 'x'. Since denormalized numbers are not supported, this is the same as 'float_digits(x)' if 'x' is non-zero, and 0 if 'x' = 0. The complete internal representation of a float is encoded in the type 'decoded_float' (or 'decoded_sfloat', 'decoded_ffloat', 'decoded_dfloat', 'decoded_lfloat', respectively), defined by struct decoded_TYPEfloat { TYPE mantissa; cl_I exponent; TYPE sign; }; and returned by the function 'decoded_TYPEfloat decode_float (const TYPE& x)' For 'x' non-zero, this returns '(-1)^s', 'e', 'm' with 'x = (-1)^s * 2^e * m' and '0.5 <= m < 1.0'. For 'x' = 0, it returns '(-1)^s'=1, 'e'=0, 'm'=0. 'e' is the same as returned by the function 'float_exponent'. A complete decoding in terms of integers is provided as type struct cl_idecoded_float { cl_I mantissa; cl_I exponent; cl_I sign; }; by the following function: 'cl_idecoded_float integer_decode_float (const TYPE& x)' For 'x' non-zero, this returns '(-1)^s', 'e', 'm' with 'x = (-1)^s * 2^e * m' and 'm' an integer with 'float_digits(x)' bits. For 'x' = 0, it returns '(-1)^s'=1, 'e'=0, 'm'=0. WARNING: The exponent 'e' is not the same as the one returned by the functions 'decode_float' and 'float_exponent'. Some other function, implemented only for class 'cl_F': 'cl_F float_sign (const cl_F& x, const cl_F& y)' This returns a floating point number whose precision and absolute value is that of 'y' and whose sign is that of 'x'. If 'x' is zero, it is treated as positive. Same for 'y'.  File: cln.info, Node: Conversion functions, Next: Random number generators, Prev: Functions on floating-point numbers, Up: Functions on numbers 4.11 Conversion functions ========================= * Menu: * Conversion to floating-point numbers:: * Conversion to rational numbers::  File: cln.info, Node: Conversion to floating-point numbers, Next: Conversion to rational numbers, Up: Conversion functions 4.11.1 Conversion to floating-point numbers ------------------------------------------- The type 'float_format_t' describes a floating-point format. 'float_format_t float_format (uintE n)' Returns the smallest float format which guarantees at least 'n' decimal digits in the mantissa (after the decimal point). 'float_format_t float_format (const cl_F& x)' Returns the floating point format of 'x'. 'float_format_t default_float_format' Global variable: the default float format used when converting rational numbers to floats. To convert a real number to a float, each of the types 'cl_R', 'cl_F', 'cl_I', 'cl_RA', 'int', 'unsigned int', 'float', 'double' defines the following operations: 'cl_F cl_float (const TYPE&x, float_format_t f)' Returns 'x' as a float of format 'f'. 'cl_F cl_float (const TYPE&x, const cl_F& y)' Returns 'x' in the float format of 'y'. 'cl_F cl_float (const TYPE&x)' Returns 'x' as a float of format 'default_float_format' if it is an exact number, or 'x' itself if it is already a float. Of course, converting a number to a float can lose precision. Every floating-point format has some characteristic numbers: 'cl_F most_positive_float (float_format_t f)' Returns the largest (most positive) floating point number in float format 'f'. 'cl_F most_negative_float (float_format_t f)' Returns the smallest (most negative) floating point number in float format 'f'. 'cl_F least_positive_float (float_format_t f)' Returns the least positive floating point number (i.e. > 0 but closest to 0) in float format 'f'. 'cl_F least_negative_float (float_format_t f)' Returns the least negative floating point number (i.e. < 0 but closest to 0) in float format 'f'. 'cl_F float_epsilon (float_format_t f)' Returns the smallest floating point number e > 0 such that '1+e != 1'. 'cl_F float_negative_epsilon (float_format_t f)' Returns the smallest floating point number e > 0 such that '1-e != 1'.  File: cln.info, Node: Conversion to rational numbers, Prev: Conversion to floating-point numbers, Up: Conversion functions 4.11.2 Conversion to rational numbers ------------------------------------- Each of the classes 'cl_R', 'cl_RA', 'cl_F' defines the following operation: 'cl_RA rational (const TYPE& x)' Returns the value of 'x' as an exact number. If 'x' is already an exact number, this is 'x'. If 'x' is a floating-point number, the value is a rational number whose denominator is a power of 2. In order to convert back, say, '(cl_F)(cl_R)"1/3"' to '1/3', there is the function 'cl_RA rationalize (const cl_R& x)' If 'x' is a floating-point number, it actually represents an interval of real numbers, and this function returns the rational number with smallest denominator (and smallest numerator, in magnitude) which lies in this interval. If 'x' is already an exact number, this function returns 'x'. If 'x' is any float, one has 'cl_float(rational(x),x) = x' 'cl_float(rationalize(x),x) = x'  File: cln.info, Node: Random number generators, Next: Modifying operators, Prev: Conversion functions, Up: Functions on numbers 4.12 Random number generators ============================= A random generator is a machine which produces (pseudo-)random numbers. The include file '' defines a class 'random_state' which contains the state of a random generator. If you make a copy of the random number generator, the original one and the copy will produce the same sequence of random numbers. The following functions return (pseudo-)random numbers in different formats. Calling one of these modifies the state of the random number generator in a complicated but deterministic way. The global variable random_state default_random_state contains a default random number generator. It is used when the functions below are called without 'random_state' argument. 'uint32 random32 (random_state& randomstate)' 'uint32 random32 ()' Returns a random unsigned 32-bit number. All bits are equally random. 'cl_I random_I (random_state& randomstate, const cl_I& n)' 'cl_I random_I (const cl_I& n)' 'n' must be an integer > 0. This function returns a random integer 'x' in the range '0 <= x < n'. 'cl_F random_F (random_state& randomstate, const cl_F& n)' 'cl_F random_F (const cl_F& n)' 'n' must be a float > 0. This function returns a random floating-point number of the same format as 'n' in the range '0 <= x < n'. 'cl_R random_R (random_state& randomstate, const cl_R& n)' 'cl_R random_R (const cl_R& n)' Behaves like 'random_I' if 'n' is an integer and like 'random_F' if 'n' is a float.  File: cln.info, Node: Modifying operators, Prev: Random number generators, Up: Functions on numbers 4.13 Modifying operators ======================== The modifying C/C++ operators '+=', '-=', '*=', '/=', '&=', '|=', '^=', '<<=', '>>=' are all available. For the classes 'cl_N', 'cl_R', 'cl_RA', 'cl_F', 'cl_SF', 'cl_FF', 'cl_DF', 'cl_LF': 'TYPE& operator += (TYPE&, const TYPE&)' 'TYPE& operator -= (TYPE&, const TYPE&)' 'TYPE& operator *= (TYPE&, const TYPE&)' 'TYPE& operator /= (TYPE&, const TYPE&)' For the class 'cl_I': 'TYPE& operator += (TYPE&, const TYPE&)' 'TYPE& operator -= (TYPE&, const TYPE&)' 'TYPE& operator *= (TYPE&, const TYPE&)' 'TYPE& operator &= (TYPE&, const TYPE&)' 'TYPE& operator |= (TYPE&, const TYPE&)' 'TYPE& operator ^= (TYPE&, const TYPE&)' 'TYPE& operator <<= (TYPE&, const TYPE&)' 'TYPE& operator >>= (TYPE&, const TYPE&)' For the classes 'cl_N', 'cl_R', 'cl_RA', 'cl_I', 'cl_F', 'cl_SF', 'cl_FF', 'cl_DF', 'cl_LF': 'TYPE& operator ++ (TYPE& x)' The prefix operator '++x'. 'void operator ++ (TYPE& x, int)' The postfix operator 'x++'. 'TYPE& operator -- (TYPE& x)' The prefix operator '--x'. 'void operator -- (TYPE& x, int)' The postfix operator 'x--'. Note that by using these modifying operators, you don't gain efficiency: In CLN 'x += y;' is exactly the same as 'x = x+y;', not more efficient.  File: cln.info, Node: Input/Output, Next: Rings, Prev: Functions on numbers, Up: Top 5 Input/Output ************** * Menu: * Internal and printed representation:: * Input functions:: * Output functions::  File: cln.info, Node: Internal and printed representation, Next: Input functions, Up: Input/Output 5.1 Internal and printed representation ======================================= All computations deal with the internal representations of the numbers. Every number has an external representation as a sequence of ASCII characters. Several external representations may denote the same number, for example, "20.0" and "20.000". Converting an internal to an external representation is called "printing", converting an external to an internal representation is called "reading". In CLN, it is always true that conversion of an internal to an external representation and then back to an internal representation will yield the same internal representation. Symbolically: 'read(print(x)) == x'. This is called "print-read consistency". Different types of numbers have different external representations (case is insignificant): Integers External representation: SIGN{DIGIT}+. The reader also accepts the Common Lisp syntaxes SIGN{DIGIT}+'.' with a trailing dot for decimal integers and the '#NR', '#b', '#o', '#x' prefixes. Rational numbers External representation: SIGN{DIGIT}+'/'{DIGIT}+. The '#NR', '#b', '#o', '#x' prefixes are allowed here as well. Floating-point numbers External representation: SIGN{DIGIT}*EXPONENT or SIGN{DIGIT}*'.'{DIGIT}*EXPONENT or SIGN{DIGIT}*'.'{DIGIT}+. A precision specifier of the form _PREC may be appended. There must be at least one digit in the non-exponent part. The exponent has the syntax EXPMARKER EXPSIGN {DIGIT}+. The exponent marker is 's' for short-floats, 'f' for single-floats, 'd' for double-floats, 'L' for long-floats, or 'e', which denotes a default float format. The precision specifying suffix has the syntax _PREC where PREC denotes the number of valid mantissa digits (in decimal, excluding leading zeroes), cf. also function 'float_format'. Complex numbers External representation: In algebraic notation: 'REALPART+IMAGPARTi'. Of course, if IMAGPART is negative, its printed representation begins with a '-', and the '+' between REALPART and IMAGPART may be omitted. Note that this notation cannot be used when the IMAGPART is rational and the rational number's base is >18, because the 'i' is then read as a digit. In Common Lisp notation: '#C(REALPART IMAGPART)'.  File: cln.info, Node: Input functions, Next: Output functions, Prev: Internal and printed representation, Up: Input/Output 5.2 Input functions =================== Including '' defines flexible input functions: 'cl_N read_complex (std::istream& stream, const cl_read_flags& flags)' 'cl_R read_real (std::istream& stream, const cl_read_flags& flags)' 'cl_F read_float (std::istream& stream, const cl_read_flags& flags)' 'cl_RA read_rational (std::istream& stream, const cl_read_flags& flags)' 'cl_I read_integer (std::istream& stream, const cl_read_flags& flags)' Reads a number from 'stream'. The 'flags' are parameters which affect the input syntax. Whitespace before the number is silently skipped. 'cl_N read_complex (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse)' 'cl_R read_real (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse)' 'cl_F read_float (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse)' 'cl_RA read_rational (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse)' 'cl_I read_integer (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse)' Reads a number from a string in memory. The 'flags' are parameters which affect the input syntax. The string starts at 'string' and ends at 'string_limit' (exclusive limit). 'string_limit' may also be 'NULL', denoting the entire string, i.e. equivalent to 'string_limit = string + strlen(string)'. If 'end_of_parse' is 'NULL', the string in memory must contain exactly one number and nothing more, else an exception will be thrown. If 'end_of_parse' is not 'NULL', '*end_of_parse' will be assigned a pointer past the last parsed character (i.e. 'string_limit' if nothing came after the number). Whitespace is not allowed. The structure 'cl_read_flags' contains the following fields: 'cl_read_syntax_t syntax' The possible results of the read operation. Possible values are 'syntax_number', 'syntax_real', 'syntax_rational', 'syntax_integer', 'syntax_float', 'syntax_sfloat', 'syntax_ffloat', 'syntax_dfloat', 'syntax_lfloat'. 'cl_read_lsyntax_t lsyntax' Specifies the language-dependent syntax variant for the read operation. Possible values are 'lsyntax_standard' accept standard algebraic notation only, no complex numbers, 'lsyntax_algebraic' accept the algebraic notation 'X+Yi' for complex numbers, 'lsyntax_commonlisp' accept the '#b', '#o', '#x' syntaxes for binary, octal, hexadecimal numbers, '#BASER' for rational numbers in a given base, '#c(REALPART IMAGPART)' for complex numbers, 'lsyntax_all' accept all of these extensions. 'unsigned int rational_base' The base in which rational numbers are read. 'float_format_t float_flags.default_float_format' The float format used when reading floats with exponent marker 'e'. 'float_format_t float_flags.default_lfloat_format' The float format used when reading floats with exponent marker 'l'. 'bool float_flags.mantissa_dependent_float_format' When this flag is true, floats specified with more digits than corresponding to the exponent marker they contain, but without _NNN suffix, will get a precision corresponding to their number of significant digits.  File: cln.info, Node: Output functions, Prev: Input functions, Up: Input/Output 5.3 Output functions ==================== Including '' defines a number of simple output functions that write to 'std::ostream&': 'void fprintchar (std::ostream& stream, char c)' Prints the character 'x' literally on the 'stream'. 'void fprint (std::ostream& stream, const char * string)' Prints the 'string' literally on the 'stream'. 'void fprintdecimal (std::ostream& stream, int x)' 'void fprintdecimal (std::ostream& stream, const cl_I& x)' Prints the integer 'x' in decimal on the 'stream'. 'void fprintbinary (std::ostream& stream, const cl_I& x)' Prints the integer 'x' in binary (base 2, without prefix) on the 'stream'. 'void fprintoctal (std::ostream& stream, const cl_I& x)' Prints the integer 'x' in octal (base 8, without prefix) on the 'stream'. 'void fprinthexadecimal (std::ostream& stream, const cl_I& x)' Prints the integer 'x' in hexadecimal (base 16, without prefix) on the 'stream'. Each of the classes 'cl_N', 'cl_R', 'cl_RA', 'cl_I', 'cl_F', 'cl_SF', 'cl_FF', 'cl_DF', 'cl_LF' defines, in '', the following output functions: 'void fprint (std::ostream& stream, const TYPE& x)' 'std::ostream& operator<< (std::ostream& stream, const TYPE& x)' Prints the number 'x' on the 'stream'. The output may depend on the global printer settings in the variable 'default_print_flags'. The 'ostream' flags and settings (flags, width and locale) are ignored. The most flexible output function, defined in '', are the following: void print_complex (std::ostream& stream, const cl_print_flags& flags, const cl_N& z); void print_real (std::ostream& stream, const cl_print_flags& flags, const cl_R& z); void print_float (std::ostream& stream, const cl_print_flags& flags, const cl_F& z); void print_rational (std::ostream& stream, const cl_print_flags& flags, const cl_RA& z); void print_integer (std::ostream& stream, const cl_print_flags& flags, const cl_I& z); Prints the number 'x' on the 'stream'. The 'flags' are parameters which affect the output. The structure type 'cl_print_flags' contains the following fields: 'unsigned int rational_base' The base in which rational numbers are printed. Default is '10'. 'bool rational_readably' If this flag is true, rational numbers are printed with radix specifiers in Common Lisp syntax ('#NR' or '#b' or '#o' or '#x' prefixes, trailing dot). Default is false. 'bool float_readably' If this flag is true, type specific exponent markers have precedence over 'E'. Default is false. 'float_format_t default_float_format' Floating point numbers of this format will be printed using the 'E' exponent marker. Default is 'float_format_ffloat'. 'bool complex_readably' If this flag is true, complex numbers will be printed using the Common Lisp syntax '#C(REALPART IMAGPART)'. Default is false. 'cl_string univpoly_varname' Univariate polynomials with no explicit indeterminate name will be printed using this variable name. Default is '"x"'. The global variable 'default_print_flags' contains the default values, used by the function 'fprint'.  File: cln.info, Node: Rings, Next: Modular integers, Prev: Input/Output, Up: Top 6 Rings ******* CLN has a class of abstract rings. Ring cl_ring Rings can be compared for equality: 'bool operator== (const cl_ring&, const cl_ring&)' 'bool operator!= (const cl_ring&, const cl_ring&)' These compare two rings for equality. Given a ring 'R', the following members can be used. 'void R->fprint (std::ostream& stream, const cl_ring_element& x)' 'bool R->equal (const cl_ring_element& x, const cl_ring_element& y)' 'cl_ring_element R->zero ()' 'bool R->zerop (const cl_ring_element& x)' 'cl_ring_element R->plus (const cl_ring_element& x, const cl_ring_element& y)' 'cl_ring_element R->minus (const cl_ring_element& x, const cl_ring_element& y)' 'cl_ring_element R->uminus (const cl_ring_element& x)' 'cl_ring_element R->one ()' 'cl_ring_element R->canonhom (const cl_I& x)' 'cl_ring_element R->mul (const cl_ring_element& x, const cl_ring_element& y)' 'cl_ring_element R->square (const cl_ring_element& x)' 'cl_ring_element R->expt_pos (const cl_ring_element& x, const cl_I& y)' The following rings are built-in. 'cl_null_ring cl_0_ring' The null ring, containing only zero. 'cl_complex_ring cl_C_ring' The ring of complex numbers. This corresponds to the type 'cl_N'. 'cl_real_ring cl_R_ring' The ring of real numbers. This corresponds to the type 'cl_R'. 'cl_rational_ring cl_RA_ring' The ring of rational numbers. This corresponds to the type 'cl_RA'. 'cl_integer_ring cl_I_ring' The ring of integers. This corresponds to the type 'cl_I'. Type tests can be performed for any of 'cl_C_ring', 'cl_R_ring', 'cl_RA_ring', 'cl_I_ring': 'bool instanceof (const cl_number& x, const cl_number_ring& R)' Tests whether the given number is an element of the number ring R.  File: cln.info, Node: Modular integers, Next: Symbolic data types, Prev: Rings, Up: Top 7 Modular integers ****************** * Menu: * Modular integer rings:: * Functions on modular integers::  File: cln.info, Node: Modular integer rings, Next: Functions on modular integers, Up: Modular integers 7.1 Modular integer rings ========================= CLN implements modular integers, i.e. integers modulo a fixed integer N. The modulus is explicitly part of every modular integer. CLN doesn't allow you to (accidentally) mix elements of different modular rings, e.g. '(3 mod 4) + (2 mod 5)' will result in a runtime error. (Ideally one would imagine a generic data type 'cl_MI(N)', but C++ doesn't have generic types. So one has to live with runtime checks.) The class of modular integer rings is Ring cl_ring | | Modular integer ring cl_modint_ring and the class of all modular integers (elements of modular integer rings) is Modular integer cl_MI Modular integer rings are constructed using the function 'cl_modint_ring find_modint_ring (const cl_I& N)' This function returns the modular ring 'Z/NZ'. It takes care of finding out about special cases of 'N', like powers of two and odd numbers for which Montgomery multiplication will be a win, and precomputes any necessary auxiliary data for computing modulo 'N'. There is a cache table of rings, indexed by 'N' (or, more precisely, by 'abs(N)'). This ensures that the precomputation costs are reduced to a minimum. Modular integer rings can be compared for equality: 'bool operator== (const cl_modint_ring&, const cl_modint_ring&)' 'bool operator!= (const cl_modint_ring&, const cl_modint_ring&)' These compare two modular integer rings for equality. Two different calls to 'find_modint_ring' with the same argument necessarily return the same ring because it is memoized in the cache table.  File: cln.info, Node: Functions on modular integers, Prev: Modular integer rings, Up: Modular integers 7.2 Functions on modular integers ================================= Given a modular integer ring 'R', the following members can be used. 'cl_I R->modulus' This is the ring's modulus, normalized to be nonnegative: 'abs(N)'. 'cl_MI R->zero()' This returns '0 mod N'. 'cl_MI R->one()' This returns '1 mod N'. 'cl_MI R->canonhom (const cl_I& x)' This returns 'x mod N'. 'cl_I R->retract (const cl_MI& x)' This is a partial inverse function to 'R->canonhom'. It returns the standard representative ('>=0', 'random(random_state& randomstate)' 'cl_MI R->random()' This returns a random integer modulo 'N'. The following operations are defined on modular integers. 'cl_modint_ring x.ring ()' Returns the ring to which the modular integer 'x' belongs. 'cl_MI operator+ (const cl_MI&, const cl_MI&)' Returns the sum of two modular integers. One of the arguments may also be a plain integer. 'cl_MI operator- (const cl_MI&, const cl_MI&)' Returns the difference of two modular integers. One of the arguments may also be a plain integer. 'cl_MI operator- (const cl_MI&)' Returns the negative of a modular integer. 'cl_MI operator* (const cl_MI&, const cl_MI&)' Returns the product of two modular integers. One of the arguments may also be a plain integer. 'cl_MI square (const cl_MI&)' Returns the square of a modular integer. 'cl_MI recip (const cl_MI& x)' Returns the reciprocal 'x^-1' of a modular integer 'x'. 'x' must be coprime to the modulus, otherwise an error message is issued. 'cl_MI div (const cl_MI& x, const cl_MI& y)' Returns the quotient 'x*y^-1' of two modular integers 'x', 'y'. 'y' must be coprime to the modulus, otherwise an error message is issued. 'cl_MI expt_pos (const cl_MI& x, const cl_I& y)' 'y' must be > 0. Returns 'x^y'. 'cl_MI expt (const cl_MI& x, const cl_I& y)' Returns 'x^y'. If 'y' is negative, 'x' must be coprime to the modulus, else an error message is issued. 'cl_MI operator<< (const cl_MI& x, const cl_I& y)' Returns 'x*2^y'. 'cl_MI operator>> (const cl_MI& x, const cl_I& y)' Returns 'x*2^-y'. When 'y' is positive, the modulus must be odd, or an error message is issued. 'bool operator== (const cl_MI&, const cl_MI&)' 'bool operator!= (const cl_MI&, const cl_MI&)' Compares two modular integers, belonging to the same modular integer ring, for equality. 'bool zerop (const cl_MI& x)' Returns true if 'x' is '0 mod N'. The following output functions are defined (see also the chapter on input/output). 'void fprint (std::ostream& stream, const cl_MI& x)' 'std::ostream& operator<< (std::ostream& stream, const cl_MI& x)' Prints the modular integer 'x' on the 'stream'. The output may depend on the global printer settings in the variable 'default_print_flags'.  File: cln.info, Node: Symbolic data types, Next: Univariate polynomials, Prev: Modular integers, Up: Top 8 Symbolic data types ********************* CLN implements two symbolic (non-numeric) data types: strings and symbols. * Menu: * Strings:: * Symbols::  File: cln.info, Node: Strings, Next: Symbols, Up: Symbolic data types 8.1 Strings =========== The class String cl_string implements immutable strings. Strings are constructed through the following constructors: 'cl_string (const char * s)' Returns an immutable copy of the (zero-terminated) C string 's'. 'cl_string (const char * ptr, unsigned long len)' Returns an immutable copy of the 'len' characters at 'ptr[0]', ..., 'ptr[len-1]'. NUL characters are allowed. The following functions are available on strings: 'operator =' Assignment from 'cl_string' and 'const char *'. 's.size()' 'strlen(s)' Returns the length of the string 's'. 's[i]' Returns the 'i'th character of the string 's'. 'i' must be in the range '0 <= i < s.size()'. 'bool equal (const cl_string& s1, const cl_string& s2)' Compares two strings for equality. One of the arguments may also be a plain 'const char *'.  File: cln.info, Node: Symbols, Prev: Strings, Up: Symbolic data types 8.2 Symbols =========== Symbols are uniquified strings: all symbols with the same name are shared. This means that comparison of two symbols is fast (effectively just a pointer comparison), whereas comparison of two strings must in the worst case walk both strings until their end. Symbols are used, for example, as tags for properties, as names of variables in polynomial rings, etc. Symbols are constructed through the following constructor: 'cl_symbol (const cl_string& s)' Looks up or creates a new symbol with a given name. The following operations are available on symbols: 'cl_string (const cl_symbol& sym)' Conversion to 'cl_string': Returns the string which names the symbol 'sym'. 'bool equal (const cl_symbol& sym1, const cl_symbol& sym2)' Compares two symbols for equality. This is very fast.  File: cln.info, Node: Univariate polynomials, Next: Internals, Prev: Symbolic data types, Up: Top 9 Univariate polynomials ************************ * Menu: * Univariate polynomial rings:: * Functions on univariate polynomials:: * Special polynomials::  File: cln.info, Node: Univariate polynomial rings, Next: Functions on univariate polynomials, Up: Univariate polynomials 9.1 Univariate polynomial rings =============================== CLN implements univariate polynomials (polynomials in one variable) over an arbitrary ring. The indeterminate variable may be either unnamed (and will be printed according to 'default_print_flags.univpoly_varname', which defaults to 'x') or carry a given name. The base ring and the indeterminate are explicitly part of every polynomial. CLN doesn't allow you to (accidentally) mix elements of different polynomial rings, e.g. '(a^2+1) * (b^3-1)' will result in a runtime error. (Ideally this should return a multivariate polynomial, but they are not yet implemented in CLN.) The classes of univariate polynomial rings are Ring cl_ring | | Univariate polynomial ring cl_univpoly_ring | +----------------+-------------------+ | | | Complex polynomial ring | Modular integer polynomial ring cl_univpoly_complex_ring | cl_univpoly_modint_ring | | +----------------+ | | Real polynomial ring | cl_univpoly_real_ring | | | +----------------+ | | Rational polynomial ring | cl_univpoly_rational_ring | | | +----------------+ | Integer polynomial ring cl_univpoly_integer_ring and the corresponding classes of univariate polynomials are Univariate polynomial cl_UP | +----------------+-------------------+ | | | Complex polynomial | Modular integer polynomial cl_UP_N | cl_UP_MI | | +----------------+ | | Real polynomial | cl_UP_R | | | +----------------+ | | Rational polynomial | cl_UP_RA | | | +----------------+ | Integer polynomial cl_UP_I Univariate polynomial rings are constructed using the functions 'cl_univpoly_ring find_univpoly_ring (const cl_ring& R)' 'cl_univpoly_ring find_univpoly_ring (const cl_ring& R, const cl_symbol& varname)' This function returns the polynomial ring 'R[X]', unnamed or named. 'R' may be an arbitrary ring. This function takes care of finding out about special cases of 'R', such as the rings of complex numbers, real numbers, rational numbers, integers, or modular integer rings. There is a cache table of rings, indexed by 'R' and 'varname'. This ensures that two calls of this function with the same arguments will return the same polynomial ring. 'cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& R)' 'cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& R, const cl_symbol& varname)' 'cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& R)' 'cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& R, const cl_symbol& varname)' 'cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& R)' 'cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& R, const cl_symbol& varname)' 'cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& R)' 'cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& R, const cl_symbol& varname)' 'cl_univpoly_modint_ring find_univpoly_ring (const cl_modint_ring& R)' 'cl_univpoly_modint_ring find_univpoly_ring (const cl_modint_ring& R, const cl_symbol& varname)' These functions are equivalent to the general 'find_univpoly_ring', only the return type is more specific, according to the base ring's type.  File: cln.info, Node: Functions on univariate polynomials, Next: Special polynomials, Prev: Univariate polynomial rings, Up: Univariate polynomials 9.2 Functions on univariate polynomials ======================================= Given a univariate polynomial ring 'R', the following members can be used. 'cl_ring R->basering()' This returns the base ring, as passed to 'find_univpoly_ring'. 'cl_UP R->zero()' This returns '0 in R', a polynomial of degree -1. 'cl_UP R->one()' This returns '1 in R', a polynomial of degree == 0. 'cl_UP R->canonhom (const cl_I& x)' This returns 'x in R', a polynomial of degree <= 0. 'cl_UP R->monomial (const cl_ring_element& x, uintL e)' This returns a sparse polynomial: 'x * X^e', where 'X' is the indeterminate. 'cl_UP R->create (sintL degree)' Creates a new polynomial with a given degree. The zero polynomial has degree '-1'. After creating the polynomial, you should put in the coefficients, using the 'set_coeff' member function, and then call the 'finalize' member function. The following are the only destructive operations on univariate polynomials. 'void set_coeff (cl_UP& x, uintL index, const cl_ring_element& y)' This changes the coefficient of 'X^index' in 'x' to be 'y'. After changing a polynomial and before applying any "normal" operation on it, you should call its 'finalize' member function. 'void finalize (cl_UP& x)' This function marks the endpoint of destructive modifications of a polynomial. It normalizes the internal representation so that subsequent computations have less overhead. Doing normal computations on unnormalized polynomials may produce wrong results or crash the program. The following operations are defined on univariate polynomials. 'cl_univpoly_ring x.ring ()' Returns the ring to which the univariate polynomial 'x' belongs. 'cl_UP operator+ (const cl_UP&, const cl_UP&)' Returns the sum of two univariate polynomials. 'cl_UP operator- (const cl_UP&, const cl_UP&)' Returns the difference of two univariate polynomials. 'cl_UP operator- (const cl_UP&)' Returns the negative of a univariate polynomial. 'cl_UP operator* (const cl_UP&, const cl_UP&)' Returns the product of two univariate polynomials. One of the arguments may also be a plain integer or an element of the base ring. 'cl_UP square (const cl_UP&)' Returns the square of a univariate polynomial. 'cl_UP expt_pos (const cl_UP& x, const cl_I& y)' 'y' must be > 0. Returns 'x^y'. 'bool operator== (const cl_UP&, const cl_UP&)' 'bool operator!= (const cl_UP&, const cl_UP&)' Compares two univariate polynomials, belonging to the same univariate polynomial ring, for equality. 'bool zerop (const cl_UP& x)' Returns true if 'x' is '0 in R'. 'sintL degree (const cl_UP& x)' Returns the degree of the polynomial. The zero polynomial has degree '-1'. 'sintL ldegree (const cl_UP& x)' Returns the low degree of the polynomial. This is the degree of the first non-vanishing polynomial coefficient. The zero polynomial has ldegree '-1'. 'cl_ring_element coeff (const cl_UP& x, uintL index)' Returns the coefficient of 'X^index' in the polynomial 'x'. 'cl_ring_element x (const cl_ring_element& y)' Evaluation: If 'x' is a polynomial and 'y' belongs to the base ring, then 'x(y)' returns the value of the substitution of 'y' into 'x'. 'cl_UP deriv (const cl_UP& x)' Returns the derivative of the polynomial 'x' with respect to the indeterminate 'X'. The following output functions are defined (see also the chapter on input/output). 'void fprint (std::ostream& stream, const cl_UP& x)' 'std::ostream& operator<< (std::ostream& stream, const cl_UP& x)' Prints the univariate polynomial 'x' on the 'stream'. The output may depend on the global printer settings in the variable 'default_print_flags'.  File: cln.info, Node: Special polynomials, Prev: Functions on univariate polynomials, Up: Univariate polynomials 9.3 Special polynomials ======================= The following functions return special polynomials. 'cl_UP_I tschebychev (sintL n)' Returns the n-th Chebyshev polynomial (n >= 0). 'cl_UP_I hermite (sintL n)' Returns the n-th Hermite polynomial (n >= 0). 'cl_UP_RA legendre (sintL n)' Returns the n-th Legendre polynomial (n >= 0). 'cl_UP_I laguerre (sintL n)' Returns the n-th Laguerre polynomial (n >= 0). Information how to derive the differential equation satisfied by each of these polynomials from their definition can be found in the 'doc/polynomial/' directory.  File: cln.info, Node: Internals, Next: Using the library, Prev: Univariate polynomials, Up: Top 10 Internals ************ * Menu: * Why C++ ?:: * Memory efficiency:: * Speed efficiency:: * Garbage collection::  File: cln.info, Node: Why C++ ?, Next: Memory efficiency, Up: Internals 10.1 Why C++ ? ============== Using C++ as an implementation language provides * Efficiency: It compiles to machine code. * Portability: It runs on all platforms supporting a C++ compiler. Because of the availability of GNU C++, this includes all currently used 32-bit and 64-bit platforms, independently of the quality of the vendor's C++ compiler. * Type safety: The C++ compilers knows about the number types and complains if, for example, you try to assign a float to an integer variable. However, a drawback is that C++ doesn't know about generic types, hence a restriction like that 'operator+ (const cl_MI&, const cl_MI&)' requires that both arguments belong to the same modular ring cannot be expressed as a compile-time information. * Algebraic syntax: The elementary operations '+', '-', '*', '=', '==', ... can be used in infix notation, which is more convenient than Lisp notation '(+ x y)' or C notation 'add(x,y,&z)'. With these language features, there is no need for two separate languages, one for the implementation of the library and one in which the library's users can program. This means that a prototype implementation of an algorithm can be integrated into the library immediately after it has been tested and debugged. No need to rewrite it in a low-level language after having prototyped in a high-level language.  File: cln.info, Node: Memory efficiency, Next: Speed efficiency, Prev: Why C++ ?, Up: Internals 10.2 Memory efficiency ====================== In order to save memory allocations, CLN implements: * Object sharing: An operation like 'x+0' returns 'x' without copying it. * Garbage collection: A reference counting mechanism makes sure that any number object's storage is freed immediately when the last reference to the object is gone. * Small integers are represented as immediate values instead of pointers to heap allocated storage. This means that integers '>= -2^29', '< 2^29' don't consume heap memory, unless they were explicitly allocated on the heap.  File: cln.info, Node: Speed efficiency, Next: Garbage collection, Prev: Memory efficiency, Up: Internals 10.3 Speed efficiency ===================== Speed efficiency is obtained by the combination of the following tricks and algorithms: * Small integers, being represented as immediate values, don't require memory access, just a couple of instructions for each elementary operation. * The kernel of CLN has been written in assembly language for some CPUs ('i386', 'm68k', 'sparc', 'mips', 'arm'). * On all CPUs, CLN may be configured to use the superefficient low-level routines from GNU GMP version 3. * For large numbers, CLN uses, instead of the standard 'O(N^2)' algorithm, the Karatsuba multiplication, which is an 'O(N^1.6)' algorithm. * For very large numbers (more than 12000 decimal digits), CLN uses Schoenhage-Strassen multiplication, which is an asymptotically optimal multiplication algorithm. * These fast multiplication algorithms also give improvements in the speed of division and radix conversion.  File: cln.info, Node: Garbage collection, Prev: Speed efficiency, Up: Internals 10.4 Garbage collection ======================= All the number classes are reference count classes: They only contain a pointer to an object in the heap. Upon construction, assignment and destruction of number objects, only the objects' reference count are manipulated. Memory occupied by number objects are automatically reclaimed as soon as their reference count drops to zero. For number rings, another strategy is implemented: There is a cache of, for example, the modular integer rings. A modular integer ring is destroyed only if its reference count dropped to zero and the cache is about to be resized. The effect of this strategy is that recently used rings remain cached, whereas undue memory consumption through cached rings is avoided.  File: cln.info, Node: Using the library, Next: Customizing, Prev: Internals, Up: Top 11 Using the library ******************** For the following discussion, we will assume that you have installed the CLN source in '$CLN_DIR' and built it in '$CLN_TARGETDIR'. For example, for me it's 'CLN_DIR="$HOME/cln"' and 'CLN_TARGETDIR="$HOME/cln/linuxelf"'. You might define these as environment variables, or directly substitute the appropriate values. * Menu: * Compiler options:: * Include files:: * An Example:: * Debugging support:: * Reporting Problems::  File: cln.info, Node: Compiler options, Next: Include files, Up: Using the library 11.1 Compiler options ===================== Until you have installed CLN in a public place, the following options are needed: When you compile CLN application code, add the flags -I$CLN_DIR/include -I$CLN_TARGETDIR/include to the C++ compiler's command line ('make' variable CFLAGS or CXXFLAGS). When you link CLN application code to form an executable, add the flags $CLN_TARGETDIR/src/libcln.a to the C/C++ compiler's command line ('make' variable LIBS). If you did a 'make install', the include files are installed in a public directory (normally '/usr/local/include'), hence you don't need special flags for compiling. The library has been installed to a public directory as well (normally '/usr/local/lib'), hence when linking a CLN application it is sufficient to give the flag '-lcln'. To make the creation of software packages that use CLN easier, the 'pkg-config' utility can be used. CLN provides all the necessary metainformation in a file called 'cln.pc' (installed in '/usr/local/lib/pkgconfig' by default). A program using CLN can be compiled and linked using (1) g++ `pkg-config --libs cln` `pkg-config --cflags cln` prog.cc -o prog Software using GNU autoconf can check for CLN with the 'PKG_CHECK_MODULES' macro supplied with 'pkg-config'. PKG_CHECK_MODULES([CLN], [cln >= MIN-VERSION]) This will check for CLN version at least MIN-VERSION. If the required version was found, the variables CLN_CFLAGS and CLN_LIBS are set. Otherwise the configure script aborts. If this is not the desired behaviour, use the following code instead (2) PKG_CHECK_MODULES([CLN], [cln >= MIN-VERSION], [], [AC_MSG_WARNING([No suitable version of CLN can be found])]) ---------- Footnotes ---------- (1) If you installed CLN to non-standard location PREFIX, you need to set the 'PKG_CONFIG_PATH' environment variable to PREFIX/lib/pkgconfig for this to work. (2) See the 'pkg-config' documentation for more details.  File: cln.info, Node: Include files, Next: An Example, Prev: Compiler options, Up: Using the library 11.2 Include files ================== Here is a summary of the include files and their contents. '' General definitions, reference counting, garbage collection. '' The class cl_number. '' Functions for class cl_N, the complex numbers. '' Functions for class cl_R, the real numbers. '' Functions for class cl_F, the floats. '' Functions for class cl_SF, the short-floats. '' Functions for class cl_FF, the single-floats. '' Functions for class cl_DF, the double-floats. '' Functions for class cl_LF, the long-floats. '' Functions for class cl_RA, the rational numbers. '' Functions for class cl_I, the integers. '' Input/Output. '' Input/Output for class cl_N, the complex numbers. '' Input/Output for class cl_R, the real numbers. '' Input/Output for class cl_F, the floats. '' Input/Output for class cl_SF, the short-floats. '' Input/Output for class cl_FF, the single-floats. '' Input/Output for class cl_DF, the double-floats. '' Input/Output for class cl_LF, the long-floats. '' Input/Output for class cl_RA, the rational numbers. '' Input/Output for class cl_I, the integers. '' Flags for customizing input operations. '' Flags for customizing output operations. '' 'malloc_hook', 'free_hook'. '' Exception base class. '' Conditions. '' Strings. '' Symbols. '' Property lists. '' General rings. '' The null ring. '' The ring of complex numbers. '' The ring of real numbers. '' The ring of rational numbers. '' The ring of integers. '' Number threory functions. '' Modular integers. '' Vectors. '' General vectors. '' General vectors over cl_number. '' General vectors over cl_N. '' General vectors over cl_R. '' General vectors over cl_RA. '' General vectors over cl_I. '' General vectors of modular integers. '' Simple vectors. '' Simple vectors over cl_number. '' Simple vectors over cl_N. '' Simple vectors over cl_R. '' Simple vectors over cl_RA. '' Simple vectors over cl_I. '' Simple vectors of general ring elements. '' Univariate polynomials. '' Univariate polynomials over the integers. '' Univariate polynomials over the rational numbers. '' Univariate polynomials over the real numbers. '' Univariate polynomials over the complex numbers. '' Univariate polynomials over modular integer rings. '' Timing facilities. '' Includes all of the above.  File: cln.info, Node: An Example, Next: Debugging support, Prev: Include files, Up: Using the library 11.3 An Example =============== A function which computes the nth Fibonacci number can be written as follows. #include #include using namespace cln; // Returns F_n, computed as the nearest integer to // ((1+sqrt(5))/2)^n/sqrt(5). Assume n>=0. const cl_I fibonacci (int n) { // Need a precision of ((1+sqrt(5))/2)^-n. float_format_t prec = float_format((int)(0.208987641*n+5)); cl_R sqrt5 = sqrt(cl_float(5,prec)); cl_R phi = (1+sqrt5)/2; return round1( expt(phi,n)/sqrt5 ); } Let's explain what is going on in detail. The include file '' is necessary because the type 'cl_I' is used in the function, and the include file '' is needed for the type 'cl_R' and the floating point number functions. The order of the include files does not matter. In order not to write out 'cln::'FOO in this simple example we can safely import the whole namespace 'cln'. Then comes the function declaration. The argument is an 'int', the result an integer. The return type is defined as 'const cl_I', not simply 'cl_I', because that allows the compiler to detect typos like 'fibonacci(n) = 100'. It would be possible to declare the return type as 'const cl_R' (real number) or even 'const cl_N' (complex number). We use the most specialized possible return type because functions which call 'fibonacci' will be able to profit from the compiler's type analysis: Adding two integers is slightly more efficient than adding the same objects declared as complex numbers, because it needs less type dispatch. Also, when linking to CLN as a non-shared library, this minimizes the size of the resulting executable program. The result will be computed as expt(phi,n)/sqrt(5), rounded to the nearest integer. In order to get a correct result, the absolute error should be less than 1/2, i.e. the relative error should be less than sqrt(5)/(2*expt(phi,n)). To this end, the first line computes a floating point precision for sqrt(5) and phi. Then sqrt(5) is computed by first converting the integer 5 to a floating point number and than taking the square root. The converse, first taking the square root of 5, and then converting to the desired precision, would not work in CLN: The square root would be computed to a default precision (normally single-float precision), and the following conversion could not help about the lacking accuracy. This is because CLN is not a symbolic computer algebra system and does not represent sqrt(5) in a non-numeric way. The type 'cl_R' for sqrt5 and, in the following line, phi is the only possible choice. You cannot write 'cl_F' because the C++ compiler can only infer that 'cl_float(5,prec)' is a real number. You cannot write 'cl_N' because a 'round1' does not exist for general complex numbers. When the function returns, all the local variables in the function are automatically reclaimed (garbage collected). Only the result survives and gets passed to the caller. The file 'fibonacci.cc' in the subdirectory 'examples' contains this implementation together with an even faster algorithm.  File: cln.info, Node: Debugging support, Next: Reporting Problems, Prev: An Example, Up: Using the library 11.4 Debugging support ====================== When debugging a CLN application with GNU 'gdb', two facilities are available from the library: * The library does type checks, range checks, consistency checks at many places. When one of these fails, an exception of a type derived from 'runtime_exception' is thrown. When an exception is cought, the stack has already been unwound, so it is may not be possible to tell at which point the exception was thrown. For debugging, it is best to set up a catchpoint at the event of throwning a C++ exception: (gdb) catch throw When this catchpoint is hit, look at the stack's backtrace: (gdb) where When control over the type of exception is required, it may be possible to set a breakpoint at the 'g++' runtime library function '__raise_exception'. Refer to the documentation of GNU 'gdb' for details. * The debugger's normal 'print' command doesn't know about CLN's types and therefore prints mostly useless hexadecimal addresses. CLN offers a function 'cl_print', callable from the debugger, for printing number objects. In order to get this function, you have to define the macro 'CL_DEBUG' and then include all the header files for which you want 'cl_print' debugging support. For example: #define CL_DEBUG #include Now, if you have in your program a variable 'cl_string s', and inspect it under 'gdb', the output may look like this: (gdb) print s $7 = { = { = {pointer = 0x8055b60, heappointer = 0x8055b60, word = 134568800}}, } (gdb) call cl_print(s) (cl_string) "" $8 = 134568800 Note that the output of 'cl_print' goes to the program's error output, not to gdb's standard output. Note, however, that the above facility does not work with all CLN types, only with number objects and similar. Therefore CLN offers a member function 'debug_print()' on all CLN types. The same macro 'CL_DEBUG' is needed for this member function to be implemented. Under 'gdb', you call it like this: (gdb) print s $7 = { = { = {pointer = 0x8055b60, heappointer = 0x8055b60, word = 134568800}}, } (gdb) call s.debug_print() (cl_string) "" (gdb) define cprint >call ($1).debug_print() >end (gdb) cprint s (cl_string) "" Unfortunately, this feature does not seem to work under all circumstances.  File: cln.info, Node: Reporting Problems, Prev: Debugging support, Up: Using the library 11.5 Reporting Problems ======================= If you encounter any problem, please don't hesitate to send a detailed bugreport to the 'cln-list@ginac.de' mailing list. Please think about your bug: consider including a short description of your operating system and compilation environment with corresponding version numbers. A description of your configuration options may also be helpful. Also, a short test program together with the output you get and the output you expect will help us to reproduce it quickly. Finally, do not forget to report the version number of CLN.  File: cln.info, Node: Customizing, Next: Index, Prev: Using the library, Up: Top 12 Customizing ************** * Menu: * Error handling:: * Floating-point underflow:: * Customizing I/O:: * Customizing the memory allocator::  File: cln.info, Node: Error handling, Next: Floating-point underflow, Up: Customizing 12.1 Error handling =================== CLN signals abnormal situations by throwning exceptions. All exceptions thrown by the library are of type 'runtime_exception' or of a derived type. Class 'cln::runtime_exception' in turn is derived from the C++ standard library class 'std::runtime_error' and inherits the '.what()' member function that can be used to query details about the cause of error. The most important classes thrown by the library are Exception base class runtime_exception | +----------------+----------------+ | | Malformed number input Floating-point error read_number_exception floating_poing_exception CLN has many more exception classes that allow for more fine-grained control but I refrain from documenting them all here. They are all declared in the public header files and they are all subclasses of the above exceptions, so catching those you are always on the safe side.  File: cln.info, Node: Floating-point underflow, Next: Customizing I/O, Prev: Error handling, Up: Customizing 12.2 Floating-point underflow ============================= Floating point underflow denotes the situation when a floating-point number is to be created which is so close to '0' that its exponent is too low to be represented internally. By default, this causes the exception 'floating_point_underflow_exception' (subclass of 'floating_point_exception') to be thrown. If you set the global variable bool cl_inhibit_floating_point_underflow to 'true', the exception will be inhibited, and a floating-point zero will be generated instead. The default value of 'cl_inhibit_floating_point_underflow' is 'false'.  File: cln.info, Node: Customizing I/O, Next: Customizing the memory allocator, Prev: Floating-point underflow, Up: Customizing 12.3 Customizing I/O ==================== The output of the function 'fprint' may be customized by changing the value of the global variable 'default_print_flags'.  File: cln.info, Node: Customizing the memory allocator, Prev: Customizing I/O, Up: Customizing 12.4 Customizing the memory allocator ===================================== Every memory allocation of CLN is done through the function pointer 'malloc_hook'. Freeing of this memory is done through the function pointer 'free_hook'. The default versions of these functions, provided in the library, call 'malloc' and 'free' and check the 'malloc' result against 'NULL'. If you want to provide another memory allocator, you need to define the variables 'malloc_hook' and 'free_hook' yourself, like this: #include namespace cln { void* (*malloc_hook) (size_t size) = ...; void (*free_hook) (void* ptr) = ...; } The 'cl_malloc_hook' function must not return a 'NULL' pointer. It is not possible to change the memory allocator at runtime, because it is already called at program startup by the constructors of some global variables.  File: cln.info, Node: Index, Prev: Customizing, Up: Top Index ***** [index] * Menu: * 'abs ()': Elementary functions. (line 63) * abstract class: Ordinary number types. (line 34) * 'acos ()': Trigonometric functions. (line 46) * 'acosh ()': Hyperbolic functions. (line 40) * advocacy: Why C++ ?. (line 6) * Archimedes' constant: Trigonometric functions. (line 74) * 'As()()': Conversions. (line 69) * 'ash ()': Logical functions. (line 134) * 'asin': Trigonometric functions. (line 37) * 'asin ()': Trigonometric functions. (line 37) * 'asinh ()': Hyperbolic functions. (line 32) * 'atan': Trigonometric functions. (line 53) * 'atan ()': Trigonometric functions. (line 53) * 'atanh ()': Hyperbolic functions. (line 47) * 'basering ()': Functions on univariate polynomials. (line 10) * binary splitting: Introduction. (line 68) * 'binomial ()': Combinatorial functions. (line 16) * 'boole ()': Logical functions. (line 54) * 'boole_1': Logical functions. (line 58) * 'boole_2': Logical functions. (line 58) * 'boole_and': Logical functions. (line 58) * 'boole_andc1': Logical functions. (line 58) * 'boole_andc2': Logical functions. (line 58) * 'boole_c1': Logical functions. (line 58) * 'boole_c2': Logical functions. (line 58) * 'boole_clr': Logical functions. (line 58) * 'boole_eqv': Logical functions. (line 58) * 'boole_nand': Logical functions. (line 58) * 'boole_nor': Logical functions. (line 58) * 'boole_orc1': Logical functions. (line 58) * 'boole_orc2': Logical functions. (line 58) * 'boole_set': Logical functions. (line 58) * 'boole_xor': Logical functions. (line 58) * bugreports: Reporting Problems. (line 6) * 'canonhom ()': Rings. (line 29) * 'canonhom ()' <1>: Functions on modular integers. (line 18) * 'canonhom ()' <2>: Functions on univariate polynomials. (line 19) * cast: Conversions. (line 69) * Catalan's constant: Euler gamma. (line 18) * 'catalanconst ()': Euler gamma. (line 21) * 'ceiling1 ()': Rounding functions. (line 47) * 'ceiling2 ()': Rounding functions. (line 99) * Chebyshev polynomial: Special polynomials. (line 9) * 'cis ()': Trigonometric functions. (line 33) * 'cl_byte': Logical functions. (line 77) * 'CL_DEBUG': Debugging support. (line 30) * 'cl_DF': Floating-point numbers. (line 41) * 'cl_DF_fdiv_t': Rounding functions. (line 127) * 'cl_F': Ordinary number types. (line 51) * 'cl_F' <1>: Floating-point numbers. (line 61) * 'cl_FF': Floating-point numbers. (line 35) * 'cl_FF_fdiv_t': Rounding functions. (line 127) * 'cl_float ()': Conversion to floating-point numbers. (line 24) * 'cl_F_fdiv_t': Rounding functions. (line 127) * 'cl_idecoded_float': Functions on floating-point numbers. (line 59) * 'cl_I_to_int ()': Conversions. (line 50) * 'cl_I_to_long ()': Conversions. (line 52) * 'cl_I_to_uint ()': Conversions. (line 51) * 'cl_I_to_ulong ()': Conversions. (line 53) * 'cl_LF': Floating-point numbers. (line 47) * 'cl_LF_fdiv_t': Rounding functions. (line 127) * 'cl_modint_ring': Modular integer rings. (line 23) * 'cl_N': Ordinary number types. (line 39) * 'cl_number': Ordinary number types. (line 34) * 'cl_R': Ordinary number types. (line 43) * 'cl_RA': Ordinary number types. (line 46) * 'cl_R_fdiv_t': Rounding functions. (line 134) * 'cl_SF': Floating-point numbers. (line 31) * 'cl_SF_fdiv_t': Rounding functions. (line 127) * 'cl_string': Strings. (line 6) * 'cl_symbol': Symbols. (line 6) * 'coeff ()': Functions on univariate polynomials. (line 89) * 'compare ()': Comparisons. (line 25) * comparison: Comparisons. (line 6) * compiler options: Compiler options. (line 6) * 'complex ()': Elementary complex functions. (line 9) * complex number: Ordinary number types. (line 39) * complex number <1>: Complex numbers. (line 6) * 'conjugate ()': Elementary complex functions. (line 21) * conversion: Conversions. (line 6) * conversion <1>: Conversion functions. (line 6) * 'cos ()': Trigonometric functions. (line 15) * 'cosh ()': Hyperbolic functions. (line 14) * 'cosh_sinh ()': Hyperbolic functions. (line 23) * 'cosh_sinh_t': Hyperbolic functions. (line 22) * 'cos_sin ()': Trigonometric functions. (line 24) * 'cos_sin_t': Trigonometric functions. (line 23) * 'create ()': Functions on univariate polynomials. (line 26) * customizing: Customizing. (line 6) * debugging: Debugging support. (line 6) * 'debug_print ()': Debugging support. (line 48) * 'decoded_dfloat': Functions on floating-point numbers. (line 44) * 'decoded_ffloat': Functions on floating-point numbers. (line 44) * 'decoded_float': Functions on floating-point numbers. (line 44) * 'decoded_lfloat': Functions on floating-point numbers. (line 44) * 'decoded_sfloat': Functions on floating-point numbers. (line 44) * 'decode_float ()': Functions on floating-point numbers. (line 54) * 'default_float_format': Conversion to floating-point numbers. (line 16) * 'default_print_flags': Customizing I/O. (line 7) * 'default_random_state': Random number generators. (line 16) * 'degree ()': Functions on univariate polynomials. (line 80) * 'degree ()' <1>: Functions on univariate polynomials. (line 84) * 'denominator ()': Elementary rational functions. (line 12) * 'deposit_field ()': Logical functions. (line 102) * 'deriv ()': Functions on univariate polynomials. (line 97) * 'div ()': Functions on modular integers. (line 56) * 'doublefactorial ()': Combinatorial functions. (line 11) * 'double_approx ()': Conversions. (line 62) * 'dpb ()': Logical functions. (line 90) * 'equal ()': Rings. (line 22) * 'equal ()' <1>: Strings. (line 37) * 'equal ()' <2>: Symbols. (line 25) * 'equal_hashcode ()': Comparisons. (line 14) * error handling: Error handling. (line 6) * Euler's constant: Euler gamma. (line 6) * 'eulerconst ()': Euler gamma. (line 9) * 'evenp ()': Logical functions. (line 121) * exact number: Exact numbers. (line 6) * exception: Error handling. (line 6) * 'exp ()': Exponential and logarithmic functions. (line 7) * 'exp1 ()': Exponential and logarithmic functions. (line 45) * 'expt ()': Elementary functions. (line 55) * 'expt ()' <1>: Exponential and logarithmic functions. (line 39) * 'expt ()' <2>: Functions on modular integers. (line 64) * 'expt_pos ()': Elementary functions. (line 51) * 'expt_pos ()' <1>: Rings. (line 32) * 'expt_pos ()' <2>: Functions on modular integers. (line 61) * 'expt_pos ()' <3>: Functions on univariate polynomials. (line 69) * 'exquo ()': Elementary functions. (line 46) * 'factorial ()': Combinatorial functions. (line 7) * 'fceiling ()': Rounding functions. (line 111) * 'fceiling2 ()': Rounding functions. (line 132) * 'ffloor ()': Rounding functions. (line 110) * 'ffloor2 ()': Rounding functions. (line 131) * Fibonacci number: An Example. (line 7) * 'finalize ()': Functions on univariate polynomials. (line 40) * 'find_modint_ring ()': Modular integer rings. (line 34) * 'find_univpoly_ring ()': Univariate polynomial rings. (line 94) * floating-point number: Floating-point numbers. (line 6) * 'floating_point_exception': Error handling. (line 15) * 'floating_point_underflow_exception': Floating-point underflow. (line 6) * 'float_approx ()': Conversions. (line 61) * 'float_digits ()': Functions on floating-point numbers. (line 34) * 'float_epsilon ()': Conversion to floating-point numbers. (line 52) * 'float_exponent ()': Functions on floating-point numbers. (line 21) * 'float_format ()': Conversion to floating-point numbers. (line 9) * 'float_format_t': Conversion to floating-point numbers. (line 6) * 'float_negative_epsilon ()': Conversion to floating-point numbers. (line 56) * 'float_precision ()': Functions on floating-point numbers. (line 39) * 'float_radix ()': Functions on floating-point numbers. (line 26) * 'float_sign ()': Functions on floating-point numbers. (line 30) * 'float_sign ()' <1>: Functions on floating-point numbers. (line 75) * 'floor1 ()': Rounding functions. (line 45) * 'floor2 ()': Rounding functions. (line 98) * 'fprint ()': Rings. (line 21) * 'fprint ()' <1>: Functions on modular integers. (line 86) * 'fprint ()' <2>: Functions on univariate polynomials. (line 104) * 'free_hook ()': Customizing the memory allocator. (line 18) * 'fround ()': Rounding functions. (line 113) * 'fround2 ()': Rounding functions. (line 134) * 'ftruncate ()': Rounding functions. (line 112) * 'ftruncate2 ()': Rounding functions. (line 133) * garbage collection: Memory efficiency. (line 10) * garbage collection <1>: Garbage collection. (line 6) * 'gcd ()': Number theoretic functions. (line 7) * GMP: Introduction. (line 60) * GMP <1>: Using the GNU MP Library. (line 6) * header files: Include files. (line 6) * 'hermite ()': Special polynomials. (line 12) * Hermite polynomial: Special polynomials. (line 12) * 'imagpart ()': Elementary complex functions. (line 18) * immediate numbers: Exact numbers. (line 23) * immediate numbers <1>: Memory efficiency. (line 13) * include files: Include files. (line 6) * Input/Output: Input/Output. (line 6) * installation: Installing the library. (line 6) * 'instanceof ()': Rings. (line 55) * integer: Ordinary number types. (line 46) * 'integer_decode_float ()': Functions on floating-point numbers. (line 66) * 'integer_length ()': Logical functions. (line 139) * 'isprobprime()': Number theoretic functions. (line 37) * 'isqrt ()': Roots. (line 24) * 'jacobi()': Number theoretic functions. (line 32) * 'laguerre ()': Special polynomials. (line 18) * Laguerre polynomial: Special polynomials. (line 18) * 'lcm ()': Number theoretic functions. (line 22) * 'ldb ()': Logical functions. (line 82) * 'ldb_test ()': Logical functions. (line 86) * 'least_negative_float ()': Conversion to floating-point numbers. (line 48) * 'least_positive_float ()': Conversion to floating-point numbers. (line 44) * Legende polynomial: Special polynomials. (line 15) * 'legendre ()': Special polynomials. (line 15) * 'ln ()': Exponential and logarithmic functions. (line 13) * 'log ()': Exponential and logarithmic functions. (line 16) * 'logand ()': Logical functions. (line 20) * 'logandc1 ()': Logical functions. (line 41) * 'logandc2 ()': Logical functions. (line 44) * 'logbitp ()': Logical functions. (line 67) * 'logcount ()': Logical functions. (line 71) * 'logeqv ()': Logical functions. (line 32) * 'logior ()': Logical functions. (line 24) * 'lognand ()': Logical functions. (line 35) * 'lognor ()': Logical functions. (line 38) * 'lognot ()': Logical functions. (line 16) * 'logorc1 ()': Logical functions. (line 47) * 'logorc2 ()': Logical functions. (line 50) * 'logp ()': Number theoretic functions. (line 26) * 'logtest ()': Logical functions. (line 63) * 'logxor ()': Logical functions. (line 28) * mailing list: Reporting Problems. (line 6) * 'make': Make utility. (line 6) * 'malloc_hook ()': Customizing the memory allocator. (line 18) * 'mask_field ()': Logical functions. (line 98) * 'max ()': Comparisons. (line 41) * 'min ()': Comparisons. (line 44) * 'minus ()': Rings. (line 26) * 'minus1 ()': Elementary functions. (line 22) * 'minusp ()': Comparisons. (line 35) * 'mod ()': Rounding functions. (line 159) * modifying operators: Modifying operators. (line 6) * modular integer: Modular integers. (line 6) * 'modulus': Functions on modular integers. (line 9) * 'monomial ()': Functions on univariate polynomials. (line 22) * Montgomery multiplication: Modular integer rings. (line 36) * 'most_negative_float ()': Conversion to floating-point numbers. (line 40) * 'most_positive_float ()': Conversion to floating-point numbers. (line 36) * 'mul ()': Rings. (line 30) * namespace: Introduction. (line 77) * 'nextprobprime()': Number theoretic functions. (line 41) * 'numerator ()': Elementary rational functions. (line 9) * 'oddp ()': Logical functions. (line 117) * 'one ()': Rings. (line 28) * 'one ()' <1>: Functions on modular integers. (line 15) * 'one ()' <2>: Functions on univariate polynomials. (line 16) * 'operator != ()': Comparisons. (line 11) * 'operator != ()' <1>: Modular integer rings. (line 46) * 'operator != ()' <2>: Functions on modular integers. (line 76) * 'operator != ()' <3>: Functions on univariate polynomials. (line 73) * 'operator & ()': Logical functions. (line 21) * 'operator &= ()': Modifying operators. (line 23) * 'operator () ()': Functions on univariate polynomials. (line 92) * 'operator * ()': Elementary functions. (line 25) * 'operator * ()' <1>: Functions on modular integers. (line 45) * 'operator * ()' <2>: Functions on univariate polynomials. (line 61) * 'operator *= ()': Modifying operators. (line 15) * 'operator + ()': Elementary functions. (line 10) * 'operator + ()' <1>: Functions on modular integers. (line 34) * 'operator + ()' <2>: Functions on univariate polynomials. (line 52) * 'operator ++ ()': Modifying operators. (line 32) * 'operator += ()': Modifying operators. (line 13) * 'operator - ()': Elementary functions. (line 13) * 'operator - ()' <1>: Functions on modular integers. (line 38) * 'operator - ()' <2>: Functions on univariate polynomials. (line 55) * 'operator -- ()': Modifying operators. (line 38) * 'operator -= ()': Modifying operators. (line 14) * 'operator / ()': Elementary functions. (line 34) * 'operator /= ()': Modifying operators. (line 16) * 'operator < ()': Comparisons. (line 30) * 'operator << ()': Logical functions. (line 125) * 'operator << ()' <1>: Functions on modular integers. (line 68) * 'operator << ()' <2>: Functions on modular integers. (line 87) * 'operator << ()' <3>: Functions on univariate polynomials. (line 105) * 'operator <<= ()': Modifying operators. (line 26) * 'operator <= ()': Comparisons. (line 29) * 'operator == ()': Comparisons. (line 10) * 'operator == ()' <1>: Modular integer rings. (line 45) * 'operator == ()' <2>: Functions on modular integers. (line 75) * 'operator == ()' <3>: Functions on univariate polynomials. (line 72) * 'operator > ()': Comparisons. (line 32) * 'operator >= ()': Comparisons. (line 31) * 'operator >> ()': Logical functions. (line 129) * 'operator >> ()' <1>: Functions on modular integers. (line 71) * 'operator >>= ()': Modifying operators. (line 27) * 'operator [] ()': Strings. (line 33) * 'operator ^ ()': Logical functions. (line 29) * 'operator ^= ()': Modifying operators. (line 25) * 'operator | ()': Logical functions. (line 25) * 'operator |= ()': Modifying operators. (line 24) * 'operator ~ ()': Logical functions. (line 17) * 'ord2 ()': Logical functions. (line 145) * 'phase ()': Exponential and logarithmic functions. (line 22) * pi: Trigonometric functions. (line 74) * 'pi ()': Trigonometric functions. (line 78) * 'pkg-config': Compiler options. (line 22) * 'plus ()': Rings. (line 25) * 'plus1 ()': Elementary functions. (line 19) * 'plusp ()': Comparisons. (line 38) * polynomial: Univariate polynomials. (line 6) * portability: Why C++ ?. (line 10) * 'power2p ()': Logical functions. (line 150) * prime: Number theoretic functions. (line 37) * printing: Internal and printed representation. (line 13) * 'random ()': Functions on modular integers. (line 26) * 'random32 ()': Random number generators. (line 23) * 'random_F ()': Random number generators. (line 33) * 'random_I ()': Random number generators. (line 28) * 'random_R ()': Random number generators. (line 39) * 'random_state': Random number generators. (line 16) * 'rational ()': Conversion to rational numbers. (line 10) * rational number: Ordinary number types. (line 46) * 'rationalize ()': Conversion to rational numbers. (line 18) * reading: Internal and printed representation. (line 14) * 'read_number_exception': Error handling. (line 15) * real number: Ordinary number types. (line 39) * 'realpart ()': Elementary complex functions. (line 15) * 'recip ()': Elementary functions. (line 37) * 'recip ()' <1>: Functions on modular integers. (line 52) * reference counting: Memory efficiency. (line 10) * 'rem ()': Rounding functions. (line 160) * representation: Internal and printed representation. (line 6) * 'retract ()': Functions on modular integers. (line 21) * Riemann's zeta: Riemann zeta. (line 6) * ring: Modular integer rings. (line 6) * 'ring ()': Functions on modular integers. (line 31) * 'ring ()' <1>: Functions on univariate polynomials. (line 49) * 'rootp ()': Roots. (line 32) * 'round1 ()': Rounding functions. (line 51) * 'round2 ()': Rounding functions. (line 101) * rounding: Rounding functions. (line 6) * rounding error: Floating-point numbers. (line 13) * Rubik's cube: Conversions. (line 42) * 'runtime_exception': Error handling. (line 6) * 'scale_float ()': Functions on floating-point numbers. (line 13) * Schoenhage-Strassen multiplication: Introduction. (line 65) * Schoenhage-Strassen multiplication <1>: Speed efficiency. (line 20) * 'sed': Sed utility. (line 6) * 'set_coeff ()': Functions on univariate polynomials. (line 35) * 'signum ()': Elementary functions. (line 75) * 'sin ()': Trigonometric functions. (line 7) * 'sinh ()': Hyperbolic functions. (line 7) * 'size()': Strings. (line 29) * 'sqrt ()': Roots. (line 10) * 'sqrt ()' <1>: Roots. (line 40) * 'sqrtp ()': Roots. (line 18) * 'square ()': Elementary functions. (line 28) * 'square ()' <1>: Rings. (line 31) * 'square ()' <2>: Functions on modular integers. (line 49) * 'square ()' <3>: Functions on univariate polynomials. (line 66) * string: Strings. (line 6) * 'strlen ()': Strings. (line 30) * symbol: Symbols. (line 6) * symbolic type: Symbolic data types. (line 6) * 'tan ()': Trigonometric functions. (line 29) * 'tanh ()': Hyperbolic functions. (line 28) * 'The()()': Conversions. (line 70) * transcendental functions: Transcendental functions. (line 6) * 'truncate1 ()': Rounding functions. (line 49) * 'truncate2 ()': Rounding functions. (line 100) * 'tschebychev ()': Special polynomials. (line 9) * 'uminus ()': Rings. (line 27) * underflow: Floating-point underflow. (line 6) * univariate polynomial: Univariate polynomials. (line 6) * 'xgcd ()': Number theoretic functions. (line 12) * 'zero ()': Rings. (line 23) * 'zero ()' <1>: Functions on modular integers. (line 12) * 'zero ()' <2>: Functions on univariate polynomials. (line 13) * 'zerop ()': Comparisons. (line 19) * 'zerop ()' <1>: Rings. (line 24) * 'zerop ()' <2>: Functions on modular integers. (line 80) * 'zerop ()' <3>: Functions on univariate polynomials. (line 77) * 'zeta ()': Riemann zeta. (line 10)  Tag Table: Node: Top206 Node: Introduction4258 Node: Installation7071 Node: Prerequisites7415 Node: C++ compiler7670 Node: Make utility8413 Node: Sed utility8611 Node: Building the library8943 Node: Using the GNU MP Library12672 Node: Installing the library13852 Node: Cleaning up14583 Node: Ordinary number types14916 Node: Exact numbers17327 Node: Floating-point numbers18472 Node: Complex numbers22068 Node: Conversions22574 Node: Functions on numbers26392 Node: Constructing numbers27201 Node: Constructing integers27565 Node: Constructing rational numbers27839 Node: Constructing floating-point numbers28327 Node: Constructing complex numbers29456 Node: Elementary functions29832 Node: Elementary rational functions32311 Node: Elementary complex functions32891 Node: Comparisons33726 Node: Rounding functions35611 Node: Roots41400 Node: Transcendental functions43278 Node: Exponential and logarithmic functions43891 Node: Trigonometric functions45880 Node: Hyperbolic functions49236 Node: Euler gamma51320 Node: Riemann zeta52218 Node: Functions on integers52771 Node: Logical functions53085 Node: Number theoretic functions59002 Node: Combinatorial functions60850 Node: Functions on floating-point numbers61548 Node: Conversion functions64779 Node: Conversion to floating-point numbers65073 Node: Conversion to rational numbers67236 Node: Random number generators68305 Node: Modifying operators69969 Node: Input/Output71338 Node: Internal and printed representation71579 Node: Input functions74108 Node: Output functions77701 Node: Rings81134 Node: Modular integers83057 Node: Modular integer rings83270 Node: Functions on modular integers85345 Node: Symbolic data types88369 Node: Strings88678 Node: Symbols89721 Node: Univariate polynomials90632 Node: Univariate polynomial rings90907 Node: Functions on univariate polynomials95805 Node: Special polynomials99799 Node: Internals100514 Node: Why C++ ?100786 Node: Memory efficiency102282 Node: Speed efficiency102990 Node: Garbage collection104080 Node: Using the library104920 Node: Compiler options105550 Ref: Compiler options-Footnote-1107387 Ref: Compiler options-Footnote-2107550 Node: Include files107611 Node: An Example111263 Node: Debugging support114563 Node: Reporting Problems117306 Node: Customizing117982 Node: Error handling118249 Node: Floating-point underflow119529 Node: Customizing I/O120262 Node: Customizing the memory allocator120562 Node: Index121558  End Tag Table cln-1.3.3/doc/Makefile.in0000644000000000000000000006021512172603767012011 0ustar # Makefile.in generated by automake 1.13.3 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. @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 = doc DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/autoconf/texinfo.tex ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alloca.m4 \ $(top_srcdir)/m4/as-underscore.m4 $(top_srcdir)/m4/cc.m4 \ $(top_srcdir)/m4/floatparam.m4 $(top_srcdir)/m4/general.m4 \ $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gmp.m4 \ $(top_srcdir)/m4/intparam.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/param.m4 \ $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/proto.m4 \ $(top_srcdir)/m4/rusage.m4 $(top_srcdir)/m4/times.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/autoconf/cl_config.h \ $(top_builddir)/include/cln/config.h \ $(top_builddir)/include/cln/host_cpu.h \ $(top_builddir)/include/cln/version.h \ $(top_builddir)/src/base/cl_base_config.h \ $(top_builddir)/src/base/cl_gmpconfig.h \ $(top_builddir)/src/timing/cl_t_config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = AM_V_DVIPS = $(am__v_DVIPS_@AM_V@) am__v_DVIPS_ = $(am__v_DVIPS_@AM_DEFAULT_V@) am__v_DVIPS_0 = @echo " DVIPS " $@; am__v_DVIPS_1 = AM_V_MAKEINFO = $(am__v_MAKEINFO_@AM_V@) am__v_MAKEINFO_ = $(am__v_MAKEINFO_@AM_DEFAULT_V@) am__v_MAKEINFO_0 = @echo " MAKEINFO" $@; am__v_MAKEINFO_1 = AM_V_INFOHTML = $(am__v_INFOHTML_@AM_V@) am__v_INFOHTML_ = $(am__v_INFOHTML_@AM_DEFAULT_V@) am__v_INFOHTML_0 = @echo " INFOHTML" $@; am__v_INFOHTML_1 = AM_V_TEXI2DVI = $(am__v_TEXI2DVI_@AM_V@) am__v_TEXI2DVI_ = $(am__v_TEXI2DVI_@AM_DEFAULT_V@) am__v_TEXI2DVI_0 = @echo " TEXI2DVI" $@; am__v_TEXI2DVI_1 = AM_V_TEXI2PDF = $(am__v_TEXI2PDF_@AM_V@) am__v_TEXI2PDF_ = $(am__v_TEXI2PDF_@AM_DEFAULT_V@) am__v_TEXI2PDF_0 = @echo " TEXI2PDF" $@; am__v_TEXI2PDF_1 = AM_V_texinfo = $(am__v_texinfo_@AM_V@) am__v_texinfo_ = $(am__v_texinfo_@AM_DEFAULT_V@) am__v_texinfo_0 = -q am__v_texinfo_1 = AM_V_texidevnull = $(am__v_texidevnull_@AM_V@) am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@) am__v_texidevnull_0 = > /dev/null am__v_texidevnull_1 = INFO_DEPS = $(srcdir)/cln.info TEXINFO_TEX = $(top_srcdir)/autoconf/texinfo.tex am__TEXINFO_TEX_DIR = $(top_srcdir)/autoconf DVIS = cln.dvi PDFS = cln.pdf PSS = cln.ps HTMLS = cln.html TEXINFOS = cln.texi TEXI2DVI = texi2dvi TEXI2PDF = $(TEXI2DVI) --pdf --batch MAKEINFOHTML = $(MAKEINFO) --html DVIPS = dvips am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__installdirs = "$(DESTDIR)$(infodir)" 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__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS_UNDERSCORE = @AS_UNDERSCORE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLNLIB_RPATH = @CLNLIB_RPATH@ CL_VERSION = @CL_VERSION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GMP_RPATH_CFG = @GMP_RPATH_CFG@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_VERSION_INFO = @LT_VERSION_INFO@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ 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@ SED = @SED@ 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_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ info_TEXINFOS = cln.texi AM_MAKEINFOHTMLFLAGS = --no-split all: all-am .SUFFIXES: .SUFFIXES: .dvi .html .info .pdf .ps .texi $(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) --foreign doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign doc/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): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs .texi.info: $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \ am__cwd=`pwd` && $(am__cd) $(srcdir) && \ rm -rf $$backupdir && mkdir $$backupdir && \ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ done; \ else :; fi && \ cd "$$am__cwd"; \ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $@ $<; \ then \ rc=0; \ $(am__cd) $(srcdir); \ else \ rc=$$?; \ $(am__cd) $(srcdir) && \ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ fi; \ rm -rf $$backupdir; exit $$rc .texi.dvi: $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \ $< .texi.pdf: $(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \ $< .texi.html: $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp) $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $(@:.html=.htp) $<; \ then \ rm -rf $@; \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ else \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ exit 1; \ fi $(srcdir)/cln.info: cln.texi cln.dvi: cln.texi cln.pdf: cln.texi cln.html: cln.texi .dvi.ps: $(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(DVIPS) $(AM_V_texinfo) -o $@ $< uninstall-dvi-am: @$(NORMAL_UNINSTALL) @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ rm -f "$(DESTDIR)$(dvidir)/$$f"; \ done uninstall-html-am: @$(NORMAL_UNINSTALL) @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ done uninstall-info-am: @$(PRE_UNINSTALL) @if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done uninstall-pdf-am: @$(NORMAL_UNINSTALL) @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ done uninstall-ps-am: @$(NORMAL_UNINSTALL) @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ rm -f "$(DESTDIR)$(psdir)/$$f"; \ done dist-info: $(INFO_DEPS) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; \ for base in $$list; do \ case $$base in \ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ if test -f $$file; then \ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ test -f "$(distdir)/$$relfile" || \ cp -p $$file "$(distdir)/$$relfile"; \ else :; fi; \ done; \ done mostlyclean-aminfo: -rm -rf cln.t2d cln.t2p clean-aminfo: -test -z "cln.dvi cln.pdf cln.ps cln.html" \ || rm -rf cln.dvi cln.pdf cln.ps cln.html maintainer-clean-aminfo: @list='$(INFO_DEPS)'; for i in $$list; do \ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done tags TAGS: ctags CTAGS: cscope cscopelist: 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 $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-info check-am: all-am check: check-am all-am: Makefile $(INFO_DEPS) installdirs: for dir in "$(DESTDIR)$(infodir)"; 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-aminfo clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: $(DVIS) html: html-am html-am: $(HTMLS) info: info-am info-am: $(INFO_DEPS) install-data-am: install-info-am install-dvi: install-dvi-am install-dvi-am: $(DVIS) @$(NORMAL_INSTALL) @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \ $(MKDIR_P) "$(DESTDIR)$(dvidir)" || 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_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ done install-exec-am: install-html: install-html-am install-html-am: $(HTMLS) @$(NORMAL_INSTALL) @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ $(am__strip_dir) \ d2=$$d$$p; \ if test -d "$$d2"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \ $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ else \ list2="$$list2 $$d2"; \ fi; \ done; \ test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ done; } install-info: install-info-am install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \ $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \ fi; \ for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ if test -f $$ifile; then \ echo "$$ifile"; \ else : ; fi; \ done; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done @$(POST_INSTALL) @if $(am__can_run_installinfo); then \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ done; \ else : ; fi install-man: install-pdf: install-pdf-am install-pdf-am: $(PDFS) @$(NORMAL_INSTALL) @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || 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_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done install-ps: install-ps-am install-ps-am: $(PSS) @$(NORMAL_INSTALL) @list='$(PSS)'; test -n "$(psdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(psdir)" || 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_DATA) $$files '$(DESTDIR)$(psdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-aminfo \ maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: $(PDFS) ps: ps-am ps-am: $(PSS) uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ uninstall-pdf-am uninstall-ps-am .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-aminfo clean-generic \ clean-libtool cscopelist-am ctags-am dist-info distclean \ distclean-generic distclean-libtool 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-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-aminfo maintainer-clean-generic mostlyclean \ mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am \ uninstall-dvi-am uninstall-html-am uninstall-info-am \ uninstall-pdf-am uninstall-ps-am # 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: cln-1.3.3/doc/Makefile.am0000644000000000000000000000007511201634736011766 0ustar info_TEXINFOS = cln.texi AM_MAKEINFOHTMLFLAGS = --no-split cln-1.3.3/Makefile.in0000644000000000000000000010726612172604010011232 0ustar # Makefile.in generated by automake 1.13.3 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. @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 = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(top_srcdir)/autoconf/cl_config.h.in \ $(top_srcdir)/include/cln/config.h.in \ $(top_srcdir)/include/cln/host_cpu.h.in \ $(top_srcdir)/include/cln/version.h.in \ $(top_srcdir)/src/base/cl_base_config.h.in \ $(top_srcdir)/src/base/cl_gmpconfig.h.in \ $(top_srcdir)/src/timing/cl_t_config.h.in \ $(srcdir)/cln.spec.in $(srcdir)/cln.pc.in \ $(clninclude_HEADERS) COPYING ChangeLog INSTALL NEWS README \ TODO autoconf/config.guess autoconf/config.rpath \ autoconf/config.sub autoconf/depcomp autoconf/install-sh \ autoconf/missing autoconf/texinfo.tex autoconf/ltmain.sh \ $(top_srcdir)/autoconf/config.guess \ $(top_srcdir)/autoconf/config.rpath \ $(top_srcdir)/autoconf/config.sub \ $(top_srcdir)/autoconf/install-sh \ $(top_srcdir)/autoconf/ltmain.sh \ $(top_srcdir)/autoconf/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alloca.m4 \ $(top_srcdir)/m4/as-underscore.m4 $(top_srcdir)/m4/cc.m4 \ $(top_srcdir)/m4/floatparam.m4 $(top_srcdir)/m4/general.m4 \ $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gmp.m4 \ $(top_srcdir)/m4/intparam.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/param.m4 \ $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/proto.m4 \ $(top_srcdir)/m4/rusage.m4 $(top_srcdir)/m4/times.m4 \ $(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 = $(top_builddir)/autoconf/cl_config.h \ $(top_builddir)/include/cln/config.h \ $(top_builddir)/include/cln/host_cpu.h \ $(top_builddir)/include/cln/version.h \ $(top_builddir)/src/base/cl_base_config.h \ $(top_builddir)/src/base/cl_gmpconfig.h \ $(top_builddir)/src/timing/cl_t_config.h CONFIG_CLEAN_FILES = cln.spec cln.pc CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = 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 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)$(pkgconfigdir)" \ "$(DESTDIR)$(clnincludedir)" "$(DESTDIR)$(clnincludedir)" DATA = $(pkgconfig_DATA) HEADERS = $(clninclude_HEADERS) $(nodist_clninclude_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) # 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 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 $(distdir).tar.bz2 GZIP_ENV = --best DIST_TARGETS = dist-bzip2 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@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS_UNDERSCORE = @AS_UNDERSCORE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLNLIB_RPATH = @CLNLIB_RPATH@ CL_VERSION = @CL_VERSION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GMP_RPATH_CFG = @GMP_RPATH_CFG@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_VERSION_INFO = @LT_VERSION_INFO@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ 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@ SED = @SED@ 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_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ SUBDIRS = src tests examples doc benchmarks DIST_SUBDIRS = src tests examples doc benchmarks pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = cln.pc EXTRA_DIST = cln.pc.in cln.spec.in include/cln/config.h.in \ include/cln/host_cpu.h.in include/cln/version.h.in \ autoconf/floatparam.c autoconf/intparam.c DISTCLEANFILES = cln.pc include/cln/config.h include/cln/host_cpu.h \ include/cln/intparam.h include/cln/floatparam.h ACLOCAL_AMFLAGS = -I m4 clnincludedir = $(includedir)/cln clninclude_HEADERS = \ include/cln/SV_real.h \ include/cln/GV_integer.h \ include/cln/floatformat.h \ include/cln/lfloat.h \ include/cln/null_ring.h \ include/cln/io.h \ include/cln/ring.h \ include/cln/V.h \ include/cln/GV.h \ include/cln/GV_number.h \ include/cln/complex_io.h \ include/cln/condition.h \ include/cln/integer_ring.h \ include/cln/dfloat_io.h \ include/cln/random.h \ include/cln/SV_ringelt.h \ include/cln/ffloat_io.h \ include/cln/float_class.h \ include/cln/cln.h \ include/cln/ffloat_class.h \ include/cln/float.h \ include/cln/string.h \ include/cln/lfloat_io.h \ include/cln/malloc.h \ include/cln/lfloat_class.h \ include/cln/number_io.h \ include/cln/numtheory.h \ include/cln/object.h \ include/cln/proplist.h \ include/cln/univpoly_rational.h \ include/cln/univpoly_real.h \ include/cln/output.h \ include/cln/real_io.h \ include/cln/ffloat.h \ include/cln/sfloat_io.h \ include/cln/timing.h \ include/cln/SV_number.h \ include/cln/complex_ring.h \ include/cln/univpoly_complex.h \ include/cln/version.h \ include/cln/rational.h \ include/cln/rational_class.h \ include/cln/rational_io.h \ include/cln/types.h \ include/cln/univpoly_modint.h \ include/cln/modinteger.h \ include/cln/rational_ring.h \ include/cln/univpoly_integer.h \ include/cln/number.h \ include/cln/GV_complex.h \ include/cln/GV_modinteger.h \ include/cln/GV_real.h \ include/cln/SV_complex.h \ include/cln/SV_integer.h \ include/cln/complex.h \ include/cln/exception.h \ include/cln/univpoly.h \ include/cln/SV_rational.h \ include/cln/complex_class.h \ include/cln/real.h \ include/cln/symbol.h \ include/cln/dfloat_class.h \ include/cln/modules.h \ include/cln/real_ring.h \ include/cln/float_io.h \ include/cln/GV_rational.h \ include/cln/input.h \ include/cln/integer_class.h \ include/cln/integer_io.h \ include/cln/real_class.h \ include/cln/sfloat.h \ include/cln/sfloat_class.h \ include/cln/dfloat.h \ include/cln/SV.h \ include/cln/integer.h nodist_clninclude_HEADERS = \ include/cln/config.h \ include/cln/host_cpu.h \ include/cln/intparam.h DISTCHECK_CONFIGURE_FLAGS = --disable-static all: all-recursive .SUFFIXES: 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) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign 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): autoconf/cl_config.h: autoconf/stamp-h1 @if test ! -f $@; then rm -f autoconf/stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) autoconf/stamp-h1; else :; fi autoconf/stamp-h1: $(top_srcdir)/autoconf/cl_config.h.in $(top_builddir)/config.status @rm -f autoconf/stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status autoconf/cl_config.h $(top_srcdir)/autoconf/cl_config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f autoconf/stamp-h1 touch $@ include/cln/config.h: include/cln/stamp-h2 @if test ! -f $@; then rm -f include/cln/stamp-h2; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) include/cln/stamp-h2; else :; fi include/cln/stamp-h2: $(top_srcdir)/include/cln/config.h.in $(top_builddir)/config.status @rm -f include/cln/stamp-h2 cd $(top_builddir) && $(SHELL) ./config.status include/cln/config.h include/cln/host_cpu.h: include/cln/stamp-h3 @if test ! -f $@; then rm -f include/cln/stamp-h3; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) include/cln/stamp-h3; else :; fi include/cln/stamp-h3: $(top_srcdir)/include/cln/host_cpu.h.in $(top_builddir)/config.status @rm -f include/cln/stamp-h3 cd $(top_builddir) && $(SHELL) ./config.status include/cln/host_cpu.h include/cln/version.h: include/cln/stamp-h4 @if test ! -f $@; then rm -f include/cln/stamp-h4; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) include/cln/stamp-h4; else :; fi include/cln/stamp-h4: $(top_srcdir)/include/cln/version.h.in $(top_builddir)/config.status @rm -f include/cln/stamp-h4 cd $(top_builddir) && $(SHELL) ./config.status include/cln/version.h src/base/cl_base_config.h: src/base/stamp-h5 @if test ! -f $@; then rm -f src/base/stamp-h5; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) src/base/stamp-h5; else :; fi src/base/stamp-h5: $(top_srcdir)/src/base/cl_base_config.h.in $(top_builddir)/config.status @rm -f src/base/stamp-h5 cd $(top_builddir) && $(SHELL) ./config.status src/base/cl_base_config.h src/base/cl_gmpconfig.h: src/base/stamp-h6 @if test ! -f $@; then rm -f src/base/stamp-h6; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) src/base/stamp-h6; else :; fi src/base/stamp-h6: $(top_srcdir)/src/base/cl_gmpconfig.h.in $(top_builddir)/config.status @rm -f src/base/stamp-h6 cd $(top_builddir) && $(SHELL) ./config.status src/base/cl_gmpconfig.h src/timing/cl_t_config.h: src/timing/stamp-h7 @if test ! -f $@; then rm -f src/timing/stamp-h7; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) src/timing/stamp-h7; else :; fi src/timing/stamp-h7: $(top_srcdir)/src/timing/cl_t_config.h.in $(top_builddir)/config.status @rm -f src/timing/stamp-h7 cd $(top_builddir) && $(SHELL) ./config.status src/timing/cl_t_config.h distclean-hdr: -rm -f autoconf/cl_config.h autoconf/stamp-h1 include/cln/config.h include/cln/stamp-h2 include/cln/host_cpu.h include/cln/stamp-h3 include/cln/version.h include/cln/stamp-h4 src/base/cl_base_config.h src/base/stamp-h5 src/base/cl_gmpconfig.h src/base/stamp-h6 src/timing/cl_t_config.h src/timing/stamp-h7 cln.spec: $(top_builddir)/config.status $(srcdir)/cln.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ cln.pc: $(top_builddir)/config.status $(srcdir)/cln.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || 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_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-clnincludeHEADERS: $(clninclude_HEADERS) @$(NORMAL_INSTALL) @list='$(clninclude_HEADERS)'; test -n "$(clnincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(clnincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(clnincludedir)" || 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)$(clnincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(clnincludedir)" || exit $$?; \ done uninstall-clnincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(clninclude_HEADERS)'; test -n "$(clnincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(clnincludedir)'; $(am__uninstall_files_from_dir) install-nodist_clnincludeHEADERS: $(nodist_clninclude_HEADERS) @$(NORMAL_INSTALL) @list='$(nodist_clninclude_HEADERS)'; test -n "$(clnincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(clnincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(clnincludedir)" || 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)$(clnincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(clnincludedir)" || exit $$?; \ done uninstall-nodist_clnincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_clninclude_HEADERS)'; test -n "$(clnincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(clnincludedir)'; $(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 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir 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 --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(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 $(DATA) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(clnincludedir)" "$(DESTDIR)$(clnincludedir)"; 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) 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-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-clnincludeHEADERS \ install-nodist_clnincludeHEADERS install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: 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-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-clnincludeHEADERS \ uninstall-nodist_clnincludeHEADERS uninstall-pkgconfigDATA .MAKE: $(am__recursive_targets) 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-libtool 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-generic \ distclean-hdr distclean-libtool distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-clnincludeHEADERS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man \ install-nodist_clnincludeHEADERS install-pdf install-pdf-am \ install-pkgconfigDATA install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ uninstall-clnincludeHEADERS uninstall-nodist_clnincludeHEADERS \ uninstall-pkgconfigDATA $(pkgconfig_DATA): config.status # Rule to build tar-bzipped distribution package $(PACKAGE)-$(VERSION).tar.gz: dist # 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: cln-1.3.3/Makefile.am0000644000000000000000000000540111201634735011216 0ustar SUBDIRS = src tests examples doc benchmarks DIST_SUBDIRS = src tests examples doc benchmarks pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = cln.pc EXTRA_DIST = cln.pc.in cln.spec.in DISTCLEANFILES = cln.pc $(pkgconfig_DATA): config.status # Rule to build tar-bzipped distribution package $(PACKAGE)-$(VERSION).tar.gz: dist ACLOCAL_AMFLAGS = -I m4 clnincludedir = $(includedir)/cln clninclude_HEADERS = \ include/cln/SV_real.h \ include/cln/GV_integer.h \ include/cln/floatformat.h \ include/cln/lfloat.h \ include/cln/null_ring.h \ include/cln/io.h \ include/cln/ring.h \ include/cln/V.h \ include/cln/GV.h \ include/cln/GV_number.h \ include/cln/complex_io.h \ include/cln/condition.h \ include/cln/integer_ring.h \ include/cln/dfloat_io.h \ include/cln/random.h \ include/cln/SV_ringelt.h \ include/cln/ffloat_io.h \ include/cln/float_class.h \ include/cln/cln.h \ include/cln/ffloat_class.h \ include/cln/float.h \ include/cln/string.h \ include/cln/lfloat_io.h \ include/cln/malloc.h \ include/cln/lfloat_class.h \ include/cln/number_io.h \ include/cln/numtheory.h \ include/cln/object.h \ include/cln/proplist.h \ include/cln/univpoly_rational.h \ include/cln/univpoly_real.h \ include/cln/output.h \ include/cln/real_io.h \ include/cln/ffloat.h \ include/cln/sfloat_io.h \ include/cln/timing.h \ include/cln/SV_number.h \ include/cln/complex_ring.h \ include/cln/univpoly_complex.h \ include/cln/version.h \ include/cln/rational.h \ include/cln/rational_class.h \ include/cln/rational_io.h \ include/cln/types.h \ include/cln/univpoly_modint.h \ include/cln/modinteger.h \ include/cln/rational_ring.h \ include/cln/univpoly_integer.h \ include/cln/number.h \ include/cln/GV_complex.h \ include/cln/GV_modinteger.h \ include/cln/GV_real.h \ include/cln/SV_complex.h \ include/cln/SV_integer.h \ include/cln/complex.h \ include/cln/exception.h \ include/cln/univpoly.h \ include/cln/SV_rational.h \ include/cln/complex_class.h \ include/cln/real.h \ include/cln/symbol.h \ include/cln/dfloat_class.h \ include/cln/modules.h \ include/cln/real_ring.h \ include/cln/float_io.h \ include/cln/GV_rational.h \ include/cln/input.h \ include/cln/integer_class.h \ include/cln/integer_io.h \ include/cln/real_class.h \ include/cln/sfloat.h \ include/cln/sfloat_class.h \ include/cln/dfloat.h \ include/cln/SV.h \ include/cln/integer.h ## FIXME: we should NOT expose these macros to users nodist_clninclude_HEADERS = \ include/cln/config.h \ include/cln/host_cpu.h \ include/cln/intparam.h DISTCLEANFILES += \ include/cln/config.h \ include/cln/host_cpu.h \ include/cln/intparam.h \ include/cln/floatparam.h EXTRA_DIST += include/cln/config.h.in \ include/cln/host_cpu.h.in \ include/cln/version.h.in \ autoconf/floatparam.c \ autoconf/intparam.c DISTCHECK_CONFIGURE_FLAGS = --disable-static cln-1.3.3/cln.pc.in0000644000000000000000000000033711201634736010673 0ustar prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: cln Description: Class Library for Numbers Version: @CL_VERSION@ Libs: -L${libdir} -lcln Libs.private: @LIBS@ Cflags: -I${includedir} cln-1.3.3/src/0000755000000000000000000000000012173046176007756 5ustar cln-1.3.3/src/integer/0000755000000000000000000000000012173046200011377 5ustar cln-1.3.3/src/integer/random/0000755000000000000000000000000012173046201012660 5ustar cln-1.3.3/src/integer/random/cl_I_trandom.cc0000644000000000000000000000164311201634740015567 0ustar // testrandom_I(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "base/random/cl_random_impl.h" #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_I testrandom_I (random_state& randomstate) { var uint32 ran = random32(randomstate); var bool negative = (ran & 1); var bool algo = ((ran>>1) & 1); ran = ran >> 2; ran = ran & ((1<<8)-1); var uintC len = (ran == 0 ? 0 : ran <= 80 ? 1 : ran <= 128 ? 2 : ran <= 158 ? 3 : ran <= 172 ? 4 : ran <= 200 ? (ran-153)/4 : // 5..11 ran-189 // 12..66 ); CL_ALLOCA_STACK; var uintD* MSDptr; num_stack_alloc_1(len,MSDptr=,); if (algo) { testrandom_UDS(randomstate,MSDptr,len); } else { random_UDS(randomstate,MSDptr,len); } var cl_I x = UDS_to_I(MSDptr,len); return (negative ? -x : x); } } // namespace cln cln-1.3.3/src/integer/random/cl_I_random.cc0000644000000000000000000000157711201634740015411 0ustar // random_I(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "base/random/cl_random_impl.h" #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_I random_I (random_state& randomstate, const cl_I& n) { CL_ALLOCA_STACK; var const uintD* n_MSDptr; var uintC n_len; var const uintD* n_LSDptr; I_to_NDS_nocopy(n, n_MSDptr=,n_len=,n_LSDptr=,false,); // Digit sequence >0 zu n var uintD* MSDptr; var uintC len = n_len + ceiling(16,intDsize); // 16 Bits mehr // neue UDS mit len Zufallsdigits bilden: num_stack_alloc(len,MSDptr=,); random_UDS(randomstate,MSDptr,len); // und durch n dividieren: var DS q; var DS r; UDS_divide(MSDptr,len,MSDptr mspop len, n_MSDptr,n_len,n_LSDptr, &q,&r); // Rest in Integer umwandeln: return NUDS_to_I(r.MSDptr,r.len); } } // namespace cln cln-1.3.3/src/integer/algebraic/0000755000000000000000000000000012173046200013310 5ustar cln-1.3.3/src/integer/algebraic/cl_I_sqrtp.cc0000644000000000000000000000612711201634737015735 0ustar // sqrtp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { bool sqrtp (const cl_I& x, cl_I* w) { // Methode: // [Henri Cohen: A course in computational algebraic number theory, 2nd prnt., // section 1.7.2.] // If x is a square, it has not only to be ==0,1 mod 4, but also // - one of the 12 squares mod 64, // - one of the 16 squares mod 63, // - one of the 21 squares mod 65, // - one of the 6 squares mod 11. // Then we check whether the ISQRT gives the remainder 0. static char squares_mod_11 [11] = // 0 1 3 4 5 9 { 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0 }; static char squares_mod_63 [63] = // 0 1 4 7 9 16 18 22 25 28 36 37 43 46 49 58 { 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }; static char squares_mod_64 [64] = // 0 1 4 9 16 17 25 33 36 41 49 57 { 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 }; static char squares_mod_65 [65] = // 0 1 4 9 10 14 16 25 26 29 30 35 36 39 40 49 51 55 56 61 64 { 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1 }; { CL_ALLOCA_STACK; var const uintD* x_MSDptr; var uintC x_len; var const uintD* x_LSDptr; I_to_NDS_nocopy(x, x_MSDptr=,x_len=,x_LSDptr=, // Digit sequence >=0 zu x true, { *w = 0; return true; } // 0 is a square ); // Check mod 64. { var uintD lsd = lspref(x_LSDptr,0); if (!squares_mod_64[lsd & 63]) { return false; } // not a square mod 64 -> not a square } // Check mod 63. { var cl_I_div_t div63 = cl_divide(x,L_to_FN(63)); if (!squares_mod_63[FN_to_UV(div63.remainder)]) { return false; } // not a square mod 63 -> not a square } // Check mod 65. { var cl_I_div_t div65 = cl_divide(x,L_to_FN(65)); if (!squares_mod_65[FN_to_UV(div65.remainder)]) { return false; } // not a square mod 65 -> not a square } // Check mod 11. { var cl_I_div_t div11 = cl_divide(x,L_to_FN(11)); if (!squares_mod_11[FN_to_UV(div11.remainder)]) { return false; } // not a square mod 11 -> not a square } // Check with full precision. { var DS y; var bool squarep; UDS_sqrt(x_MSDptr,x_len,x_LSDptr, &y, squarep=); // Wurzel ziehen if (squarep) { *w = NUDS_to_I(y.MSDptr,y.len); } // als Integer return squarep; } } } // Bit complexity (x of length N): O(M(N)). } // namespace cln cln-1.3.3/src/integer/algebraic/cl_I_rootp.cc0000644000000000000000000000117311201634737015723 0ustar // rootp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" namespace cln { // Methode: // Falls x=0 oder x=1: x = x^n -> JA, x als Ergebnis. // Hier also x>1. Suche ein Integer y > 1 mit x=y^n. // Falls n >= integer_length(x): NEIN. (Da y>=2, müßte x>=2^n gelten.) // Hier also n>0 klein... bool rootp (const cl_I& x, uintL n, cl_I* w) { if (eq(x,0) || eq(x,1)) // x=0 oder x=1 ? { *w = x; return true; } // ja -> x als Ergebnis if (n >= integer_length(x)) { return false; } return cl_rootp_aux(x,n,w); } } // namespace cln cln-1.3.3/src/integer/algebraic/cl_I_rootp_I.cc0000644000000000000000000000134411201634737016173 0ustar // rootp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" namespace cln { // Methode: // Falls x=0 oder x=1: x = x^n -> JA, x als Ergebnis. // Hier also x>1. Suche ein Integer y > 1 mit x=y^n. // Falls n >= integer_length(x): NEIN. (Da y>=2, müßte x>=2^n gelten.) // Hier also n>0 klein... bool rootp (const cl_I& x, const cl_I& n, cl_I* w) { if (eq(x,0) || eq(x,1)) // x=0 oder x=1 ? { *w = x; return true; } // ja -> x als Ergebnis if (n >= (cl_I)(unsigned long)integer_length(x)) { return false; } // Nun ist n < (integer-length x). Also paßt n in ein uintC. return cl_rootp_aux(x,cl_I_to_ulong(n),w); } } // namespace cln cln-1.3.3/src/integer/algebraic/cl_I_sqrt.cc0000644000000000000000000000163111201634737015550 0ustar // isqrt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "cln/number.h" #include "cln/io.h" #include "cln/integer_io.h" #include "cln/exception.h" #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include namespace cln { bool isqrt (const cl_I& x, cl_I* w) { if (minusp(x)) { std::ostringstream buf; fprint(buf, "isqrt: applied to negative number: "); fprint(buf, x); throw runtime_exception(buf.str()); } CL_ALLOCA_STACK; var const uintD* x_MSDptr; var uintC x_len; var const uintD* x_LSDptr; I_to_NDS_nocopy(x, x_MSDptr=,x_len=,x_LSDptr=,true,); // Digit sequence >=0 zu x var DS y; var bool squarep; UDS_sqrt(x_MSDptr,x_len,x_LSDptr, &y, squarep=); // Wurzel ziehen *w = NUDS_to_I(y.MSDptr,y.len); // als Integer return squarep; } // Bit complexity (x of length N): O(M(N)). } // namespace cln cln-1.3.3/src/integer/algebraic/cl_I_rootp_aux.cc0000644000000000000000000002155411201634737016605 0ustar // cl_rootp_aux(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "base/digit/cl_2D.h" #include "base/digitseq/cl_2DS.h" namespace cln { // Stellt fest, ob ein Integer >=0 eine n-te Potenz ist. // rootp(x,n,&w) // > x: ein Integer >=0 // > n: ein Integer >0 // > Annahme: x > 1 und n < (integer-length x). // < w: Integer (expt x (/ n)) falls x eine n-te Potenz // < ergebnis: true ........................, false sonst bool cl_rootp_aux (cl_I x, uintL n, cl_I* w) { // Methode: // Falls x=0 oder x=1: x = x^n -> JA, x als Ergebnis. // Hier also x>1. Suche ein Integer y > 1 mit x=y^n. // Falls n >= integer_length(x): NEIN. (Da y>=2, müßte x>=2^n gelten.) // Hier also n>0 klein. // Solange n gerade ist: x := (sqrt x), n := (/ n 2). x nicht ganz -> NEIN. // Hier also n>0 ungerade. // Falls n=1: x = x^n -> JA, x als Ergebnis. // Falls o := ord2(x) nicht durch n teilbar ist: NEIN. // Sonst dividiere x durch 2^o, am Schluß y mit 2^(o/n) multiplizieren. // Hier also n>0 ungerade, x ungerade. // beta := 2^intDsize, m := ceiling(integer_length(x)/(intDsize*n)). // Suche ein y mit y>=0, y fertig. // Setze y == y0 + beta^k*y1 mod beta^2k an, wobei 2k := min(2*k,m). // Dabei wird y1 mod beta^(2k-k) so gewählt, daß mod beta^2k // x == y^n == y0^n + n * y0^(n-1) * beta^k*y1. Dazu wird // (x - y0^n) mod beta^2k errechnet, durch beta^k dividiert (die Division // muß nach Voraussetzung an y0 aufgehen) und // y1 := ((x-y0^n)/beta^k) / (n*y0^(n-1)) mod beta^(2k-k) gebildet. // Damit hat man (y0 + beta^k*y1)^n == x mod beta^2k . 2k=m -> fertig. // Den Anfang (k=1) bekommt man analog, mit beta:=2 und k=1,k=2,k=4,... // Dann testet man, ob wirklich x = y^n, und ist fertig. while ((n % 2) == 0) // n gerade? { if (!sqrtp(x,&x)) // Quadratwurzel ziehen versuchen { return false; } // nicht ganzzahlig -> fertig n = n >> 1; // n := (/ n 2) } // Nun ist n ungerade. if (n==1) { *w = x; return true; } // n=1 -> x als Ergebnis var uintC oq = 0; // Shift von y am Schluß {var uintC o = ord2(x); if (!(o==0)) {var uintL o_r; divu_3232_3232(o,n, oq=,o_r=); // o_r = o mod n if (!(o_r==0)) { return false; } // o nicht durch n teilbar -> fertig // oq = o/n. // dividiere x durch 2^o: x = ash(x,-(sintC)o); } } // Nun ist n ungerade, x ungerade. CL_ALLOCA_STACK; var uintC n_len; var uintD* n_LSDptr; var uintC x_len; var const uintD* x_LSDptr; // UDS zu n bilden, 00 var uintD x_lsd = lspref(x_LSDptr,0); // letztes Digit von x var uintD y_lsd; // n-te Wurzel von x_lsd mod 2^intDsize y_lsd = 1; // Wurzel mod 2^1 // Für k=1,2,4,...: // y_lsd := y_lsd + 2^k * (x_lsd-y_lsd^n)/2^k / (n*y_lsd^(n-1)) // = y_lsd + (x_lsd-y_lsd^n) / (n*y_lsd^(n-1)) doconsttimes(log2_intDsize, // log2(intDsize) Iterationen reichen aus { var uintD y_lsd_n1 = expt_pos(y_lsd,n-1); // y_lsd^(n-1) var uintD y_lsd_n = mul2adic(y_lsd_n1,y_lsd); // y_lsd^n var uintD delta = x_lsd-y_lsd_n; // x_lsd - y_lsd^n if (delta==0) goto y_lsd_ok; y_lsd = y_lsd + div2adic(delta,mul2adic((uintD)n,y_lsd_n1)); }); y_lsd_ok: ASSERT(expt_pos(y_lsd,n)==x_lsd); // Nun ist y_lsd^n == x_lsd mod beta=2^intDsize. { var uintC m = ceiling(x_len,n); // für y nötige Länge, >0, <=x_len var uintD* y_LSDptr; { var uintD* z1_LSDptr; var uintD* z2_LSDptr; var uintD* z3_LSDptr; num_stack_alloc_1(m, ,y_LSDptr=); // Platz für y {var uintC need = 2*m+(32/intDsize-1); // >= max(2*m,m+32/intDsize) num_stack_alloc(need, ,z1_LSDptr=); // Platz für Rechenregister 1 num_stack_alloc(need, ,z2_LSDptr=); // Platz für Rechenregister 2 num_stack_alloc(need, ,z3_LSDptr=); // Platz für Rechenregister 3 } {var uintC k = 1; // y ist bisher mod beta^k bekannt lspref(y_LSDptr,0) = y_lsd; // Startwert von y until (k==m) { var uintC k2 = 2*k; if (k2>m) { k2=m; } // k2 = min(2*k,m) > k // bisheriges y mod beta^k2 mit n-1 potenzieren: // Methode für z := y^(n-1) : // zz:=y, e:=n-1. // Solange e gerade, setze zz:=zz*zz, e:=e/2. // z:=zz. // Solange (e:=floor(e/2)) >0, // setze zz:=zz*zz, und falls e ungerade, setze z:=z*zz. var uintL e = n-1; // e:=n-1 var uintD* free_LSDptr = z1_LSDptr; var uintD* zz_LSDptr = z2_LSDptr; var uintD* z_LSDptr; // Ab jetzt {zz_LSDptr,free_LSDptr} = {z1_LSDptr,z2_LSDptr}. clear_loop_lsp(y_LSDptr lspop k,k2-k); // y auf k2 Digits erweitern copy_loop_lsp(y_LSDptr,zz_LSDptr,k2); // zz:=y do { var uintD* new_zz_LSDptr = free_LSDptr; cl_UDS_mul(zz_LSDptr,k2,zz_LSDptr,k2,new_zz_LSDptr); // zz:=zz*zz free_LSDptr = zz_LSDptr; zz_LSDptr = new_zz_LSDptr; e = e>>1; // e:=e/2 } while ((e & bit(0)) ==0); // solange e gerade z_LSDptr = zz_LSDptr; // z:=zz // (zz nicht kopieren; ab der nächsten Veränderung von zz wird // {zz_LSDptr,z_LSDptr,free_LSDptr} = {z1_LSDptr,z2_LSDptr,z3_LSDptr} // gelten.) until ((e = e>>1) == 0) { {var uintD* new_zz_LSDptr = free_LSDptr; cl_UDS_mul(zz_LSDptr,k2,zz_LSDptr,k2,new_zz_LSDptr); // zz:=zz*zz free_LSDptr = (z_LSDptr==zz_LSDptr ? z3_LSDptr : zz_LSDptr); zz_LSDptr = new_zz_LSDptr; } if (!((e & bit(0)) == 0)) {var uintD* new_z_LSDptr = free_LSDptr; cl_UDS_mul(z_LSDptr,k2,zz_LSDptr,k2,new_z_LSDptr); // z:=z*zz free_LSDptr = z_LSDptr; z_LSDptr = new_z_LSDptr; } } // z = y^(n-1) mod beta^k2 ist fertig. if (z_LSDptr==zz_LSDptr) { zz_LSDptr = z3_LSDptr; } // zz ist jetzt auch frei cl_UDS_mul(z_LSDptr,k2,y_LSDptr,k2,free_LSDptr); // y^n sub_loop_lsp(x_LSDptr,free_LSDptr,zz_LSDptr,k2); // zz:=x-y^n ASSERT(!DS_test_loop(zz_LSDptr lspop k,k,zz_LSDptr)); // zz == 0 mod beta^k cl_UDS_mul(z_LSDptr,k2-k,n_LSDptr,n_len,free_LSDptr); // n*y^(n-1) // Quotienten mod beta^(k2-k) bilden und an y mod beta^k ankleben: div2adic(k2-k,zz_LSDptr lspop k,free_LSDptr,y_LSDptr lspop k); k = k2; // jetzt gilt y^n == x sogar mod beta^k2. }} } // y mit y^n == x mod beta^m ist gefunden. var cl_I y = UDS_to_I(y_LSDptr lspop m,m); // y als Integer >=0 // y^n (mit n ungerade) bilden: // c:=a:=y, b:=n. // Solange b:=floor(b/2) >0 ist, // setze a:=a*a, und falls b ungerade, setze c:=a*c. // Liefere c. { var cl_I c = y; var cl_I a = y; until ((n = n>>1) == 0) { a = square(a); if (!((n & bit(0)) == 0)) { c = a * c; } } // c = y^n // mit x vergleichen: if (!(x == c)) // Die ganze Rechnung war umsonst. { return false; } } // y ist tatsächlich n-te Wurzel von x. // Noch mit 2^oq multiplizieren: if (oq==0) // kein Shift nötig? { *w = y; } else { *w = ash(y,oq); } return true; } } } // namespace cln cln-1.3.3/src/integer/ring/0000755000000000000000000000000012173046201012337 5ustar cln-1.3.3/src/integer/ring/cl_0_ring.cc0000644000000000000000000000622611201634740014512 0ustar // Null ring. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/null_ring.h" // Implementation. #include "cln/integer_class.h" namespace cln { static const _cl_ring_element null_op0 (cl_heap_ring* R) { return _cl_ring_element(R, (cl_I)0); } static const _cl_ring_element null_op1 (cl_heap_ring* R, const _cl_ring_element& x) { unused x; return _cl_ring_element(R, (cl_I)0); } static const _cl_ring_element null_op2 (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { unused x; unused y; return _cl_ring_element(R, (cl_I)0); } static void null_fprint (cl_heap_ring* R, std::ostream& stream, const _cl_ring_element& x) { unused R; unused x; fprint(stream,"0"); } static bool null_equal (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { unused R; unused x; unused y; return true; } #define null_zero null_op0 static bool null_zerop (cl_heap_ring* R, const _cl_ring_element& x) { unused R; unused x; return true; } #define null_plus null_op2 #define null_minus null_op2 #define null_uminus null_op1 #define null_one null_op0 static const _cl_ring_element null_canonhom (cl_heap_ring* R, const cl_I& x) { unused x; return _cl_ring_element(R, (cl_I)0); } #define null_mul null_op2 #define null_square null_op1 static const _cl_ring_element null_expt_pos (cl_heap_ring* R, const _cl_ring_element& x, const cl_I& y) { unused x; unused y; return _cl_ring_element(R, (cl_I)0); } static cl_ring_setops& null_setops() { static cl_ring_setops ops = { null_fprint, null_equal }; return ops; } static cl_ring_addops& null_addops() { static cl_ring_addops ops = { null_zero, null_zerop, null_plus, null_minus, null_uminus }; return ops; } static cl_ring_mulops& null_mulops() { static cl_ring_mulops ops = { null_one, null_canonhom, null_mul, null_square, null_expt_pos }; return ops; } static const cl_class& cl_class_null_ring(); class cl_heap_null_ring : public cl_heap_ring { SUBCLASS_cl_heap_ring() public: // Constructor. cl_heap_null_ring () : cl_heap_ring (&null_setops(),&null_addops(),&null_mulops()) { type = &cl_class_null_ring(); } // Destructor. ~cl_heap_null_ring () {} }; static void cl_null_ring_destructor (cl_heap* pointer) { (*(cl_heap_null_ring*)pointer).~cl_heap_null_ring(); } static void cl_null_ring_dprint (cl_heap* pointer) { unused pointer; fprint(cl_debugout, "(cl_null_ring) cl_0_ring"); } static const cl_class& cl_class_null_ring() { static const cl_class cl_class_null_ring_instance = { cl_null_ring_destructor, cl_class_flags_number_ring, cl_null_ring_dprint }; return cl_class_null_ring_instance; } cl_heap_null_ring* cl_heap_null_ring_instance; const cl_null_ring cl_0_ring = cl_0_ring; inline cl_null_ring::cl_null_ring () : cl_ring(cl_heap_null_ring_instance) {} int cl_0_ring_init_helper::count = 0; cl_0_ring_init_helper::cl_0_ring_init_helper() { if (count++ == 0) { cl_heap_null_ring_instance = new cl_heap_null_ring(); new ((void *)&cl_0_ring) cl_null_ring(); } } cl_0_ring_init_helper::~cl_0_ring_init_helper() { if (--count == 0) { delete cl_heap_null_ring_instance; } } } // namespace cln cln-1.3.3/src/integer/ring/cl_I_ring.cc0000644000000000000000000000745311201634740014546 0ustar // Ring of integers. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer_ring.h" // Implementation. #include "cln/integer.h" #include "cln/integer_io.h" #define zerop zerop_inline #include "integer/cl_I.h" #undef zerop namespace cln { static void I_fprint (cl_heap_ring* R, std::ostream& stream, const _cl_ring_element& x) { unused R; fprint(stream,The(cl_I)(x)); } static bool I_equal (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { unused R; return equal(The(cl_I)(x),The(cl_I)(y)); } static const _cl_ring_element I_zero (cl_heap_ring* R) { return _cl_ring_element(R, (cl_I)0); } static bool CL_FLATTEN I_zerop (cl_heap_ring* R, const _cl_ring_element& x) { unused R; return zerop_inline(The(cl_I)(x)); } static const _cl_ring_element I_plus (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { return _cl_ring_element(R, The(cl_I)(x) + The(cl_I)(y)); } static const _cl_ring_element I_minus (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { return _cl_ring_element(R, The(cl_I)(x) - The(cl_I)(y)); } static const _cl_ring_element I_uminus (cl_heap_ring* R, const _cl_ring_element& x) { return _cl_ring_element(R, - The(cl_I)(x)); } static const _cl_ring_element I_one (cl_heap_ring* R) { return _cl_ring_element(R, (cl_I)1); } static const _cl_ring_element I_canonhom (cl_heap_ring* R, const cl_I& x) { return _cl_ring_element(R, (cl_I)x); } static const _cl_ring_element I_mul (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { return _cl_ring_element(R, The(cl_I)(x) * The(cl_I)(y)); } static const _cl_ring_element I_square (cl_heap_ring* R, const _cl_ring_element& x) { return _cl_ring_element(R, square(The(cl_I)(x))); } static const _cl_ring_element I_expt_pos (cl_heap_ring* R, const _cl_ring_element& x, const cl_I& y) { return _cl_ring_element(R, expt_pos(The(cl_I)(x),y)); } static bool cl_I_p (const cl_number& x) { return (!x.pointer_p() ? x.nonpointer_tag() == cl_FN_tag : x.pointer_type() == &cl_class_bignum); } static cl_ring_setops I_setops = { I_fprint, I_equal }; static cl_ring_addops I_addops = { I_zero, I_zerop, I_plus, I_minus, I_uminus }; static cl_ring_mulops I_mulops = { I_one, I_canonhom, I_mul, I_square, I_expt_pos }; static cl_number_ring_ops I_ops = { cl_I_p, equal, zerop, operator+, operator-, operator-, operator*, square, expt_pos }; class cl_heap_integer_ring : public cl_heap_number_ring { SUBCLASS_cl_heap_ring() public: // Constructor. cl_heap_integer_ring () : cl_heap_number_ring (&I_setops,&I_addops,&I_mulops, (cl_number_ring_ops*) &I_ops) { type = &cl_class_integer_ring; } // Destructor. ~cl_heap_integer_ring () {} }; static void cl_integer_ring_destructor (cl_heap* pointer) { (*(cl_heap_integer_ring*)pointer).~cl_heap_integer_ring(); } static void cl_integer_ring_dprint (cl_heap* pointer) { unused pointer; fprint(cl_debugout, "(cl_integer_ring) cl_I_ring"); } cl_class cl_class_integer_ring; static cl_heap_integer_ring* cl_heap_integer_ring_instance; // Constructor. template <> inline cl_integer_ring::cl_specialized_number_ring () : cl_number_ring(cl_heap_integer_ring_instance) {} const cl_integer_ring cl_I_ring = cl_I_ring; int cl_I_ring_init_helper::count = 0; cl_I_ring_init_helper::cl_I_ring_init_helper() { if (count++ == 0) { cl_class_integer_ring.destruct = cl_integer_ring_destructor; cl_class_integer_ring.flags = cl_class_flags_number_ring; cl_class_integer_ring.dprint = cl_integer_ring_dprint; cl_heap_integer_ring_instance = new cl_heap_integer_ring(); new ((void *)&cl_I_ring) cl_integer_ring(); } } cl_I_ring_init_helper::~cl_I_ring_init_helper() { if (--count == 0) { delete cl_heap_integer_ring_instance; } } } // namespace cln cln-1.3.3/src/integer/conv/0000755000000000000000000000000012173046200012344 5ustar cln-1.3.3/src/integer/conv/cl_I_from_NUDS.cc0000644000000000000000000000115412034112633015376 0ustar // NUDS_to_I(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/cl_I.h" // Implementation. #include "cln/number.h" #include "base/digitseq/cl_DS.h" #include "base/cl_inline.h" #include "integer/conv/cl_I_from_NDS.cc" namespace cln { CL_INLINE2 const cl_I CL_INLINE2_DECL(NUDS_to_I) (uintD* MSDptr, uintC len) { if ((!(len==0)) && ((sintD)mspref(MSDptr,0) < 0)) // Falls die Länge >0 und das Most significant Bit = 1 sind, // die Digit Sequence um ein Nulldigit erweitern: { lsprefnext(MSDptr) = 0; len++; } return NDS_to_I_inline(MSDptr,len); } } // namespace cln cln-1.3.3/src/integer/conv/cl_I_from_Q2.cc0000644000000000000000000001412211201634737015117 0ustar // Q2_to_I() helper. // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/cl_I.h" // Implementation. #include "cln/number.h" #ifdef intQsize #include "base/digitseq/cl_DS.h" namespace cln { cl_private_thing cl_I_constructor_from_Q2 (sint64 wert_hi, uint64 wert_lo) { if (wert_hi == 0) { if ((wert_lo & minus_bit(cl_value_len-1)) == 0) return (cl_private_thing)(cl_combine(cl_FN_tag,wert_lo)); } elif (wert_hi == ~(sint64)0) { if ((~wert_lo & minus_bit(cl_value_len-1)) == 0) return (cl_private_thing)(cl_combine(cl_FN_tag,(sint64)wert_lo)); } // Create bignum with length n, where: // bn_minlength <= n <= ceiling(128/intDsize) #define FILL_1_DIGIT(l,i,from) \ arrayLSref(ptr->data,l,i) = (uintD)from; #define FILL_2_DIGIT(l,i,from) \ arrayLSref(ptr->data,l,i) = (uintD)from; \ arrayLSref(ptr->data,l,i+1) = (uintD)(from>>intDsize); #define FILL_3_DIGIT(l,i,from) \ arrayLSref(ptr->data,l,i) = (uintD)from; from>>=intDsize; \ arrayLSref(ptr->data,l,i+1) = (uintD)from; \ arrayLSref(ptr->data,l,i+2) = (uintD)(from>>intDsize); #define FILL_4_DIGIT(l,i,from) \ arrayLSref(ptr->data,l,i) = (uintD)from; from>>=intDsize; \ arrayLSref(ptr->data,l,i+1) = (uintD)from; from>>=intDsize; \ arrayLSref(ptr->data,l,i+2) = (uintD)from; \ arrayLSref(ptr->data,l,i+3) = (uintD)(from>>intDsize); #define FILL_8_DIGIT(l,i,from) \ arrayLSref(ptr->data,l,i) = (uintD)from; from >>=intDsize; \ arrayLSref(ptr->data,l,i+1) = (uintD)from; from >>=intDsize; \ arrayLSref(ptr->data,l,i+2) = (uintD)from; from >>=intDsize; \ arrayLSref(ptr->data,l,i+3) = (uintD)from; from >>=intDsize; \ arrayLSref(ptr->data,l,i+4) = (uintD)from; from >>=intDsize; \ arrayLSref(ptr->data,l,i+5) = (uintD)from; from >>=intDsize; \ arrayLSref(ptr->data,l,i+6) = (uintD)from; \ arrayLSref(ptr->data,l,i+7) = (uintD)from>>intDsize; #if (intDsize==64) #define FILL_1 FILL_1_DIGIT(1,0,wert_lo); #define FILL_2 FILL_1_DIGIT(2,1,wert_hi); FILL_1_DIGIT(2,0,wert_lo); #endif #if (32/intDsize==1) #define FILL_1 FILL_1_DIGIT(1,0,wert_lo); #define FILL_2 FILL_2_DIGIT(2,0,wert_lo); #define FILL_3 FILL_1_DIGIT(3,2,wert_hi); FILL_2_DIGIT(3,0,wert_lo); #define FILL_4 FILL_2_DIGIT(4,2,wert_hi); FILL_2_DIGIT(4,0,wert_lo); #endif #if (32/intDsize==2) #define FILL_1 FILL_1_DIGIT(1,0,wert_lo); #define FILL_2 FILL_2_DIGIT(2,0,wert_lo); #define FILL_3 FILL_3_DIGIT(3,0,wert_lo); #define FILL_4 FILL_4_DIGIT(4,0,wert_lo); #define FILL_5 FILL_1_DIGIT(5,4,wert_hi); FILL_4_DIGIT(5,0,wert_lo); #define FILL_6 FILL_2_DIGIT(6,4,wert_hi); FILL_4_DIGIT(6,0,wert_lo); #define FILL_7 FILL_3_DIGIT(7,4,wert_hi); FILL_4_DIGIT(7,0,wert_lo); #define FILL_8 FILL_4_DIGIT(8,4,wert_hi); FILL_4_DIGIT(8,0,wert_lo); #endif #if (32/intDsize==4) #define FILL_1 FILL_1_DIGIT(1,0,wert_lo); #define FILL_2 FILL_2_DIGIT(2,0,wert_lo); #define FILL_3 FILL_3_DIGIT(3,0,wert_lo); #define FILL_4 FILL_4_DIGIT(4,0,wert_lo); #define FILL_5 FILL_5_DIGIT(5,0,wert_lo); #define FILL_6 FILL_6_DIGIT(6,0,wert_lo); #define FILL_7 FILL_7_DIGIT(7,0,wert_lo); #define FILL_8 FILL_8_DIGIT(8,0,wert_lo); #define FILL_9 FILL_1_DIGIT(9,8,wert_hi); FILL_8_DIGIT(9,0,wert_lo); #define FILL_10 FILL_2_DIGIT(10,8,wert_hi); FILL_8_DIGIT(10,0,wert_lo); #define FILL_11 FILL_3_DIGIT(11,8,wert_hi); FILL_8_DIGIT(11,0,wert_lo); #define FILL_12 FILL_4_DIGIT(12,8,wert_hi); FILL_8_DIGIT(12,0,wert_lo); #define FILL_13 FILL_5_DIGIT(13,8,wert_hi); FILL_8_DIGIT(13,0,wert_lo); #define FILL_14 FILL_6_DIGIT(14,8,wert_hi); FILL_8_DIGIT(14,0,wert_lo); #define FILL_15 FILL_7_DIGIT(15,8,wert_hi); FILL_8_DIGIT(15,0,wert_lo); #define FILL_16 FILL_8_DIGIT(16,8,wert_hi); FILL_8_DIGIT(16,0,wert_lo); #endif if (wert_hi >= 0) { #define IF_LENGTH(i) \ if ((bn_minlength <= i) && (i*intDsize <= 128)) \ if (!((i+1)*intDsize <= 128) \ || (i*intDsize-1 < 64 \ ? ((wert_hi == 0) && (wert_lo < (uint64)bitc(i*intDsize-1))) \ : ((uint64)wert_hi < (uint64)bitc(i*intDsize-1-64)) \ ) ) #define ALLOC(i) \ var cl_heap_bignum* ptr = allocate_bignum(i); #define OK \ return (cl_private_thing)(ptr); IF_LENGTH(1) bignum1: { ALLOC(1); FILL_1; OK; } IF_LENGTH(2) bignum2: { ALLOC(2); FILL_2; OK; } #if (intDsize <= 32) IF_LENGTH(3) bignum3: { ALLOC(3); FILL_3; OK; } IF_LENGTH(4) bignum4: { ALLOC(4); FILL_4; OK; } #if (intDsize <= 16) IF_LENGTH(5) bignum5: { ALLOC(5); FILL_5; OK; } IF_LENGTH(6) bignum6: { ALLOC(6); FILL_6; OK; } IF_LENGTH(7) bignum7: { ALLOC(7); FILL_7; OK; } IF_LENGTH(8) bignum8: { ALLOC(8); FILL_8; OK; } #if (intDsize <= 8) IF_LENGTH(9) bignum9: { ALLOC(9); FILL_9; OK; } IF_LENGTH(10) bignum10: { ALLOC(10); FILL_10; OK; } IF_LENGTH(11) bignum11: { ALLOC(11); FILL_11; OK; } IF_LENGTH(12) bignum12: { ALLOC(12); FILL_12; OK; } IF_LENGTH(13) bignum13: { ALLOC(13); FILL_13; OK; } IF_LENGTH(14) bignum14: { ALLOC(14); FILL_14; OK; } IF_LENGTH(15) bignum15: { ALLOC(15); FILL_15; OK; } IF_LENGTH(16) bignum16: { ALLOC(16); FILL_16; OK; } #endif #endif #endif #undef IF_LENGTH } else { #define IF_LENGTH(i) \ if ((bn_minlength <= i) && (i*intDsize <= 128)) \ if (!((i+1)*intDsize <= 128) \ || (i*intDsize-1 < 64 \ ? ((wert_hi == ~(sint64)0) && (wert_lo >= (uint64)(-bitc(i*intDsize-1)))) \ : ((uint64)wert_hi >= (uint64)(-bitc(i*intDsize-1-64))) \ ) ) IF_LENGTH(1) goto bignum1; IF_LENGTH(2) goto bignum2; #if (intDsize <= 32) IF_LENGTH(3) goto bignum3; IF_LENGTH(4) goto bignum4; #if (intDsize <= 16) IF_LENGTH(5) goto bignum5; IF_LENGTH(6) goto bignum6; IF_LENGTH(7) goto bignum7; IF_LENGTH(8) goto bignum8; #if (intDsize <= 8) IF_LENGTH(9) goto bignum9; IF_LENGTH(10) goto bignum10; IF_LENGTH(11) goto bignum11; IF_LENGTH(12) goto bignum12; IF_LENGTH(13) goto bignum13; IF_LENGTH(14) goto bignum14; IF_LENGTH(15) goto bignum15; IF_LENGTH(16) goto bignum16; #endif #endif #endif #undef IF_LENGTH } } } // namespace cln #endif cln-1.3.3/src/integer/conv/cl_I_to_UL.cc0000644000000000000000000000321511201634737014635 0ustar // cl_I_to_UL(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "cln/number.h" #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "cln/io.h" #include "cln/integer_io.h" #include "cln/exception.h" #include namespace cln { uint32 cl_I_to_UL (const cl_I& obj) { if (fixnump(obj)) { // Fixnum var sintV wert = FN_to_V(obj); if (wert >= 0) #if (intVsize>32) if (wert < bit(32)) #endif return (uint32)wert; goto bad; } else { // Bignum var cl_heap_bignum* bn = TheBignum(obj); var uintC len = bn->length; if ((sintD)mspref(arrayMSDptr(bn->data,len),0) < 0) goto bad; #define IF_LENGTH(i) \ if (bn_minlength <= i) /* genau i Digits überhaupt möglich? */\ if (len == i) /* genau i Digits? */ \ /* 2^((i-1)*intDsize-1) <= obj < 2^(i*intDsize-1) */ \ if ( (i*intDsize-1 > 32) \ && ( ((i-1)*intDsize-1 >= 32) \ || (mspref(arrayMSDptr(bn->data,len),0) >= (uintD)bitc(32-(i-1)*intDsize)) \ ) ) \ goto bad; \ else IF_LENGTH(1) return get_uint1D_Dptr(arrayLSDptr(bn->data,1)); IF_LENGTH(2) return get_uint2D_Dptr(arrayLSDptr(bn->data,2)); IF_LENGTH(3) return get_uint3D_Dptr(arrayLSDptr(bn->data,3)); IF_LENGTH(4) return get_uint4D_Dptr(arrayLSDptr(bn->data,4)); IF_LENGTH(5) return get_uint4D_Dptr(arrayLSDptr(bn->data,5)); #undef IF_LENGTH } bad: // unpassendes Objekt std::ostringstream buf; fprint(buf, "Not a 32-bit integer: "); fprint(buf, obj); throw runtime_exception(buf.str()); } } // namespace cln cln-1.3.3/src/integer/conv/cl_I_to_L.cc0000644000000000000000000000455411201634737014517 0ustar // cl_I_to_L(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "cln/number.h" #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "cln/io.h" #include "cln/integer_io.h" #include "cln/exception.h" #include namespace cln { sint32 cl_I_to_L (const cl_I& obj) { if (fixnump(obj)) { // Fixnum var sintV wert = FN_to_V(obj); #if (intVsize>32) if ((sintV)(sint32)wert != wert) goto bad; #endif return (sint32)wert; } else { // Bignum var cl_heap_bignum* bn = TheBignum(obj); var uintC len = bn->length; if ((sintD)mspref(arrayMSDptr(bn->data,len),0) >= 0) { // Bignum > 0 #define IF_LENGTH(i) \ if (bn_minlength <= i) /* genau i Digits überhaupt möglich? */\ if (len == i) /* genau i Digits? */ \ /* 2^((i-1)*intDsize-1) <= obj < 2^(i*intDsize-1) */ \ if ( (i*intDsize > 32) \ && ( ((i-1)*intDsize >= 32) \ || (mspref(arrayMSDptr(bn->data,len),0) >= (uintD)bitc(31-(i-1)*intDsize)) \ ) ) \ goto bad; \ else IF_LENGTH(1) return get_uint1D_Dptr(arrayLSDptr(bn->data,1)); IF_LENGTH(2) return get_uint2D_Dptr(arrayLSDptr(bn->data,2)); IF_LENGTH(3) return get_uint3D_Dptr(arrayLSDptr(bn->data,3)); IF_LENGTH(4) return get_uint4D_Dptr(arrayLSDptr(bn->data,4)); #undef IF_LENGTH } else { // Bignum < 0 #define IF_LENGTH(i) \ if (bn_minlength <= i) /* genau i Digits überhaupt möglich? */\ if (len == i) /* genau i Digits? */ \ /* - 2^(i*intDsize-1) <= obj < - 2^((i-1)*intDsize-1) */ \ if ( (i*intDsize > 32) \ && ( ((i-1)*intDsize >= 32) \ || (mspref(arrayMSDptr(bn->data,len),0) < (uintD)(-bitc(31-(i-1)*intDsize))) \ ) ) \ goto bad; \ else IF_LENGTH(1) return get_sint1D_Dptr(arrayLSDptr(bn->data,1)); IF_LENGTH(2) return get_sint2D_Dptr(arrayLSDptr(bn->data,2)); IF_LENGTH(3) return get_sint3D_Dptr(arrayLSDptr(bn->data,3)); IF_LENGTH(4) return get_sint4D_Dptr(arrayLSDptr(bn->data,4)); #undef IF_LENGTH } } bad: // unpassendes Objekt std::ostringstream buf; fprint(buf, "Not a 32-bit integer: "); fprint(buf, obj); throw runtime_exception(buf.str()); } } // namespace cln cln-1.3.3/src/integer/conv/cl_I_from_UL.cc0000644000000000000000000000507212034113706015152 0ustar // UL_to_I() helper. // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/cl_I.h" // Implementation. #include "cln/number.h" #if (cl_value_len <= 32) #include "base/digitseq/cl_DS.h" namespace cln { cl_private_thing cl_I_constructor_from_UL (uint32 wert) { if ((wert & minus_bit(cl_value_len-1)) == 0) // Bits, die nicht in den Fixnum-Wert >= 0 reinpassen. return (cl_private_thing)(cl_combine(cl_FN_tag,wert)); // Bignum erzeugen: // (dessen Länge bn_minlength <= n <= ceiling((32+1)/intDsize) erfüllt) #define UL_maxlength ceiling(32+1,intDsize) #define IF_LENGTH(i) \ if ((bn_minlength <= i) && (i <= UL_maxlength)) \ if (!(i+1 <= UL_maxlength) \ || ((uint32)wert < (uint32)bitc(i*intDsize-1)) \ ) IF_LENGTH(1) { var cl_heap_bignum* ptr = allocate_bignum(1); arrayLSref(ptr->data,1,0) = wert; return (cl_private_thing)(ptr); } #if (intDsize <= 32) IF_LENGTH(2) { var cl_heap_bignum* ptr = allocate_bignum(2); arrayLSref(ptr->data,2,0) = (uintD)wert; #if (intDsize>=32) arrayLSref(ptr->data,2,1) = 0; #else arrayLSref(ptr->data,2,1) = (uintD)(wert>>intDsize); #endif return (cl_private_thing)(ptr); } #if (intDsize <= 16) IF_LENGTH(3) { var cl_heap_bignum* ptr = allocate_bignum(3); arrayLSref(ptr->data,3,0) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,3,1) = (uintD)wert; #if (2*intDsize>=32) arrayLSref(ptr->data,3,2) = 0; #else arrayLSref(ptr->data,3,2) = (uintD)(wert>>intDsize); #endif return (cl_private_thing)(ptr); } #if (intDsize <= 8) IF_LENGTH(4) { var cl_heap_bignum* ptr = allocate_bignum(4); arrayLSref(ptr->data,4,0) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,4,1) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,4,2) = (uintD)wert; #if (3*intDsize>=32) arrayLSref(ptr->data,4,3) = 0; #else arrayLSref(ptr->data,4,3) = (uintD)(wert>>intDsize); #endif return (cl_private_thing)(ptr); } IF_LENGTH(5) { var cl_heap_bignum* ptr = allocate_bignum(5); arrayLSref(ptr->data,5,0) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,5,1) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,5,2) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,5,3) = (uintD)wert; #if (4*intDsize>=32) arrayLSref(ptr->data,5,4) = 0; #else arrayLSref(ptr->data,5,4) = (uintD)(wert>>intDsize); #endif return (cl_private_thing)(ptr); } #endif #endif #endif #undef IF_LENGTH #undef UL_maxlength } } // namespace cln #endif cln-1.3.3/src/integer/conv/cl_I_from_digits.cc0000644000000000000000000001277312034113750016122 0ustar // digits_to_I(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/cl_I.h" // Implementation. #include "base/digitseq/cl_DS.h" #include "integer/conv/cl_I_cached_power.h" namespace cln { static const cl_I digits_to_I_base2 (const char * MSBptr, uintC len, uintD base) { // base is a power of two: write the digits from least significant // to most significant into the result NUDS. Result needs // 1+ceiling(len*log(base)/(intDsize*log(2))) or some more digits CL_ALLOCA_STACK; var uintD* erg_MSDptr; var uintC erg_len; var uintD* erg_LSDptr; var int b = (base==2 ? 1 : base==4 ? 2 : base==8 ? 3 : base==16 ? 4 : /*base==32*/ 5); num_stack_alloc(1+(len*b)/intDsize,,erg_LSDptr=); erg_MSDptr = erg_LSDptr; erg_len = 0; var uintD d = 0; // resulting digit var int ch_where = 0; // position of ch inside d var uintC min_len = 0; // first non-zero digit while (min_len < len && *(const uintB *)(MSBptr+min_len) == '0') { ++min_len; } while (len > min_len) { var uintB ch = *(const uintB *)(MSBptr+len-1); // next character if (ch!='.') { // skip decimal point // Compute value of ch ('0'-'9','A'-'Z','a'-'z'): ch = ch - '0'; if (ch > '9'-'0') { // not a digit? ch = ch+'0'-'A'+10; if (ch > 'Z'-'A'+10) {// not an uppercase letter? ch = ch+'A'-'a'; // must be lowercase! } } d = d | (uintD)ch<= intDsize) { // d is ready to be written into the NUDS: lsprefnext(erg_MSDptr) = d; ch_where = ch_where-intDsize; d = (uintD)ch >> b-ch_where; // carry erg_len++; } } len--; } if (d != 0) { // is there anything left over? lsprefnext(erg_MSDptr) = d; ++erg_len; } return NUDS_to_I(erg_MSDptr,erg_len); } static const cl_I digits_to_I_baseN (const char * MSBptr, uintC len, uintD base) { // base is not a power of two: Add digits one by one. Result nees // 1+ceiling(len*log(base)/(intDsize*log(2))) or some more digits. CL_ALLOCA_STACK; var uintD* erg_MSDptr; var uintC erg_len; var uintD* erg_LSDptr; var uintC need = 1+floor(len,intDsize*256); // > len/(intDsize*256) >=0 switch (base) { // multiply need with ceiling(256*log(base)/log(2)): case 2: need = 256*need; break; case 3: need = 406*need; break; case 4: need = 512*need; break; case 5: need = 595*need; break; case 6: need = 662*need; break; case 7: need = 719*need; break; case 8: need = 768*need; break; case 9: need = 812*need; break; case 10: need = 851*need; break; case 11: need = 886*need; break; case 12: need = 918*need; break; case 13: need = 948*need; break; case 14: need = 975*need; break; case 15: need = 1001*need; break; case 16: need = 1024*need; break; case 17: need = 1047*need; break; case 18: need = 1068*need; break; case 19: need = 1088*need; break; case 20: need = 1107*need; break; case 21: need = 1125*need; break; case 22: need = 1142*need; break; case 23: need = 1159*need; break; case 24: need = 1174*need; break; case 25: need = 1189*need; break; case 26: need = 1204*need; break; case 27: need = 1218*need; break; case 28: need = 1231*need; break; case 29: need = 1244*need; break; case 30: need = 1257*need; break; case 31: need = 1269*need; break; case 32: need = 1280*need; break; case 33: need = 1292*need; break; case 34: need = 1303*need; break; case 35: need = 1314*need; break; case 36: need = 1324*need; break; default: NOTREACHED } // Now we have need >= len*log(base)/(intDsize*log(2)). need += 1; // Add digits one by one: num_stack_alloc(need,,erg_LSDptr=); // erg_MSDptr/erg_len/erg_LSDptr is a NUDS, erg_len < need. erg_MSDptr = erg_LSDptr; erg_len = 0; while (len > 0) { var uintD newdigit = 0; var uintC chx = 0; var uintD factor = 1; while (chx < power_table[base-2].k && len > 0) { var uintB ch = *(const uintB *)MSBptr; MSBptr++; // next character if (ch!='.') { // skip decimal point // Compute value of ('0'-'9','A'-'Z','a'-'z'): ch = ch-'0'; if (ch > '9'-'0') { // not a digit? ch = ch+'0'-'A'+10; if (ch > 'Z'-'A'+10) {// not an uppercase letter? ch = ch+'A'-'a'; // must be lowercase! } } factor = factor*base; newdigit = base*newdigit+ch; chx++; } len--; } var uintD carry = mulusmall_loop_lsp(factor,erg_LSDptr,erg_len,newdigit); if (carry!=0) { // need to extend NUDS: lsprefnext(erg_MSDptr) = carry; erg_len++; } } return NUDS_to_I(erg_MSDptr,erg_len); } const cl_I digits_to_I (const char * MSBptr, uintC len, uintD base) { if ((base & (base-1)) == 0) { return digits_to_I_base2(MSBptr, len, base); } else { // This is quite insensitive to the breakeven point. // On a 1GHz Athlon I get approximately: // base 3: breakeven around 25000 // base 10: breakeven around 8000 // base 36: breakeven around 2000 if (len>80000/base) { // Divide-and-conquer: // Find largest i such that B = base^(k*2^i) satisfies B <= X. var const cached_power_table_entry * p; var uintC len_B = power_table[base-2].k; for (uintC i = 0; ; i++) { p = cached_power(base, i); if (2*len_B >= len) break; len_B = len_B*2; } return digits_to_I(MSBptr,len-len_B,base)*p->base_pow +digits_to_I(MSBptr+len-len_B,len_B,base); } else { return digits_to_I_baseN(MSBptr, len, base); } } } } // namespace cln cln-1.3.3/src/integer/conv/cl_I_cached_power.h0000644000000000000000000000244611201634737016105 0ustar // cached_power(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/cl_I.h" // Implementation. namespace cln { // Table: For each base b (2 <= b <= 36), store k and b^k where k is the largest // integer such that b^k < 2^intDsize, i.e. k == floor(log(2^intDsize-1,b)). struct power_table_entry { uintC k; uintD b_to_the_k; }; extern const power_table_entry power_table [36-2+1]; // Table: contains for each base b (2 <= b <= 36) either NULL or an array of // lazily computed b^(k*2^i) and maybe 1/b^(k*2^i). //#define MUL_REPLACES_DIV struct cached_power_table_entry { ALLOCATE_ANYWHERE(cached_power_table_entry) cl_I base_pow; // 0 or b^(k*2^i) #ifdef MUL_REPLACES_DIV cl_I inv_base_pow; // if base_pow: floor(2^(2*integer_length(base_pow))/base_pow) #endif }; struct cached_power_table { cached_power_table_entry element[40]; // Constructor and destructor - nothing special. cached_power_table () {} ~cached_power_table () {} // Allocation and deallocation. void* operator new (size_t size) { return malloc_hook(size); } void operator delete (void* ptr) { free_hook(ptr); } }; extern cached_power_table* ctable [36-2+1]; const cached_power_table_entry * cached_power (uintD base, uintL i); } // namespace cln cln-1.3.3/src/integer/conv/cl_I_to_UQ.cc0000644000000000000000000000662411201634737014651 0ustar // cl_I_to_UQ(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/cl_I.h" // Implementation. #ifdef intQsize #include "cln/number.h" #include "base/digitseq/cl_DS.h" #include "cln/io.h" #include "cln/integer_io.h" #include "cln/exception.h" #include namespace cln { uint64 cl_I_to_UQ (const cl_I& obj) { if (fixnump(obj)) { // Fixnum var sintV wert = FN_to_V(obj); if (wert >= 0) return (uint64)(uintV)wert; goto bad; } else { // Bignum var cl_heap_bignum* bn = TheBignum(obj); var uintC len = bn->length; if ((sintD)mspref(arrayMSDptr(bn->data,len),0) < 0) goto bad; #define IF_LENGTH(i) \ if (bn_minlength <= i) /* genau i Digits überhaupt möglich? */\ if (len == i) /* genau i Digits? */ \ /* 2^((i-1)*intDsize-1) <= obj < 2^(i*intDsize-1) */ \ if ( (i*intDsize-1 > 64) \ && ( ((i-1)*intDsize-1 >= 64) \ || (mspref(arrayMSDptr(bn->data,len),0) >= (uintD)bitc(64-(i-1)*intDsize)) \ ) ) \ goto bad; \ else #if (intDsize==64) IF_LENGTH(1) return (uint64)arrayLSref(bn->data,1,0); IF_LENGTH(2) return (uint64)arrayLSref(bn->data,2,0); #endif #if (intDsize==32) IF_LENGTH(1) return (uint64)get_uint1D_Dptr(arrayLSDptr(bn->data,1)); IF_LENGTH(2) return ((uint64)get_uint1D_Dptr(arrayLSDptr(bn->data,2) lspop 1) << 32) | (uint64)get_uint1D_Dptr(arrayLSDptr(bn->data,2)); IF_LENGTH(3) return ((uint64)get_uint1D_Dptr(arrayLSDptr(bn->data,3) lspop 1) << 32) | (uint64)get_uint1D_Dptr(arrayLSDptr(bn->data,3)); #endif #if (intDsize==16) IF_LENGTH(1) return (uint64)get_uint1D_Dptr(arrayLSDptr(bn->data,1)); IF_LENGTH(2) return (uint64)get_uint2D_Dptr(arrayLSDptr(bn->data,2)); IF_LENGTH(3) return ((uint64)get_uint1D_Dptr(arrayLSDptr(bn->data,3) lspop 2) << 32) | (uint64)get_uint2D_Dptr(arrayLSDptr(bn->data,3)); IF_LENGTH(4) return ((uint64)get_uint2D_Dptr(arrayLSDptr(bn->data,4) lspop 2) << 32) | (uint64)get_uint2D_Dptr(arrayLSDptr(bn->data,4)); IF_LENGTH(5) return ((uint64)get_uint2D_Dptr(arrayLSDptr(bn->data,5) lspop 2) << 32) | (uint64)get_uint2D_Dptr(arrayLSDptr(bn->data,5)); #endif #if (intDsize==8) IF_LENGTH(1) return (uint64)get_uint1D_Dptr(arrayLSDptr(bn->data,1)); IF_LENGTH(2) return (uint64)get_uint2D_Dptr(arrayLSDptr(bn->data,2)); IF_LENGTH(3) return (uint64)get_uint3D_Dptr(arrayLSDptr(bn->data,3)); IF_LENGTH(4) return (uint64)get_uint4D_Dptr(arrayLSDptr(bn->data,4)); IF_LENGTH(5) return ((uint64)get_uint1D_Dptr(arrayLSDptr(bn->data,5) lspop 4) << 32) | (uint64)get_uint4D_Dptr(arrayLSDptr(bn->data,5)); IF_LENGTH(6) return ((uint64)get_uint2D_Dptr(arrayLSDptr(bn->data,6) lspop 4) << 32) | (uint64)get_uint4D_Dptr(arrayLSDptr(bn->data,6)); IF_LENGTH(7) return ((uint64)get_uint3D_Dptr(arrayLSDptr(bn->data,7) lspop 4) << 32) | (uint64)get_uint4D_Dptr(arrayLSDptr(bn->data,7)); IF_LENGTH(8) return ((uint64)get_uint4D_Dptr(arrayLSDptr(bn->data,8) lspop 4) << 32) | (uint64)get_uint4D_Dptr(arrayLSDptr(bn->data,8)); IF_LENGTH(9) return ((uint64)get_uint4D_Dptr(arrayLSDptr(bn->data,9) lspop 4) << 32) | (uint64)get_uint4D_Dptr(arrayLSDptr(bn->data,9)); #endif #undef IF_LENGTH } bad: // unpassendes Objekt std::ostringstream buf; fprint(buf, "Not a 64-bit integer: "); fprint(buf, obj); throw runtime_exception(buf.str()); } } // namespace cln #endif cln-1.3.3/src/integer/conv/cl_I_to_digits.cc0000644000000000000000000002055111201634737015602 0ustar // UDS_to_digits(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/cl_I.h" // Implementation. #include "base/digitseq/cl_DS.h" #include "integer/conv/cl_I_cached_power.h" namespace cln { // Timing für Dezimal-Umwandlung einer Zahl mit N Digits = (N*32) Bits, // auf einem i486 33 MHz unter Linux: // N standard dnq(div) dnq(mul) combined // 10 0.00031 0.00043 0.00059 0.00031 // 25 0.00103 0.00125 0.00178 0.00103 // 50 0.0030 0.0034 0.0051 0.0030 // 100 0.0100 0.0108 0.0155 0.0100 // 250 0.054 0.055 0.064 0.054 // 500 0.207 0.209 0.229 0.207 // 750 0.47 0.48 0.47 0.47 // 1000 0.81 0.81 0.86 0.81 // 1250 1.25 1.12 1.20 1.12 // 1500 1.81 1.60 1.64 1.61 // 1750 2.45 2.24 2.15 2.25 // 1940 3.01 3.03 3.12 2.80 // 2000 3.20 3.11 3.30 2.89 // 2500 5.00 4.11 4.38 3.91 // 3000 7.3 5.8 5.7 5.5 // 4000 13.0 12.4 12.9 9.7 // 5000 20.3 15.3 15.1 12.4 // 10000 81.4 57.8 56.4 32.5 // 25000 112 // 50000 265 // dnq(div) means divide-and-conquer using division by B at the topmost call, // threshold = 1015. // dnq(mul) means divide-and-conquer using multiplication by 1/B at the topmost // call, threshold = 2050. // combined means divide-and-conquer as long as length >= threshold. const unsigned int cl_digits_div_threshold = 1015; const int cl_digits_algo = 1; // like I_to_digits, except that the result has exactly erg_len characters. static inline void I_to_digits_noshrink (const cl_I& X, uintD base, uintC erg_len, cl_digits* erg) { I_to_digits(X,base,erg); if (erg->len > erg_len) throw runtime_exception(); var uintC count = erg_len - erg->len; if (count > 0) { var uintB* ptr = erg->MSBptr; do { *--ptr = '0'; } while (--count > 0); erg->MSBptr = ptr; erg->len = erg_len; } } void I_to_digits (const cl_I& X, uintD base, cl_digits* erg) { // Methode: // Umwandlung ins Stellensystem der Basis b geht durch Umwandlung ins Stellen- // system der Basis b^k (k>=1, b^k<2^intDsize, k maximal) vor sich. // Aufsuchen von k und b^k aus einer Tabelle. // Reduktion der UDS zu einer NUDS X. // Falls X=0: die eine Ziffer 0. // Falls X>0: // Dividiere X durch das Wort b^k, // (Single-Precision-Division, vgl. UDS_DIVIDE mit n=1: // r:=0, j:=m=Länge(X), // while j>0 do // j:=j-1, r:=r*beta+X[j], X[j]:=floor(r/b^k), r:=r-b^k*q[j]. // r=Rest.) // zerlege den Rest (mit k-1 Divisionen durch b) in k Ziffern, wandle diese // Ziffern einzeln in Ascii um und lege sie an die DIGITS an. // Teste auf Speicherüberlauf. // X := Quotient. // Mache aus X wieder eine NUDS (maximal 1 Nulldigit streichen). // Dies solange bis X=0. // Streiche die führenden Nullen. // Aufsuchen von k-1 und b^k aus der Tabelle: var const power_table_entry* tableptr = &power_table[base-2]; var uintC k = tableptr->k; var uintD b_hoch_k = tableptr->b_to_the_k; // b^k var uintB* erg_ptr = erg->LSBptr; #define next_digit(d) { *--erg_ptr = (d<10 ? '0'+d : 'A'-10+d); } // Spezialfälle: if (zerop(X)) { next_digit(0); goto fertig; } // 0 -> eine Ziffer '0' else if ((base & (base-1)) == 0) { // Schneller Algorithmus für Zweierpotenzen var const uintD* MSDptr; var uintC len; var const uintD* LSDptr; I_to_NDS_nocopy(X, MSDptr=,len=,LSDptr=,false,); var int b = (base==2 ? 1 : base==4 ? 2 : base==8 ? 3 : base==16 ? 4 : /*base==32*/ 5); var uintD carry = 0; var int carrybits = 0; loop { if (fixnump(X) && erg->LSBptr-erg_ptr>=cl_value_len) break; if (carrybits >= b) { var uintD d = carry & (base-1); next_digit(d); carry = carry >> b; carrybits -= b; } else { var uintD d = carry; if (LSDptr != MSDptr) { carry = lsprefnext(LSDptr); d |= (carry << carrybits) & (base-1); next_digit(d); carry = carry >> (b-carrybits); carrybits = intDsize - (b-carrybits); } else { next_digit(d); break; } } } } else if (fixnump(X) || TheBignum(X)->length < cl_digits_div_threshold || !cl_digits_algo) { // Standard-Algorithmus CL_ALLOCA_STACK; var uintD* MSDptr; var uintC len; var uintD* LSDptr; I_to_NDS(X, MSDptr=,len=,LSDptr=); // normalisiere zu einer NUDS: if (mspref(MSDptr,0)==0) { msshrink(MSDptr); len--; } loop { // Noch die NUDS MSDptr/len/.. mit len>0 abzuarbeiten. // Single-Precision-Division durch b^k: var uintD rest = divu_loop_msp(b_hoch_k,MSDptr,len); // Zerlegen des Restes in seine k Ziffern: var uintC count = k-1; if (fixnump(X) && count>cl_value_len-1) count = cl_value_len-1; if ((intDsize>=11) || (count>0)) // (Bei intDsize>=11 ist wegen b<=36 zwangsläufig // k = ceiling(intDsize*log(2)/log(b))-1 >= 2, also count = k-1 > 0.) do { var uintD d; #if HAVE_DD divuD((uintDD)rest,base,rest=,d=); #else divuD(0,rest,base,rest=,d=); #endif next_digit(d); } until (--count == 0); next_digit(rest); // letzte der k Ziffern ablegen // Quotienten normalisieren (max. 1 Digit streichen): if (mspref(MSDptr,0)==0) { msshrink(MSDptr); len--; if (len==0) break; } } } else { // Divide-and-conquer: // Find largest i such that B = base^(k*2^i) satisfies B <= X. // Divide by B: X = X1*B + X0. Convert X0 to string, fill up // for k*2^i characters, convert X1 to string. (Have to convert // X0 first because the conversion may temporarily prepend some // zero characters.) var uintC ilen_X = integer_length(X); var const cached_power_table_entry * p; var uintC ilen_B; var uintL i; for (i = 0; ; i++) { p = cached_power(base,i); ilen_B = integer_length(p->base_pow); if (2*ilen_B >= ilen_X) break; // 2*ilen_B < ilen_X, so certainly B^2 < X, let's continue with i+1. } // 2*ilen_B >= ilen_X, implies X < 2*B^2. // Of course also X >= B, implies ilen_X >= ilen_B. #ifdef MUL_REPLACES_DIV // Divide by B by computing // q := floor((X * floor(2^ilen_X/B)) / 2^ilen_X). // We have q <= floor(X/B) <= q+1, so we may have to increment q. // Note also that // floor(2^ilen_X/B) = floor(floor(2^(2*ilen_B)/B)/2^(2*ilen_B-ilen_X)) var cl_I q = (X * (p->inv_base_pow >> (2*ilen_B-ilen_X))) >> ilen_X; var cl_I r = X - q * p->base_pow; if (r < 0) throw runtime_exception(); if (r >= p->base_pow) { q = q+1; r = r - p->base_pow; if (r >= p->base_pow) throw runtime_exception(); } #else var cl_I_div_t q_r = floor2(X,p->base_pow); var const cl_I& q = q_r.quotient; var const cl_I& r = q_r.remainder; #endif var const cl_I& X1 = q; var const cl_I& X0 = r; var uintC B_baselen = (uintC)(k)<LSBptr -= B_baselen; I_to_digits(X1,base,erg); erg->LSBptr += B_baselen; erg_ptr = erg->MSBptr; } #undef next_digit // Streiche führende Nullen: while (*erg_ptr == '0') { erg_ptr++; } fertig: erg->MSBptr = erg_ptr; erg->len = erg->LSBptr - erg_ptr; } // Bit complexity (N := length(X)): O(log(N)*M(N)). } // namespace cln cln-1.3.3/src/integer/conv/cl_I_from_Q.cc0000644000000000000000000001110511201634737015033 0ustar // Q_to_I() helper. // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/cl_I.h" // Implementation. #include "cln/number.h" #ifdef intQsize #include "base/digitseq/cl_DS.h" namespace cln { cl_private_thing cl_I_constructor_from_Q (sint64 wert) { var uint64 test = wert & (sint64)minus_bit(cl_value_len-1); // test enthält die Bits, die nicht in den Fixnum-Wert >= 0 reinpassen. if ((test == 0) || (test == (uint64)(sint64)minus_bit(cl_value_len-1))) return (cl_private_thing)(cl_combine(cl_FN_tag,wert)); // Bignum erzeugen: // (dessen Länge bn_minlength <= n <= ceiling(32/intDsize) erfüllt) if (wert >= 0) { #define IF_LENGTH(i) \ if ((bn_minlength <= i) && (i*intDsize <= 64)) \ if (!((i+1)*intDsize <= 64) \ || ((uint64)wert < ((uint64)1 << (i*intDsize-1))) \ ) IF_LENGTH(1) bignum1: { var cl_heap_bignum* ptr = allocate_bignum(1); arrayLSref(ptr->data,1,0) = (uintD)wert; return (cl_private_thing)(ptr); } #if (intDsize <= 32) IF_LENGTH(2) bignum2: { var cl_heap_bignum* ptr = allocate_bignum(2); arrayLSref(ptr->data,2,0) = (uintD)wert; arrayLSref(ptr->data,2,1) = (uintD)(wert>>intDsize); return (cl_private_thing)(ptr); } #if (intDsize <= 16) IF_LENGTH(3) bignum3: { var cl_heap_bignum* ptr = allocate_bignum(3); arrayLSref(ptr->data,3,0) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,3,1) = (uintD)wert; arrayLSref(ptr->data,3,2) = (uintD)(wert>>intDsize); return (cl_private_thing)(ptr); } IF_LENGTH(4) bignum4: { var cl_heap_bignum* ptr = allocate_bignum(4); arrayLSref(ptr->data,4,0) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,4,1) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,4,2) = (uintD)wert; arrayLSref(ptr->data,4,3) = (uintD)(wert>>intDsize); return (cl_private_thing)(ptr); } #if (intDsize <= 8) IF_LENGTH(5) bignum5: { var cl_heap_bignum* ptr = allocate_bignum(5); arrayLSref(ptr->data,5,0) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,5,1) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,5,2) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,5,3) = (uintD)wert; arrayLSref(ptr->data,5,4) = (uintD)(wert>>intDsize); return (cl_private_thing)(ptr); } IF_LENGTH(6) bignum6: { var cl_heap_bignum* ptr = allocate_bignum(6); arrayLSref(ptr->data,6,0) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,6,1) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,6,2) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,6,3) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,6,4) = (uintD)wert; arrayLSref(ptr->data,6,5) = (uintD)(wert>>intDsize); return (cl_private_thing)(ptr); } IF_LENGTH(7) bignum7: { var cl_heap_bignum* ptr = allocate_bignum(7); arrayLSref(ptr->data,7,0) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,7,1) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,7,2) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,7,3) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,7,4) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,7,5) = (uintD)wert; arrayLSref(ptr->data,7,6) = (uintD)(wert>>intDsize); return (cl_private_thing)(ptr); } IF_LENGTH(8) bignum8: { var cl_heap_bignum* ptr = allocate_bignum(8); arrayLSref(ptr->data,8,0) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,8,1) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,8,2) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,8,3) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,8,4) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,8,5) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,8,6) = (uintD)wert; arrayLSref(ptr->data,8,7) = (uintD)(wert>>intDsize); return (cl_private_thing)(ptr); } #endif #endif #endif #undef IF_LENGTH } else { #define IF_LENGTH(i) \ if ((bn_minlength <= i) && (i*intDsize <= 64)) \ if (!((i+1)*intDsize <= 64) \ || ((uint64)wert >= ((uint64)(-1) << (i*intDsize-1))) \ ) IF_LENGTH(1) goto bignum1; #if (intDsize <= 32) IF_LENGTH(2) goto bignum2; #if (intDsize <= 16) IF_LENGTH(3) goto bignum3; IF_LENGTH(4) goto bignum4; #if (intDsize <= 8) IF_LENGTH(5) goto bignum5; IF_LENGTH(6) goto bignum6; IF_LENGTH(7) goto bignum7; IF_LENGTH(8) goto bignum8; #endif #endif #endif #undef IF_LENGTH } } } // namespace cln #endif cln-1.3.3/src/integer/conv/cl_I_from_L.cc0000644000000000000000000000547112034113706015030 0ustar // L_to_I() helper. // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/cl_I.h" // Implementation. #include "cln/number.h" #if (cl_value_len < 32) #include "base/digitseq/cl_DS.h" namespace cln { cl_private_thing cl_I_constructor_from_L (sint32 wert) { var uint32 test = wert & minus_bit(cl_value_len-1); // test enthält die Bits, die nicht in den Fixnum-Wert >= 0 reinpassen. if ((test == 0) || (test == (uint32)minus_bit(cl_value_len-1))) { return (cl_private_thing)(cl_combine(cl_FN_tag,wert)); } #if (intDsize==64) // trivially generate a Bignum of length one digit var cl_heap_bignum* ptr = allocate_bignum(1); arrayLSref(ptr->data,1,0) = wert; return (cl_private_thing)(ptr); #else // Bignum erzeugen: // (dessen Länge bn_minlength <= n <= ceiling(32/intDsize) erfüllt) if (bn_minlength == ceiling(32,intDsize)) { #if (intDsize==8) goto bignum4; #endif #if (intDsize==16) goto bignum2; #endif #if (intDsize==32) goto bignum1; #endif } if (wert >= 0) { #define IF_LENGTH(i) \ if ((bn_minlength <= i) && (i*intDsize <= 32)) \ if (!((i+1)*intDsize <= 32) \ || ((uint32)wert < (uint32)bitc(i*intDsize-1)) \ ) #if (intDsize <= 32) IF_LENGTH(1) bignum1: { var cl_heap_bignum* ptr = allocate_bignum(1); arrayLSref(ptr->data,1,0) = wert; return (cl_private_thing)(ptr); } #if (intDsize <= 16) IF_LENGTH(2) bignum2: { var cl_heap_bignum* ptr = allocate_bignum(2); arrayLSref(ptr->data,2,0) = (uintD)wert; arrayLSref(ptr->data,2,1) = (uintD)(wert>>intDsize); return (cl_private_thing)(ptr); } #if (intDsize <= 8) IF_LENGTH(3) bignum3: { var cl_heap_bignum* ptr = allocate_bignum(3); arrayLSref(ptr->data,3,0) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,3,1) = (uintD)wert; arrayLSref(ptr->data,3,2) = (uintD)(wert>>intDsize); return (cl_private_thing)(ptr); } IF_LENGTH(4) bignum4: { var cl_heap_bignum* ptr = allocate_bignum(4); arrayLSref(ptr->data,4,0) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,4,1) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,4,2) = (uintD)wert; arrayLSref(ptr->data,4,3) = (uintD)(wert>>intDsize); return (cl_private_thing)(ptr); } #endif #endif #endif #undef IF_LENGTH } else { #define IF_LENGTH(i) \ if ((bn_minlength <= i) && (i*intDsize <= 32)) \ if (!((i+1)*intDsize <= 32) \ || ((uint32)wert >= (uint32)(-bitc(i*intDsize-1))) \ ) #if (intDsize <= 32) IF_LENGTH(1) goto bignum1; #if (intDsize <= 16) IF_LENGTH(2) goto bignum2; #if (intDsize <= 8) IF_LENGTH(3) goto bignum3; IF_LENGTH(4) goto bignum4; #endif #endif #endif #undef IF_LENGTH } #endif NOTREACHED } } // namespace cln #endif cln-1.3.3/src/integer/conv/cl_I_from_L2.cc0000644000000000000000000001001311201634737015105 0ustar // L2_to_I() helper. // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/cl_I.h" // Implementation. #include "cln/number.h" #if (cl_word_size < 64) #include "base/digitseq/cl_DS.h" namespace cln { cl_private_thing cl_I_constructor_from_L2 (sint32 wert_hi, uint32 wert_lo) { if (wert_hi == 0) { if ((wert_lo & minus_bit(cl_value_len-1)) == 0) return (cl_private_thing)(cl_combine(cl_FN_tag,wert_lo)); } elif (wert_hi == ~(sint32)0) { if ((~wert_lo & minus_bit(cl_value_len-1)) == 0) return (cl_private_thing)(cl_combine(cl_FN_tag,(sint32)wert_lo)); } // Bignum erzeugen: // (dessen Länge bn_minlength <= n <= ceiling(64/intDsize) erfüllt) #define FILL_1_DIGIT(l,i,from) \ arrayLSref(ptr->data,l,i) = (uintD)from; #define FILL_2_DIGIT(l,i,from) \ arrayLSref(ptr->data,l,i) = (uintD)from; \ arrayLSref(ptr->data,l,i+1) = (uintD)(from>>intDsize); #define FILL_3_DIGIT(l,i,from) \ arrayLSref(ptr->data,l,i) = (uintD)from; from>>=intDsize; \ arrayLSref(ptr->data,l,i+1) = (uintD)from; \ arrayLSref(ptr->data,l,i+2) = (uintD)(from>>intDsize); #define FILL_4_DIGIT(l,i,from) \ arrayLSref(ptr->data,l,i) = (uintD)from; from>>=intDsize; \ arrayLSref(ptr->data,l,i+1) = (uintD)from; from>>=intDsize; \ arrayLSref(ptr->data,l,i+2) = (uintD)from; \ arrayLSref(ptr->data,l,i+3) = (uintD)(from>>intDsize); #if (intDsize==64) #define FILL_1 FILL_1_DIGIT(1,0,highlow64(wert_hi,wert_lo)); #endif #if (32/intDsize==1) #define FILL_1 FILL_1_DIGIT(1,0,wert_lo); #define FILL_2 FILL_1_DIGIT(2,1,wert_hi); FILL_1_DIGIT(2,0,wert_lo); #endif #if (32/intDsize==2) #define FILL_1 FILL_1_DIGIT(1,0,wert_lo); #define FILL_2 FILL_2_DIGIT(2,0,wert_lo); #define FILL_3 FILL_1_DIGIT(3,2,wert_hi); FILL_2_DIGIT(3,0,wert_lo); #define FILL_4 FILL_2_DIGIT(4,2,wert_hi); FILL_2_DIGIT(4,0,wert_lo); #endif #if (32/intDsize==4) #define FILL_1 FILL_1_DIGIT(1,0,wert_lo); #define FILL_2 FILL_2_DIGIT(2,0,wert_lo); #define FILL_3 FILL_3_DIGIT(3,0,wert_lo); #define FILL_4 FILL_4_DIGIT(4,0,wert_lo); #define FILL_5 FILL_1_DIGIT(5,4,wert_hi); FILL_4_DIGIT(5,0,wert_lo); #define FILL_6 FILL_2_DIGIT(6,4,wert_hi); FILL_4_DIGIT(6,0,wert_lo); #define FILL_7 FILL_3_DIGIT(7,4,wert_hi); FILL_4_DIGIT(7,0,wert_lo); #define FILL_8 FILL_4_DIGIT(8,4,wert_hi); FILL_4_DIGIT(8,0,wert_lo); #endif if (wert_hi >= 0) { #define IF_LENGTH(i) \ if ((bn_minlength <= i) && (i*intDsize <= 64)) \ if (!((i+1)*intDsize <= 64) \ || (i*intDsize-1 < 32 \ ? ((wert_hi == 0) && (wert_lo < (uint32)bitc(i*intDsize-1))) \ : ((uint32)wert_hi < (uint32)bitc(i*intDsize-1-32)) \ ) ) #define ALLOC(i) \ var cl_heap_bignum* ptr = allocate_bignum(i); #define OK \ return (cl_private_thing)(ptr); IF_LENGTH(1) bignum1: { ALLOC(1); FILL_1; OK; } #if (intDsize <= 32) IF_LENGTH(2) bignum2: { ALLOC(2); FILL_2; OK; } #if (intDsize <= 16) IF_LENGTH(3) bignum3: { ALLOC(3); FILL_3; OK; } IF_LENGTH(4) bignum4: { ALLOC(4); FILL_4; OK; } #if (intDsize <= 8) IF_LENGTH(5) bignum5: { ALLOC(5); FILL_5; OK; } IF_LENGTH(6) bignum6: { ALLOC(6); FILL_6; OK; } IF_LENGTH(7) bignum7: { ALLOC(7); FILL_7; OK; } IF_LENGTH(8) bignum8: { ALLOC(8); FILL_8; OK; } #endif #endif #endif #undef IF_LENGTH } else { #define IF_LENGTH(i) \ if ((bn_minlength <= i) && (i*intDsize <= 64)) \ if (!((i+1)*intDsize <= 64) \ || (i*intDsize-1 < 32 \ ? ((wert_hi == ~(sint32)0) && (wert_lo >= (uint32)(-bitc(i*intDsize-1)))) \ : ((uint32)wert_hi >= (uint32)(-bitc(i*intDsize-1-32))) \ ) ) IF_LENGTH(1) goto bignum1; #if (intDsize <= 32) IF_LENGTH(2) goto bignum2; #if (intDsize <= 16) IF_LENGTH(3) goto bignum3; IF_LENGTH(4) goto bignum4; #if (intDsize <= 8) IF_LENGTH(5) goto bignum5; IF_LENGTH(6) goto bignum6; IF_LENGTH(7) goto bignum7; IF_LENGTH(8) goto bignum8; #endif #endif #endif #undef IF_LENGTH } } } // namespace cln #endif cln-1.3.3/src/integer/conv/cl_I_from_NDS.cc0000644000000000000000000000630612034112616015256 0ustar // NDS_to_I(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/cl_I.h" // Implementation. #include "cln/number.h" #include "base/digitseq/cl_DS.h" namespace cln { CL_INLINE const cl_I CL_INLINE_DECL(NDS_to_I) (const uintD* MSDptr, uintC len) { // Mehr als bn_minlength Digits -> Bignum. // Weniger als bn_minlength Digits -> Fixnum. // Genau bn_minlength Digits -> Bignum oder Fixnum. if (len < bn_minlength) { // 0..bn_minlength-1 Digits, paßt in ein Fixnum: if (bn_minlength>1 ? (len==0) : TRUE) // 0 Digits { return 0; } #if (cl_word_size <= 32) var sint32 wert; if (bn_minlength>2 ? (len==1) : TRUE) // 1 Digit len_1: { wert = get_sint1D_Dptr(MSDptr mspop 1); } elif (bn_minlength>3 ? (len==2) : TRUE) // 2 Digits len_2: { wert = get_sint2D_Dptr(MSDptr mspop 2); } elif (bn_minlength>4 ? (len==3) : TRUE) // 3 Digits len_3: { wert = get_sint3D_Dptr(MSDptr mspop 3); } elif (TRUE) // 4 Digits len_4: { wert = get_sint4D_Dptr(MSDptr mspop 4); } elif (FALSE) // 5 Digits len_5: { wert = get_sint4D_Dptr(MSDptr mspop 5); } return L_to_FN(wert); #else // (cl_word_size==64) var sint64 wert; #if (intDsize==32) if (TRUE) // 1 Digit len_1: { wert = (sint64)(sintD)mspref(MSDptr,0); } elif (FALSE) // 2 Digits len_2: { wert = ((sint64)(sintD)mspref(MSDptr,0) << intDsize) | (uint64)(uintD)mspref(MSDptr,1); } #endif #if (intDsize==64) if (FALSE) // 1 Digit len_1: { wert = (sintD)mspref(MSDptr,0); } #endif return cl_I_from_word(cl_combine(cl_FN_tag,wert)); #endif } #if (cl_value_len > (bn_minlength-1)*intDsize) if (len == bn_minlength) // bn_minlength Digits, also (incl. Vorzeichen) zwischen // (bn_minlength-1)*intDsize+1 und bn_minlength*intDsize Bits. // Höchstens cl_value_len Bits -> paßt in ein Fixnum: { if ( (mspref(MSDptr,0) <= (uintD)(bit(cl_value_len-1-(bn_minlength-1)*intDsize)-1)) // Fixnum >=0 ? ||(mspref(MSDptr,0) >= (uintD)(-bit(cl_value_len-1-(bn_minlength-1)*intDsize))) // Fixnum <0 ? ) #if (bn_minlength==1) goto len_1; #endif #if (bn_minlength==2) goto len_2; #endif #if (bn_minlength==3) goto len_3; #endif #if (bn_minlength==4) goto len_4; #endif #if (bn_minlength==5) goto len_5; #endif } #endif // mindestens bn_minlength Digits, mache ein Bignum { var Bignum result = allocate_bignum(len); // neues Bignum mit dem Inhalt der NDS füllen: copy_loop_msp(MSDptr,arrayMSDptr(result->data,len),len); return result; } } } // namespace cln cln-1.3.3/src/integer/conv/cl_I_mul10plus.cc0000644000000000000000000000114211201634737015452 0ustar // mul_10_plus_x(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_I mul_10_plus_x (const cl_I& y, unsigned char x) { CL_ALLOCA_STACK; var uintD* MSDptr; var uintC len; var uintD* LSDptr; I_to_NDS_1(y, MSDptr=,len=,LSDptr=); // NDS zu Y var uintD carry = mulusmall_loop_lsp(10,LSDptr,len,x); // mal 10, plus x if (!(carry==0)) { lsprefnext(MSDptr) = carry; len++; } return UDS_to_I(MSDptr,len); // UDS als Integer zurück } } // namespace cln cln-1.3.3/src/integer/conv/cl_I_from_UL2.cc0000644000000000000000000000677611201634737015257 0ustar // UL2_to_I() helper. // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/cl_I.h" // Implementation. #include "cln/number.h" #if (cl_word_size < 64) #include "base/digitseq/cl_DS.h" namespace cln { cl_private_thing cl_I_constructor_from_UL2 (uint32 wert_hi, uint32 wert_lo) { if ((wert_hi == 0) && ((wert_lo & minus_bit(cl_value_len-1)) == 0) ) return (cl_private_thing)(cl_combine(cl_FN_tag,wert_lo)); // Bignum erzeugen: // (dessen Länge bn_minlength <= n <= ceiling((64+1)/intDsize) erfüllt) #define UL2_maxlength ceiling(64+1,intDsize) #define FILL_1_DIGIT(l,i,from) \ arrayLSref(ptr->data,l,i) = (uintD)from; #define FILL_2_DIGIT(l,i,from) \ arrayLSref(ptr->data,l,i) = (uintD)from; \ arrayLSref(ptr->data,l,i+1) = (uintD)(from>>intDsize); #define FILL_3_DIGIT(l,i,from) \ arrayLSref(ptr->data,l,i) = (uintD)from; from>>=intDsize; \ arrayLSref(ptr->data,l,i+1) = (uintD)from; \ arrayLSref(ptr->data,l,i+2) = (uintD)(from>>intDsize); #define FILL_4_DIGIT(l,i,from) \ arrayLSref(ptr->data,l,i) = (uintD)from; from>>=intDsize; \ arrayLSref(ptr->data,l,i+1) = (uintD)from; from>>=intDsize; \ arrayLSref(ptr->data,l,i+2) = (uintD)from; \ arrayLSref(ptr->data,l,i+3) = (uintD)(from>>intDsize); #if (intDsize==64) #define FILL_1 FILL_1_DIGIT(1,0,highlow64(wert_hi,wert_lo)); #define FILL_2 FILL_1_DIGIT(2,1,0); FILL_1_DIGIT(2,0,highlow64(wert_hi,wert_lo)); #endif #if (32/intDsize==1) #define FILL_1 FILL_1_DIGIT(1,0,wert_lo); #define FILL_2 FILL_1_DIGIT(2,1,wert_hi); FILL_1_DIGIT(2,0,wert_lo); #define FILL_3 FILL_1_DIGIT(3,2,0); FILL_1_DIGIT(3,1,wert_hi); FILL_1_DIGIT(3,0,wert_lo); #endif #if (32/intDsize==2) #define FILL_1 FILL_1_DIGIT(1,0,wert_lo); #define FILL_2 FILL_2_DIGIT(2,0,wert_lo); #define FILL_3 FILL_1_DIGIT(3,2,wert_hi); FILL_2_DIGIT(3,0,wert_lo); #define FILL_4 FILL_2_DIGIT(4,2,wert_hi); FILL_2_DIGIT(4,0,wert_lo); #define FILL_5 FILL_1_DIGIT(5,4,0); FILL_2_DIGIT(5,2,wert_hi); FILL_2_DIGIT(5,0,wert_lo); #endif #if (32/intDsize==4) #define FILL_1 FILL_1_DIGIT(1,0,wert_lo); #define FILL_2 FILL_2_DIGIT(2,0,wert_lo); #define FILL_3 FILL_3_DIGIT(3,0,wert_lo); #define FILL_4 FILL_4_DIGIT(4,0,wert_lo); #define FILL_5 FILL_1_DIGIT(5,4,wert_hi); FILL_4_DIGIT(5,0,wert_lo); #define FILL_6 FILL_2_DIGIT(6,4,wert_hi); FILL_4_DIGIT(6,0,wert_lo); #define FILL_7 FILL_3_DIGIT(7,4,wert_hi); FILL_4_DIGIT(7,0,wert_lo); #define FILL_8 FILL_4_DIGIT(8,4,wert_hi); FILL_4_DIGIT(8,0,wert_lo); #define FILL_9 FILL_1_DIGIT(9,8,0); FILL_4_DIGIT(9,4,wert_hi); FILL_4_DIGIT(9,0,wert_lo); #endif #define IF_LENGTH(i) \ if ((bn_minlength <= i) && (i <= UL2_maxlength)) \ if (!(i+1 <= UL2_maxlength) \ || (i*intDsize-1 < 32 \ ? ((wert_hi == 0) && (wert_lo < (uint32)bitc(i*intDsize-1))) \ : (wert_hi < (uint32)bitc(i*intDsize-1-32)) \ ) ) #define ALLOC(i) \ var cl_heap_bignum* ptr = allocate_bignum(i); #define OK \ return (cl_private_thing)(ptr); IF_LENGTH(1) { ALLOC(1); FILL_1; OK; } IF_LENGTH(2) { ALLOC(2); FILL_2; OK; } #if (intDsize <= 32) IF_LENGTH(3) { ALLOC(3); FILL_3; OK; } #if (intDsize <= 16) IF_LENGTH(4) { ALLOC(4); FILL_4; OK; } IF_LENGTH(5) { ALLOC(5); FILL_5; OK; } #if (intDsize <= 8) IF_LENGTH(6) { ALLOC(6); FILL_6; OK; } IF_LENGTH(7) { ALLOC(7); FILL_7; OK; } IF_LENGTH(8) { ALLOC(8); FILL_8; OK; } IF_LENGTH(9) { ALLOC(9); FILL_9; OK; } #endif #endif #endif #undef IF_LENGTH #undef UL2_maxlength } } // namespace cln #endif cln-1.3.3/src/integer/conv/cl_I_cached_power.cc0000644000000000000000000001373111201634737016242 0ustar // cached_power(). // Specification. #include "integer/conv/cl_I_cached_power.h" // Implementation. namespace cln { const power_table_entry power_table [36-2+1] = { #if (intDsize==8) { 7, 2*2*2*2*2*2*2 }, { 5, 3*3*3*3*3 }, { 3, 4*4*4 }, { 3, 5*5*5 }, { 3, 6*6*6 }, { 2, 7*7 }, { 2, 8*8 }, { 2, 9*9 }, { 2, 10*10 }, { 2, 11*11 }, { 2, 12*12 }, { 2, 13*13 }, { 2, 14*14 }, { 2, 15*15 }, { 1, 16 }, { 1, 17 }, { 1, 18 }, { 1, 19 }, { 1, 20 }, { 1, 21 }, { 1, 22 }, { 1, 23 }, { 1, 24 }, { 1, 25 }, { 1, 26 }, { 1, 27 }, { 1, 28 }, { 1, 29 }, { 1, 30 }, { 1, 31 }, { 1, 32 }, { 1, 33 }, { 1, 34 }, { 1, 35 }, { 1, 36 }, #endif #if (intDsize==16) { 15, 2*2*2*2*2*2*2*2*2*2*2*2*2*2*2 }, { 10, 3*3*3*3*3*3*3*3*3*3 }, { 7, 4*4*4*4*4*4*4 }, { 6, 5*5*5*5*5*5 }, { 6, 6*6*6*6*6*6 }, { 5, 7*7*7*7*7 }, { 5, 8*8*8*8*8 }, { 5, 9*9*9*9*9 }, { 4, 10*10*10*10 }, { 4, 11*11*11*11 }, { 4, 12*12*12*12 }, { 4, 13*13*13*13 }, { 4, 14*14*14*14 }, { 4, 15*15*15*15 }, { 3, 16*16*16 }, { 3, 17*17*17 }, { 3, 18*18*18 }, { 3, 19*19*19 }, { 3, 20*20*20 }, { 3, 21*21*21 }, { 3, 22*22*22 }, { 3, 23*23*23 }, { 3, 24*24*24 }, { 3, 25*25*25 }, { 3, 26*26*26 }, { 3, 27*27*27 }, { 3, 28*28*28 }, { 3, 29*29*29 }, { 3, 30*30*30 }, { 3, 31*31*31 }, { 3, 32*32*32 }, { 3, 33*33*33 }, { 3, 34*34*34 }, { 3, 35*35*35 }, { 3, 36*36*36 }, #endif #if (intDsize==32) { 31, 2UL*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2 }, { 20, 3UL*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3 }, { 15, 4UL*4*4*4*4*4*4*4*4*4*4*4*4*4*4 }, { 13, 5UL*5*5*5*5*5*5*5*5*5*5*5*5 }, { 12, 6UL*6*6*6*6*6*6*6*6*6*6*6 }, { 11, 7UL*7*7*7*7*7*7*7*7*7*7 }, { 10, 8UL*8*8*8*8*8*8*8*8*8 }, { 10, 9UL*9*9*9*9*9*9*9*9*9 }, { 9, 10UL*10*10*10*10*10*10*10*10 }, { 9, 11UL*11*11*11*11*11*11*11*11 }, { 8, 12UL*12*12*12*12*12*12*12 }, { 8, 13UL*13*13*13*13*13*13*13 }, { 8, 14UL*14*14*14*14*14*14*14 }, { 8, 15UL*15*15*15*15*15*15*15 }, { 7, 16UL*16*16*16*16*16*16 }, { 7, 17UL*17*17*17*17*17*17 }, { 7, 18UL*18*18*18*18*18*18 }, { 7, 19UL*19*19*19*19*19*19 }, { 7, 20UL*20*20*20*20*20*20 }, { 7, 21UL*21*21*21*21*21*21 }, { 7, 22UL*22*22*22*22*22*22 }, { 7, 23UL*23*23*23*23*23*23 }, { 6, 24UL*24*24*24*24*24 }, { 6, 25UL*25*25*25*25*25 }, { 6, 26UL*26*26*26*26*26 }, { 6, 27UL*27*27*27*27*27 }, { 6, 28UL*28*28*28*28*28 }, { 6, 29UL*29*29*29*29*29 }, { 6, 30UL*30*30*30*30*30 }, { 6, 31UL*31*31*31*31*31 }, { 6, 32UL*32*32*32*32*32 }, { 6, 33UL*33*33*33*33*33 }, { 6, 34UL*34*34*34*34*34 }, { 6, 35UL*35*35*35*35*35 }, { 6, 36UL*36*36*36*36*36 }, #endif #if (intDsize==64) { 63, 2ULL*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2 }, { 40, 3ULL*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3*3 }, { 31, 4ULL*4*4*4*4*4*4*4*4*4*4*4*4*4*4*4*4*4*4*4*4*4*4*4*4*4*4*4*4*4*4 }, { 27, 5ULL*5*5*5*5*5*5*5*5*5*5*5*5*5*5*5*5*5*5*5*5*5*5*5*5*5*5 }, { 24, 6ULL*6*6*6*6*6*6*6*6*6*6*6*6*6*6*6*6*6*6*6*6*6*6*6 }, { 22, 7ULL*7*7*7*7*7*7*7*7*7*7*7*7*7*7*7*7*7*7*7*7*7 }, { 21, 8ULL*8*8*8*8*8*8*8*8*8*8*8*8*8*8*8*8*8*8*8*8 }, { 20, 9ULL*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9*9 }, { 19, 10ULL*10*10*10*10*10*10*10*10*10*10*10*10*10*10*10*10*10*10 }, { 18, 11ULL*11*11*11*11*11*11*11*11*11*11*11*11*11*11*11*11*11 }, { 17, 12ULL*12*12*12*12*12*12*12*12*12*12*12*12*12*12*12*12 }, { 17, 13ULL*13*13*13*13*13*13*13*13*13*13*13*13*13*13*13*13 }, { 16, 14ULL*14*14*14*14*14*14*14*14*14*14*14*14*14*14*14 }, { 16, 15ULL*15*15*15*15*15*15*15*15*15*15*15*15*15*15*15 }, { 15, 16ULL*16*16*16*16*16*16*16*16*16*16*16*16*16*16 }, { 15, 17ULL*17*17*17*17*17*17*17*17*17*17*17*17*17*17 }, { 15, 18ULL*18*18*18*18*18*18*18*18*18*18*18*18*18*18 }, { 15, 19ULL*19*19*19*19*19*19*19*19*19*19*19*19*19*19 }, { 14, 20ULL*20*20*20*20*20*20*20*20*20*20*20*20*20 }, { 14, 21ULL*21*21*21*21*21*21*21*21*21*21*21*21*21 }, { 14, 22ULL*22*22*22*22*22*22*22*22*22*22*22*22*22 }, { 14, 23ULL*23*23*23*23*23*23*23*23*23*23*23*23*23 }, { 13, 24ULL*24*24*24*24*24*24*24*24*24*24*24*24 }, { 13, 25ULL*25*25*25*25*25*25*25*25*25*25*25*25 }, { 13, 26ULL*26*26*26*26*26*26*26*26*26*26*26*26 }, { 13, 27ULL*27*27*27*27*27*27*27*27*27*27*27*27 }, { 13, 28ULL*28*28*28*28*28*28*28*28*28*28*28*28 }, { 13, 29ULL*29*29*29*29*29*29*29*29*29*29*29*29 }, { 13, 30ULL*30*30*30*30*30*30*30*30*30*30*30*30 }, { 12, 31ULL*31*31*31*31*31*31*31*31*31*31*31 }, { 12, 32ULL*32*32*32*32*32*32*32*32*32*32*32 }, { 12, 33ULL*33*33*33*33*33*33*33*33*33*33*33 }, { 12, 34ULL*34*34*34*34*34*34*34*34*34*34*34 }, { 12, 35ULL*35*35*35*35*35*35*35*35*35*35*35 }, { 12, 36ULL*36*36*36*36*36*36*36*36*36*36*36 }, #endif }; cached_power_table* ctable [36-2+1] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; const cached_power_table_entry * cached_power (uintD base, uintL i) { var cached_power_table* ptr; if (!(ptr = ctable[base-2])) { ctable[base-2] = ptr = new cached_power_table (); } var uintL j; for (j = 0; j <= i; j++) { if (zerop(ptr->element[j].base_pow)) { // Compute b^(k*2^j) and its inverse. cl_I x = (j==0 ? cl_I(power_table[base-2].b_to_the_k) : ptr->element[j-1].base_pow * ptr->element[j-1].base_pow ); ptr->element[j].base_pow = x; #ifdef MUL_REPLACES_DIV ptr->element[j].inv_base_pow = floor1(ash(1,2*integer_length(x)),x); #endif } } return &ptr->element[i]; } AT_DESTRUCTION(cached_power) { for (var uintD base = 2; base <= 36; base++) { var cached_power_table* ptr = ctable[base-2]; if (ptr) { delete ptr; ctable[base-2] = NULL; } } } } // namespace cln cln-1.3.3/src/integer/conv/cl_I_from_UDS.cc0000644000000000000000000000141311201634737015267 0ustar // UDS_to_I(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/cl_I.h" // Implementation. #include "cln/number.h" #include "base/digitseq/cl_DS.h" #include "base/cl_inline.h" #include "integer/conv/cl_I_from_NDS.cc" namespace cln { CL_INLINE2 const cl_I CL_INLINE2_DECL(UDS_to_I) (uintD* MSDptr, uintC len) { while ( (!(len==0)) && (mspref(MSDptr,0)==0) ) // solange len>0 und MSD = 0, { msshrink(MSDptr); len--; } // Nulldigit streichen // Dann wie bei NUDS_to_I : if ((!(len==0)) && ((sintD)mspref(MSDptr,0) < 0)) // Falls die Länge >0 und das Most significant Bit = 1 sind, // die Digit Sequence um ein Nulldigit erweitern: { lsprefnext(MSDptr) = 0; len++; } return NDS_to_I_inline(MSDptr,len); } } // namespace cln cln-1.3.3/src/integer/conv/cl_I_from_UQ.cc0000644000000000000000000001212711201634737015165 0ustar // UQ_to_I() helper. // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/cl_I.h" // Implementation. #include "cln/number.h" #ifdef intQsize #include "base/digitseq/cl_DS.h" namespace cln { cl_private_thing cl_I_constructor_from_UQ (uint64 wert) { if ((wert & (sint64)minus_bit(cl_value_len-1)) == 0) // Bits, die nicht in den Fixnum-Wert >= 0 reinpassen. return (cl_private_thing)(cl_combine(cl_FN_tag,wert)); // Bignum erzeugen: // (dessen Länge bn_minlength <= n <= ceiling((32+1)/intDsize) erfüllt) #define UQ_maxlength ceiling(64+1,intDsize) #define IF_LENGTH(i) \ if ((bn_minlength <= i) && (i <= UQ_maxlength)) \ if (!(i+1 <= UQ_maxlength) \ || ((uint64)wert < ((uint64)1 << (i*intDsize-1 < 64 ? i*intDsize-1 : 0))) \ ) IF_LENGTH(1) { var cl_heap_bignum* ptr = allocate_bignum(1); arrayLSref(ptr->data,1,0) = (uintD)wert; return (cl_private_thing)(ptr); } IF_LENGTH(2) { var cl_heap_bignum* ptr = allocate_bignum(2); arrayLSref(ptr->data,2,0) = (uintD)wert; #if (intDsize>=64) arrayLSref(ptr->data,2,1) = 0; #else arrayLSref(ptr->data,2,1) = (uintD)(wert>>intDsize); #endif return (cl_private_thing)(ptr); } #if (intDsize <= 32) IF_LENGTH(3) { var cl_heap_bignum* ptr = allocate_bignum(3); arrayLSref(ptr->data,3,0) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,3,1) = (uintD)wert; #if (2*intDsize>=64) arrayLSref(ptr->data,3,2) = 0; #else arrayLSref(ptr->data,3,2) = (uintD)(wert>>intDsize); #endif return (cl_private_thing)(ptr); } #if (intDsize <= 16) IF_LENGTH(4) { var cl_heap_bignum* ptr = allocate_bignum(4); arrayLSref(ptr->data,4,0) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,4,1) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,4,2) = (uintD)wert; #if (3*intDsize>=64) arrayLSref(ptr->data,4,3) = 0; #else arrayLSref(ptr->data,4,3) = (uintD)(wert>>intDsize); #endif return (cl_private_thing)(ptr); } IF_LENGTH(5) { var cl_heap_bignum* ptr = allocate_bignum(5); arrayLSref(ptr->data,5,0) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,5,1) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,5,2) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,5,3) = (uintD)wert; #if (4*intDsize>=64) arrayLSref(ptr->data,5,4) = 0; #else arrayLSref(ptr->data,5,4) = (uintD)(wert>>intDsize); #endif return (cl_private_thing)(ptr); } #if (intDsize <= 8) IF_LENGTH(6) { var cl_heap_bignum* ptr = allocate_bignum(6); arrayLSref(ptr->data,6,0) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,6,1) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,6,2) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,6,3) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,6,4) = (uintD)wert; #if (5*intDsize>=64) arrayLSref(ptr->data,6,5) = 0; #else arrayLSref(ptr->data,6,5) = (uintD)(wert>>intDsize); #endif return (cl_private_thing)(ptr); } IF_LENGTH(7) { var cl_heap_bignum* ptr = allocate_bignum(7); arrayLSref(ptr->data,7,0) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,7,1) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,7,2) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,7,3) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,7,4) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,7,5) = (uintD)wert; #if (6*intDsize>=64) arrayLSref(ptr->data,7,6) = 0; #else arrayLSref(ptr->data,7,6) = (uintD)(wert>>intDsize); #endif return (cl_private_thing)(ptr); } IF_LENGTH(8) { var cl_heap_bignum* ptr = allocate_bignum(8); arrayLSref(ptr->data,8,0) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,8,1) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,8,2) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,8,3) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,8,4) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,8,5) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,8,6) = (uintD)wert; #if (7*intDsize>=64) arrayLSref(ptr->data,8,7) = 0; #else arrayLSref(ptr->data,8,7) = (uintD)(wert>>intDsize); #endif return (cl_private_thing)(ptr); } IF_LENGTH(9) { var cl_heap_bignum* ptr = allocate_bignum(9); arrayLSref(ptr->data,9,0) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,9,1) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,9,2) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,9,3) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,9,4) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,9,5) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,9,6) = (uintD)wert; wert >>= intDsize; arrayLSref(ptr->data,9,7) = (uintD)wert; #if (8*intDsize>=64) arrayLSref(ptr->data,9,8) = 0; #else arrayLSref(ptr->data,9,8) = (uintD)(wert>>intDsize); #endif return (cl_private_thing)(ptr); } #endif #endif #endif #undef IF_LENGTH #undef UQ_maxlength } } // namespace cln #endif cln-1.3.3/src/integer/conv/cl_I_from_DS.cc0000644000000000000000000000250411201634737015144 0ustar // DS_to_I(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/cl_I.h" // Implementation. #include "cln/number.h" #include "base/digitseq/cl_DS.h" #include "base/cl_inline.h" #include "integer/conv/cl_I_from_NDS.cc" namespace cln { CL_INLINE2 const cl_I CL_INLINE2_DECL(DS_to_I) (const uintD* MSDptr, uintC len) { // erst normalisieren. // Dabei evtl. MSDptr erhöhen und len erniedrigen: if (!(len==0)) // leere DS ist normalisiert { var uintC count = len-1; if ((sintD)mspref(MSDptr,0) >= 0) // Zahl >= 0 { // versuche maximal len-1 führende Nullen-Digits zu streichen: while (!(count==0) && (mspref(MSDptr,0)==0) && ((sintD)mspref(MSDptr,1)>=0)) { msshrink(MSDptr); len--; count--; } // Nulldigit streichen } else // Zahl < 0 // versuche maximal len-1 führende Einsen-Digits zu streichen: { while (!(count==0) && ((sintD)mspref(MSDptr,0)==-1) && ((sintD)mspref(MSDptr,1)<0)) { msshrink(MSDptr); len--; count--; } // Einsen-digit streichen } } // Eventuell ist jetzt noch bei der DS 0 ausnahmsweise len=1, // aber NDS_to_I wird auch damit fertig. return NDS_to_I_inline(MSDptr,len); } } // namespace cln cln-1.3.3/src/integer/conv/cl_I_digits_need.cc0000644000000000000000000000434711201634737016100 0ustar // cl_digits_need(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/cl_I.h" // Implementation. namespace cln { uintC cl_digits_need (const cl_I& x, uintL base) { if (fixnump(x)) { return cl_value_len; } // x < 2^cl_value_len, base >= 2, also reicht das else { var uintC len = TheBignum(x)->length; // 1+ceiling(len * intDsize*log(2)/log(base)) Bytes oder etwas mehr var uintC need = 1+floor(len,1024/intDsize); // > ceiling(len*intDsize/1024) >= 0 switch (base) // need mit ceiling(1024*log(2)/log(base)) multiplizieren: { case 2: need = 1024*need; break; case 3: need = 647*need; break; case 4: need = 512*need; break; case 5: need = 442*need; break; case 6: need = 397*need; break; case 7: need = 365*need; break; case 8: need = 342*need; break; case 9: need = 324*need; break; case 10: need = 309*need; break; case 11: need = 297*need; break; case 12: need = 286*need; break; case 13: need = 277*need; break; case 14: need = 269*need; break; case 15: need = 263*need; break; case 16: need = 256*need; break; case 17: need = 251*need; break; case 18: need = 246*need; break; case 19: need = 242*need; break; case 20: need = 237*need; break; case 21: need = 234*need; break; case 22: need = 230*need; break; case 23: need = 227*need; break; case 24: need = 224*need; break; case 25: need = 221*need; break; case 26: need = 218*need; break; case 27: need = 216*need; break; case 28: need = 214*need; break; case 29: need = 211*need; break; case 30: need = 209*need; break; case 31: need = 207*need; break; case 32: need = 205*need; break; case 33: need = 203*need; break; case 34: need = 202*need; break; case 35: need = 200*need; break; case 36: need = 199*need; break; default: NOTREACHED } // Nun gilt need >= len*intDsize*log(2)/log(base). need += 1; // Platzbedarf in Bytes return need; } } } // namespace cln cln-1.3.3/src/integer/conv/cl_I_to_Q.cc0000644000000000000000000001200711201634737014514 0ustar // cl_I_to_Q(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/cl_I.h" // Implementation. #ifdef intQsize #include "cln/number.h" #include "base/digitseq/cl_DS.h" #include "cln/io.h" #include "cln/integer_io.h" #include "cln/exception.h" #include namespace cln { sint64 cl_I_to_Q (const cl_I& obj) { if (fixnump(obj)) // Fixnum return (sint64)(sintV)FN_to_V(obj); { // Bignum var cl_heap_bignum* bn = TheBignum(obj); var uintC len = bn->length; if ((sintD)mspref(arrayMSDptr(bn->data,len),0) >= 0) { // Bignum > 0 #define IF_LENGTH(i) \ if (bn_minlength <= i) /* genau i Digits überhaupt möglich? */\ if (len == i) /* genau i Digits? */ \ /* 2^((i-1)*intDsize-1) <= obj < 2^(i*intDsize-1) */ \ if ( (i*intDsize > 64) \ && ( ((i-1)*intDsize >= 64) \ || (mspref(arrayMSDptr(bn->data,len),0) >= (uintD)bitc(63-(i-1)*intDsize)) \ ) ) \ goto bad; \ else #if (intDsize==64) IF_LENGTH(1) return (uint64)arrayLSref(bn->data,1,0); #endif #if (intDsize==32) IF_LENGTH(1) return (uint64)get_uint1D_Dptr(arrayLSDptr(bn->data,1)); IF_LENGTH(2) return ((uint64)get_uint1D_Dptr(arrayLSDptr(bn->data,2) lspop 1) << 32) | (uint64)get_uint1D_Dptr(arrayLSDptr(bn->data,2)); #endif #if (intDsize==16) IF_LENGTH(1) return (uint64)get_uint1D_Dptr(arrayLSDptr(bn->data,1)); IF_LENGTH(2) return (uint64)get_uint2D_Dptr(arrayLSDptr(bn->data,2)); IF_LENGTH(3) return ((uint64)get_uint1D_Dptr(arrayLSDptr(bn->data,3) lspop 2) << 32) | (uint64)get_uint2D_Dptr(arrayLSDptr(bn->data,3)); IF_LENGTH(4) return ((uint64)get_uint2D_Dptr(arrayLSDptr(bn->data,4) lspop 2) << 32) | (uint64)get_uint2D_Dptr(arrayLSDptr(bn->data,4)); #endif #if (intDsize==8) IF_LENGTH(1) return (uint64)get_uint1D_Dptr(arrayLSDptr(bn->data,1)); IF_LENGTH(2) return (uint64)get_uint2D_Dptr(arrayLSDptr(bn->data,2)); IF_LENGTH(3) return (uint64)get_uint3D_Dptr(arrayLSDptr(bn->data,3)); IF_LENGTH(4) return (uint64)get_uint4D_Dptr(arrayLSDptr(bn->data,4)); IF_LENGTH(5) return ((uint64)get_uint1D_Dptr(arrayLSDptr(bn->data,5) lspop 4) << 32) | (uint64)get_uint4D_Dptr(arrayLSDptr(bn->data,5)); IF_LENGTH(6) return ((uint64)get_uint2D_Dptr(arrayLSDptr(bn->data,6) lspop 4) << 32) | (uint64)get_uint4D_Dptr(arrayLSDptr(bn->data,6)); IF_LENGTH(7) return ((uint64)get_uint3D_Dptr(arrayLSDptr(bn->data,7) lspop 4) << 32) | (uint64)get_uint4D_Dptr(arrayLSDptr(bn->data,7)); IF_LENGTH(8) return ((uint64)get_uint4D_Dptr(arrayLSDptr(bn->data,8) lspop 4) << 32) | (uint64)get_uint4D_Dptr(arrayLSDptr(bn->data,8)); #endif #undef IF_LENGTH } else { // Bignum < 0 #define IF_LENGTH(i) \ if (bn_minlength <= i) /* genau i Digits überhaupt möglich? */\ if (len == i) /* genau i Digits? */ \ /* - 2^(i*intDsize-1) <= obj < - 2^((i-1)*intDsize-1) */ \ if ( (i*intDsize > 64) \ && ( ((i-1)*intDsize >= 64) \ || (mspref(arrayMSDptr(bn->data,len),0) < (uintD)(-bitc(63-(i-1)*intDsize))) \ ) ) \ goto bad; \ else #if (intDsize==64) IF_LENGTH(1) return (sint64)arrayLSref(bn->data,1,0); #endif #if (intDsize==32) IF_LENGTH(1) return (sint64)get_sint1D_Dptr(arrayLSDptr(bn->data,1)); IF_LENGTH(2) return ((sint64)get_sint1D_Dptr(arrayLSDptr(bn->data,2) lspop 1) << 32) | (uint64)get_uint1D_Dptr(arrayLSDptr(bn->data,2)); #endif #if (intDsize==16) IF_LENGTH(1) return (sint64)get_sint1D_Dptr(arrayLSDptr(bn->data,1)); IF_LENGTH(2) return (sint64)get_sint2D_Dptr(arrayLSDptr(bn->data,2)); IF_LENGTH(3) return ((sint64)get_sint1D_Dptr(arrayLSDptr(bn->data,3) lspop 2) << 32) | (uint64)get_uint2D_Dptr(arrayLSDptr(bn->data,3)); IF_LENGTH(4) return ((sint64)get_sint2D_Dptr(arrayLSDptr(bn->data,4) lspop 2) << 32) | (uint64)get_uint2D_Dptr(arrayLSDptr(bn->data,4)); #endif #if (intDsize==8) IF_LENGTH(1) return (sint64)get_sint1D_Dptr(arrayLSDptr(bn->data,1)); IF_LENGTH(2) return (sint64)get_sint2D_Dptr(arrayLSDptr(bn->data,2)); IF_LENGTH(3) return (sint64)get_sint3D_Dptr(arrayLSDptr(bn->data,3)); IF_LENGTH(4) return (sint64)get_sint4D_Dptr(arrayLSDptr(bn->data,4)); IF_LENGTH(5) return ((sint64)get_sint1D_Dptr(arrayLSDptr(bn->data,5) lspop 4) << 32) | (uint64)get_uint4D_Dptr(arrayLSDptr(bn->data,5)); IF_LENGTH(6) return ((sint64)get_sint2D_Dptr(arrayLSDptr(bn->data,6) lspop 4) << 32) | (uint64)get_uint4D_Dptr(arrayLSDptr(bn->data,6)); IF_LENGTH(7) return ((sint64)get_sint3D_Dptr(arrayLSDptr(bn->data,7) lspop 4) << 32) | (uint64)get_uint4D_Dptr(arrayLSDptr(bn->data,7)); IF_LENGTH(8) return ((sint64)get_sint4D_Dptr(arrayLSDptr(bn->data,8) lspop 4) << 32) | (uint64)get_uint4D_Dptr(arrayLSDptr(bn->data,8)); #endif #undef IF_LENGTH } bad: // unpassendes Objekt std::ostringstream buf; fprint(buf, "Not a 64-bit integer: "); fprint(buf, obj); throw runtime_exception(buf.str()); } } } // namespace cln #endif cln-1.3.3/src/integer/misc/0000755000000000000000000000000012173046201012333 5ustar cln-1.3.3/src/integer/misc/cl_I_max.cc0000644000000000000000000000036011201634740014356 0ustar // max(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. namespace cln { const cl_I max (const cl_I& x, const cl_I& y) { return (x >= y ? x : y); } } // namespace cln cln-1.3.3/src/integer/misc/cl_I_debug.cc0000644000000000000000000000113611201634740014661 0ustar // cl_I debugging support. // General includes. #include "base/cl_sysdep.h" // Specification. // Implementation. #include "cln/integer.h" #include "cln/io.h" #include "cln/integer_io.h" namespace cln { static void dprint (cl_heap* pointer) { var const cl_I& obj = *(const cl_I*)&pointer; fprint(cl_debugout, "(cl_I) "); fprint(cl_debugout, obj); } AT_INITIALIZATION(dprint_I) { cl_register_type_printer(cl_class_fixnum,dprint); cl_register_type_printer(cl_class_bignum,dprint); } // This dummy links in this module when requires it. int cl_I_debug_module; } // namespace cln cln-1.3.3/src/integer/misc/combin/0000755000000000000000000000000012173046201013602 5ustar cln-1.3.3/src/integer/misc/combin/cl_I_combin.h0000644000000000000000000000055611201634740016160 0ustar // cl_I internals for combinatorial functions #ifndef _CL_I_COMBIN_H #define _CL_I_COMBIN_H #include "cln/number.h" #include "cln/integer_class.h" namespace cln { // UP für Fakultät: // Bilde das Produkt prod(a < i <= b, 2*i+1), wobei 0 <= a < b klein. extern const cl_I cl_I_prod_ungerade (uintL a, uintL b); } // namespace cln #endif /* _CL_I_COMBIN_H */ cln-1.3.3/src/integer/misc/combin/cl_I_doublefactorial.cc0000644000000000000000000001303311201634740020200 0ustar // doublefactorial(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "integer/misc/combin/cl_I_combin.h" namespace cln { // Method: // n <= 19 -> Get result (Fixnum) from table // Else: // odd n: same procedure as factorial(n) but now, each odd number in // n/2^k < m <= n/2^(k-1) occurs only once in the product and we do not // shift at the end, since there are no powers of two. // even n: set m to n/2 and calculate n!!=factorial(m)*2^m using the same // divide and conquer method as in the function factorial() to compute // the product of all odd numbers. At the end, apply a shift of // ord2(n!) = n - logcount(n) to account both for 2^m and for powers of // two in factorial(m). const cl_I doublefactorial (uintL n) // assume n >= 0 small { static cl_I const doublefakul_table [] = { 1, 1UL, 1UL*2, 1UL*3, #if (cl_value_len>=5) 1UL*2*4, 1UL*3*5, #if (cl_value_len>=7) 1UL*2*4*6, #if (cl_value_len>=8) 1UL*3*5*7, #if (cl_value_len>=10) 1UL*2*4*6*8, #if (cl_value_len>=11) 1UL*3*5*7*9, #if (cl_value_len>=13) 1UL*2*4*6*8*10, #if (cl_value_len>=15) 1UL*3*5*7*9*11, #if (cl_value_len>=17) 1UL*2*4*6*8*10*12, #if (cl_value_len>=19) 1UL*3*5*7*9*11*13, #if (cl_value_len>=21) 1UL*2*4*6*8*10*12*14, #if (cl_value_len>=22) 1UL*3*5*7*9*11*13*15, #if (cl_value_len>=25) 1UL*2*4*6*8*10*12*14*16, #if (cl_value_len>=27) 1UL*3*5*7*9*11*13*15*17, #if (cl_value_len>=29) 1UL*2*4*6*8*10*12*14*16*18, #if (cl_value_len>=31) 1UL*3*5*7*9*11*13*15*17*19, #if (cl_value_len>=33) 1UL*2*4*6*8*10*12*14*16*18*20, #if (cl_value_len>=35) 1UL*3*5*7*9*11*13*15*17*19*21, #if (cl_value_len>=38) 1UL*2*4*6*8*10*12*14*16*18*20*22, #if (cl_value_len>=40) 1UL*3*5*7*9*11*13*15*17*19*21*23, #if (cl_value_len>=42) 1UL*2*4*6*8*10*12*14*16*18*20*22*24, #if (cl_value_len>=44) 1UL*3*5*7*9*11*13*15*17*19*21*23*25, #if (cl_value_len>=47) 1UL*2*4*6*8*10*12*14*16*18*20*22*24*26, #if (cl_value_len>=49) 1UL*3*5*7*9*11*13*15*17*19*21*23*25*27, #if (cl_value_len>=52) 1UL*2*4*6*8*10*12*14*16*18*20*22*24*26*28, #if (cl_value_len>=54) 1UL*3*5*7*9*11*13*15*17*19*21*23*25*27*29, #if (cl_value_len>=57) 1UL*2*4*6*8*10*12*14*16*18*20*22*24*26*28*30, #if (cl_value_len>=59) 1UL*3*5*7*9*11*13*15*17*19*21*23*25*27*29*31, #if (cl_value_len>=62) 1UL*2*4*6*8*10*12*14*16*18*20*22*24*26*28*30*32, #if (cl_value_len>=64) 1UL*3*5*7*9*11*13*15*17*19*21*23*25*27*29*31*33, #if (cl_value_len>=67) ... #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif }; if (n < sizeof(doublefakul_table)/sizeof(cl_I)) { return doublefakul_table[n]; } else { if (n%2) // n odd { var cl_I prod = 1; // bisheriges Produkt := 1 var uintL k = 1; var uintL A = n; var uintL B = n; // obere Intervallgrenze floor(n/2^(k-1)) loop { // 'A' enthält floor(n/2^(k-1)). A = A >> 1; // untere Grenze floor(n/2^k) // 'A' enthält floor(n/2^k). // Bilde Teilprodukt prod(A < i <= B & oddp(i), i) // = prod(floor((A-1)/2) < i <= floor((B-1)/2), 2*i+1) // wobei B = floor(n/2^(k-1)), A = floor(n/2^k) = floor(B/2). { var uintL b = floor(B-1,2); if (b==0) break; // B=2 oder B=1 -> Produkt fertig var uintL a = floor(A-1,2); prod = cl_I_prod_ungerade(a,b) * prod; // aufmultiplizieren } k = k+1; B = A; } return prod; } else // n even { var cl_I prod = 1; // bisheriges Produkt := 1 var uintL m = n/2; var uintL k = 1; var uintL A = m; var uintL B = m; // obere Intervallgrenze floor(m/2^(k-1)) loop { // 'A' enthält floor(m/2^(k-1)). A = A >> 1; // untere Grenze floor(m/2^k) // 'A' enthält floor(m/2^k). // Bilde Teilprodukt prod(A < i <= B & oddp(i), i) // = prod(floor((A-1)/2) < i <= floor((B-1)/2), 2*i+1) // wobei B = floor(m/2^(k-1)), A = floor(m/2^k) = floor(B/2). { var uintL b = floor(B-1,2); if (b==0) break; // B=2 oder B=1 -> Produkt fertig var uintL a = floor(A-1,2); prod = expt_pos(cl_I_prod_ungerade(a,b),k) * prod; // aufmultiplizieren } k = k+1; B = A; } return prod << (n - logcount(n)); } } } // Bit complexity (N := n): O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/integer/misc/combin/cl_I_binomial.cc0000644000000000000000000000260411201634740016635 0ustar // binomial(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/misc/combin/cl_I_combin.h" namespace cln { const cl_I binomial (uintL n, uintL k) { // Method: // Ensure 0 <= k <= n: If nn/2, replace k by n-k. // Compute the product (n-k+1)...n and divide by k!. // When computing the product m < i <= n, split into the odd part // and the even part. The even part is 2^(ord2(n!)-ord2(m!)), // and recall that ord2(n!) = n - logcount(n). The odd part is // computed recursively: It is the product of the odd part of // m/2 < i <= n/2, times the product of m < 2*i+1 <= n. The // recursion goes until floor(m/2^j) = floor(n/2^j) or floor(n/2^j) < 2. if (n < k) return 0; // Now 0 <= k <= n. if (2*k > n) k = n-k; // Now 0 <= k <= n/2. var cl_I prod = 1; var uintL m = n-k; var uintL j = 0; { var uintL a = m; var uintL b = n; while (a < b && b > 1) { a = floor(a,2); b = floor(b,2); j++; } } while (j > 0) { j--; var uintL a = m>>j; var uintL b = n>>j; // Compute product(a < i <= b and i odd, i) a = floor(a-1,2); b = floor(b-1,2); // = product(a < i <= b, 2i+1) if (a < b) prod = prod * cl_I_prod_ungerade(a,b); } prod = prod << (k + logcount(m) - logcount(n)); return exquopos(prod,factorial(k)); } } // namespace cln cln-1.3.3/src/integer/misc/combin/cl_I_factorial.cc0000644000000000000000000000730611201634740017013 0ustar // factorial(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "integer/misc/combin/cl_I_combin.h" namespace cln { // Methode: // n <= 10 -> Ergebnis (Fixnum) aus Tabelle // Sonst: // Zweierpotenzen extra am Schluß durch einen Shift um // ord2(n!) = sum(k>=1, floor(n/2^k) ) = n - logcount(n) Bits. // Für k>=1 wird jede ungerade Zahl m im Intervall n/2^k < m <= n/2^(k-1) // genau k mal gebraucht (als ungerader Anteil von m*2^0,...,m*2^(k-1) ). // Zur Bestimmung des Produkts aller ungeraden Zahlen in einem Intervall // a < m <= b verwenden wir eine rekursive Funktion, die nach Divide-and- // Conquer das Produkt über die Intervalle a < m <= c und c < m <= b // (c := floor((a+b)/2)) bestimmt und beide zusammenmultipliziert. Dies // vermeidet, daß oft große Zahlen mit ganz kleinen Zahlen multipliziert // werden. const cl_I factorial (uintL n) // assume n >= 0 small { static uintV const fakul_table [] = { 1, 1UL, 1UL*2, #if (cl_value_len>=4) 1UL*2*3, #if (cl_value_len>=6) 1UL*2*3*4, #if (cl_value_len>=8) 1UL*2*3*4*5, #if (cl_value_len>=11) 1UL*2*3*4*5*6, #if (cl_value_len>=14) 1UL*2*3*4*5*6*7, #if (cl_value_len>=17) 1UL*2*3*4*5*6*7*8, #if (cl_value_len>=20) 1UL*2*3*4*5*6*7*8*9, #if (cl_value_len>=23) 1UL*2*3*4*5*6*7*8*9*10, #if (cl_value_len>=27) 1UL*2*3*4*5*6*7*8*9*10*11, #if (cl_value_len>=30) 1UL*2*3*4*5*6*7*8*9*10*11*12, #if (cl_value_len>=34) 1UL*2*3*4*5*6*7*8*9*10*11*12*13, #if (cl_value_len>=38) 1UL*2*3*4*5*6*7*8*9*10*11*12*13*14, #if (cl_value_len>=42) 1UL*2*3*4*5*6*7*8*9*10*11*12*13*14*15, #if (cl_value_len>=46) 1UL*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16, #if (cl_value_len>=50) 1UL*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17, #if (cl_value_len>=54) 1UL*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17*18, #if (cl_value_len>=58) 1UL*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17*18*19, #if (cl_value_len>=63) 1UL*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17*18*19*20, #if (cl_value_len>=67) ... #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif #endif }; if (n < sizeof(fakul_table)/sizeof(cl_I)) { return UV_to_I(fakul_table[n]); } else { var cl_I prod = 1; // bisheriges Produkt := 1 var uintL k = 1; var uintL A = n; var uintL B = n; // obere Intervallgrenze floor(n/2^(k-1)) loop { // 'A' enthält floor(n/2^(k-1)). A = A >> 1; // untere Grenze floor(n/2^k) // 'A' enthält floor(n/2^k). // Bilde Teilprodukt prod(A < i <= B & oddp(i), i) // = prod(floor((A-1)/2) < i <= floor((B-1)/2), 2*i+1) // wobei B = floor(n/2^(k-1)), A = floor(n/2^k) = floor(B/2). { var uintL b = floor(B-1,2); if (b==0) break; // B=2 oder B=1 -> Produkt fertig var uintL a = floor(A-1,2); prod = expt_pos(cl_I_prod_ungerade(a,b),k) * prod; // aufmultiplizieren } k = k+1; B = A; } return prod << (n - logcount(n)); } } // Bit complexity (N := n): O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/integer/misc/combin/cl_I_factorial_aux.cc0000644000000000000000000000147311201634740017667 0ustar // cl_I_prod_ungerade(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/misc/combin/cl_I_combin.h" // Implementation. #include "integer/cl_I.h" namespace cln { const cl_I cl_I_prod_ungerade (uintL a, uintL b) { var uintL diff = b-a; // Anzahl der Faktoren if (diff <= 4) { // Produkt iterativ bilden var cl_I faktor = L_to_FN(2*b+1); // 2*b+1 als letzter Faktor var cl_I produkt = faktor; var uintC count; dotimesC(count,diff-1, { faktor = faktor-2; // nächster Faktor produkt = faktor*produkt; // mit bisherigem Produkt multiplizieren }); return produkt; } else { // Produkt rekursiv bilden var uintL c = floor(a+b,2); // c:=floor((a+b)/2) return cl_I_prod_ungerade(a,c) * cl_I_prod_ungerade(c,b); // zwei Teilprodukte } } } // namespace cln cln-1.3.3/src/integer/misc/cl_FN_class.cc0000644000000000000000000000070611201634740015015 0ustar // cl_class_fixnum. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. namespace cln { cl_class cl_class_fixnum = { NULL, // destructor not used, since not heap objects cl_class_flags_subclass_complex | cl_class_flags_subclass_real | cl_class_flags_subclass_rational }; AT_INITIALIZATION(ini_class_fixnum) { cl_immediate_classes[cl_FN_tag] = &cl_class_fixnum; } } // namespace cln cln-1.3.3/src/integer/misc/cl_I_oddp.cc0000644000000000000000000000100511201634740014514 0ustar // oddp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { bool oddp (const cl_I& x) { if (fixnump(x)) { // Fixnum: Bit 0 abprüfen if (x.word & bit(cl_value_shift)) return true; else return false; } else { // Bignum: Bit 0 im letzten Digit abprüfen if (lspref(BN_LSDptr(x),0) & bit(0)) return true; else return false; } } } // namespace cln cln-1.3.3/src/integer/misc/cl_I_as.cc0000644000000000000000000000140111201634740014171 0ustar // cl_I_As(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "base/cl_N.h" namespace cln { // Cf. cl_I_p in cl_I_ring.cc. // But here, for better inlining in g++, it is preferrable to finish every // alternative with either "return true;" or "return false;". inline bool cl_I_p (const cl_number& x) { if (!x.pointer_p()) switch (x.nonpointer_tag()) { case cl_FN_tag: return true; } else if (x.pointer_type() == &cl_class_bignum) return true; return false; } const cl_I& cl_I_As (const cl_number& x, const char * filename, int line) { if (cl_I_p(x)) { DeclareType(cl_I,x); return x; } else throw as_exception(x,"an integer",filename,line); } } // namespace cln cln-1.3.3/src/integer/misc/cl_I_ord2.cc0000644000000000000000000000275311201634740014447 0ustar // ord2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { // Methode 1a: // Sei n = ord2(x). Dann ist logxor(x,x-1) = 2^n + (2^n-1) = 2^(n+1)-1. // Also (ord2 x) = (1- (integer-length (logxor x (1- x)))) . // Methode 1b: // Sei n = ord2(x). Dann ist logand(x,-x) = 2^n. // Also (ord2 x) = (1- (integer-length (logand x (- x)))) . // Methode 1c: // Sei n = ord2(x). Dann ist lognot(logior(x,-x)) = 2^n-1. // Also (ord2 x) = (integer-length (lognot (logior x (- x)))) . // Methode 2: // Nullbits am Schluß von x abzählen: // (ord2 x) = intDsize * Anzahl der Nulldigits am Schluß // + Anzahl der Nullbits am Ende des letzten Digits /=0. uintC ord2 (const cl_I& x) // x /= 0 { if (fixnump(x)) { var uintV x_ = FN_to_V(x); // x als intVsize-Bit-Zahl // This assumes cl_value_len <= intVsize. #if (intVsize>32) ord2_64(x_,return); #else ord2_32(x_,return); #endif } else { var uintC bitcount = 0; var const uintD* ptr; BN_to_NDS_nocopy(x, ,,ptr=); // normalisierte DS zu x bilden. while (lspref(ptr,0) == 0) { lsshrink(ptr); bitcount += intDsize; } // Nulldigits abzählen var uintD lsd = lspref(ptr,0); // letztes Digit /=0 ord2_D(lsd,bitcount +=); // dessen Nullbits abzählen return bitcount; } } } // namespace cln cln-1.3.3/src/integer/misc/cl_I_exptpos_I.cc0000644000000000000000000000237611201634740015554 0ustar // expt_pos(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" namespace cln { const cl_I expt_pos (const cl_I& x, const cl_I& y) { // Methode: // a:=x, b:=y, c:=1. [a^b*c bleibt invariant, = x^y.] // Solange b>1, // falls b ungerade, setze c:=a*c, // setze b:=floor(b/2), // setze a:=a*a. // Wenn b=1, setze c:=a*c. // Liefere c. // Oder optimiert: // a:=x, b:=y. // Solange b gerade, setze a:=a*a, b:=b/2. [a^b bleibt invariant, = x^y.] // c:=a. // Solange b:=floor(b/2) >0 ist, // setze a:=a*a, und falls b ungerade, setze c:=a*c. // Liefere c. #if 0 // unoptimiert var cl_I a = x; var cl_I b = y; var cl_I c = 1; until (eq(b,1)) { if (oddp(b)) { c = a * c; } b = b >> 1; // b := (floor b 2) a = square(a); } return a * c; #else // optimiert var cl_I a = x; var cl_I b = y; while (!oddp(b)) { a = square(a); b = b >> 1; } var cl_I c = a; until (eq(b,1)) { b = b >> 1; a = square(a); if (oddp(b)) { c = a * c; } } return c; #endif } // Bit complexity (x of length N): O(M(N*y)). } // namespace cln cln-1.3.3/src/integer/misc/cl_I_min.cc0000644000000000000000000000036011201634740014354 0ustar // min(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. namespace cln { const cl_I min (const cl_I& x, const cl_I& y) { return (x <= y ? x : y); } } // namespace cln cln-1.3.3/src/integer/misc/cl_I_exptpos.cc0000644000000000000000000000235011201634740015274 0ustar // expt_pos(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. namespace cln { const cl_I expt_pos (const cl_I& x, uintL y) { // Methode: // a:=x, b:=y, c:=1. [a^b*c bleibt invariant, = x^y.] // Solange b>1, // falls b ungerade, setze c:=a*c, // setze b:=floor(b/2), // setze a:=a*a. // Wenn b=1, setze c:=a*c. // Liefere c. // Oder optimiert: // a:=x, b:=y. // Solange b gerade, setze a:=a*a, b:=b/2. [a^b bleibt invariant, = x^y.] // c:=a. // Solange b:=floor(b/2) >0 ist, // setze a:=a*a, und falls b ungerade, setze c:=a*c. // Liefere c. #if 0 // unoptimiert var cl_I a = x; var uintL b = y; var cl_I c = 1; until (b == 1) { if (b % 2) // b ungerade? { c = a * c; } b = b >> 1; // b := (floor b 2) a = square(a); } return a * c; #else // optimiert var cl_I a = x; var uintL b = y; while (!(b % 2)) { a = square(a); b = b >> 1; } var cl_I c = a; until (b == 1) { b = b >> 1; a = square(a); if (b % 2) { c = a * c; } } return c; #endif } // Bit complexity (x of length N): O(M(N*y)). } // namespace cln cln-1.3.3/src/integer/misc/cl_I_signum.cc0000644000000000000000000000057211201634740015100 0ustar // signum(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" namespace cln { CL_INLINE const cl_I CL_INLINE_DECL(signum) (const cl_I& x) { if (minusp(x)) { return -1; } // x<0 -> -1 elif (zerop(x)) { return 0; } // x=0 -> 0 else { return 1; } // x>0 -> +1 } } // namespace cln cln-1.3.3/src/integer/misc/cl_I_abs.cc0000644000000000000000000000047311201634740014343 0ustar // abs(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" namespace cln { const cl_I abs (const cl_I& x) { // Methode: // Bei x<0: (- x), sonst x. if (minusp(x)) return -x; else return x; } } // namespace cln cln-1.3.3/src/integer/misc/cl_I_power2p.cc0000644000000000000000000000267111201634740015176 0ustar // power2p(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { uintC power2p (const cl_I& x) // x > 0 { // Methode 1: Wenn ord2(x) = integer_length(x)-1. // Methode 2: Wenn logand(x,x-1) = 0. // Methode 3: Wenn das erste Digit /=0 eine Zweierpotenz ist und alle weiteren // Digits Null sind. if (fixnump(x)) { var uintV x_ = FN_to_UV(x); if (!((x_ & (x_-1)) == 0)) return 0; // keine Zweierpotenz #if (intVsize>32) integerlength64(x_,return); // Zweierpotenz: n = integer_length(x) #else integerlength32(x_,return); // Zweierpotenz: n = integer_length(x) #endif } else { var const uintD* MSDptr; var uintC len; var const uintD* LSDptr; BN_to_NDS_nocopy(x, MSDptr=,len=,LSDptr=); // normalisierte DS zu x bilden. var uintD msd = mspref(MSDptr,0); if (msd==0) { msshrink(MSDptr); msd = mspref(MSDptr,0); len--; } // len = Anzahl der Digits ab MSDptr, len>0, msd = erstes Digit (/=0) if (!((msd & (msd-1)) == 0)) return 0; // erstes Digit muß Zweierpotenz sein if (DS_test_loop(MSDptr mspop 1,len-1,LSDptr)) return 0; // danach alles Nullen {var uintL msdlen; integerlengthD(msd, msdlen=); return intDsize*(len-1) + msdlen; // integer_length(x) als Ergebnis }} } } // namespace cln cln-1.3.3/src/integer/misc/cl_BN_class.cc0000644000000000000000000000051511201634740015007 0ustar // cl_class_bignum. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. namespace cln { cl_class cl_class_bignum = { NULL, // empty destructor cl_class_flags_subclass_complex | cl_class_flags_subclass_real | cl_class_flags_subclass_rational }; } // namespace cln cln-1.3.3/src/integer/misc/cl_I_eqhashcode.cc0000644000000000000000000000626311201634740015705 0ustar // cl_I equal_hashcode(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "base/cl_N.h" #include "integer/cl_I.h" namespace cln { static inline uint32 equal_hashcode (const cl_FN& x) { var cl_signean sign; var uintV x_ = FN_to_V(x); // x als intVsize-Bit-Zahl if (FN_V_minusp(x,(sintV)x_)) { x_ = -x_; sign = -1; } else { sign = 0; if (x_ == 0) return 0; } var uintL s; #if (intVsize > 32) integerlength64(x_, s = 64 - ); var uint32 msd = (x_ << s) >> 32; var sintL exp = 64-s; #else integerlength32(x_, s = 32 - ); var uint32 msd = x_ << s; var sintL exp = 32-s; #endif return equal_hashcode_low(msd,exp,sign); } static inline uint32 equal_hashcode (const cl_BN& x) { var const uintD* MSDptr; var uintC len; BN_to_NDS_nocopy(x, MSDptr = , len = ,); // Nicht alle führenden intDsize+1 Bits sind gleich. #if (intDsize==64) var uint64 msd = mspref(MSDptr,0); var uint64 msd2 = (len >= 2 ? mspref(MSDptr,1) : 0); var cl_signean sign; if ((sint64)msd < 0) { // falls <0, negieren sign = -1; // msd|msd2 := - msd|msd2 - (1 falls noch weitere Bits /= 0) msd = ~msd; msd2 = ~msd2; if ((len <= 2) || !test_loop_msp(MSDptr mspop 2, len - 2) ) { msd2++; if (msd2 == 0) msd++; } } else { sign = 0; } var sintC exp = len * intDsize; // Nicht alle führenden 65 Bits sind =0. if (msd==0) { msd = msd2; exp -= 64; } else { var uintL s; integerlength64(msd, s = 64 - ); if (s > 0) msd = (msd << s) | (msd2 >> (64-s)); exp -= s; } return equal_hashcode_low((uint32)(msd>>32),exp,sign); #else // (intDsize<=32) var uint32 msd; var uint32 msd2; if (len >= 64/intDsize) { msd = get_32_Dptr(MSDptr); msd2 = get_32_Dptr(MSDptr mspop 32/intDsize); } elif (len > 32/intDsize) { msd = get_32_Dptr(MSDptr); msd2 = get_max32_Dptr(intDsize*len-32, MSDptr mspop 32/intDsize) << (64-intDsize*len); } elif ((32/intDsize == 1) || (len == 32/intDsize)) { msd = get_32_Dptr(MSDptr); msd2 = 0; } else { // (len > 0) && (len < 32/intDsize) msd = get_max32_Dptr(intDsize*len,MSDptr) << (32-intDsize*len); msd2 = 0; } var cl_signean sign; if ((sint32)msd < 0) { // falls <0, negieren sign = -1; // msd|msd2 := - msd|msd2 - (1 falls noch weitere Bits /= 0) msd = ~msd; msd2 = ~msd2; if ((len <= 64/intDsize) || !test_loop_msp(MSDptr mspop 64/intDsize, len - 64/intDsize) ) { msd2++; if (msd2 == 0) msd++; } } else { sign = 0; } var sintC exp = len * intDsize; // Nicht alle führenden intDsize+1 Bits sind =0. // Wegen intDsize<=32: Nicht alle führenden 33 Bits sind =0. if (msd==0) { msd = msd2; exp -= 32; } // Nicht alle führenden 32 Bits sind =0. // Führendes Bit auf 1 normalisieren: else { var uintL s; integerlength32(msd, s = 32 - ); if (s > 0) msd = (msd << s) | (msd2 >> (32-s)); exp -= s; } return equal_hashcode_low(msd,exp,sign); #endif } CL_INLINE uint32 CL_INLINE_DECL(equal_hashcode) (const cl_I& x) { if (fixnump(x)) { DeclareType(cl_FN,x); return equal_hashcode(x); } else { DeclareType(cl_BN,x); return equal_hashcode(x); } } } // namespace cln cln-1.3.3/src/integer/bitwise/0000755000000000000000000000000012173046200013045 5ustar cln-1.3.3/src/integer/bitwise/cl_I_logtest.cc0000644000000000000000000000664011201634737016002 0ustar // logtest(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { bool logtest (const cl_I& x, const cl_I& y) { // Methode: // Fixnums separat behandeln. // Sei oBdA x die kürzere der beiden Zahlen (in Digits). // x echt kürzer und x<0 -> [eines der most signif. intDsize+1 Bits von y ist 1] Ja. // Beide gleich lang oder x>=0 -> // Kann mich auf die untersten length(x) Digits beschraenken. // Mit AND durchlaufen, abbrechen (mit "Ja") falls /=0. Am Ende: Nein. if (fixnump(x)) if (fixnump(y)) // beides Fixnums { if ((x.word & y.word & cl_combine(0,~(cl_uint)0))==0) return false; else return true; } else // x Fixnum, y Bignum, also ist x echt kürzer { if (FN_V_minusp(x,FN_to_V(x))) return true; // x<0 -> ja. // x>=0. Kombiniere x mit den pFN_maxlength letzten Digits von y. {var const uintD* yLSDptr; var uintV x_ = FN_to_V(x); BN_to_NDS_nocopy(y, ,,yLSDptr=); #if (pFN_maxlength > 1) doconsttimes(pFN_maxlength-1, if (lsprefnext(yLSDptr) & (uintD)x_) return true; x_ = x_ >> intDsize; ); #endif if (lsprefnext(yLSDptr) & (uintD)x_) return true; return false; }} else if (fixnump(y)) // x Bignum, y Fixnum, analog wie oben, nur x und y vertauscht { if (FN_V_minusp(y,FN_to_V(y))) return true; // y<0 -> ja. // y>=0. Kombiniere y mit den pFN_maxlength letzten Digits von x. {var const uintD* xLSDptr; var uintV y_ = FN_to_V(y); BN_to_NDS_nocopy(x, ,,xLSDptr=); #if (pFN_maxlength > 1) doconsttimes(pFN_maxlength-1, if (lsprefnext(xLSDptr) & (uintD)y_) return true; y_ = y_ >> intDsize; ); #endif if (lsprefnext(xLSDptr) & (uintD)y_) return true; return false; }} else // x,y Bignums { var const uintD* xMSDptr; var uintC xlen; var const uintD* yMSDptr; var uintC ylen; BN_to_NDS_nocopy(x, xMSDptr=,xlen=,); BN_to_NDS_nocopy(y, yMSDptr=,ylen=,); // Beachte: xlen>0, ylen>0. if (!(xlen==ylen)) // beide verschieden lang { if (xlen=0, bei dem genau die Bits p,...,q-1 gesetzt sind. extern const cl_I cl_fullbyte (uintC p, uintC q); // Extrahiere die Bits p,...,q-1 der Zahl x, // wobei 0 <= p <= q <= l = (integer-length x). // Ergebnis (wie bei LDB) ein Integer >=0. extern const cl_I ldb_extract (const cl_I& x, uintC p, uintC q); // Teste, ob eines der Bits p,...,q-1 der Zahl x /=0 ist, // wobei 0 <= p <= q <= l = (integer-length x). // Ergebnis (wie bei LDB-TEST) false wenn nein, true wenn ja. extern bool ldb_extract_test (const cl_I& x, uintC p, uintC q); // Extrahiere die Bits p,...,q-1 der Zahl x, // wobei 0 <= p <= q <= l = (integer-length x). // Ergebnis (wie bei MASK-FIELD) ein Integer >=0. extern const cl_I mkf_extract (const cl_I& x, uintC p, uintC q); } // namespace cln #endif /* _CL_I_BYTE_H */ cln-1.3.3/src/integer/bitwise/cl_I_ash_I.cc0000644000000000000000000001471411201634737015345 0ustar // ash(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_I ash (const cl_I& x, const cl_I& y) { // Methode: // x = 0 -> 0 als Ergebnis // y = 0 -> x als Ergebnis // y > 0 -> y = intDsize*k + i, j=k+(1 falls i>0, 0 falls i=0). // j Wörter mehr reservieren, k Nullwörter, dann übertragen, // bei i>0: um i Bits links schieben (i=1 geht einfacher). // y < 0 -> y <= - intDsize * (Länge(A0) in Digits) -> Ergebnis = 0 oder -1. // Sonst: -y = intDsize*k + i mit k0: schiebe sie um i Bits nach rechts (i=1 geht einfacher). if (zerop(x)) return 0; // x=0 -> 0 als Ergebnis if (zerop(y)) return x; // y=0 -> x als Ergebnis CL_ALLOCA_STACK; if (!minusp(y)) { // y>=0 var uintL i; // i = y mod intDsize, >=0, =0, <2^intCsize if (bignump(y)) { #if (log2_intDsize+intCsize <= cl_value_len-1) // y >= 2^(cl_value_len-1) >= intDsize*2^intCsize throw ash_exception(y); #else // y >= 2^(cl_value_len-1) // usable only if y < intDsize*2^intCsize var cl_heap_bignum* bn = TheBignum(y); var uintC len = bn->length; if (len > ceiling(log2_intDsize+intCsize+1,intDsize)) throw ash_exception(y); // bn_minlength <= len <= ceiling(log2_intDsize+intCsize+1,intDsize). if (bn_minlength == ceiling(log2_intDsize+intCsize+1,intDsize) || len == ceiling(log2_intDsize+intCsize+1,intDsize)) if (mspref(arrayMSDptr(bn->data,len),0) >= (uintD)bit((log2_intDsize+intCsize)%intDsize)) throw ash_exception(y); #if (log2_intDsize+intCsize > intDsize) #define IF_LENGTH(i) \ if (bn_minlength <= i && i <= ceiling(log2_intDsize+intCsize+1,intDsize) && (i == ceiling(log2_intDsize+intCsize+1,intDsize) || len == i)) IF_LENGTH(1) k = 0; else IF_LENGTH(2) k = get_uint1D_Dptr(arrayLSDptr(bn->data,2) lspop 1); else IF_LENGTH(3) k = get_uint2D_Dptr(arrayLSDptr(bn->data,3) lspop 1); else IF_LENGTH(4) k = get_uint3D_Dptr(arrayLSDptr(bn->data,4) lspop 1); else IF_LENGTH(5) k = get_uint4D_Dptr(arrayLSDptr(bn->data,5) lspop 1); else throw runtime_exception(); #undef IF_LENGTH k = k << (intDsize-log2_intDsize); #else // log2_intDsize+intCsize <= intDsize, // implies len==1 or len==2 && lspref(arrayLSDptr(bn->data,len),1) == 0. k = 0; #endif k |= lspref(arrayLSDptr(bn->data,len),0) >> log2_intDsize; i = lspref(arrayLSDptr(bn->data,len),0) % intDsize; #endif } else { var uintV y_ = FN_to_V(y); // Wert von y, >=0, = (uintC)(~len)) // kann len+k+1 Überlauf geben? { throw ash_exception(y); } // ja -> Fehler num_stack_alloc_1(len+k,,LSDptr=); LSDptr = clear_loop_lsp(LSDptr,k); // k Nulldigits var uintD* MSDptr = copy_loop_lsp(x_LSDptr,LSDptr,len); // Nun ist MSDptr/len/LSDptr die DS zu x. // Oberhalb von ihr liegen k Nulldigits, unterhalb ist 1 Digit Platz. // MSDptr/len+k/.. ist jetzt die Gesamt-DS. // Noch um i Bits nach links schieben: if (!(i==0)) // Bei i>0 { // noch ein weiteres Digit dazunehmen (Vorzeichen) {var uintD sign = sign_of_sintD(mspref(MSDptr,0)); lsprefnext(MSDptr) = sign; len++; } // Schiebeschleife: die unteren len Digits um i Bits schieben if (i==1) { shift1left_loop_lsp(LSDptr,len); } else { shiftleft_loop_lsp(LSDptr,len,i,0); } } return DS_to_I(MSDptr,len+k); } else { // y<0 var uintL i; // i = (-y) mod intDsize, >=0, =0, <2^intCsize if (bignump(y)) { #if (log2_intDsize+intCsize <= cl_value_len-1) // -y-1 >= 2^(cl_value_len-1) >= intDsize*2^intCsize goto sign; #else // -y-1 >= 2^(cl_value_len-1) // usable only if -y-1 < intDsize*2^intCsize // We write -y-1 = lognot(y) = k*intDsize+i and then add 1. var cl_heap_bignum* bn = TheBignum(y); var uintC len = bn->length; if (len > ceiling(log2_intDsize+intCsize+1,intDsize)) goto sign; // bn_minlength <= len <= ceiling(log2_intDsize+intCsize+1,intDsize). if (bn_minlength == ceiling(log2_intDsize+intCsize+1,intDsize) || len == ceiling(log2_intDsize+intCsize+1,intDsize)) if (mspref(arrayMSDptr(bn->data,len),0) < (uintD)(-bit((log2_intDsize+intCsize)%intDsize))) goto sign; #if (log2_intDsize+intCsize > intDsize) #define IF_LENGTH(i) \ if (bn_minlength <= i && i <= ceiling(log2_intDsize+intCsize+1,intDsize) && (i == ceiling(log2_intDsize+intCsize+1,intDsize) || len == i)) IF_LENGTH(1) k = 0; else IF_LENGTH(2) k = ~get_sint1D_Dptr(arrayLSDptr(bn->data,2) lspop 1); else IF_LENGTH(3) k = ~get_sint2D_Dptr(arrayLSDptr(bn->data,3) lspop 1); else IF_LENGTH(4) k = ~get_sint3D_Dptr(arrayLSDptr(bn->data,4) lspop 1); else IF_LENGTH(5) k = ~get_sint4D_Dptr(arrayLSDptr(bn->data,5) lspop 1); else throw runtime_exception(); #undef IF_LENGTH k = k << (intDsize-log2_intDsize); #else // log2_intDsize+intCsize <= intDsize, // implies len==1 or len==2 && lspref(arrayLSDptr(bn->data,len),1) == ~0. k = 0; #endif k |= (uintD)(~lspref(arrayLSDptr(bn->data,len),0)) >> log2_intDsize; i = (uintD)(-lspref(arrayLSDptr(bn->data,len),0)) % intDsize; if (i == 0) if (++k == 0) goto sign; #endif } else { var uintV y_ = -FN_to_V(y); // Wert von -y, >0, =len) goto sign; // -y >= intDsize*len -> Vorzeichen von x zurück len -= k; // rechte k Digits einfach streichen // Noch ist len>0. Um i Bits nach rechts schieben: if (!(i==0)) // Bei i>0: { // Schiebe len Digits ab MSDptr um i Bits nach rechts: if (i==1) { shift1right_loop_msp(MSDptr,len,sign_of_sintD(mspref(MSDptr,0))); } else { shiftrightsigned_loop_msp(MSDptr,len,i); } } return DS_to_I(MSDptr,len); } sign: // Ergebnis ist 0, falls x>=0, und -1, falls x<0: return (minusp(x) ? cl_I(-1) : cl_I(0)); } } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_ilength.cc0000644000000000000000000000272311201634737015751 0ustar // integer_length(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { uintC integer_length (const cl_I& x) { if (fixnump(x)) { var uintL bitcount = 0; var uintV x_ = FN_to_V(x); // x als intVsize-Bit-Zahl if (FN_V_minusp(x,(sintV)x_)) { x_ = ~ x_; } // falls <0, komplementieren if (!(x_==0)) { #if (intVsize>32) integerlength64(x_,bitcount=); #else integerlength32(x_,bitcount=); #endif } return bitcount; // 0 <= bitcount < intVsize. } else { var const uintD* MSDptr; var uintC len; BN_to_NDS_nocopy(x, MSDptr=,len=,); // normalisierte DS zu x bilden. var uintC bitcount = intDsize*(len-1); // Anzahl Digits mal intDsize // MSDigit nehmen, testen, welches das höchste Bit ist, das vom // Vorzeichenbit abweicht: var uintD msd = mspref(MSDptr,0); // MSDigit if ((sintD)msd < 0) { msd = ~msd; } // falls negativ, invertieren // Position des höchsten Bits in msd suchen und entsprechend bit_count // erhöhen (um höchstens intDsize-1): if (!(msd == 0)) { integerlengthD(msd, bitcount += ); } return bitcount; // 0 <= bitcount < intDsize*2^intCsize. } } } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_log.h0000644000000000000000000000201111201634737014730 0ustar // cl_I internals for logical operations #ifndef _CL_I_LOG_H #define _CL_I_LOG_H #include "cln/number.h" #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { // Liefert die Anzahl Digits, die ein Integer als DS bräuchte. // (Leicht aufgerundet.) inline uintC I_to_DS_need (const cl_I& x) { if (fixnump(x)) return FN_maxlength; // das wird reichen else return TheBignum(x)->length; } // Integer to Digit sequence, n Digits // I_to_DS_n(obj,n,ptr=); // Integer obj zu einer Digit sequence MSDptr/n/LSDptr machen, // die genau n Digits hat (sollte n >= Bedarf und >= FN_maxlength sein). // Die neue Digit-sequence darf modifiziert werden. // < ptr: MSDptr der neuen DS // Dabei wird num_stack erniedrigt. #define I_to_DS_n(obj,n,ptr_zuweisung) \ {var uintD* destptr; \ num_stack_alloc(n,,destptr=); \ ptr_zuweisung I_to_DS_n_aux(obj,n,destptr); \ } extern uintD* I_to_DS_n_aux (const cl_I& obj, uintC n, uintD* destptr); } // namespace cln #endif /* _CL_I_LOG_H */ cln-1.3.3/src/integer/bitwise/cl_I_boole.cc0000644000000000000000000000157711201634737015425 0ustar // boole(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. namespace cln { const cl_I boole (cl_boole op, const cl_I& x, const cl_I& y) { switch (op) { case boole_clr: return 0; case boole_set: return -1; case boole_1: return x; case boole_2: return y; case boole_c1: return lognot(x); case boole_c2: return lognot(y); case boole_and: return logand(x,y); case boole_ior: return logior(x,y); case boole_xor: return logxor(x,y); case boole_eqv: return logeqv(x,y); case boole_nand: return lognand(x,y); case boole_nor: return lognor(x,y); case boole_andc1: return logandc1(x,y); case boole_andc2: return logandc2(x,y); case boole_orc1: return logorc1(x,y); case boole_orc2: return logorc2(x,y); default: NOTREACHED } } } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_logxor.cc0000644000000000000000000000263411201634737015632 0ustar // logxor(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "integer/bitwise/cl_I_log.h" namespace cln { // Logische Operationen auf Integers: // Methode: aus den Längen der beiden Argumente eine obere Schranke für // die Länge des Ergebnisses berechnen (das Maximum der beiden Längen und // FN_maxlength), so daß das MSD für unendlich viele Bits steht. // Dann beide Argumente in gleichgroße Digit sequences umwandeln, Operation // mit einer einfachen Schleife durchführen. const cl_I logxor (const cl_I& x, const cl_I& y) { if (fixnump(x) && fixnump(y)) // Beides Fixnums -> ganz einfach: { // bitweise als Fixnum zurück return cl_I_from_word((x.word ^ y.word) | cl_combine(cl_FN_tag,0)); } else { CL_ALLOCA_STACK; var uintC n; // Anzahl der Digits {var uintC nx = I_to_DS_need(x); var uintC ny = I_to_DS_need(y); n = (nx>=ny ? nx : ny); } {var uintD* xptr; I_to_DS_n(x,n,xptr=); // Pointer in DS zu x var uintD* yptr; I_to_DS_n(y,n,yptr=); // Pointer in DS zu y var uintD* zptr = xptr; // Pointer aufs Ergebnis xor_loop_msp(xptr,yptr,n); // mit XOR verknüpfen return DS_to_I(zptr,n); // Ergebnis als Integer } }} } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_logior.cc0000644000000000000000000000257611201634737015620 0ustar // logior(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "integer/bitwise/cl_I_log.h" namespace cln { // Logische Operationen auf Integers: // Methode: aus den Längen der beiden Argumente eine obere Schranke für // die Länge des Ergebnisses berechnen (das Maximum der beiden Längen und // FN_maxlength), so daß das MSD für unendlich viele Bits steht. // Dann beide Argumente in gleichgroße Digit sequences umwandeln, Operation // mit einer einfachen Schleife durchführen. const cl_I logior (const cl_I& x, const cl_I& y) { if (fixnump(x) && fixnump(y)) // Beides Fixnums -> ganz einfach: { // bitweise als Fixnum zurück return cl_I_from_word(x.word | y.word); } else { CL_ALLOCA_STACK; var uintC n; // Anzahl der Digits {var uintC nx = I_to_DS_need(x); var uintC ny = I_to_DS_need(y); n = (nx>=ny ? nx : ny); } {var uintD* xptr; I_to_DS_n(x,n,xptr=); // Pointer in DS zu x var uintD* yptr; I_to_DS_n(y,n,yptr=); // Pointer in DS zu y var uintD* zptr = xptr; // Pointer aufs Ergebnis or_loop_msp(xptr,yptr,n); // mit OR verknüpfen return DS_to_I(zptr,n); // Ergebnis als Integer } }} } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_ldbxtest.cc0000644000000000000000000000446611201634737016156 0ustar // ldb_extract_test(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/bitwise/cl_I_byte.h" // Implementation. #include "cln/integer.h" #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { bool ldb_extract_test (const cl_I& x, uintC p, uintC q) { var const uintD* MSDptr; var uintC len; var const uintD* LSDptr; I_to_NDS_nocopy(x, MSDptr=,len=,LSDptr=,true, { return false; } ); // NDS zu x bilden // MSDptr erhöhen und len erniedrigen, so daß len = ceiling(q/intDsize) wird: { var uintC qD = ceiling(q,intDsize); // ceiling(q/intDsize) // wegen q<=l ist qD = ceiling(q/intDsize) <= ceiling((l+1)/intDsize) = len, also // paßt qD ebenso wie len in ein uintC. MSDptr = MSDptr mspop (len - qD); // MSDptr um len-qD Digits erhöhen len = qD; // len um len-qD erniedrigen } // LSDptr und len um floor(p/intDsize) erniedrigen: { var uintC pD = p/intDsize; // floor(p/intDsize) LSDptr = LSDptr lspop pD; len -= pD; } // Jetzt enthält MSDptr/len/LSDptr genau die maßgeblichen Digits. if (len==0) return false; // len=0 -> keine Bits abzutesten q = ((q-1)%intDsize); // q := intDsize - (intDsize*ceiling(q/intDsize) - q) - 1 p = p%intDsize; // p := p - intDsize*floor(p/intDsize) // Jetzt ist 0 <= q < intDsize, 0 <= p < intDsize. // Vom ersten Digit müssen die vorderen intDsize-1-q Bits unberücksichtigt bleiben. // Ein AND 2^(q+1)-1 erreicht dies. // Vom letzten Digit müssen die hinteren p Bits unberücksichtigt bleiben. // Ein AND -2^p erreicht dies. if (--len==0) // 1 Digit maßgeblich, wird von beiden Seiten angeschnitten: // Ein AND 2^(q+1)-2^p erreicht dies. if (!(((uintD)(bitm(q+1)-bit(p)) & mspref(MSDptr,0)) == 0)) return true; else return false; // mindestens 2 Digits. Teste erst die Randdigits, dann die inneren: if (!(((msprefnext(MSDptr) & (uintD)(bitm(q+1)-1)) == 0) && ((lsprefnext(LSDptr) & (uintD)(minus_bit(p))) == 0) ) ) return true; len--; // die beiden Randdigits sind jetzt abgezogen. if (DS_test_loop(MSDptr,len,LSDptr)) { return true; } else { return false; } } } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_ldbtest.cc0000644000000000000000000000251711201634737015761 0ustar // ldb_test(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "cln/integer.h" #include "integer/cl_I.h" #include "integer/bitwise/cl_I_byte.h" namespace cln { bool ldb_test (const cl_I& n, const cl_byte& b) { // Methode: // (ldb-test (byte s p) n) // Falls s=0: =0. // Falls s>0: // l:=(integer-length n) // Falls l <= p : Falls n>=0, =0, denn Bits p+s-1..p sind =0. // Falls n<0, /=0, denn Bits p+s-1..p sind =1. // Falls p < l : // Falls p+s>l, /=0, denn bei n>=0 ist Bit l-1 =1, // und bei n<0 sind Bits p+s-1..l =1. // Falls p+s<=l, // extrahiere die Bits p,...,p+s-1 von n und teste sie. var uintC s = b.size; var uintC p = b.position; if (s==0) return false; var uintC l = integer_length(n); // l = (integer-length n) if (l<=p) // l<=p if (!minusp(n)) return false; // n>=0 else return true; // n<0 else // l>p { var uintC ps = p+s; if (ps>l) // p+s>l ? return true; // Bits p,...,q-1 mit q = min(p+s,l) = p+s extrahieren und testen: return ldb_extract_test(n,p,ps); } } } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_ash_exception.cc0000644000000000000000000000102711201634737017144 0ustar // ash_exception(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "cln/io.h" #include "cln/integer_io.h" #include namespace cln { static inline const std::string ash_error_msg (const cl_I& badamount) { std::ostringstream buf; fprint(buf, "ash: too large shift amount: "); fprint(buf, badamount); return buf.str(); } ash_exception::ash_exception (const cl_I& badamount) : runtime_exception(ash_error_msg(badamount)) {} } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_logcount.cc0000644000000000000000000000235611201634737016153 0ustar // logcount(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "base/digit/cl_D.h" #include "base/cl_low.h" namespace cln { uintC logcount (const cl_I& x) { if (fixnump(x)) { var uintV x32 = FN_to_V(x); // x als intDsize-Bit-Zahl if (FN_V_minusp(x,(sintV)x32)) { x32 = ~ x32; } // falls <0, komplementieren #if (intVsize>32) #define x64 x32 logcount_64(); // Bits von x32 zählen #undef x64 #else logcount_32(); // Bits von x32 zählen #endif return x32; } else { var const uintD* MSDptr; var uintC len; BN_to_NDS_nocopy(x, MSDptr=,len=,); // DS zu x bilden, len>0. var uintC bitcount = 0; // Bitzähler var const uintD* ptr = MSDptr; // läuft durch die Digits durch var uintD sign = sign_of_sintD(mspref(ptr,0)); // Vorzeichen dotimespC(len,len, { bitcount += (uintC)logcountD(msprefnext(ptr) ^ sign); }); // 0 <= bitcount < intDsize*2^intCsize. return bitcount; } } } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_dpb.cc0000644000000000000000000000072511201634737015064 0ustar // dpb(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "cln/integer.h" #include "integer/cl_I.h" namespace cln { const cl_I dpb (const cl_I& newbyte, const cl_I& n, const cl_byte& b) { // Methode: // (DPB newbyte (byte s p) integer) // = (DEPOSIT-FIELD (ASH newbyte p) (byte s p) integer) return deposit_field(ash(newbyte,b.position),n,b); } } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_lognot.cc0000644000000000000000000000210111201634737015607 0ustar // lognot(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "integer/bitwise/cl_I_log.h" namespace cln { const cl_I lognot (const cl_I& x) { if (fixnump(x)) // Fixnum -> ganz einfach: { // bitweise als Fixnum zurück return cl_I_from_word(x.word ^ cl_combine(0,~(cl_uint)0)); } else // Bignum: { CL_ALLOCA_STACK; var uintD* MSDptr; var uintC n; BN_to_NDS(x, MSDptr=,n=,); // NDS zu x bilden // Es ist n>=bn_minlength, // und die ersten intDsize+1 Bit sind nicht alle gleich. not_loop_msp(MSDptr,n); // mit NOT komplementieren, // wegen n>0 wird auch das Vorzeichenbit umgedreht // MSDptr/n/LSDptr ist immer noch eine NDS, da n>=bn_minlength // und die ersten intDsize+1 Bit nicht alle gleich sind. return NDS_to_I(MSDptr,n); // Ergebnis als Integer } } } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_logandc2.cc0000644000000000000000000000316511201634737016011 0ustar // logandc2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "integer/bitwise/cl_I_log.h" namespace cln { // Logische Operationen auf Integers: // Methode: aus den Längen der beiden Argumente eine obere Schranke für // die Länge des Ergebnisses berechnen (das Maximum der beiden Längen und // FN_maxlength), so daß das MSD für unendlich viele Bits steht. // Dann beide Argumente in gleichgroße Digit sequences umwandeln, Operation // mit einer einfachen Schleife durchführen. const cl_I logandc2 (const cl_I& x, const cl_I& y) { if (fixnump(x) && fixnump(y)) // Beides Fixnums -> ganz einfach: { // bitweise als Fixnum zurück return cl_I_from_word((x.word & ~ y.word) | cl_combine(cl_FN_tag,0)); } if (fixnump(x)) { DeclareType(cl_FN,x); if (!minusp(x)) // PosFixnum AND Bignum -> PosFixnum { return cl_I_from_word(x.word & ~ cl_combine(0,pFN_maxlength_digits_at(BN_LSDptr(y)))); } } { CL_ALLOCA_STACK; var uintC n; // Anzahl der Digits {var uintC nx = I_to_DS_need(x); var uintC ny = I_to_DS_need(y); n = (nx>=ny ? nx : ny); } {var uintD* xptr; I_to_DS_n(x,n,xptr=); // Pointer in DS zu x var uintD* yptr; I_to_DS_n(y,n,yptr=); // Pointer in DS zu y var uintD* zptr = xptr; // Pointer aufs Ergebnis andc2_loop_msp(xptr,yptr,n); // mit AND NOT verknüpfen return DS_to_I(zptr,n); // Ergebnis als Integer } }} } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_fullbyte.cc0000644000000000000000000000060211201634737016137 0ustar // cl_fullbyte(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/bitwise/cl_I_byte.h" // Implementation. #include "cln/integer.h" #include "integer/cl_I.h" namespace cln { const cl_I cl_fullbyte (uintC p, uintC q) { if (p==q) return 0; else return ash(-1,(cl_I)(unsigned long)p) + ash(1,(cl_I)(unsigned long)q); } } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_dpf.cc0000644000000000000000000000114711201634737015067 0ustar // deposit_field(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "cln/integer.h" #include "integer/cl_I.h" namespace cln { const cl_I deposit_field (const cl_I& newbyte, const cl_I& n, const cl_byte& b) { // Methode: // (DEPOSIT-FIELD newbyte (byte s p) integer) // = (logxor integer // (ash (logxor (ldb (byte s p) newbyte) (ldb (byte s p) integer)) // p // ) ) return logxor(n, ash(logxor(ldb(newbyte,b),ldb(n,b)), b.position)); } } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_logand.cc0000644000000000000000000000351311201634737015561 0ustar // logand(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "integer/bitwise/cl_I_log.h" namespace cln { // Logische Operationen auf Integers: // Methode: aus den Längen der beiden Argumente eine obere Schranke für // die Länge des Ergebnisses berechnen (das Maximum der beiden Längen und // FN_maxlength), so daß das MSD für unendlich viele Bits steht. // Dann beide Argumente in gleichgroße Digit sequences umwandeln, Operation // mit einer einfachen Schleife durchführen. const cl_I logand (const cl_I& x, const cl_I& y) { if (fixnump(x) && fixnump(y)) // Beides Fixnums -> ganz einfach: { // bitweise als Fixnum zurück return cl_I_from_word(x.word & y.word); } if (fixnump(x)) { DeclareType(cl_FN,x); if (!minusp(x)) // PosFixnum AND Bignum -> PosFixnum { return cl_I_from_word(x.word & cl_combine(cl_FN_tag,pFN_maxlength_digits_at(BN_LSDptr(y)))); } } if (fixnump(y)) { DeclareType(cl_FN,y); if (!minusp(y)) // Bignum AND PosFixnum -> PosFixnum { return cl_I_from_word(cl_combine(cl_FN_tag,pFN_maxlength_digits_at(BN_LSDptr(x))) & y.word); } } { CL_ALLOCA_STACK; var uintC n; // Anzahl der Digits {var uintC nx = I_to_DS_need(x); var uintC ny = I_to_DS_need(y); n = (nx>=ny ? nx : ny); } {var uintD* xptr; I_to_DS_n(x,n,xptr=); // Pointer in DS zu x var uintD* yptr; I_to_DS_n(y,n,yptr=); // Pointer in DS zu y var uintD* zptr = xptr; // Pointer aufs Ergebnis and_loop_msp(xptr,yptr,n); // mit AND verknüpfen return DS_to_I(zptr,n); // Ergebnis als Integer } }} } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_lognor.cc0000644000000000000000000000264111201634737015616 0ustar // lognor(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "integer/bitwise/cl_I_log.h" namespace cln { // Logische Operationen auf Integers: // Methode: aus den Längen der beiden Argumente eine obere Schranke für // die Länge des Ergebnisses berechnen (das Maximum der beiden Längen und // FN_maxlength), so daß das MSD für unendlich viele Bits steht. // Dann beide Argumente in gleichgroße Digit sequences umwandeln, Operation // mit einer einfachen Schleife durchführen. const cl_I lognor (const cl_I& x, const cl_I& y) { if (fixnump(x) && fixnump(y)) // Beides Fixnums -> ganz einfach: { // bitweise als Fixnum zurück return cl_I_from_word((x.word | y.word) ^ cl_combine(0,~(cl_uint)0)); } else { CL_ALLOCA_STACK; var uintC n; // Anzahl der Digits {var uintC nx = I_to_DS_need(x); var uintC ny = I_to_DS_need(y); n = (nx>=ny ? nx : ny); } {var uintD* xptr; I_to_DS_n(x,n,xptr=); // Pointer in DS zu x var uintD* yptr; I_to_DS_n(y,n,yptr=); // Pointer in DS zu y var uintD* zptr = xptr; // Pointer aufs Ergebnis nor_loop_msp(xptr,yptr,n); // mit NOT OR verknüpfen return DS_to_I(zptr,n); // Ergebnis als Integer } }} } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_logbitp_I.cc0000644000000000000000000000265111201634737016227 0ustar // logbitp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "cln/io.h" #include "cln/integer_io.h" #include "cln/exception.h" #include namespace cln { bool logbitp (const cl_I& x, const cl_I& y) { // Methode: // Falls x<0, Error. // Falls x>=0: Falls x>=intDsize*Länge(y), teste Vorzeichen von y. // Sonst x=intDsize*k+i, Teste Bit i vom Worte Nr. k+1 (von oben herab). if (!minusp(x)) // x>=0 ? { if (fixnump(x)) { var uintV x_ = FN_to_V(x); var uintC ylen; var const uintD* yLSDptr; I_to_NDS_nocopy(y, ,ylen=,yLSDptr=,true, { return false; } ); // DS zu y if (x_ < intDsize*ylen) // x ist ein Fixnum >=0, < intDsize*ylen { if (lspref(yLSDptr,floor(x_,intDsize)) & bit(x_%intDsize)) return true; else return false; } } // Vorzeichen von y testen if (minusp(y)) return true; else return false; } else // x<0 { std::ostringstream buf; fprint(buf, "logbitp: Index is negative: "); fprint(buf, x); throw runtime_exception(buf.str()); } } } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_ash.cc0000644000000000000000000000601611201634737015071 0ustar // ash(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_I ash (const cl_I& x, sintC y) { // Methode: // x = 0 -> 0 als Ergebnis // y = 0 -> x als Ergebnis // y > 0 -> y = intDsize*k + i, j=k+(1 falls i>0, 0 falls i=0). // j Wörter mehr reservieren, k Nullwörter, dann übertragen, // bei i>0: um i Bits links schieben (i=1 geht einfacher). // y < 0 -> y <= - intDsize * (Länge(A0) in Digits) -> Ergebnis = 0 oder -1. // Sonst: -y = intDsize*k + i mit k0: schiebe sie um i Bits nach rechts (i=1 geht einfacher). if (zerop(x)) return 0; // x=0 -> 0 als Ergebnis if (y == 0) return x; // y=0 -> x als Ergebnis CL_ALLOCA_STACK; if (y >= 0) { // y>0 var uintC y_ = (uintC)y; var uintL i = y_%intDsize; // i = y mod intDsize, >=0, =0, <2^intCsize var uintD* LSDptr; var uintC len; var const uintD* x_LSDptr; I_to_NDS_nocopy(x, ,len=,x_LSDptr=,false,); // DS zu x bilden. if (k >= (uintC)(~len)) // kann len+k+1 Überlauf geben? { throw ash_exception(y); } // ja -> Fehler num_stack_alloc_1(len+k,,LSDptr=); LSDptr = clear_loop_lsp(LSDptr,k); // k Nulldigits {var uintD* MSDptr = copy_loop_lsp(x_LSDptr,LSDptr,len); // Nun ist MSDptr/len/LSDptr die DS zu x. // Oberhalb von ihr liegen k Nulldigits, unterhalb ist 1 Digit Platz. // MSDptr/len+k/.. ist jetzt die Gesamt-DS. // Noch um i Bits nach links schieben: if (!(i==0)) // Bei i>0 { // noch ein weiteres Digit dazunehmen (Vorzeichen) {var uintD sign = sign_of_sintD(mspref(MSDptr,0)); lsprefnext(MSDptr) = sign; len++; } // Schiebeschleife: die unteren len Digits um i Bits schieben if (i==1) { shift1left_loop_lsp(LSDptr,len); } else { shiftleft_loop_lsp(LSDptr,len,i,0); } } return DS_to_I(MSDptr,len+k); } } else { // y<0 var uintC y_ = (uintC)(-y); // Wert von -y, >0 var uintL i = y_%intDsize; // i = (-y) mod intDsize, >=0, =0 // DS zu x bilden: var uintD* MSDptr; var uintC len; I_to_NDS(x, MSDptr=,len=,); // DS zu x bilden. if (k>=len) goto sign; // -y >= intDsize*len -> Vorzeichen von x zurück len -= k; // rechte k Digits einfach streichen // Noch ist len>0. Um i Bits nach rechts schieben: if (!(i==0)) // Bei i>0: { // Schiebe len Digits ab MSDptr um i Bits nach rechts: if (i==1) { shift1right_loop_msp(MSDptr,len,sign_of_sintD(mspref(MSDptr,0))); } else { shiftrightsigned_loop_msp(MSDptr,len,i); } } return DS_to_I(MSDptr,len); } sign: // Ergebnis ist 0, falls x>=0, und -1, falls x<0: return (minusp(x) ? cl_I(-1) : cl_I(0)); } } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_logeqv.cc0000644000000000000000000000265311201634737015616 0ustar // logeqv(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "integer/bitwise/cl_I_log.h" namespace cln { // Logische Operationen auf Integers: // Methode: aus den Längen der beiden Argumente eine obere Schranke für // die Länge des Ergebnisses berechnen (das Maximum der beiden Längen und // FN_maxlength), so daß das MSD für unendlich viele Bits steht. // Dann beide Argumente in gleichgroße Digit sequences umwandeln, Operation // mit einer einfachen Schleife durchführen. const cl_I logeqv (const cl_I& x, const cl_I& y) { if (fixnump(x) && fixnump(y)) // Beides Fixnums -> ganz einfach: { // bitweise als Fixnum zurück return cl_I_from_word(~(x.word ^ y.word) & cl_combine(cl_FN_tag,~(cl_uint)0)); } else { CL_ALLOCA_STACK; var uintC n; // Anzahl der Digits {var uintC nx = I_to_DS_need(x); var uintC ny = I_to_DS_need(y); n = (nx>=ny ? nx : ny); } {var uintD* xptr; I_to_DS_n(x,n,xptr=); // Pointer in DS zu x var uintD* yptr; I_to_DS_n(y,n,yptr=); // Pointer in DS zu y var uintD* zptr = xptr; // Pointer aufs Ergebnis eqv_loop_msp(xptr,yptr,n); // mit NOT XOR verknüpfen return DS_to_I(zptr,n); // Ergebnis als Integer } }} } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_mkfx.cc0000644000000000000000000000377011201634737015267 0ustar // mkf_extract(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/bitwise/cl_I_byte.h" // Implementation. #include "cln/integer.h" #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_I mkf_extract (const cl_I& x, uintC p, uintC q) { CL_ALLOCA_STACK; var const uintD* MSDptr; var uintC len; var const uintD* LSDptr; I_to_NDS_nocopy(x, MSDptr=,len=,LSDptr=,true, { return 0; } ); // NDS zu x bilden // MSDptr erhöhen und len erniedrigen, so daß len = ceiling(q/intDsize) wird: { var uintC qD = ceiling(q,intDsize); // ceiling(q/intDsize) // wegen q<=l ist qD = ceiling(q/intDsize) <= ceiling((l+1)/intDsize) = len, also // paßt qD ebenso wie len in ein uintC. MSDptr = MSDptr mspop (len - qD); // MSDptr um len-qD Digits erhöhen len = qD; // len um len-qD erniedrigen } // Platz (len Digits) für die neue UDS bereitstellen: var uintD* newMSDptr; num_stack_alloc_1(len, newMSDptr = ,); // Platz belegen {var uintC pD = p/intDsize; // floor(p/intDsize), paßt in ein uintC // Kopiere len-pD Digits aus der DS zu x heraus: var uintD* midptr = copy_loop_msp(MSDptr,newMSDptr,len-pD); // Lösche p-intDsize*floor(p/intDsize) Bits im Digit unterhalb von midptr: {var uintC p_D = p%intDsize; if (!(p_D==0)) { lspref(midptr,0) &= minus_bit(p_D); } } // Lösche pD Digits darüber: clear_loop_msp(midptr,pD); } // Lösche intDsize*ceiling(q/intDsize)-q Bits im ersten Digit: {var uintL q_D = q%intDsize; #ifdef HAVE_FAST_LONGLONG if (!(q_D==0)) mspref(newMSDptr,0) &= (uintD)((1LL<= q-p: { var uintC bitcount = intDsize*len - (q-p); // Anzahl vorne auszublendender Bits ( >=0, <= intDsize-1 + intDsize-1 ) if (bitcount>=intDsize) { bitcount -= intDsize; msshrink(newMSDptr); len -= 1; } // intDsize Bits ausblenden // Noch 0 <= bitcount < intDsize Bits auszublenden: if (bitcount > 0) { mspref(newMSDptr,0) &= (uintD)(bit(intDsize-bitcount)-1); } } // Jetzt enthält die UDS newMSDptr/len/.. die extrahierten Bits. return UDS_to_I(newMSDptr,len); // UDS in Integer umwandeln } } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_ldb.cc0000644000000000000000000000255211201634737015060 0ustar // ldb(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "cln/integer.h" #include "integer/cl_I.h" #include "integer/bitwise/cl_I_byte.h" namespace cln { const cl_I ldb (const cl_I& n, const cl_byte& b) { // Methode: // (ldb (byte s p) n) extrahiere die Bits p,...,p+s-1 von n. // l:=(integer-length n) // Falls l <= p : // Falls n>=0: 0, falls n<0: 2^s - 1 (s Einsenbits). // Falls p <= l : // q:=min(p+s,l). // Extrahiere die Bits p,...,q-1 von n. // Falls p+s>l und n<0, füge p+s-l Einsenbits an (addiere 2^s-2^(l-p)). var uintC s = b.size; var uintC p = b.position; var uintC l = integer_length(n); // l = (integer-length n) if (l<=p) // l<=p if (!minusp(n)) // n>=0 return 0; // 0 als Ergebnis else // n<0 return cl_fullbyte(0,s); // 2^s-2^0 als Ergebnis else // l>p { var cl_I erg = ldb_extract(n,p,(p+slp) && minusp(n)) // s>l-p und n<0 ? { return logior(erg,cl_fullbyte(lp,s)); } // setze Bits l-p,...,s-1 // (logisches Exklusiv-Oder oder Addition ginge auch) else return erg; } } } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_logorc2.cc0000644000000000000000000000265611201634737015673 0ustar // logorc2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "integer/bitwise/cl_I_log.h" namespace cln { // Logische Operationen auf Integers: // Methode: aus den Längen der beiden Argumente eine obere Schranke für // die Länge des Ergebnisses berechnen (das Maximum der beiden Längen und // FN_maxlength), so daß das MSD für unendlich viele Bits steht. // Dann beide Argumente in gleichgroße Digit sequences umwandeln, Operation // mit einer einfachen Schleife durchführen. const cl_I logorc2 (const cl_I& x, const cl_I& y) { if (fixnump(x) && fixnump(y)) // Beides Fixnums -> ganz einfach: { // bitweise als Fixnum zurück return cl_I_from_word((x.word | ~ y.word) & cl_combine(cl_FN_tag,~(cl_uint)0)); } else { CL_ALLOCA_STACK; var uintC n; // Anzahl der Digits {var uintC nx = I_to_DS_need(x); var uintC ny = I_to_DS_need(y); n = (nx>=ny ? nx : ny); } {var uintD* xptr; I_to_DS_n(x,n,xptr=); // Pointer in DS zu x var uintD* yptr; I_to_DS_n(y,n,yptr=); // Pointer in DS zu y var uintD* zptr = xptr; // Pointer aufs Ergebnis orc2_loop_msp(xptr,yptr,n); // mit OR NOT verknüpfen return DS_to_I(zptr,n); // Ergebnis als Integer } }} } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_lognand.cc0000644000000000000000000000365411201634737015745 0ustar // lognand(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "integer/bitwise/cl_I_log.h" namespace cln { // Logische Operationen auf Integers: // Methode: aus den Längen der beiden Argumente eine obere Schranke für // die Länge des Ergebnisses berechnen (das Maximum der beiden Längen und // FN_maxlength), so daß das MSD für unendlich viele Bits steht. // Dann beide Argumente in gleichgroße Digit sequences umwandeln, Operation // mit einer einfachen Schleife durchführen. const cl_I lognand (const cl_I& x, const cl_I& y) { if (fixnump(x) && fixnump(y)) // Beides Fixnums -> ganz einfach: { // bitweise als Fixnum zurück return cl_I_from_word((x.word & y.word) ^ cl_combine(0,~(cl_uint)0)); } if (fixnump(x)) { DeclareType(cl_FN,x); if (!minusp(x)) // PosFixnum AND Bignum -> PosFixnum { return cl_I_from_word((x.word & cl_combine(0,pFN_maxlength_digits_at(BN_LSDptr(y)))) ^ cl_combine(cl_FN_tag,~(cl_uint)0)); } } if (fixnump(y)) { DeclareType(cl_FN,y); if (!minusp(y)) // Bignum AND PosFixnum -> PosFixnum { return cl_I_from_word((cl_combine(0,pFN_maxlength_digits_at(BN_LSDptr(x))) & y.word) ^ cl_combine(cl_FN_tag,~(cl_uint)0)); } } { CL_ALLOCA_STACK; var uintC n; // Anzahl der Digits {var uintC nx = I_to_DS_need(x); var uintC ny = I_to_DS_need(y); n = (nx>=ny ? nx : ny); } {var uintD* xptr; I_to_DS_n(x,n,xptr=); // Pointer in DS zu x var uintD* yptr; I_to_DS_n(y,n,yptr=); // Pointer in DS zu y var uintD* zptr = xptr; // Pointer aufs Ergebnis nand_loop_msp(xptr,yptr,n); // mit NOT AND verknüpfen return DS_to_I(zptr,n); // Ergebnis als Integer } }} } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_logbitp.cc0000644000000000000000000000156011201634737015755 0ustar // logbitp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { bool logbitp (uintC x, const cl_I& y) { // Methode: // Falls x>=intDsize*Länge(y), teste Vorzeichen von y. // Sonst x=intDsize*k+i, Teste Bit i vom Worte Nr. k+1 (von oben herab). var const uintD* yMSDptr; var uintC ylen; var const uintD* yLSDptr; I_to_NDS_nocopy(y, yMSDptr=,ylen=,yLSDptr=,true, { return false; } ); // DS zu y if (x < intDsize*ylen) // x ist >=0, < intDsize*ylen { if (lspref(yLSDptr,floor(x,intDsize)) & bit(x%intDsize)) return true; else return false; } // Vorzeichen von y testen if (/* (ylen > 0) && */ ((sintD)mspref(yMSDptr,0) < 0)) return true; else return false; } } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_log_aux.cc0000644000000000000000000000357611201634737015764 0ustar // I_to_DS_n_aux(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/bitwise/cl_I_log.h" // Implementation. #include "cln/number.h" #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { uintD* I_to_DS_n_aux (const cl_I& obj, uintC n, uintD* destptr) { // Nun sind unterhalb von destptr n Digits Platz. // oberen Teil der DS aus obj füllen, dabei destptr erniedrigen: if (fixnump(obj)) // Fixnum: { #if (intDsize==64) // && (FN_maxlength==1) lsprefnext(destptr) = FN_to_Q(obj); #else // (intDsize<=32) var uintV wert = FN_to_V(obj); #define FN_maxlength_a (intVsize/intDsize) #define FN_maxlength_b (FN_maxlength<=FN_maxlength_a ? FN_maxlength : FN_maxlength_a) // FN_maxlength Digits ablegen. Davon kann man FN_maxlength_b Digits aus wert nehmen. #if (FN_maxlength_b > 1) doconsttimes(FN_maxlength_b-1, lsprefnext(destptr) = (uintD)wert; wert = wert >> intDsize; ); #endif lsprefnext(destptr) = (uintD)wert; #if (FN_maxlength > FN_maxlength_b) // Es ist cl_value_len-1 = intVsize, brauche // noch FN_maxlength-FN_maxlength_b = 1 Digit. lsprefnext(destptr) = (sintD)sign_of(FN_to_V(obj)); #endif #endif n -= FN_maxlength; } else // Bignum: { var uintC len = TheBignum(obj)->length; n -= len; destptr = copy_loop_lsp(BN_LSDptr(obj),destptr,len); // DS kopieren } // unteren Teil mit Fülldigits, gebildet aus dem Vorzeichen, füllen: if (!(n==0)) { destptr = fill_loop_lsp(destptr,n,sign_of_sintD(mspref(destptr,0))); } // destptr zeigt nun aufs untere Ende der DS. return destptr; } } // namespace cln cln-1.3.3/src/integer/bitwise/cl_I_mkf.cc0000644000000000000000000000270011201634737015067 0ustar // mask_field(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "cln/integer.h" #include "integer/cl_I.h" #include "integer/bitwise/cl_I_byte.h" namespace cln { const cl_I mask_field (const cl_I& n, const cl_byte& b) { // Methode: // (mask-field (byte s p) n) extrahiere die Bits p,...,p+s-1 von n. // l:=(integer-length n) // Falls l <= p : // Falls n>=0: 0, falls n<0: 2^(p+s) - 2^p (s Einsenbits). // Falls p <= l : // q:=min(p+s,l). // Extrahiere die Bits p,...,q-1 von n. // Falls p+s>l und n<0, füge p+s-l Einsenbits an (addiere 2^(p+s)-2^l). var uintC s = b.size; var uintC p = b.position; {var uintC ps = p+s; var uintC l = integer_length(n); // l = (integer-length n) if (l<=p) // l<=p if (!minusp(n)) // n>=0 return 0; // 0 als Ergebnis else // n<0 return cl_fullbyte(p,ps); // 2^(p+s)-2^p als Ergebnis else // l>p { // Bits p,...,q-1 mit q = min(p+s,l) extrahieren: var cl_I erg = mkf_extract(n,p,(psl) && minusp(n)) // p+s>l und n<0 ? { return logior(erg,cl_fullbyte(l,ps)); } // setze Bits l,...,p+s-1 // (logisches Exklusiv-Oder oder Addition ginge auch) else return erg; } } } } // namespace cln cln-1.3.3/src/integer/hash/0000755000000000000000000000000012173046200012322 5ustar cln-1.3.3/src/integer/hash/cl_I_hash_pointer.cc0000644000000000000000000000255011201634740016247 0ustar // class cl_ht_from_integer_to_pointer. // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/hash/cl_I_hash_pointer.h" // Implementation. #include "integer/cl_I.h" #include "base/hash/cl_hash1.h" namespace cln { static void cl_hashtable_from_integer_to_pointer_destructor (cl_heap* pointer) { #if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug (*(cl_heap_hashtable_from_integer_to_pointer*)pointer).~cl_heap_hashtable_1(); #else (*(cl_heap_hashtable_from_integer_to_pointer*)pointer).~cl_heap_hashtable_from_integer_to_pointer(); #endif } cl_class cl_class_hashtable_from_integer_to_pointer = { cl_hashtable_from_integer_to_pointer_destructor, 0 }; // These are not inline, because they tend to duplicate a lot of template code. cl_ht_from_integer_to_pointer::cl_ht_from_integer_to_pointer () { var cl_heap_hashtable_from_integer_to_pointer* ht = new cl_heap_hashtable_from_integer_to_pointer (); ht->refcount = 1; ht->type = &cl_class_hashtable_from_integer_to_pointer; pointer = ht; } void* * cl_ht_from_integer_to_pointer::get (const cl_I& x) const { return ((cl_heap_hashtable_from_integer_to_pointer*)pointer)->get(x); } void cl_ht_from_integer_to_pointer::put (const cl_I& x, void* y) const { ((cl_heap_hashtable_from_integer_to_pointer*)pointer)->put(x,y); } } // namespace cln cln-1.3.3/src/integer/hash/cl_I_hashweak_rcpointer.h0000644000000000000000000000231311201634740017303 0ustar // cl_I hash tables #ifndef _CL_I_HASHWEAK_RCPOINTER_H #define _CL_I_HASHWEAK_RCPOINTER_H #include "cln/number.h" #include "cln/integer.h" #include "base/hash/cl_hash1weak.h" namespace cln { typedef cl_htentry1 cl_htentry_from_integer_to_rcpointer; typedef cl_heap_weak_hashtable_1 cl_heap_weak_hashtable_from_integer_to_rcpointer; typedef _cl_hashtable_iterator cl_hashtable_from_integer_to_rcpointer_iterator; struct cl_wht_from_integer_to_rcpointer : public cl_gcpointer { // Constructors. cl_wht_from_integer_to_rcpointer (bool (*maygc_htentry) (const cl_htentry_from_integer_to_rcpointer&)); cl_wht_from_integer_to_rcpointer (const cl_wht_from_integer_to_rcpointer&); // Assignment operators. cl_wht_from_integer_to_rcpointer& operator= (const cl_wht_from_integer_to_rcpointer&); // Iterator. cl_hashtable_from_integer_to_rcpointer_iterator iterator () const { return ((cl_heap_weak_hashtable_from_integer_to_rcpointer*)pointer)->iterator(); } // Lookup. cl_rcpointer * get (const cl_I& x) const; // Store. void put (const cl_I& x, const cl_rcpointer& y) const; }; } // namespace cln #endif /* _CL_I_HASHWEAK_RCPOINTER_H */ cln-1.3.3/src/integer/hash/cl_I_hash_gcobject.cc0000644000000000000000000000261411201634740016350 0ustar // class cl_ht_from_integer_to_gcobject. // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/hash/cl_I_hash_gcobject.h" // Implementation. #include "integer/cl_I.h" #include "base/hash/cl_hash1.h" namespace cln { static void cl_hashtable_from_integer_to_gcobject_destructor (cl_heap* pointer) { #if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug (*(cl_heap_hashtable_from_integer_to_gcobject*)pointer).~cl_heap_hashtable_1(); #else (*(cl_heap_hashtable_from_integer_to_gcobject*)pointer).~cl_heap_hashtable_from_integer_to_gcobject(); #endif } cl_class cl_class_hashtable_from_integer_to_gcobject = { cl_hashtable_from_integer_to_gcobject_destructor, 0 }; // These are not inline, because they tend to duplicate a lot of template code. cl_ht_from_integer_to_gcobject::cl_ht_from_integer_to_gcobject () { var cl_heap_hashtable_from_integer_to_gcobject* ht = new cl_heap_hashtable_from_integer_to_gcobject (); ht->refcount = 1; ht->type = &cl_class_hashtable_from_integer_to_gcobject; pointer = ht; } cl_gcobject * cl_ht_from_integer_to_gcobject::get (const cl_I& x) const { return ((cl_heap_hashtable_from_integer_to_gcobject*)pointer)->get(x); } void cl_ht_from_integer_to_gcobject::put (const cl_I& x, const cl_gcobject& y) const { ((cl_heap_hashtable_from_integer_to_gcobject*)pointer)->put(x,y); } } // namespace cln cln-1.3.3/src/integer/hash/cl_I_hash_rcobject.h0000644000000000000000000000212011201634740016215 0ustar // cl_I hash tables #ifndef _CL_I_HASH_RCOBJECT_H #define _CL_I_HASH_RCOBJECT_H #include "cln/number.h" #include "cln/integer.h" #include "base/hash/cl_hash1.h" namespace cln { typedef cl_htentry1 cl_htentry_from_integer_to_rcobject; typedef cl_heap_hashtable_1 cl_heap_hashtable_from_integer_to_rcobject; typedef _cl_hashtable_iterator cl_hashtable_from_integer_to_rcobject_iterator; struct cl_ht_from_integer_to_rcobject : public cl_gcpointer { // Constructors. cl_ht_from_integer_to_rcobject (); cl_ht_from_integer_to_rcobject (const cl_ht_from_integer_to_rcobject&); // Assignment operators. cl_ht_from_integer_to_rcobject& operator= (const cl_ht_from_integer_to_rcobject&); // Iterator. cl_hashtable_from_integer_to_rcobject_iterator iterator () const { return ((cl_heap_hashtable_from_integer_to_rcobject*)pointer)->iterator(); } // Lookup. cl_rcobject * get (const cl_I& x) const; // Store. void put (const cl_I& x, const cl_rcobject& y) const; }; } // namespace cln #endif /* _CL_I_HASH_RCOBJECT_H */ cln-1.3.3/src/integer/hash/cl_I_hashcode.cc0000644000000000000000000000155312034113706015343 0ustar // cl_I hashcode(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/cl_I.h" // Implementation. namespace cln { unsigned long hashcode (const cl_I& x) { var unsigned long code = 0x814BE3A5; // We walk through all limbs. It may take some time for very large // integers, but it's better than completely ignoring some limbs. if (fixnump(x)) { #if (cl_value_len <= intLsize) code += FN_to_V(x); #elif (cl_word_size==64) code += FN_to_Q(x); code ^= (code >> 32); #endif code &= 0xFFFFFFFF; } else { var const uintD* MSDptr; var uintC len; BN_to_NDS_nocopy(x, MSDptr=,len=,); for (; len > 0; len--) { var uintD c = msprefnext(MSDptr); code = (code << 5) | (code >> 27); // rotate left 5 bits code += (long)c << 16; code ^= (long)c; code &= 0xFFFFFFFF; } } return code; } } // namespace cln cln-1.3.3/src/integer/hash/cl_I_hash_gcpointer.h0000644000000000000000000000214311201634740016421 0ustar // cl_I hash tables #ifndef _CL_I_HASH_GCPOINTER_H #define _CL_I_HASH_GCPOINTER_H #include "cln/number.h" #include "cln/integer.h" #include "base/hash/cl_hash1.h" namespace cln { typedef cl_htentry1 cl_htentry_from_integer_to_gcpointer; typedef cl_heap_hashtable_1 cl_heap_hashtable_from_integer_to_gcpointer; typedef _cl_hashtable_iterator cl_hashtable_from_integer_to_gcpointer_iterator; struct cl_ht_from_integer_to_gcpointer : public cl_gcpointer { // Constructors. cl_ht_from_integer_to_gcpointer (); cl_ht_from_integer_to_gcpointer (const cl_ht_from_integer_to_gcpointer&); // Assignment operators. cl_ht_from_integer_to_gcpointer& operator= (const cl_ht_from_integer_to_gcpointer&); // Iterator. cl_hashtable_from_integer_to_gcpointer_iterator iterator () const { return ((cl_heap_hashtable_from_integer_to_gcpointer*)pointer)->iterator(); } // Lookup. cl_gcpointer * get (const cl_I& x) const; // Store. void put (const cl_I& x, const cl_gcpointer& y) const; }; } // namespace cln #endif /* _CL_I_HASH_GCPOINTER_H */ cln-1.3.3/src/integer/hash/cl_I_hash_rcpointer.h0000644000000000000000000000214311201634740016434 0ustar // cl_I hash tables #ifndef _CL_I_HASH_RCPOINTER_H #define _CL_I_HASH_RCPOINTER_H #include "cln/number.h" #include "cln/integer.h" #include "base/hash/cl_hash1.h" namespace cln { typedef cl_htentry1 cl_htentry_from_integer_to_rcpointer; typedef cl_heap_hashtable_1 cl_heap_hashtable_from_integer_to_rcpointer; typedef _cl_hashtable_iterator cl_hashtable_from_integer_to_rcpointer_iterator; struct cl_ht_from_integer_to_rcpointer : public cl_gcpointer { // Constructors. cl_ht_from_integer_to_rcpointer (); cl_ht_from_integer_to_rcpointer (const cl_ht_from_integer_to_rcpointer&); // Assignment operators. cl_ht_from_integer_to_rcpointer& operator= (const cl_ht_from_integer_to_rcpointer&); // Iterator. cl_hashtable_from_integer_to_rcpointer_iterator iterator () const { return ((cl_heap_hashtable_from_integer_to_rcpointer*)pointer)->iterator(); } // Lookup. cl_rcpointer * get (const cl_I& x) const; // Store. void put (const cl_I& x, const cl_rcpointer& y) const; }; } // namespace cln #endif /* _CL_I_HASH_RCPOINTER_H */ cln-1.3.3/src/integer/hash/cl_I_hash_pointer.h0000644000000000000000000000204211201634740016105 0ustar // cl_I hash tables #ifndef _CL_I_HASH_POINTER_H #define _CL_I_HASH_POINTER_H #include "cln/number.h" #include "cln/integer.h" #include "base/hash/cl_hash1.h" namespace cln { typedef cl_htentry1 cl_htentry_from_integer_to_pointer; typedef cl_heap_hashtable_1 cl_heap_hashtable_from_integer_to_pointer; typedef _cl_hashtable_iterator cl_hashtable_from_integer_to_pointer_iterator; struct cl_ht_from_integer_to_pointer : public cl_gcpointer { // Constructors. cl_ht_from_integer_to_pointer (); cl_ht_from_integer_to_pointer (const cl_ht_from_integer_to_pointer&); // Assignment operators. cl_ht_from_integer_to_pointer& operator= (const cl_ht_from_integer_to_pointer&); // Iterator. cl_hashtable_from_integer_to_pointer_iterator iterator () const { return ((cl_heap_hashtable_from_integer_to_pointer*)pointer)->iterator(); } // Lookup. void* * get (const cl_I& x) const; // Store. void put (const cl_I& x, void* y) const; }; } // namespace cln #endif /* _CL_I_HASH_POINTER_H */ cln-1.3.3/src/integer/hash/cl_I_hash_gcpointer.cc0000644000000000000000000000263711201634740016567 0ustar // class cl_ht_from_integer_to_gcpointer. // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/hash/cl_I_hash_gcpointer.h" // Implementation. #include "integer/cl_I.h" #include "base/hash/cl_hash1.h" namespace cln { static void cl_hashtable_from_integer_to_gcpointer_destructor (cl_heap* pointer) { #if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug (*(cl_heap_hashtable_from_integer_to_gcpointer*)pointer).~cl_heap_hashtable_1(); #else (*(cl_heap_hashtable_from_integer_to_gcpointer*)pointer).~cl_heap_hashtable_from_integer_to_gcpointer(); #endif } cl_class cl_class_hashtable_from_integer_to_gcpointer = { cl_hashtable_from_integer_to_gcpointer_destructor, 0 }; // These are not inline, because they tend to duplicate a lot of template code. cl_ht_from_integer_to_gcpointer::cl_ht_from_integer_to_gcpointer () { var cl_heap_hashtable_from_integer_to_gcpointer* ht = new cl_heap_hashtable_from_integer_to_gcpointer (); ht->refcount = 1; ht->type = &cl_class_hashtable_from_integer_to_gcpointer; pointer = ht; } cl_gcpointer * cl_ht_from_integer_to_gcpointer::get (const cl_I& x) const { return ((cl_heap_hashtable_from_integer_to_gcpointer*)pointer)->get(x); } void cl_ht_from_integer_to_gcpointer::put (const cl_I& x, const cl_gcpointer& y) const { ((cl_heap_hashtable_from_integer_to_gcpointer*)pointer)->put(x,y); } } // namespace cln cln-1.3.3/src/integer/hash/cl_I_hash_rcpointer.cc0000644000000000000000000000263711201634740016602 0ustar // class cl_ht_from_integer_to_rcpointer. // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/hash/cl_I_hash_rcpointer.h" // Implementation. #include "integer/cl_I.h" #include "base/hash/cl_hash1.h" namespace cln { static void cl_hashtable_from_integer_to_rcpointer_destructor (cl_heap* pointer) { #if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug (*(cl_heap_hashtable_from_integer_to_rcpointer*)pointer).~cl_heap_hashtable_1(); #else (*(cl_heap_hashtable_from_integer_to_rcpointer*)pointer).~cl_heap_hashtable_from_integer_to_rcpointer(); #endif } cl_class cl_class_hashtable_from_integer_to_rcpointer = { cl_hashtable_from_integer_to_rcpointer_destructor, 0 }; // These are not inline, because they tend to duplicate a lot of template code. cl_ht_from_integer_to_rcpointer::cl_ht_from_integer_to_rcpointer () { var cl_heap_hashtable_from_integer_to_rcpointer* ht = new cl_heap_hashtable_from_integer_to_rcpointer (); ht->refcount = 1; ht->type = &cl_class_hashtable_from_integer_to_rcpointer; pointer = ht; } cl_rcpointer * cl_ht_from_integer_to_rcpointer::get (const cl_I& x) const { return ((cl_heap_hashtable_from_integer_to_rcpointer*)pointer)->get(x); } void cl_ht_from_integer_to_rcpointer::put (const cl_I& x, const cl_rcpointer& y) const { ((cl_heap_hashtable_from_integer_to_rcpointer*)pointer)->put(x,y); } } // namespace cln cln-1.3.3/src/integer/hash/cl_I_hash_gcobject.h0000644000000000000000000000212011201634740016202 0ustar // cl_I hash tables #ifndef _CL_I_HASH_GCOBJECT_H #define _CL_I_HASH_GCOBJECT_H #include "cln/number.h" #include "cln/integer.h" #include "base/hash/cl_hash1.h" namespace cln { typedef cl_htentry1 cl_htentry_from_integer_to_gcobject; typedef cl_heap_hashtable_1 cl_heap_hashtable_from_integer_to_gcobject; typedef _cl_hashtable_iterator cl_hashtable_from_integer_to_gcobject_iterator; struct cl_ht_from_integer_to_gcobject : public cl_gcpointer { // Constructors. cl_ht_from_integer_to_gcobject (); cl_ht_from_integer_to_gcobject (const cl_ht_from_integer_to_gcobject&); // Assignment operators. cl_ht_from_integer_to_gcobject& operator= (const cl_ht_from_integer_to_gcobject&); // Iterator. cl_hashtable_from_integer_to_gcobject_iterator iterator () const { return ((cl_heap_hashtable_from_integer_to_gcobject*)pointer)->iterator(); } // Lookup. cl_gcobject * get (const cl_I& x) const; // Store. void put (const cl_I& x, const cl_gcobject& y) const; }; } // namespace cln #endif /* _CL_I_HASH_GCOBJECT_H */ cln-1.3.3/src/integer/hash/cl_I_hash_rcobject.cc0000644000000000000000000000261411201634740016363 0ustar // class cl_ht_from_integer_to_rcobject. // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/hash/cl_I_hash_rcobject.h" // Implementation. #include "integer/cl_I.h" #include "base/hash/cl_hash1.h" namespace cln { static void cl_hashtable_from_integer_to_rcobject_destructor (cl_heap* pointer) { #if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug (*(cl_heap_hashtable_from_integer_to_rcobject*)pointer).~cl_heap_hashtable_1(); #else (*(cl_heap_hashtable_from_integer_to_rcobject*)pointer).~cl_heap_hashtable_from_integer_to_rcobject(); #endif } cl_class cl_class_hashtable_from_integer_to_rcobject = { cl_hashtable_from_integer_to_rcobject_destructor, 0 }; // These are not inline, because they tend to duplicate a lot of template code. cl_ht_from_integer_to_rcobject::cl_ht_from_integer_to_rcobject () { var cl_heap_hashtable_from_integer_to_rcobject* ht = new cl_heap_hashtable_from_integer_to_rcobject (); ht->refcount = 1; ht->type = &cl_class_hashtable_from_integer_to_rcobject; pointer = ht; } cl_rcobject * cl_ht_from_integer_to_rcobject::get (const cl_I& x) const { return ((cl_heap_hashtable_from_integer_to_rcobject*)pointer)->get(x); } void cl_ht_from_integer_to_rcobject::put (const cl_I& x, const cl_rcobject& y) const { ((cl_heap_hashtable_from_integer_to_rcobject*)pointer)->put(x,y); } } // namespace cln cln-1.3.3/src/integer/hash/cl_I_hashweak_rcpointer.cc0000644000000000000000000000307011201634740017442 0ustar // class cl_wht_from_integer_to_rcpointer. // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/hash/cl_I_hashweak_rcpointer.h" // Implementation. #include "integer/cl_I.h" #include "base/hash/cl_hash1weak.h" namespace cln { static void cl_weak_hashtable_from_integer_to_rcpointer_destructor (cl_heap* pointer) { #if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug (*(cl_heap_weak_hashtable_from_integer_to_rcpointer*)pointer).~cl_heap_weak_hashtable_1(); #else (*(cl_heap_weak_hashtable_from_integer_to_rcpointer*)pointer).~cl_heap_weak_hashtable_from_integer_to_rcpointer(); #endif } cl_class cl_class_weak_hashtable_from_integer_to_rcpointer = { cl_weak_hashtable_from_integer_to_rcpointer_destructor, 0 }; // These are not inline, because they tend to duplicate a lot of template code. cl_wht_from_integer_to_rcpointer::cl_wht_from_integer_to_rcpointer (bool (*maygc_htentry) (const cl_htentry_from_integer_to_rcpointer&)) { var cl_heap_weak_hashtable_from_integer_to_rcpointer* ht = new cl_heap_weak_hashtable_from_integer_to_rcpointer (maygc_htentry); ht->refcount = 1; ht->type = &cl_class_weak_hashtable_from_integer_to_rcpointer; pointer = ht; } cl_rcpointer * cl_wht_from_integer_to_rcpointer::get (const cl_I& x) const { return ((cl_heap_weak_hashtable_from_integer_to_rcpointer*)pointer)->get(x); } void cl_wht_from_integer_to_rcpointer::put (const cl_I& x, const cl_rcpointer& y) const { ((cl_heap_weak_hashtable_from_integer_to_rcpointer*)pointer)->put(x,y); } } // namespace cln cln-1.3.3/src/integer/elem/0000755000000000000000000000000012173046200012321 5ustar cln-1.3.3/src/integer/elem/cl_I_minus.cc0000644000000000000000000002215611201634740014722 0ustar // binary operator - // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_I operator- (const cl_I& x, const cl_I& y) { // Methode: // x Fixnum -> // y Fixnum -> beide direkt subtrahieren, mit L_to_I beenden // y Bignum -> falls x=0, (- y); sonst beide zu DS machen, subtrahieren. // x Bignum -> // y Fixnum -> falls y=0, x; sonst beide zu DS machen, subtrahieren. // y Bignum -> beide zu DS machen, subtrahieren. var uintD* MSDptr; var uintC len; var uintD* LSDptr; // MSDptr/len/LSDptr bilden die DS des Ergebnisses. if (fixnump(x)) { // x ist Fixnum if (fixnump(y)) { // x,y sind Fixnums #if (cl_value_len < intVsize) return V_to_I( FN_to_V(x) - FN_to_V(y) ); // als intVsize-Bit-Zahlen subtrahieren #elif (cl_word_size==64) return Q_to_I( FN_to_Q(x) - FN_to_Q(y) ); // als 64-Bit-Zahlen subtrahieren #elif (intVsize==32) // && (cl_value_len == intVsize) var sint32 xhi = sign_of(FN_to_V(x)); var uint32 xlo = FN_to_V(x); var sint32 yhi = sign_of(FN_to_V(y)); var uint32 ylo = FN_to_V(y); xhi -= yhi; if (xlo < ylo) { xhi -= 1; } xlo -= ylo; return L2_to_I(xhi,xlo); #endif } else { // x ist Fixnum, y ist Bignum, also y länger #if (intDsize==64) var sint64 x_ = FN_to_V(x); // Wert von x #else var sintV x_ = FN_to_V(x); // Wert von x #endif if (FN_V_zerop(x,x_)) { return -y; } // bei x=0 Ergebnis (- y) CL_ALLOCA_STACK; BN_to_NDS_1(y, MSDptr=,len=,LSDptr=); // NDS zu y bilden. // vorsorglich 1 Digit mehr belegen: { var sintD sign = sign_of_sintD(mspref(MSDptr,0)); lsprefnext(MSDptr) = sign; len++; } // Negierschleife: neg_loop_lsp(LSDptr,len); // MSDigit ist nun = 0x0000 oder = 0xFFFF // x_ zu den oberen pFN_maxlength Digits von -y addieren: { #if (intDsize==64) var uint64 y_ = lspref(LSDptr,0); var uint64 y_new = y_+(uint64)x_; lspref(LSDptr,0) = y_new; #else var uintV y_ = pFN_maxlength_digits_at(LSDptr); var uintV y_new = y_+(uintV)x_; set_pFN_maxlength_digits_at(LSDptr,y_new); #endif var uintD* midptr = LSDptr lspop pFN_maxlength; if (y_new < y_) { // Carry. if (!FN_V_minusp(x,x_)) // kürzerer Summand war positiv // Dann ist ein positiver Übertrag weiterzutragen // (Beispiel: 0002FFFC + 0007 = 00030003) { DS_1_plus(midptr,len-pFN_maxlength); } } else { // Kein Carry. if (FN_V_minusp(x,x_)) // kürzerer Summand war negativ // Dann ist ein negativer Übertrag weiterzutragen // (Beispiel: 00020003 + FFF5 = 0001FFF8) { DS_minus1_plus(midptr,len-pFN_maxlength); } } } return DS_to_I(MSDptr,len); // DS wieder zum Integer machen } } else { // x ist Bignum if (fixnump(y)) { // x ist Bignum, y ist Fixnum, also x länger #if (intDsize==64) var sint64 y_ = FN_to_V(y); // Wert von y #else var sintV y_ = FN_to_V(y); // Wert von y #endif if (FN_V_zerop(y,y_)) { return x; } // bei y=0 Ergebnis x CL_ALLOCA_STACK; BN_to_NDS_1(x, MSDptr=,len=,LSDptr=); // NDS zu x bilden. // len>=bn_minlength. len>pFN_maxlength erzwingen: if ((bn_minlength==pFN_maxlength) && (len==pFN_maxlength)) { var sintD sign = sign_of_sintD(mspref(MSDptr,0)); lsprefnext(MSDptr) = sign; len++; } // y_ von den oberen pFN_maxlength Digits von x subtrahieren: { #if (intDsize==64) var uint64 x_ = lspref(LSDptr,0); var uint64 x_new = x_-(uint64)y_; lspref(LSDptr,0) = x_new; #else var uintV x_ = pFN_maxlength_digits_at(LSDptr); var uintV x_new = x_-(uintV)y_; set_pFN_maxlength_digits_at(LSDptr,x_new); #endif var uintD* midptr = LSDptr lspop pFN_maxlength; if (x_new > x_) { // Carry. if (!FN_V_minusp(y,y_)) // kürzerer Summand war positiv // Dann ist ein negativer Übertrag weiterzutragen // (Beispiel: 00030003 - 0007 = 0002FFFC) { DS_minus1_plus(midptr,len-pFN_maxlength); } } else { // Kein Carry. if (FN_V_minusp(y,y_)) // kürzerer Summand war negativ // Dann ist ein positiver Übertrag weiterzutragen // (Beispiel: 0002FFF8 - FFF5 = 00030003) { DS_1_plus(midptr,len-pFN_maxlength); } } } return DS_to_I(MSDptr,len); // DS wieder zum Integer machen } else { // x und y sind Bignums if (TheBignum(x)->length > TheBignum(y)->length) { // x das längere von beiden. CL_ALLOCA_STACK; BN_to_NDS_1(x, MSDptr=,len=,LSDptr=); // NDS zu x bilden. var const uintD* yMSDptr; var uintC ylen; var const uintD* yLSDptr; BN_to_NDS_nocopy(y, yMSDptr=,ylen=,yLSDptr=); // NDS zu y bilden. // yMSDptr/ylen/yLSDptr bilden die DS des kürzeren Arguments y. // Es ist len>ylen. // subtrahieren: { var uintD* midptr = LSDptr lspop ylen; var uintD carry = subfrom_loop_lsp(yLSDptr,LSDptr,ylen); if (carry) { // Carry. if ((sintD)mspref(yMSDptr,0) >=0) // kürzerer Summand war positiv // Dann ist ein negativer Übertrag weiterzutragen // (Beispiel: 00030003 - 0007 = 0002FFFC) { DS_minus1_plus(midptr,len-ylen); } } else { // Kein Carry. if ((sintD)mspref(yMSDptr,0) <0) // kürzerer Summand war negativ // Dann ist ein positiver Übertrag weiterzutragen // (Beispiel: 0002FFF8 - FFF5 = 00030003) { DS_1_plus(midptr,len-ylen); } } } return DS_to_I(MSDptr,len); // DS wieder zum Integer machen } else { // y das längere von beiden. CL_ALLOCA_STACK; BN_to_NDS_1(y, MSDptr=,len=,LSDptr=); // NDS zu y bilden. // vorsorglich 1 Digit mehr belegen: { var sintD sign = sign_of_sintD(mspref(MSDptr,0)); lsprefnext(MSDptr) = sign; len++; } // Negierschleife: neg_loop_lsp(LSDptr,len); // MSDigit ist nun = 0x0000 oder = 0xFFFF var const uintD* xMSDptr; var uintC xlen; var const uintD* xLSDptr; BN_to_NDS_nocopy(x, xMSDptr=,xlen=,xLSDptr=); // NDS zu x bilden. // xMSDptr/xlen/xLSDptr bilden die DS des kürzeren Arguments x. // Es ist jetzt len>xlen. // addieren: { var uintD* midptr = LSDptr lspop xlen; var uintD carry = addto_loop_lsp(xLSDptr,LSDptr,xlen); if (carry) { // Carry. if ((sintD)mspref(xMSDptr,0) >=0) // kürzerer Summand war positiv // Dann ist ein positiver Übertrag weiterzutragen // (Beispiel: 0002FFFC + 0007 = 00030003) { DS_1_plus(midptr,len-xlen); } } else { // Kein Carry. if ((sintD)mspref(xMSDptr,0) <0) // kürzerer Summand war negativ // Dann ist ein negativer Übertrag weiterzutragen // (Beispiel: 00020003 + FFF5 = 0001FFF8) { DS_minus1_plus(midptr,len-xlen); } } } return DS_to_I(MSDptr,len); // DS wieder zum Integer machen } } } } } // namespace cln cln-1.3.3/src/integer/elem/cl_I_equal.cc0000644000000000000000000000270211201634740014671 0ustar // equal(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { bool equal (const cl_I& x, const cl_I& y) { // Methode: // x und y haben gleiches Vorzeichen -> // x Fixnum -> // y Fixnum -> direkt vergleichen. // y Bignum -> verschieden. // x Bignum -> // y Fixnum -> verschieden. // y Bignum -> // falls beide gleich lang, wortweise vergleichen, sonst verschieden. if (fixnump(x)) // x Fixnum if (fixnump(y)) // x Fixnum, y Fixnum { // This assumes cl_value_shift + cl_value_len == cl_pointer_size. return (cl_sint)x.word == (cl_sint)y.word; } else // x Fixnum, y Bignum return false; else // x Bignum if (fixnump(y)) // x Bignum, y Fixnum return false; else // x Bignum, y Bignum if (x.pointer == y.pointer) return true; // gleiche Pointer -> selbe Zahl else { var uintC xlen = TheBignum(x)->length; var uintC ylen = TheBignum(y)->length; if (xlen==ylen) // gleiche Länge -> digitweise vergleichen return compare_loop_msp(BN_MSDptr(x),BN_MSDptr(y),xlen) == 0; else return false; } } } // namespace cln cln-1.3.3/src/integer/elem/cl_I_mul.cc0000644000000000000000000000350311201634740014357 0ustar // binary operator * // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "base/cl_low.h" namespace cln { const cl_I operator* (const cl_I& x, const cl_I& y) { // Methode: // x=0 oder y=0 -> Ergebnis 0 // x und y beide Fixnums -> direkt multiplizieren // sonst: zu DS machen, multiplizieren. if (zerop(x)) { return 0; } if (zerop(y)) { return 0; } if (fixnump(x) && fixnump(y)) { var sintV x_ = FN_to_V(x); var sintV y_ = FN_to_V(y); #if (cl_value_len > 32) // nur falls x und y Integers mit höchstens 32 Bit sind: if (((uintV)((sintV)sign_of(x_) ^ x_) < bit(31)) && ((uintV)((sintV)sign_of(y_) ^ y_) < bit(31))) #endif { // Werte direkt multiplizieren: var uint32 hi; var uint32 lo; mulu32((uint32)x_,(uint32)y_,hi=,lo=); // erst unsigned multiplizieren if (x_ < 0) { hi -= (uint32)y_; } // dann Korrektur für Vorzeichen if (y_ < 0) { hi -= (uint32)x_; } // (vgl. DS_DS_mul_DS) return L2_to_I(hi,lo); } } CL_ALLOCA_STACK; var const uintD* xMSDptr; var uintC xlen; var const uintD* xLSDptr; var const uintD* yMSDptr; var uintC ylen; var const uintD* yLSDptr; var uintD* ergMSDptr; var uintC erglen; I_to_NDS_nocopy(x, xMSDptr = , xlen = , xLSDptr = , false,); I_to_NDS_nocopy(y, yMSDptr = , ylen = , yLSDptr = , false,); DS_DS_mul_DS(xMSDptr,xlen,xLSDptr,yMSDptr,ylen,yLSDptr, ergMSDptr=,erglen=,); return DS_to_I(ergMSDptr,erglen); } // Bit complexity (x,y of length N): O(M(N)). } // namespace cln cln-1.3.3/src/integer/elem/cl_I_uminus.cc0000644000000000000000000000221211201634740015076 0ustar // unary operator - // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_I operator- (const cl_I& x) { if (fixnump(x)) { #if (cl_value_len < intVsize) return V_to_I(- FN_to_V(x)); #elif (cl_word_size==64) return Q_to_I(- FN_to_Q(x)); #elif (intVsize==32) // && (cl_value_len == intVsize) var sint32 xhi = sign_of(FN_to_V(x)); var uint32 xlo = FN_to_V(x); return L2_to_I(-xhi-(xlo!=0),-xlo); #endif } else { // x Bignum CL_ALLOCA_STACK; var uintD* MSDptr; var uintC len; var uintD* LSDptr; BN_to_NDS_1(x, MSDptr=,len=,LSDptr=); // NDS zu x bilden, len>0 // vorsorglich 1 Digit mehr belegen: { var sintD sign = sign_of_sintD(mspref(MSDptr,0)); lsprefnext(MSDptr) = sign; len++; } // Negierschleife: neg_loop_lsp(LSDptr,len); // MSDigit ist nun = 0x0000 oder = 0xFFFF return DS_to_I(MSDptr,len); // DS wieder zum Integer machen } } } // namespace cln cln-1.3.3/src/integer/elem/cl_I_minus1.cc0000644000000000000000000000157711201634740015007 0ustar // minus1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_I minus1 (const cl_I& x) { if (fixnump(x)) { // x ist Fixnum if (x.word != cl_combine(cl_FN_tag,bit(cl_value_len-1))) // bleibt Fixnum: direkt 1 subtrahieren // This assumes cl_value_shift + cl_value_len == cl_pointer_size. { return cl_I_from_word(x.word - cl_combine(0,1)); } } // die sichere Methode { CL_ALLOCA_STACK; var uintD* MSDptr; var uintC len; var uintD* LSDptr; I_to_NDS_1(x, MSDptr=,len=,LSDptr=); // NDS zu x bilden. DS_minus1_plus(LSDptr,len); // von der NDS 1 subtrahieren return DS_to_I(MSDptr,len); // wieder zum Integer machen } } } // namespace cln cln-1.3.3/src/integer/elem/cl_I_compare.cc0000644000000000000000000000674311201634740015221 0ustar // compare(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { cl_signean compare (const cl_I& x, const cl_I& y) { // Methode: // x und y haben verschiedenes Vorzeichen -> // x < 0 -> x < y // x >= 0 -> x > y // x und y haben gleiches Vorzeichen -> // x Fixnum -> // y Fixnum -> direkt vergleichen. // y Bignum -> // y > 0 -> x < y // y < 0 -> x > y // x Bignum -> // y Fixnum -> // x < 0 -> x < y // x > 0 -> x > y // y Bignum -> // falls beide gleich lang -> wortweise vergleichen // x kürzer als y -> bei x,y > 0 : x < y, bei x,y < 0 : x > y // y kürzer als x -> bei x,y > 0 : x > y, bei x,y > 0 : x < y var uintC xlen; var uintC ylen; if (fixnump(x)) // x Fixnum if (fixnump(y)) // x Fixnum, y Fixnum { // This assumes cl_value_shift + cl_value_len == cl_pointer_size. if ((cl_sint)x.word == (cl_sint)y.word) return signean_null; else if ((cl_sint)x.word > (cl_sint)y.word) return signean_plus; else return signean_minus; } else // x Fixnum, y Bignum if ((sintD)mspref(BN_MSDptr(y),0) >= 0) // x Fixnum, y Bignum >0 return signean_minus; // xy else // x Bignum if (fixnump(y)) // x Bignum, y Fixnum if ((sintD)mspref(BN_MSDptr(x),0) >= 0) // x Bignum >0, y Fixnum return signean_plus; // x>y else // x Bignum <0, y Fixnum return signean_minus; // x= 0) // x Bignum >0, y Bignum if ((sintD)mspref(BN_MSDptr(y),0) >= 0) // x und y Bignums >0 if (x.pointer == y.pointer) return signean_null; // gleiche Pointer -> selbe Zahl else { xlen = TheBignum(x)->length; ylen = TheBignum(y)->length; if (xlen==ylen) samelength: // gleiche Länge -> digitweise vergleichen return compare_loop_msp(BN_MSDptr(x),BN_MSDptr(y),xlen); else return (xlen > ylen ? signean_plus : signean_minus); } else // x Bignum >0, y Bignum <0 return signean_plus; // x>y else // x Bignum <0, y Bignum if ((sintD)mspref(BN_MSDptr(y),0) >= 0) // x Bignum <0, y Bignum >0 return signean_minus; // x selbe Zahl else { xlen = TheBignum(x)->length; ylen = TheBignum(y)->length; if (xlen==ylen) // gleiche Länge -> wortweise vergleichen goto samelength; // wie oben else return (xlen > ylen ? signean_minus : signean_plus); } } } // namespace cln cln-1.3.3/src/integer/elem/cl_I_plus1.cc0000644000000000000000000000155611201634740014634 0ustar // plus1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_I plus1 (const cl_I& x) { if (fixnump(x)) { // x ist Fixnum if (x.word != cl_combine(cl_FN_tag,bit(cl_value_len-1)-1)) // bleibt Fixnum: direkt 1 addieren // This assumes cl_value_shift + cl_value_len == cl_pointer_size. { return cl_I_from_word(x.word + cl_combine(0,1)); } } // die sichere Methode { CL_ALLOCA_STACK; var uintD* MSDptr; var uintC len; var uintD* LSDptr; I_to_NDS_1(x, MSDptr=,len=,LSDptr=); // NDS zu x bilden. DS_1_plus(LSDptr,len); // zur NDS 1 addieren return DS_to_I(MSDptr,len); // wieder zum Integer machen } } } // namespace cln cln-1.3.3/src/integer/elem/cl_I_plus.cc0000644000000000000000000002154011201634740014546 0ustar // binary operator + // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_I operator+ (const cl_I& x, const cl_I& y) { // Methode: // x Fixnum -> // y Fixnum -> beide direkt addieren, mit L_to_I beenden // y Bignum -> falls x=0, y; sonst beide zu DS machen, addieren. // x Bignum -> // y Fixnum -> falls y=0, x; sonst beide zu DS machen, addieren. // y Bignum -> beide zu DS machen, addieren. var uintD* MSDptr; var uintC len; var uintD* LSDptr; // MSDptr/len/LSDptr bilden die DS des Ergebnisses. if (fixnump(x)) { // x ist Fixnum if (fixnump(y)) { // x,y sind Fixnums #if (cl_value_len < intVsize) return V_to_I( FN_to_V(x) + FN_to_V(y) ); // als intVsize-Bit-Zahlen addieren #elif (cl_word_size==64) return Q_to_I( FN_to_Q(x) + FN_to_Q(y) ); // als 64-Bit-Zahlen addieren #elif (intVsize==32) // && (cl_value_len == intVsize) var sint32 xhi = sign_of(FN_to_V(x)); var uint32 xlo = FN_to_V(x); var sint32 yhi = sign_of(FN_to_V(y)); var uint32 ylo = FN_to_V(y); xhi += yhi; xlo += ylo; if (xlo < ylo) { xhi += 1; } return L2_to_I(xhi,xlo); #endif } else { // x ist Fixnum, y ist Bignum, also y länger #if (intDsize==64) var sint64 x_ = FN_to_V(x); // Wert von x #else var sintV x_ = FN_to_V(x); // Wert von x #endif if (FN_V_zerop(x,x_)) { return y; } // bei x=0 Ergebnis y CL_ALLOCA_STACK; BN_to_NDS_1(y, MSDptr=,len=,LSDptr=); // NDS zu y bilden. // len>=bn_minlength. len>pFN_maxlength erzwingen: if ((bn_minlength==pFN_maxlength) && (len==pFN_maxlength)) { var sintD sign = sign_of_sintD(mspref(MSDptr,0)); lsprefnext(MSDptr) = sign; len++; } // x_ zu den oberen pFN_maxlength Digits von y addieren: { #if (intDsize==64) var uint64 y_ = lspref(LSDptr,0); var uint64 y_new = y_+(uint64)x_; lspref(LSDptr,0) = y_new; #else var uintV y_ = pFN_maxlength_digits_at(LSDptr); var uintV y_new = y_+(uintV)x_; set_pFN_maxlength_digits_at(LSDptr,y_new); #endif var uintD* midptr = LSDptr lspop pFN_maxlength; if (y_new < y_) { // Carry. if (!FN_V_minusp(x,x_)) // kürzerer Summand war positiv // Dann ist ein positiver Übertrag weiterzutragen // (Beispiel: 0002FFFC + 0007 = 00030003) { DS_1_plus(midptr,len-pFN_maxlength); } } else { // Kein Carry. if (FN_V_minusp(x,x_)) // kürzerer Summand war negativ // Dann ist ein negativer Übertrag weiterzutragen // (Beispiel: 00020003 + FFF5 = 0001FFF8) { DS_minus1_plus(midptr,len-pFN_maxlength); } } } return DS_to_I(MSDptr,len); // DS wieder zum Integer machen } } else { // x ist Bignum if (fixnump(y)) { // x ist Bignum, y ist Fixnum, also x länger #if (intDsize==64) var sint64 y_ = FN_to_V(y); // Wert von y #else var sintV y_ = FN_to_V(y); // Wert von y #endif if (FN_V_zerop(y,y_)) { return x; } // bei y=0 Ergebnis x CL_ALLOCA_STACK; BN_to_NDS_1(x, MSDptr=,len=,LSDptr=); // NDS zu x bilden. // len>=bn_minlength. len>pFN_maxlength erzwingen: if ((bn_minlength==pFN_maxlength) && (len==pFN_maxlength)) { var sintD sign = sign_of_sintD(mspref(MSDptr,0)); lsprefnext(MSDptr) = sign; len++; } // y_ zu den oberen pFN_maxlength Digits von x addieren: { #if (intDsize==64) var uint64 x_ = lspref(LSDptr,0); var uint64 x_new = x_+(uint64)y_; lspref(LSDptr,0) = x_new; #else var uintV x_ = pFN_maxlength_digits_at(LSDptr); var uintV x_new = x_+(uintV)y_; set_pFN_maxlength_digits_at(LSDptr,x_new); #endif var uintD* midptr = LSDptr lspop pFN_maxlength; if (x_new < x_) { // Carry. if (!FN_V_minusp(y,y_)) // kürzerer Summand war positiv // Dann ist ein positiver Übertrag weiterzutragen // (Beispiel: 0002FFFC + 0007 = 00030003) { DS_1_plus(midptr,len-pFN_maxlength); } } else { // Kein Carry. if (FN_V_minusp(y,y_)) // kürzerer Summand war negativ // Dann ist ein negativer Übertrag weiterzutragen // (Beispiel: 00020003 + FFF5 = 0001FFF8) { DS_minus1_plus(midptr,len-pFN_maxlength); } } } return DS_to_I(MSDptr,len); // DS wieder zum Integer machen } else { // x und y sind Bignums CL_ALLOCA_STACK; if (TheBignum(x)->length > TheBignum(y)->length) { // x das längere von beiden. BN_to_NDS_1(x, MSDptr=,len=,LSDptr=); // NDS zu x bilden. var const uintD* yMSDptr; var uintC ylen; var const uintD* yLSDptr; BN_to_NDS_nocopy(y, yMSDptr=,ylen=,yLSDptr=); // NDS zu y bilden. // yMSDptr/ylen/yLSDptr bilden die DS des kürzeren Arguments y. // Es ist len>ylen. // addieren: { var uintD* midptr = LSDptr lspop ylen; var uintD carry = addto_loop_lsp(yLSDptr,LSDptr,ylen); if (carry) { // Carry. if ((sintD)mspref(yMSDptr,0) >=0) // kürzerer Summand war positiv // Dann ist ein positiver Übertrag weiterzutragen // (Beispiel: 0002FFFC + 0007 = 00030003) { DS_1_plus(midptr,len-ylen); } } else { // Kein Carry. if ((sintD)mspref(yMSDptr,0) <0) // kürzerer Summand war negativ // Dann ist ein negativer Übertrag weiterzutragen // (Beispiel: 00020003 + FFF5 = 0001FFF8) { DS_minus1_plus(midptr,len-ylen); } } } return DS_to_I(MSDptr,len); // DS wieder zum Integer machen } else { // y das längere von beiden. BN_to_NDS_1(y, MSDptr=,len=,LSDptr=); // NDS zu y bilden. var const uintD* xMSDptr; var uintC xlen; var const uintD* xLSDptr; BN_to_NDS_nocopy(x, xMSDptr=,xlen=,xLSDptr=); // NDS zu x bilden. // xMSDptr/xlen/xLSDptr bilden die DS des kürzeren Arguments x. // len>xlen erzwingen: if (len==xlen) { var sintD sign = sign_of_sintD(mspref(MSDptr,0)); lsprefnext(MSDptr) = sign; len++; } // addieren: { var uintD* midptr = LSDptr lspop xlen; var uintD carry = addto_loop_lsp(xLSDptr,LSDptr,xlen); if (carry) { // Carry. if ((sintD)mspref(xMSDptr,0) >=0) // kürzerer Summand war positiv // Dann ist ein positiver Übertrag weiterzutragen // (Beispiel: 0002FFFC + 0007 = 00030003) { DS_1_plus(midptr,len-xlen); } } else { // Kein Carry. if ((sintD)mspref(xMSDptr,0) <0) // kürzerer Summand war negativ // Dann ist ein negativer Übertrag weiterzutragen // (Beispiel: 00020003 + FFF5 = 0001FFF8) { DS_minus1_plus(midptr,len-xlen); } } } return DS_to_I(MSDptr,len); // DS wieder zum Integer machen } } } } } // namespace cln cln-1.3.3/src/integer/elem/cl_I_minusp.cc0000644000000000000000000000044711201634740015101 0ustar // minusp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #define minusp inline_minusp #include "integer/cl_I.h" #undef minusp namespace cln { bool minusp (const cl_I& x) { return inline_minusp(x); } } // namespace cln cln-1.3.3/src/integer/elem/cl_I_plusp.cc0000644000000000000000000000070711201634740014730 0ustar // plusp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #define minusp inline_minusp #define zerop inline_zerop #include "integer/cl_I.h" #undef zerop #undef minusp namespace cln { bool plusp (const cl_I& x) { if (inline_minusp(x)) return false; // x<0 -> nein elif (inline_zerop(x)) return false; // x=0 -> nein else return true; // sonst ist x>0. } } // namespace cln cln-1.3.3/src/integer/elem/cl_I_div.cc0000644000000000000000000001004611201634740014344 0ustar // cl_divide(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/cl_I.h" // Implementation. #include "cln/exception.h" namespace cln { // Dividiert zwei Integers x,y >=0 und liefert Quotient und Rest // der Division x/y. Bei y=0 Error. // cl_divide(x,y) // > x,y: Integers >=0 // < q,r: Quotient q, Rest r const cl_I_div_t cl_divide (const cl_I& x, const cl_I& y) { if (fixnump(x)) // x Fixnum >=0 { if (fixnump(y)) // auch y Fixnum >=0 { var uintV x_ = FN_to_UV(x); var uintV y_ = FN_to_UV(y); if (y_==0) { throw division_by_0_exception(); } elif (x_ < y_) // Trivialfall: q=0, r=x goto trivial; else { #if (intVsize>32) if (x_ >= bit(32)) { if (y_ < bit(32)) // 64-durch-32-Bit-Division { var uint64 q; var uint32 r; divu_6432_6432(x_,y_,q=,r=); return cl_I_div_t( /* result.quotient = */ UQ_to_I(q), /* result.remainder = */ UL_to_I(r) ); } else // volle 64-durch-64-Bit-Division { var uint64 q; var uint64 r; divu_6464_6464(x_,y_,q=,r=); return cl_I_div_t( /* result.quotient = */ UQ_to_I(q), /* result.remainder = */ UQ_to_I(r) ); } } else #endif { if (y_ < bit(16)) // 32-durch-16-Bit-Division { var uint32 q; var uint16 r; divu_3216_3216(x_,y_,q=,r=); return cl_I_div_t( /* result.quotient = */ UL_to_I(q), /* result.remainder = */ L_to_FN((uintL)r) ); } else // volle 32-durch-32-Bit-Division { var uint32 q; var uint32 r; divu_3232_3232(x_,y_,q=,r=); return cl_I_div_t( /* result.quotient = */ UL_to_I(q), /* result.remainder = */ UL_to_I(r) ); } } } } else // y Bignum >0 { trivial: // Trivialfall: q=0, r=x return cl_I_div_t( /* result.quotient = */ 0, /* result.remainder = */ x ); } } else // x Bignum -> allgemeine Division: { CL_ALLOCA_STACK; var const uintD* x_MSDptr; var uintC x_len; var const uintD* x_LSDptr; var const uintD* y_MSDptr; var uintC y_len; var const uintD* y_LSDptr; // x in NDS umwandeln, als UDS auffassen: BN_to_NDS_nocopy(x, x_MSDptr=,x_len=,x_LSDptr=); // y in NDS umwandeln, als UDS auffassen: I_to_NDS_nocopy(y, y_MSDptr=,y_len=,y_LSDptr=,/*true*/false,); // dividieren: {var DS q; var DS r; UDS_divide(x_MSDptr,x_len,x_LSDptr,y_MSDptr,y_len,y_LSDptr, &q,&r); // q in Integer umwandeln: var cl_I quotient = NUDS_to_I(q.MSDptr,q.len); // r in Integer umwandeln (jetzt erst, nachdem q verwertet ist!): return cl_I_div_t( quotient, /* result.remainder = */ NUDS_to_I(r.MSDptr,r.len) ); }} } // Bit complexity (N = length(x)): O(M(N)). } // namespace cln cln-1.3.3/src/integer/elem/cl_I_zerop.cc0000644000000000000000000000044111201634740014717 0ustar // zerop(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #define zerop inline_zerop #include "integer/cl_I.h" #undef zerop namespace cln { bool zerop (const cl_I& x) { return inline_zerop(x); } } // namespace cln cln-1.3.3/src/integer/elem/cl_I_square.cc0000644000000000000000000000330511201634740015062 0ustar // square(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "base/cl_low.h" namespace cln { const cl_I square (const cl_I& x) { // Methode: // x Fixnum -> direkt multiplizieren // sonst: zu DS machen, multiplizieren. if (fixnump(x)) { var sintV x_ = FN_to_V(x); #if (cl_value_len > 32) // nur falls x ein Integer mit höchstens 32 Bit ist: if ((uintV)((sintV)sign_of(x_) ^ x_) < bit(31)) #endif { // Werte direkt multiplizieren: var uint32 hi; var uint32 lo; mulu32((uint32)x_,(uint32)x_,hi=,lo=); // erst unsigned multiplizieren if (x_ < 0) { hi -= 2*(uint32)x_; } // dann Korrektur für Vorzeichen return L2_to_I(hi,lo); } } CL_ALLOCA_STACK; var const uintD* xMSDptr; var uintC xlen; var const uintD* xLSDptr; I_to_NDS_nocopy(x, xMSDptr = , xlen = , xLSDptr = , false,); var uintD* ergMSDptr; var uintC erglen = 2*xlen; var uintD* ergLSDptr; num_stack_alloc(erglen,ergMSDptr=,ergLSDptr=); var uintC len = xlen; var uintD MSD = mspref(xMSDptr,0); if (MSD==0) { mspref(ergMSDptr,0) = 0; mspref(ergMSDptr,1) = 0; len--; } cl_UDS_mul_square(xLSDptr,len,ergLSDptr); if ((sintD)MSD < 0) { subfrom_loop_lsp(xLSDptr,ergLSDptr lspop xlen,xlen); subfrom_loop_lsp(xLSDptr,ergLSDptr lspop xlen,xlen); } return DS_to_I(ergMSDptr,erglen); } // Bit complexity (x of length N): O(M(N)). } // namespace cln cln-1.3.3/src/integer/gcd/0000755000000000000000000000000012173046200012134 5ustar cln-1.3.3/src/integer/gcd/cl_I_gcd_aux2.cc0000644000000000000000000002600711201634740015075 0ustar // partial_gcd(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/cl_I.h" // Implementation. #include "cln/integer.h" #include "base/digit/cl_D.h" namespace cln { // Dasselbe wie partial_gcd(z1,z2,erg), nur daß z1 und z2 Doppelworte sind. // Bevor im Ergebnis erg ein Überlauf eintritt, wird abgebrochen. #if HAVE_DD static inline uintDD muluDD_unchecked(uintD q, uintDD a) { return muluD(q,lowD(a)) + highlowDD_0(muluD_unchecked(q,highD(a))); } // Division: liefert min(floor(x / y), 2^intDsize-1). // Vorausgesetzt wird, daß x >= 2 * y > 0. static uintD floorDD (uintDD x, uintDD y) { // vgl. Algorithmus für divu_3232_3232(). var uintD q; if (y < ((uintDD)1 << intDsize)) { if (highD(x) >= y) q = ~(uintD)0; // instead of overflow else divuD(x, (uintD)y, q =, ); return q; } { var uintC shift; integerlengthD(highD(y), shift=); // NB: 0 < shift < intDsize since 2^intDsize <= y < 2^(2*intDsize-1). // Determine q := floor((x>>shift) / ((y>>shift)+1)). var uintD y_shifted = y >> shift; y_shifted += 1; if (y_shifted == 0) q = highD(x) >> shift; else divuD(highD(x) >> shift, y_shifted, q =, ); } // May need to increment q at most twice. { var uintDD p = muluDD_unchecked(q,y); #ifdef DEBUG_GCD if (x < p) throw runtime_exception(); #endif x -= p; } if (x >= y) { q += 1; x -= y; if (x >= y) { q += 1; #ifdef DEBUG_GCD x -= y; if (x >= y) throw runtime_exception(); #endif } } return q; } void partial_gcd (uintDD z1, uintDD z2, partial_gcd_result* erg) { var uintD x1 = 1; var uintD y1 = 0; var uintD x2 = 0; var uintD y2 = 1; for (;;) { // Hier ist z1-y1>=z2+y2. // Bestimme q := floor((z1-y1)/(z2+y2)) >= 1 : { var uintDD zaehler = z1 - (uintDD)y1; var uintDD nenner = z2 + (uintDD)y2; // z2+y2 <= z1-y1 < beta^2 ! if (x2 > (~x1) >> 3) // x1 + 8*x2 >= beta ? goto do_subtract_1; if (y2 > (~y1) >> 3) // y1 + 8*y2 >= beta ? goto do_subtract_1; // Ist floor(zaehler,8) >= nenner ? Wenn nein -> do_subtract_1. if ((zaehler >> 3) < nenner) goto do_subtract_1; if (1) { var uintD q = floorDD(zaehler,nenner); repeat_1: var uintDD qx = muluD(q,x2); if (qx > (uintDD)(~x1)) { // Choose a smaller value for q, to avoid overflow of x1. q = floorD(~x1,x2); goto repeat_1; } var uintDD qy = muluD(q,y2); if (qy > (uintDD)(~y1)) { // Choose a smaller value for q, to avoid overflow of y1. q = floorD(~y1,y2); goto repeat_1; } x1 += (uintD)qx; y1 += (uintD)qy; z1 -= muluDD_unchecked(q,z2); } else { do_subtract_1: do { // Checks to avoid overflow. if (x2 > ~x1) goto done; if (y2 > ~y1) goto done; #ifdef DEBUG_GCD if (z1 < z2) throw runtime_exception(); #endif // Now really subtract. x1 += x2; y1 += y2; z1 -= z2; } while (z1 - (uintDD)y1 >= nenner); } } if (z2 - (uintDD)x2 <= z1 + (uintDD)(x1-1)) goto done; // Hier ist z2-x2>=z1+x1. // Bestimme q := floor((z2-x2)/(z1+x1)) >= 1 : { var uintDD zaehler = z2 - (uintDD)x2; var uintDD nenner = z1 + (uintDD)x1; // z1+x1 <= z2-x2 < beta^2 ! if (x1 > (~x2) >> 3) // x2 + 8*x1 >= beta ? goto do_subtract_2; if (y1 > (~y2) >> 3) // y2 + 8*y1 >= beta ? goto do_subtract_2; // Ist floor(zaehler,8) >= nenner ? Wenn nein -> do_subtract_2. if ((zaehler >> 3) < nenner) goto do_subtract_2; if (1) { var uintD q = floorDD(zaehler,nenner); repeat_2: var uintDD qx = muluD(q,x1); if (qx > (uintDD)(~x2)) { // Choose a smaller value for q, to avoid overflow of x2. q = floorD(~x2,x1); goto repeat_2; } var uintDD qy = muluD(q,y1); if (qy > (uintDD)(~y2)) { // Choose a smaller value for q, to avoid overflow of y2. q = floorD(~y2,y1); goto repeat_2; } x2 += (uintD)qx; y2 += (uintD)qy; z2 -= muluDD_unchecked(q,z1); } else { do_subtract_2: do { // Checks to avoid overflow. if (x1 > ~x2) goto done; if (y1 > ~y2) goto done; #ifdef DEBUG_GCD if (z2 < z1) throw runtime_exception(); #endif // Now really subtract. x2 += x1; y2 += y1; z2 -= z1; } while (z2 - (uintDD)x2 >= nenner); } } if (z1 - (uintDD)y1 <= z2 + (uintDD)(y2-1)) goto done; } done: // Keine Subtraktion (ohne Überlauf) mehr möglich. erg->x1 = x1; erg->y1 = y1; erg->x2 = x2; erg->y2 = y2; // Ergebnis } #else // Division: liefert min(floor(xhi|xlo / yhi|ylo), 2^intDsize-1). // Vorausgesetzt wird, daß xhi|xlo >= 2 * yhi|ylo > 0. static uintD floorDD (uintD xhi, uintD xlo, uintD yhi, uintD ylo) { // vgl. Algorithmus für divu_3232_3232(). var uintD q; if (yhi == 0) { if (xhi >= ylo) q = ~(uintD)0; // instead of overflow else divuD(xhi,xlo, ylo, q =, ); return q; } { var uintC shift; integerlengthD(yhi, shift=); // NB: 0 < shift < intDsize since 2^intDsize <= y < 2^(2*intDsize-1). // Determine q := floor((x>>shift) / ((y>>shift)+1)). var uintD y_shifted = (uintD)(yhi << (intDsize-shift)) | (ylo >> shift); y_shifted += 1; if (y_shifted == 0) q = xhi >> shift; else divuD(xhi >> shift, (uintD)(xhi << (intDsize-shift)) | (xlo >> shift), y_shifted, q =, ); } // May need to increment q at most twice. { var uintD phi; var uintD plo; muluD(q,ylo, phi =, plo =); muluD(q,yhi, , phi +=); #ifdef DEBUG_GCD if ((xhi < phi) || ((xhi == phi) && (xlo < plo))) throw runtime_exception(); #endif xhi = xhi - phi; if (xlo < plo) xhi -= 1; xlo = xlo - plo; } if ((xhi > yhi) || ((xhi == yhi) && (xlo >= ylo))) { q += 1; xhi = xhi - yhi; if (xlo < ylo) xhi -= 1; xlo = xlo - ylo; if ((xhi > yhi) || ((xhi == yhi) && (xlo >= ylo))) { q += 1; #ifdef DEBUG_GCD xhi = xhi - yhi; if (xlo < ylo) xhi -= 1; xlo = xlo - ylo; if ((xhi > yhi) || ((xhi == yhi) && (xlo >= ylo))) throw runtime_exception(); #endif } } return q; } void partial_gcd (uintD z1hi, uintD z1lo, uintD z2hi, uintD z2lo, partial_gcd_result* erg) { var uintD x1 = 1; var uintD y1 = 0; var uintD x2 = 0; var uintD y2 = 1; for (;;) { // Hier ist z1-y1>=z2+y2. // Bestimme q := floor((z1-y1)/(z2+y2)) >= 1 : { var uintD zaehlerhi = z1hi; var uintD zaehlerlo = z1lo - y1; if (zaehlerlo > z1lo) { zaehlerhi--; } var uintD nennerhi = z2hi; var uintD nennerlo = z2lo + y2; if (nennerlo < z2lo) { nennerhi++; } // z2+y2 <= z1-y1 < beta^2 ! if (x2 > (~x1) >> 3) // x1 + 8*x2 >= beta ? goto do_subtract_1; if (y2 > (~y1) >> 3) // y1 + 8*y2 >= beta ? goto do_subtract_1; // Ist floor(zaehler,8) >= nenner ? Wenn nein -> do_subtract_1. if ((zaehlerhi >> 3) < nennerhi) goto do_subtract_1; if ((zaehlerhi >> 3) == nennerhi) if (((uintD)(zaehlerhi << (intDsize-3)) | (zaehlerlo >> 3)) < nennerlo) goto do_subtract_1; if (1) { var uintD q = floorDD(zaehlerhi,zaehlerlo,nennerhi,nennerlo); repeat_1: var uintD qx; var uintD qy; { var uintD qxhi; muluD(q,x2, qxhi =, qx =); if ((qxhi > 0) || (qx > ~x1)) { // Choose a smaller value for q, to avoid overflow of x1. q = floorD(~x1,x2); goto repeat_1; } } { var uintD qyhi; muluD(q,y2, qyhi =, qy =); if ((qyhi > 0) || (qy > ~y1)) { // Choose a smaller value for q, to avoid overflow of y1. q = floorD(~y1,y2); goto repeat_1; } } x1 += qx; y1 += qy; { var uintD qzhi; var uintD qzlo; muluD(q,z2lo, qzhi =, qzlo =); muluD(q,z2hi, , qzhi +=); z1hi -= qzhi; if (z1lo < qzlo) z1hi -= 1; z1lo -= qzlo; } } else { do_subtract_1: for (;;) { // Checks to avoid overflow. if (x2 > ~x1) goto done; if (y2 > ~y1) goto done; #ifdef DEBUG_GCD if (z1hi < z2hi) throw runtime_exception(); if (z1hi == z2hi) if (z1lo < z2lo) throw runtime_exception(); #endif // Now really subtract. x1 += x2; y1 += y2; z1hi -= z2hi; if (z1lo < z2lo) z1hi -= 1; z1lo -= z2lo; var uintD z1dec_hi = z1hi; var uintD z1dec_lo = z1lo - y1; if (z1lo < y1) z1dec_hi -= 1; if (z1dec_hi < nennerhi) break; if (z1dec_hi == nennerhi) if (z1dec_lo < nennerlo) break; } } } { var uintD z1inc_hi = z1hi; var uintD z1inc_lo = z1lo + x1-1; if (z1inc_lo < z1lo) z1inc_hi += 1; var uintD z2dec_hi = z2hi; var uintD z2dec_lo = z2lo - x2; if (z2dec_lo > z2lo) z2dec_hi -= 1; if (z2dec_hi < z1inc_hi) goto done; if (z2dec_hi == z1inc_hi) if (z2dec_lo <= z1inc_lo) goto done; } // Hier ist z2-x2>=z1+x1. // Bestimme q := floor((z2-x2)/(z1+x1)) >= 1 : { var uintD zaehlerhi = z2hi; var uintD zaehlerlo = z2lo - x2; if (zaehlerlo > z2lo) { zaehlerhi--; } var uintD nennerhi = z1hi; var uintD nennerlo = z1lo + x1; if (nennerlo < z1lo) { nennerhi++; } // z1+x1 <= z2-x2 < beta^2 ! if (x1 > (~x2) >> 3) // x2 + 8*x1 >= beta ? goto do_subtract_2; if (y1 > (~y2) >> 3) // y2 + 8*y1 >= beta ? goto do_subtract_2; // Ist floor(zaehler,8) >= nenner ? Wenn nein -> do_subtract_2. if ((zaehlerhi >> 3) < nennerhi) goto do_subtract_2; if ((zaehlerhi >> 3) == nennerhi) if (((uintD)(zaehlerhi << (intDsize-3)) | (zaehlerlo >> 3)) < nennerlo) goto do_subtract_2; if (1) { var uintD q = floorDD(zaehlerhi,zaehlerlo,nennerhi,nennerlo); repeat_2: var uintD qx; var uintD qy; { var uintD qxhi; muluD(q,x1, qxhi =, qx =); if ((qxhi > 0) || (qx > ~x2)) { // Choose a smaller value for q, to avoid overflow of x2. q = floorD(~x2,x1); goto repeat_2; } } { var uintD qyhi; muluD(q,y1, qyhi =, qy =); if ((qyhi > 0) || (qy > ~y2)) { // Choose a smaller value for q, to avoid overflow of y2. q = floorD(~y2,y1); goto repeat_2; } } x2 += qx; y2 += qy; { var uintD qzhi; var uintD qzlo; muluD(q,z1lo, qzhi =, qzlo =); muluD(q,z1hi, , qzhi +=); z2hi -= qzhi; if (z2lo < qzlo) z2hi -= 1; z2lo -= qzlo; } } else { do_subtract_2: for (;;) { // Checks to avoid overflow. if (x1 > ~x2) goto done; if (y1 > ~y2) goto done; #ifdef DEBUG_GCD if (z2hi < z1hi) throw runtime_exception(); if (z2hi == z1hi) if (z2lo < z1lo) throw runtime_exception(); #endif // Now really subtract. x2 += x1; y2 += y1; z2hi -= z1hi; if (z2lo < z1lo) z2hi -= 1; z2lo -= z1lo; var uintD z2dec_hi = z2hi; var uintD z2dec_lo = z2lo - x2; if (z2lo < x2) z2dec_hi -= 1; if (z2dec_hi < nennerhi) break; if (z2dec_hi == nennerhi) if (z2dec_lo < nennerlo) break; } } } { var uintD z2inc_hi = z2hi; var uintD z2inc_lo = z2lo + y2-1; if (z2inc_lo < z2lo) z2inc_hi += 1; var uintD z1dec_hi = z1hi; var uintD z1dec_lo = z1lo - y1; if (z1dec_lo > z1lo) z1dec_hi -= 1; if (z1dec_hi < z2inc_hi) goto done; if (z1dec_hi == z2inc_hi) if (z1dec_lo <= z2inc_lo) goto done; } } done: // Keine Subtraktion (ohne Überlauf) mehr möglich. erg->x1 = x1; erg->y1 = y1; erg->x2 = x2; erg->y2 = y2; // Ergebnis } #endif } // namespace cln cln-1.3.3/src/integer/gcd/cl_I_gcd.cc0000644000000000000000000005542411201634740014143 0ustar // gcd(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "base/digit/cl_D.h" #include "base/cl_xmacros.h" namespace cln { #define GCD_ALGO 3 // 1: binär, 2: Schulmethode, 3: Lehmer #if (GCD_ALGO == 1) // binäre Methode: // (gcd a b) :== // b=0 --> (abs a) // a=0 --> (abs b) // sonst: // (abs a) und (abs b) in zwei Buffer packen, als Unsigned Digit Sequences. // [Schreibe oBdA wieder a,b] // (prog ((j 0)) // 1 {a,b >0} // (if (evenp a) // (if (evenp b) // (progn (incf j) (setq a (/ a 2)) (setq b (/ b 2)) (go 1)) // (go 4) // ) // (while (evenp b) (setq b (/ b 2))) // ) // 2 {a,b >0, beide ungerade} // (cond ((> a b)) // ((= a b) (go 5)) // ((< a b) (rotatef a b)) // ) // 3 {a,b >0, beide ungerade, a>b} // (setq a (- a b)) // 4 {a,b >0, a gerade, b ungerade} // (repeat (setq a (/ a 2)) (until (oddp a))) // (go 2) // 5 {a=b>0} // (return (ash a j)) // ) // weil es oft auftritt (insbesondere bei GCD's mehrerer Zahlen): // a=1 oder b=1 --> 1 const cl_I gcd (const cl_I& a, const cl_I& b) { if (eq(a,1)) { return 1; } // a=1 -> 1 if (eq(b,1)) { return 1; } // b=1 -> 1 if (eq(b,0)) { return abs(a); } // b=0 -> (abs a) if (eq(a,0)) { return abs(b); } // a=0 -> (abs b) CL_ALLOCA_STACK; var uintD* a_MSDptr; var uintC a_len; var uintD* a_LSDptr; var uintD* b_MSDptr; var uintC b_len; var uintD* b_LSDptr; // Macro: erzeugt die NUDS zu (abs x), erniedrigt num_stack #define I_abs_to_NUDS(x) \ I_to_NDS_1(x, x##_MSDptr = , x##_len = , x##_LSDptr = ); /* (nichtleere) NDS holen */\ if ((sintD)mspref(x##_MSDptr,0) < 0) /* falls <0, negieren: */\ { neg_loop_lsp(x##_LSDptr,x##_len); } \ if (mspref(x##_MSDptr,0) == 0) /* normalisieren (max. 1 Nulldigit entfernen) */\ { msshrink(x##_MSDptr); x##_len--; } I_abs_to_NUDS(a); // (abs a) als NUDS erzeugen I_abs_to_NUDS(b); // (abs b) als NUDS erzeugen // Jetzt ist a = a_MSDptr/a_len/a_LSDptr, b = b_MSDptr/b_len/b_LSDptr, // beides NUDS, und a_len>0, b_len>0. // Macro: Halbiere x. #define halb(x) \ { shift1right_loop_msp(x##_MSDptr,x##_len,0); /* um 1 Bit rechts schieben */ \ if (mspref(x##_MSDptr,0) == 0) { msshrink(x##_MSDptr); x##_len--; } /* normalisieren */\ } // Macro: Ob x gerade ist. #define evenp(x) \ ((lspref(x##_LSDptr,0) & bit(0)) ==0) { var uintL j = 0; label_1: // a,b >0 if (evenp(a)) { if (evenp(b)) { j++; halb(a); halb(b); goto label_1; } else goto label_4; } while (evenp(b)) { halb(b); } label_2: // a,b >0, beide ungerade // Vergleiche a und b: if (a_len > b_len) goto label_3; // a>b ? if (a_len == b_len) { var cl_signean vergleich = compare_loop_msp(a_MSDptr,b_MSDptr,a_len); if (vergleich > 0) goto label_3; // a>b ? if (vergleich == 0) goto label_5; // a=b ? } // a a,b vertauschen: swap(uintD*, a_MSDptr,b_MSDptr); swap(uintC, a_len,b_len); swap(uintD*, a_LSDptr,b_LSDptr); label_3: // a,b >0, beide ungerade, a>b // subtrahiere a := a - b if (!( subfrom_loop_lsp(b_LSDptr,a_LSDptr,b_len) ==0)) { dec_loop_lsp(a_LSDptr lspop b_len,a_len-b_len); } while (mspref(a_MSDptr,0) == 0) { msshrink(a_MSDptr); a_len--; } // normalisieren label_4: // a,b >0, a gerade, b ungerade do { halb(a); } while (evenp(a)); goto label_2; label_5: // a=b>0 // a zu einer NDS machen: return ash(NUDS_to_I(a_MSDptr,a_len),j); // ggT der ungeraden Anteile als Integer, mal 2^j } #undef evenp #undef halb #undef I_abs_to_NUDS } #endif /* GCD_ALGO == 1 */ #if (GCD_ALGO == 2) // Schulmethode: // (gcd a b) :== // [a:=(abs a), b:=(abs b), while b>0 do (a,b) := (b,(mod a b)), -> a] // verbessert: // a=0 -> (abs b) // b=0 -> (abs a) // a=1 -> 1 // b=1 -> 1 // a:=(abs a), b:=(abs b) // Falls a=b: return a; falls ab>0} // Falls b=1, return 1. {spart eine Division durch 1} // Sonst dividieren (divide a b), a:=b, b:=Rest. // Falls b=0, return a, sonst goto (*). const cl_I gcd (const cl_I& a, const cl_I& b) { if (eq(a,1)) { return 1; } // a=1 -> 1 if (eq(b,1)) { return 1; } // b=1 -> 1 if (eq(b,0)) { return abs(a); } // b=0 -> (abs a) if (eq(a,0)) { return abs(b); } // a=0 -> (abs b) // Beträge nehmen: {var cl_I abs_a = abs(a); var cl_I abs_b = abs(b); var cl_I& a = abs_a; var cl_I& b = abs_b; if (fixnump(a) && fixnump(b)) // ggT zweier Fixnums >0 { // bleibt Fixnum, da (gcd a b) <= (min a b) return V_to_FN(gcd(FN_to_UV(a),FN_to_UV(b))); } { var cl_signean vergleich = compare(a,b); if (vergleich == 0) { return a; } // a=b -> fertig if (vergleich < 0) { var cl_I tmp = a; a = b; b = a; } // a a,b vertauschen } loop // Hier a > b > 0 { if (eq(b,1)) { return 1; } // b=1 -> Ergebnis 1 { var cl_I_div_t div = cl_divide(a,b); a = b; b = div.remainder; } if (eq(b,0)) { return a; } } }} #endif /* GCD_ALGO == 2 */ #if (GCD_ALGO == 3) // Lehmer-Methode: // vgl. [ D. E. Knuth: The Art of Computer Programming, Vol. 2: Seminumerical // Algorithms, Sect. 4.5.2., Algorithm L ] // und [ Collins, Loos: SAC-2, Algorithms IGCD, DPCC ]. // (gcd a b) :== // a=0 -> (abs b) // b=0 -> (abs a) // a=1 -> 1 // b=1 -> 1 // a:=(abs a), b:=(abs b) // (*) {Hier a,b>0} // Falls a=b: return a; falls ab>0} // Falls (- (integer-length a) (integer-length b)) >= intDsize/2, // lohnt sich eine Division: (a,b) := (b , a mod b). Falls b=0: return a. // Falls dagegen 0 <= (- (integer-length a) (integer-length b)) < intDsize/2, // seien a' die führenden intDsize Bits von a // (2^(intDsize-1) <= a' < 2^intDsize) und b' die entsprechenden Bits von b // (2^(intDsize/2) <= b' <= a' < 2^intDsize). // Rechne den Euklid-Algorithmus mit Beifaktoren für ALLE Zahlen (a,b) aus, // die mit a' bzw. b' anfangen; das liefert x1,y1,x2,y2, so daß // ggT(a,b) = ggT(x1*a-y1*b,-x2*a+y2*b) und x1*a-y1*b>=0,-x2*a+y2*b>=0. // Genauer: Mit offensichtlicher Skalierung betrachten wir // a als beliebiges Element des Intervalls [a',a'+1) und // b als beliebiges Element des Intervalls [b',b'+1) und // führen den Euklid-Algorithmus schrittweise durch: // (x1,y1,z1) := (1,0,a'), (x2,y2,z2) := (0,1,b'), // Schleife: // {Hier x1*a'-y1*b'=z1, x1*a-y1*b in [z1-y1,z1+x1), z1-y1>=0, z1>0, // und -x2*a'+y2*b'=z2, -x2*a+y2*b in [z2-x2,z2+y2), z2-x2>=0, z2>0, // x1*y2-x2*y1=1, x1*z2+x2*z1=b', y1*z2+y2*z1=a'.} // Falls z1-y1>=z2+y2: // (x1,y1,z1) := (x1+x2,y1+y2,z1-z2), goto Schleife. // Falls z2-x2>=z1+x1: // (x2,y2,z2) := (x2+x1,y2+y1,z2-z1), goto Schleife. // Sonst muß man abbrechen. // {Zu den Schleifeninvarianten: // 1. Die Gleichungen x1*a'-y1*b'=z1, -x2*a'+y2*b'=z2, // x1*y2-x2*y1=1, x1*z2+x2*z1=b', y1*z2+y2*z1=a' mit Induktion. // 2. Die Ungleichungen x1>0, y1>=0, x2>=0, y2>0 mit Induktion. // 3. Die Ungleichungen z1>=0, z2>=0 nach Fallauswahl. // 4. Die Ungleichung x1+x2>0 aus x1*z2+x2*z1=b'>0, // die Ungleichung y1+y2>0 aus y1*z2+y2*z1=a'>0. // 5. Die Ungleichung z1>0 wegen Fallauswahl und y1+y2>0, // Die Ungleichung z2>0 wegen Fallauswahl und x1+x2>0. // 6. Die Ungleichungen z1-y1>=0, z2-x2>=0 wegen Fallauswahl. // 7. Die Ungleichung max(z1,z2) <= a' mit Induktion. // 8. Die Ungleichung x1+x2 <= x1*z2+x2*z1 = b', // die Ungleichung y1+y2 <= y1*z2+y2*z1 = a'. // Damit bleiben alle Größen im Intervall [0,beta), kein Überlauf. // 9. Die Ungleichungen z1+x1<=beta, z2+y2<=beta mit Induktion. // 10. x1*a-y1*b in (z1-y1,z1+x1) (bzw. [z1,z1+x1) bei y1=0), // -x2*a+y2*b in (z2-x2,z2+y2) (bzw. [z2,z2+y2) bei x2=0), // da a in a'+[0,1) und b in b'+[0,1). // Jedenfalls 0 < x1*a-y1*b < z1+x1 <= x2*z1+x1*z2 = b' falls x2>0, // und 0 < -x2*a+y2*b < z2+y2 <= y1*z2+y2*z1 = a' falls y1>0.} // Man kann natürlich auch mehrere Subtraktionsschritte auf einmal // durchführen: // Falls q := floor((z1-y1)/(z2+y2)) > 0 : // (x1,y1,z1) := (x1+q*x2,y1+q*y2,z1-q*z2), goto Schleife. // Falls q := floor((z2-x2)/(z1+x1)) > 0 : // (x2,y2,z2) := (x2+q*x1,y2+q*y1,z2-q*z1), goto Schleife. // {Am Schluß gilt -(x1+x2) < z1-z2 < y1+y2 und daher // z2-x2 <= b'/(x1+x2) < z1+x1, z1-y1 <= a'/(y1+y2) < z2+y2, // und - unter Berücksichtigung von x1*y2-x2*y1=1 - // z1-y1 <= b'/(x1+x2) < z2+y2, z2-x2 <= a'/(y1+y2) < z1+x1, // also max(z1-y1,z2-x2) <= min(b'/(x1+x2),a'/(y1+y2)) // <= max(b'/(x1+x2),a'/(y1+y2)) < min(z1+x1,z2+y2).} // Im Fall y1=x2=0 => x1=y2=1 (der nur bei a'=z1=z2=b' eintreten kann) // ersetze (a,b) := (a-b,b). {Beide >0, da a>b>0 war.} // Der Fall y1=0,x2>0 => x1=y2=1 => a' = z1 < z2+x2*z1 = b' // kann nicht eintreten. // Im Fall x2=0,y1>0 => x1=y2=1 ersetze (a,b) := (a-y1*b,b). // {Das ist OK, da 0 <= z1-y1 = a'-y1*(b'+1) < a-y1*b < a.} // Sonst (y1>0,x2>0) ersetze (a,b) := (x1*a-y1*b,-x2*a+y2*b). // {Das ist OK, da 0 <= z1-y1 = x1*a'-y1*(b'+1) < x1*a-y1*b // und 0 <= z2-x2 = -x2*(a'+1)+y2*b' < -x2*a+y2*b // und x1*a-y1*b < x1*(a'+1)-y1*b' = z1+x1 <= x2*z1+x1*z2 = b' <= b // und -x2*a+y2*b < -x2*a'+y2*(b'+1) = z2+y2 <= y1*z2+y2*z1 = a' <= a.} // goto (*). // Define this to 1 in order to use double-word sized a' and b'. // This gives better x1,y1,x2,y2, because normally the values x1,y1,x2,y2 // have only about intDsize/2 bits and so half of the multiplication work // is lost. Actually, this flag multiplies the gcd speed by 1.5, not 2.0. #define DOUBLE_SPEED 1 // Speed increases only for large integers. For small ones, computing // with double-word sized a' and b' is too costly. The threshold is // between 12 and 20, around 15. #define cl_gcd_double_threshold 16 // gcd of two single-word numbers >0 static uintD gcdD (uintD a, uintD b) { var uintD bit_j = (a | b); // endet mit einer 1 und j Nullen bit_j = bit_j ^ (bit_j - 1); // Maske = bit(j) | bit(j-1) | ... | bit(0) if (!((a & bit_j) ==0)) { if (!((b & bit_j) ==0)) goto odd_odd; else goto odd_even; } if (!((b & bit_j) ==0)) goto even_odd; NOTREACHED; loop { odd_odd: // a,b >0, beide ungerade // Vergleiche a und b: if (a == b) break; // a=b>0 -> fertig if (a > b) // a>b ? { a = a-b; even_odd: // a,b >0, a gerade, b ungerade do { a = a>>1; } while ((a & bit_j) ==0); } else // a0, a ungerade, b gerade do { b = b>>1; } while ((b & bit_j) ==0); } } // a=b>0 return a; } const cl_I gcd (const cl_I& a, const cl_I& b) { if (eq(a,1)) { return 1; } // a=1 -> 1 if (eq(b,1)) { return 1; } // b=1 -> 1 if (eq(b,0)) { return abs(a); } // b=0 -> (abs a) if (eq(a,0)) { return abs(b); } // a=0 -> (abs b) if (fixnump(a) && fixnump(b)) // ggT zweier Fixnums /=0 { var sintV a_ = FN_to_V(a); if (a_ < 0) { a_ = -a_; } var sintV b_ = FN_to_V(b); if (b_ < 0) { b_ = -b_; } return UV_to_I(gcd((uintV)a_,(uintV)b_)); } CL_ALLOCA_STACK; var uintD* a_MSDptr; var uintC a_len; var uintD* a_LSDptr; var uintD* b_MSDptr; var uintC b_len; var uintD* b_LSDptr; // Macro: erzeugt die NUDS zu (abs x), erniedrigt num_stack #define I_abs_to_NUDS(x) \ I_to_NDS_1(x, x##_MSDptr = , x##_len = , x##_LSDptr = ); /* (nichtleere) NDS holen */\ if ((sintD)mspref(x##_MSDptr,0) < 0) /* falls <0, negieren: */\ { neg_loop_lsp(x##_LSDptr,x##_len); } \ if (mspref(x##_MSDptr,0) == 0) /* normalisieren (max. 1 Nulldigit entfernen) */\ { msshrink(x##_MSDptr); x##_len--; } I_abs_to_NUDS(a); // (abs a) als NUDS erzeugen I_abs_to_NUDS(b); // (abs b) als NUDS erzeugen // Jetzt ist a = a_MSDptr/a_len/a_LSDptr, b = b_MSDptr/b_len/b_LSDptr, // beides NUDS, und a_len>0, b_len>0. // Platz für zwei Rechenregister besorgen, mit je max(a_len,b_len)+1 Digits: {var uintD* divroomptr; // Platz für Divisionsergebnis var uintD* c_LSDptr; var uintD* d_LSDptr; {var uintC c_len = (a_len>=b_len ? a_len : b_len) + 1; num_stack_alloc(c_len,divroomptr=,c_LSDptr=); num_stack_alloc(c_len,,d_LSDptr=); // Jetzt ist ../c_len/c_LSDptr, ../c_len/d_LSDptr frei. } loop { // Hier a,b>0, beides NUDS. // Vergleiche a und b: if (a_len > b_len) goto a_greater_b; // a>b ? if (a_len == b_len) { var cl_signean vergleich = compare_loop_msp(a_MSDptr,b_MSDptr,a_len); if (vergleich > 0) goto a_greater_b; // a>b ? if (vergleich == 0) break; // a=b ? } // a a,b vertauschen: swap(uintD*, a_MSDptr,b_MSDptr); swap(uintC, a_len,b_len); swap(uintD*, a_LSDptr,b_LSDptr); a_greater_b: // Hier a>b>0, beides NUDS. if (b_len==1) // Beschleunigung eines häufigen Falles { var uintD b0 = mspref(b_MSDptr,0); if (b0==1) // a>b=1 -> Ergebnis 1. { return 1; } // a>b>1 -> evtl. Division durch b var uintD a0; if (a_len==1) { a0 = mspref(a_MSDptr,0); } else { a0 = divu_loop_msp(b0,a_MSDptr,a_len); if (a0==0) { return UD_to_I(b0); } } return UD_to_I(gcdD(a0,b0)); } // Entscheidung, ob Division oder Linearkombination: { var uintD a_msd; // führende intDsize Bits von a var uintD b_msd; // entsprechende Bits von b #if DOUBLE_SPEED var uintD a_nsd; // nächste intDsize Bits von a var uintD b_nsd; // entsprechende Bits von b #endif { var uintC len_diff = a_len-b_len; // Längendifferenz if (len_diff > 1) goto divide; // >=2 -> Bitlängendifferenz>intDsize -> dividieren #define bitlendiff_limit (intDsize/2) // sollte >0,0,<=intDsize) berechnen b_msd = mspref(b_MSDptr,0); #if HAVE_DD {var uintDD b_msdd = // 2 führende Digits von b (len_diff==0 ? highlowDD(b_msd, mspref(b_MSDptr,1)) : (uintDD)b_msd ); // a_msd_size+intDsize - b_msdd_size >= bitlendiff_limit -> dividieren: b_msd = lowD(b_msdd >> a_msd_size); if (b_msd < (uintD)bit(intDsize-bitlendiff_limit)) goto divide; #if DOUBLE_SPEED b_nsd = lowD(highlowDD(lowD(b_msdd), (b_len<=2-len_diff ? 0 : mspref(b_MSDptr,2-len_diff))) >> a_msd_size); #endif } {var uintDD a_msdd = // 2 führende Digits von a highlowDD(a_msd, mspref(a_MSDptr,1)); a_msd = lowD(a_msdd >> a_msd_size); #if DOUBLE_SPEED a_nsd = lowD(highlowDD(lowD(a_msdd), (a_len<=2 ? 0 : mspref(a_MSDptr,2))) >> a_msd_size); #endif } if (a_msd == b_msd) goto subtract; #else if (len_diff==0) { // a_msd_size - b_msd_size >= bitlendiff_limit -> dividieren: if ((a_msd_size > bitlendiff_limit) && (b_msd < (uintD)bit(a_msd_size-bitlendiff_limit)) ) goto divide; // Entscheidung für Linearkombination ist gefallen. // a_msd und b_msd so erweitern, daß a_msd die führenden // intDsize Bits von a enthält: {var uintC shiftcount = intDsize-a_msd_size; // Shiftcount nach links (>=0, 0) { a_msd = a_msd << shiftcount; b_msd = b_msd << shiftcount; a_msd |= mspref(a_MSDptr,1) >> a_msd_size; b_msd |= mspref(b_MSDptr,1) >> a_msd_size; } if (a_msd == b_msd) goto subtract; #if DOUBLE_SPEED a_nsd = mspref(a_MSDptr,1); b_nsd = mspref(b_MSDptr,1); if (shiftcount>0) { a_nsd = a_nsd << shiftcount; b_nsd = b_nsd << shiftcount; if (a_len>2) { a_nsd |= mspref(a_MSDptr,2) >> a_msd_size; b_nsd |= mspref(b_MSDptr,2) >> a_msd_size; } } #endif }} else // len_diff=1 { // a_msd_size+intDsize - b_msd_size >= bitlendiff_limit -> dividieren: if ((a_msd_size >= bitlendiff_limit) || (b_msd < (uintD)bit(a_msd_size+intDsize-bitlendiff_limit)) ) goto divide; // Entscheidung für Linearkombination ist gefallen. // a_msd und b_msd so erweitern, daß a_msd die führenden // intDsize Bits von a enthält: // 0 < a_msd_size < b_msd_size + bitlendiff_limit - intDsize <= bitlendiff_limit < intDsize. a_msd = (a_msd << (intDsize-a_msd_size)) | (mspref(a_MSDptr,1) >> a_msd_size); #if DOUBLE_SPEED a_nsd = mspref(a_MSDptr,1) << (intDsize-a_msd_size); b_nsd = b_msd << (intDsize-a_msd_size); a_nsd |= mspref(a_MSDptr,2) >> a_msd_size; b_nsd |= mspref(b_MSDptr,1) >> a_msd_size; #endif b_msd = b_msd >> a_msd_size; } #endif #undef bitlendiff_limit }} // Nun ist a_msd = a' > b' = b_msd. { // Euklid-Algorithmus auf den führenden Digits durchführen: var partial_gcd_result likobi; #if DOUBLE_SPEED if (a_len >= cl_gcd_double_threshold) { #if HAVE_DD partial_gcd(highlowDD(a_msd,a_nsd),highlowDD(b_msd,b_nsd),&likobi); // liefert x1,y1,x2,y2 #else partial_gcd(a_msd,a_nsd,b_msd,b_nsd,&likobi); // liefert x1,y1,x2,y2 #endif } else #endif { partial_gcd(a_msd,b_msd,&likobi); } // liefert x1,y1,x2,y2, aber nur halb so gut // Hier y1>0. if (likobi.x2==0) { // Ersetze (a,b) := (a-y1*b,b). if (likobi.y1==1) goto subtract; // einfacherer Fall // Dazu evtl. a um 1 Digit erweitern, so daß a_len=b_len+1: if (a_len == b_len) { lsprefnext(a_MSDptr) = 0; a_len++; } // und y1*b von a subtrahieren: mspref(a_MSDptr,0) -= mulusub_loop_lsp(likobi.y1,b_LSDptr,a_LSDptr,b_len); } else { // Ersetze (a,b) := (x1*a-y1*b,-x2*a+y2*b). // Dazu evtl. b um 1 Digit erweitern, so daß a_len=b_len: if (!(a_len==b_len)) { lsprefnext(b_MSDptr) = 0; b_len++; } // c := x1*a-y1*b bilden: mulu_loop_lsp(likobi.x1,a_LSDptr,c_LSDptr,a_len); /* lspref(c_LSDptr,a_len) -= */ mulusub_loop_lsp(likobi.y1,b_LSDptr,c_LSDptr,a_len); // d := -x2*a+y2*b bilden: mulu_loop_lsp(likobi.y2,b_LSDptr,d_LSDptr,a_len); /* lspref(d_LSDptr,a_len) -= */ mulusub_loop_lsp(likobi.x2,a_LSDptr,d_LSDptr,a_len); // Wir wissen, daß 0 < c < b und 0 < d < a. Daher müßten // lspref(c_LSDptr,a_len) und lspref(d_LSDptr,a_len) =0 sein. // a := c und b := d kopieren: copy_loop_lsp(c_LSDptr,a_LSDptr,a_len); copy_loop_lsp(d_LSDptr,b_LSDptr,a_len); // b normalisieren: while (mspref(b_MSDptr,0)==0) { msshrink(b_MSDptr); b_len--; } } } if (false) { subtract: // Ersetze (a,b) := (a-b,b). if (!( subfrom_loop_lsp(b_LSDptr,a_LSDptr,b_len) ==0)) // Übertrag nach b_len Stellen, muß also a_len=b_len+1 sein. { mspref(a_MSDptr,0) -= 1; } } // a normalisieren: while (mspref(a_MSDptr,0)==0) { msshrink(a_MSDptr); a_len--; } } if (false) { divide: // Ersetze (a,b) := (b , a mod b). {var uintD* old_a_LSDptr = a_LSDptr; var DS q; var DS r; cl_UDS_divide(a_MSDptr,a_len,a_LSDptr,b_MSDptr,b_len,b_LSDptr, divroomptr, &q,&r); a_MSDptr = b_MSDptr; a_len = b_len; a_LSDptr = b_LSDptr; // a := b b_len = r.len; if (b_len==0) break; // b=0 -> fertig b_LSDptr = old_a_LSDptr; // b übernimmt den vorherigen Platz von a b_MSDptr = copy_loop_lsp(r.LSDptr,b_LSDptr,b_len); // b := r kopieren goto a_greater_b; // Nun ist a>b>0 }} } } return NUDS_to_I(a_MSDptr,a_len); // NUDS a als Ergebnis #undef I_abs_to_NUDS } #endif /* GCD_ALGO == 3 */ } // namespace cln cln-1.3.3/src/integer/gcd/cl_I_lcm.cc0000644000000000000000000000132111201634740014144 0ustar // lcm(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" namespace cln { const cl_I lcm (const cl_I& a, const cl_I& b) { // Methode: // a=0 oder b=0 -> Ergebnis 0. // a:=(abs a), b:=(abs b). // g:=ggT(a,b)>0. // Falls g=1, Ergebnis a*b, sonst Ergebnis (a/g)*b. if (eq(a,0)) { return 0; } if (eq(b,0)) { return 0; } // Beträge nehmen: {var cl_I abs_a = abs(a); var cl_I abs_b = abs(b); var cl_I& a = abs_a; var cl_I& b = abs_b; var cl_I g = gcd(a,b); if (!eq(g,1)) { a = exquopos(a,g); } // a durch g (beide >0) dividieren return a*b; } } } // namespace cln cln-1.3.3/src/integer/gcd/cl_I_xgcd.cc0000644000000000000000000006042511201634740014330 0ustar // xgcd(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "base/digit/cl_D.h" #include "base/cl_xmacros.h" namespace cln { #define GCD_ALGO 3 // 1: binär, 2: Schulmethode, 3: Lehmer #if (GCD_ALGO == 2) // Schulmethode: // (gcd A B) :== // [a:=(abs A), b:=(abs B), while b>0 do (a,b) := (b,(mod a b)), -> a] // verbessert: // A=1 -> return g=1, (u,v)=(1,0) // B=1 -> return g=1, (u,v)=(0,1) // a:=(abs A), ua:=(signum A), va:=0 // b:=(abs B), ub:=0, vb:=(signum B) // A=0 -> return g=b, (u,v) = (ub,vb) // B=0 -> return g=a, (u,v) = (ua,va) // {Stets ua*A+va*B=a, ub*A+vb*B=b, ua*vb-ub*va = +/- 1.} // Falls a=b: return a,ua,va; // falls ab>0} // Falls b=1, return 1,ub,vb. {spart eine Division durch 1} // Sonst dividieren (divide a b) -> q,r. // Falls r=0, return b,ub,vb. // a:=b, b := Rest r = a-q*b, (ua,va,ub,vb) := (ub,vb,ua-q*ub,va-q*vb). // goto (*). const cl_I xgcd (const cl_I& a, const cl_I& b, cl_I* u, cl_I* v) { if (eq(a,1)) // a=1 -> g=1, (u,v)=(1,0) { *u = 1; *v = 0; return a; } if (eq(b,1)) // b=1 -> g=1, (u,v)=(0,1) { *u = 0; *v = 1; return b; } // Vorzeichen nehmen: var cl_I ua = (minusp(a) ? cl_I(-1) : cl_I(1)); // ua := +/- 1 var cl_I va = 0; var cl_I ub = 0; var cl_I vb = (minusp(b) ? cl_I(-1) : cl_I(1)); // vb := +/- 1 // Beträge nehmen: {var cl_I abs_a = abs(a); var cl_I abs_b = abs(b); var cl_I& a = abs_a; var cl_I& b = abs_b; if (eq(b,0)) // b=0 -> g=a, (u,v) = (ua,va) { *u = ua; *v = va; return a; } if (eq(a,0)) // a=0 -> g=b, (u,v) = (ub,vb) { *u = ub; *v = vb; return b; } { var cl_signean vergleich = compare(a,b); if (vergleich == 0) // a=b -> fertig { *u = ua; *v = va; return a; } if (vergleich < 0) // a a,b vertauschen { swap(cl_I,a,b); swap(cl_I,ua,ub); swap(cl_I,va,vb); } } loop // Hier a>b>0 { if (eq(b,1)) // b=1 -> g=b, (u,v) = (ub,vb) { *u = ub; *v = vb; return b; } var cl_I_div_t div = cl_divide(a,b); // Division a / b var cl_I& q = div.quotient; var cl_I& r = div.remainder; if (eq(r,0)) // r=0 -> fertig { *u = ub; *v = vb; return b; } { var cl_I x = ua-q*ub; ua = ub; ub = x; } { var cl_I x = va-q*vb; va = vb; vb = x; } a = b; b = r; } }} #endif /* GCD_ALGO == 2 */ #if (GCD_ALGO == 3) // (xgcd A B) :== // wie oben bei (gcd A B). // Zusätzlich werden Variablen sA,sB,sk,uAa,uBa,uAb,uBb geführt, // wobei sA,sB,sk Vorzeichen (+/- 1) und uAa,uBa,uAb,uBb Integers >=0 sind mit // uAa * sA*A - uBa * sB*B = a, // - uAb * sA*A + uBb * sB*B = b, // ferner uAa * uBb - uAb * uBa = sk und daher (Cramersche Regel) // uBb * a + uBa * b = sk*sA*A, uAb * a + uAa * b = sk*sB*B. // Zu Beginn (a,b) := (|A|,|B|), (sA,sB) := ((signum A), (signumB)), // (uAa,uBa,uAb,uBb) := (1,0,0,1). // Beim Ersetzen (a,b) := (a-b,b) // ersetzt man (uAa,uBa,uAb,uBb) := (uAa+uAb,uBa+uBb,uAb,uBb). // Beim Ersetzen (a,b) := (a-y1*b,b) // ersetzt man (uAa,uBa,uAb,uBb) := (uAa+y1*uAb,uBa+y1*uBb,uAb,uBb). // Beim Ersetzen (a,b) := (x1*a-y1*b,-x2*a+y2*b) mit x1*y2-x2*y1=1 // ersetzt man (uAa,uBa,uAb,uBb) := // (x1*uAa+y1*uAb,x1*uBa+y1*uBb,x2*uAa+y2*uAb,x2*uBa+y2*uBb). // Beim Ersetzen (a,b) := (b,a) // ersetzt man (uAa,uBa,uAb,uBb) := (uAb,uBb,uAa,uBa), // sk := -sk, (sA,sB) := (-sA,-sB). // Beim Ersetzen (a,b) := (b,a-q*b) // ersetzt man (uAa,uBa,uAb,uBb) := (uAb,uBb,uAa+q*uAb,uBa+q*uBb), // sk := -sk, (sA,sB) := (-sA,-sB). // Zum Schluß ist a der ggT und a = uAa*sA * A + -uBa*sB * B // die gewünschte Linearkombination. // Da stets gilt sk*sA*A = |A|, sk*sB*B = |B|, a>=1, b>=1, // folgt 0 <= uAa <= |B|, 0 <= uAb <= |B|, 0 <= uBa <= |A|, 0 <= uBb <= |A|. // Ferner wird sk nie benutzt, braucht also nicht mitgeführt zu werden. // Define this to 1 in order to use double-word sized a' and b'. // This gives better x1,y1,x2,y2, because normally the values x1,y1,x2,y2 // have only about intDsize/2 bits and so half of the multiplication work // is lost. Actually, this flag multiplies the gcd speed by 1.5, not 2.0. #define DOUBLE_SPEED 1 // Bildet u := u + v, wobei für u genügend Platz sei: // (Benutzt v.MSDptr nicht.) static void NUDS_likobi0_NUDS (DS* u, DS* v) { var uintC u_len = u->len; var uintC v_len = v->len; if (u_len >= v_len) { if (!( addto_loop_lsp(v->LSDptr,u->LSDptr,v_len) ==0)) { if (!( inc_loop_lsp(u->LSDptr lspop v_len,u_len-v_len) ==0)) { lsprefnext(u->MSDptr) = 1; u->len++; } } } else // u_len <= v_len { u->MSDptr = copy_loop_lsp(v->LSDptr lspop u_len,u->LSDptr lspop u_len,v_len-u_len); u->len = v_len; if (!( addto_loop_lsp(v->LSDptr,u->LSDptr,u_len) ==0)) { if (!( inc_loop_lsp(u->LSDptr lspop u_len,v_len-u_len) ==0)) { lsprefnext(u->MSDptr) = 1; u->len++; } } } } // Bildet u := u + q*v, wobei für u genügend Platz sei: // (Dabei sei nachher u>0.) static void NUDS_likobi1_NUDS (DS* u, DS* v, uintD q) { var uintC v_len = v->len; if (v_len>0) // nur nötig, falls v /=0 { var uintC u_len = u->len; var uintD carry; if (u_len <= v_len) // evtl. u vergrößern { u->MSDptr = clear_loop_lsp(u->MSDptr,v_len-u_len+1); u->len = u_len = v_len+1; } // Nun ist u_len > v_len. carry = muluadd_loop_lsp(q,v->LSDptr,u->LSDptr,v_len); if (!(carry==0)) { var uintD* ptr = u->LSDptr lspop v_len; if ((lspref(ptr,0) += carry) < carry) { if (!( inc_loop_lsp(ptr lspop 1,u_len-v_len-1) ==0)) { lsprefnext(u->MSDptr) = 1; u->len++; } } } while (mspref(u->MSDptr,0)==0) { msshrink(u->MSDptr); u->len--; } // normalisieren } } // Bildet (u,v) := (x1*u+y1*v,x2*u+y2*v), wobei für u,v genügend Platz sei: // (Dabei sei u>0 oder v>0, nachher u>0 und v>0.) static void NUDS_likobi2_NUDS (DS* u, DS* v, partial_gcd_result* q, uintD* c_LSDptr, uintD* d_LSDptr) { var uintC u_len = u->len; var uintC v_len = v->len; var uintC c_len; var uintC d_len; if (u_len >= v_len) { mulu_loop_lsp(q->x1,u->LSDptr,c_LSDptr,u_len); c_len = u_len+1; mulu_loop_lsp(q->x2,u->LSDptr,d_LSDptr,u_len); d_len = u_len+1; if (!(v_len==0)) {{var uintD carry = muluadd_loop_lsp(q->y1,v->LSDptr,c_LSDptr,v_len); if (!(carry==0)) { var uintD* ptr = c_LSDptr lspop v_len; if ((lspref(ptr,0) += carry) < carry) { if (!( inc_loop_lsp(ptr lspop 1,u_len-v_len) ==0)) { lspref(c_LSDptr,c_len) = 1; c_len++; } } } } {var uintD carry = muluadd_loop_lsp(q->y2,v->LSDptr,d_LSDptr,v_len); if (!(carry==0)) { var uintD* ptr = d_LSDptr lspop v_len; if ((lspref(ptr,0) += carry) < carry) { if (!(inc_loop_lsp(ptr lspop 1,u_len-v_len) ==0)) { lspref(d_LSDptr,d_len) = 1; d_len++; } }} } } } else { mulu_loop_lsp(q->y1,v->LSDptr,c_LSDptr,v_len); c_len = v_len+1; mulu_loop_lsp(q->y2,v->LSDptr,d_LSDptr,v_len); d_len = v_len+1; if (!(u_len==0)) {{var uintD carry = muluadd_loop_lsp(q->x1,u->LSDptr,c_LSDptr,u_len); if (!(carry==0)) { var uintD* ptr = c_LSDptr lspop u_len; if ((lspref(ptr,0) += carry) < carry) { if (!( inc_loop_lsp(ptr lspop 1,v_len-u_len) ==0)) { lspref(c_LSDptr,c_len) = 1; c_len++; } } } } {var uintD carry = muluadd_loop_lsp(q->x2,u->LSDptr,d_LSDptr,u_len); if (!(carry==0)) { var uintD* ptr = d_LSDptr lspop u_len; if ((lspref(ptr,0) += carry) < carry) { if (!( inc_loop_lsp(ptr lspop 1,v_len-u_len) ==0)) { lspref(d_LSDptr,d_len) = 1; d_len++; } }} } } } u->MSDptr = copy_loop_lsp(c_LSDptr,u->LSDptr,c_len); while (mspref(u->MSDptr,0)==0) { msshrink(u->MSDptr); c_len--; } u->len = c_len; v->MSDptr = copy_loop_lsp(d_LSDptr,v->LSDptr,d_len); while (mspref(v->MSDptr,0)==0) { msshrink(v->MSDptr); d_len--; } v->len = d_len; } // Los geht's: const cl_I xgcd (const cl_I& a, const cl_I& b, cl_I* u, cl_I* v) { if (eq(a,1)) // a=1 -> g=1, (u,v)=(1,0) { *u = 1; *v = 0; return a; } if (eq(b,1)) // b=1 -> g=1, (u,v)=(0,1) { *u = 0; *v = 1; return b; } var sintL sA = (minusp(a) ? ~0 : 0); // Vorzeichen von A var sintL sB = (minusp(b) ? ~0 : 0); // Vorzeichen von B CL_ALLOCA_STACK; var uintD* a_MSDptr; var uintC a_len; var uintD* a_LSDptr; var uintD* b_MSDptr; var uintC b_len; var uintD* b_LSDptr; // Macro: erzeugt die NUDS zu (abs x), erniedrigt num_stack #define I_abs_to_NUDS(x,zero_statement) \ I_to_NDS_1(x, x##_MSDptr = , x##_len = , x##_LSDptr = ); /* (nichtleere) NDS holen */\ if (x##_len == 0) { zero_statement } /* falls =0, fertig */\ if ((sintD)mspref(x##_MSDptr,0) < 0) /* falls <0, negieren: */\ { neg_loop_lsp(x##_LSDptr,x##_len); } \ if (mspref(x##_MSDptr,0) == 0) /* normalisieren (max. 1 Nulldigit entfernen) */\ { msshrink(x##_MSDptr); x##_len--; } I_abs_to_NUDS(a, // (abs A) als NUDS erzeugen // A=0 -> g=|B|, (u,v) = (0,sB) { *u = 0; *v = (sB==0 ? cl_I(1) : cl_I(-1)); return abs(b); }); I_abs_to_NUDS(b, // (abs B) als NUDS erzeugen // B=0 -> g=|A|, (u,v) = (sA,0) { *u = (sA==0 ? cl_I(1) : cl_I(-1)); *v = 0; return abs(a); }); // Jetzt ist a = a_MSDptr/a_len/a_LSDptr, b = b_MSDptr/b_len/b_LSDptr, // beides NUDS, und a_len>0, b_len>0. {// Beifaktoren: var DS uAa; var DS uBa; var DS uAb; var DS uBb; // Rechenregister: var uintD* divroomptr; // Platz für Divisionsergebnis var uintD* c_LSDptr; var uintD* d_LSDptr; // Platz für uAa,uBa,uAb,uBb besorgen: {var uintC u_len = b_len+1; num_stack_alloc(u_len,,uAa.LSDptr=); uAa.MSDptr = uAa.LSDptr; num_stack_alloc(u_len,,uAb.LSDptr=); uAb.MSDptr = uAb.LSDptr; } {var uintC u_len = a_len+1; num_stack_alloc(u_len,,uBa.LSDptr=); uBa.MSDptr = uBa.LSDptr; num_stack_alloc(u_len,,uBb.LSDptr=); uBb.MSDptr = uBb.LSDptr; } lsprefnext(uAa.MSDptr) = 1; uAa.len = 1; // uAa := 1 uBa.len = 0; // uBa := 0 uAb.len = 0; // uAb := 0 lsprefnext(uBb.MSDptr) = 1; uBb.len = 1; // uBb := 1 // Jetzt ist uAa = uAa.MSDptr/uAa.len/uAa.LSDptr, // uBa = uBa.MSDptr/uBa.len/uBa.LSDptr, // uAb = uAb.MSDptr/uAb.len/uAb.LSDptr, // uBb = uBb.MSDptr/uBb.len/uBb.LSDptr, // alles NUDS. // Platz für zwei Rechenregister besorgen, mit je max(a_len,b_len)+1 Digits: {var uintC c_len = (a_len>=b_len ? a_len : b_len) + 1; num_stack_alloc(c_len,,c_LSDptr=); num_stack_alloc(c_len,divroomptr=,d_LSDptr=); // Jetzt ist ../c_len/c_LSDptr, ../c_len/d_LSDptr frei. } loop { // Hier a,b>0, beides NUDS. // Vergleiche a und b: if (a_len > b_len) goto a_greater_b; // a>b ? if (a_len == b_len) { var cl_signean vergleich = compare_loop_msp(a_MSDptr,b_MSDptr,a_len); if (vergleich > 0) goto a_greater_b; // a>b ? if (vergleich == 0) break; // a=b ? } // a a,b vertauschen: swap(uintD*, a_MSDptr,b_MSDptr); swap(uintC, a_len,b_len); swap(uintD*, a_LSDptr,b_LSDptr); a_greater_b_swap: swap(DS, uAa,uAb); // und uAa und uAb vertauschen swap(DS, uBa,uBb); // und uBa und uBb vertauschen sA = ~sA; sB = ~sB; // und sA und sB umdrehen a_greater_b: // Hier a>b>0, beides NUDS. // Entscheidung, ob Division oder Linearkombination: { var uintD a_msd; // führende intDsize Bits von a var uintD b_msd; // entsprechende Bits von b #if DOUBLE_SPEED var uintD a_nsd; // nächste intDsize Bits von a var uintD b_nsd; // entsprechende Bits von b #endif { var uintC len_diff = a_len-b_len; // Längendifferenz if (len_diff > 1) goto divide; // >=2 -> Bitlängendifferenz>intDsize -> dividieren #define bitlendiff_limit (intDsize/2) // sollte >0,0,<=intDsize) berechnen b_msd = mspref(b_MSDptr,0); #if HAVE_DD {var uintDD b_msdd = // 2 führende Digits von b (len_diff==0 ? highlowDD(b_msd, (b_len==1 ? 0 : mspref(b_MSDptr,1))) : (uintDD)b_msd ); // a_msd_size+intDsize - b_msdd_size >= bitlendiff_limit -> dividieren: b_msd = lowD(b_msdd >> a_msd_size); if (b_msd < (uintD)bit(intDsize-bitlendiff_limit)) goto divide; #if DOUBLE_SPEED b_nsd = lowD(highlowDD(lowD(b_msdd), (b_len<=2-len_diff ? 0 : mspref(b_MSDptr,2-len_diff))) >> a_msd_size); #endif } {var uintDD a_msdd = // 2 führende Digits von a highlowDD(a_msd, (a_len==1 ? 0 : mspref(a_MSDptr,1))); a_msd = lowD(a_msdd >> a_msd_size); #if DOUBLE_SPEED a_nsd = lowD(highlowDD(lowD(a_msdd), (a_len<=2 ? 0 : mspref(a_MSDptr,2))) >> a_msd_size); #endif } if (a_msd == b_msd) goto subtract; #else if (len_diff==0) { // a_msd_size - b_msd_size >= bitlendiff_limit -> dividieren: if ((a_msd_size > bitlendiff_limit) && (b_msd < (uintD)bit(a_msd_size-bitlendiff_limit)) ) goto divide; // Entscheidung für Linearkombination ist gefallen. // a_msd und b_msd so erweitern, daß a_msd die führenden // intDsize Bits von a enthält: {var uintC shiftcount = intDsize-a_msd_size; // Shiftcount nach links (>=0, 0) { a_msd = a_msd << shiftcount; b_msd = b_msd << shiftcount; if (a_len>1) { a_msd |= mspref(a_MSDptr,1) >> a_msd_size; b_msd |= mspref(b_MSDptr,1) >> a_msd_size; } } if (a_msd == b_msd) goto subtract; #if DOUBLE_SPEED if (a_len>1) { a_nsd = mspref(a_MSDptr,1); b_nsd = mspref(b_MSDptr,1); if (shiftcount>0) { a_nsd = a_nsd << shiftcount; b_nsd = b_nsd << shiftcount; if (a_len>2) { a_nsd |= mspref(a_MSDptr,2) >> a_msd_size; b_nsd |= mspref(b_MSDptr,2) >> a_msd_size; } } } else { a_nsd = 0; b_nsd = 0; } #endif }} else // len_diff=1 { // a_msd_size+intDsize - b_msd_size >= bitlendiff_limit -> dividieren: if ((a_msd_size >= bitlendiff_limit) || (b_msd < (uintD)bit(a_msd_size+intDsize-bitlendiff_limit)) ) goto divide; // Entscheidung für Linearkombination ist gefallen. // a_msd und b_msd so erweitern, daß a_msd die führenden // intDsize Bits von a enthält: // 0 < a_msd_size < b_msd_size + bitlendiff_limit - intDsize <= bitlendiff_limit < intDsize. a_msd = (a_msd << (intDsize-a_msd_size)) | (mspref(a_MSDptr,1) >> a_msd_size); #if DOUBLE_SPEED a_nsd = mspref(a_MSDptr,1) << (intDsize-a_msd_size); b_nsd = b_msd << (intDsize-a_msd_size); if (a_len>2) { a_nsd |= mspref(a_MSDptr,2) >> a_msd_size; b_nsd |= mspref(b_MSDptr,1) >> a_msd_size; } #endif b_msd = b_msd >> a_msd_size; } #endif #undef bitlendiff_limit }} // Nun ist a_msd = a' > b' = b_msd. { // Euklid-Algorithmus auf den führenden Digits durchführen: var partial_gcd_result likobi; #if DOUBLE_SPEED #if HAVE_DD partial_gcd(highlowDD(a_msd,a_nsd),highlowDD(b_msd,b_nsd),&likobi); // liefert x1,y1,x2,y2 #else partial_gcd(a_msd,a_nsd,b_msd,b_nsd,&likobi); // liefert x1,y1,x2,y2 #endif #else partial_gcd(a_msd,b_msd,&likobi); // liefert x1,y1,x2,y2, aber nur halb so gut #endif // Hier y1>0. if (likobi.x2==0) { // Ersetze (a,b) := (a-y1*b,b). if (likobi.y1==1) goto subtract; // einfacherer Fall // Dazu evtl. a um 1 Digit erweitern, so daß a_len=b_len+1: if (a_len == b_len) { lsprefnext(a_MSDptr) = 0; a_len++; } // und y1*b von a subtrahieren: mspref(a_MSDptr,0) -= mulusub_loop_lsp(likobi.y1,b_LSDptr,a_LSDptr,b_len); NUDS_likobi1_NUDS(&uAa,&uAb,likobi.y1); // uAa := uAa + y1 * uAb NUDS_likobi1_NUDS(&uBa,&uBb,likobi.y1); // uBa := uBa + y1 * uBb } else { // Ersetze (uAa,uAb) := (x1*uAa+y1*uAb,x2*uAa+y2*uAb) : NUDS_likobi2_NUDS(&uAa,&uAb,&likobi,c_LSDptr,d_LSDptr); // Ersetze (uBa,uBb) := (x1*uBa+y1*uBb,x2*uBa+y2*uBb) : NUDS_likobi2_NUDS(&uBa,&uBb,&likobi,c_LSDptr,d_LSDptr); // Ersetze (a,b) := (x1*a-y1*b,-x2*a+y2*b). // Dazu evtl. b um 1 Digit erweitern, so daß a_len=b_len: if (!(a_len==b_len)) { lsprefnext(b_MSDptr) = 0; b_len++; } // c := x1*a-y1*b bilden: mulu_loop_lsp(likobi.x1,a_LSDptr,c_LSDptr,a_len); /* lspref(c_LSDptr,a_len) -= */ mulusub_loop_lsp(likobi.y1,b_LSDptr,c_LSDptr,a_len); // d := -x2*a+y2*b bilden: mulu_loop_lsp(likobi.y2,b_LSDptr,d_LSDptr,a_len); /* lspref(d_LSDptr,a_len) -= */ mulusub_loop_lsp(likobi.x2,a_LSDptr,d_LSDptr,a_len); // Wir wissen, daß 0 < c < b und 0 < d < a. Daher müßten // lspref(c_LSDptr,a_len) und lspref(d_LSDptr,a_len) =0 sein. // a := c und b := d kopieren: copy_loop_lsp(c_LSDptr,a_LSDptr,a_len); copy_loop_lsp(d_LSDptr,b_LSDptr,a_len); // b normalisieren: while (mspref(b_MSDptr,0)==0) { msshrink(b_MSDptr); b_len--; } } } if (false) { subtract: // Ersetze (a,b) := (a-b,b). NUDS_likobi0_NUDS(&uAa,&uAb); // uAa := uAa + uAb NUDS_likobi0_NUDS(&uBa,&uBb); // uBa := uBa + uBb if (!( subfrom_loop_lsp(b_LSDptr,a_LSDptr,b_len) ==0)) // Übertrag nach b_len Stellen, muß also a_len=b_len+1 sein. { mspref(a_MSDptr,0) -= 1; } } // a normalisieren: while (mspref(a_MSDptr,0)==0) { msshrink(a_MSDptr); a_len--; } } if (false) { divide: // Ersetze (a,b) := (b , a mod b). {var uintD* old_a_LSDptr = a_LSDptr; var DS q; var DS r; cl_UDS_divide(a_MSDptr,a_len,a_LSDptr,b_MSDptr,b_len,b_LSDptr, divroomptr, &q,&r); a_MSDptr = b_MSDptr; a_len = b_len; a_LSDptr = b_LSDptr; // a := b b_len = r.len; if (b_len==0) goto return_a_coeffsb; // b=0 -> fertig b_LSDptr = old_a_LSDptr; // b übernimmt den vorherigen Platz von a b_MSDptr = copy_loop_lsp(r.LSDptr,b_LSDptr,b_len); // b := r kopieren // (uAa,uAb) := (uAb,uAa+q*uAb) : if (!(uAb.len==0)) { cl_UDS_mul(q.LSDptr,q.len,uAb.LSDptr,uAb.len,c_LSDptr); // q * uAb var DS c; c.LSDptr = c_LSDptr; c.len = q.len + uAb.len; if (lspref(c_LSDptr,c.len-1)==0) { c.len--; } // normalisieren NUDS_likobi0_NUDS(&uAa,&c); // zu uAa addieren } // noch uAa,uAb vertauschen (später) // (uBa,uBb) := (uBb,uBa+q*uBb) : if (!(uBb.len==0)) { cl_UDS_mul(q.LSDptr,q.len,uBb.LSDptr,uBb.len,c_LSDptr); // q * uBb var DS c; c.LSDptr = c_LSDptr; c.len = q.len + uBb.len; if (lspref(c_LSDptr,c.len-1)==0) { c.len--; } // normalisieren NUDS_likobi0_NUDS(&uBa,&c); // zu uBa addieren } // noch uBa,uBb vertauschen (später) goto a_greater_b_swap; // Nun ist a>b>0 }} } // Nun ist a = b. Wähle diejenige der beiden Linearkombinationen // a = uAa*sA * A + -uBa*sB * B // b = -uAb*sA * A + uBb*sB * B // die die betragsmäßig kleinsten Koeffizienten hat. // Teste auf uBa < uBb. (Das kann auftreten, z.B. bei // A=560014183, B=312839871 wird a=b=1, uAa < uAb, uBa < uBb.) // Falls uBa = uBb, teste auf uAa < uAb. (Das kann auftreten, z.B. bei // A=2, B=3 wird a=b=1, uAa < uAb, uBa = uBb.) if (uBb.len > uBa.len) goto return_a_coeffsa; if (uBb.len < uBa.len) goto return_a_coeffsb; // (uBb.len == uBa.len) { var cl_signean vergleich = compare_loop_msp(uBb.MSDptr,uBa.MSDptr,uBb.len); if (vergleich > 0) goto return_a_coeffsa; if (vergleich < 0) goto return_a_coeffsb; } if (uAb.len > uAa.len) goto return_a_coeffsa; if (uAb.len < uAa.len) goto return_a_coeffsb; // (uAb.len == uAa.len) if (compare_loop_msp(uAb.MSDptr,uAa.MSDptr,uAb.len) > 0) return_a_coeffsa: { // uAa mit Vorfaktor sA versehen: lsprefnext(uAa.MSDptr) = 0; uAa.len++; if (!(sA==0)) { neg_loop_lsp(uAa.LSDptr,uAa.len); } // uBa mit Vorfaktor -sB versehen: lsprefnext(uBa.MSDptr) = 0; uBa.len++; if (sB==0) { neg_loop_lsp(uBa.LSDptr,uBa.len); } *u = DS_to_I(uAa.MSDptr,uAa.len); // DS uAa als Vorfaktor von A *v = DS_to_I(uBa.MSDptr,uBa.len); // DS uBa als Vorfaktor von B } else return_a_coeffsb: { // uAb mit Vorfaktor -sA versehen: lsprefnext(uAb.MSDptr) = 0; uAb.len++; if (sA==0) { neg_loop_lsp(uAb.LSDptr,uAb.len); } // uBb mit Vorfaktor sB versehen: lsprefnext(uBb.MSDptr) = 0; uBb.len++; if (!(sB==0)) { neg_loop_lsp(uBb.LSDptr,uBb.len); } *u = DS_to_I(uAb.MSDptr,uAb.len); // DS uAb als Vorfaktor von A *v = DS_to_I(uBb.MSDptr,uBb.len); // DS uBb als Vorfaktor von B } } return NUDS_to_I(a_MSDptr,a_len); // NUDS a als ggT #undef I_abs_to_NUDS } #endif /* GCD_ALGO == 3 */ } // namespace cln cln-1.3.3/src/integer/gcd/cl_I_gcd_aux.cc0000644000000000000000000000413211201634740015006 0ustar // partial_gcd(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "integer/cl_I.h" // Implementation. #include "cln/integer.h" #include "base/digit/cl_D.h" namespace cln { void partial_gcd (uintD z1, uintD z2, partial_gcd_result* erg) { var uintD x1 = 1; var uintD y1 = 0; var uintD x2 = 0; var uintD y2 = 1; for (;;) { // Hier ist z1-y1>=z2+y2. // Bestimme q := floor((z1-y1)/(z2+y2)) >= 1 : { var uintD zaehler = z1-y1; var uintD nenner = z2+y2; // z2+y2 <= z1-y1 < beta ! if (floor(zaehler,8) >= nenner) // zaehler >= 8*nenner ? // ja -> Dividieren lohnt sich wohl { var uintD q = floorD(zaehler,nenner); x1 += muluD_unchecked(q,x2); // x1 := x1+q*x2 y1 += muluD_unchecked(q,y2); // y1 := y1+q*y2 z1 -= muluD_unchecked(q,z2); // z1 := z1-q*z2 } else // nein -> ein paarmal subtrahieren ist wohl schneller do { x1 += x2; y1 += y2; z1 -= z2; } // (x1,y1,z1) := (x1+x2,y1+y2,z1-z2) while (z1-y1 >= nenner); } if (z2-x2 <= z1+x1-1) break; // Hier ist z2-x2>=z1+x1. // Bestimme q := floor((z2-x2)/(z1+x1)) >= 1 : { var uintD zaehler = z2-x2; var uintD nenner = z1+x1; // z1+x1 <= z2-x2 < beta ! if (floor(zaehler,8) >= nenner) // zaehler >= 8*nenner ? // ja -> Dividieren lohnt sich wohl { var uintD q = floorD(zaehler,nenner); x2 += muluD_unchecked(q,x1); // x2 := x2+q*x1 y2 += muluD_unchecked(q,y1); // y2 := y2+q*y1 z2 -= muluD_unchecked(q,z1); // z2 := z2-q*z1 } else // nein -> ein paarmal subtrahieren ist wohl schneller do { x2 += x1; y2 += y1; z2 -= z1; } // (x2,y2,z2) := (x2+x1,y2+y1,z2-z1) while (z2-x2 >= nenner); } if (z1-y1 <= z2+y2-1) break; } // Keine Subtraktion mehr möglich. erg->x1 = x1; erg->y1 = y1; erg->x2 = x2; erg->y2 = y2; // Ergebnis } } // namespace cln cln-1.3.3/src/integer/gcd/cl_low_gcd.cc0000644000000000000000000000506611201634740014551 0ustar // gcd(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. namespace cln { // Liefert den ggT zweier Integers. // gcd(a,b) // > a,b: zwei Integers // < ergebnis: (gcd a b), ein Integer >=0 uintV gcd (uintV a, uintV b) // binäre Methode: // (gcd a b) :== // (prog ((j 0)) // 1 {a,b >0} // (when (oddp a) (if (oddp b) (go 2) (go 4))) // (when (oddp b) (go 3)) // (incf j) (setq a (/ a 2)) (setq b (/ b 2)) // (go 1) // 2 {a,b >0, beide ungerade} // (cond ((> a b) (setq a (- a b)) (go 3)) // ((= a b) (go 5)) // ((< a b) (setq b (- b a)) (go 4)) // ) // 3 {a,b >0, a gerade, b ungerade} // (repeat (setq a (/ a 2)) (until (oddp a))) // (go 2) // 4 {a,b >0, a ungerade, b gerade} // (repeat (setq b (/ b 2)) (until (oddp b))) // (go 2) // 5 {a=b>0} // (return (ash a j)) // ) // Statt j zu erhöhen und immer Bit 0 von a und b abfragen, // fragen wir stattdessen immer Bit j von a und b ab; Bits j-1..0 sind =0. { #ifdef DUMMER_GGT // so macht's ein Mathematiker: if (a==0) { return b; } if (b==0) { return a; } var uintV bit_j = bit(0); loop { // a,b >0 if (!((a & bit_j) ==0)) { if (!((b & bit_j) ==0)) goto odd_odd; else goto odd_even; } if (!((b & bit_j) ==0)) goto even_odd; // a,b >0 gerade bit_j = bit_j<<1; } #else // Trick von B. Degel: var uintV bit_j = (a | b); // endet mit einer 1 und j Nullen bit_j = bit_j ^ (bit_j - 1); // Maske = bit(j) | bit(j-1) | ... | bit(0) if (!((a & bit_j) ==0)) { if (!((b & bit_j) ==0)) goto odd_odd; else if (b==0) return a; else goto odd_even; } if (!((b & bit_j) ==0)) { if (a==0) return b; else goto even_odd; } return 0; // a=b=0 -> Ergebnis 0 #endif loop { odd_odd: // a,b >0, beide ungerade // Vergleiche a und b: if (a == b) break; // a=b>0 -> fertig if (a > b) // a>b ? { a = a-b; even_odd: // a,b >0, a gerade, b ungerade do { a = a>>1; } while ((a & bit_j) ==0); } else // a0, a ungerade, b gerade do { b = b>>1; } while ((b & bit_j) ==0); } } // a=b>0 return a; } } // namespace cln cln-1.3.3/src/integer/cl_I.h0000644000000000000000000006374012034113706012432 0ustar // cl_I internals #ifndef _CL_I_H #define _CL_I_H #include "cln/number.h" #include "cln/integer.h" #include "base/cl_macros.h" #include "cln/malloc.h" #include "cln/exception.h" #include "base/cl_offsetof.h" #include "base/digitseq/cl_DS.h" namespace cln { // maximal needed length of a digit sequence for a fixnum #define FN_maxlength ceiling(cl_value_len,intDsize) // maximal needed length (without sign) of a digit sequence for a fixnum #define pFN_maxlength ceiling(cl_value_len-1,intDsize) // minimum length of a digit sequence for a bignum #define bn_minlength ceiling((cl_value_len+1),intDsize) // Because bignums with n < ceiling((cl_value_len+1)/intDsize) digits are // integers with at most n*intDsize < cl_value_len+1 bits, so they fit into // a fixnum, including the sign bit. // 1 <= bn_minlength <= 5. // We have pFN_maxlength <= FN_maxlength <= bn_minlength. // Private fixnum constructor. inline cl_I::cl_I (struct cl_fixnum * null, cl_uint w) : cl_RA ((cl_private_thing) w) { unused null; } inline const cl_I cl_I_from_word (cl_uint w) { return cl_I((struct cl_fixnum *) 0, w); } inline cl_uint cl_FN_word (const cl_I& x) { return x.word; } // Bignums. struct cl_heap_bignum : cl_heap { uintC length; // length (in digits) uintD data[1]; // number in two's complement representation }; inline cl_heap_bignum* TheBignum (cl_heap_bignum* p) { return p; } inline cl_heap_bignum* TheBignum (const cl_number& obj) { return (cl_heap_bignum*)(obj.pointer); } inline cl_heap_bignum* allocate_bignum (uintC length) { cl_heap_bignum* p = (cl_heap_bignum*) malloc_hook(offsetofa(cl_heap_bignum,data)+sizeof(uintD)*length); p->refcount = 1; p->type = &cl_class_bignum; p->length = length; return p; } // Private constructor. // ptr should be the result of some allocate_bignum() call. inline cl_I::cl_I (cl_heap_bignum* ptr) : cl_RA ((cl_private_thing) ptr) {} // Both work, but the first definition results in less compiler-generated // temporaries. #if 1 #define Bignum cl_heap_bignum* #else #define Bignum cl_I #endif // Integers in general. // Type tests. inline bool integerp (const cl_I& x) { unused x; return true; } inline bool fixnump (const cl_I& x) { return !x.pointer_p(); } inline bool bignump (const cl_I& x) { return x.pointer_p(); } // Sign test: // (MINUSP x) == (< x 0) inline bool minusp (const cl_I& x) { if (fixnump(x)) // This assumes cl_value_shift + cl_value_len == cl_pointer_size. return (cl_sint) x.word < 0; else return (sintD)mspref(arrayMSDptr(TheBignum(x)->data,TheBignum(x)->length),0) < 0; } // (ZEROP x) == (= x 0) inline bool zerop (const cl_I& x) { return x.word == cl_combine(cl_FN_tag,0); } // (EQ x y) == (= x y), assuming y a fixnum inline bool eq (const cl_I& x, sint32 y) { return x.word == cl_combine(cl_FN_tag,y); } // Umwandlungsroutinen Integer <--> Longword: // Wandelt Fixnum >=0 in Unsigned Longword um. // FN_to_UV(obj) // > obj: ein Fixnum >=0 // < ergebnis: der Wert des Fixnum als intVsize-Bit-Zahl. inline uintV FN_to_UV (const cl_I& x) { // This assumes cl_value_shift + cl_value_len == cl_pointer_size. return (cl_uint)(x.word) >> cl_value_shift; } // Wandelt Fixnum in Longword um. // FN_to_V(obj) // > obj: ein Fixnum // < ergebnis: der Wert des Fixnum als intVsize-Bit-Zahl. inline sintV FN_to_V (const cl_I& x) { // This assumes cl_value_shift + cl_value_len == cl_pointer_size. return (cl_sint)(x.word) >> cl_value_shift; } // FN_V_zerop(x,x_) stellt fest, ob x = 0 ist. // Dabei ist x ein Fixnum und x_ = FN_to_V(x). #define FN_V_zerop(x,x_) (x_==0) // FN_V_minusp(x,x_) stellt fest, ob x < 0 ist. // Dabei ist x ein Fixnum und x_ = FN_to_V(x). #define FN_V_minusp(x,x_) (x_<0) #ifdef intQsize // Wandelt Fixnum in Quadword um. // FN_to_Q(obj) // > obj: ein Fixnum // < ergebnis: der Wert des Fixnum als 64-Bit-Zahl. inline sint64 FN_to_Q (const cl_I& x) { // This assumes cl_value_shift + cl_value_len == cl_pointer_size. return (cl_sint)(x.word) >> cl_value_shift; } // Wandelt Integer >=0 in Unsigned Quadword um. // cl_I_to_UQ(obj) // > obj: ein Objekt, sollte ein Integer >=0, <2^64 sein // < ergebnis: der Wert des Integer als 64-Bit-Zahl. extern uint64 cl_I_to_UQ (const cl_I& obj); // Wandelt Integer in Signed Quadword um. // cl_I_to_Q(obj) // > obj: ein Objekt, sollte ein Integer >=-2^63, <2^63 sein // < ergebnis: der Wert des Integer als 64-Bit-Zahl. extern sint64 cl_I_to_Q (const cl_I& obj); #endif // Wandelt Longword in Fixnum um. // L_to_FN(wert) // > wert: Wert des Fixnums, ein signed 32-Bit-Integer // >= -2^(cl_value_len-1), < 2^(cl_value_len-1) // < ergebnis: Fixnum mit diesem Wert. inline const cl_I L_to_FN (sint32 wert) { return cl_I_from_word(cl_combine(cl_FN_tag,wert)); } // Wandelt Longword in Integer um. // L_to_I(wert) // > wert: Wert des Integers, ein signed 32-Bit-Integer. // < ergebnis: Integer mit diesem Wert. #if (cl_value_len >= 32) #define L_to_I(wert) L_to_FN(wert) #else extern cl_private_thing cl_I_constructor_from_L (sint32 wert); inline const cl_I L_to_I (sint32 wert) { return cl_I(cl_I_constructor_from_L(wert)); } #endif // Wandelt Unsigned Longword in Fixnum >=0 um. // UL_to_FN(wert) // > wert: Wert des Integers, ein unsigned 32-Bit-Integer < 2^(cl_value_len-1). // < ergebnis: Fixnum mit diesem Wert. inline const cl_I UL_to_FN (uint32 wert) { return cl_I_from_word(cl_combine(cl_FN_tag,wert)); } // Wandelt Unsigned Longword in Integer >=0 um. // UL_to_I(wert) // > wert: Wert des Integers, ein unsigned 32-Bit-Integer. // < ergebnis: Integer mit diesem Wert. #if (cl_value_len > 32) #define UL_to_I(wert) UL_to_FN(wert) #else extern cl_private_thing cl_I_constructor_from_UL (uint32 wert); inline const cl_I UL_to_I (uint32 wert) { return cl_I(cl_I_constructor_from_UL(wert)); } #endif #ifdef intQsize // Wandelt Quadword in Integer um. // Q_to_I(wert) // > wert: Wert des Integers, ein signed 64-Bit-Integer. // < ergebnis: Integer mit diesem Wert. extern cl_private_thing cl_I_constructor_from_Q (sint64 wert); inline const cl_I Q_to_I (sint64 wert) { return cl_I(cl_I_constructor_from_Q(wert)); } // Wandelt Unsigned Quadword in Integer >=0 um. // UQ_to_I(wert) // > wert: Wert des Integers, ein unsigned 64-Bit-Integer. // < ergebnis: Integer mit diesem Wert. extern cl_private_thing cl_I_constructor_from_UQ (uint64 wert); inline const cl_I UQ_to_I (uint64 wert) { return cl_I(cl_I_constructor_from_UQ(wert)); } extern cl_private_thing cl_I_constructor_from_Q2 (sint64 wert_hi, uint64 wert_lo ); inline const cl_I Q2_to_I( sint64 wert_hi, uint64 wert_lo) { return cl_I(cl_I_constructor_from_Q2(wert_hi, wert_lo)); } #endif // Wandelt Doppel-Longword in Integer um. // L2_to_I(wert_hi,wert_lo) // > wert_hi|wert_lo: Wert des Integers, ein signed 64-Bit-Integer. // < ergebnis: Integer mit diesem Wert. #if (cl_word_size==64) inline cl_private_thing cl_I_constructor_from_L2 (sint32 wert_hi, uint32 wert_lo) { return cl_I_constructor_from_Q(((sint64)wert_hi<<32) | (sint64)wert_lo); } #else extern cl_private_thing cl_I_constructor_from_L2 (sint32 wert_hi, uint32 wert_lo); #endif inline const cl_I L2_to_I (sint32 wert_hi, uint32 wert_lo) { return cl_I(cl_I_constructor_from_L2(wert_hi,wert_lo)); } // Wandelt Unsigned Doppel-Longword in Integer um. // UL2_to_I(wert_hi,wert_lo) // > wert_hi|wert_lo: Wert des Integers, ein unsigned 64-Bit-Integer. // < ergebnis: Integer mit diesem Wert. #if (cl_word_size==64) inline cl_private_thing cl_I_constructor_from_UL2 (uint32 wert_hi, uint32 wert_lo) { return cl_I_constructor_from_UQ(((uint64)wert_hi<<32) | (uint64)wert_lo); } #else extern cl_private_thing cl_I_constructor_from_UL2 (uint32 wert_hi, uint32 wert_lo); #endif inline const cl_I UL2_to_I (uint32 wert_hi, uint32 wert_lo) { return cl_I(cl_I_constructor_from_UL2(wert_hi,wert_lo)); } // Wandelt sintV in Integer um. // V_to_I(wert) // > wert: Wert des Integers, ein sintV. // < ergebnis: Integer mit diesem Wert. #if (intVsize<=32) #define V_to_I(wert) L_to_I(wert) #else #define V_to_I(wert) Q_to_I(wert) #endif // Wandelt uintV in Integer >=0 um. // UV_to_I(wert) // > wert: Wert des Integers, ein uintV. // < ergebnis: Integer mit diesem Wert. #if (intVsize<=32) #define UV_to_I(wert) UL_to_I(wert) #else #define UV_to_I(wert) UQ_to_I(wert) #endif // Wandelt sintE in Integer um. // E_to_I(wert) // > wert: Wert des Integers, ein sintE. // < ergebnis: Integer mit diesem Wert. #if (intEsize<=32) #define E_to_I(wert) L_to_I(wert) #else #define E_to_I(wert) Q_to_I(wert) #endif // Wandelt uintE in Integer >=0 um. // UE_to_I(wert) // > wert: Wert des Integers, ein uintE. // < ergebnis: Integer mit diesem Wert. #if (intEsize<=32) #define UE_to_I(wert) UL_to_I(wert) #else #define UE_to_I(wert) UQ_to_I(wert) #endif // Wandelt uintD in Integer >=0 um. // UD_to_I(wert) // > wert: Wert des Integers, ein uintD. // < ergebnis: Integer mit diesem Wert. #if (intDsize < cl_value_len) #define UD_to_I(wert) UL_to_FN(wert) #elif (intDsize<=32) #define UD_to_I(wert) UL_to_I(wert) #elif (intDsize==64) #define UD_to_I(wert) UQ_to_I(wert) #endif // Liefert die Differenz x-y zweier Unsigned Longwords x,y als Integer. // minus(x,y) inline const cl_I minus (uintL x, uintL y) { #if (cl_word_size==64) return Q_to_I((sintQ)(uintQ)x - (sintQ)(uintQ)y); #else return L2_to_I( (x Longword: #if (intDsize<=32) // Holt die nächsten pFN_maxlength Digits in ein uintV. inline uintV pFN_maxlength_digits_at (const uintD* ptr) { #if (pFN_maxlength==1) return (uintV)lspref(ptr,0); #elif (pFN_maxlength==2) return ((uintV)lspref(ptr,1)<>intDsize); lspref(ptr,0) = (uintD)(wert); #elif (pFN_maxlength==3) lspref(ptr,2) = (uintD)(wert>>(2*intDsize)); lspref(ptr,1) = (uintD)(wert>>intDsize); lspref(ptr,0) = (uintD)(wert); #elif (pFN_maxlength==4) lspref(ptr,3) = (uintD)(wert>>(3*intDsize)); lspref(ptr,2) = (uintD)(wert>>(2*intDsize)); lspref(ptr,1) = (uintD)(wert>>intDsize); lspref(ptr,0) = (uintD)(wert); #elif (pFN_maxlength==5) lspref(ptr,4) = (uintD)(wert>>(4*intDsize)); lspref(ptr,3) = (uintD)(wert>>(3*intDsize)); lspref(ptr,2) = (uintD)(wert>>(2*intDsize)); lspref(ptr,1) = (uintD)(wert>>intDsize); lspref(ptr,0) = (uintD)(wert); #elif (pFN_maxlength==6) lspref(ptr,5) = (uintD)(wert>>(5*intDsize)); lspref(ptr,4) = (uintD)(wert>>(4*intDsize)); lspref(ptr,3) = (uintD)(wert>>(3*intDsize)); lspref(ptr,2) = (uintD)(wert>>(2*intDsize)); lspref(ptr,1) = (uintD)(wert>>intDsize); lspref(ptr,0) = (uintD)(wert); #elif (pFN_maxlength==7) lspref(ptr,6) = (uintD)(wert>>(6*intDsize)); lspref(ptr,5) = (uintD)(wert>>(5*intDsize)); lspref(ptr,4) = (uintD)(wert>>(4*intDsize)); lspref(ptr,3) = (uintD)(wert>>(3*intDsize)); lspref(ptr,2) = (uintD)(wert>>(2*intDsize)); lspref(ptr,1) = (uintD)(wert>>intDsize); lspref(ptr,0) = (uintD)(wert); #elif (pFN_maxlength==8) lspref(ptr,7) = (uintD)(wert>>(7*intDsize)); lspref(ptr,6) = (uintD)(wert>>(6*intDsize)); lspref(ptr,5) = (uintD)(wert>>(5*intDsize)); lspref(ptr,4) = (uintD)(wert>>(4*intDsize)); lspref(ptr,3) = (uintD)(wert>>(3*intDsize)); lspref(ptr,2) = (uintD)(wert>>(2*intDsize)); lspref(ptr,1) = (uintD)(wert>>intDsize); lspref(ptr,0) = (uintD)(wert); #endif } #elif (intDsize==64) // Holt die nächsten pFN_maxlength Digits in ein uint64. inline uint64 pFN_maxlength_digits_at (const uintD* ptr) { return (uint64)lspref(ptr,0); } #endif // Umwandlungsroutinen Digit sequence --> Integer: // Normalized Digit sequence to Integer // NDS_to_I(MSDptr,len) // Digit Sequence MSDptr/len/.. in Integer umwandeln. extern const cl_I NDS_to_I (const uintD* MSDptr, uintC len); // Normalized Unsigned Digit Sequence to Integer // NUDS_to_I(MSDptr,len) // Normalized UDS MSDptr/len/.. in Integer >=0 umwandeln. // Unterhalb von MSDptr muß 1 Digit Platz sein. extern const cl_I NUDS_to_I (uintD* MSDptr, uintC len); // Unsigned Digit Sequence to Integer // UDS_to_I(MSDptr,len) // UDS MSDptr/len/.. in Integer >=0 umwandeln. // Unterhalb von MSDptr muß 1 Digit Platz sein. extern const cl_I UDS_to_I (uintD* MSDptr, uintC len); // Digit Sequence to Integer // DS_to_I(MSDptr,len) // DS MSDptr/len/.. in Integer umwandeln. extern const cl_I DS_to_I (const uintD* MSDptr, uintC len); // Umwandlungsroutinen Integer --> Digit sequence: // Unterteilung eines Fixnums in Digits: // intDsize=8 -> MSD=LSD3,LSD2,LSD1,LSD0, sollte FN_maxlength=4 sein. // intDsize=16 -> MSD=LSD1,LSD0, sollte FN_maxlength=2 sein. // intDsize=32 -> MSD=LSD0, sollte FN_maxlength=1 sein. inline sintD FN_MSD (cl_uint word) { // This assumes cl_value_shift + cl_value_len == cl_pointer_size. return (cl_sint)word >> (cl_value_shift + (FN_maxlength-1)*intDsize); } #if (FN_maxlength==1) #define FN_LSD0(word) FN_MSD(word) #define FN_LSD1(word) (throw runtime_exception(), (uintD)0) // never used #define FN_LSD2(word) (throw runtime_exception(), (uintD)0) // never used #define FN_LSD3(word) (throw runtime_exception(), (uintD)0) // never used #endif #if (FN_maxlength==2) inline uintD FN_LSD0 (cl_uint word) { return (uintD)(word >> cl_value_shift); } #define FN_LSD1(word) FN_MSD(word) #define FN_LSD2(word) (throw runtime_exception(), (uintD)0) // never used #define FN_LSD3(word) (throw runtime_exception(), (uintD)0) // never used #endif #if (FN_maxlength==4) inline uintD FN_LSD0 (cl_uint word) { return (uintD)(word >> cl_value_shift); } inline uintD FN_LSD1 (cl_uint word) { return (uintD)(word >> (cl_value_shift + intDsize)); } inline uintD FN_LSD2 (cl_uint word) { return (uintD)(word >> (cl_value_shift + 2*intDsize)); } #define FN_LSD3(word) FN_MSD(word) #endif // wird nur bei FN_maxlength >= 2 gebraucht, d.h. intDsize < cl_value_len #define FN_MSD1_mask ((~(cl_uint)(bitc(intDsize-1)-1)) << cl_value_shift) // wird nur bei FN_maxlength >= 3 gebraucht, d.h. 2*intDsize < cl_value_len #define FN_MSD2_mask ((~(cl_uint)(bitc(2*intDsize-1)-1)) << cl_value_shift) // wird nur bei FN_maxlength >= 4 gebraucht, d.h. 3*intDsize < cl_value_len #define FN_MSD3_mask ((~(cl_uint)(bitc(3*intDsize-1)-1)) << cl_value_shift) // Store a Fixnum at destLSDptr, <= FN_maxlength digits below destLSDptr needed. #define FN_to_NDS(destLSDptr, word, MSDptr_zuweisung,len_zuweisung,LSDptr_zuweisung, check_for_0,zero_statement) \ { var uintC len_from_FN_to_NDS; \ if (check_for_0 && (word == cl_combine(cl_FN_tag,0))) \ { len_from_FN_to_NDS = 0; zero_statement } \ else \ { var cl_uint testMSD; \ if ((FN_maxlength<=1) || \ ((testMSD = (word) & FN_MSD1_mask) == 0) || (testMSD == FN_MSD1_mask) \ ) \ { len_from_FN_to_NDS = 1; \ lspref(destLSDptr,0) = FN_LSD0(word); \ } \ elif ((FN_maxlength<=2) || \ ((testMSD = (word) & FN_MSD2_mask) == 0) || (testMSD == FN_MSD2_mask) \ ) \ { len_from_FN_to_NDS = 2; \ lspref(destLSDptr,0) = FN_LSD0(word); \ lspref(destLSDptr,1) = FN_LSD1(word); \ } \ elif ((FN_maxlength<=3) || \ ((testMSD = (word) & FN_MSD3_mask) == 0) || (testMSD == FN_MSD3_mask) \ ) \ { len_from_FN_to_NDS = 3; \ lspref(destLSDptr,0) = FN_LSD0(word); \ lspref(destLSDptr,1) = FN_LSD1(word); \ lspref(destLSDptr,2) = FN_LSD2(word); \ } \ else /* (FN_maxlength<=4) */ \ { len_from_FN_to_NDS = 4; \ lspref(destLSDptr,0) = FN_LSD0(word); \ lspref(destLSDptr,1) = FN_LSD1(word); \ lspref(destLSDptr,2) = FN_LSD2(word); \ lspref(destLSDptr,3) = FN_LSD3(word); \ } \ } \ unused (MSDptr_zuweisung (destLSDptr) lspop len_from_FN_to_NDS); \ unused (len_zuweisung len_from_FN_to_NDS); \ unused (LSDptr_zuweisung (destLSDptr)); \ } // Bignum to Normalized Digit sequence, Kopieren unnötig // BN_to_NDS_nocopy(obj, MSDptr=,len=,LSDptr=); // > obj: ein Bignum // < MSDptr/len/LSDptr: Normalized Digit sequence #if CL_DS_BIG_ENDIAN_P #define BN_to_NDS_nocopy(obj, MSDptr_zuweisung,len_zuweisung,LSDptr_zuweisung) \ { var Bignum bn_from_BN_to_NDS_nocopy = TheBignum(obj); \ unused (MSDptr_zuweisung (const uintD*) &bn_from_BN_to_NDS_nocopy->data[0]); \ unused (LSDptr_zuweisung (const uintD*) &bn_from_BN_to_NDS_nocopy->data[(uintP)( len_zuweisung bn_from_BN_to_NDS_nocopy->length )]); \ } #else #define BN_to_NDS_nocopy(obj, MSDptr_zuweisung,len_zuweisung,LSDptr_zuweisung) \ { var Bignum bn_from_BN_to_NDS_nocopy = TheBignum(obj); \ unused (LSDptr_zuweisung (const uintD*) &bn_from_BN_to_NDS_nocopy->data[0]); \ unused (MSDptr_zuweisung (const uintD*) &bn_from_BN_to_NDS_nocopy->data[(uintP)( len_zuweisung bn_from_BN_to_NDS_nocopy->length )]); \ } #endif inline const uintD* BN_MSDptr (const cl_I& obj) { var Bignum bn = TheBignum(obj); return (const uintD*) arrayMSDptr(bn->data,bn->length); } inline const uintD* BN_LSDptr (const cl_I& obj) { var Bignum bn = TheBignum(obj); return (const uintD*) arrayLSDptr(bn->data,bn->length); } // Bignum to Normalized Digit sequence // BN_to_NDS(obj, MSDptr=,len=,LSDptr=); // > obj: ein Bignum // < MSDptr/len/LSDptr: Normalized Digit sequence, darf modifiziert werden. // Dabei wird num_stack erniedrigt. #define BN_to_NDS(obj, MSDptr_zuweisung,len_zuweisung,LSDptr_zuweisung) \ { var const cl_I& obj_from_BN_to_NDS = (obj); \ var uintD* MSDptr_from_BN_to_NDS; \ var uintC len_from_BN_to_NDS; \ len_zuweisung len_from_BN_to_NDS = TheBignum(obj_from_BN_to_NDS)->length; \ num_stack_alloc(len_from_BN_to_NDS, MSDptr_zuweisung MSDptr_from_BN_to_NDS = , LSDptr_zuweisung); \ copy_loop_msp(BN_MSDptr(obj_from_BN_to_NDS),MSDptr_from_BN_to_NDS,len_from_BN_to_NDS); \ } // Bignum to Normalized Digit sequence // BN_to_NDS_1(obj, MSDptr=,len=,LSDptr=); // > obj: ein Bignum // < MSDptr/len/LSDptr: Normalized Digit sequence, darf modifiziert werden. // Unterhalb von MSDptr ist noch 1 Digit Platz. // Dabei wird num_stack erniedrigt. #define BN_to_NDS_1(obj, MSDptr_zuweisung,len_zuweisung,LSDptr_zuweisung) \ { var const cl_I& obj_from_BN_to_NDS = (obj); \ var uintD* MSDptr_from_BN_to_NDS; \ var uintC len_from_BN_to_NDS; \ len_zuweisung len_from_BN_to_NDS = TheBignum(obj_from_BN_to_NDS)->length; \ num_stack_alloc_1(len_from_BN_to_NDS, MSDptr_zuweisung MSDptr_from_BN_to_NDS = , LSDptr_zuweisung); \ copy_loop_msp(BN_MSDptr(obj_from_BN_to_NDS),MSDptr_from_BN_to_NDS,len_from_BN_to_NDS); \ } // Integer to Normalized Digit sequence, Kopieren unnötig. // I_to_NDS_nocopy(obj, MSDptr=,len=,LSDptr=,check_for_0,zero_statement); // > obj: ein Integer // > check_for_0: ob obj möglicherweise =0 sein kann // > zero_statement: wird bei obj=0 ausgeführt // < MSDptr/len/LSDptr: Normalized Digit sequence #define I_to_NDS_nocopy(obj, MSDptr_zuweisung,len_zuweisung,LSDptr_zuweisung, check_for_0,zero_statement) \ var uintD CONCAT(FN_store_,__LINE__) [FN_maxlength]; \ { var const cl_I& obj_from_I_to_NDS_nocopy = (obj); \ if (fixnump(obj_from_I_to_NDS_nocopy)) \ { FN_to_NDS(arrayLSDptr(CONCAT(FN_store_,__LINE__),FN_maxlength), cl_FN_word(obj_from_I_to_NDS_nocopy), MSDptr_zuweisung,len_zuweisung,LSDptr_zuweisung, check_for_0,zero_statement); } \ else \ { BN_to_NDS_nocopy(obj_from_I_to_NDS_nocopy,MSDptr_zuweisung,len_zuweisung, LSDptr_zuweisung); } \ } // Integer to Normalized Digit sequence // I_to_NDS(obj, MSDptr=,len=,LSDptr=); // > obj: ein Integer // < MSDptr/len/LSDptr: Normalized Digit sequence, darf modifiziert werden. // Dabei wird num_stack erniedrigt. #define I_to_NDS(obj, MSDptr_zuweisung,len_zuweisung,LSDptr_zuweisung) \ var uintD CONCAT(FN_store_,__LINE__) [FN_maxlength]; \ { var const cl_I& obj_from_I_to_NDS = (obj); \ if (fixnump(obj_from_I_to_NDS)) \ { FN_to_NDS(arrayLSDptr(CONCAT(FN_store_,__LINE__),FN_maxlength), cl_FN_word(obj_from_I_to_NDS), MSDptr_zuweisung,len_zuweisung,LSDptr_zuweisung, true,); } \ else \ { BN_to_NDS(obj_from_I_to_NDS,MSDptr_zuweisung,len_zuweisung, LSDptr_zuweisung); } \ } // Integer to Normalized Digit sequence // I_to_NDS_1(obj, MSDptr=,len=,LSDptr=); // > obj: ein Integer // < MSDptr/len/LSDptr: Normalized Digit sequence, darf modifiziert werden. // Unterhalb von MSDptr ist noch 1 Digit Platz. // Dabei wird num_stack erniedrigt. #define I_to_NDS_1(obj, MSDptr_zuweisung,len_zuweisung,LSDptr_zuweisung) \ var uintD CONCAT(FN_store_,__LINE__) [1+FN_maxlength]; \ { var const cl_I& obj_from_I_to_NDS = (obj); \ if (fixnump(obj_from_I_to_NDS)) \ { FN_to_NDS(arrayLSDptr(CONCAT(FN_store_,__LINE__),1+FN_maxlength), cl_FN_word(obj_from_I_to_NDS), MSDptr_zuweisung,len_zuweisung,LSDptr_zuweisung, true,); } \ else \ { BN_to_NDS_1(obj_from_I_to_NDS,MSDptr_zuweisung,len_zuweisung, LSDptr_zuweisung); } \ } // Division ganzer Zahlen // Dividiert zwei Integers x,y >=0 und liefert Quotient und Rest // der Division x/y. Bei y=0 Error. // cl_divide(x,y) // > x,y: Integers >=0 // < q,r: Quotient q, Rest r extern const cl_I_div_t cl_divide (const cl_I& x, const cl_I& y); // ggT und kgV von Integers // Teilfunktion für die Durchführung des Euklid-Algorithmus auf // den führenden Ziffern a' und b': // partial_gcd(a',b',&erg); mit a'>b' // liefert in erg: x1,y1,x2,y2 mit den in cl_I_gcd.cc angegebenen Invarianten. typedef struct { uintD x1,y1,x2,y2; } partial_gcd_result; extern void partial_gcd (uintD z1, uintD z2, partial_gcd_result* erg); #if HAVE_DD extern void partial_gcd (uintDD z1, uintDD z2, partial_gcd_result* erg); #else extern void partial_gcd (uintD z1hi, uintD z1lo, uintD z2hi, uintD z2lo, partial_gcd_result* erg); #endif // Wurzel aus ganzen Zahlen // Stellt fest, ob ein Integer >=0 eine n-te Potenz ist. // cl_rootp_aux(x,n,&w) // > x: ein Integer >=0 // > n: ein Integer >0 // > Annahme: x > 1 und n < (integer-length x). // < w: Integer (expt x (/ n)) falls x eine n-te Potenz // < ergebnis: true ........................, false sonst extern bool cl_rootp_aux (cl_I x, uintL n, cl_I* w); // Hilfsfunktion zur Eingabe von Integers // Wandelt eine Ziffernfolge in ein Integer >=0 um. // digits_to_I(MSBptr,len,base) // > base: Stellenwertsystem-Basis, >=2, <=36 // > MSBptr/len/..: Ziffernfolge, bestehend aus Punkten (werden überlesen) // und Ziffern/Buchstaben mit Wert < base. // < ergebnis: der dargestellte Integer >=0 extern const cl_I digits_to_I (const char * MSBptr, uintC len, uintD base); // Hilfsfunktion zur Ausgabe von Integers // cl_digits_need(len,base) liefert eine obere Abschätzung für die Anzahl der // Ziffern im Stellenwertsystem der Basis base, die x >= 0 braucht. extern uintC cl_digits_need (const cl_I& x, uintL base); // Wandelt ein Integer in ein Stellensystem um. // I_to_digits(x,base, &ergebnis); // > x: ein Integer >=0 // > base: Stellensystem-Basis, 2 <= base <= 36. // > ergebnis.LSBptr: darunter ist mindestens digits_need(len) Bytes Platz // < ergebnis: fertige Folge MSBptr/len/LSBptr von Ziffern typedef struct { uintB* MSBptr; uintC len; uintB* LSBptr; } cl_digits; extern void I_to_digits (const cl_I& x, uintD base, cl_digits* erg); // Hash code. extern unsigned long hashcode (const cl_I& x); // A fixnum (cl_FN) is an immediate integer. // typedef class cl_FN : public cl_I { public: // Optimization of method pointer_p(). bool pointer_p() const { return false; } }; inline bool fixnump (const cl_FN& x) { unused x; return true; } inline bool bignump (const cl_FN& x) { unused x; return false; } inline bool minusp (const cl_FN& x) { // This assumes cl_value_shift + cl_value_len == cl_pointer_size. return (cl_sint) x.word < 0; } // A bignum (cl_BN) is a heap-allocated integer. // typedef class cl_BN : public cl_I { public: // Optimization of method pointer_p(). bool pointer_p() const { return true; } }; inline bool fixnump (const cl_BN& x) { unused x; return false; } inline bool bignump (const cl_BN& x) { unused x; return true; } inline bool minusp (const cl_BN& x) { return (sintD)mspref(arrayMSDptr(TheBignum(x)->data,TheBignum(x)->length),0) < 0; } inline bool zerop (const cl_BN& x) { unused x; return false; } } // namespace cln #endif /* _CL_I_H */ cln-1.3.3/src/integer/output/0000755000000000000000000000000012173046201012740 5ustar cln-1.3.3/src/integer/output/cl_I_aprint.cc0000644000000000000000000000054211201634740015475 0ustar // print_integer(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer_io.h" // Implementation. #include "cln/output.h" namespace cln { void print_integer (std::ostream& stream, const cl_print_flags& flags, const cl_I& z) { print_integer(stream,(const cl_print_number_flags&)flags,z); } } // namespace cln cln-1.3.3/src/integer/output/cl_I_print.cc0000644000000000000000000000153611201634740015340 0ustar // print_integer(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer_io.h" // Implementation. #include "cln/io.h" #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { void print_integer (std::ostream& stream, unsigned int base, const cl_I& z) { var cl_I abs_z; if (minusp(z)) { // z<0 -> Vorzeichen ausgeben: fprintchar(stream,'-'); abs_z = -z; } else abs_z = z; CL_ALLOCA_STACK; var uintC need = cl_digits_need(abs_z,base); var uintB* ziffern = cl_alloc_array(uintB,need); // Platz für die Ziffern var cl_digits erg; erg.LSBptr = &ziffern[need]; I_to_digits(abs_z,(uintD)base,&erg); // Umwandlung in Ziffern // Ziffern ausgeben: { var uintB* ptr = erg.MSBptr; var uintC count = erg.len; do { fprintchar(stream,*ptr++); } until (--count==0); } } } // namespace cln cln-1.3.3/src/integer/output/cl_I_dprint.cc0000644000000000000000000000200411201634740015473 0ustar // print_integer(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer_io.h" // Implementation. #include "cln/output.h" namespace cln { void print_integer (std::ostream& stream, const cl_print_rational_flags& flags, const cl_I& z) { var unsigned int base = flags.rational_base; if (flags.rational_readably) // Radix-Specifier ausgeben: switch (base) { case 2: fprintchar(stream,'#'); fprintchar(stream,'b'); break; case 8: fprintchar(stream,'#'); fprintchar(stream,'o'); break; case 16: fprintchar(stream,'#'); fprintchar(stream,'x'); break; case 10: // Basis 10 bei Integers durch // nachgestellten Punkt kennzeichnen: print_integer(stream,base,z); fprintchar(stream,'.'); return; default: // Basis in #nR-Schreibweise ausgeben: fprintchar(stream,'#'); print_integer(stream,10,base); fprintchar(stream,'r'); break; } // Integer in Basis base ausgeben: print_integer(stream,base,z); } } // namespace cln cln-1.3.3/src/integer/output/cl_I_print_string.cc0000644000000000000000000000175011201634740016724 0ustar // print_integer_to_string(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer_io.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "base/string/cl_sstring.h" namespace cln { char * print_integer_to_string (unsigned int base, const cl_I& z) { var bool minus_p = false; var cl_I abs_z; if (minusp(z)) { // z<0 -> später Vorzeichen ausgeben: minus_p = true; abs_z = -z; } else abs_z = z; CL_ALLOCA_STACK; var uintC need = 1+cl_digits_need(abs_z,base); var uintB* ziffern = cl_alloc_array(uintB,need); // Platz für die Ziffern var cl_digits erg; erg.LSBptr = &ziffern[need]; I_to_digits(abs_z,(uintD)base,&erg); // Umwandlung in Ziffern // Vorzeichen ankleben: var char* ergptr = (char*)erg.MSBptr; var uintC erglen = erg.len; if (minus_p) { *--ergptr = '-'; erglen++; } var char* result = cl_sstring(ergptr,erglen); // Ziffern in String schreiben return result; } } // namespace cln cln-1.3.3/src/integer/output/cl_I_cprint.cc0000644000000000000000000000055111201634740015477 0ustar // print_integer(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer_io.h" // Implementation. #include "cln/output.h" namespace cln { void print_integer (std::ostream& stream, const cl_print_real_flags& flags, const cl_I& z) { print_integer(stream,(const cl_print_rational_flags&)flags,z); } } // namespace cln cln-1.3.3/src/integer/output/cl_I_bprint.cc0000644000000000000000000000054711201634740015503 0ustar // print_integer(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer_io.h" // Implementation. #include "cln/output.h" namespace cln { void print_integer (std::ostream& stream, const cl_print_number_flags& flags, const cl_I& z) { print_integer(stream,(const cl_print_real_flags&)flags,z); } } // namespace cln cln-1.3.3/src/integer/output/cl_I_decstring.cc0000644000000000000000000000122511201634740016161 0ustar // cl_decimal_string(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer_io.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "base/string/cl_sstring.h" namespace cln { char * cl_decimal_string (const cl_I& x) { CL_ALLOCA_STACK; var uintC need = cl_digits_need(x,10); var uintB* ziffern = cl_alloc_array(uintB,need); // Platz für die Ziffern var cl_digits erg; erg.LSBptr = &ziffern[need]; I_to_digits(x,10,&erg); // Umwandlung in Ziffern var char* result = cl_sstring((char*)erg.MSBptr,erg.len); // Ziffern in String schreiben return result; } } // namespace cln cln-1.3.3/src/integer/2adic/0000755000000000000000000000000012173046200012361 5ustar cln-1.3.3/src/integer/2adic/cl_I_2adic_div.cc0000644000000000000000000000243511201634737015457 0ustar // cl_div2adic(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "base/digitseq/cl_DS.h" #include "base/digitseq/cl_2DS.h" #include "integer/bitwise/cl_I_log.h" namespace cln { const cl_I cl_div2adic (uintL n, const cl_I& x, const cl_I& y) { var uintL len = ceiling(n,intDsize); CL_ALLOCA_STACK; var const uintD* x_LSDptr; var const uintD* y_LSDptr; if (bignump(x) && TheBignum(x)->length >= len) // no need to copy x x_LSDptr = BN_LSDptr(x); else { // copy x var uintL x_len = I_to_DS_need(x); if (x_len < len) { x_len = len; } I_to_DS_n(x,x_len,x_LSDptr=); x_LSDptr = x_LSDptr mspop x_len; } if (bignump(y) && TheBignum(y)->length >= len) // no need to copy y y_LSDptr = BN_LSDptr(y); else { // copy y var uintL y_len = I_to_DS_need(y); if (y_len < len) { y_len = len; } I_to_DS_n(y,y_len,y_LSDptr=); y_LSDptr = y_LSDptr mspop y_len; } var uintD* z_LSDptr; num_stack_alloc_1(len,,z_LSDptr=); // Compute quotient mod 2^(intDsize*len). div2adic(len,x_LSDptr,y_LSDptr,z_LSDptr); // Reduce mod 2^n. if ((n % intDsize) != 0) lspref(z_LSDptr,floor(n,intDsize)) &= (bit(n % intDsize) - 1); return UDS_to_I(z_LSDptr lspop len,len); } // Bit complexity (N := n): O(M(N)). } // namespace cln cln-1.3.3/src/integer/2adic/cl_I_2adic_recip.cc0000644000000000000000000000175311201634737016001 0ustar // cl_recip2adic(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "base/digitseq/cl_DS.h" #include "base/digitseq/cl_2DS.h" #include "integer/bitwise/cl_I_log.h" namespace cln { const cl_I cl_recip2adic (uintL n, const cl_I& x) { var uintL len = ceiling(n,intDsize); CL_ALLOCA_STACK; var const uintD* x_LSDptr; if (bignump(x) && TheBignum(x)->length >= len) // no need to copy x x_LSDptr = BN_LSDptr(x); else { // copy x var uintL x_len = I_to_DS_need(x); if (x_len < len) { x_len = len; } I_to_DS_n(x,x_len,x_LSDptr=); x_LSDptr = x_LSDptr mspop x_len; } var uintD* y_LSDptr; num_stack_alloc_1(len,,y_LSDptr=); // Compute inverse mod 2^(intDsize*len). recip2adic(len,x_LSDptr,y_LSDptr); // Reduce mod 2^n. if ((n % intDsize) != 0) lspref(y_LSDptr,floor(n,intDsize)) &= (bit(n % intDsize) - 1); return UDS_to_I(y_LSDptr lspop len,len); } // Bit complexity (N := n): O(M(N)). } // namespace cln cln-1.3.3/src/integer/input/0000755000000000000000000000000012173046201012537 5ustar cln-1.3.3/src/integer/input/cl_I_read.cc0000644000000000000000000001033711201634740014715 0ustar // read_integer(). // This file contains a slimmed down version of read_rational(). // It does not pull in all the rational number code. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer_io.h" // Implementation. #include #include #include "cln/input.h" #include "cln/integer.h" #include "integer/cl_I.h" namespace cln { // Step forward over all digits, to the end of string or to the next non-digit. static const char * skip_digits (const char * ptr, const char * string_limit, unsigned int base) { for ( ; ptr != string_limit; ptr++) { var char ch = *ptr; if ((ch >= '0') && (ch <= '9')) if (ch < '0' + (int)base) continue; else break; else { if (base <= 10) break; if (((ch >= 'A') && (ch < 'A'-10+(int)base)) || ((ch >= 'a') && (ch < 'a'-10+(int)base)) ) continue; else break; } } return ptr; } #define at_end_of_parse(ptr) \ if (end_of_parse) \ { *end_of_parse = (ptr); } \ else \ { if ((ptr) != string_limit) { throw read_number_junk_exception((ptr),string,string_limit); } } const cl_I read_integer (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse) { ASSERT((flags.syntax & ~(syntax_integer|syntax_maybe_bad)) == 0); // If no string_limit is given, it defaults to the end of the string. if (!string_limit) string_limit = string + ::strlen(string); if (flags.syntax & syntax_integer) { // Check for integer syntax. var unsigned int rational_base = flags.rational_base; var const char * ptr = string; if (flags.lsyntax & lsyntax_commonlisp) { if (ptr == string_limit) goto not_integer_syntax; if (*ptr == '#') { // Check for #b, #o, #x, #nR syntax. ptr++; if (ptr == string_limit) goto not_integer_syntax; switch (*ptr) { case 'b': case 'B': rational_base = 2; break; case 'o': case 'O': rational_base = 8; break; case 'x': case 'X': rational_base = 16; break; default: var const char * base_end_ptr = skip_digits(ptr,string_limit,10); if (base_end_ptr == ptr) goto not_integer_syntax; if (base_end_ptr == string_limit) goto not_integer_syntax; if (!((*base_end_ptr == 'r') || (*base_end_ptr == 'R'))) goto not_integer_syntax; var cl_I base = read_integer(10,0,ptr,0,base_end_ptr-ptr); if (!((base >= 2) && (base <= 36))) { std::ostringstream buf; fprint(buf, "Base must be an integer in the range from 2 to 36, not "); fprint(buf, base); throw runtime_exception(buf.str()); } rational_base = FN_to_UV(base); ptr = base_end_ptr; break; } ptr++; } } var const char * ptr_after_prefix = ptr; var cl_signean sign = 0; if (ptr == string_limit) goto not_integer_syntax; switch (*ptr) { case '-': sign = ~sign; case '+': ptr++; default: break; } var const char * ptr_after_sign = ptr; // Check for integer syntax: {'+'|'-'|} {digit}+ {'.'|} // Allow final dot only in Common Lisp syntax if there was no # prefix. if ((flags.lsyntax & lsyntax_commonlisp) && (ptr_after_prefix == string)) { ptr = skip_digits(ptr_after_sign,string_limit,10); if (ptr != ptr_after_sign) if (ptr != string_limit) if (*ptr == '.') { ptr++; if ((ptr == string_limit) || !(((*ptr >= '0') && (*ptr <= '9')) || ((*ptr >= 'A') && (*ptr <= 'Z') && (*ptr != 'I')) || ((*ptr >= 'a') && (*ptr <= 'z') && (*ptr != 'i')) || (*ptr == '.') || (*ptr == '_') || (*ptr == '/'))) { at_end_of_parse(ptr); return read_integer(10,sign,ptr_after_sign,0,ptr-ptr_after_sign); } } } ptr = skip_digits(ptr_after_sign,string_limit,rational_base); if ((ptr == string_limit) || !(((*ptr >= '0') && (*ptr <= '9')) || ((*ptr >= 'A') && (*ptr <= 'Z') && (*ptr != 'I')) || ((*ptr >= 'a') && (*ptr <= 'z') && (*ptr != 'i')) || (*ptr == '.') || (*ptr == '_') || (*ptr == '/'))) { at_end_of_parse(ptr); return read_integer(rational_base,sign,ptr_after_sign,0,ptr-ptr_after_sign); } } not_integer_syntax: if (flags.syntax & syntax_maybe_bad) { ASSERT(end_of_parse); *end_of_parse = string; return 0; // dummy return } throw read_number_bad_syntax_exception(string,string_limit); } } // namespace cln cln-1.3.3/src/integer/input/cl_I_readparsed.cc0000644000000000000000000000073711201634740016117 0ustar // read_integer(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer_io.h" // Implementation. #include "integer/cl_I.h" namespace cln { const cl_I read_integer (unsigned int base, cl_signean sign, const char * string, uintC index1, uintC index2) { var cl_I x = digits_to_I(&string[index1],index2-index1,(uintD)base); if (sign == 0) return x; else return -x; // negatives Vorzeichen -> Vorzeichenwechsel } } // namespace cln cln-1.3.3/src/integer/input/cl_I_read_stream.cc0000644000000000000000000000474111731472024016275 0ustar // read_integer(). // This file contains a slimmed down version of read_rational(). // It does not pull in all the rational number code. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer_io.h" // Implementation. #include "cln/input.h" #include "cln/io.h" #include "base/string/cl_spushstring.h" namespace cln { // We read an entire token (or even more, if it begins with #C) into a // buffer and then call read_integer() on the buffer. class pushstring_hack : public cl_spushstring { public: char* start_pointer (void) { return buffer; } char* end_pointer (void) { return buffer+index; } }; static bool number_char_p (char c) { if ((c >= '0') && (c <= '9')) return true; if (((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z'))) return true; switch (c) { case '+': case '-': case '.': case '_': case '/': return true; default: return false; } } const cl_I read_integer (std::istream& stream, const cl_read_flags& flags) { // One pre-allocated buffer. This reduces the allocation/free cost. static pushstring_hack buffer; var int c; // Skip whitespace at the beginning. loop { c = stream.get(); if (stream.eof() || stream.fail()) goto eof; if ((c == ' ') || (c == '\t') || (c == '\n')) continue; else break; } // Found first non-whitespace character. // Numbers cannot cross lines. We can treat EOF and '\n' the same way. buffer.reset(); if (c == '#') { if (!(flags.lsyntax & lsyntax_commonlisp)) goto syntax1; buffer.push(c); // Read some digits, then a letter, then a token. loop { c = stream.get(); if (stream.eof() || stream.fail()) goto eof; buffer.push(c); if ((c >= '0') && (c <= '9')) continue; else break; } if (!(((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z')))) goto syntax1; c = stream.get(); if (stream.eof() || stream.fail()) goto eof; } // Read a number token. if (!number_char_p(c)) goto syntax1; loop { buffer.push(c); c = stream.peek(); // Avoid fail state on EOF. if (stream.eof() || stream.fail() || !number_char_p(c)) break; c = stream.get(); } // Parse the number. return read_integer(flags, buffer.start_pointer(), buffer.end_pointer(), NULL ); // Handle syntax error. syntax1: buffer.push(c); throw read_number_bad_syntax_exception(buffer.start_pointer(),buffer.end_pointer()); // Handle premature EOF. eof: throw read_number_eof_exception(); } } // namespace cln cln-1.3.3/src/integer/input/cl_I_from_string.cc0000644000000000000000000000076211201634740016334 0ustar // cl_I (const char *) constructor. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer_class.h" // Implementation. #include "cln/input.h" #include "cln/integer_io.h" namespace cln { cl_read_flags cl_I_read_flags = { syntax_integer, lsyntax_all, 10, { float_format_ffloat, float_format_lfloat_min, true } }; cl_I::cl_I (const char * string) { pointer = as_cl_private_thing( read_integer(cl_I_read_flags,string,NULL,NULL)); } } // namespace cln cln-1.3.3/src/integer/division/0000755000000000000000000000000012173046200013223 5ustar cln-1.3.3/src/integer/division/cl_I_rem.cc0000644000000000000000000000070011201634737015251 0ustar // rem(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" namespace cln { const cl_I rem (const cl_I& x, const cl_I& y) { // Methode: // (rem x y) :== // (DIVIDE (abs x) (abs y)) -> q,r // Falls x<0, setze r:=-r. // Liefere r. var cl_I r = cl_divide(abs(x),abs(y)).remainder; if (minusp(x)) { return -r; } else { return r; } } } // namespace cln cln-1.3.3/src/integer/division/cl_I_exquo.cc0000644000000000000000000000113611201634737015633 0ustar // exquo(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" namespace cln { const cl_I exquo (const cl_I& x, const cl_I& y) { // Methode: // (exquo x y) :== // (DIVIDE (abs x) (abs y)) -> q,r // Falls r<>0, Error. // Falls x,y verschiedene Vorzeichen haben, liefere -q, sonst q. var cl_I_div_t q_r = cl_divide(abs(x),abs(y)); if (!zerop(q_r.remainder)) { throw exquo_exception(x,y); } if (minusp(x) == minusp(y)) { return q_r.quotient; } else { return -q_r.quotient; } } } // namespace cln cln-1.3.3/src/integer/division/cl_I_ceil2.cc0000644000000000000000000000145711201634737015476 0ustar // ceiling2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" namespace cln { const cl_I_div_t ceiling2 (const cl_I& x, const cl_I& y) { // Methode: // (ceiling x y) :== // (DIVIDE (abs x) (abs y)) -> q,r // Falls x,y selbes Vorzeichen haben und r<>0, // setze q:=q+1 und r:=r-abs(y). // Falls x<0, setze r:=-r. // Falls x,y verschiedene Vorzeichen haben, setze q:=-q. // Liefere q,r. var cl_I abs_y = abs(y); var cl_I_div_t q_r = cl_divide(abs(x),abs_y); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; if ((minusp(x) == minusp(y)) && !zerop(r)) { q = q + 1; r = r - abs_y; } if (minusp(x)) { r = -r; } if (minusp(x) != minusp(y)) { q = -q; } return q_r; } } // namespace cln cln-1.3.3/src/integer/division/cl_I_exquopos.cc0000644000000000000000000000072311201634737016356 0ustar // exquopos(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" namespace cln { const cl_I exquopos (const cl_I& x, const cl_I& y) { // Methode: // (exquopos x y) :== // (DIVIDE x y) -> q,r // Falls r<>0, Error. // Liefere q. var cl_I_div_t q_r = cl_divide(x,y); if (!zerop(q_r.remainder)) { throw exquo_exception(x,y); } return q_r.quotient; } } // namespace cln cln-1.3.3/src/integer/division/cl_I_trunc1.cc0000644000000000000000000000106111201634740015675 0ustar // truncate1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" namespace cln { const cl_I truncate1 (const cl_I& x, const cl_I& y) { // Methode: // (truncate x y) :== // (DIVIDE (abs x) (abs y)) -> q,r // Falls x<0, setze r:=-r. // Falls x,y verschiedene Vorzeichen haben, setze q:=-q. // Liefere nur q. var cl_I_div_t q_r = cl_divide(abs(x),abs(y)); var cl_I& q = q_r.quotient; if (minusp(x) != minusp(y)) { q = -q; } return q; } } // namespace cln cln-1.3.3/src/integer/division/cl_I_exquo_exception.cc0000644000000000000000000000113111201634737017704 0ustar // exquo_exception(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "cln/io.h" #include "cln/integer_io.h" #include namespace cln { static inline const std::string exquo_error_msg (const cl_I& x, const cl_I& y) { std::ostringstream buf; fprint(buf, "Quotient "); fprint(buf, x); fprint(buf, " / "); fprint(buf, y); fprint(buf, " is not an integer."); return buf.str(); } exquo_exception::exquo_exception (const cl_I& x, const cl_I& y) : runtime_exception(exquo_error_msg(x,y)) {} } // namespace cln cln-1.3.3/src/integer/division/cl_I_ceil1.cc0000644000000000000000000000135011201634737015465 0ustar // ceiling1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" namespace cln { const cl_I ceiling1 (const cl_I& x, const cl_I& y) { // Methode: // (ceiling x y) :== // (DIVIDE (abs x) (abs y)) -> q,r // Falls x,y selbes Vorzeichen haben und r<>0, // setze q:=q+1 und r:=r-abs(y). // Falls x<0, setze r:=-r. // Falls x,y verschiedene Vorzeichen haben, setze q:=-q. // Liefere nur q. var cl_I abs_y = abs(y); var cl_I_div_t q_r = cl_divide(abs(x),abs_y); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; if (minusp(x) == minusp(y)) { if (!zerop(r)) { q = q + 1; } } else { q = -q; } return q; } } // namespace cln cln-1.3.3/src/integer/division/cl_I_round2.cc0000644000000000000000000000172611201634737015710 0ustar // round2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" namespace cln { const cl_I_div_t round2 (const cl_I& x, const cl_I& y) { // Methode: // (round x y) :== // (DIVIDE (abs x) (abs y)) -> q,r // Setze s:=abs(y)-r. // Falls (r>s) oder (r=s und q ungerade), // (d.h. falls r>abs(y)/2 oder r=abs(y)/2 und q ungerade), // setze q:=q+1 und r:=-s (d.h. r:=r-abs(y)). // {Nun ist abs(r) <= abs(y)/2, bei abs(r)=abs(y)/2 ist q gerade.} // Falls x<0, setze r:=-r. // Falls x,y verschiedene Vorzeichen haben, setze q:=-q. // Liefere q,r. var cl_I abs_y = abs(y); var cl_I_div_t q_r = cl_divide(abs(x),abs_y); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; var cl_I s = abs_y - r; if ((r > s) || ((r == s) && oddp(q))) { q = q + 1; r = - s; } if (minusp(x)) { r = -r; } if (minusp(x) != minusp(y)) { q = -q; } return q_r; } } // namespace cln cln-1.3.3/src/integer/division/cl_I_floor2.cc0000644000000000000000000000145711201634737015703 0ustar // floor2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" namespace cln { const cl_I_div_t floor2 (const cl_I& x, const cl_I& y) { // Methode: // (floor x y) :== // (DIVIDE (abs x) (abs y)) -> q,r // Falls x,y verschiedene Vorzeichen haben und r<>0, // setze q:=q+1 und r:=r-abs(y). // Falls x<0, setze r:=-r. // Falls x,y verschiedene Vorzeichen haben, setze q:=-q. // Liefere q,r. var cl_I abs_y = abs(y); var cl_I_div_t q_r = cl_divide(abs(x),abs_y); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; if ((minusp(x) != minusp(y)) && !zerop(r)) { q = q + 1; r = r - abs_y; } if (minusp(x)) { r = -r; } if (minusp(x) != minusp(y)) { q = -q; } return q_r; } } // namespace cln cln-1.3.3/src/integer/division/cl_I_trunc2.cc0000644000000000000000000000116711201634740015705 0ustar // truncate2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" namespace cln { const cl_I_div_t truncate2 (const cl_I& x, const cl_I& y) { // Methode: // (truncate x y) :== // (DIVIDE (abs x) (abs y)) -> q,r // Falls x<0, setze r:=-r. // Falls x,y verschiedene Vorzeichen haben, setze q:=-q. // Liefere q,r. var cl_I_div_t q_r = cl_divide(abs(x),abs(y)); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; if (minusp(x)) { r = -r; } if (minusp(x) != minusp(y)) { q = -q; } return q_r; } } // namespace cln cln-1.3.3/src/integer/division/cl_I_round1.cc0000644000000000000000000000164611201634737015710 0ustar // round1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" namespace cln { const cl_I round1 (const cl_I& x, const cl_I& y) { // Methode: // (round x y) :== // (DIVIDE (abs x) (abs y)) -> q,r // Setze s:=abs(y)-r. // Falls (r>s) oder (r=s und q ungerade), // (d.h. falls r>abs(y)/2 oder r=abs(y)/2 und q ungerade), // setze q:=q+1 und r:=-s (d.h. r:=r-abs(y)). // {Nun ist abs(r) <= abs(y)/2, bei abs(r)=abs(y)/2 ist q gerade.} // Falls x<0, setze r:=-r. // Falls x,y verschiedene Vorzeichen haben, setze q:=-q. // Liefere nur q. var cl_I abs_y = abs(y); var cl_I_div_t q_r = cl_divide(abs(x),abs_y); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; var cl_I s = abs_y - r; if ((r > s) || ((r == s) && oddp(q))) { q = q + 1; } if (minusp(x) != minusp(y)) { q = -q; } return q; } } // namespace cln cln-1.3.3/src/integer/division/cl_I_mod.cc0000644000000000000000000000117511201634737015254 0ustar // mod(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" namespace cln { const cl_I mod (const cl_I& x, const cl_I& y) { // Methode: // (mod x y) :== // (DIVIDE (abs x) (abs y)) -> q,r // Falls x,y verschiedene Vorzeichen haben und r<>0, setze r:=r-abs(y). // Falls x<0, setze r:=-r. // Liefere r. var cl_I abs_y = abs(y); var cl_I r = cl_divide(abs(x),abs_y).remainder; if (minusp(x) != minusp(y)) { if (zerop(r)) { return 0; } r = r - abs_y; } if (minusp(x)) { return -r; } else { return r; } } } // namespace cln cln-1.3.3/src/integer/division/cl_I_floor1.cc0000644000000000000000000000133511201634737015675 0ustar // floor1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "integer/cl_I.h" namespace cln { const cl_I floor1 (const cl_I& x, const cl_I& y) { // Methode: // (floor x y) :== // (DIVIDE (abs x) (abs y)) -> q,r // Falls x,y verschiedene Vorzeichen haben und r<>0, // setze q:=q+1 und r:=r-abs(y). // Falls x<0, setze r:=-r. // Falls x,y verschiedene Vorzeichen haben, setze q:=-q. // Liefere nur q. var cl_I abs_y = abs(y); var cl_I_div_t q_r = cl_divide(abs(x),abs_y); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; if (minusp(x) != minusp(y)) { if (!zerop(r)) { q = q + 1; } q = -q; } return q; } } // namespace cln cln-1.3.3/src/modinteger/0000755000000000000000000000000012173046201012100 5ustar cln-1.3.3/src/modinteger/cl_MI_std.h0000644000000000000000000002452111201634740014114 0ustar // m > 1, standard representation, no tricks namespace cln { static void std_fprint (cl_heap_modint_ring* R, std::ostream& stream, const _cl_MI &x) { fprint(stream,R->_retract(x)); fprint(stream," mod "); fprint(stream,R->modulus); } static const cl_I std_reduce_modulo (cl_heap_modint_ring* R, const cl_I& x) { return mod(x,R->modulus); } static const _cl_MI std_canonhom (cl_heap_modint_ring* R, const cl_I& x) { return _cl_MI(R, mod(x,R->modulus)); } static const cl_I std_retract (cl_heap_modint_ring* R, const _cl_MI& x) { unused R; return x.rep; } static const _cl_MI std_random (cl_heap_modint_ring* R, random_state& randomstate) { return _cl_MI(R, random_I(randomstate,R->modulus)); } static const _cl_MI std_zero (cl_heap_modint_ring* R) { return _cl_MI(R, 0); } static bool std_zerop (cl_heap_modint_ring* R, const _cl_MI& x) { unused R; return zerop(x.rep); } static const _cl_MI std_plus (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y) { var cl_I zr = x.rep + y.rep; return _cl_MI(R, (zr >= R->modulus ? zr - R->modulus : zr)); } static const _cl_MI std_minus (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y) { var cl_I zr = x.rep - y.rep; return _cl_MI(R, (minusp(zr) ? zr + R->modulus : zr)); } static const _cl_MI std_uminus (cl_heap_modint_ring* R, const _cl_MI& x) { return _cl_MI(R, (zerop(x.rep) ? (cl_I)0 : R->modulus - x.rep)); } static const _cl_MI std_one (cl_heap_modint_ring* R) { return _cl_MI(R, 1); } static const _cl_MI std_mul (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y) { return _cl_MI(R, mod(x.rep * y.rep, R->modulus)); } static const _cl_MI std_square (cl_heap_modint_ring* R, const _cl_MI& x) { return _cl_MI(R, mod(square(x.rep), R->modulus)); } static const cl_MI_x std_recip (cl_heap_modint_ring* R, const _cl_MI& x) { var const cl_I& xr = x.rep; var cl_I u, v; var cl_I g = xgcd(xr,R->modulus,&u,&v); // g = gcd(x,m) = x*u+m*v if (eq(g,1)) return cl_MI(R, (minusp(u) ? u + R->modulus : u)); if (zerop(xr)) throw division_by_0_exception(); return cl_notify_composite(R,xr); } static const cl_MI_x std_div (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y) { var const cl_I& yr = y.rep; var cl_I u, v; var cl_I g = xgcd(yr,R->modulus,&u,&v); // g = gcd(y,m) = y*u+m*v if (eq(g,1)) return cl_MI(R, mod(x.rep * (minusp(u) ? u + R->modulus : u), R->modulus)); if (zerop(yr)) throw division_by_0_exception(); return cl_notify_composite(R,yr); } static uint8 const ord2_table[256] = // maps i -> ord2(i) for i>0 { 63, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 7, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 }; static uint8 const odd_table[256] = // maps i -> i/2^ord2(i) for i>0 { 0, 1, 1, 3, 1, 5, 3, 7, 1, 9, 5, 11, 3, 13, 7, 15, 1, 17, 9, 19, 5, 21, 11, 23, 3, 25, 13, 27, 7, 29, 15, 31, 1, 33, 17, 35, 9, 37, 19, 39, 5, 41, 21, 43, 11, 45, 23, 47, 3, 49, 25, 51, 13, 53, 27, 55, 7, 57, 29, 59, 15, 61, 31, 63, 1, 65, 33, 67, 17, 69, 35, 71, 9, 73, 37, 75, 19, 77, 39, 79, 5, 81, 41, 83, 21, 85, 43, 87, 11, 89, 45, 91, 23, 93, 47, 95, 3, 97, 49, 99, 25, 101, 51, 103, 13, 105, 53, 107, 27, 109, 55, 111, 7, 113, 57, 115, 29, 117, 59, 119, 15, 121, 61, 123, 31, 125, 63, 127, 1, 129, 65, 131, 33, 133, 67, 135, 17, 137, 69, 139, 35, 141, 71, 143, 9, 145, 73, 147, 37, 149, 75, 151, 19, 153, 77, 155, 39, 157, 79, 159, 5, 161, 81, 163, 41, 165, 83, 167, 21, 169, 85, 171, 43, 173, 87, 175, 11, 177, 89, 179, 45, 181, 91, 183, 23, 185, 93, 187, 47, 189, 95, 191, 3, 193, 97, 195, 49, 197, 99, 199, 25, 201, 101, 203, 51, 205, 103, 207, 13, 209, 105, 211, 53, 213, 107, 215, 27, 217, 109, 219, 55, 221, 111, 223, 7, 225, 113, 227, 57, 229, 115, 231, 29, 233, 117, 235, 59, 237, 119, 239, 15, 241, 121, 243, 61, 245, 123, 247, 31, 249, 125, 251, 63, 253, 127, 255 }; static const _cl_MI std_expt_pos (cl_heap_modint_ring* R, const _cl_MI& x, const cl_I& y) { #if 0 // Methode: // Right-Left Binary, [Cohen, Algorithm 1.2.1.] // a:=x, b:=y. // Solange b gerade, setze a:=a*a, b:=b/2. (Invariante: a^b = x^y.) // c:=a. // Solange b:=floor(b/2) >0 ist, // setze a:=a*a, und falls b ungerade, setze c:=a*c. // Liefere c. var _cl_MI a = x; var cl_I b = y; while (!oddp(b)) { a = R->_square(a); b = b >> 1; } // a^b = x^y var _cl_MI c = a; until (eq(b,1)) { b = b >> 1; a = R->_square(a); // a^b*c = x^y if (oddp(b)) c = R->_mul(a,c); } return c; #else // Methode: // Left-Right base 2^k, [Cohen, Algorithm 1.2.4.] // Good values of k, depending on the size nn of the exponent n: // k = 1 for nn <= 8 // k = 2 for nn <= 24 // k = 3 for nn <= 69.8 // ... k for nn <= k*(k+1)*2^(2k)/(2^(k+1)-k-2) var cl_I n = y; var uintC nn = integer_length(n); // n has nn bits. if (nn <= 8) { // k = 1, normal Left-Right Binary algorithm. var uintL _n = FN_to_UV(n); var _cl_MI a = x; for (var int i = nn-2; i >= 0; i--) { a = R->_square(a); if (_n & bit(i)) a = R->_mul(a,x); } return cl_MI(R,a); } else { // General Left-Right base 2^k algorithm. CL_ALLOCA_STACK; var uintL k; if (nn <= 24) k = 2; else if (nn <= 69) k = 3; else if (nn <= 196) k = 4; else if (nn <= 538) k = 5; else if (nn <= 1433) k = 6; else if (nn <= 3714) k = 7; else if (nn <= 9399) k = 8; else if (nn <= 23290) k = 9; else if (nn <= 56651) k = 10; else if (nn <= 135598) k = 11; else if (nn <= 320034) k = 12; else if (nn <= 746155) k = 13; else if (nn <= 1721160) k = 14; else if (nn <= 3933180) k = 15; else /* if (nn <= 8914120) */ k = 16; var uintC nnk = ceiling(nn,k); // number of base-2^k digits in n var uint16* n_digits = cl_alloc_array(uint16,nnk); // Split n into base-2^k digits. { var const uintD* n_LSDptr; var const uintD* n_MSDptr; I_to_NDS_nocopy(n, n_MSDptr=,,n_LSDptr=,false,); var const uintL k_mask = bit(k)-1; var uintD carry = 0; var unsigned int carrybits = 0; for (var uintC i = 0; i < nnk; i++) { if (carrybits >= k) { n_digits[i] = carry & k_mask; carry = carry >> k; carrybits -= k; } else { var uintD next = (n_LSDptr==n_MSDptr ? 0 : lsprefnext(n_LSDptr)); n_digits[i] = (carry | (next << carrybits)) & k_mask; carry = next >> (k-carrybits); carrybits = intDsize - (k-carrybits); } } } // Compute maximum odd base-2^k digit. var uintL maxodd = 1; if (k <= 8) { for (var uintC i = 0; i < nnk; i++) { var uintL d = n_digits[i]; if (d > 0) { d = odd_table[d]; if (d > maxodd) maxodd = d; } } } else { for (var uintC i = 0; i < nnk; i++) { var uintL d = n_digits[i]; if (d > 0) { var uintL d2; ord2_32(d,d2=); d = d>>d2; if (d > maxodd) maxodd = d; } } } maxodd = (maxodd+1)/2; // number of odd powers we need var _cl_MI* x_oddpow = cl_alloc_array(_cl_MI,maxodd); var _cl_MI x2 = (maxodd > 1 ? R->_square(x) : R->_zero()); { init1(_cl_MI, x_oddpow[0]) (x); for (var uintL i = 1; i < maxodd; i++) init1(_cl_MI, x_oddpow[i]) (R->_mul(x_oddpow[i-1],x2)); } var _cl_MI a; // Compute a = x^n_digits[nnk-1]. { var uintL d = n_digits[nnk-1]; if (d == 0) throw runtime_exception(); var uintL d2; if (k <= 8) d2 = ord2_table[d]; else ord2_32(d,d2=); d = d>>d2; // d := d/2^ord2(d) d = floor(d,2); a = x_oddpow[d]; // x^d // Square d2 times. if (d==0 && maxodd > 1 && d2>0) { a = x2; d2--; } if (!(d2 < k)) throw runtime_exception(); for ( ; d2>0; d2--) a = R->_square(a); } for (var sintC i = nnk-2; i >= 0; i--) { // Compute a := a^(2^k) * x^n_digits[i]. var uintL d = n_digits[i]; var uintL d2; if (d > 0) { if (k <= 8) d2 = ord2_table[d]; else ord2_32(d,d2=); d = d>>d2; // d/2^ord2(d) d = floor(d,2); for (var sintL j = k-d2; j>0; j--) a = R->_square(a); a = R->_mul(a,x_oddpow[d]); } else d2 = k; // Square d2 times. if (!(d2 <= k)) throw runtime_exception(); for ( ; d2>0; d2--) a = R->_square(a); } { for (var uintL i = 0; i < maxodd; i++) x_oddpow[i].~_cl_MI(); } return cl_MI(R,a); } #endif } static const cl_MI_x std_expt (cl_heap_modint_ring* R, const _cl_MI& x, const cl_I& y) { if (!minusp(y)) { if (zerop(y)) return R->one(); else return cl_MI(R,R->_expt_pos(x,y)); } else return R->_recip(R->_expt_pos(x,-y)); } static cl_modint_setops std_setops = { std_fprint, modint_equal, std_random }; static cl_modint_addops std_addops = { std_zero, std_zerop, std_plus, std_minus, std_uminus }; static cl_modint_mulops std_mulops = { std_one, std_canonhom, std_mul, std_square, std_expt_pos, std_recip, std_div, std_expt, std_reduce_modulo, std_retract }; class cl_heap_modint_ring_std : public cl_heap_modint_ring { SUBCLASS_cl_heap_modint_ring() public: // Constructor. cl_heap_modint_ring_std (const cl_I& m); // Virtual destructor. ~cl_heap_modint_ring_std () {} }; static void cl_heap_modint_ring_std_destructor (cl_heap* pointer) { (*(cl_heap_modint_ring_std*)pointer).~cl_heap_modint_ring_std(); } cl_class cl_class_modint_ring_std = { cl_heap_modint_ring_std_destructor, cl_class_flags_modint_ring }; // Constructor. inline cl_heap_modint_ring_std::cl_heap_modint_ring_std (const cl_I& m) : cl_heap_modint_ring (m, &std_setops, &std_addops, &std_mulops) { type = &cl_class_modint_ring_std; } } // namespace cln cln-1.3.3/src/modinteger/cl_MI_pow2.h0000644000000000000000000001010311201634740014200 0ustar // m > 0, m = 2^m1 namespace cln { class cl_heap_modint_ring_pow2 : public cl_heap_modint_ring { SUBCLASS_cl_heap_modint_ring() public: // Constructor. cl_heap_modint_ring_pow2 (const cl_I& m, uintC m1); // m = 2^m1 // Destructor. ~cl_heap_modint_ring_pow2 () {} // Additional information. uintC m1; }; static inline const cl_I pow2_reduce_modulo (cl_heap_modint_ring* _R, const cl_I& x) { var cl_heap_modint_ring_pow2* R = (cl_heap_modint_ring_pow2*)_R; return ldb(x,cl_byte(R->m1,0)); } static const _cl_MI pow2_canonhom (cl_heap_modint_ring* R, const cl_I& x) { return _cl_MI(R, pow2_reduce_modulo(R,x)); } static const _cl_MI pow2_plus (cl_heap_modint_ring* _R, const _cl_MI& x, const _cl_MI& y) { var cl_heap_modint_ring_pow2* R = (cl_heap_modint_ring_pow2*)_R; var cl_I zr = x.rep + y.rep; return _cl_MI(R, ldb(zr,cl_byte(R->m1,0))); } static const _cl_MI pow2_minus (cl_heap_modint_ring* _R, const _cl_MI& x, const _cl_MI& y) { var cl_heap_modint_ring_pow2* R = (cl_heap_modint_ring_pow2*)_R; var cl_I zr = x.rep - y.rep; return _cl_MI(R, ldb(zr,cl_byte(R->m1,0))); } static const _cl_MI pow2_uminus (cl_heap_modint_ring* _R, const _cl_MI& x) { var cl_heap_modint_ring_pow2* R = (cl_heap_modint_ring_pow2*)_R; var cl_I zr = - x.rep; return _cl_MI(R, ldb(zr,cl_byte(R->m1,0))); } static const _cl_MI pow2_one (cl_heap_modint_ring* _R) { var cl_heap_modint_ring_pow2* R = (cl_heap_modint_ring_pow2*)_R; return _cl_MI(R, R->m1==0 ? 0 : 1); } static const _cl_MI pow2_mul (cl_heap_modint_ring* _R, const _cl_MI& x, const _cl_MI& y) { var cl_heap_modint_ring_pow2* R = (cl_heap_modint_ring_pow2*)_R; var cl_I zr = x.rep * y.rep; return _cl_MI(R, ldb(zr,cl_byte(R->m1,0))); } static const _cl_MI pow2_square (cl_heap_modint_ring* _R, const _cl_MI& x) { var cl_heap_modint_ring_pow2* R = (cl_heap_modint_ring_pow2*)_R; var cl_I zr = square(x.rep); return _cl_MI(R, ldb(zr,cl_byte(R->m1,0))); } // Timing comparison with std_recip, on a i486 33 MHz running Linux: // timeMIpow2recip N inverts an (N*32)-bit number. // N std_recip pow2_recip // 10 0.0030 0.00017 // 25 0.011 0.00068 // 50 0.035 0.0024 // 100 0.124 0.0090 // 250 0.71 0.055 // 500 2.76 0.193 // 1000 11.0 0.61 // 2500 68.7 2.2 // 5000 283 5.0 static const cl_MI_x pow2_recip (cl_heap_modint_ring* _R, const _cl_MI& x) { var cl_heap_modint_ring_pow2* R = (cl_heap_modint_ring_pow2*)_R; var const cl_I& xr = x.rep; if (!oddp(xr)) { if (R->m1 == 0) return cl_MI(R, 0); if (zerop(xr)) throw division_by_0_exception(); else return cl_notify_composite(R,xr); } else return cl_MI(R, cl_recip2adic(R->m1,xr)); } // Timing comparison with std_div, on a i486 33 MHz running Linux: // timeMIpow2div N divides two (N*32)-bit numbers. // N std_div pow2_div // 10 0.0035 0.00017 // 25 0.0136 0.00068 // 50 0.043 0.0024 // 100 0.151 0.0090 // 250 0.85 0.054 // 500 3.3 0.21 // 1000 12.3 0.86 static const cl_MI_x pow2_div (cl_heap_modint_ring* _R, const _cl_MI& x, const _cl_MI& y) { var cl_heap_modint_ring_pow2* R = (cl_heap_modint_ring_pow2*)_R; var const cl_I& yr = y.rep; if (!oddp(yr)) { if (R->m1 == 0) return cl_MI(R, 0); if (zerop(yr)) throw division_by_0_exception(); else return cl_notify_composite(R,yr); } else return cl_MI(R, cl_div2adic(R->m1,x.rep,yr)); } static cl_modint_addops pow2_addops = { std_zero, std_zerop, pow2_plus, pow2_minus, pow2_uminus }; static cl_modint_mulops pow2_mulops = { pow2_one, pow2_canonhom, pow2_mul, pow2_square, std_expt_pos, pow2_recip, pow2_div, std_expt, pow2_reduce_modulo, std_retract }; static void cl_modint_ring_pow2_destructor (cl_heap* pointer) { (*(cl_heap_modint_ring_pow2*)pointer).~cl_heap_modint_ring_pow2(); } cl_class cl_class_modint_ring_pow2 = { cl_modint_ring_pow2_destructor, cl_class_flags_modint_ring }; // Constructor. inline cl_heap_modint_ring_pow2::cl_heap_modint_ring_pow2 (const cl_I& m, uintC _m1) : cl_heap_modint_ring (m, &std_setops, &pow2_addops, &pow2_mulops), m1 (_m1) { type = &cl_class_modint_ring_pow2; } } // namespace cln cln-1.3.3/src/modinteger/cl_MI_rshift.cc0000644000000000000000000000225311201634740014755 0ustar // operator>> on cl_MI. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/modinteger.h" // Implementation. #include "cln/integer.h" #include "cln/exception.h" #include "modinteger/cl_MI.h" namespace cln { const cl_MI operator>> (const cl_MI& x, sintC y) // assume 0 <= y < 2^(intCsize-1) { if (y == 0) return x; var const cl_modint_ring& R = x.ring(); if (!oddp(R->modulus)) { if (R->modulus == 2) throw division_by_0_exception(); else return (cl_MI_x)cl_notify_composite(R,2); } if (y == 1) // frequent case return cl_MI(R, (evenp(x.rep) ? x.rep : x.rep + R->modulus) >> 1); // Method: // Algorithm 1: add a multiple of m to x.rep so that it becomes // divisible by 2^y (2-adic division), then shift right. // asymptotical cost: O(y * log m). // Algorithm 2: x * expt(2 mod m,-y) using modular integer operations. // asymptotical cost: O(log y * (log m)^2). // Use algorithm 1 for small y, algorithm 2 for large y. #if 0 if (y <= 2*R->bits) throw runtime_exception(); // not yet implemented else #endif return R->div(x, expt_pos(R->canonhom(2), (cl_I)(long)y)); } } // namespace cln cln-1.3.3/src/modinteger/cl_MI_montgom.h0000644000000000000000000002043711201634740015004 0ustar // m > 1 odd, Montgomery representation namespace cln { // We use Montgomery's modular multiplication trick // [Peter L. Montgomery: Modular multiplication without trial division, // Mathematics of Computation 44 (1985), 519-521.] // // Assume we want to compute modulo M, M odd. V and N will be chosen // so that V*N==1 mod M and that (a,b) --> a*b*V mod M can be more easily // computed than (a,b) --> a*b mod M. Then, we have a ring isomorphism // (Z/MZ, +, * mod M) \isomorph (Z/MZ, +, (a,b) --> a*b*V mod M) // x mod M --------> x*N mod M // It is thus preferrable to use x*N mod M as a "representation" of x mod M, // especially for computations which involve at least several multiplications. // // The precise algorithm to compute a*b*V mod M, given a and b, and the choice // of N and V depend on M and on the hardware. The general idea is this: // Choose N = 2^n, so that division by N is easy. Recall that V == N^-1 mod M. // 1. Given a and b as m-bit numbers (M <= 2^m), compute a*b in full // precision. // 2. Write a*b = c*N+d, i.e. split it into components c and d. // 3. Now a*b*V = c*N*V+d*V == c+d*V mod M. // 4. Instead of computing d*V mod M // a. by full multiplication and then division mod M, or // b. by left shifts: repeated application of // x := 2*x+(0 or 1); if (x >= M) { x := x-M; } // we compute // c. by right shifts (recall that d*V == d*2^-n mod M): repeated application // of if (x odd) { x := (x+M)/2; } else { x := x/2; } // Usually one will choose N = 2^m, so that c and d have both m bits. // Several variations are possible: In step 4 one can implement the right // shifts in hardware. Or (for example when N = 2^160 and working on a // 32-bit machine) one can do 32 shift steps at the same time: // Choose M' == M^-1 mod 2^32 and compute n/32 times // x := (x - ((x mod 2^32) * M' mod 2^32) * M) / 2^32. // Here, we choose to use Montgomery representation only if |V| can be chosen // to be very small, and in that case we compute d*V mod M using standard // multiplication and division. // So we choose N = 2^n with 0 < n <= m (the larger n, the better) and hope // that it will yield V with |V| < 2^k. We thus replace a division of // 2m bits by m bits (cost: approx. m^2) by a multiplication of n bits with // k bits (cost: approx. n*k) and a division of max(2m-n,n+k) bits by m bits // (cost: approx. (max(2m-n,n+k)-m)*m). Of course, U*M+V*N=1 implies (roughly) // n+k >= m. It is worth it when // m^2 > n*k + (n+k-m)*m and m^2 > n*k + (m-n)*m // <==> 3*m^2 > (n+m)*(k+m) and m > k // <== 3/2*m > k+m (assume n to be near m) // <==> m/2 > k . // // How to find N and V: // U*M+V*N=1 means that U = (M mod 2^n)^-1 = U_m mod 2^n, where // U_m := (M mod 2^m)^-1 (2-adic reciprocal). |V| < 2^(m/2) is more or less // equivalent to |V*N| < 2^(n+m/2) <==> |U|*M < 2^(n+m/2) <==> |U| < n-m/2 // <==> the most significant m/2 bits of |U| are all equal. So we search // for a bit string of at least m/2+1 equal bits in U_m, which has m bits. // Very easy: take the middle bit of U_m, look how many bits adjacent to it // (at the left and at the right) have the same value. Say these are the // bits n-1,...,n-l. (Choose n and l as large as possible. k = m-l + O(1).) // If l < m/2, forget it. Else fix n and compute V = (1-U*M)/2^n. // // It is now clear that only very few moduli M will allow such a good // choice of N and V, but in these cases the Montgomery multiplication // reduces the multiplication complexity by a large constant factor. class cl_heap_modint_ring_montgom : public cl_heap_modint_ring { SUBCLASS_cl_heap_modint_ring() public: // Constructor. cl_heap_modint_ring_montgom (const cl_I& M, uintL m, uintL n, const cl_I& V); // Destructor. ~cl_heap_modint_ring_montgom () {} // Additional information. uintL m; // M = 2^m uintL n; // N = 2^n, n <= m cl_I V; }; static void cl_modint_ring_montgom_destructor (cl_heap* pointer) { (*(cl_heap_modint_ring_montgom*)pointer).~cl_heap_modint_ring_montgom(); } cl_class cl_class_modint_ring_montgom = { cl_modint_ring_montgom_destructor, cl_class_flags_modint_ring }; // Assuming 0 <= x < 2^(2m), return V*x mod M. static inline const cl_I montgom_redc (cl_heap_modint_ring_montgom* R, const cl_I& x) { return mod((x >> R->n) + (R->V * ldb(x,cl_byte(R->n,0))), R->modulus); } static const _cl_MI montgom_canonhom (cl_heap_modint_ring* _R, const cl_I& x) { var cl_heap_modint_ring_montgom* R = (cl_heap_modint_ring_montgom*)_R; return _cl_MI(R, mod(x << R->n, R->modulus)); } static const cl_I montgom_retract (cl_heap_modint_ring* _R, const _cl_MI& x) { var cl_heap_modint_ring_montgom* R = (cl_heap_modint_ring_montgom*)_R; return montgom_redc(R,x.rep); } static const _cl_MI montgom_one (cl_heap_modint_ring* _R) { var cl_heap_modint_ring_montgom* R = (cl_heap_modint_ring_montgom*)_R; var cl_I zr = (cl_I)1 << R->n; return _cl_MI(R, R->n == R->m ? zr - R->modulus : zr); } static const _cl_MI montgom_mul (cl_heap_modint_ring* _R, const _cl_MI& x, const _cl_MI& y) { var cl_heap_modint_ring_montgom* R = (cl_heap_modint_ring_montgom*)_R; return _cl_MI(R, montgom_redc(R,x.rep * y.rep)); } static const _cl_MI montgom_square (cl_heap_modint_ring* _R, const _cl_MI& x) { var cl_heap_modint_ring_montgom* R = (cl_heap_modint_ring_montgom*)_R; return _cl_MI(R, montgom_redc(R,square(x.rep))); } static const cl_MI_x montgom_recip (cl_heap_modint_ring* _R, const _cl_MI& x) { var cl_heap_modint_ring_montgom* R = (cl_heap_modint_ring_montgom*)_R; var const cl_I& xr = x.rep; var cl_I u, v; var cl_I g = xgcd(xr,R->modulus,&u,&v); // g = gcd(x,M) = x*u+M*v if (eq(g,1)) return cl_MI(R, mod((minusp(u) ? u + R->modulus : u) << (2*R->n), R->modulus)); if (zerop(xr)) throw division_by_0_exception(); return cl_notify_composite(R,xr); } static const cl_MI_x montgom_div (cl_heap_modint_ring* _R, const _cl_MI& x, const _cl_MI& y) { var cl_heap_modint_ring_montgom* R = (cl_heap_modint_ring_montgom*)_R; var const cl_I& yr = y.rep; var cl_I u, v; var cl_I g = xgcd(yr,R->modulus,&u,&v); // g = gcd(y,M) = y*u+M*v if (eq(g,1)) return cl_MI(R, mod((x.rep * (minusp(u) ? u + R->modulus : u)) << R->n, R->modulus)); if (zerop(yr)) throw division_by_0_exception(); return cl_notify_composite(R,yr); } #define montgom_addops std_addops static cl_modint_mulops montgom_mulops = { montgom_one, montgom_canonhom, montgom_mul, montgom_square, std_expt_pos, montgom_recip, montgom_div, std_expt, std_reduce_modulo, montgom_retract }; // Constructor. inline cl_heap_modint_ring_montgom::cl_heap_modint_ring_montgom (const cl_I& M, uintL _m, uintL _n, const cl_I& _V) : cl_heap_modint_ring (M, &std_setops, &montgom_addops, &montgom_mulops), m (_m), n (_n), V (_V) { type = &cl_class_modint_ring_montgom; } static cl_heap_modint_ring* try_make_modint_ring_montgom (const cl_I& M) { if (!oddp(M)) return NULL; var uintC m = integer_length(M); CL_ALLOCA_STACK; var uintC len; var const uintD* M_LSDptr; I_to_NDS_nocopy(M, ,len=,M_LSDptr=,false,); if (lspref(M_LSDptr,len-1)==0) { len--; } // normalize // Compute U as 2-adic inverse of M. var uintD* U_LSDptr; num_stack_alloc(len,,U_LSDptr=); recip2adic(len,M_LSDptr,U_LSDptr); // Look at U's bits. #define U_bit(i) (lspref(U_LSDptr,floor(i,intDsize)) & ((uintD)1 << ((i)%intDsize))) var uintC i_min; var uintC i_max; var uintC i = floor(m,2); var bool negative; if (U_bit(i)) { for (; --i > 0; ) if (!U_bit(i)) break; i_min = i+1; i = floor(m,2); for (; ++i < m; ) if (!U_bit(i)) break; i_max = i; negative = true; } else { for (; --i > 0; ) if (U_bit(i)) break; i_min = i+1; i = floor(m,2); for (; ++i < m; ) if (U_bit(i)) break; i_max = i; negative = false; } #undef U_bit // OK, all the bits i_max-1..i_min of U are equal. if (i_max - i_min <= floor(m,2)) return NULL; var uintC n = i_max; // Turn U (mod 2^n) into a signed integer. if (n % intDsize) { if (negative) lspref(U_LSDptr,floor(n,intDsize)) |= (uintD)(-1) << (n % intDsize); else lspref(U_LSDptr,floor(n,intDsize)) &= ((uintD)1 << (n % intDsize)) - 1; } var uintC U_len = ceiling(n,intDsize); var cl_I U = DS_to_I(U_LSDptr lspop U_len,U_len); var cl_I V_N = 1 - U*M; if (ldb_test(V_N,cl_byte(n,0))) throw runtime_exception(); var cl_I V = V_N >> n; return new cl_heap_modint_ring_montgom(M,m,n,V); } } // namespace cln cln-1.3.3/src/modinteger/cl_MI.h0000644000000000000000000000041011201634740013231 0ustar // Private modular integer operations. #ifndef _CL_MI_H #define _CL_MI_H #include "cln/modinteger.h" namespace cln { extern cl_composite_condition* cl_notify_composite (const cl_modint_ring& R, const cl_I& nonunit); } // namespace cln #endif /* _CL_MI_H */ cln-1.3.3/src/modinteger/cl_MI_lshift.cc0000644000000000000000000000151511201634740014747 0ustar // operator<< on cl_MI. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/modinteger.h" // Implementation. #include "cln/integer.h" namespace cln { const cl_MI operator<< (const cl_MI& x, sintC y) // assume 0 <= y < 2^(intCsize-1) { if (y == 0) return x; if (y == 1) // frequent case return x+x; var const cl_modint_ring& R = x.ring(); // Method: // Algorithm 1: divide (x.rep << y) by m. // asymptotical cost: O(y * log m). // Algorithm 2: x * expt(2 mod m,y) using modular integer operations. // asymptotical cost: O(log y * (log m)^2). // Use algorithm 1 for small y, algorithm 2 for large y. if ((R->bits < 0) || (y <= 2*R->bits)) return cl_MI(R, R->reduce_modulo(x.rep << y)); else return x * expt_pos(R->canonhom(2), (cl_I)(long)y); } } // namespace cln cln-1.3.3/src/modinteger/cl_MI_int.h0000644000000000000000000000703311201634740014113 0ustar // m = 0 : Z/mZ \isomorph Z namespace cln { static void int_fprint (cl_heap_modint_ring* R, std::ostream& stream, const _cl_MI &x) { fprint(stream,R->_retract(x)); } static const cl_I int_reduce_modulo (cl_heap_modint_ring* R, const cl_I& x) { unused R; return x; // reducing modulo 0 does nothing } // This is the only case where canonhom is injective. static const _cl_MI int_canonhom (cl_heap_modint_ring* R, const cl_I& x) { return _cl_MI(R, x); } // This is the only case where retract is surjective. static const cl_I int_retract (cl_heap_modint_ring* R, const _cl_MI& x) { unused R; return x.rep; } // This is the only case where random yields an error. static const _cl_MI int_random (cl_heap_modint_ring* R, random_state& randomstate) { unused R; unused randomstate; throw runtime_exception("Z / 0 Z not a finite set - no equidistributed random function."); #if ((defined(__sparc__) || defined(__sparc64__)) && !defined(__GNUC__)) // Sun CC wants a return value return _cl_MI(R, 0); #endif } static const _cl_MI int_zero (cl_heap_modint_ring* R) { return _cl_MI(R, 0); } static bool int_zerop (cl_heap_modint_ring* R, const _cl_MI& x) { unused R; return zerop(x.rep); } static const _cl_MI int_plus (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y) { return _cl_MI(R, x.rep + y.rep); } static const _cl_MI int_minus (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y) { return _cl_MI(R, x.rep - y.rep); } static const _cl_MI int_uminus (cl_heap_modint_ring* R, const _cl_MI& x) { return _cl_MI(R, - x.rep); } static const _cl_MI int_one (cl_heap_modint_ring* R) { return _cl_MI(R, 1); } static const _cl_MI int_mul (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y) { return _cl_MI(R, x.rep * y.rep); } static const _cl_MI int_square (cl_heap_modint_ring* R, const _cl_MI& x) { return _cl_MI(R, square(x.rep)); } static const cl_MI_x int_recip (cl_heap_modint_ring* R, const _cl_MI& x) { var const cl_I& xr = x.rep; if (eq(xr,1) || eq(xr,-1)) { return cl_MI(R,x); } if (zerop(xr)) { throw division_by_0_exception(); } return cl_notify_composite(R,xr); } static const cl_MI_x int_div (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y) { var const cl_I& yr = y.rep; if (eq(yr,1)) { return cl_MI(R,x.rep); } if (eq(yr,-1)) { return cl_MI(R,-x.rep); } if (zerop(yr)) { throw division_by_0_exception(); } return cl_notify_composite(R,yr); } static const _cl_MI int_expt_pos (cl_heap_modint_ring* R, const _cl_MI& x, const cl_I& y) { return _cl_MI(R, expt_pos(x.rep,y)); } static const cl_MI_x int_expt (cl_heap_modint_ring* R, const _cl_MI& x, const cl_I& y) { if (eq(x.rep,1)) { return cl_MI(R,1); } if (eq(x.rep,-1)) { return cl_MI(R,evenp(y)?1:-1); } if (!minusp(y)) { if (zerop(y)) return cl_MI(R,1); else return cl_MI(R,expt_pos(x.rep,y)); } // y < 0, x nonunit. if (zerop(x.rep)) { throw division_by_0_exception(); } return cl_notify_composite(R,x.rep); } static cl_modint_setops int_setops = { int_fprint, modint_equal, int_random }; static cl_modint_addops int_addops = { int_zero, int_zerop, int_plus, int_minus, int_uminus }; static cl_modint_mulops int_mulops = { int_one, int_canonhom, int_mul, int_square, int_expt_pos, int_recip, int_div, int_expt, int_reduce_modulo, int_retract }; class cl_heap_modint_ring_int : public cl_heap_modint_ring { SUBCLASS_cl_heap_modint_ring() public: // Constructor. cl_heap_modint_ring_int () : cl_heap_modint_ring (0, &int_setops, &int_addops, &int_mulops) {} // Virtual destructor. ~cl_heap_modint_ring_int () {} }; } // namespace cln cln-1.3.3/src/modinteger/cl_MI_fix32.h0000644000000000000000000000461612035213703014256 0ustar // 1 < m < 2^32, standard representation // Assuming (cl_value_len > 32). namespace cln { static const _cl_MI fix32_plus (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y) { var uint32 xr = FN_to_UV(x.rep); var uint32 yr = FN_to_UV(y.rep); var uint32 zr = xr + yr; var uint32 m = FN_to_UV(R->modulus); if ((zr < xr) || (zr >= m)) { zr = zr - m; } return _cl_MI(R, L_to_FN(zr)); } static const _cl_MI fix32_minus (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y) { var uint32 xr = FN_to_UV(x.rep); var uint32 yr = FN_to_UV(y.rep); var sint32 zr = (xr >= yr ? xr - yr : xr - yr + FN_to_UV(R->modulus)); return _cl_MI(R, L_to_FN(zr)); } static const _cl_MI fix32_uminus (cl_heap_modint_ring* R, const _cl_MI& x) { var uint32 xr = FN_to_UV(x.rep); var uint32 zr = (xr==0 ? 0 : FN_to_UV(R->modulus)-xr); return _cl_MI(R, L_to_FN(zr)); } static const _cl_MI fix32_mul (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y) { var uint32 xr = FN_to_UV(x.rep); var uint32 yr = FN_to_UV(y.rep); var uint32 zrhi; var uint32 zrlo; mulu32(xr,yr,zrhi=,zrlo=); var uint32 zr; divu_6432_3232(zrhi,zrlo,FN_to_UV(R->modulus),,zr=); return _cl_MI(R, L_to_FN(zr)); } static const _cl_MI fix32_square (cl_heap_modint_ring* R, const _cl_MI& x) { var uint32 xr = FN_to_UV(x.rep); var uint32 zrhi; var uint32 zrlo; mulu32(xr,xr,zrhi=,zrlo=); var uint32 zr; divu_6432_3232(zrhi,zrlo,FN_to_UV(R->modulus),,zr=); return _cl_MI(R, L_to_FN(zr)); } static cl_modint_addops fix32_addops = { std_zero, std_zerop, fix32_plus, fix32_minus, fix32_uminus }; static cl_modint_mulops fix32_mulops = { std_one, std_canonhom, fix32_mul, fix32_square, std_expt_pos, std_recip, std_div, std_expt, std_reduce_modulo, std_retract }; class cl_heap_modint_ring_fix32 : public cl_heap_modint_ring { SUBCLASS_cl_heap_modint_ring() public: // Constructor. cl_heap_modint_ring_fix32 (const cl_I& m); // Destructor. ~cl_heap_modint_ring_fix32 () {} }; static void cl_modint_ring_fix32_destructor (cl_heap* pointer) { (*(cl_heap_modint_ring_fix32*)pointer).~cl_heap_modint_ring_fix32(); } cl_class cl_class_modint_ring_fix32 = { cl_modint_ring_fix32_destructor, cl_class_flags_modint_ring }; // Constructor. inline cl_heap_modint_ring_fix32::cl_heap_modint_ring_fix32(const cl_I& m) : cl_heap_modint_ring (m, &std_setops, &fix32_addops, &fix32_mulops) { type = &cl_class_modint_ring_fix32; } } // namespace cln cln-1.3.3/src/modinteger/cl_MI_pow2p1.h0000644000000000000000000000556711201634740014463 0ustar // m > 0, m = 2^m1 + 1 (m1 > 1) namespace cln { class cl_heap_modint_ring_pow2p1 : public cl_heap_modint_ring { SUBCLASS_cl_heap_modint_ring() public: // Constructor. cl_heap_modint_ring_pow2p1 (const cl_I& m, uintC m1); // m = 2^m1 + 1 // Destructor. ~cl_heap_modint_ring_pow2p1 () {} // Additional information. uintC m1; }; static inline const cl_I pow2p1_reduce_modulo (cl_heap_modint_ring* _R, const cl_I& x) { var cl_heap_modint_ring_pow2p1* R = (cl_heap_modint_ring_pow2p1*)_R; // Method: // If x>=0, split x into pieces of m1 bits and sum them up. // x = x0 + 2^m1*x1 + 2^(2*m1)*x2 + ... ==> // mod(x,m) = mod(x0-x1+x2-+...,m). // If x<0, apply this to -1-x, and use mod(x,m) = m-1-mod(-1-x,m). { Mutable(cl_I,x); var bool sign = minusp(x); if (sign) { x = lognot(x); } var const uintC m1 = R->m1; while (x >= R->modulus) { var uintC xlen = integer_length(x); var cl_I y = ldb(x,cl_byte(m1,0)); for (var uintC i = m1; ; ) { y = y - ldb(x,cl_byte(m1,i)); i += m1; if (i >= xlen) break; y = y + ldb(x,cl_byte(m1,i)); i += m1; if (i >= xlen) break; } if (minusp(y)) { sign = !sign; x = lognot(y); } else x = y; } // Now 0 <= x < m. if (sign) { x = R->modulus - 1 - x; } return x; }} static const _cl_MI pow2p1_canonhom (cl_heap_modint_ring* R, const cl_I& x) { return _cl_MI(R, pow2p1_reduce_modulo(R,x)); } static const _cl_MI pow2p1_mul (cl_heap_modint_ring* _R, const _cl_MI& x, const _cl_MI& y) { var cl_heap_modint_ring_pow2p1* R = (cl_heap_modint_ring_pow2p1*)_R; var const uintC m1 = R->m1; var cl_I zr = x.rep * y.rep; // Now 0 <= zr <= 2^(2*m1). zr = ldb(zr,cl_byte(1,2*m1)) - ldb(zr,cl_byte(m1,m1)) + ldb(zr,cl_byte(m1,0)); // Now -(2^m1-1) <= zr <= 2^m1. return _cl_MI(R, minusp(zr) ? zr + R->modulus : zr); } static const _cl_MI pow2p1_square (cl_heap_modint_ring* _R, const _cl_MI& x) { var cl_heap_modint_ring_pow2p1* R = (cl_heap_modint_ring_pow2p1*)_R; var const uintC m1 = R->m1; var cl_I zr = square(x.rep); // Now 0 <= zr <= 2^(2*m1). zr = ldb(zr,cl_byte(1,2*m1)) - ldb(zr,cl_byte(m1,m1)) + ldb(zr,cl_byte(m1,0)); // Now -(2^m1-1) <= zr <= 2^m1. return _cl_MI(R, minusp(zr) ? zr + R->modulus : zr); } #define pow2p1_addops std_addops static cl_modint_mulops pow2p1_mulops = { std_one, pow2p1_canonhom, pow2p1_mul, pow2p1_square, std_expt_pos, std_recip, std_div, std_expt, pow2p1_reduce_modulo, std_retract }; static void cl_modint_ring_pow2p1_destructor (cl_heap* pointer) { (*(cl_heap_modint_ring_pow2p1*)pointer).~cl_heap_modint_ring_pow2p1(); } cl_class cl_class_modint_ring_pow2p1 = { cl_modint_ring_pow2p1_destructor, cl_class_flags_modint_ring }; // Constructor. inline cl_heap_modint_ring_pow2p1::cl_heap_modint_ring_pow2p1 (const cl_I& m, uintC _m1) : cl_heap_modint_ring (m, &std_setops, &pow2p1_addops, &pow2p1_mulops), m1 (_m1) { type = &cl_class_modint_ring_pow2p1; } } // namespace cln cln-1.3.3/src/modinteger/cl_MI_cond_composite.cc0000644000000000000000000000122511201634740016461 0ustar // class cl_composite_condition. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/modinteger.h" // Implementation. #include "cln/io.h" #include "cln/integer_io.h" namespace cln { const char * cl_composite_condition::name () const { return "cl_composite_condition"; } void cl_composite_condition::print (std::ostream& strm) const { fprint(strm, "Exception occurred: p = "); fprint(strm, p); fprint(strm, " is not a prime, "); if (zerop(factor)) fprint(strm, "no factor found"); else { fprint(strm, "factor found: "); fprint(strm, factor); } fprint(strm, "\n"); } } // namespace cln cln-1.3.3/src/modinteger/cl_MI_err_comp.cc0000644000000000000000000000056511201634740015270 0ustar // cl_notify_composite(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "modinteger/cl_MI.h" // Implementation. #include "cln/io.h" namespace cln { cl_composite_condition* cl_notify_composite (const cl_modint_ring& R, const cl_I& nonunit) { return new cl_composite_condition(R->modulus,gcd(R->modulus,nonunit)); } } // namespace cln cln-1.3.3/src/modinteger/cl_MI.cc0000644000000000000000000001233711201634740013402 0ustar // Modular integer operations. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/modinteger.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "base/digitseq/cl_2DS.h" #include "cln/io.h" #include "cln/integer_io.h" #include "base/cl_N.h" #include "modinteger/cl_MI.h" #include "cln/exception.h" #include "base/cl_alloca.h" // MacOS X does "#define _R 0x00040000L" // Grr... #undef _R namespace cln { static void cl_modint_ring_destructor (cl_heap* pointer) { (*(cl_heap_modint_ring*)pointer).~cl_heap_modint_ring(); } cl_class cl_class_modint_ring; cl_heap_modint_ring::cl_heap_modint_ring (cl_I m, cl_modint_setops* setopv, cl_modint_addops* addopv, cl_modint_mulops* mulopv) : setops (setopv), addops (addopv), mulops (mulopv), modulus (m) { refcount = 0; // will be incremented by the `cl_modint_ring' constructor type = &cl_class_modint_ring; if (minusp(m)) throw runtime_exception(); if (!cln::zerop(m)) { var uintC b = integer_length(m-1); // m <= 2^b, hence one needs b bits for a representative mod m. if (b <= 1) { log2_bits = 0; bits = 1; } else if (b <= cl_word_size) { var uintL bb; integerlengthC(b-1,bb=); // b <= 2^bb with bb minimal log2_bits = bb; bits = 1<= 0 { if (m == 0) return new cl_heap_modint_ring_int(); // Now m > 0. { var uintC log2_m = power2p(m); if (log2_m) return new cl_heap_modint_ring_pow2(m,log2_m-1); } // Now m > 1. { var uintC log2_m = integer_length(m); // = integerlength(m-1) if (log2_m < 16) // m < 0x10000 return new cl_heap_modint_ring_fix16(m); #if (cl_value_len <= 32) if (log2_m < cl_value_len) return new cl_heap_modint_ring_fix29(m); if (log2_m < 32) // m < 0x100000000 return new cl_heap_modint_ring_int32(m); #else if (log2_m < 32) // m < 0x100000000 return new cl_heap_modint_ring_fix32(m); #endif } { var uintC m1 = power2p(m+1); if (m1) return new cl_heap_modint_ring_pow2m1(m,m1-1); } { var uintC m1 = power2p(m-1); if (m1) return new cl_heap_modint_ring_pow2p1(m,m1-1); } { var cl_heap_modint_ring* R = try_make_modint_ring_montgom(m); if (R) return R; } return new cl_heap_modint_ring_std(m); } // The table of modular integer rings. // A weak hash table cl_I -> cl_modint_ring. // (It could also be a weak hashuniq table cl_I -> cl_modint_ring.) } // namespace cln #include "integer/hash/cl_I_hashweak_rcpointer.h" namespace cln { // An entry can be collected when the value (the ring) isn't referenced any more // except from the hash table, and when the key (the modulus) isn't referenced // any more except from the hash table and the ring. Note that the ring contains // exactly one reference to the modulus. static bool maygc_htentry (const cl_htentry_from_integer_to_rcpointer& entry) { if (!entry.key.pointer_p() || (entry.key.heappointer->refcount == 2)) if (!entry.val.pointer_p() || (entry.val.heappointer->refcount == 1)) return true; return false; } class modint_ring_cache { static cl_wht_from_integer_to_rcpointer* modint_ring_table; static int count; public: inline cl_modint_ring* get_modint_ring(const cl_I& m) { return (cl_modint_ring*) modint_ring_table->get(m); } inline void store_modint_ring(const cl_modint_ring& R) { modint_ring_table->put(R->modulus,R); } modint_ring_cache(); ~modint_ring_cache(); }; cl_wht_from_integer_to_rcpointer* modint_ring_cache::modint_ring_table = 0; int modint_ring_cache::count = 0; modint_ring_cache::modint_ring_cache() { if (count++ == 0) modint_ring_table = new cl_wht_from_integer_to_rcpointer(maygc_htentry); } modint_ring_cache::~modint_ring_cache() { if (--count == 0) delete modint_ring_table; } const cl_modint_ring find_modint_ring (const cl_I& m) { { Mutable(cl_I,m); m = abs(m); static modint_ring_cache cache; var cl_modint_ring* ring_in_table = cache.get_modint_ring(m); if (!ring_in_table) { var cl_modint_ring R = make_modint_ring(m); cache.store_modint_ring(R); ring_in_table = cache.get_modint_ring(m); if (!ring_in_table) throw runtime_exception(); } return *ring_in_table; }} const cl_modint_ring cl_modint0_ring = cl_modint0_ring; int cl_MI_init_helper::count = 0; cl_MI_init_helper::cl_MI_init_helper() { if (count++ == 0) { cl_class_modint_ring.destruct = cl_modint_ring_destructor; cl_class_modint_ring.flags = cl_class_flags_modint_ring; new ((void *)&cl_modint0_ring) cl_modint_ring(find_modint_ring(0)); } } cl_MI_init_helper::~cl_MI_init_helper() { if (--count == 0) { // Nothing to clean up? } } } // namespace cln cln-1.3.3/src/modinteger/cl_MI_fix29.h0000644000000000000000000000454711201634740014271 0ustar // 1 < m < 2^(cl_value_len-1), standard representation // Assuming (cl_value_len <= 32). namespace cln { static const _cl_MI fix29_plus (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y) { var uint32 zr = FN_to_UV(x.rep) + FN_to_UV(y.rep); if (zr >= FN_to_UV(R->modulus)) { zr = zr - FN_to_UV(R->modulus); } return _cl_MI(R, L_to_FN(zr)); } static const _cl_MI fix29_minus (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y) { var uint32 xr = FN_to_UV(x.rep); var uint32 yr = FN_to_UV(y.rep); var sint32 zr = xr - yr; if (zr < 0) { zr = zr + FN_to_UV(R->modulus); } return _cl_MI(R, L_to_FN(zr)); } static const _cl_MI fix29_uminus (cl_heap_modint_ring* R, const _cl_MI& x) { var uint32 xr = FN_to_UV(x.rep); var uint32 zr = (xr==0 ? 0 : FN_to_UV(R->modulus)-xr); return _cl_MI(R, L_to_FN(zr)); } static const _cl_MI fix29_mul (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y) { var uint32 xr = FN_to_UV(x.rep); var uint32 yr = FN_to_UV(y.rep); var uint32 zrhi; var uint32 zrlo; mulu32(xr,yr,zrhi=,zrlo=); var uint32 zr; divu_6432_3232(zrhi,zrlo,FN_to_UV(R->modulus),,zr=); return _cl_MI(R, L_to_FN(zr)); } static const _cl_MI fix29_square (cl_heap_modint_ring* R, const _cl_MI& x) { var uint32 xr = FN_to_UV(x.rep); var uint32 zrhi; var uint32 zrlo; mulu32(xr,xr,zrhi=,zrlo=); var uint32 zr; divu_6432_3232(zrhi,zrlo,FN_to_UV(R->modulus),,zr=); return _cl_MI(R, L_to_FN(zr)); } static cl_modint_addops fix29_addops = { std_zero, std_zerop, fix29_plus, fix29_minus, fix29_uminus }; static cl_modint_mulops fix29_mulops = { std_one, std_canonhom, fix29_mul, fix29_square, std_expt_pos, std_recip, std_div, std_expt, std_reduce_modulo, std_retract }; class cl_heap_modint_ring_fix29 : public cl_heap_modint_ring { SUBCLASS_cl_heap_modint_ring() public: // Constructor. cl_heap_modint_ring_fix29 (const cl_I& m); // Destructor. ~cl_heap_modint_ring_fix29 () {} }; static void cl_modint_ring_fix29_destructor (cl_heap* pointer) { (*(cl_heap_modint_ring_fix29*)pointer).~cl_heap_modint_ring_fix29(); } cl_class cl_class_modint_ring_fix29 = { cl_modint_ring_fix29_destructor, cl_class_flags_modint_ring }; // Constructor. inline cl_heap_modint_ring_fix29::cl_heap_modint_ring_fix29(const cl_I& m) : cl_heap_modint_ring (m, &std_setops, &fix29_addops, &fix29_mulops) { type = &cl_class_modint_ring_fix29; } } // namespace cln cln-1.3.3/src/modinteger/cl_MI_int32.h0000644000000000000000000000460711201634740014264 0ustar // 1 < m < 2^32, standard representation namespace cln { static const _cl_MI int32_plus (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y) { var uint32 xr = cl_I_to_UL(x.rep); var uint32 yr = cl_I_to_UL(y.rep); var uint32 zr = xr + yr; var uint32 m = cl_I_to_UL(R->modulus); if ((zr < xr) || (zr >= m)) { zr = zr - m; } return _cl_MI(R, UL_to_I(zr)); } static const _cl_MI int32_minus (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y) { var uint32 xr = cl_I_to_UL(x.rep); var uint32 yr = cl_I_to_UL(y.rep); var sint32 zr = (xr >= yr ? xr - yr : xr - yr + cl_I_to_UL(R->modulus)); return _cl_MI(R, UL_to_I(zr)); } static const _cl_MI int32_uminus (cl_heap_modint_ring* R, const _cl_MI& x) { var uint32 xr = cl_I_to_UL(x.rep); var uint32 zr = (xr==0 ? 0 : cl_I_to_UL(R->modulus)-xr); return _cl_MI(R, UL_to_I(zr)); } static const _cl_MI int32_mul (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y) { var uint32 xr = cl_I_to_UL(x.rep); var uint32 yr = cl_I_to_UL(y.rep); var uint32 zrhi; var uint32 zrlo; mulu32(xr,yr,zrhi=,zrlo=); var uint32 zr; divu_6432_3232(zrhi,zrlo,cl_I_to_UL(R->modulus),,zr=); return _cl_MI(R, UL_to_I(zr)); } static const _cl_MI int32_square (cl_heap_modint_ring* R, const _cl_MI& x) { var uint32 xr = cl_I_to_UL(x.rep); var uint32 zrhi; var uint32 zrlo; mulu32(xr,xr,zrhi=,zrlo=); var uint32 zr; divu_6432_3232(zrhi,zrlo,cl_I_to_UL(R->modulus),,zr=); return _cl_MI(R, UL_to_I(zr)); } static cl_modint_addops int32_addops = { std_zero, std_zerop, int32_plus, int32_minus, int32_uminus }; static cl_modint_mulops int32_mulops = { std_one, std_canonhom, int32_mul, int32_square, std_expt_pos, std_recip, std_div, std_expt, std_reduce_modulo, std_retract }; class cl_heap_modint_ring_int32 : public cl_heap_modint_ring { SUBCLASS_cl_heap_modint_ring() public: // Constructor. cl_heap_modint_ring_int32 (const cl_I& m); // Destructor. ~cl_heap_modint_ring_int32 () {} }; static void cl_modint_ring_int32_destructor (cl_heap* pointer) { (*(cl_heap_modint_ring_int32*)pointer).~cl_heap_modint_ring_int32(); } cl_class cl_class_modint_ring_int32 = { cl_modint_ring_int32_destructor, cl_class_flags_modint_ring }; // Constructor. inline cl_heap_modint_ring_int32::cl_heap_modint_ring_int32(const cl_I& m) : cl_heap_modint_ring (m, &std_setops, &int32_addops, &int32_mulops) { type = &cl_class_modint_ring_int32; } } // namespace cln cln-1.3.3/src/modinteger/cl_MI_fix16.h0000644000000000000000000000431111201634740014252 0ustar // 1 < m < 2^16, standard representation namespace cln { static const _cl_MI fix16_plus (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y) { var uint32 zr = FN_to_UV(x.rep) + FN_to_UV(y.rep); if (zr >= FN_to_UV(R->modulus)) { zr = zr - FN_to_UV(R->modulus); } return _cl_MI(R, L_to_FN(zr)); } static const _cl_MI fix16_minus (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y) { var uint32 xr = FN_to_UV(x.rep); var uint32 yr = FN_to_UV(y.rep); var sint32 zr = xr - yr; if (zr < 0) { zr = zr + FN_to_UV(R->modulus); } return _cl_MI(R, L_to_FN(zr)); } static const _cl_MI fix16_uminus (cl_heap_modint_ring* R, const _cl_MI& x) { var uint32 xr = FN_to_UV(x.rep); var uint32 zr = (xr==0 ? 0 : FN_to_UV(R->modulus)-xr); return _cl_MI(R, L_to_FN(zr)); } static const _cl_MI fix16_mul (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y) { var uint32 xr = FN_to_UV(x.rep); var uint32 yr = FN_to_UV(y.rep); var uint32 zr = mulu16(xr,yr); divu_3216_1616(zr,FN_to_UV(R->modulus),,zr=); return _cl_MI(R, L_to_FN(zr)); } static const _cl_MI fix16_square (cl_heap_modint_ring* R, const _cl_MI& x) { var uint32 xr = FN_to_UV(x.rep); var uint32 zr = mulu16(xr,xr); divu_3216_1616(zr,FN_to_UV(R->modulus),,zr=); return _cl_MI(R, L_to_FN(zr)); } static cl_modint_addops fix16_addops = { std_zero, std_zerop, fix16_plus, fix16_minus, fix16_uminus }; static cl_modint_mulops fix16_mulops = { std_one, std_canonhom, fix16_mul, fix16_square, std_expt_pos, std_recip, std_div, std_expt, std_reduce_modulo, std_retract }; class cl_heap_modint_ring_fix16 : public cl_heap_modint_ring { SUBCLASS_cl_heap_modint_ring() public: // Constructor. cl_heap_modint_ring_fix16 (const cl_I& m); // Destructor. ~cl_heap_modint_ring_fix16 () {} }; static void cl_modint_ring_fix16_destructor (cl_heap* pointer) { (*(cl_heap_modint_ring_fix16*)pointer).~cl_heap_modint_ring_fix16(); } cl_class cl_class_modint_ring_fix16 = { cl_modint_ring_fix16_destructor, cl_class_flags_modint_ring }; // Constructor. inline cl_heap_modint_ring_fix16::cl_heap_modint_ring_fix16(const cl_I& m) : cl_heap_modint_ring (m, &std_setops, &fix16_addops, &fix16_mulops) { type = &cl_class_modint_ring_fix16; } } // namespace cln cln-1.3.3/src/modinteger/cl_MI_debug.cc0000644000000000000000000000132611201634740014544 0ustar // cl_modint_ring debugging support. // General includes. #include "base/cl_sysdep.h" // Specification. // Implementation. #include "cln/modinteger.h" #include "cln/io.h" #include "cln/integer_io.h" namespace cln { static void dprint (cl_heap* pointer) { var const cl_modint_ring& obj = *(const cl_modint_ring*)&pointer; fprint(cl_debugout, "(cl_modint_ring) Z mod "); fprint(cl_debugout, obj->modulus); } AT_INITIALIZATION(dprint_modint_ring) { cl_register_type_printer(cl_class_modint_ring,dprint); } void cl_MI::debug_print () const { fprint(cl_debugout, *this); fprint(cl_debugout, "\n"); } // This dummy links in this module when requires it. int cl_MI_debug_module; } // namespace cln cln-1.3.3/src/modinteger/cl_MI_pow2m1.h0000644000000000000000000000521311201634740014444 0ustar // m > 0, m = 2^m1 - 1 (m1 > 1) namespace cln { class cl_heap_modint_ring_pow2m1 : public cl_heap_modint_ring { SUBCLASS_cl_heap_modint_ring() public: // Constructor. cl_heap_modint_ring_pow2m1 (const cl_I& m, uintC m1); // m = 2^m1 - 1 // Destructor. ~cl_heap_modint_ring_pow2m1 () {} // Additional information. uintC m1; }; static inline const cl_I pow2m1_reduce_modulo (cl_heap_modint_ring* _R, const cl_I& x) { var cl_heap_modint_ring_pow2m1* R = (cl_heap_modint_ring_pow2m1*)_R; // Method: // If x>=0, split x into pieces of m1 bits and sum them up. // x = x0 + 2^m1*x1 + 2^(2*m1)*x2 + ... ==> // mod(x,m) = mod(x0+x1+x2+...,m). // If x<0, apply this to -1-x, and use mod(x,m) = m-1-mod(-1-x,m). { Mutable(cl_I,x); var bool sign = minusp(x); if (sign) { x = lognot(x); } var const uintC m1 = R->m1; if (x >= R->modulus) { x = plus1(x); // avoid staying at x = m do { var uintC xlen = integer_length(x); var cl_I y = ldb(x,cl_byte(m1,0)); for (var uintC i = m1; i < xlen; i += m1) y = y + ldb(x,cl_byte(m1,i)); x = y; } while (x > R->modulus); x = minus1(x); } // Now 0 <= x < m. if (sign) { x = R->modulus - 1 - x; } return x; }} static const _cl_MI pow2m1_canonhom (cl_heap_modint_ring* R, const cl_I& x) { return _cl_MI(R, pow2m1_reduce_modulo(R,x)); } static const _cl_MI pow2m1_mul (cl_heap_modint_ring* _R, const _cl_MI& x, const _cl_MI& y) { var cl_heap_modint_ring_pow2m1* R = (cl_heap_modint_ring_pow2m1*)_R; var const uintC m1 = R->m1; var cl_I zr = x.rep * y.rep; zr = ldb(zr,cl_byte(m1,m1)) + ldb(zr,cl_byte(m1,0)); return _cl_MI(R, zr >= R->modulus ? zr - R->modulus : zr); } static const _cl_MI pow2m1_square (cl_heap_modint_ring* _R, const _cl_MI& x) { var cl_heap_modint_ring_pow2m1* R = (cl_heap_modint_ring_pow2m1*)_R; var const uintC m1 = R->m1; var cl_I zr = square(x.rep); zr = ldb(zr,cl_byte(m1,m1)) + ldb(zr,cl_byte(m1,0)); return _cl_MI(R, zr >= R->modulus ? zr - R->modulus : zr); } #define pow2m1_addops std_addops static cl_modint_mulops pow2m1_mulops = { std_one, pow2m1_canonhom, pow2m1_mul, pow2m1_square, std_expt_pos, std_recip, std_div, std_expt, pow2m1_reduce_modulo, std_retract }; static void cl_modint_ring_pow2m1_destructor (cl_heap* pointer) { (*(cl_heap_modint_ring_pow2m1*)pointer).~cl_heap_modint_ring_pow2m1(); } cl_class cl_class_modint_ring_pow2m1 = { cl_modint_ring_pow2m1_destructor, cl_class_flags_modint_ring }; // Constructor. inline cl_heap_modint_ring_pow2m1::cl_heap_modint_ring_pow2m1 (const cl_I& m, uintC _m1) : cl_heap_modint_ring (m, &std_setops, &pow2m1_addops, &pow2m1_mulops), m1 (_m1) { type = &cl_class_modint_ring_pow2m1; } } // namespace cln cln-1.3.3/src/complex/0000755000000000000000000000000012173046176011425 5ustar cln-1.3.3/src/complex/algebraic/0000755000000000000000000000000012173046176013336 5ustar cln-1.3.3/src/complex/algebraic/cl_R_hypot.cc0000644000000000000000000000477111201634736015754 0ustar // cl_hypot(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "complex/cl_C.h" // Implementation. #include "cln/real.h" #include "real/cl_R.h" #include "cln/rational.h" #include "rational/cl_RA.h" #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_R cl_hypot (const cl_R& a, const cl_R& b) { // Methode: // Falls a=0: (abs b). // Falls b=0: (abs a). // Falls a und b beide rational sind: // c:=a*a+b*b, liefere (sqrt c). // Falls a oder b Floats sind: // Falls einer von beiden rational ist, runde ihn zum selben Float-Typ // wie der andere und führe das UP durch. // Falls beide Floats sind, erweitere auf den genaueren, führe das UP // durch und runde wieder auf den ungenaueren. // Das Ergebnis ist ein Float >=0. // UP: [a,b Floats vom selben Typ] // a=0.0 -> liefere abs(b). // b=0.0 -> liefere abs(a). // e:=max(exponent(a),exponent(b)). // a':=a/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren a':=a/2^e // oder beim Quadrieren a'*a': 2*(e-exponent(a))>exp_mid-exp_low-1 // d.h. exponent(b)-exponent(a)>floor((exp_mid-exp_low-1)/2) ). // b':=b/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren b':=b/2^e // oder beim Quadrieren b'*b': 2*(e-exponent(b))>exp_mid-exp_low-1 // d.h. exponent(a)-exponent(b)>floor((exp_mid-exp_low-1)/2) ). // c':=a'*a'+b'*b', c':=sqrt(c'), liefere 2^e*c'. if (rationalp(a)) { DeclareType(cl_RA,a); if (eq(a,0)) // a=0 -> (abs b) return abs(b); if (rationalp(b)) { DeclareType(cl_RA,b); // a,b beide rational return sqrt(square(a)+square(b)); } else { DeclareType(cl_F,b); // a rational, b Float floatcase(b , return cl_hypot(cl_RA_to_SF(a),b); , return cl_hypot(cl_RA_to_FF(a),b); , return cl_hypot(cl_RA_to_DF(a),b); , return cl_hypot(cl_RA_to_LF(a,TheLfloat(b)->len),b); ); } } else { DeclareType(cl_F,a); if (rationalp(b)) { DeclareType(cl_RA,b); // a Float, b rational if (eq(b,0)) // b=0 -> (abs a) return abs(a); floatcase(a , return cl_hypot(a,cl_RA_to_SF(b)); , return cl_hypot(a,cl_RA_to_FF(b)); , return cl_hypot(a,cl_RA_to_DF(b)); , return cl_hypot(a,cl_RA_to_LF(b,TheLfloat(a)->len)); ); } else { DeclareType(cl_F,b); // a,b Floats #ifndef CL_LF_PEDANTIC GEN_F_OP2(a,b, cl_hypot, 1, 1, return); #else GEN_F_OP2(a,b, cl_hypot, 1, 0, return); #endif } } } } // namespace cln cln-1.3.3/src/complex/algebraic/cl_C_sqrt.cc0000644000000000000000000000221411201634736015551 0ustar // sqrt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { const cl_N sqrt (const cl_N& x) { // Methode: // x reell -> Für x>=0 klar, für x<0: sqrt(-x)*i. // x=a+bi -> // Bestimme r=abs(x)=sqrt(a*a+b*b). // Falls a>=0: Setze c:=sqrt((r+a)/2), d:=(b/(2*c) falls c>0, c falls c=0). // Falls a<0: Setze d:=sqrt((r-a)/2)*(1 falls b>=0, -1 falls b<0), c:=b/(2*d). // Damit ist c>=0, 2*c*d=b, c*c=(r+a)/2, d*d=(r-a)/2, c*c-d*d=a, c*c+d*d=r, // also c+di die gesuchte Wurzel. if (realp(x)) { DeclareType(cl_R,x); if (!minusp(x)) return sqrt(x); else return complex_C(0,sqrt(-x)); } else { DeclareType(cl_C,x); var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); var cl_R r = cl_hypot(a,b); // r = (abs x) if (!minusp(a)) { // a>=0 var cl_R c = sqrt((r+a)/2); var cl_R d = (!zerop(c) ? b/(2*c) : c); return complex_C(c,d); } else { var cl_R d = sqrt((r-a)/2); if (minusp(b)) d = -d; var cl_R c = b/(2*d); return complex_C(c,d); } } } } // namespace cln cln-1.3.3/src/complex/algebraic/cl_C_signum.cc0000644000000000000000000000113211201634736016060 0ustar // signum(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" #include "base/cl_inline.h" #include "complex/algebraic/cl_C_abs_aux.cc" namespace cln { const cl_N CL_FLATTEN signum (const cl_N& x) { // Methode: // x reell -> klar. // x komplex -> falls (zerop x), x als Ergebnis, sonst (/ x (abs x)). if (realp(x)) { DeclareType(cl_R,x); return signum(x); } else { DeclareType(cl_C,x); if (zerop(x)) return x; else return x / abs_inline(x); } } } // namespace cln cln-1.3.3/src/complex/algebraic/cl_FF_hypot.cc0000644000000000000000000000360511201634736016041 0ustar // cl_hypot(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "complex/cl_C.h" // Implementation. #include "cln/ffloat.h" #include "float/ffloat/cl_FF.h" /* For inline version of minusp */ #include "base/cl_inline.h" #include "float/ffloat/elem/cl_FF_minusp.cc" namespace cln { const cl_FF cl_hypot (const cl_FF& a, const cl_FF& b) { // a=0.0 -> liefere abs(b). // b=0.0 -> liefere abs(a). // e:=max(exponent(a),exponent(b)). // a':=a/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren a':=a/2^e // oder beim Quadrieren a'*a': 2*(e-exponent(a))>exp_mid-exp_low-1 // d.h. exponent(b)-exponent(a)>floor((exp_mid-exp_low-1)/2) ). // b':=b/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren b':=b/2^e // oder beim Quadrieren b'*b': 2*(e-exponent(b))>exp_mid-exp_low-1 // d.h. exponent(a)-exponent(b)>floor((exp_mid-exp_low-1)/2) ). // c':=a'*a'+b'*b', c':=sqrt(c'), liefere 2^e*c'. var sintL a_exp; var sintL b_exp; { // Exponenten von a holen: var uintL uexp = FF_uexp(cl_ffloat_value(a)); if (uexp == 0) // a=0.0 -> liefere (abs b) : return (minusp_inline(b) ? -b : b); a_exp = (sintL)(uexp - FF_exp_mid); } { // Exponenten von b holen: var uintL uexp = FF_uexp(cl_ffloat_value(b)); if (uexp == 0) // b=0.0 -> liefere (abs a) : return (minusp_inline(a) ? -a : a); b_exp = (sintL)(uexp - FF_exp_mid); } // Nun a_exp = float_exponent(a), b_exp = float_exponent(b). var sintL e = (a_exp > b_exp ? a_exp : b_exp); // Maximum der Exponenten // a und b durch 2^e dividieren: var cl_FF na = (b_exp-a_exp > floor(FF_exp_mid-FF_exp_low-1,2) ? cl_FF_0 : scale_float(a,-e)); var cl_FF nb = (a_exp-b_exp > floor(FF_exp_mid-FF_exp_low-1,2) ? cl_FF_0 : scale_float(b,-e)); // c' := a'*a'+b'*b' berechnen: var cl_FF nc = square(na) + square(nb); return scale_float(sqrt(nc),e); // c' := sqrt(c'), 2^e*c' } } // namespace cln cln-1.3.3/src/complex/algebraic/cl_C_abs_aux.cc0000644000000000000000000000052411201634736016204 0ustar // abs(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "complex/cl_C.h" // Implementation. #include "cln/real.h" namespace cln { CL_INLINE const cl_R CL_INLINE_DECL(abs) (const cl_C& x) { var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); return cl_hypot(a,b); } } // namespace cln cln-1.3.3/src/complex/algebraic/cl_DF_hypot.cc0000644000000000000000000000364111201634736016037 0ustar // cl_hypot(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "complex/cl_C.h" // Implementation. #include "cln/dfloat.h" #include "float/dfloat/cl_DF.h" /* For inline version of minusp */ #include "base/cl_inline.h" #include "float/dfloat/elem/cl_DF_minusp.cc" namespace cln { const cl_DF cl_hypot (const cl_DF& a, const cl_DF& b) { // a=0.0 -> liefere abs(b). // b=0.0 -> liefere abs(a). // e:=max(exponent(a),exponent(b)). // a':=a/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren a':=a/2^e // oder beim Quadrieren a'*a': 2*(e-exponent(a))>exp_mid-exp_low-1 // d.h. exponent(b)-exponent(a)>floor((exp_mid-exp_low-1)/2) ). // b':=b/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren b':=b/2^e // oder beim Quadrieren b'*b': 2*(e-exponent(b))>exp_mid-exp_low-1 // d.h. exponent(a)-exponent(b)>floor((exp_mid-exp_low-1)/2) ). // c':=a'*a'+b'*b', c':=sqrt(c'), liefere 2^e*c'. var sintL a_exp; var sintL b_exp; { // Exponenten von a holen: var uintL uexp = DF_uexp(TheDfloat(a)->dfloat_value_semhi); if (uexp == 0) // a=0.0 -> liefere (abs b) : return (minusp_inline(b) ? -b : b); a_exp = (sintL)(uexp - DF_exp_mid); } { // Exponenten von b holen: var uintL uexp = DF_uexp(TheDfloat(b)->dfloat_value_semhi); if (uexp == 0) // b=0.0 -> liefere (abs a) : return (minusp_inline(a) ? -a : a); b_exp = (sintL)(uexp - DF_exp_mid); } // Nun a_exp = float_exponent(a), b_exp = float_exponent(b). var sintL e = (a_exp > b_exp ? a_exp : b_exp); // Maximum der Exponenten // a und b durch 2^e dividieren: var cl_DF na = (b_exp-a_exp > floor(DF_exp_mid-DF_exp_low-1,2) ? cl_DF_0 : scale_float(a,-e)); var cl_DF nb = (a_exp-b_exp > floor(DF_exp_mid-DF_exp_low-1,2) ? cl_DF_0 : scale_float(b,-e)); // c' := a'*a'+b'*b' berechnen: var cl_DF nc = square(na) + square(nb); return scale_float(sqrt(nc),e); // c' := sqrt(c'), 2^e*c' } } // namespace cln cln-1.3.3/src/complex/algebraic/cl_LF_hypot.cc0000644000000000000000000000455011201634736016047 0ustar // cl_hypot(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "complex/cl_C.h" // Implementation. #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" /* For inline version of minusp */ #include "base/cl_inline.h" #include "float/lfloat/elem/cl_LF_minusp.cc" namespace cln { ALL_cl_LF_OPERATIONS_SAME_PRECISION() const cl_LF cl_hypot (const cl_LF& a, const cl_LF& b) { // Zuerst a und b auf gleiche Länge bringen: den längeren runden. // a=0.0 -> liefere abs(b). // b=0.0 -> liefere abs(a). // e:=max(exponent(a),exponent(b)). // a':=a/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren a':=a/2^e // oder beim Quadrieren a'*a': 2*(e-exponent(a))>exp_mid-exp_low-1 // d.h. exponent(b)-exponent(a)>floor((exp_mid-exp_low-1)/2) ). // b':=b/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren b':=b/2^e // oder beim Quadrieren b'*b': 2*(e-exponent(b))>exp_mid-exp_low-1 // d.h. exponent(a)-exponent(b)>floor((exp_mid-exp_low-1)/2) ). // c':=a'*a'+b'*b', c':=sqrt(c'), liefere 2^e*c'. { Mutable(cl_LF,a); Mutable(cl_LF,b); { var uintC a_len = TheLfloat(a)->len; var uintC b_len = TheLfloat(b)->len; if (!(a_len == b_len)) { if (a_len < b_len) b = shorten(b,a_len); else a = shorten(a,b_len); } } var sintE a_exp; var sintE b_exp; { // Exponenten von a holen: var uintE uexp = TheLfloat(a)->expo; if (uexp == 0) // a=0.0 -> liefere (abs b) : return (minusp_inline(b) ? -b : b); a_exp = (sintE)(uexp - LF_exp_mid); } { // Exponenten von b holen: var uintE uexp = TheLfloat(b)->expo; if (uexp == 0) // b=0.0 -> liefere (abs a) : return (minusp_inline(a) ? -a : a); b_exp = (sintE)(uexp - LF_exp_mid); } // Nun a_exp = float_exponent(a), b_exp = float_exponent(b). var sintE e = (a_exp > b_exp ? a_exp : b_exp); // Maximum der Exponenten // a und b durch 2^e dividieren: var cl_LF na = ((b_exp > a_exp) && ((uintE)(b_exp-a_exp) > (uintE)floor(LF_exp_mid-LF_exp_low-1,2)) ? encode_LF0(TheLfloat(a)->len) : scale_float(a,-e)); var cl_LF nb = ((a_exp > b_exp) && ((uintE)(a_exp-b_exp) > (uintE)floor(LF_exp_mid-LF_exp_low-1,2)) ? encode_LF0(TheLfloat(b)->len) : scale_float(b,-e)); // c' := a'*a'+b'*b' berechnen: var cl_LF nc = square(na) + square(nb); return scale_float(sqrt(nc),e); // c' := sqrt(c'), 2^e*c' }} } // namespace cln cln-1.3.3/src/complex/algebraic/cl_C_abs.cc0000644000000000000000000000077111201634736015333 0ustar // abs(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" #include "base/cl_inline.h" #include "complex/algebraic/cl_C_abs_aux.cc" namespace cln { const cl_R abs (const cl_N& x) { // Methode: // Falls x reell: klar // Falls x=a+bi: sqrt(a^2+b^2) if (realp(x)) { DeclareType(cl_R,x); return abs(x); } else { DeclareType(cl_C,x); return abs_inline(x); } } } // namespace cln cln-1.3.3/src/complex/algebraic/cl_SF_hypot.cc0000644000000000000000000000353211201634736016055 0ustar // cl_hypot(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "complex/cl_C.h" // Implementation. #include "cln/sfloat.h" #include "float/sfloat/cl_SF.h" /* For inline copy of minusp */ #include "base/cl_inline.h" #include "float/sfloat/elem/cl_SF_minusp.cc" namespace cln { const cl_SF cl_hypot (const cl_SF& a, const cl_SF& b) { // a=0.0 -> liefere abs(b). // b=0.0 -> liefere abs(a). // e:=max(exponent(a),exponent(b)). // a':=a/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren a':=a/2^e // oder beim Quadrieren a'*a': 2*(e-exponent(a))>exp_mid-exp_low-1 // d.h. exponent(b)-exponent(a)>floor((exp_mid-exp_low-1)/2) ). // b':=b/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren b':=b/2^e // oder beim Quadrieren b'*b': 2*(e-exponent(b))>exp_mid-exp_low-1 // d.h. exponent(a)-exponent(b)>floor((exp_mid-exp_low-1)/2) ). // c':=a'*a'+b'*b', c':=sqrt(c'), liefere 2^e*c'. var sintL a_exp; var sintL b_exp; { // Exponenten von a holen: var uintL uexp = SF_uexp(a); if (uexp == 0) // a=0.0 -> liefere (abs b) : return (minusp_inline(b) ? -b : b); a_exp = (sintL)(uexp - SF_exp_mid); } { // Exponenten von b holen: var uintL uexp = SF_uexp(b); if (uexp == 0) // b=0.0 -> liefere (abs a) : return (minusp_inline(a) ? -a : a); b_exp = (sintL)(uexp - SF_exp_mid); } // Nun a_exp = float_exponent(a), b_exp = float_exponent(b). var sintL e = (a_exp > b_exp ? a_exp : b_exp); // Maximum der Exponenten // a und b durch 2^e dividieren: var cl_SF na = (b_exp-a_exp > floor(SF_exp_mid-SF_exp_low-1,2) ? SF_0 : scale_float(a,-e)); var cl_SF nb = (a_exp-b_exp > floor(SF_exp_mid-SF_exp_low-1,2) ? SF_0 : scale_float(b,-e)); // c' := a'*a'+b'*b' berechnen: var cl_SF nc = square(na) + square(nb); return scale_float(sqrt(nc),e); // c' := sqrt(c'), 2^e*c' } } // namespace cln cln-1.3.3/src/complex/ring/0000755000000000000000000000000012173046176012364 5ustar cln-1.3.3/src/complex/ring/cl_C_ring.cc0000644000000000000000000000774011201634736014556 0ustar // Ring of complex numbers. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex_ring.h" // Implementation. #include "cln/complex.h" #include "cln/complex_io.h" #include "complex/cl_C.h" namespace cln { static void N_fprint (cl_heap_ring* R, std::ostream& stream, const _cl_ring_element& x) { unused R; fprint(stream,The(cl_N)(x)); } static bool N_equal (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { unused R; return equal(The(cl_N)(x),The(cl_N)(y)); } static const _cl_ring_element N_zero (cl_heap_ring* R) { return _cl_ring_element(R, (cl_N)0); } static bool N_zerop (cl_heap_ring* R, const _cl_ring_element& x) { unused R; // Here we return true only if x is the *exact* zero. Because we // don't want the degree of polynomials to depend on rounding errors. // For all ring theoretic purposes, we treat 0.0, 0+0.0i etc. as if // they were zero divisors. return exact_zerop(The(cl_N)(x)); } static const _cl_ring_element N_plus (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { return _cl_ring_element(R, The(cl_N)(x) + The(cl_N)(y)); } static const _cl_ring_element N_minus (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { return _cl_ring_element(R, The(cl_N)(x) - The(cl_N)(y)); } static const _cl_ring_element N_uminus (cl_heap_ring* R, const _cl_ring_element& x) { return _cl_ring_element(R, - The(cl_N)(x)); } static const _cl_ring_element N_one (cl_heap_ring* R) { return _cl_ring_element(R, (cl_N)1); } static const _cl_ring_element N_canonhom (cl_heap_ring* R, const cl_I& x) { return _cl_ring_element(R, (cl_N)x); } static const _cl_ring_element N_mul (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { return _cl_ring_element(R, The(cl_N)(x) * The(cl_N)(y)); } static const _cl_ring_element N_square (cl_heap_ring* R, const _cl_ring_element& x) { return _cl_ring_element(R, square(The(cl_N)(x))); } static const _cl_ring_element N_expt_pos (cl_heap_ring* R, const _cl_ring_element& x, const cl_I& y) { return _cl_ring_element(R, expt(The(cl_N)(x),y)); } static bool cl_N_p (const cl_number& x) { return (!x.pointer_p() || (x.pointer_type()->flags & cl_class_flags_subclass_complex) != 0); } static cl_ring_setops N_setops = { N_fprint, N_equal }; static cl_ring_addops N_addops = { N_zero, N_zerop, N_plus, N_minus, N_uminus }; static cl_ring_mulops N_mulops = { N_one, N_canonhom, N_mul, N_square, N_expt_pos }; static cl_number_ring_ops N_ops = { cl_N_p, equal, exact_zerop, operator+, operator-, operator-, operator*, square, expt }; class cl_heap_complex_ring : public cl_heap_number_ring { SUBCLASS_cl_heap_ring() public: // Constructor. cl_heap_complex_ring () : cl_heap_number_ring (&N_setops,&N_addops,&N_mulops, (cl_number_ring_ops*) &N_ops) { type = &cl_class_complex_ring; } // Destructor. ~cl_heap_complex_ring () {} }; static void cl_complex_ring_destructor (cl_heap* pointer) { (*(cl_heap_complex_ring*)pointer).~cl_heap_complex_ring(); } static void cl_complex_ring_dprint (cl_heap* pointer) { unused pointer; fprint(cl_debugout, "(cl_complex_ring) cl_C_ring"); } cl_class cl_class_complex_ring; static cl_heap_complex_ring* cl_heap_complex_ring_instance; const cl_complex_ring cl_C_ring = cl_C_ring; // Constructor. template <> inline cl_complex_ring::cl_specialized_number_ring () : cl_number_ring(cl_heap_complex_ring_instance) { } int cl_C_ring_init_helper::count = 0; cl_C_ring_init_helper::cl_C_ring_init_helper() { if (count++ == 0) { cl_class_complex_ring.destruct = cl_complex_ring_destructor; cl_class_complex_ring.flags = cl_class_flags_number_ring; cl_class_complex_ring.dprint = cl_complex_ring_dprint; cl_heap_complex_ring_instance = new cl_heap_complex_ring(); new ((void *)&cl_C_ring) cl_complex_ring(); } } cl_C_ring_init_helper::~cl_C_ring_init_helper() { if (--count == 0) { delete cl_heap_complex_ring_instance; } } } // namespace cln cln-1.3.3/src/complex/transcendental/0000755000000000000000000000000012173046176014432 5ustar cln-1.3.3/src/complex/transcendental/cl_C_exp.cc0000644000000000000000000000144711201634736016457 0ustar // exp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { const cl_N exp (const cl_N& x) { // Methode: // x reell -> klar. // x = a+bi -> (exp a) mit (cos b) + i (sin b) multiplizieren: // (complex (* (exp a) (cos b)) (* (exp a) (sin b))) if (realp(x)) { DeclareType(cl_R,x); return exp(x); } else { DeclareType(cl_C,x); // x=a+bi var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); var cos_sin_t unitvec = cos_sin(b); // (cos b), (sin b) // Da b nicht = Fixnum 0 ist, ist auch sin(b) nicht = Fixnum 0. var cl_R exp_a = exp(a); // (exp a) return complex_C(exp_a * unitvec.cos, exp_a * unitvec.sin); } } } // namespace cln cln-1.3.3/src/complex/transcendental/cl_C_asin.cc0000644000000000000000000000150211201634736016605 0ustar // asin(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { // Methode: // Wert und Branch Cuts nach der Formel CLTL2, S. 311: // arcsin(z) = log(iz+sqrt(1-z^2))/i // Sei z=x+iy, errechne u+iv = arsinh(-y+ix) wie oben, Ergebnis v-iu. // Real- und Imaginärteil des Ergebnisses sind Floats, außer wenn z reell oder // rein imaginär ist. inline const cl_C_R _asin (const cl_N& z) { if (realp(z)) { DeclareType(cl_R,z); return asinh(0,z); } else { DeclareType(cl_C,z); return asinh(-imagpart(z),realpart(z)); } } const cl_N asin (const cl_N& z) { var cl_C_R u_v = _asin(z); var cl_R& u = u_v.realpart; var cl_R& v = u_v.imagpart; return complex(v,-u); // v-iu } } // namespace cln cln-1.3.3/src/complex/transcendental/cl_C_log2.cc0000644000000000000000000000535111201634736016524 0ustar // log(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" #include "real/cl_R.h" #include "base/cl_N.h" namespace cln { const cl_N log (const cl_N& a, const cl_N& b) { // Methode: // (log a b) = // falls b reell, >0: // (complex (/ (log (abs a)) (log b)) (/ (phase a) (log b))), genauer: // falls a reell, >0: bekannt // falls (= a 0): Error // sonst: (phase a) errechnen, ein Float. // b (falls rational) ins selbe Float-Format umwandeln, // Imaginärteil := (/ (phase a) (log dieses_b)). // Falls a rational: (log (abs a) b). // Falls a komplex mit rationalem Real- und Imaginärteil, // Betragsquadrat (expt (abs a) 2) exakt ausrechnen als // (+ (expt (realpart a) 2) (expt (imagpart a) 2)). // Setze Realteil := (/ (log Betragsquadrat b) 2). // [Eventuell wird hierbei (log b) ein zweites Mal ausgerechnet, // aber dies sowieso nur in Single-Precision.] // Sonst bilde (abs a), ein Float, und (log (abs a)), ein Float, // wandle b (falls rational) ins selbe Float-Format um, // setze Realteil := (/ (log (abs a)) (log dieses_b)). // sonst: (/ (log a) (log b)) if (realp(b)) { DeclareType(cl_R,b); if (plusp(b)) { // b ist reell und >0 if (realp(a)) { DeclareType(cl_R,a); if (plusp(a)) // a und b sind beide reell und >0 return log(a,b); } // b ist reell und >0, a aber nicht. // Imaginärteil (/ (phase a) (log b)) errechnen: var cl_F im; { var cl_R angle = phase(a); if (eq(angle,0)) // = Fixnum 0 <==> (= a 0) -> Error { throw division_by_0_exception(); } { DeclareType(cl_F,angle); var cl_F bf = cl_somefloat(b,angle); // (float b) im = angle / ln(bf); }} // Realteil (/ (log (abs a)) (log b)) errechnen: var cl_R re; if (realp(a)) { DeclareType(cl_R,a); if (rationalp(a)) { // a rational -> (log (abs a) b) errechnen: re = log(abs(a),b); // NB: (abs a) > 0 goto re_ok; } } else { DeclareType(cl_C,a); if (rationalp(realpart(a)) && rationalp(imagpart(a))) { // a komplex mit rationalem Real- und Imaginärteil a1,a2 var const cl_R& a1 = realpart(a); var const cl_R& a2 = imagpart(a); re = log(square(a1)+square(a2),b) / 2; goto re_ok; } } // Keine Chance für rationalen Realteil. { var cl_F abs_a = The(cl_F)(abs(a)); var cl_F log_abs_a = ln(abs_a); var cl_F bf = cl_somefloat(b,log_abs_a); // (float b) re = log_abs_a / ln(bf); } re_ok: return complex_C(re,im); } } // normaler komplexer Fall return log(a) / log(b); } } // namespace cln cln-1.3.3/src/complex/transcendental/cl_C_acosh.cc0000644000000000000000000000474111201634736016760 0ustar // acosh(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" #include "real/cl_R.h" #include "cln/rational.h" #include "rational/cl_RA.h" #include "cln/float.h" /* Use inline version of cl_float -- cl_float_inline */ #include "base/cl_inline.h" #include "real/conv/cl_F_from_R_def.cc" namespace cln { const cl_N acosh (const cl_N& z) { // Methode: // Wert und Branch Cuts nach der Formel CLTL2, S. 314: // arcosh(z) = 2 log(sqrt((z+1)/2)+sqrt((z-1)/2)) // Sei z=x+iy. // Falls y=0: // Falls x rational: // Bei x=1: Ergebnis 0. // Bei x=1/2: Ergebnis pi/3 i. // Bei x=0: Ergebnis pi/2 i. // Bei x=-1/2: Ergebnis 2pi/3 i. // Bei x=-1: Ergebnis pi i. // Falls x<-1: // x in Float umwandeln, Ergebnis log(sqrt(x^2-1)-x) + i pi. // Sonst nach (!) mit u = sqrt((z+1)/2) und v = sqrt((z-1)/2) : // arcosh(z) = 4 artanh(v/(u+1)) = 4 artanh(sqrt((z-1)/2)/(1+sqrt((z+1)/2))) // Um für zwei Zahlen u,v mit u^2-v^2=1 und u,v beide in Bild(sqrt) // (d.h. Realteil>0.0 oder Realteil=0.0 und Imaginärteil>=0.0) // log(u+v) zu berechnen: // log(u+v) = 2 artanh(v/(u+1)) (!) // (Beweis: 2 artanh(v/(u+1)) = log(1+(v/(u+1))) - log(1-(v/(u+1))) // = log((1+u+v)/(u+1)) - log((1+u-v)/(u+1)) == log((1+u+v)/(1+u-v)) // = log(u+v) mod 2 pi i, und beider Imaginärteil ist > -pi und <= pi.) cl_C_R u_v; if (realp(z)) { DeclareType(cl_R,z); // y=0 var const cl_R& x = z; if (rationalp(x)) { DeclareType(cl_RA,x); // x rational if (integerp(x)) { DeclareType(cl_I,x); // x Integer if (eq(x,0)) // x=0 -> Ergebnis pi/2 i return complex_C(0,scale_float(pi(),-1)); if (eq(x,1)) // x=1 -> Ergebnis 0 return 0; if (eq(x,-1)) // x=-1 -> Ergebnis pi i return complex_C(0,pi()); } else { DeclareType(cl_RT,x); // x Ratio if (eq(denominator(x),2)) { // Nenner = 2 ? if (eq(numerator(x),1)) // x=1/2 -> Ergebnis pi/3 i return complex_C(0,pi()/3); if (eq(numerator(x),-1)) // x=-1/2 -> Ergebnis 2pi/3 i return complex_C(0,scale_float(pi(),1)/3); } } } if (x < cl_I(-1)) { // x < -1 var cl_F xf = cl_float_inline(x); var cl_F& x = xf; // x Float <= -1 // log(sqrt(x^2-1)-x), ein Float >=0, Imaginärteil pi return complex_C(ln(sqrt(square(x)-1)-x),pi()); } } return 4 * atanh( sqrt(minus1(z)/2) / plus1(sqrt(plus1(z)/2)) ); } } // namespace cln cln-1.3.3/src/complex/transcendental/cl_C_cosh.cc0000644000000000000000000000141711201634736016614 0ustar // cosh(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { const cl_N cosh (const cl_N& x) { // Methode: // x reell -> klar // x = a+bi -> (complex (* (cosh a) (cos b)) (* (sinh a) (sin b))) if (realp(x)) { DeclareType(cl_R,x); return cosh(x); } else { DeclareType(cl_C,x); // x=a+bi var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); var cos_sin_t trig_b = cos_sin(b); // cos(b), sin(b) errechnen var cosh_sinh_t hyp_a = cosh_sinh(a); // cosh(a), sinh(a) errechnen return complex(hyp_a.cosh * trig_b.cos, // cosh(a)*cos(b) hyp_a.sinh * trig_b.sin // sinh(a)*sin(b) ); } } } // namespace cln cln-1.3.3/src/complex/transcendental/cl_C_asinh_aux.cc0000644000000000000000000001342311201634736017637 0ustar // asinh(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "complex/cl_C.h" // Implementation. #include "cln/real.h" #include "float/transcendental/cl_F_tran.h" #include "real/cl_R.h" #include "cln/rational.h" #include "rational/cl_RA.h" #include "cln/float.h" /* Use the inline version of cl_float */ #include "base/cl_inline.h" #include "real/conv/cl_F_from_R_def.cc" namespace cln { // Hilfsfunktion für asinh und asin: u+iv := arsinh(x+iy). Liefert cl_C_R(u,v). const cl_C_R asinh (const cl_R& x, const cl_R& y) { // Methode: // Wert und Branch Cuts nach der Formel CLTL2, S. 313: // arsinh(z) = log(z+sqrt(1+z^2)) // z=x+iy, Ergebnis u+iv. // Falls x=0 und y=0: u=0, v=0. // Falls x=0: arsinh(iy) = i arcsin(y). // y rational -> // Bei y=1: u = 0, v = pi/2. // Bei y=1/2: u = 0, v = pi/6. // Bei y=0: u = 0, v = 0. // Bei y=-1/2: u = 0, v = -pi/6. // Bei y=-1: u = 0, v = -pi/2. // Sonst y in Float umwandeln. // e := Exponent aus (decode-float y), d := (float-digits y) // Bei y=0.0 oder e<=-d/2 liefere u = 0, v = y // (denn bei e<=-d/2 ist y^2/3 < y^2/2 < 2^(-d)/2 = 2^(-d-1), also // 1 <= asin(y)/y < 1+y^2/3 < 1+2^(-d-1) < 1+2^(-d), // also ist asin(y)/y, auf d Bits gerundet, gleich 1.0). // Berechne 1-y^2. // Bei y>1 liefere u = ln(y+sqrt(y^2-1)), v = pi/2. // Bei y<-1 liefere u = -ln(|y|+sqrt(|y|^2-1)), v = -pi/2. // Bei |y|<=1 liefere u = 0, v = atan(X=sqrt(1-y^2),Y=y). // Falls y=0: // x rational -> x in Float umwandeln. // |x|<1/2: u = atanh(x/sqrt(1+x^2)), // x>=1/2: u = ln(x+sqrt(1+x^2)), // x<=-1/2: u = -ln(-x+sqrt(1+x^2)). // v = 0. // Sonst: // z in Bild(sqrt) -> log(sqrt(1+z^2)+z) = (!) = 2 artanh(z/(1+sqrt(1+z^2))). // z nicht in Bild(sqrt) -> // arsinh(z) = -arsinh(-z). // (Denn arsinh(z)+arsinh(-z) == log((z+sqrt(1+z^2))(-z+sqrt(1+z^2))) // = log((1+z^2)-z^2) = log(1) = 0 mod 2 pi i, und links ist // der Imaginärteil betragsmäßig <=pi.) // Also arsinh(z) = -arsinh(-z) = - 2 artanh(-z/(1+sqrt(1+z^2))) // = (wegen -artanh(-w) = artanh(w)) = 2 artanh(z/(1+sqrt(1+z^2))). // Real- und Imaginärteil des Ergebnisses sind Floats, außer wenn z reell oder // rein imaginär ist. // Um für zwei Zahlen u,v mit u^2-v^2=1 und u,v beide in Bild(sqrt) // (d.h. Realteil>0.0 oder Realteil=0.0 und Imaginärteil>=0.0) // log(u+v) zu berechnen: // log(u+v) = 2 artanh(v/(u+1)) (!) // (Beweis: 2 artanh(v/(u+1)) = log(1+(v/(u+1))) - log(1-(v/(u+1))) // = log((1+u+v)/(u+1)) - log((1+u-v)/(u+1)) == log((1+u+v)/(1+u-v)) // = log(u+v) mod 2 pi i, und beider Imaginärteil ist > -pi und <= pi.) if (eq(x,0)) { // x=0 var cl_F yf; if (rationalp(y)) { DeclareType(cl_RA,y); // y rational if (eq(y,0)) // x=0, y=0 -> u=0, v=0 return cl_C_R(0,0); if (integerp(y)) { DeclareType(cl_I,y); // y Integer if (eq(y,1)) // x=0, y=1 -> v = pi/2 return cl_C_R(0,scale_float(pi(),-1)); if (eq(y,-1)) // x=0, y=-1 -> v = -pi/2 return cl_C_R(0,-scale_float(pi(),-1)); yf = cl_float_inline(y); // y in Float umwandeln } else { DeclareType(cl_RT,y); // y Ratio if (eq(denominator(y),2)) { // Nenner = 2 ? if (eq(numerator(y),1)) // x=0, y=1/2 -> v = pi/6 return cl_C_R(0,pi()/6); if (eq(numerator(y),-1)) // x=0, y=-1/2 -> v = -pi/6 return cl_C_R(0,-(pi()/6)); } yf = cl_float_inline(y); // y in Float umwandeln } } else { DeclareType(cl_F,y); yf = y; } // y Float var cl_F& y = yf; if (zerop(y)) // y=0.0 -> arcsin(y) = y als Ergebnis return cl_C_R(0,y); if (float_exponent(y) <= (-(sintC)float_digits(y))>>1) // e <= -d/2 <==> e <= -ceiling(d/2) return cl_C_R(0,y); var cl_F temp = 1-square(y); if (!minusp(temp)) // 1-y*y>=0, also |y|<=1 // v = atan(X=sqrt(1-y*y),Y=y) return cl_C_R(0,atan(sqrt(temp),y)); else { // 1-y*y<0, also |y|>1 temp = sqrt(-temp); // sqrt(y*y-1) if (minusp(y)) temp = temp - y; else temp = temp + y; // temp = sqrt(y^2-1)+|y|, ein Float >1 var cl_F u = ln(temp); // ln(|y|+sqrt(y^2-1)), ein Float >0 var cl_F v = scale_float(pi(),-1); // (scale-float pi -1) = pi/2 if (!minusp(y)) return cl_C_R(u,v); // y>1 -> v = pi/2 else return cl_C_R(-u,-v); // y<-1 -> v = -pi/2, u = -ln(...) } } if (eq(y,0)) { // y=0 var cl_F xf = cl_float_inline(x); // x in Float umwandeln var cl_F& x = xf; // x Float if (zerop(x)) return cl_C_R(x,0); // x=0.0 -> u=x, v=0. var cl_F temp = sqrt(1+square(x)); // sqrt(1+x^2) if (float_exponent(x) < 0) // Exponent e (von x/=0) <0 ? // |x|<1/2 return cl_C_R(atanhx(x/temp),0); else // |x|>=1/2 if (!minusp(x)) // x>=1 return cl_C_R(ln(temp+x),0); // u = ln(x+sqrt(1+x^2)) else // x<=-1 return cl_C_R(-ln(temp-x),0); // u = -ln(-x+sqrt(1+x^2)) } var cl_N z = complex_C(x,y); // z=x+iy var cl_N w = z/(1+sqrt(1+square(z))); // z/(1+sqrt(1+z^2)) // Da z=x+iy weder reell noch rein imaginär ist, ist auch // w := z/(1+sqrt(1+z^2)) weder reell noch rein imaginär. // (Beweis: Sollte sqrt(1+z^2) rationalen Real- und Imaginärteil haben, // so auch z, also auch w, und die Formel z = 2w/(1-w^2) zeigt, daß dann // z reell oder rein imaginär sein müßte. Also hat sqrt(1+z^2) ein // Float als Real- oder Imaginärteil, das Betragsquadrat des Nenners // ist also ein Float, und da Real- und Imaginärteil von z /=0 sind, // sind Real- und Imaginärteil von w Floats.) // Daher hat dann atanh(...) Floats als Realteil u und Imaginärteil v. { DeclareType(cl_C,w); cl_C_R u_v = atanh(realpart(w),imagpart(w)); var cl_R& u = u_v.realpart; var cl_R& v = u_v.imagpart; { DeclareType(cl_F,u); DeclareType(cl_F,v); return cl_C_R(scale_float(u,1),scale_float(v,1)); // u:=2*u, v:=2*v }}} } // namespace cln cln-1.3.3/src/complex/transcendental/cl_C_expt_C.cc0000644000000000000000000001234611201634736017105 0ustar // expt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" #include "real/cl_R.h" #include "cln/rational.h" #include "rational/cl_RA.h" #include "integer/cl_I.h" #include "base/cl_N.h" namespace cln { // Methode: // Falls y rational: // Falls y Integer: // Falls y=0: Ergebnis 1, // [Nach CLTL folgendermaßen: // x reell: // x rational -> Fixnum 1 // x Float -> (float 1 x) // x komplex: // x komplex rational -> Fixnum 1 // sonst: #C(1.0 0.0) im Float-Format des Real- bzw. Imaginärteils von x // ] // Falls x rational oder komplex rational oder |y| klein: // x^|y| durch wiederholtes Quadrieren und Multiplizieren und evtl. // Kehrwert-Bilden ermitteln. // Sonst wie bei 'y Float'. // Falls y Ratio m/n: // Es gilt (expt x m/n) = (expt (expt x 1/n) m). // Falls x in Q(i) liegt (also rational oder komplex rational ist): // Sollte x^(m/n) in Q(i) liegen, so auch eine n-te Wurzel x^(1/n) // (und bei n=2 oder n=4 damit auch alle n-ten Wurzeln x^(1/n) ). // Falls x rational >=0: n-te Wurzel aus x nehmen. Ist sie rational, // deren m-te Potenz als Ergebnis. // Falls x rational <=0 oder komplex rational und n Zweierpotenz: // n-te Wurzel aus x nehmen (mehrfaches sqrt). Ist sie rational oder // komplex rational, deren m-te Potenz als Ergebnis. // [Beliebige n betrachten!??] // Falls n Zweierpotenz und |m|,n klein: n-te Wurzel aus x nehmen // (mehrfaches sqrt), davon die m-te Potenz durch wiederholtes // Quadrieren und Multiplizieren und evtl. Kehrwert-Bilden. // Sonst wie bei 'y Float'. // Falls y Float oder komplex: // Falls (zerop x): // Falls Realteil von y >0 : // liefere 0.0 falls x und y reell, #C(0.0 0.0) sonst. // Sonst Error. // Falls y=0.0: // liefere 1.0 falls x und y reell, #C(1.0 0.0) sonst. // Sonst: (exp (* (log x) y)) // Das Ergebnis liegt in Q(i), falls x in Q(i) liegt und 4y ein Integer ist.?? // Genauigkeit erhöhen, log2(|y|) Bits mehr?? // Bei x oder y rational und der andere Long-Float: bitte kein Single-Float!?? // Liefert x^0. inline const cl_N expt_0 (const cl_N& x) { #ifdef STRICT_CLTL // y=0 -> 1 im Format von x. if (realp(x)) { DeclareType(cl_R,x); if (rationalp(x)) { DeclareType(cl_RA,x); return 1; } else { DeclareType(cl_F,x); return cl_float(1,x); } } else { DeclareType(cl_C,x); var cl_R f = contagion(realpart(x),imagpart(x)); if (rationalp(f)) { DeclareType(cl_RA,f); return 1; } else { DeclareType(cl_F,f); // #C(1.0 0.0) return complex_C(cl_float(1,f),cl_float(0,f)); } } #else // Exponent exakt 0 -> Ergebnis exakt 1 unused x; return 1; #endif } inline const cl_R contagion (const cl_N& x) { if (realp(x)) { DeclareType(cl_R,x); return x; } else { DeclareType(cl_C,x); return contagion(realpart(x),imagpart(x)); } } const cl_N expt (const cl_N& x, const cl_N& y) { if (realp(y)) { DeclareType(cl_R,y); if (rationalp(y)) { DeclareType(cl_RA,y); // y rational if (integerp(y)) { DeclareType(cl_I,y); // y Integer if (eq(y,0)) return expt_0(x); // Liefere 1 if (fixnump(y)) // |y| klein ? return expt(x,y); // exakt ausrechnen if (realp(x)) { DeclareType(cl_R,x); if (rationalp(x)) { DeclareType(cl_RA,x); return expt(x,y); // exakt ausrechnen } } else { DeclareType(cl_C,x); if (rationalp(realpart(x)) && rationalp(imagpart(x))) return expt(x,y); // exakt ausrechnen } // x nicht exakt und |y| groß } else { DeclareType(cl_RT,y); // y Ratio var const cl_I& m = numerator(y); var const cl_I& n = denominator(y); if (realp(x)) { DeclareType(cl_R,x); if (rationalp(x)) { DeclareType(cl_RA,x); if (minusp(x)) goto complex_rational; // x rational >=0 var cl_RA w; if (rootp(x,n,&w)) // Wurzel rational? return expt(w,m); } } else { DeclareType(cl_C,x); if (rationalp(realpart(x)) && rationalp(imagpart(x))) goto complex_rational; } if (false) { complex_rational: // x in Q(i) var uintC k = power2p(n); if (k) { // n Zweierpotenz = 2^(k-1). n>1, also k>1 Mutable(cl_N,x); k--; do { x = sqrt(x); } while (--k > 0); return expt(x,m); } } if (fixnump(m) && fixnump(n)) { // |m| und n klein? var uintV _n = FN_to_UV(n); if ((_n & (_n-1)) == 0) { // n Zweierpotenz? Mutable(cl_N,x); until ((_n = _n >> 1) == 0) { x = sqrt(x); } return expt(x,m); } } } } } // allgemeiner Fall (z.B. y Float oder komplex): if (zerop(x)) { // x=0.0 ? if (zerop(y)) // y=0.0? return expt_0(x); // Liefere 1 if (rationalp(realpart(y))) // Realteil von y >0 exakt. return 0; if (!plusp(realpart(y))) // Realteil von y <=0 ? throw division_by_0_exception(); else { var cl_R f = contagion(contagion(x),contagion(y)); // ein Float, da sonst x = Fixnum 0 gewesen wäre { DeclareType(cl_F,f); var cl_F f0 = cl_float(0,f); return complex_C(f0,f0); // #C(0.0 0.0) } } } return exp(log(x)*y); } } // namespace cln cln-1.3.3/src/complex/transcendental/cl_C_sinh.cc0000644000000000000000000000156311201634736016623 0ustar // sinh(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { const cl_N sinh (const cl_N& x) { // Methode: // x reell -> klar // x = a+bi -> (complex (* (sinh a) (cos b)) (* (cosh a) (sin b))) if (realp(x)) { DeclareType(cl_R,x); return sinh(x); } else { DeclareType(cl_C,x); // x=a+bi var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); var cosh_sinh_t hyp_a = cosh_sinh(a); // cosh(a), sinh(a) errechnen var cos_sin_t trig_b = cos_sin(b); // cos(b), sin(b) errechnen // Da b nicht = Fixnum 0 ist, ist auch sin(b) nicht = Fixnum 0. // cosh(a) /= Fixnum 0. return complex_C(hyp_a.sinh * trig_b.cos, // sinh(a)*cos(b) hyp_a.cosh * trig_b.sin // cosh(a)*sin(b), nicht Fixnum 0 ); } } } // namespace cln cln-1.3.3/src/complex/transcendental/cl_C_atanh.cc0000644000000000000000000000335411201634736016755 0ustar // atanh(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { // Methode: // Wert und Branch Cuts nach der Formel CLTL2, S. 315: // artanh(z) = (log(1+z)-log(1-z)) / 2 // Sei z=x+iy, Ergebnis u+iv. // Falls x=0 und y=0: u=0, v=0. // Falls x=0: u = 0, v = atan(X=1,Y=y). // Falls y=0: // x rational -> x in Float umwandeln. // |x|<1/2: u = atanh(x), v = 0. // |x|>=1/2: (1+x)/(1-x) errechnen, // =0 -> Error, // >0 (also |x|<1) -> u = 1/2 log((1+x)/(1-x)), v = 0. // <0 (also |x|>1) -> u = 1/2 log(-(1+x)/(1-x)), // v = (-pi/2 für x>1, pi/2 für x<-1). // Sonst: // 1+x und 1-x errechnen. // x und y in Floats umwandeln. // |4x| und 1+x^2+y^2 errechnen, // |4x| < 1+x^2+y^2 -> u = 1/2 atanh(2x/(1+x^2+y^2)), // |4x| >= 1+x^2+y^2 -> u = 1/4 ln ((1+x^2+y^2)+2x)/((1+x^2+y^2)-2x) // oder besser (an der Singularität: |x|-1,|y| klein): // u = 1/4 ln ((1+x)^2+y^2)/((1-x)^2+y^2). // v = 1/2 atan(X=(1-x)(1+x)-y^2,Y=2y) * (-1 falls Y=0.0 und X<0.0 und x>=0.0, // 1 sonst) // Ergebnis ist reell nur, wenn z reell. // Real- und Imaginärteil des Ergebnisses sind Floats, außer wenn z reell oder // rein imaginär ist. inline const cl_C_R _atanh (const cl_N& z) { if (realp(z)) { DeclareType(cl_R,z); return atanh(z,0); } else { DeclareType(cl_C,z); return atanh(realpart(z),imagpart(z)); } } const cl_N atanh (const cl_N& z) { var cl_C_R u_v = _atanh(z); var cl_R& u = u_v.realpart; var cl_R& v = u_v.imagpart; return complex(u,v); } } // namespace cln cln-1.3.3/src/complex/transcendental/cl_C_asinh.cc0000644000000000000000000000521311201634736016760 0ustar // asinh(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { // Methode: // Wert und Branch Cuts nach der Formel CLTL2, S. 313: // arsinh(z) = log(z+sqrt(1+z^2)) // z=x+iy, Ergebnis u+iv. // Falls x=0 und y=0: u=0, v=0. // Falls x=0: arsinh(iy) = i arcsin(y). // y rational -> // Bei y=1: u = 0, v = pi/2. // Bei y=1/2: u = 0, v = pi/6. // Bei y=0: u = 0, v = 0. // Bei y=-1/2: u = 0, v = -pi/6. // Bei y=-1: u = 0, v = -pi/2. // Sonst y in Float umwandeln. // e := Exponent aus (decode-float y), d := (float-digits y) // Bei y=0.0 oder e<=-d/2 liefere u = 0, v = y // (denn bei e<=-d/2 ist y^2/3 < y^2/2 < 2^(-d)/2 = 2^(-d-1), also // 1 <= asin(y)/y < 1+y^2/3 < 1+2^(-d-1) < 1+2^(-d), // also ist asin(y)/y, auf d Bits gerundet, gleich 1.0). // Berechne 1-y^2. // Bei y>1 liefere u = ln(y+sqrt(y^2-1)), v = pi/2. // Bei y<-1 liefere u = -ln(|y|+sqrt(|y|^2-1)), v = -pi/2. // Bei |y|<=1 liefere u = 0, v = atan(X=sqrt(1-y^2),Y=y). // Falls y=0: // x rational -> x in Float umwandeln. // |x|<1/2: u = atanh(x/sqrt(1+x^2)), // x>=1/2: u = ln(x+sqrt(1+x^2)), // x<=-1/2: u = -ln(-x+sqrt(1+x^2)). // v = 0. // Sonst: // z in Bild(sqrt) -> log(sqrt(1+z^2)+z) = (!) = 2 artanh(z/(1+sqrt(1+z^2))). // z nicht in Bild(sqrt) -> // arsinh(z) = -arsinh(-z). // (Denn arsinh(z)+arsinh(-z) == log((z+sqrt(1+z^2))(-z+sqrt(1+z^2))) // = log((1+z^2)-z^2) = log(1) = 0 mod 2 pi i, und links ist // der Imaginärteil betragsmäßig <=pi.) // Also arsinh(z) = -arsinh(-z) = - 2 artanh(-z/(1+sqrt(1+z^2))) // = (wegen -artanh(-w) = artanh(w)) = 2 artanh(z/(1+sqrt(1+z^2))). // Real- und Imaginärteil des Ergebnisses sind Floats, außer wenn z reell oder // rein imaginär ist. // Um für zwei Zahlen u,v mit u^2-v^2=1 und u,v beide in Bild(sqrt) // (d.h. Realteil>0.0 oder Realteil=0.0 und Imaginärteil>=0.0) // log(u+v) zu berechnen: // log(u+v) = 2 artanh(v/(u+1)) (!) // (Beweis: 2 artanh(v/(u+1)) = log(1+(v/(u+1))) - log(1-(v/(u+1))) // = log((1+u+v)/(u+1)) - log((1+u-v)/(u+1)) == log((1+u+v)/(1+u-v)) // = log(u+v) mod 2 pi i, und beider Imaginärteil ist > -pi und <= pi.) inline const cl_C_R _asinh (const cl_N& z) { if (realp(z)) { DeclareType(cl_R,z); return asinh(z,0); } else { DeclareType(cl_C,z); return asinh(realpart(z),imagpart(z)); } } const cl_N asinh (const cl_N& z) { var cl_C_R u_v = _asinh(z); var cl_R& u = u_v.realpart; var cl_R& v = u_v.imagpart; return complex(u,v); } } // namespace cln cln-1.3.3/src/complex/transcendental/cl_C_tanh.cc0000644000000000000000000000204111201634736016604 0ustar // tanh(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { const cl_N tanh (const cl_N& x) { // Methode: // x reell -> (/ (sinh x) (cosh x)) // x = a+bi -> (/ (complex (* (sinh a) (cos b)) (* (cosh a) (sin b))) // (complex (* (cosh a) (cos b)) (* (sinh a) (sin b))) ) if (realp(x)) { DeclareType(cl_R,x); var cosh_sinh_t hyp = cosh_sinh(x); return hyp.sinh / hyp.cosh; } else { DeclareType(cl_C,x); // x=a+bi var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); var cos_sin_t trig_b = cos_sin(b); // cos(b), sin(b) errechnen var cosh_sinh_t hyp_a = cosh_sinh(a); // cosh(a), sinh(a) errechnen return complex_C(hyp_a.sinh * trig_b.cos, // sinh(a)*cos(b) hyp_a.cosh * trig_b.sin // cosh(a)*sin(b), nicht Fixnum 0 ) / complex(hyp_a.cosh * trig_b.cos, // cosh(a)*cos(b) hyp_a.sinh * trig_b.sin // sinh(a)*sin(b) ); } } } // namespace cln cln-1.3.3/src/complex/transcendental/cl_R_cis.cc0000644000000000000000000000055011201634736016452 0ustar // cis(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { const cl_N cis (const cl_R& x) { // Methode: // (complex (cos x) (sin x)) var cos_sin_t trig = cos_sin(x); return complex(trig.cos, trig.sin); } } // namespace cln cln-1.3.3/src/complex/transcendental/cl_C_phase.cc0000644000000000000000000000112111201634736016750 0ustar // phase(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { const cl_R phase (const cl_N& x) { // Methode: // (= x 0) -> willkürliches Ergebnis 0 // x reell -> Winkel von (x,0) in Polarkoordinaten // x komplex -> Winkel von ((realpart x),(imagpart x)) in Polarkoordinaten if (zerop(x)) return 0; if (realp(x)) { DeclareType(cl_R,x); return atan(x,0); } else { DeclareType(cl_C,x); return atan(realpart(x),imagpart(x)); } } } // namespace cln cln-1.3.3/src/complex/transcendental/cl_C_atanh_aux.cc0000644000000000000000000000744011201634736017632 0ustar // atanh(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "complex/cl_C.h" // Implementation. #include "base/cl_N.h" #include "cln/real.h" #include "float/transcendental/cl_F_tran.h" #include "real/cl_R.h" /* Use the inline version of cl_float */ #include "base/cl_inline.h" #include "real/conv/cl_F_from_R_def.cc" namespace cln { // Hilfsfunktion für atanh und atan: u+iv := artanh(x+iy). Liefert cl_C_R(u,v). const cl_C_R CL_FLATTEN atanh (const cl_R& x, const cl_R& y) { // Methode: // Wert und Branch Cuts nach der Formel CLTL2, S. 315: // artanh(z) = (log(1+z)-log(1-z)) / 2 // Sei z=x+iy, Ergebnis u+iv. // Falls x=0 und y=0: u=0, v=0. // Falls x=0: u = 0, v = atan(X=1,Y=y). // Falls y=0: // x rational -> x in Float umwandeln. // |x|<1/2: u = atanh(x), v = 0. // |x|>=1/2: (1+x)/(1-x) errechnen, // =0 -> Error, // >0 (also |x|<1) -> u = 1/2 log((1+x)/(1-x)), v = 0. // <0 (also |x|>1) -> u = 1/2 log(-(1+x)/(1-x)), // v = (-pi/2 für x>1, pi/2 für x<-1). // Sonst: // 1+x und 1-x errechnen. // x und y in Floats umwandeln. // |4x| und 1+x^2+y^2 errechnen, // |4x| < 1+x^2+y^2 -> u = 1/2 atanh(2x/(1+x^2+y^2)), // |4x| >= 1+x^2+y^2 -> u = 1/4 ln ((1+x^2+y^2)+2x)/((1+x^2+y^2)-2x) // oder besser (an der Singularität: |x|-1,|y| klein): // u = 1/4 ln ((1+x)^2+y^2)/((1-x)^2+y^2). // v = 1/2 atan(X=(1-x)(1+x)-y^2,Y=2y) * (-1 falls Y=0.0 und X<0.0 und x>=0.0, // 1 sonst) // Ergebnis ist reell nur, wenn z reell. // Real- und Imaginärteil des Ergebnisses sind Floats, außer wenn z reell oder // rein imaginär ist. if (eq(x,0)) // x=0 -> u=0, v=atan(X=1,Y=y) (Fall y=0 ist inbegriffen) return cl_C_R(0, atan(1,y)); if (eq(y,0)) { var cl_F xf = cl_float_inline(x); // (float x) var cl_F& x = xf; // x Float if (zerop(x)) // x=0.0 -> x als Ergebnis return cl_C_R(x, 0); if (float_exponent(x) < 0) // Exponent e<0, also |x|<1/2 return cl_C_R(atanhx(x), 0); // e>=0, also |x|>=1/2 var cl_F xx_den = 1 - x; var cl_F xx = (1 + x) / xx_den; // (1+x)/(1-x) var cl_R v; if (!minusp(xx)) { if (zerop(xx)) { throw division_by_0_exception(); } v = 0; } else { // (1+x)/(1-x) < 0 -> Betrag nehmen, Imaginärteil berechnen: xx = - xx; v = scale_float(pi(),-1); // (scale-float pi -1) = pi/2 if (minusp(xx_den)) // 1-x<0 -> dann -pi/2 v = -v; } // ln bilden, durch 2 return cl_C_R(scale_float(ln(xx),-1), v); } var cl_R _1_plus_x = 1+x; var cl_R _1_minus_x = 1-x; // x und y in Floats umwandeln: (Diese Fallunterscheidung ist // symmetrisch in x und y, auch wenn's nicht so aussieht.) var cl_F xf; var cl_F yf; if (rationalp(x)) { DeclareType(cl_RA,x); yf = cl_float_inline(y); xf = cl_float(x,yf); } else { DeclareType(cl_F,x); xf = x; yf = cl_somefloat(y,xf); } var cl_F yf_2 = square(yf); var cl_F u; { var cl_F temp1 = abs(scale_float(xf,2)); // |4x| var cl_F temp2 = 1 + (square(xf) + yf_2); // 1+x^2+y^2 if (temp1 < temp2) // |4x| < 1+x^2+y^2 ? // u = 1/2 atanh(2x/(1+x^2+y^2)) u = scale_float(atanhx(scale_float(xf,1)/temp2),-1); else { // u = 1/4 ln ((1+x)^2+y^2)/((1-x)^2+y^2) var cl_F num = _1_plus_x*_1_plus_x + yf_2; // (1+x)^2+y^2, ein Float >=0 var cl_F den = _1_minus_x*_1_minus_x + yf_2; // (1-x)^2+y^2, ein Float >=0 if (zerop(den)) { throw division_by_0_exception(); } u = scale_float(ln(num/den),-2); } } var cl_F v; { var cl_F X = _1_plus_x*_1_minus_x-yf_2; var cl_F Y = scale_float(yf,1); v = atan(X,Y); // atan(X=(1-x)(1+x)-y^2,Y=2y), ein Float if (minusp(X) && !minusp(x) && zerop(Y)) v = -v; v = scale_float(v,-1); // 1/2 * atan(...) * +-1 } return cl_C_R(u,v); } } // namespace cln cln-1.3.3/src/complex/transcendental/cl_C_cos.cc0000644000000000000000000000142511201634736016443 0ustar // cos(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { const cl_N cos (const cl_N& x) { // Methode: // x reell -> klar // x = a+bi -> (complex (* (cos a) (cosh b)) (- (* (sin a) (sinh b)))) if (realp(x)) { DeclareType(cl_R,x); return cos(x); } else { DeclareType(cl_C,x); // x=a+bi var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); var cosh_sinh_t hyp_b = cosh_sinh(b); // cosh(b), sinh(b) errechnen var cos_sin_t trig_a = cos_sin(a); // cos(a), sin(a) errechnen return complex(trig_a.cos * hyp_b.cosh, // cos(a)*cosh(b) - (trig_a.sin * hyp_b.sinh) // -sin(a)*sinh(b) ); } } } // namespace cln cln-1.3.3/src/complex/transcendental/cl_C_cis.cc0000644000000000000000000000151511201634736016435 0ustar // cis(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { const cl_N cis (const cl_N& x) { // Methode: // x reell -> (complex (cos x) (sin x)) // x = a+bi -> (complex (* (exp (- b)) (cos a)) (* (exp (- b)) (sin a))) if (realp(x)) { DeclareType(cl_R,x); var cos_sin_t trig = cos_sin(x); return complex(trig.cos, trig.sin); } else { DeclareType(cl_C,x); // x=a+bi var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); var cos_sin_t trig_a = cos_sin(a); // cos(a), sin(a) errechnen var cl_R exp_minusb = exp(-b); // (exp (- b)) return complex(exp_minusb*trig_a.cos, // (* (exp (- b)) (cos a)) exp_minusb*trig_a.sin); // (* (exp (- b)) (sin a)) } } } // namespace cln cln-1.3.3/src/complex/transcendental/cl_C_sin.cc0000644000000000000000000000156011201634736016450 0ustar // sin(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { const cl_N sin (const cl_N& x) { // Methode: // x reell -> klar // x = a+bi -> (complex (* (sin a) (cosh b)) (* (cos a) (sinh b))) if (realp(x)) { DeclareType(cl_R,x); return sin(x); } else { DeclareType(cl_C,x); // x=a+bi var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); var cosh_sinh_t hyp_b = cosh_sinh(b); // cosh(b), sinh(b) errechnen var cos_sin_t trig_a = cos_sin(a); // cos(a), sin(a) errechnen // Da b nicht = Fixnum 0 ist, ist auch sinh(b) nicht = Fixnum 0. // cos(a) /= Fixnum 0. return complex_C(trig_a.sin * hyp_b.cosh, // sin(a)*cosh(b) trig_a.cos * hyp_b.sinh // cos(a)*sinh(b), nicht Fixnum 0 ); } } } // namespace cln cln-1.3.3/src/complex/transcendental/cl_C_atan.cc0000644000000000000000000000151711201634736016604 0ustar // atan(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { // Methode: // Wert und Branch Cuts nach der Formel CLTL2, S. 307/312/313: // arctan(z) = (log(1+iz)-log(1-iz)) / 2i // Sei z=x+iy, errechne u+iv = artanh(-y+ix) wie oben, Ergebnis v-iu. // Real- und Imaginärteil des Ergebnisses sind Floats, außer wenn z reell oder // rein imaginär ist. inline const cl_C_R _atan (const cl_N& z) { if (realp(z)) { DeclareType(cl_R,z); return atanh(0,z); } else { DeclareType(cl_C,z); return atanh(-imagpart(z),realpart(z)); } } const cl_N atan (const cl_N& z) { var cl_C_R u_v = _atan(z); var cl_R& u = u_v.realpart; var cl_R& v = u_v.imagpart; return complex(v,-u); // v-iu } } // namespace cln cln-1.3.3/src/complex/transcendental/cl_C_acos.cc0000644000000000000000000000414311201634736016604 0ustar // acos(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" #include "real/cl_R.h" #include "cln/rational.h" #include "rational/cl_RA.h" #include "cln/float.h" namespace cln { inline const cl_F pi (const cl_R& v) { if (rationalp(v)) return pi(); else { DeclareType(cl_F,v); return pi(v); } } const cl_N acos (const cl_N& z) { // Methode: // Wert und Branch Cuts nach der Formel CLTL2, S. 312: // arccos(z) = log(z+i*sqrt(1-z^2))/i = pi/2 - arcsin(z) // Sei z=x+iy. // Falls y=0: // Falls x rational: // Bei x=1: Ergebnis 0. // Bei x=1/2: Ergebnis pi/3. // Bei x=0: Ergebnis pi/2. // Bei x=-1/2: Ergebnis 2pi/3. // Bei x=-1: Ergebnis pi. // Sonst x in Float umwandeln. // Falls x>1: Ergebnis i ln(x+sqrt(x^2-1)). // Sonst errechne u+iv = arsinh(-y+ix) wie oben, Ergebnis (pi/2-v)+iu. cl_C_R u_v; if (realp(z)) { DeclareType(cl_R,z); // y=0 var const cl_R& x = z; var cl_F xf; if (rationalp(x)) { DeclareType(cl_RA,x); // x rational if (integerp(x)) { DeclareType(cl_I,x); // x Integer if (eq(x,0)) // x=0 -> Ergebnis pi/2 return scale_float(pi(),-1); if (eq(x,1)) // x=1 -> Ergebnis 0 return 0; if (eq(x,-1)) // x=-1 -> Ergebnis pi return pi(); xf = cl_float(x); } else { DeclareType(cl_RT,x); // x Ratio if (eq(denominator(x),2)) { // Nenner = 2 ? if (eq(numerator(x),1)) // x=1/2 -> Ergebnis pi/3 return pi()/3; if (eq(numerator(x),-1)) // x=-1/2 -> Ergebnis 2pi/3 return scale_float(pi(),1)/3; } xf = cl_float(x); } } else { DeclareType(cl_F,x); xf = x; } // x Float { var cl_F& x = xf; if (cl_I(1) < x) // x>1 return complex_C(0,ln(x+sqrt(square(x)-1))); u_v = asinh(0,x); }} else { DeclareType(cl_C,z); u_v = asinh(-imagpart(z),realpart(z)); } var cl_R& u = u_v.realpart; var cl_R& v = u_v.imagpart; var cl_F archimedes = pi(v); // pi im Float-Format von v return complex(scale_float(archimedes,-1)-v,u); // (pi/2-v)+iu } } // namespace cln cln-1.3.3/src/complex/transcendental/cl_C_tan.cc0000644000000000000000000000204311201634736016436 0ustar // tan(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { const cl_N tan (const cl_N& x) { // Methode: // x reell -> (/ (sin x) (cos x)) // x = a+bi -> (/ (complex (* (sin a) (cosh b)) (* (cos a) (sinh b))) // (complex (* (cos a) (cosh b)) (- (* (sin a) (sinh b)))) ) if (realp(x)) { DeclareType(cl_R,x); var cos_sin_t trig = cos_sin(x); return trig.sin / trig.cos; } else { DeclareType(cl_C,x); // x=a+bi var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); var cosh_sinh_t hyp_b = cosh_sinh(b); // cosh(b), sinh(b) errechnen var cos_sin_t trig_a = cos_sin(a); // cos(a), sin(a) errechnen return complex_C(trig_a.sin * hyp_b.cosh, // sin(a)*cosh(b) trig_a.cos * hyp_b.sinh // cos(a)*sinh(b), nicht Fixnum 0 ) / complex(trig_a.cos * hyp_b.cosh, // cos(a)*cosh(b) - (trig_a.sin * hyp_b.sinh) // -sin(a)*sinh(b) ); } } } // namespace cln cln-1.3.3/src/complex/transcendental/cl_C_log.cc0000644000000000000000000000070511201634736016440 0ustar // log(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" #include "base/cl_N.h" namespace cln { const cl_N log (const cl_N& x) { // Methode: // (complex (log (abs x)) (phase x)) var cl_R r = abs(x); if (zerop(r)) // (abs x) = 0 -> Error { throw division_by_0_exception(); } return complex(ln(r),phase(x)); } } // namespace cln cln-1.3.3/src/complex/misc/0000755000000000000000000000000012173046176012360 5ustar cln-1.3.3/src/complex/misc/cl_C_expt.cc0000644000000000000000000000220111201634736014556 0ustar // expt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { // Methode: // Für y>0: // a:=x, b:=y. // Solange b gerade, setze a:=a*a, b:=b/2. [a^b bleibt invariant, = x^y.] // c:=a. // Solange b:=floor(b/2) >0 ist, // setze a:=a*a, und falls b ungerade, setze c:=a*c. // Ergebnis c. // Für y=0: Ergebnis 1. // Für y<0: (/ (expt x (- y))). // Assume y>0. inline const cl_N expt_pos (const cl_N& x, uintL y) { var cl_N a = x; var uintL b = y; while (!(b % 2)) { a = square(a); b = b >> 1; } var cl_N c = a; until (b == 1) { b = b >> 1; a = square(a); if (b % 2) { c = a * c; } } return c; } const cl_N expt (const cl_N& x, sintL y) { if (realp(x)) { DeclareType(cl_R,x); // x reell -> schnellere Routine return expt(x,y); } if (y==0) { return 1; } // y=0 -> Ergebnis 1 var uintL abs_y = (y<0 ? (uintL)(-y) : y); // Betrag von y nehmen var cl_N z = expt_pos(x,abs_y); // (expt x (abs y)) return (y<0 ? recip(z) : z); // evtl. noch Kehrwert nehmen } } // namespace cln cln-1.3.3/src/complex/misc/cl_N_as.cc0000644000000000000000000000157411201634736014230 0ustar // cl_N_As(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "base/cl_N.h" #include "cln/exception.h" namespace cln { // Cf. cl_N_p in cl_C_ring.cc. // But here, for better inlining in g++, it is preferrable to finish every // alternative with either "return true;" or "return false;". inline bool cl_N_p (const cl_number& x) { if (!x.pointer_p()) switch (x.nonpointer_tag()) { case cl_FN_tag: case cl_SF_tag: #if defined(CL_WIDE_POINTERS) case cl_FF_tag: #endif return true; } else if (x.pointer_type()->flags & cl_class_flags_subclass_complex) return true; return false; } const cl_N& cl_N_As (const cl_number& x, const char * filename, int line) { if (cl_N_p(x)) { DeclareType(cl_N,x); return x; } else throw as_exception(x,"a number",filename,line); } } // namespace cln cln-1.3.3/src/complex/misc/cl_C_debug.cc0000644000000000000000000000120211201634736014664 0ustar // cl_C debugging support. // General includes. #include "base/cl_sysdep.h" // Specification. // Implementation. #include "cln/complex.h" #include "cln/io.h" #include "cln/complex_io.h" namespace cln { static void dprint (cl_heap* pointer) { var const cl_N& obj = *(const cl_N*)&pointer; fprint(cl_debugout, "(cl_N) "); fprint(cl_debugout, obj); } AT_INITIALIZATION(dprint_N) { cl_register_type_printer(cl_class_complex,dprint); } // This dummy links in this module when requires it. int cl_C_debug_module; extern int cl_R_debug_module; static void* dummy[] = { &dummy, &cl_R_debug_module }; } // namespace cln cln-1.3.3/src/complex/misc/cl_C_conjugate.cc0000644000000000000000000000071311201634736015563 0ustar // conjugate(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { const cl_N conjugate (const cl_N& x) { if (realp(x)) return x; else { DeclareType(cl_C,x); var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); // Vorzeichenwechsel beim Imaginärteil return complex_C(a,-b); } } } // namespace cln cln-1.3.3/src/complex/misc/cl_C_eqhashcode.cc0000644000000000000000000000132611201634736015711 0ustar // cl_N equal_hashcode(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "base/cl_N.h" #include "complex/cl_C.h" #include "cln/real.h" namespace cln { uint32 equal_hashcode (const cl_N& x) { if (realp(x)) { DeclareType(cl_R,x); return equal_hashcode(x); } else { DeclareType(cl_C,x); var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); var uint32 code1 = equal_hashcode(a); var uint32 code2 = equal_hashcode(b); // Wichtig beim Kombinieren, wegen "complex canonicalization": // Ist imagpart=0.0, so ist der Hashcode = equal_hashcode(a). return code1 ^ ((code2 << 5) | (code2 >> 27)); } } } // namespace cln cln-1.3.3/src/complex/misc/cl_C_class.cc0000644000000000000000000000061211201634736014707 0ustar // cl_class_complex. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" namespace cln { static void complex_destructor (cl_heap* pointer) { (*(cl_heap_complex*)pointer).~cl_heap_complex(); } cl_class cl_class_complex = { complex_destructor, cl_class_flags_subclass_complex }; } // namespace cln cln-1.3.3/src/complex/misc/cl_C_expt_I.cc0000644000000000000000000000232211201634736015032 0ustar // expt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" #include "integer/cl_I.h" namespace cln { // Methode: // Für y>0: // a:=x, b:=y. // Solange b gerade, setze a:=a*a, b:=b/2. [a^b bleibt invariant, = x^y.] // c:=a. // Solange b:=floor(b/2) >0 ist, // setze a:=a*a, und falls b ungerade, setze c:=a*c. // Ergebnis c. // Für y=0: Ergebnis 1. // Für y<0: (/ (expt x (- y))). // Assume y>0. inline const cl_N expt_pos (const cl_N& x, const cl_I& y) { var cl_N a = x; var cl_I b = y; while (!oddp(b)) { a = square(a); b = b >> 1; } var cl_N c = a; until (eq(b,1)) { b = b >> 1; a = square(a); if (oddp(b)) { c = a * c; } } return c; } const cl_N expt (const cl_N& x, const cl_I& y) { if (realp(x)) { DeclareType(cl_R,x); // x reell -> schnellere Routine return expt(x,y); } if (eq(y,0)) { return 1; } // y=0 -> Ergebnis 1 var bool y_negative = minusp(y); var cl_I abs_y = (y_negative ? -y : y); // Betrag von y nehmen var cl_N z = expt_pos(x,abs_y); // (expt x (abs y)) return (y_negative ? recip(z) : z); // evtl. noch Kehrwert nehmen } } // namespace cln cln-1.3.3/src/complex/cl_C.h0000644000000000000000000001206111201634736012432 0ustar // cl_C internals #ifndef _CL_C_H #define _CL_C_H #include "cln/number.h" #include "cln/complex.h" #include "cln/sfloat_class.h" #include "cln/ffloat_class.h" #include "cln/dfloat_class.h" #include "cln/lfloat_class.h" #include "base/cl_macros.h" #include "cln/malloc.h" namespace cln { struct cl_heap_complex : cl_heap { cl_R realpart; cl_R imagpart; }; inline cl_heap_complex* TheComplex (cl_heap_complex* p) { return p; } inline cl_heap_complex* TheComplex (const cl_number& obj) { return (cl_heap_complex*)(obj.pointer); } inline cl_heap_complex* allocate_complex (const cl_R& real, const cl_R& imag) { cl_heap_complex* p = (cl_heap_complex*) malloc_hook(sizeof(cl_heap_complex)); p->refcount = 1; p->type = &cl_class_complex; p->realpart.pointer = real.pointer; cl_inc_refcount(real); p->imagpart.pointer = imag.pointer; cl_inc_refcount(imag); return p; } // Private constructor. // ptr should be the result of some allocate_complex() call. inline cl_N::cl_N (cl_heap_complex* ptr) : cl_number ((cl_private_thing) ptr) {} // Both work, but the first definition results in less compiler-generated // temporaries. #if 1 #define Complex cl_heap_complex* #else #define Complex cl_N #endif // Type tests inline bool realp (const cl_N& x) { if (x.pointer_p()) if (x.heappointer->type == &cl_class_complex) return false; return true; } inline bool complexp (const cl_N& x) { if (x.pointer_p()) if (x.heappointer->type == &cl_class_complex) return true; return false; } // Comparison with a fixnum. inline bool eq (const cl_N& x, sint32 y) { return x.word == cl_combine(cl_FN_tag,y); } inline bool exact_zerop (const cl_N& x) { return eq(x,0); } // A complex (cl_C) is a number which is not a real number (cl_R). // typedef class cl_C : public cl_N { public: }; inline bool realp (const cl_C& x) { unused x; return false; } inline bool complexp (const cl_C& x) { unused x; return true; } // Liefert zu reellen Zahlen a und b /= Fixnum 0 die komplexe Zahl a+bi. // complex_C(a,b) extern const cl_N complex_C (const cl_R& a, const cl_R& b); // realpart(x) liefert den Realteil der Zahl x. // imagpart(x) liefert den Imaginärteil der Zahl x. inline const cl_R& realpart (const cl_C& x) { return TheComplex(x)->realpart; } inline const cl_R& imagpart (const cl_C& x) { return TheComplex(x)->imagpart; } // Primitive forms of complex numbers with restricted part type. // typedef struct cl_C_SF { cl_SF realpart; cl_SF imagpart; cl_C_SF (const cl_SF& re, const cl_SF& im) : realpart(re), imagpart(im) {} }; inline const cl_N complex_C (const cl_C_SF& c) { return complex_C(c.realpart,c.imagpart); } // typedef struct cl_C_FF { cl_FF realpart; cl_FF imagpart; cl_C_FF (const cl_FF& re, const cl_FF& im) : realpart(re), imagpart(im) {} }; inline const cl_N complex_C (const cl_C_FF& c) { return complex_C(c.realpart,c.imagpart); } // typedef struct cl_C_DF { cl_DF realpart; cl_DF imagpart; cl_C_DF (const cl_DF& re, const cl_DF& im) : realpart(re), imagpart(im) {} }; inline const cl_N complex_C (const cl_C_DF& c) { return complex_C(c.realpart,c.imagpart); } // typedef struct cl_C_LF { cl_LF realpart; cl_LF imagpart; cl_C_LF (const cl_LF& re, const cl_LF& im) : realpart(re), imagpart(im) {} }; inline const cl_N complex_C (const cl_C_LF& c) { return complex_C(c.realpart,c.imagpart); } // cl_C_recip(a,b) liefert 1/(a+bi), wo a und b Short-Floats sind. extern const cl_C_SF cl_C_recip (const cl_SF& a, const cl_SF& b); // cl_C_recip(a,b) liefert 1/(a+bi), wo a und b Single-Floats sind. extern const cl_C_FF cl_C_recip (const cl_FF& a, const cl_FF& b); // cl_C_recip(a,b) liefert 1/(a+bi), wo a und b Double-Floats sind. extern const cl_C_DF cl_C_recip (const cl_DF& a, const cl_DF& b); // cl_C_recip(a,b) liefert 1/(a+bi), wo a und b gleichlange Long-Floats sind. extern const cl_C_LF cl_C_recip (const cl_LF& a, const cl_LF& b); // cl_C_hypot(a,b) liefert abs(a+bi), wo a und b Short-Floats sind. extern const cl_SF cl_hypot (const cl_SF& a, const cl_SF& b); // cl_C_hypot(a,b) liefert abs(a+bi), wo a und b Single-Floats sind. extern const cl_FF cl_hypot (const cl_FF& a, const cl_FF& b); // cl_C_hypot(a,b) liefert abs(a+bi), wo a und b Double-Floats sind. extern const cl_DF cl_hypot (const cl_DF& a, const cl_DF& b); // cl_C_hypot(a,b) liefert abs(a+bi), wo a und b gleichlange Long-Floats sind. extern const cl_LF cl_hypot (const cl_LF& a, const cl_LF& b); // cl_C_hypot(a,b) liefert abs(a+bi), wo a und b reelle Zahlen sind. extern const cl_R cl_hypot (const cl_R& a, const cl_R& b); // Liefert (abs x), wo x eine nicht-reelle Zahl ist. extern const cl_R abs (const cl_C& x); // typedef struct cl_C_R { cl_R realpart; cl_R imagpart; cl_C_R () : realpart(0), imagpart(0) {} cl_C_R (const cl_R& re, const cl_R& im) : realpart(re), imagpart(im) {} }; // Hilfsfunktion für atanh und atan: u+iv := artanh(x+iy). Liefert cl_C_R(u,v). extern const cl_C_R atanh (const cl_R& x, const cl_R& y); // Hilfsfunktion für asinh und asin: u+iv := arsinh(x+iy). Liefert cl_C_R(u,v). extern const cl_C_R asinh (const cl_R& x, const cl_R& y); } // namespace cln #endif /* _CL_C_H */ cln-1.3.3/src/complex/elem/0000755000000000000000000000000012173046176012347 5ustar cln-1.3.3/src/complex/elem/cl_C_equal.cc0000644000000000000000000000214411201634736014702 0ustar // equal(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { bool equal (const cl_N& x, const cl_N& y) { // Methode: // Falls beide reell, klar. // Falls x reell, y komplex: (= x (realpart y)) und (zerop (imagpart y)). // Falls x komplex, y reell: analog // Falls beide komplex: Realteile und Imaginärteile jeweils gleich? if (realp(x)) { DeclareType(cl_R,x); if (realp(y)) { DeclareType(cl_R,y); // x,y beide reell return equal(x,y); } else { DeclareType(cl_C,y); // x reell, y komplex if (!zerop(imagpart(y))) return false; return equal(x,realpart(y)); } } else { DeclareType(cl_C,x); if (realp(y)) { DeclareType(cl_R,y); // x komplex, y reell if (!zerop(imagpart(x))) return false; return equal(realpart(x),y); } else { DeclareType(cl_C,y); // x,y beide komplex if (!equal(realpart(x),realpart(y))) return false; if (!equal(imagpart(x),imagpart(y))) return false; return true; } } } } // namespace cln cln-1.3.3/src/complex/elem/cl_C_zerop.cc0000644000000000000000000000103611201634736014731 0ustar // zerop(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { bool zerop (const cl_N& x) { if (realp(x)) { DeclareType(cl_R,x); return zerop(x); } else { DeclareType(cl_C,x); // x komplex, teste ob Real- und Imaginärteil beide = 0 sind. var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); if (zerop(a)) if (zerop(b)) return true; return false; } } } // namespace cln cln-1.3.3/src/complex/elem/cl_C_realpart.cc0000644000000000000000000000053211201634736015404 0ustar // realpart(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" namespace cln { const cl_R realpart (const cl_N& x) { if (realp(x)) { DeclareType(cl_R,x); return x; } else { DeclareType(cl_C,x); return realpart(x); } } } // namespace cln cln-1.3.3/src/complex/elem/cl_C_minus.cc0000644000000000000000000000217211201634736014727 0ustar // binary operator - // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { const cl_N operator- (const cl_N& x, const cl_N& y) { // Methode: // x,y beide reell -> klar. // x=a, y=b+ci -> (a-b)+(-c)i // x=a+bi, y=c -> (a-c)+bi // x=a+bi, y=c+di -> (a-c)+(b-d)i if (realp(x)) { DeclareType(cl_R,x); if (realp(y)) { DeclareType(cl_R,y); return x-y; } else { DeclareType(cl_C,y); // x=a, y=b+ci var const cl_R& a = x; var const cl_R& b = realpart(y); var const cl_R& c = imagpart(y); return complex_C(a-b,-c); } } else { DeclareType(cl_C,x); if (realp(y)) { DeclareType(cl_R,y); // x=a+bi, y=c var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); var const cl_R& c = y; return complex_C(a-c,b); } else { DeclareType(cl_C,y); // x=a+bi, y=c+di var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); var const cl_R& c = realpart(y); var const cl_R& d = imagpart(y); return complex(a-c,b-d); } } } } // namespace cln cln-1.3.3/src/complex/elem/cl_C_mul.cc0000644000000000000000000000221611201634736014370 0ustar // binary operator * // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { const cl_N operator* (const cl_N& x, const cl_N& y) { // Methode: // x,y beide reell -> klar. // x=a, y=b+ci -> (a*b)+(a*c)i // x=a+bi, y=c -> (a*c)+(b*c)i // x=a+bi, y=c+di -> (a*c-b*d)+(a*d+b*c)i if (realp(x)) { DeclareType(cl_R,x); if (realp(y)) { DeclareType(cl_R,y); return x*y; } else { DeclareType(cl_C,y); // x=a, y=b+ci var const cl_R& a = x; var const cl_R& b = realpart(y); var const cl_R& c = imagpart(y); return complex(a*b,a*c); } } else { DeclareType(cl_C,x); if (realp(y)) { DeclareType(cl_R,y); // x=a+bi, y=c var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); var const cl_R& c = y; return complex(a*c,b*c); } else { DeclareType(cl_C,y); // x=a+bi, y=c+di var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); var const cl_R& c = realpart(y); var const cl_R& d = imagpart(y); return complex(a*c-b*d,a*d+b*c); } } } } // namespace cln cln-1.3.3/src/complex/elem/cl_C_imagpart.cc0000644000000000000000000000047711201634736015406 0ustar // imagpart(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" namespace cln { const cl_R imagpart (const cl_N& x) { if (realp(x)) return 0; else { DeclareType(cl_C,x); return imagpart(x); } } } // namespace cln cln-1.3.3/src/complex/elem/cl_C_uminus.cc0000644000000000000000000000077511201634736015123 0ustar // unary operator - // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { const cl_N operator- (const cl_N& x) { // Methode: // x reell -> klar. // x=a+bi -> (-a) + (-b) i if (realp(x)) { DeclareType(cl_R,x); return -x; } else { DeclareType(cl_C,x); var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); return complex_C(-a,-b); } } } // namespace cln cln-1.3.3/src/complex/elem/cl_C_minus1.cc0000644000000000000000000000077311201634736015015 0ustar // minus1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { const cl_N minus1 (const cl_N& x) { // Methode: // x reell -> klar. // x=a+bi -> (a-1)+bi if (realp(x)) { DeclareType(cl_R,x); return minus1(x); } else { DeclareType(cl_C,x); var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); return complex_C(minus1(a),b); } } } // namespace cln cln-1.3.3/src/complex/elem/cl_C_square.cc0000644000000000000000000000102311201634736015066 0ustar // square(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { const cl_N square (const cl_N& x) { // Methode: // x reell -> klar. // x=a+bi -> (a^2-b^2)+(2*a*b)i if (realp(x)) { DeclareType(cl_R,x); return square(x); } else { DeclareType(cl_C,x); var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); return complex_C(square(a)-square(b),2*a*b); } } } // namespace cln cln-1.3.3/src/complex/elem/cl_C_from_R_R_complex1.cc0000644000000000000000000000056611201634736017116 0ustar // complex(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "complex/cl_C.h" // Implementation. #include "real/cl_R.h" namespace cln { const cl_N complex (const cl_R& a, const cl_R& b) { // Methode: // Falls b=0, nur a. sonst komplexe Zahl erzeugen. if (eq(b,0)) return a; else return allocate_complex(a,b); } } // namespace cln cln-1.3.3/src/complex/elem/cl_C_plus1.cc0000644000000000000000000000076711201634736014650 0ustar // plus1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { const cl_N plus1 (const cl_N& x) { // Methode: // x reell -> klar. // x=a+bi -> (a+1)+bi if (realp(x)) { DeclareType(cl_R,x); return plus1(x); } else { DeclareType(cl_C,x); var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); return complex_C(plus1(a),b); } } } // namespace cln cln-1.3.3/src/complex/elem/cl_C_plus.cc0000644000000000000000000000216611201634736014562 0ustar // binary operator + // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { const cl_N operator+ (const cl_N& x, const cl_N& y) { // Methode: // x,y beide reell -> klar. // x=a, y=b+ci -> (a+b)+ci // x=a+bi, y=c -> (a+c)+bi // x=a+bi, y=c+di -> (a+c)+(b+d)i if (realp(x)) { DeclareType(cl_R,x); if (realp(y)) { DeclareType(cl_R,y); return x+y; } else { DeclareType(cl_C,y); // x=a, y=b+ci var const cl_R& a = x; var const cl_R& b = realpart(y); var const cl_R& c = imagpart(y); return complex_C(a+b,c); } } else { DeclareType(cl_C,x); if (realp(y)) { DeclareType(cl_R,y); // x=a+bi, y=c var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); var const cl_R& c = y; return complex_C(a+c,b); } else { DeclareType(cl_C,y); // x=a+bi, y=c+di var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); var const cl_R& c = realpart(y); var const cl_R& d = imagpart(y); return complex(a+c,b+d); } } } } // namespace cln cln-1.3.3/src/complex/elem/cl_C_from_R_R_complex.cc0000644000000000000000000000040211201634736017022 0ustar // complex_C(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "complex/cl_C.h" // Implementation. namespace cln { const cl_N complex_C (const cl_R& a, const cl_R& b) { return allocate_complex(a,b); } } // namespace cln cln-1.3.3/src/complex/elem/division/0000755000000000000000000000000012173046176014173 5ustar cln-1.3.3/src/complex/elem/division/cl_C_LF_recip.cc0000644000000000000000000000461211201634736017104 0ustar // cl_C_recip(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "complex/cl_C.h" // Implementation. #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" namespace cln { ALL_cl_LF_OPERATIONS_SAME_PRECISION() const cl_C_LF cl_C_recip (const cl_LF& a, const cl_LF& b) { // Zuerst a und b auf gleiche Länge bringen: den längeren runden. // a=0.0 -> liefere die Komponenten a=0.0 und -1/b. // b=0.0 -> liefere die Komponenten 1/a und b=0.0. // e:=max(exponent(a),exponent(b)). // a':=a/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren a':=a/2^e // oder beim Quadrieren a'*a': 2*(e-exponent(a))>exp_mid-exp_low-1 // d.h. exponent(b)-exponent(a)>floor((exp_mid-exp_low-1)/2) ). // b':=b/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren b':=b/2^e // oder beim Quadrieren b'*b': 2*(e-exponent(b))>exp_mid-exp_low-1 // d.h. exponent(a)-exponent(b)>floor((exp_mid-exp_low-1)/2) ). // c':=a'*a'+b'*b', // liefere die beiden Komponenten 2^(-e)*a'/c' und -2^(-e)*b'/c'. { Mutable(cl_LF,a); Mutable(cl_LF,b); { var uintC a_len = TheLfloat(a)->len; var uintC b_len = TheLfloat(b)->len; if (!(a_len == b_len)) { if (a_len < b_len) b = shorten(b,a_len); else a = shorten(a,b_len); } } var sintE a_exp; var sintE b_exp; { // Exponenten von a holen: var uintE uexp = TheLfloat(a)->expo; if (uexp == 0) // a=0.0 -> liefere (complex a (- (/ b))) : return cl_C_LF(a,-recip(b)); a_exp = (sintE)(uexp - LF_exp_mid); } { // Exponenten von b holen: var uintE uexp = TheLfloat(b)->expo; if (uexp == 0) // b=0.0 -> liefere (complex (/ a) b) : return cl_C_LF(recip(a),b); b_exp = (sintE)(uexp - LF_exp_mid); } // Nun a_exp = float_exponent(a), b_exp = float_exponent(b). var sintE e = (a_exp > b_exp ? a_exp : b_exp); // Maximum der Exponenten // a und b durch 2^e dividieren: var cl_LF na = ((b_exp > a_exp) && ((uintE)(b_exp-a_exp) > (uintE)floor(LF_exp_mid-LF_exp_low-1,2)) ? encode_LF0(TheLfloat(a)->len) : scale_float(a,-e)); var cl_LF nb = ((a_exp > b_exp) && ((uintE)(a_exp-b_exp) > (uintE)floor(LF_exp_mid-LF_exp_low-1,2)) ? encode_LF0(TheLfloat(b)->len) : scale_float(b,-e)); // c' := a'*a'+b'*b' berechnen: var cl_LF nc = square(na) + square(nb); // 2^(-e)*a'/c' + i * -2^(-e)*b'/c' return cl_C_LF(scale_float(na/nc,-e), scale_float(-(nb/nc),-e)); }} } // namespace cln cln-1.3.3/src/complex/elem/division/cl_C_FF_recip.cc0000644000000000000000000000364711201634736017105 0ustar // cl_C_recip(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "complex/cl_C.h" // Implementation. #include "cln/ffloat.h" #include "float/ffloat/cl_FF.h" namespace cln { const cl_C_FF cl_C_recip (const cl_FF& a, const cl_FF& b) { // a=0.0 -> liefere die Komponenten a=0.0 und -1/b. // b=0.0 -> liefere die Komponenten 1/a und b=0.0. // e:=max(exponent(a),exponent(b)). // a':=a/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren a':=a/2^e // oder beim Quadrieren a'*a': 2*(e-exponent(a))>exp_mid-exp_low-1 // d.h. exponent(b)-exponent(a)>floor((exp_mid-exp_low-1)/2) ). // b':=b/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren b':=b/2^e // oder beim Quadrieren b'*b': 2*(e-exponent(b))>exp_mid-exp_low-1 // d.h. exponent(a)-exponent(b)>floor((exp_mid-exp_low-1)/2) ). // c':=a'*a'+b'*b', // liefere die beiden Komponenten 2^(-e)*a'/c' und -2^(-e)*b'/c'. var sintL a_exp; var sintL b_exp; { // Exponenten von a holen: var uintL uexp = FF_uexp(cl_ffloat_value(a)); if (uexp == 0) // a=0.0 -> liefere (complex a (- (/ b))) : return cl_C_FF(a,-recip(b)); a_exp = (sintL)(uexp - FF_exp_mid); } { // Exponenten von b holen: var uintL uexp = FF_uexp(cl_ffloat_value(b)); if (uexp == 0) // b=0.0 -> liefere (complex (/ a) b) : return cl_C_FF(recip(a),b); b_exp = (sintL)(uexp - FF_exp_mid); } // Nun a_exp = float_exponent(a), b_exp = float_exponent(b). var sintL e = (a_exp > b_exp ? a_exp : b_exp); // Maximum der Exponenten // a und b durch 2^e dividieren: var cl_FF na = (b_exp-a_exp > floor(FF_exp_mid-FF_exp_low-1,2) ? cl_FF_0 : scale_float(a,-e)); var cl_FF nb = (a_exp-b_exp > floor(FF_exp_mid-FF_exp_low-1,2) ? cl_FF_0 : scale_float(b,-e)); // c' := a'*a'+b'*b' berechnen: var cl_FF nc = square(na) + square(nb); // 2^(-e)*a'/c' + i * -2^(-e)*b'/c' return cl_C_FF(scale_float(na/nc,-e), scale_float(-(nb/nc),-e)); } } // namespace cln cln-1.3.3/src/complex/elem/division/cl_C_DF_recip.cc0000644000000000000000000000370311201634736017074 0ustar // cl_C_recip(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "complex/cl_C.h" // Implementation. #include "cln/dfloat.h" #include "float/dfloat/cl_DF.h" namespace cln { const cl_C_DF cl_C_recip (const cl_DF& a, const cl_DF& b) { // a=0.0 -> liefere die Komponenten a=0.0 und -1/b. // b=0.0 -> liefere die Komponenten 1/a und b=0.0. // e:=max(exponent(a),exponent(b)). // a':=a/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren a':=a/2^e // oder beim Quadrieren a'*a': 2*(e-exponent(a))>exp_mid-exp_low-1 // d.h. exponent(b)-exponent(a)>floor((exp_mid-exp_low-1)/2) ). // b':=b/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren b':=b/2^e // oder beim Quadrieren b'*b': 2*(e-exponent(b))>exp_mid-exp_low-1 // d.h. exponent(a)-exponent(b)>floor((exp_mid-exp_low-1)/2) ). // c':=a'*a'+b'*b', // liefere die beiden Komponenten 2^(-e)*a'/c' und -2^(-e)*b'/c'. var sintL a_exp; var sintL b_exp; { // Exponenten von a holen: var uintL uexp = DF_uexp(TheDfloat(a)->dfloat_value_semhi); if (uexp == 0) // a=0.0 -> liefere (complex a (- (/ b))) : return cl_C_DF(a,-recip(b)); a_exp = (sintL)(uexp - DF_exp_mid); } { // Exponenten von b holen: var uintL uexp = DF_uexp(TheDfloat(b)->dfloat_value_semhi); if (uexp == 0) // b=0.0 -> liefere (complex (/ a) b) : return cl_C_DF(recip(a),b); b_exp = (sintL)(uexp - DF_exp_mid); } // Nun a_exp = float_exponent(a), b_exp = float_exponent(b). var sintL e = (a_exp > b_exp ? a_exp : b_exp); // Maximum der Exponenten // a und b durch 2^e dividieren: var cl_DF na = (b_exp-a_exp > floor(DF_exp_mid-DF_exp_low-1,2) ? cl_DF_0 : scale_float(a,-e)); var cl_DF nb = (a_exp-b_exp > floor(DF_exp_mid-DF_exp_low-1,2) ? cl_DF_0 : scale_float(b,-e)); // c' := a'*a'+b'*b' berechnen: var cl_DF nc = square(na) + square(nb); // 2^(-e)*a'/c' + i * -2^(-e)*b'/c' return cl_C_DF(scale_float(na/nc,-e), scale_float(-(nb/nc),-e)); } } // namespace cln cln-1.3.3/src/complex/elem/division/cl_C_div.cc0000644000000000000000000000140411201634736016177 0ustar // binary operator / // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" namespace cln { const cl_N operator/ (const cl_N& x, const cl_N& y) { // Methode: // x,y beide reell -> klar. // x=a+bi, y=c reell -> (a/c)+(b/c)i // y komplex -> (* x (/ y)) if (realp(y)) { DeclareType(cl_R,y); if (realp(x)) { DeclareType(cl_R,x); // x,y beide reell return x/y; } else { DeclareType(cl_C,x); // x komplex: x=a+bi, y=c var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); var const cl_R& c = y; return complex(a/c,b/c); } } else { DeclareType(cl_C,y); // y komplex return x * recip(y); } } } // namespace cln cln-1.3.3/src/complex/elem/division/cl_C_recip.cc0000644000000000000000000000642011201634736016522 0ustar // recip(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex.h" // Implementation. #include "complex/cl_C.h" #include "cln/real.h" #include "real/cl_R.h" #include "cln/rational.h" #include "rational/cl_RA.h" #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" namespace cln { ALL_cl_LF_OPERATIONS_SAME_PRECISION() // for GEN_F_OP2: #define NOMAP2(F,EXPR) \ cl_C_##F _tmp = EXPR; \ return complex_C(_tmp.realpart,_tmp.imagpart); #define MAP2(F,FN,EXPR) \ cl_C_##F _tmp = EXPR; \ return complex_C(FN(_tmp.realpart),FN(_tmp.imagpart)) const cl_N recip (const cl_N& x) { // Methode: // Falls x reell, klar. // Falls x=a+bi: // Falls a=0: 0+(-1/b)i. // Falls a und b beide rational sind: // c:=a*a+b*b, c:=1/c, liefere a*c+(-b*c)i. // Falls a oder b Floats sind: // Falls einer von beiden rational ist, runde ihn zum selben Float-Typ // wie der andere und führe das UP durch. // Falls beide Floats sind, erweitere auf den genaueren, führe das UP // durch und runde wieder auf den ungenaueren. // Das Ergebnis ist eine komplexe Zahl, da beide Komponenten Floats sind. // UP: [a,b Floats vom selben Typ] // a=0.0 -> liefere die Komponenten a=0.0 und -1/b. // b=0.0 -> liefere die Komponenten 1/a und b=0.0. // e:=max(exponent(a),exponent(b)). // a':=a/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren a':=a/2^e // oder beim Quadrieren a'*a': 2*(e-exponent(a))>exp_mid-exp_low-1 // d.h. exponent(b)-exponent(a)>floor((exp_mid-exp_low-1)/2) ). // b':=b/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren b':=b/2^e // oder beim Quadrieren b'*b': 2*(e-exponent(b))>exp_mid-exp_low-1 // d.h. exponent(a)-exponent(b)>floor((exp_mid-exp_low-1)/2) ). // c':=a'*a'+b'*b', // liefere die beiden Komponenten 2^(-e)*a'/c' und -2^(-e)*b'/c'. if (realp(x)) { DeclareType(cl_R,x); return recip(x); } else { DeclareType(cl_C,x); var const cl_R& a = realpart(x); var const cl_R& b = imagpart(x); // x = a+bi if (rationalp(a)) { DeclareType(cl_RA,a); if (eq(a,0)) // (complex 0 (- (/ b))) return complex_C(0,-recip(b)); if (rationalp(b)) { DeclareType(cl_RA,b); // a,b beide rational var cl_RA c = recip(square(a)+square(b)); return complex_C(a*c,-b*c); } else { DeclareType(cl_F,b); // a rational, b Float floatcase(b , return complex_C(cl_C_recip(cl_RA_to_SF(a),b)); , return complex_C(cl_C_recip(cl_RA_to_FF(a),b)); , return complex_C(cl_C_recip(cl_RA_to_DF(a),b)); , return complex_C(cl_C_recip(cl_RA_to_LF(a,TheLfloat(b)->len),b)); ); } } else { DeclareType(cl_F,a); if (rationalp(b)) { DeclareType(cl_RA,b); // a Float, b rational floatcase(a , return complex_C(cl_C_recip(a,cl_RA_to_SF(b))); , return complex_C(cl_C_recip(a,cl_RA_to_FF(b))); , return complex_C(cl_C_recip(a,cl_RA_to_DF(b))); , return complex_C(cl_C_recip(a,cl_RA_to_LF(b,TheLfloat(a)->len))); ); } else { DeclareType(cl_F,b); // a,b Floats #ifndef CL_LF_PEDANTIC GEN_F_OP2(a,b,cl_C_recip,2,1,); // uses NOMAP2, MAP2. #else GEN_F_OP2(a,b,cl_C_recip,2,0,); // uses NOMAP2, MAP2. #endif } } } } } // namespace cln cln-1.3.3/src/complex/elem/division/cl_C_SF_recip.cc0000644000000000000000000000357711201634736017124 0ustar // cl_C_recip(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "complex/cl_C.h" // Implementation. #include "cln/sfloat.h" #include "float/sfloat/cl_SF.h" namespace cln { const cl_C_SF cl_C_recip (const cl_SF& a, const cl_SF& b) { // a=0.0 -> liefere die Komponenten a=0.0 und -1/b. // b=0.0 -> liefere die Komponenten 1/a und b=0.0. // e:=max(exponent(a),exponent(b)). // a':=a/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren a':=a/2^e // oder beim Quadrieren a'*a': 2*(e-exponent(a))>exp_mid-exp_low-1 // d.h. exponent(b)-exponent(a)>floor((exp_mid-exp_low-1)/2) ). // b':=b/2^e bzw. 0.0 bei Underflowmöglichkeit (beim Skalieren b':=b/2^e // oder beim Quadrieren b'*b': 2*(e-exponent(b))>exp_mid-exp_low-1 // d.h. exponent(a)-exponent(b)>floor((exp_mid-exp_low-1)/2) ). // c':=a'*a'+b'*b', // liefere die beiden Komponenten 2^(-e)*a'/c' und -2^(-e)*b'/c'. var sintL a_exp; var sintL b_exp; { // Exponenten von a holen: var uintL uexp = SF_uexp(a); if (uexp == 0) // a=0.0 -> liefere (complex a (- (/ b))) : return cl_C_SF(a,-recip(b)); a_exp = (sintL)(uexp - SF_exp_mid); } { // Exponenten von b holen: var uintL uexp = SF_uexp(b); if (uexp == 0) // b=0.0 -> liefere (complex (/ a) b) : return cl_C_SF(recip(a),b); b_exp = (sintL)(uexp - SF_exp_mid); } // Nun a_exp = float_exponent(a), b_exp = float_exponent(b). var sintL e = (a_exp > b_exp ? a_exp : b_exp); // Maximum der Exponenten // a und b durch 2^e dividieren: var cl_SF na = (b_exp-a_exp > floor(SF_exp_mid-SF_exp_low-1,2) ? SF_0 : scale_float(a,-e)); var cl_SF nb = (a_exp-b_exp > floor(SF_exp_mid-SF_exp_low-1,2) ? SF_0 : scale_float(b,-e)); // c' := a'*a'+b'*b' berechnen: var cl_SF nc = square(na) + square(nb); // 2^(-e)*a'/c' + i * -2^(-e)*b'/c' return cl_C_SF(scale_float(na/nc,-e), scale_float(-(nb/nc),-e)); } } // namespace cln cln-1.3.3/src/complex/output/0000755000000000000000000000000012173046176012765 5ustar cln-1.3.3/src/complex/output/cl_N_bprint.cc0000644000000000000000000000247311201634736015527 0ustar // print_complex(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex_io.h" // Implementation. #include "cln/output.h" #include "cln/complex.h" #include "complex/cl_C.h" #include "cln/real_io.h" namespace cln { void print_complex (std::ostream& stream, const cl_print_number_flags& flags, const cl_N& z) { if (realp(z)) { DeclareType(cl_R,z); print_real(stream,flags,z); } else { DeclareType(cl_C,z); var cl_R re = realpart(z); var cl_R im = imagpart(z); if (flags.complex_readably) { // Common Lisp #C(re im) syntax fprintchar(stream,'#'); fprintchar(stream,'C'); fprintchar(stream,'('); print_real(stream,flags,re); fprintchar(stream,' '); print_real(stream,flags,im); fprintchar(stream,')'); } else { // Standard mathematical notation: re + im i if (!eq(im,0)) { if (!eq(re,0)) { // Example: 3-7i print_real(stream,flags,re); if (minusp(im)) { fprintchar(stream,'-'); print_real(stream,flags,-im); } else { fprintchar(stream,'+'); print_real(stream,flags,im); } fprintchar(stream,'i'); } else { // Example: 6i print_real(stream,flags,im); fprintchar(stream,'i'); } } else { // Example: 8 print_real(stream,flags,re); } } } } } // namespace cln cln-1.3.3/src/complex/output/cl_N_aprint.cc0000644000000000000000000000054211201634736015521 0ustar // print_complex(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex_io.h" // Implementation. #include "cln/output.h" namespace cln { void print_complex (std::ostream& stream, const cl_print_flags& flags, const cl_N& z) { print_complex(stream,(const cl_print_number_flags&)flags,z); } } // namespace cln cln-1.3.3/src/complex/input/0000755000000000000000000000000012173046176012564 5ustar cln-1.3.3/src/complex/input/cl_N_read_stream.cc0000644000000000000000000000523211731472024016310 0ustar // read_complex(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex_io.h" // Implementation. #include "cln/io.h" #include "base/string/cl_spushstring.h" #include "cln/input.h" namespace cln { // We read an entire token (or even more, if it begins with #C) into a // buffer and then call read_complex() on the buffer. class pushstring_hack : public cl_spushstring { public: char* start_pointer (void) { return buffer; } char* end_pointer (void) { return buffer+index; } }; static bool number_char_p (char c) { if ((c >= '0') && (c <= '9')) return true; if (((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z'))) return true; switch (c) { case '+': case '-': case '.': case '_': case '/': return true; default: return false; } } const cl_N read_complex (std::istream& stream, const cl_read_flags& flags) { // One pre-allocated buffer. This reduces the allocation/free cost. static pushstring_hack buffer; var int c; // Skip whitespace at the beginning. loop { c = stream.get(); if (stream.eof() || stream.fail()) goto eof; if ((c == ' ') || (c == '\t') || (c == '\n')) continue; else break; } // Found first non-whitespace character. // Numbers cannot cross lines. We can treat EOF and '\n' the same way. buffer.reset(); if (c == '#') { if (!(flags.lsyntax & lsyntax_commonlisp)) goto syntax1; buffer.push(c); // Read some digits, then a letter, then a list or token. loop { c = stream.get(); if (stream.eof() || stream.fail()) goto eof; buffer.push(c); if ((c >= '0') && (c <= '9')) continue; else break; } if (!(((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z')))) goto syntax1; c = stream.get(); if (stream.eof() || stream.fail()) goto eof; if (c == '(') { var uintL paren_level = 0; loop { buffer.push(c); if (c == '(') paren_level++; else if (c == ')') paren_level--; if (paren_level == 0) goto done; c = stream.get(); if (stream.eof() || stream.fail() || c == '\n') goto syntax; } } } // Read a number token. if (!number_char_p(c)) goto syntax1; loop { buffer.push(c); c = stream.peek(); // Avoid fail state on EOF. if (stream.eof() || stream.fail() || !number_char_p(c)) break; c = stream.get(); } done: // Parse the number. return read_complex(flags, buffer.start_pointer(), buffer.end_pointer(), NULL ); // Handle syntax error. syntax1: buffer.push(c); syntax: throw read_number_bad_syntax_exception(buffer.start_pointer(),buffer.end_pointer()); // Handle premature EOF. eof: throw read_number_eof_exception(); } } // namespace cln cln-1.3.3/src/complex/input/cl_N_read.cc0000644000000000000000000003127511522356752014752 0ustar // read_complex(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex_io.h" // Implementation. #include #include #include "cln/input.h" #include "cln/real_io.h" #include "cln/float_io.h" #include "cln/rational_io.h" #include "cln/integer_io.h" #include "cln/integer.h" #include "integer/cl_I.h" #include "float/cl_F.h" #include "complex/cl_C.h" #include "cln/exception.h" #undef floor #include #define floor cln_floor namespace cln { // Step forward over all digits, to the end of string or to the next non-digit. static const char * skip_digits (const char * ptr, const char * string_limit, unsigned int base) { for ( ; ptr != string_limit; ptr++) { var char ch = *ptr; if ((ch >= '0') && (ch <= '9')) if (ch < '0' + (int)base) continue; else break; else { if (base <= 10) break; if (((ch >= 'A') && (ch < 'A'-10+(int)base)) || ((ch >= 'a') && (ch < 'a'-10+(int)base)) ) continue; else break; } } return ptr; } // Finish reading the "+yi" part of "x+yi" when "x" has already been read. static const cl_N read_complex_number_rest (const cl_read_flags& flags, const char * string_rest, const char * string, const char * string_limit, const char * * end_of_parse, const cl_R& x); #define at_end_of_parse(ptr) \ if (end_of_parse) \ { *end_of_parse = (ptr); } \ else \ { if ((ptr) != string_limit) { throw read_number_junk_exception((ptr),string,string_limit); } } const cl_N read_complex (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse) { // If no string_limit is given, it defaults to the end of the string. if (!string_limit) string_limit = string + ::strlen(string); if (flags.syntax & syntax_rational) { // Check for rational number syntax. var unsigned int rational_base = flags.rational_base; var const char * ptr = string; if (flags.lsyntax & lsyntax_commonlisp) { if (ptr == string_limit) goto not_rational_syntax; if (*ptr == '#') { // Check for #b, #o, #x, #nR syntax. ptr++; if (ptr == string_limit) goto not_rational_syntax; switch (*ptr) { case 'b': case 'B': rational_base = 2; break; case 'o': case 'O': rational_base = 8; break; case 'x': case 'X': rational_base = 16; break; default: var const char * base_end_ptr = skip_digits(ptr,string_limit,10); if (base_end_ptr == ptr) goto not_rational_syntax; if (base_end_ptr == string_limit) goto not_rational_syntax; if (!((*base_end_ptr == 'r') || (*base_end_ptr == 'R'))) goto not_rational_syntax; var cl_I base = read_integer(10,0,ptr,0,base_end_ptr-ptr); if (!((base >= 2) && (base <= 36))) { std::ostringstream buf; fprint(buf, "Base must be an integer in the range from 2 to 36, not "); fprint(buf, base); throw runtime_exception(buf.str()); } rational_base = FN_to_UV(base); ptr = base_end_ptr; break; } ptr++; } } var const char * ptr_after_prefix = ptr; var cl_signean sign = 0; if (ptr == string_limit) goto not_rational_syntax; switch (*ptr) { case '-': sign = ~sign; case '+': ptr++; default: break; } var const char * ptr_after_sign = ptr; if (flags.syntax & syntax_integer) { // Check for integer syntax: {'+'|'-'|} {digit}+ {'.'|} // Allow final dot only in Common Lisp syntax if there was no # prefix. if ((flags.lsyntax & lsyntax_commonlisp) && (ptr_after_prefix == string)) { ptr = skip_digits(ptr_after_sign,string_limit,10); if (ptr != ptr_after_sign) if (ptr != string_limit) if (*ptr == '.') { ptr++; if ((ptr == string_limit) || !(((*ptr >= '0') && (*ptr <= '9')) || ((*ptr >= 'A') && (*ptr <= 'Z') && (*ptr != 'I')) || ((*ptr >= 'a') && (*ptr <= 'z') && (*ptr != 'i')) || (*ptr == '.') || (*ptr == '_') || (*ptr == '/'))) return read_complex_number_rest(flags,ptr,string,string_limit,end_of_parse, read_integer(10,sign,ptr_after_sign,0,ptr-ptr_after_sign)); } } ptr = skip_digits(ptr_after_sign,string_limit,rational_base); if ((ptr == string_limit) || !(((*ptr >= '0') && (*ptr <= '9')) || ((*ptr >= 'A') && (*ptr <= 'Z') && (*ptr != 'I')) || ((*ptr >= 'a') && (*ptr <= 'z') && (*ptr != 'i')) || (*ptr == '.') || (*ptr == '_') || (*ptr == '/'))) return read_complex_number_rest(flags,ptr,string,string_limit,end_of_parse, read_integer(rational_base,sign,ptr_after_sign,0,ptr-ptr_after_sign)); } if (flags.syntax & syntax_ratio) { // Check for ratio syntax: {'+'|'-'|} {digit}+ '/' {digit}+ ptr = skip_digits(ptr_after_sign,string_limit,rational_base); if (ptr != ptr_after_sign) if (ptr != string_limit) if (*ptr == '/') { var const char * ptr_at_slash = ptr; ptr = skip_digits(ptr_at_slash+1,string_limit,rational_base); if (ptr != ptr_at_slash+1) if ((ptr == string_limit) || !(((*ptr >= '0') && (*ptr <= '9')) || ((*ptr >= 'A') && (*ptr <= 'Z') && (*ptr != 'I')) || ((*ptr >= 'a') && (*ptr <= 'z') && (*ptr != 'i')) || (*ptr == '.') || (*ptr == '_') || (*ptr == '/'))) return read_complex_number_rest(flags,ptr,string,string_limit,end_of_parse, read_rational(rational_base,sign,ptr_after_sign,0,ptr_at_slash-ptr_after_sign,ptr-ptr_after_sign)); } } } not_rational_syntax: if (flags.syntax & syntax_float) { // Check for floating-point number syntax: // {'+'|'-'|} {digit}+ {'.' {digit}* | } expo {'+'|'-'|} {digit}+ // {'+'|'-'|} {digit}* '.' {digit}+ expo {'+'|'-'|} {digit}+ // {'+'|'-'|} {digit}* '.' {digit}+ var const char * ptr = string; var const unsigned int float_base = 10; var cl_signean sign = 0; if (ptr == string_limit) goto not_float_syntax; switch (*ptr) { case '-': sign = ~sign; case '+': ptr++; default: break; } var const char * ptr_after_sign = ptr; var const char * ptr_after_intpart = skip_digits(ptr_after_sign,string_limit,float_base); var bool have_dot = false; var const char * ptr_before_fracpart = ptr_after_intpart; var const char * ptr_after_fracpart = ptr_after_intpart; ptr = ptr_after_intpart; if (ptr != string_limit) if (*ptr == '.') { have_dot = true; ptr_before_fracpart = ptr+1; ptr_after_fracpart = skip_digits(ptr_before_fracpart,string_limit,float_base); } ptr = ptr_after_fracpart; var char exponent_marker; var bool have_exponent; var const char * ptr_in_exponent = ptr; var const char * ptr_after_exponent = ptr; if ((ptr == string_limit) || !(((*ptr >= '0') && (*ptr <= '9')) || ((*ptr >= 'A') && (*ptr <= 'Z') && (*ptr != 'I')) || ((*ptr >= 'a') && (*ptr <= 'z') && (*ptr != 'i')) || (*ptr == '.') || (*ptr == '/'))) { // No exponent. have_exponent = false; // Must have at least one fractional part digit. if (ptr_after_fracpart == ptr_before_fracpart) goto not_float_syntax; exponent_marker = 'E'; } else { have_exponent = true; // Must have at least one digit. if (ptr_after_sign == ptr_after_intpart) if (ptr_after_fracpart == ptr_before_fracpart) goto not_float_syntax; exponent_marker = ((*ptr >= 'a') && (*ptr <= 'z') ? *ptr - 'a' + 'A' : *ptr); switch (exponent_marker) { case 'E': case 'S': case 'F': case 'D': case 'L': break; default: goto not_float_syntax; } } if (have_exponent) { ptr++; if (ptr == string_limit) goto not_float_syntax; switch (*ptr) { case '-': case '+': ptr++; default: break; } ptr_in_exponent = ptr; ptr_after_exponent = skip_digits(ptr_in_exponent,string_limit,10); if (ptr_after_exponent == ptr_in_exponent) goto not_float_syntax; } ptr = ptr_after_exponent; var const char * ptr_after_prec = ptr; var float_format_t prec; if ((ptr != string_limit) && (*ptr == '_')) { ptr++; ptr_after_prec = skip_digits(ptr,string_limit,10); if (ptr_after_prec == ptr) goto not_float_syntax; var cl_I prec1 = digits_to_I(ptr,ptr_after_prec-ptr,10); var uintC prec2 = cl_I_to_ulong(prec1); prec = (float_base==10 ? float_format(prec2) : (float_format_t)((uintC)((1+prec2)*::log((double)float_base)*1.442695041)+1) ); } else { switch (exponent_marker) { case 'S': prec = float_format_sfloat; break; case 'F': prec = float_format_ffloat; break; case 'D': prec = float_format_dfloat; break; case 'L': prec = flags.float_flags.default_lfloat_format; break; case 'E': prec = flags.float_flags.default_float_format; break; default: NOTREACHED } if (flags.float_flags.mantissa_dependent_float_format) { // Count the number of significant digits. ptr = ptr_after_sign; while (ptr < ptr_after_fracpart && (*ptr == '0' || *ptr == '.')) ptr++; var uintC num_significant_digits = (ptr_after_fracpart - ptr) - (ptr_before_fracpart > ptr ? 1 : 0); var uintC prec2 = (num_significant_digits>=2 ? num_significant_digits-2 : 0); var float_format_t precx = (float_base==10 ? float_format(prec2) : (float_format_t)((uintC)((1+prec2)*::log((double)float_base)*1.442695041)+1) ); if ((uintC)precx > (uintC)prec) prec = precx; } } floatformatcase(prec , if (!(flags.syntax & syntax_sfloat)) goto not_float_syntax; , if (!(flags.syntax & syntax_ffloat)) goto not_float_syntax; , if (!(flags.syntax & syntax_dfloat)) goto not_float_syntax; , unused len; if (!(flags.syntax & syntax_lfloat)) goto not_float_syntax; ); return read_complex_number_rest(flags,ptr_after_prec,string,string_limit,end_of_parse, read_float(float_base,prec,sign,ptr_after_sign,0,ptr_after_fracpart-ptr_after_sign,ptr_after_exponent-ptr_after_sign,ptr_before_fracpart-ptr_after_sign)); } not_float_syntax: if ((flags.syntax & syntax_complex) && (flags.lsyntax & lsyntax_commonlisp)) { // Check for complex number syntax: // '#' {'C'|'c'} '(' realpart {' '}+ imagpart ')' var const char * ptr = string; if (ptr == string_limit) goto not_complex_syntax; if (!(*ptr == '#')) goto not_complex_syntax; ptr++; if (ptr == string_limit) goto not_complex_syntax; if (!((*ptr == 'C') || (*ptr == 'c'))) goto not_complex_syntax; ptr++; // Modified flags for parsing the realpart and imagpart: var cl_read_flags flags_for_parts = flags; flags_for_parts.syntax = (cl_read_syntax_t)((flags_for_parts.syntax & ~syntax_complex) | syntax_maybe_bad); var const char * end_of_part; if (ptr == string_limit) goto not_complex_syntax; if (!(*ptr == '(')) goto not_complex_syntax; ptr++; var cl_R realpart = read_real(flags_for_parts,ptr,string_limit,&end_of_part); if (end_of_part == ptr) goto not_complex_syntax; ptr = end_of_part; if (ptr == string_limit) goto not_complex_syntax; if (!(*ptr == ' ')) goto not_complex_syntax; ptr++; while ((ptr != string_limit) && (*ptr == ' ')) { ptr++; } var cl_R imagpart = read_real(flags_for_parts,ptr,string_limit,&end_of_part); if (end_of_part == ptr) goto not_complex_syntax; ptr = end_of_part; if (ptr == string_limit) goto not_complex_syntax; if (!(*ptr == ')')) goto not_complex_syntax; ptr++; at_end_of_parse(ptr); return complex(realpart,imagpart); } not_complex_syntax: if (flags.syntax & syntax_maybe_bad) { ASSERT(end_of_parse); *end_of_parse = string; return 0; // dummy return } throw read_number_bad_syntax_exception(string,string_limit); } static const cl_N read_complex_number_rest (const cl_read_flags& flags, const char * string_rest, const char * string, const char * string_limit, const char * * end_of_parse, const cl_R& x) { unused string; if ((flags.syntax & syntax_complex) && (flags.lsyntax & lsyntax_algebraic)) { // Finish reading the "+yi" part of "x+yi". // We allow "y" to begin with a '-'. // We also allow the '+' to be replaced by '-', but in this case // "y" may not begin with a '-'. // We also allow the syntax "xi" (implicit realpart = 0). var const char * ptr = string_rest; if (ptr == string_limit) goto not_complex_syntax; if ((*ptr == 'i') || (*ptr == 'I')) { ptr++; at_end_of_parse(ptr); return complex(0,x); } switch (*ptr) { case '+': ptr++; case '-': break; default: goto not_complex_syntax; } // Modified flags for parsing the imagpart: var cl_read_flags flags_for_part = flags; flags_for_part.syntax = (cl_read_syntax_t)((flags_for_part.syntax & ~syntax_complex) | syntax_maybe_bad); var const char * end_of_part; var const cl_R& realpart = x; var cl_R imagpart = read_real(flags_for_part,ptr,string_limit,&end_of_part); if (end_of_part == ptr) goto not_complex_syntax; ptr = end_of_part; if (ptr == string_limit) goto not_complex_syntax; if (!((*ptr == 'i') || (*ptr == 'I'))) goto not_complex_syntax; ptr++; at_end_of_parse(ptr); return complex(realpart,imagpart); } not_complex_syntax: at_end_of_parse(string_rest); return x; } } // namespace cln cln-1.3.3/src/complex/input/cl_N_from_string.cc0000644000000000000000000000076111201634736016357 0ustar // cl_N (const char *) constructor. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/complex_class.h" // Implementation. #include "cln/input.h" #include "cln/complex_io.h" namespace cln { cl_read_flags cl_N_read_flags = { syntax_number, lsyntax_all, 10, { float_format_ffloat, float_format_lfloat_min, true } }; cl_N::cl_N (const char * string) { pointer = as_cl_private_thing( read_complex(cl_N_read_flags,string,NULL,NULL)); } } // namespace cln cln-1.3.3/src/timing/0000755000000000000000000000000012173046202011233 5ustar cln-1.3.3/src/timing/cl_t_current2.cc0000644000000000000000000000334111201634740014311 0ustar // cl_current_time_consumption(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/timing.h" // Implementation. #include "timing/cl_t_config.h" #if defined(HAVE_GETRUSAGE) #include #include #include extern "C" int getrusage (RUSAGE_WHO_T who, struct rusage * rusage); #elif defined(HAVE_SYS_TIMES_H) #include #include // defines HZ, unit for times() is 1/HZ seconds #include extern "C" clock_t times (struct tms * buffer); #endif #ifdef HAVE_PERROR_DECL #include #include #else extern "C" int perror (const char *); #endif namespace cln { const cl_time_consumption cl_current_time_consumption () { var cl_time_consumption result; var cl_timespec time = cl_current_time(); result.realtime.tv_sec = time.tv_sec; result.realtime.tv_nsec = time.tv_nsec; #if defined(HAVE_GETRUSAGE) var struct rusage usage; if (getrusage(RUSAGE_SELF,&usage) == 0) { // use ru_utime only, ignore ru_stime. result.usertime.tv_sec = usage.ru_utime.tv_sec; result.usertime.tv_nsec = usage.ru_utime.tv_usec * (1000000000/1000000); } else { perror("getrusage"); result.usertime.tv_sec = 0; result.usertime.tv_nsec = 0; } #elif defined(HAVE_SYS_TIMES_H) var struct tms usage; if (times(&usage) != (clock_t)(-1)) { // use tms_utime only, ignore tms_stime. var uintL used_time = usage.tms_utime; result.usertime.tv_sec = used_time / HZ; result.usertime.tv_nsec = (used_time % HZ) * ((2*1000000000+HZ)/(2*HZ)); } else { // ignore error ?? result.usertime.tv_sec = 0; result.usertime.tv_nsec = 0; } #else result.usertime = result.realtime; #endif return result; } } // namespace cln cln-1.3.3/src/timing/cl_t_inc.cc0000644000000000000000000000072411201634740013320 0ustar // operator+ (const cl_timespec&, const cl_time_duration&) // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/timing.h" // Implementation. namespace cln { const cl_timespec operator+ (const cl_timespec& a, const cl_time_duration& b) { var uintL sec = a.tv_sec + b.tv_sec; var sintL nsec = a.tv_nsec + b.tv_nsec; if (nsec >= 1000000000) { nsec -= 1000000000; sec += 1; } return cl_timespec(sec,nsec); } } // namespace cln cln-1.3.3/src/timing/cl_t_config.h.in0000644000000000000000000000222411201634740014260 0ustar // Defines OS dependent macros #ifndef _CL_T_CONFIG_H #define _CL_T_CONFIG_H /* These definitions are adjusted by `configure' automatically. */ /* functions and declarations */ /* CL_GETTIMEOFDAY */ /* Define if you have the gettimeofday() function. */ #undef HAVE_GETTIMEOFDAY /* Define if the declaration of gettimeofday() needs dots. */ #undef GETTIMEOFDAY_DOTS /* Define as the type of `tzp' in gettimeofday() declaration. */ #undef GETTIMEOFDAY_TZP_T /* CL_TIMES_CLOCK */ /* Define if you have the times() function and it returns the real time, but don't have the gettimeofday() function. */ #undef HAVE_TIMES_CLOCK /* CL_RUSAGE */ /* Define if you have . */ #undef HAVE_SYS_RESOURCE_H /* Define if you also have , the getrusage() function, the struct rusage type, and defines RUSAGE_SELF. */ #undef HAVE_GETRUSAGE /* Define as the type of `who' in getrusage() declaration. */ #undef RUSAGE_WHO_T /* Define if you have . */ #undef HAVE_SYS_TIMES_H /* CL_PERROR */ /* Define if or contains a declaration for perror(). */ #undef HAVE_PERROR_DECL #endif /* _CL_T_CONFIG_H */ cln-1.3.3/src/timing/cl_t_td_plus.cc0000644000000000000000000000100411201634740014211 0ustar // operator+ (const cl_time_duration&, const cl_time_duration&) // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/timing.h" // Implementation. namespace cln { const cl_time_duration operator+ (const cl_time_duration& a, const cl_time_duration& b) { var uintL sum_sec = a.tv_sec + b.tv_sec; var uintL sum_nsec = a.tv_nsec + b.tv_nsec; if (sum_nsec >= 1000000000) { sum_nsec -= 1000000000; sum_sec += 1; } return cl_time_duration(sum_sec,sum_nsec); } } // namespace cln cln-1.3.3/src/timing/cl_t_c1.cc0000644000000000000000000000161111201634740013046 0ustar // constructor cl_timing(cl_time_consumption&). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/timing.h" // Implementation. namespace cln { static void report_accu (const cl_timing& t) { var const cl_time_consumption usage_end = cl_current_time_consumption(); var const cl_time_consumption& usage_start = t.tmp; var cl_time_consumption usage; usage.realtime = usage_end.realtime - usage_start.realtime; usage.usertime = usage_end.usertime - usage_start.usertime; var cl_time_consumption& accumulator = *(cl_time_consumption*)(t.report_destination); accumulator.realtime = accumulator.realtime + usage.realtime; accumulator.usertime = accumulator.usertime + usage.usertime; } cl_timing::cl_timing (cl_time_consumption& accumulator) { report_fn = report_accu; report_destination = &accumulator; tmp = cl_current_time_consumption(); } } // namespace cln cln-1.3.3/src/timing/cl_t_d.cc0000644000000000000000000000034511201634740012771 0ustar // destructor ~cl_timing(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/timing.h" // Implementation. namespace cln { cl_timing::~cl_timing () { report_fn(*this); } } // namespace cln cln-1.3.3/src/timing/cl_t_dec.cc0000644000000000000000000000071211201634740013277 0ustar // operator- (const cl_timespec&, const cl_time_duration&) // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/timing.h" // Implementation. namespace cln { const cl_timespec operator- (const cl_timespec& a, const cl_time_duration& b) { var uintL sec = a.tv_sec - b.tv_sec; var sintL nsec = a.tv_nsec - b.tv_nsec; if (nsec < 0) { nsec += 1000000000; sec -= 1; } return cl_timespec(sec,nsec); } } // namespace cln cln-1.3.3/src/timing/cl_t_c2.cc0000644000000000000000000000206411201634740013052 0ustar // constructor cl_timing(std::ostream&). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/timing.h" // Implementation. namespace cln { static void report_stream (const cl_timing& t) { var const cl_time_consumption usage_end = cl_current_time_consumption(); var const cl_time_consumption& usage_start = t.tmp; var cl_time_consumption usage; usage.realtime = usage_end.realtime - usage_start.realtime; usage.usertime = usage_end.usertime - usage_start.usertime; var std::ostream& destination = *(std::ostream*) t.report_destination; if (t.comment) fprint(destination,t.comment); cl_timing_report(destination,usage); fprint(destination,"\n"); } cl_timing::cl_timing (std::ostream& destination) { report_fn = report_stream; report_destination = &destination; comment = NULL; tmp = cl_current_time_consumption(); } cl_timing::cl_timing (const char * msg, std::ostream& destination) { report_fn = report_stream; report_destination = &destination; comment = msg; tmp = cl_current_time_consumption(); } } // namespace cln cln-1.3.3/src/timing/cl_t_minus.cc0000644000000000000000000000076211201634740013704 0ustar // operator- (const cl_timespec&, const cl_timespec&) // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/timing.h" // Implementation. namespace cln { const cl_time_duration operator- (const cl_timespec& a, const cl_timespec& b) { var sintL sec = a.tv_sec - b.tv_sec; var sintL nsec = a.tv_nsec - b.tv_nsec; if (nsec < 0) { nsec += 1000000000; sec -= 1; } if (sec < 0) { sec = 0; nsec = 0; } return cl_time_duration(sec,nsec); } } // namespace cln cln-1.3.3/src/timing/cl_t_td_minus.cc0000644000000000000000000000100611201634740014363 0ustar // operator- (const cl_time_duration&, const cl_time_duration&) // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/timing.h" // Implementation. namespace cln { const cl_time_duration operator- (const cl_time_duration& a, const cl_time_duration& b) { var sintL sec = a.tv_sec - b.tv_sec; var sintL nsec = a.tv_nsec - b.tv_nsec; if (nsec < 0) { nsec += 1000000000; sec -= 1; } if (sec < 0) { sec = 0; nsec = 0; } return cl_time_duration(sec,nsec); } } // namespace cln cln-1.3.3/src/timing/cl_t_report.cc0000644000000000000000000000221111201634740014053 0ustar // cl_timing_report(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/timing.h" // Implementation. namespace cln { // Round to 3 decimal places. #define CL_HZ 1000 #define CL_HZ_NSECS (1000000000/CL_HZ) void cl_timing_report (std::ostream& stream, const cl_time_consumption& t) { var uintL real_sec = t.realtime.tv_sec; var uintL real_msec = (t.realtime.tv_nsec + (CL_HZ_NSECS-1)/2) / CL_HZ_NSECS; if (real_msec >= CL_HZ) { real_msec -= CL_HZ; real_sec += 1; } var uintL user_sec = t.usertime.tv_sec; var uintL user_msec = (t.usertime.tv_nsec + (CL_HZ_NSECS-1)/2) / CL_HZ_NSECS; if (user_msec >= CL_HZ) { user_msec -= CL_HZ; user_sec += 1; } var char oldfill = stream.fill(); var int oldwidth = stream.width(); stream << "real time: "; stream.width(4); stream << real_sec; stream << "."; stream.fill('0'); stream.width(3); stream << real_msec; stream.fill(oldfill); stream << " s, "; stream << "run time: "; stream.width(4); stream << user_sec; stream << "."; stream.fill('0'); stream.width(3); stream << user_msec; stream.fill(oldfill); stream << " s"; stream.width(oldwidth); } } // namespace cln cln-1.3.3/src/timing/cl_t_current.cc0000644000000000000000000000162611201634740014233 0ustar // cl_current_time(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/timing.h" // Implementation. #include "timing/cl_t_config.h" #if defined(HAVE_GETTIMEOFDAY) #include #ifdef GETTIMEOFDAY_DOTS extern "C" int gettimeofday (struct timeval * tp, ...); #else extern "C" int gettimeofday (struct timeval * tp, GETTIMEOFDAY_TZP_T tzp); #endif #else #include #endif #ifdef HAVE_PERROR_DECL #include #include #else extern "C" int perror (const char *); #endif namespace cln { const cl_timespec cl_current_time () { #if defined(HAVE_GETTIMEOFDAY) var struct timeval tv; if (gettimeofday(&tv,NULL) != 0) { perror("gettimeofday"); tv.tv_sec = 0; tv.tv_usec = 0; } return cl_timespec(tv.tv_sec, tv.tv_usec * (1000000000/1000000) ); #else return cl_timespec(time(NULL),0); #endif } } // namespace cln cln-1.3.3/src/base/0000755000000000000000000000000012173046176010670 5ustar cln-1.3.3/src/base/cl_N.h0000644000000000000000000000130611201634736011710 0ustar // cl_N internals #ifndef _CL_N_H #define _CL_N_H #include "cln/number.h" #include "base/cl_macros.h" namespace cln { // For the equal-invariant hashcode, we take a mixture of exponent, length // and the most significant 32 bits. To ensure that equal(x,y) implies // equal_hashcode(x) == equal_hashcode(y) we must make sure that // equal_hashcode(rational(x)) == equal_hashcode(x) and // equal_hashcode(0.0) = 0 (important because of equal(complex(x,0.0),x)). #define equal_hashcode_low(msd,exp,sign) \ (((((uint32)(msd) << 7) | ((uint32)(msd) >> 25)) ^ ((sint32)(sign) << 30)) + (uintL)(exp)) #define equal_hashcode_one equal_hashcode_low(bit(31),1,0) } // namespace cln #endif /* _CL_N_H */ cln-1.3.3/src/base/random/0000755000000000000000000000000012173046176012150 5ustar cln-1.3.3/src/base/random/cl_UL_random.cc0000644000000000000000000000333411201634736015014 0ustar // Word level random number generator. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/random.h" // Implementation. #include "base/cl_low.h" namespace cln { // Zufallszahlengenerator nach [Knuth: The Art of Computer Programming, Vol. II, // Seminumerical Algorithms, 3.3.4., Table 1, Line 30], nach C. Haynes: // X eine 64-Bit-Zahl. Iteration X := (a*X+c) mod m // mit m=2^64, a=6364136223846793005, c=1. uint32 random32 (random_state& randomstate) { #ifdef HAVE_FAST_LONGLONG // Multiplikator a=6364136223846793005 = 0x5851F42D4C957F2D : var uint64 seed = highlow64(randomstate.seed.hi,randomstate.seed.lo); var const uint64 a = 0x5851F42D4C957F2DULL; var uint64 newseed; // multiplizieren, brauche nur letzte 64 Bit: mulu64(seed,a, , newseed =); // c addieren: newseed += 1; // seed neu füllen: randomstate.seed.hi = high32(newseed); randomstate.seed.lo = low32(newseed); // mittlere 32 Bits als Ergebnis: return (uint32)(newseed >> 16); #else // Multiplikator a=6364136223846793005 = 0x5851F42D4C957F2D : var uint32 seed_hi = randomstate.seed.hi; var uint32 seed_lo = randomstate.seed.lo; var const uint32 a_hi = 0x5851F42D; var const uint32 a_lo = 0x4C957F2D; var uint32 newseed_hi; var uint32 newseed_lo; // multiplizieren, brauche nur letzte 64 Bit: mulu32(seed_lo,a_lo, newseed_hi =, newseed_lo =); mulu32(seed_lo,a_hi, , newseed_hi +=); mulu32(seed_hi,a_lo, , newseed_hi +=); // c addieren: newseed_lo += 1; if (newseed_lo==0) { newseed_hi += 1; } // um 1 erhöhen // seed neu füllen: randomstate.seed.hi = newseed_hi; randomstate.seed.lo = newseed_lo; // mittlere 32 Bits als Ergebnis: return highlow32(low16(newseed_hi),high16(newseed_lo)); #endif } } // namespace cln cln-1.3.3/src/base/random/cl_random_from.cc0000644000000000000000000000622611201634736015442 0ustar // random_state constructor. #if defined(_WIN32) #include // For GetCurrentProcessId(), must be included first, sorry. #endif // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/random.h" // Implementation. #include "base/cl_base_config.h" #include "base/cl_low.h" #include // declares rand() #if defined(unix) || defined(__unix) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(_AIX) || defined(sinix) || (defined(__MACH__) && defined(__APPLE__)) || (defined(__CYGWIN__) && defined(__GNUC__)) || defined(__BEOS__) #include #include // declares getpid() #if defined(HAVE_GETTIMEOFDAY) #include #ifdef GETTIMEOFDAY_DOTS extern "C" int gettimeofday (struct timeval * tp, ...); #else extern "C" int gettimeofday (struct timeval * tp, GETTIMEOFDAY_TZP_T tzp); #endif namespace cln { inline uint32 get_seed (void) { var struct timeval tv; gettimeofday(&tv,0); return highlow32(tv.tv_sec,tv.tv_usec); // 16+16 zufällige Bits } } // namespace cln #elif defined(HAVE_TIMES_CLOCK) #include #ifndef CLK_TCK #include #endif #include extern "C" clock_t times (struct tms * buffer); namespace cln { inline uint32 get_seed (void) { var struct tms tmsbuf; var uint32 seed_lo = times(&tmsbuf); return seed_lo + tmsbuf.tms_utime + tmsbuf.tms_stime; } } // namespace cln #endif #elif defined(_WIN32) #include #include namespace cln { inline uint32 get_seed (void) { struct timeb timebuf; ftime(&timebuf); return highlow32(timebuf.time, (long)(timebuf.millitm)*1000); } } // namespace cln #endif namespace cln { // Counter, to avoid that two random-states created immediately one after // the other contain the same seed. static uint32 counter = 0; random_state::random_state () { var uint32 seed_hi; var uint32 seed_lo; #if defined(unix) || defined(__unix) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(_AIX) || defined(sinix) || (defined(__MACH__) && defined(__APPLE__)) || (defined(__CYGWIN__) && defined(__GNUC__)) || defined(__BEOS__) seed_lo = get_seed(); seed_hi = (rand() // zufällige 31 Bit (bei UNIX_BSD) bzw. 16 Bit (bei UNIX_SYSV) << 8) ^ (uintL)(getpid()); // ca. 8 Bit von der Process ID #elif defined(__OpenBSD__) seed_lo = arc4random(); seed_hi = arc4random(); #elif defined(_WIN32) seed_lo = get_seed(); seed_hi = (rand() << 8) ^ (uintL)(GetCurrentProcessId()); #elif defined(__atarist) seed_lo = highlow32(GEMDOS_GetDate(),GEMDOS_GetTime()); // 16+16 zufällige Bits seed_hi = XBIOS_Random(); // 24 Bit zufällig vom XBIOS, vorne 8 Nullbits #elif defined(amiga) || defined(AMIGA) seed_lo = get_real_time(); // Uhrzeit seed_hi = FindTask(NULL); // Pointer auf eigene Task #elif defined(__MSDOS__) || defined(__EMX__) || defined(__riscos) // Keine Zufallszahlen, keine PID, nichts Zufälliges da. seed_lo = get_real_time(); // Uhrzeit, 100 Hz seed_hi = time(NULL); #else #error "Must implement random_state constructor!" #endif seed_hi ^= counter++ << 5; seed.hi = seed_hi; seed.lo = seed_lo; } } // namespace cln cln-1.3.3/src/base/random/cl_random_impl.h0000644000000000000000000000161111201634736015273 0ustar // cl_random implementation #ifndef _CL_RANDOM_IMPL_H #define _CL_RANDOM_IMPL_H #include "cln/random.h" namespace cln { // random_UDS(randomstate,MSDptr,len) füllt die UDS MSDptr/len/.. // mit len Zufallsdigits. // > randomstate: ein Random-State, wird verändert // > MSDptr/len/..: wo die Zufallsdigits abgelegt werden sollen // > len: gewünschte Anzahl von Zufallsdigits extern void random_UDS (random_state& randomstate, uintD* MSDptr, uintC len); // testrandom_UDS(randomstate,MSDptr,len) füllt die UDS MSDptr/len/.. // mit len Zufallsdigits, mit relativ langen Blöcken von Nullen und Einsen. // > randomstate: ein Random-State, wird verändert // > MSDptr/len/..: wo die Zufallsdigits abgelegt werden sollen // > len: gewünschte Anzahl von Zufallsdigits extern void testrandom_UDS (random_state& randomstate, uintD* MSDptr, uintC len); } // namespace cln #endif /* _CL_RANDOM_IMPL_H */ cln-1.3.3/src/base/random/cl_random_def.cc0000644000000000000000000000075511201634736015236 0ustar // default_random_state. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/random.h" // Implementation. namespace cln { random_state default_random_state; int cl_random_def_init_helper::count = 0; cl_random_def_init_helper::cl_random_def_init_helper() { if (count++ == 0) { default_random_state = random_state(); } } cl_random_def_init_helper::~cl_random_def_init_helper() { if (--count == 0) { // Nothing to clean up? } } } // namespace cln cln-1.3.3/src/base/cl_iterator.h0000644000000000000000000000114211201634736013342 0ustar // Abstract iterators. #ifndef _CL_ITERATOR_H #define _CL_ITERATOR_H #include "cln/types.h" // An iterator's typical use is a loop, but you have an abstraction over // the loop's initialization, step and end-test. // Example: // foo_iterator foo_loop = ...; // while (!foo_loop.endp()) { // foo element = foo_loop.next(); // ... // } // It is allowed to call endp() as many times as you want, and to terminate // the loop any time you want. template class cl_abstract_iterator { public: virtual bool endp () = 0; virtual T& next () = 0; }; #endif /* _CL_ITERATOR_H */ cln-1.3.3/src/base/cl_sysdep.h0000644000000000000000000000422211201634736013022 0ustar // System dependent definitions #ifndef _CL_SYSDEP_H #define _CL_SYSDEP_H // CPU and other #include "cl_config.h" // char_bitsize, short_bitsize, long_bitsize, long_long_bitsize #include "cln/intparam.h" // The CPU's endianness #if defined(short_little_endian) || defined(int_little_endian) || defined(long_little_endian) // Z80, VAX, I80X86, DECALPHA, MIPSEL, ...: // Low byte at low address, high byte at high address #if defined(CL_CPU_BIG_ENDIAN_P) #error "Bogus CL_CPU_BIG_ENDIAN_P!" #endif #define CL_CPU_BIG_ENDIAN_P 0 #endif #if defined(short_big_endian) || defined(int_big_endian) || defined(long_big_endian) // MC680X0, SPARC, HPPA, MIPSEB, M88000, RS6000, ...: // High byte at low address, low byte at high address #if defined(CL_CPU_BIG_ENDIAN_P) #error "Bogus CL_CPU_BIG_ENDIAN_P!" #endif #define CL_CPU_BIG_ENDIAN_P 1 #endif #if !defined(CL_CPU_BIG_ENDIAN_P) #error "Bogus CL_CPU_BIG_ENDIAN_P!" #endif // Auswahl der Floating-Point-Fähigkeiten: // FAST_DOUBLE sollte definiert werden, wenn ein Floating-Point-Coprozessor // vorhanden ist, dessen `double'-Typ IEEE-Floating-Points mit 64 Bits sind. // FAST_FLOAT sollte definiert werden, wenn ein Floating-Point-Coprozessor // vorhanden ist, dessen `float'-Typ IEEE-Floating-Points mit 32 Bits sind, // und der C++-Compiler auch `float'- und nicht `double'-Operationen generiert. #if defined(__sparc__) || defined(__sparc64__) || defined(__hppa__) || defined(__m88k__) || defined(__rs6000__) #define FAST_DOUBLE #define FAST_FLOAT #endif #if defined(__i386__) && (defined(linux) || defined(__linux__) || defined(NeXT)) // Linux hat einen funktionierenden Floating-Point-Coprozessor-Emulator. // NeXTstep läuft sowieso nur mit Floating-Point-Coprozessor. // Aber auf Intel-Pentium-Prozessoren ist die FPU fehlerhaft. #define FAST_DOUBLE #define FAST_FLOAT #endif #if defined(__arm__) // Bei Integers ist der Prozessor Little-Endian, bei Double-Floats Big-Endian! #undef FAST_DOUBLE #endif // Macros for internal use. #include "base/cl_macros.h" // Elementary types. #include "cln/types.h" // Dependencies among modules. #include "cln/modules.h" #endif /* _CL_SYSDEP_H */ cln-1.3.3/src/base/cl_as_exception.cc0000644000000000000000000000204612034113706014326 0ustar // as_exception(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/exception.h" // Implementation. #include "cln/io.h" #include "base/cl_N.h" #include namespace cln { static inline const std::string as_error_msg (const cl_number& obj, const char * typestring, const char * filename, int line) { std::ostringstream buf; fprint(buf, "Type assertion failed: in file "); fprint(buf, filename); fprint(buf, ", line "); fprintdecimal(buf, line); fprint(buf, ", not "); fprint(buf, typestring); fprint(buf, ": "); #if 0 // This brings in a dependency from the complex and float printer and all the float stuff. fprint(buf, obj); #else fprint(buf, "@0x"); fprinthexadecimal(buf, (unsigned long)(void*)&obj); fprint(buf, ": 0x"); fprinthexadecimal(buf, (unsigned long)obj.word); #endif return buf.str(); } as_exception::as_exception (const cl_number& obj, const char * typestring, const char * filename, int line) : runtime_exception(as_error_msg(obj, typestring, filename, line)) {} } // namespace cln cln-1.3.3/src/base/cl_xmacros.h0000644000000000000000000000066311201634736013174 0ustar // CLN internal macros extra // This file must be included after other system include files. #ifndef _CL_XMACROS_H #define _CL_XMACROS_H // Swap the contents of two variables: swap(int, x1, x2); #define swap(swap_type,swap_var1,swap_var2) \ { var swap_type swap_temp; \ swap_temp = swap_var1; swap_var1 = swap_var2; swap_var2 = swap_temp; \ } #endif /* _CL_XMACROS_H */ cln-1.3.3/src/base/cl_inline.h0000644000000000000000000000037111201634736012772 0ustar /* * Selectively inline a function in *some* translation units. * See cl_maybe_inline.h file for the explanation. */ #undef CL_INLINE #undef CL_INLINE_DECL #define CL_INLINE static inline #define CL_INLINE_DECL(fcn) CL_INLINE_HINT fcn ## _inline cln-1.3.3/src/base/ring/0000755000000000000000000000000012173046176011627 5ustar cln-1.3.3/src/base/ring/cl_no_ring.cc0000644000000000000000000001030612034113706014235 0ustar // Dummy ring. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ring.h" // Implementation. #include #include "cln/io.h" namespace cln { uninitialized_ring_exception::uninitialized_ring_exception () : runtime_exception("Uninitialized ring operation called.") {} static inline const std::string uninitialized_error_msg (const _cl_ring_element& obj) { std::ostringstream buf; fprint(buf, "Uninitialized ring element @0x"); fprinthexadecimal(buf, (unsigned long)(void*)&obj); fprint(buf, ": 0x"); fprinthexadecimal(buf, (unsigned long)obj.rep.word); return buf.str(); } static inline const std::string uninitialized_error_msg (const _cl_ring_element& obj_x, const _cl_ring_element& obj_y) { std::ostringstream buf; fprint(buf, "Uninitialized ring elements @0x"); fprinthexadecimal(buf, (unsigned long)(void*)&obj_x); fprint(buf, ": 0x"); fprinthexadecimal(buf, (unsigned long)obj_x.rep.word); fprint(buf, ", @0x"); fprinthexadecimal(buf, (unsigned long)(void*)&obj_y); fprint(buf, ": 0x"); fprinthexadecimal(buf, (unsigned long)obj_y.rep.word); return buf.str(); } uninitialized_exception::uninitialized_exception (const _cl_ring_element& obj) : runtime_exception(uninitialized_error_msg(obj)) {} uninitialized_exception::uninitialized_exception (const _cl_ring_element& obj_x, const _cl_ring_element& obj_y) : runtime_exception(uninitialized_error_msg(obj_x, obj_y)) {} static const _cl_ring_element dummy_op0 (cl_heap_ring* R) { unused R; throw uninitialized_ring_exception(); } static const _cl_ring_element dummy_op1 (cl_heap_ring* R, const _cl_ring_element& x) { unused R; throw uninitialized_exception(x); } static const _cl_ring_element dummy_op2 (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { unused R; throw uninitialized_exception(x, y); } static void dummy_fprint (cl_heap_ring* R, std::ostream& stream, const _cl_ring_element& x) { unused R; unused stream; throw uninitialized_exception(x); } static bool dummy_equal (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { unused R; throw uninitialized_exception(x, y); } #define dummy_zero dummy_op0 static bool dummy_zerop (cl_heap_ring* R, const _cl_ring_element& x) { unused R; throw uninitialized_exception(x); } #define dummy_plus dummy_op2 #define dummy_minus dummy_op2 #define dummy_uminus dummy_op1 #define dummy_one dummy_op0 static const _cl_ring_element dummy_canonhom (cl_heap_ring* R, const cl_I& x) { unused R; (void)&x; // unused x; throw uninitialized_ring_exception(); } #define dummy_mul dummy_op2 #define dummy_square dummy_op1 static const _cl_ring_element dummy_expt_pos (cl_heap_ring* R, const _cl_ring_element& x, const cl_I& y) { unused R; (void)&y; // unused y; throw uninitialized_exception(x); } static cl_ring_setops dummy_setops = { dummy_fprint, dummy_equal }; static cl_ring_addops dummy_addops = { dummy_zero, dummy_zerop, dummy_plus, dummy_minus, dummy_uminus }; static cl_ring_mulops dummy_mulops = { dummy_one, dummy_canonhom, dummy_mul, dummy_square, dummy_expt_pos }; class cl_heap_no_ring : public cl_heap_ring { SUBCLASS_cl_heap_ring() public: // Constructor. cl_heap_no_ring () : cl_heap_ring (&dummy_setops,&dummy_addops,&dummy_mulops) { type = &cl_class_no_ring; } // Destructor. ~cl_heap_no_ring () {} }; static void cl_no_ring_destructor (cl_heap* pointer) { (*(cl_heap_no_ring*)pointer).~cl_heap_no_ring(); } static void cl_no_ring_dprint (cl_heap* pointer) { unused pointer; fprint(cl_debugout, "(cl_ring) cl_no_ring"); } cl_class cl_class_no_ring; static cl_heap_no_ring* cl_heap_no_ring_instance; // const cl_ring cl_no_ring = cl_ring (new cl_heap_no_ring()); const cl_ring cl_no_ring = cl_no_ring; int cl_no_ring_init_helper::count = 0; cl_no_ring_init_helper::cl_no_ring_init_helper() { if (count++ == 0) { cl_class_no_ring.destruct = cl_no_ring_destructor; cl_class_no_ring.flags = 0; cl_class_no_ring.dprint = cl_no_ring_dprint; cl_heap_no_ring_instance = new cl_heap_no_ring(); new((void*)&cl_no_ring) cl_ring(cl_heap_no_ring_instance); } } cl_no_ring_init_helper::~cl_no_ring_init_helper() { if (--count == 0) delete cl_heap_no_ring_instance; } } // namespace cln cln-1.3.3/src/base/ring/cl_ring_debug.cc0000644000000000000000000000065211201634736014720 0ustar // cl_ring debugging support. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ring.h" // Implementation. #include "cln/io.h" namespace cln { void cl_ring_element::debug_print () const { fprint(cl_debugout, *this); cl_debugout << std::endl; // newline and flush output } // This dummy links in this module when requires it. int cl_ring_debug_module; } // namespace cln cln-1.3.3/src/base/symbol/0000755000000000000000000000000012173046176012175 5ustar cln-1.3.3/src/base/symbol/cl_sy_hashcode.cc0000644000000000000000000000123512034113706015442 0ustar // cln/symbol.hashcode(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/symbol.h" // Implementation. #include "base/cl_offsetof.h" namespace cln { #define declare_alignof(where,type) \ struct CONCAT(aligndummy,__LINE__) { char slot1; type slot2; }; \ const unsigned long where = offsetof(CONCAT(aligndummy,__LINE__), slot2); unsigned long hashcode (const cl_symbol& s) { // Strings don't move in memory, so we can just take the address. declare_alignof(string_alignment,cl_heap_string); return (unsigned long)(s.pointer) / (string_alignment & -string_alignment); // divide by power of 2 } } // namespace cln cln-1.3.3/src/base/symbol/cl_symbol.cc0000644000000000000000000000676511201634736014501 0ustar // class cl_symbol. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/symbol.h" // Implementation. #include "base/hash/cl_hashuniqweak.h" namespace cln { inline const cl_string hashkey (const cl_symbol& sym) { return (cl_string)sym; } // A symbol points to a string, so to convert cl_string -> cl_symbol, we just // take the pointer and put it into a cl_symbol. inline cl_symbol::cl_symbol (struct hashuniq * null, const cl_string& s) : cl_rcpointer (as_cl_private_thing(s)) { unused null; } typedef cl_htuniqentry cl_htentry_from_string_to_symbol; typedef cl_heap_weak_hashtable_uniq cl_heap_hashtable_from_string_to_symbol; typedef _cl_hashtable_iterator cl_hashtable_from_string_to_symbol_iterator; static void cl_hashtable_from_string_to_symbol_destructor (cl_heap* pointer) { #if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug (*(cl_heap_hashtable_from_string_to_symbol*)pointer).~cl_heap_weak_hashtable_uniq(); #else (*(cl_heap_hashtable_from_string_to_symbol*)pointer).~cl_heap_hashtable_from_string_to_symbol(); #endif } struct cl_ht_from_string_to_symbol : public cl_gcpointer { // Constructors. cl_ht_from_string_to_symbol (); cl_ht_from_string_to_symbol (const cl_ht_from_string_to_symbol&); // Assignment operators. cl_ht_from_string_to_symbol& operator= (const cl_ht_from_string_to_symbol&); // Iterator. cl_hashtable_from_string_to_symbol_iterator iterator () const { return ((cl_heap_hashtable_from_string_to_symbol*)pointer)->iterator(); } // Lookup. cl_symbol * get (const cl_string& s) const; // Store. void put (const cl_string& s) const; }; // These are not inline, because they tend to duplicate a lot of template code. cl_ht_from_string_to_symbol::cl_ht_from_string_to_symbol () { static const cl_class cl_class_hashtable_from_string_to_symbol = { cl_hashtable_from_string_to_symbol_destructor, 0 }; var cl_heap_hashtable_from_string_to_symbol* ht = new cl_heap_hashtable_from_string_to_symbol (); ht->refcount = 1; ht->type = &cl_class_hashtable_from_string_to_symbol; pointer = ht; } cl_symbol * cl_ht_from_string_to_symbol::get (const cl_string& s) const { return ((cl_heap_hashtable_from_string_to_symbol*)pointer)->get(s); } void cl_ht_from_string_to_symbol::put (const cl_string& s) const { ((cl_heap_hashtable_from_string_to_symbol*)pointer)->put(s); } // The global symbol table. class global_symbol_table { static int count; static cl_ht_from_string_to_symbol* symbol_table; public: inline cl_symbol* get(const cl_string& s) { return symbol_table->get(s); } inline void put(const cl_string& s) { symbol_table->put(s); } global_symbol_table(); ~global_symbol_table(); }; int global_symbol_table::count = 0; cl_ht_from_string_to_symbol* global_symbol_table::symbol_table; global_symbol_table::global_symbol_table() { if (count++ == 0) symbol_table = new cl_ht_from_string_to_symbol(); } global_symbol_table::~global_symbol_table() { if (--count == 0) delete symbol_table; } // Create or lookup a symbol from its name. cl_symbol::cl_symbol (const cl_string& s) { static global_symbol_table symbol_table; var cl_symbol * sym_in_table; sym_in_table = symbol_table.get(s); if (!sym_in_table) { symbol_table.put(s); sym_in_table = symbol_table.get(s); if (!sym_in_table) throw runtime_exception(); } var cl_heap* p = sym_in_table->heappointer; cl_inc_pointer_refcount(p); pointer = p; } } // namespace cln cln-1.3.3/src/base/cl_base_config.h.in0000644000000000000000000000123611201634736014361 0ustar // Defines OS dependent macros #ifndef _CL_BASE_CONFIG_H #define _CL_BASE_CONFIG_H /* These definitions are adjusted by `configure' automatically. */ /* functions and declarations */ /* CL_GETTIMEOFDAY */ /* Define if you have the gettimeofday() function. */ #undef HAVE_GETTIMEOFDAY /* Define if the declaration of gettimeofday() needs dots. */ #undef GETTIMEOFDAY_DOTS /* Define as the type of `tzp' in gettimeofday() declaration. */ #undef GETTIMEOFDAY_TZP_T /* CL_TIMES_CLOCK */ /* Define if you have the times() function and it returns the real time, but don't have the gettimeofday() function. */ #undef HAVE_TIMES_CLOCK #endif /* _CL_BASE_CONFIG_H */ cln-1.3.3/src/base/cl_notreached_exception.cc0000644000000000000000000000140611201634736016044 0ustar // cl_notreached_exception(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/cl_macros.h" // Implementation. #include "cln/io.h" #include namespace cln { static inline const std::string notreached_error_msg (const char* filename, int lineno) { std::ostringstream buf; fprint(buf, "Internal error: statement in file "); fprint(buf, filename); fprint(buf, ", line "); fprintdecimal(buf, lineno); fprint(buf, " has been reached!!\n"); fprint(buf, "Please send the authors of the program a description how you produced this error!"); return buf.str(); } notreached_exception::notreached_exception (const char* filename, int lineno) : runtime_exception(notreached_error_msg(filename, lineno)) {} } // namespace cln cln-1.3.3/src/base/cl_debugout.cc0000644000000000000000000000053311201634736013470 0ustar // Debugging stream. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/io.h" // Implementation. // Just assume that the debugger runs on /dev/tty, independently of // cin, cout, cerr. #include namespace cln { std::ostream * cl_debugout_stream = new std::ofstream ("/dev/tty"); } // namespace cln cln-1.3.3/src/base/proplist/0000755000000000000000000000000012173046176012544 5ustar cln-1.3.3/src/base/proplist/cl_pl_d.cc0000644000000000000000000000045711201634736014451 0ustar // class cl_property_list. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/proplist.h" // Implementation. namespace cln { cl_property_list::~cl_property_list () { while (list) { var cl_property* l = list; list = l->next; delete l; } } } // namespace cln cln-1.3.3/src/base/proplist/cl_pl_add.cc0000644000000000000000000000075011201634736014752 0ustar // class cl_property_list. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/proplist.h" // Implementation. #include "cln/exception.h" namespace cln { // This tells the compiler to put the `cl_property' vtable into this file. void cl_property::dummy () {} void cl_property_list::add_property (cl_property* new_property) { if (new_property->next) throw runtime_exception(); new_property->next = list; list = new_property; } } // namespace cln cln-1.3.3/src/base/proplist/cl_pl_get.cc0000644000000000000000000000054011201634736014776 0ustar // class cl_property_list. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/proplist.h" // Implementation. namespace cln { cl_property* cl_property_list::get_property (const cl_symbol& key) { var cl_property* l; for (l = list; l; l = l->next) if (equal(l->key,key)) break; return l; } } // namespace cln cln-1.3.3/src/base/cl_d0_exception.cc0000644000000000000000000000040611201634736014232 0ustar // division_by_0_exception(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/exception.h" namespace cln { division_by_0_exception::division_by_0_exception () : runtime_exception("Division by zero.") {} } // namespace cln cln-1.3.3/src/base/cl_alloca.cc0000644000000000000000000000122211201634736013101 0ustar // cl_alloc_alloca_header(), cl_free_alloca_header(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/cl_alloca.h" // Implementation. #include "cln/malloc.h" #include "base/cl_offsetof.h" namespace cln { cl_alloca_header* cl_alloc_alloca_header (size_t size) { var cl_alloca_header* pointer = (cl_alloca_header*)malloc_hook(size+offsetofa(cl_alloca_header,usable_memory)); pointer->next = NULL; return pointer; } void cl_free_alloca_header (cl_alloca_header* pointer) { do { cl_alloca_header* next = pointer->next; free_hook(pointer); pointer = next; } while (pointer != NULL); } } // namespace cln cln-1.3.3/src/base/cl_gmpconfig.h.in0000644000000000000000000000046711201634736014100 0ustar // Defines configuration dependent macros #ifndef _CL_GMPCONFIG_H #define _CL_GMPCONFIG_H /* These definitions are adjusted by `configure' automatically. */ /* interfacing to GNU gmp */ /* Define if you wish to use the fast GNU gmp low-level functions. */ #undef CL_USE_GMP #endif /* _CL_GMPCONFIG_H */ cln-1.3.3/src/base/cl_free.cc0000644000000000000000000000453312172527564012607 0ustar // cl_free_heap_object(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/object.h" // Implementation. #include "cln/malloc.h" namespace cln { void cl_free_heap_object (cl_heap* pointer) { // This is invoked when pointer->refcount gets decremented to 0. var const cl_class* type = pointer->type; if (type->destruct) type->destruct(pointer); free_hook(pointer); } // The best place to put the free software license is cl_free.o. // NB about #ident: To see the strings in the .comment section of an ELF // executable, use "strings < executable", not "strings executable". // Better put the license into the data section: it is more portable (some // C++ compilers may not understand #ident), is not lost in object formats // like a.out, and is taken into account by "intelligent" strings commands. static const char * copyright_notice[] = { " \n" "Copyright (c) Bruno Haible 1988-2008 \n" "Copyright (c) Richard Kreckel 2000-2013 \n" "Copyright (c) Alexei Sheplyakov 2008-2010 \n" " \n" "This program is free software; you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation; either version 2, or (at your option) \n" "any later version. \n" " \n" "This program is distributed in the hope that it will be useful, but \n" "WITHOUT ANY WARRANTY; without even the implied warranty of \n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU \n" "General Public License for more details. \n" " \n" "You should have received a copy of the GNU General Public License \n" "along with this program; if not, write to the Free Software \n" "Foundation, 51 Franklin Street, Fifth Floor, Boston, MA \n" "02110-1301, USA.\n" " ", (const char *) ©right_notice }; } // namespace cln cln-1.3.3/src/base/cl_version.cc0000644000000000000000000000037011201634736013336 0ustar // Version string buried into the library #include "cln/version.h" namespace cln { const int version_major = CL_VERSION_MAJOR; const int version_minor = CL_VERSION_MINOR; const int version_patchlevel = CL_VERSION_PATCHLEVEL; } // namespace cln cln-1.3.3/src/base/cl_inline2.h0000644000000000000000000000037511201634736013060 0ustar /* * Selectively inline a function in *some* translation units. * See cl_maybe_inline.h file for the explanation. */ #undef CL_INLINE2 #undef CL_INLINE2_DECL #define CL_INLINE2 static inline #define CL_INLINE2_DECL(fcn) CL_INLINE_HINT fcn ## _inline cln-1.3.3/src/base/digit/0000755000000000000000000000000012173046176011770 5ustar cln-1.3.3/src/base/digit/cl_2D_exptpos.cc0000644000000000000000000000156411201634736015006 0ustar // expt_pos(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/digit/cl_2D.h" // Implementation. namespace cln { uintD expt_pos (uintD a, uintL b) { // Methode: // a:=x, b:=y, c:=1. [a^b*c bleibt invariant, = x^y.] // Solange b>1, // falls b ungerade, setze c:=a*c, // setze b:=floor(b/2), // setze a:=a*a. // Wenn b=1, setze c:=a*c. // Liefere c. // Oder optimiert: // a:=x, b:=y. // Solange b gerade, setze a:=a*a, b:=b/2. [a^b bleibt invariant, = x^y.] // c:=a. // Solange b:=floor(b/2) >0 ist, // setze a:=a*a, und falls b ungerade, setze c:=a*c. // Liefere c. while ((b & bit(0)) == 0) { a = mul2adic(a,a); b = b>>1; } var uintD c = a; until ((b = b>>1) == 0) { a = mul2adic(a,a); if (b & bit(0)) { c = mul2adic(a,c); } } return c; } } // namespace cln cln-1.3.3/src/base/digit/cl_2D.h0000644000000000000000000000176611201634736013072 0ustar // Digit level 2-adic arithmetic #ifndef _CL_2D_H #define _CL_2D_H #include "cln/types.h" #include "base/digit/cl_D.h" namespace cln { // Multipliziert zwei Zahlen mod 2^intDsize. // mul2adic(a,b) // > uintD a,b: Zahlen mod 2^intDsize // < ergebnis: Zahl c mod 2^intDsize mit c == a*b mod 2^intDsize extern uintD mul2adic (uintD a, uintD b); #if HAVE_DD inline uintD mul2adic (uintD a, uintD b) { return lowD(muluD(a,b)); } #else inline uintD mul2adic (uintD a, uintD b) { muluD(a,b, ,return); } #endif // Potenziert eine Zahl mod 2^intDsize. // expt_pos(x,y) // > uintD x: Zahl mod 2^intDsize // > uintL y: Exponent >0 // < uintD ergebnis: x^y mod 2^intDsize extern uintD expt_pos (uintD x, uintL y); // Dividiert zwei Zahlen mod 2^intDsize. // div2adic(a,b) // > uintD a: Zahl mod 2^intDsize // > uintD b: ungerade Zahl mod 2^intDsize // < ergebnis: Zahl c mod 2^intDsize mit b*c == a mod 2^intDsize extern uintD div2adic (uintD a, uintD b); } // namespace cln #endif /* _CL_2D_H */ cln-1.3.3/src/base/digit/cl_2D_div.cc0000644000000000000000000000210211201634736014053 0ustar // div2adic(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/digit/cl_2D.h" // Implementation. namespace cln { uintD div2adic (uintD a, uintD b) { // Methode: // Konstruiere c Bit für Bit. // c := 0, d := a. // Für j=0,...,intDsize: // [Hier b*c == a mod 2^j und d = (a-b*c)/2^j.] j=intDsize -> fertig. // Falls d ungerade, setze c:=c+2^j und d:=(d-b)/2, sonst d:=d/2. // Ergebnis c. ASSERT(!((b % 2) ==0)) #if 1 {var uintD c = 0; var uintD bit_j = 1; // 2^j loop // Verwende a als Variable d { if (a & bit(0)) { c = c+bit_j; a = a-b; } a = a>>1; bit_j = bit_j << 1; if (bit_j == 0) break; // j=intDsize -> fertig } return c; } #else {var uintD bit_j = 1; // 2^j var uintD b_j = b-1; // (b-1)*2^j loop // Verwende a als Variable d*2^j+c { if (a & bit_j) { a = a - b_j; } b_j = b_j << 1; bit_j = bit_j << 1; if (bit_j == 0) break; // j=intDsize -> fertig } return a; } #endif } } // namespace cln cln-1.3.3/src/base/digit/cl_D.h0000644000000000000000000001460311201634736013002 0ustar // Digit level arithmetic #ifndef _CL_D_H #define _CL_D_H #include "cln/types.h" #include "base/cl_low.h" // Aus cln/types.h importiere: // intDsize Anzahl Bits in einem Digit // uintD, sintD Integer-Typen für ein Digit // log2_intDsize log2(intDsize) // HAVE_DD Flag, das anzeigt, ob ein Integertyp für Doppel-Digits da ist // intDDsize Anzahl Bits in einem Doppel-Digit // uintDD,sintDD Integer-Typen für ein Doppel-Digit #ifdef HAVE_FAST_LONGLONG #if !((64%intDsize)==0) #error "intDsize should be a divisor of 64!" #endif #else #if !((32%intDsize)==0) #error "intDsize should be a divisor of 32!" #endif #endif namespace cln { // Vorzeichen eines Digit bestimmen // sign_of_sintD(wert) // > wert: ein Digit // < sintD ergebnis: 0 falls wert>=0, -1 falls wert<0. inline sint32 sign_of_sintD (sintD wert) { return sign_of(wert); } #if HAVE_DD // High-Digit eines Doppel-Digit bestimmen // highD(wert) #if (!(intDsize==16)) #define highD(x) ((uintD)((uintDD)(x)>>intDsize)) #else #define highD high16 #endif // Low-Digit eines Doppel-Digit bestimmen // lowD(wert) #define lowD(x) ((uintD)(uintDD)(x)) // Ein Doppel-Digit aus ihrem High-Digit und ihrem Low-Digit bestimmen: // highlowDD(uintD high, uintD low) #if (!(intDsize==16)) #define highlowDD(x,y) (((uintDD)(uintD)(x)< 0. #if (intDsize==8) || (intDsize==16) || (intDsize==64) #define floorD(arg1,arg2) (floor((uintD)(arg1),(uintD)(arg2))) #endif #if (intDsize==32) #define floorD divu_3232_3232_ #endif // Ganzzahl-Wurzel eines Doppel-Digits berechnen. // isqrtD(xhi,xlo,y=,sqrtp=); // > uintD xhi,xlo: Radikand x = 2^intDsize*xhi+xlo, // >= 2^(2*intDsize-2), < 2^(2*intDsize) // < uintD y: floor(sqrt(x)), >= 2^(intDsize-1), < 2^intDsize // < boolean sqrtp: /=0, falls x=y^2 #if (intDsize==8) #define isqrtD(xhi,xlo,y_zuweisung,sqrtp_zuweisung) \ { var uint32 _z; \ isqrt_32_16((((uint32)xhi<<8) | (uint32)xlo) << 16, _z=,sqrtp_zuweisung); \ y_zuweisung (_z >> 8); \ } #endif #if (intDsize==16) #define isqrtD(xhi,xlo,y_zuweisung,sqrtp_zuweisung) \ isqrt_32_16(highlow32(xhi,xlo),y_zuweisung,sqrtp_zuweisung) #endif #if (intDsize==32) #define isqrtD isqrt_64_32 #endif #if (intDsize==64) #define isqrtD isqrt_128_64 #endif // Bits eines Digit zählen: // integerlengthD(digit,size=); // setzt size auf die höchste in digit vorkommende Bitnummer. // > digit: ein uintD >0 // < size: >0, <=intDsize, mit 2^(size-1) <= digit < 2^size #if (intDsize==8) #define integerlengthD integerlength8 #endif #if (intDsize==16) #define integerlengthD integerlength16 #endif #if (intDsize==32) #define integerlengthD integerlength32 #endif #if (intDsize==64) #define integerlengthD integerlength64 #endif // Hintere Nullbits eines Digits zählen: // ord2_D(digit,count=); // setzt size auf die kleinste in digit vorkommende Bitnummer. // > digit: ein uintD >0 // < count: >=0, x: ein uintD // < ergebnis: Anzahl der darin gesetzten Bits #if (intDsize==8) inline uint8 logcountD (uint8 x8) { logcount_8(); return x8; } #endif #if (intDsize==16) inline uint16 logcountD (uint16 x16) { logcount_16(); return x16; } #endif #if (intDsize==32) inline uint32 logcountD (uint32 x32) { logcount_32(); return x32; } #endif #if (intDsize==64) inline uint64 logcountD (uint64 x64) { logcount_64(); return x64; } #endif } // namespace cln #endif /* _CL_D_H */ cln-1.3.3/src/base/cl_macros.h0000644000000000000000000002541612034113706013001 0ustar // CLN internal macros #ifndef _CL_MACROS_H #define _CL_MACROS_H #include "cln/types.h" #include "cln/exception.h" // Concatenation of macroexpanded tokens. // Example: // #undef x // #define y 16 // CONCAT(x,y) ==> 'x16' (not 'xy' !) #define CONCAT_(xxx,yyy) xxx##yyy #define CONCAT3_(aaa,bbb,ccc) aaa##bbb##ccc #define CONCAT4_(aaa,bbb,ccc,ddd) aaa##bbb##ccc##ddd #define CONCAT5_(aaa,bbb,ccc,ddd,eee) aaa##bbb##ccc##ddd##eee #define CONCAT6_(aaa,bbb,ccc,ddd,eee,fff) aaa##bbb##ccc##ddd##eee##fff #define CONCAT7_(aaa,bbb,ccc,ddd,eee,fff,ggg) aaa##bbb##ccc##ddd##eee##fff##ggg #define CONCAT(xxx,yyy) CONCAT_(xxx,yyy) #define CONCAT3(aaa,bbb,ccc) CONCAT3_(aaa,bbb,ccc) #define CONCAT4(aaa,bbb,ccc,ddd) CONCAT4_(aaa,bbb,ccc,ddd) #define CONCAT5(aaa,bbb,ccc,ddd,eee) CONCAT5_(aaa,bbb,ccc,ddd,eee) #define CONCAT6(aaa,bbb,ccc,ddd,eee,fff) CONCAT6_(aaa,bbb,ccc,ddd,eee,fff) #define CONCAT7(aaa,bbb,ccc,ddd,eee,fff,ggg) CONCAT7_(aaa,bbb,ccc,ddd,eee,fff,ggg) // Convert tokens to strings. // STRING(token) ==> "token" #define STRING(token) #token #define STRINGIFY(token) STRING(token) // Declare functions that don't return. // nonreturning_function(extern,exit,(void)); == extern void exit (void); #ifdef __GNUC__ #if (__GNUC__ >= 3) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 9)) #define nonreturning_function(storclass,funname,arguments) \ storclass void funname arguments __attribute__((__noreturn__)) #else #define nonreturning_function(storclass,funname,arguments) \ typedef void CONCAT3(funname,_function_,__LINE__) arguments; \ storclass __volatile__ CONCAT3(funname,_function_,__LINE__) funname #endif #else #define nonreturning_function(storclass,funname,arguments) \ storclass void funname arguments #endif // Declaration of variables. #define var // `if' with more than one clause: // if (cond1) ... {elif (condi) ...} [else ...] #define elif else if // Endless loop, leave with break; or return...; #define loop while (1) // Reversed end condition. // Allows until (expression) statement // and do statement until (expression); #define until(expression) while(!(expression)) // Boolean values. #define FALSE 0 #define TRUE 1 // Ignore a value (instead of assigning it to a variable). // unused ... #if defined(__GNUC__) || defined(__KCC) // avoid a gcc warning "statement with no effect" #define unused (void) #else #define unused #endif // Denotes a point where control flow can never arrive. // NOTREACHED #define NOTREACHED throw notreached_exception(__FILE__,__LINE__); // Check an arithmetic expression. // ASSERT(expr) #define ASSERT(expr) { if (!(expr)) { NOTREACHED } } // alloca() #if defined(__GNUC__) && !defined(__riscos) && !defined(__convex__) #undef alloca #define alloca __builtin_alloca #elif defined(_MSC_VER) #include #define alloca _alloca #elif defined(HAVE_ALLOCA_H) || defined(__riscos) #include #ifndef alloca // Sometimes `alloca' is defined as a macro... #if defined(__osf__) extern "C" char* alloca (int size); #else extern "C" void* alloca (size_t size); #endif #endif #elif defined(_AIX) #pragma alloca // AIX requires this to be the first thing in the file. #elif defined(WATCOM) #include // defines `alloca' as a macro #elif !defined(NO_ALLOCA) extern "C" void* alloca (size_t size); #endif // NULL pointer. #undef NULL #define NULL 0 // Bit number n (0<=n<32 or 0<=n<64) #ifdef HAVE_FAST_LONGLONG #define bit(n) (1LL<<(n)) #else #define bit(n) (1L<<(n)) #endif // Bit number n (0=12) && ((sint32)((uint32)(x) << (31-(n))) < 0) ) \ ) #endif #endif // minus bit number n (0<=n<32 or 0<=n<64) #ifdef HAVE_FAST_LONGLONG #define minus_bit(n) (-1LL<<(n)) #else #define minus_bit(n) (-1L<<(n)) #endif // minus bit number n (0={long_}long_bitsize. #if defined(HAVE_FAST_LONGLONG) || defined(intQsize) #define bitc(n) (1ULL << (((n) >= 0 && (n) < long_long_bitsize) ? (n) : 0)) #else #define bitc(n) (1UL << (((n) >= 0 && (n) < long_bitsize) ? (n) : 0)) #endif // floor(a,b) for a>=0, b>0 returns floor(a/b). // b should be a constant expression. #define floor(a_from_floor,b_from_floor) ((a_from_floor) / (b_from_floor)) // Save the macro in case we need to include . #define cln_floor(a_from_floor,b_from_floor) ((a_from_floor) / (b_from_floor)) // ceiling(a,b) for a>=0, b>0 returns ceiling(a/b) = floor((a+b-1)/b). // b should be a constant expression. #define ceiling(a_from_ceiling,b_from_ceiling) \ (((a_from_ceiling) + (b_from_ceiling) - 1) / (b_from_ceiling)) // round_down(a,b) decreases a>=0 such that it becomes divisible by b>0. // b should be a constant expression. #define round_down(a_from_round,b_from_round) \ (floor(a_from_round,b_from_round)*(b_from_round)) // round_up(a,b) increases a>=0 such that it becomes divisible by b>0. // b should be a constant expression. #define round_up(a_from_round,b_from_round) \ (ceiling(a_from_round,b_from_round)*(b_from_round)) // We never call malloc(0), so no need to handle it. #define __MALLOC_0_RETURNS_NULL // Loop which executes a statement a given number of times. // dotimesC(countvar,count,statement); // countvar must be of type `uintC'. It is modified! #define dotimesC(countvar_from_dotimesC,count_from_dotimesC,statement_from_dotimesC) \ { countvar_from_dotimesC = (count_from_dotimesC); \ until (countvar_from_dotimesC==0) \ {statement_from_dotimesC; countvar_from_dotimesC--; } \ } #define dotimespC(countvar_from_dotimespC,count_from_dotimespC,statement_from_dotimespC) \ { countvar_from_dotimespC = (count_from_dotimespC); \ do {statement_from_dotimespC} until (--countvar_from_dotimespC==0); \ } // doconsttimes(count,statement); // führt statement count mal aus (count mal der Code!), // wobei count eine constant-expression >=0, <=8 ist. #define doconsttimes(count_from_doconsttimes,statement_from_doconsttimes) \ { if (0 < (count_from_doconsttimes)) { statement_from_doconsttimes; } \ if (1 < (count_from_doconsttimes)) { statement_from_doconsttimes; } \ if (2 < (count_from_doconsttimes)) { statement_from_doconsttimes; } \ if (3 < (count_from_doconsttimes)) { statement_from_doconsttimes; } \ if (4 < (count_from_doconsttimes)) { statement_from_doconsttimes; } \ if (5 < (count_from_doconsttimes)) { statement_from_doconsttimes; } \ if (6 < (count_from_doconsttimes)) { statement_from_doconsttimes; } \ if (7 < (count_from_doconsttimes)) { statement_from_doconsttimes; } \ } // DOCONSTTIMES(count,macroname); // ruft count mal den Macro macroname auf (count mal der Code!), // wobei count eine constant-expression >=0, <=8 ist. // Dabei bekommt macroname der Reihe nach die Werte 0,...,count-1 übergeben. #define DOCONSTTIMES(count_from_DOCONSTTIMES,macroname_from_DOCONSTTIMES) \ { if (0 < (count_from_DOCONSTTIMES)) { macroname_from_DOCONSTTIMES((0 < (count_from_DOCONSTTIMES) ? 0 : 0)); } \ if (1 < (count_from_DOCONSTTIMES)) { macroname_from_DOCONSTTIMES((1 < (count_from_DOCONSTTIMES) ? 1 : 0)); } \ if (2 < (count_from_DOCONSTTIMES)) { macroname_from_DOCONSTTIMES((2 < (count_from_DOCONSTTIMES) ? 2 : 0)); } \ if (3 < (count_from_DOCONSTTIMES)) { macroname_from_DOCONSTTIMES((3 < (count_from_DOCONSTTIMES) ? 3 : 0)); } \ if (4 < (count_from_DOCONSTTIMES)) { macroname_from_DOCONSTTIMES((4 < (count_from_DOCONSTTIMES) ? 4 : 0)); } \ if (5 < (count_from_DOCONSTTIMES)) { macroname_from_DOCONSTTIMES((5 < (count_from_DOCONSTTIMES) ? 5 : 0)); } \ if (6 < (count_from_DOCONSTTIMES)) { macroname_from_DOCONSTTIMES((6 < (count_from_DOCONSTTIMES) ? 6 : 0)); } \ if (7 < (count_from_DOCONSTTIMES)) { macroname_from_DOCONSTTIMES((7 < (count_from_DOCONSTTIMES) ? 7 : 0)); } \ } // AT_INITIALIZATION(id) { ... } // executes the given code at initialization time of the file. // The id is something unique. #define AT_INITIALIZATION(id) \ class CONCAT3(INIT_CLASS_,id,__LINE__) { \ public: CONCAT3(INIT_CLASS_,id,__LINE__) (void); \ } CONCAT4(INIT_CLASS_,id,__LINE__,_DUMMY); \ inline CONCAT3(INIT_CLASS_,id,__LINE__)::CONCAT3(INIT_CLASS_,id,__LINE__) (void) // AT_DESTRUCTION(id) { ... } // executes the given code at destruction time of the file. // The id is something unique. #define AT_DESTRUCTION(id) \ class CONCAT3(DESTR_CLASS_,id,__LINE__) { \ public: ~CONCAT3(DESTR_CLASS_,id,__LINE__) (void); \ } CONCAT4(DESTR_CLASS_,id,__LINE__,_DUMMY); \ CONCAT3(DESTR_CLASS_,id,__LINE__)::~CONCAT3(DESTR_CLASS_,id,__LINE__) (void) // Inside a class definition: // Overload `new' so that a class object can be allocated anywhere. #if !((defined(__rs6000__) || defined(__alpha__)) && !defined(__GNUC__)) #define ALLOCATE_ANYWHERE(classname) \ /* Ability to place an object at a given address. */ \ public: \ void* operator new (size_t size) { return malloc_hook(size); } \ void* operator new (size_t size, classname* ptr) { unused size; return ptr; } \ void operator delete (void* ptr) { free_hook(ptr); } #else // For some compilers, work around template problem with "classname". #define ALLOCATE_ANYWHERE(classname) \ /* Ability to place an object at a given address. */ \ public: \ void* operator new (size_t size) { return malloc_hook(size); } \ void* operator new (size_t size, void* ptr) { unused size; return ptr; } \ void operator delete (void* ptr) { free_hook(ptr); } #endif // init1(type, object) (value); // initializes `object' with `value', by calling `type''s constructor. // (The identifiers `init' and `Init' are already in use by , // it's a shame!) #define init1(type,lvalue) (void) new (&(lvalue)) type #include "base/cl_maybe_inline.h" #endif /* _CL_MACROS_H */ cln-1.3.3/src/base/cl_low.h0000644000000000000000000020655611547704532012337 0ustar // Low-level arithmetic: operations on 16-bit and 32-bit words #ifndef _CL_LOW_H #define _CL_LOW_H namespace cln { // Determines the sign of a 16-bit number. // sign_of(wert) // > wert: eine 16-Bit-Zahl // < sint16 ergebnis: 0 falls wert>=0, -1 falls wert<0. inline sint16 sign_of (sint16 wert) { #if defined(__sparc64__) return (sint64)wert >> 63; #elif defined(__sparc__) || defined(__arm__) return (sint32)wert >> 31; #else return (wert >= 0 ? 0 : -1); #endif } // Determines the sign of a 32-bit number. // sign_of(wert) // > wert: eine 32-Bit-Zahl // < sint32 ergebnis: 0 falls wert>=0, -1 falls wert<0. inline sint32 sign_of (sint32 wert) { #if defined(__sparc64__) return (sint64)wert >> 63; #elif defined(__sparc__) || defined(__arm__) return wert >> 31; #else return (wert >= 0 ? 0 : -1); #endif } #ifdef HAVE_FAST_LONGLONG // Determines the sign of a 64-bit number. // sign_of(wert) // > wert: eine 64-Bit-Zahl // < sint64 ergebnis: 0 falls wert>=0, -1 falls wert<0. inline sint64 sign_of (sint64 wert) { return wert >> 63; } #endif /* HAVE_FAST_LONGLONG */ // High-Word einer 32-Bit-Zahl bestimmen // high16(wert) inline uint16 high16 (uint32 wert) { return wert >> 16; } // Low-Word einer 32-Bit-Zahl bestimmen // low16(wert) inline uint16 low16 (uint32 wert) { return (uint16)wert; } // Eine 32-Bit-Zahl aus ihrem High-Word und ihrem Low-Word bestimmen: // highlow32(uint16 high, uint16 low) inline uint32 highlow32 (uint16 high, uint16 low) { return ((uint32)high << 16) | (uint32)low; } // Eine 32-Bit-Zahl aus ihrem High-Word und ihrem Low-Word 0 bestimmen: // highlow32_0(uint16 high) inline uint32 highlow32_0 (uint16 high) { return (uint32)high << 16; } #ifdef HAVE_LONGLONG // High-Word einer 64-Bit-Zahl bestimmen // high32(wert) inline uint32 high32 (uint64 wert) { return wert >> 32; } // Low-Word einer 64-Bit-Zahl bestimmen // low32(wert) inline uint32 low32 (uint64 wert) { return (uint32)wert; } // Eine 64-Bit-Zahl aus ihrem High-Word und ihrem Low-Word bestimmen: // highlow64(uint32 high, uint32 low) inline uint64 highlow64 (uint32 high, uint32 low) { return ((uint64)high << 32) | (uint64)low; } // Eine 64-Bit-Zahl aus ihrem High-Word und ihrem Low-Word 0 bestimmen: // highlow64_0(uint32 high) inline uint64 highlow64_0 (uint32 high) { return (uint64)high << 32; } #endif /* HAVE_LONGLONG */ // Multipliziert zwei 16-Bit-Zahlen miteinander und liefert eine 32-Bit-Zahl: // mulu16(arg1,arg2) // > arg1, arg2 : zwei 16-Bit-Zahlen // < ergebnis: eine 32-Bit-Zahl #if defined(__GNUC__) && defined(__sparc__) && !defined(__sparc64__) && defined(FAST_DOUBLE) // Ist das schneller als mulu16_ ?? inline uint32 mulu16 (uint16 arg1, uint16 arg2) { union { double f; uint32 i[2]; } __fi; __fi.f = (double)(sint32)arg1 * (double)(sint32)arg2 + (double)(4503599627370496.0L); // + 2^52, zum Normalisieren return __fi.i[1]; // untere 32 Bit herausholen (benutzt CL_CPU_BIG_ENDIAN_P !) } #elif defined(__GNUC__) && defined(__sparc64__) && !defined(NO_ASM) inline uint32 mulu16 (uint16 arg1, uint16 arg2) { register uint64 _prod; __asm__("umul %1,%2,%0" : "=r" (_prod) : "r" (arg1), "r" (arg2) ); return _prod; } #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && !defined(NO_ASM) inline uint32 mulu16 (uint16 arg1, uint16 arg2) { register uint16 _hi; register uint16 _lo; __asm__("mulw %2" : "=d" /* %dx */ (_hi), "=a" /* %ax */ (_lo) : "rm" (arg1), "1" /* %eax */ (arg2) ); return highlow32(_hi,_lo); } #elif (defined(__sparc__) || defined(__sparc64__)) && !defined(NO_ASM) extern "C" uint32 mulu16_ (uint16 arg1, uint16 arg2); #define mulu16 mulu16_ // extern in Assembler #else inline uint32 mulu16 (uint16 arg1, uint16 arg2) { return arg1 * arg2; } #endif // Multipliziert zwei 24-Bit-Zahlen zusammen und liefert eine 48-Bit-Zahl. // mulu24(arg1,arg2,hi=,lo=); // > arg1, arg2 : zwei 24-Bit-Zahlen // < 2^32*hi+lo : eine 48-Bit-Zahl #if defined(__sparc__) && !defined(__sparc64__) && defined(FAST_DOUBLE) #define mulu24(x,y,hi_zuweisung,lo_zuweisung) \ { var uint32 _x = (x); \ var uint32 _y = (y); \ var union { double f; uint32 i[2]; uint16 s[4]; } __fi; \ __fi.f = (double)(sint32)(_x)*(double)(sint32)(_y) \ + (double)(4503599627370496.0L); /* + 2^52, zum Normalisieren */\ unused (hi_zuweisung __fi.s[1]); /* mittlere 16 Bit herausholen, (benutzt CL_CPU_BIG_ENDIAN_P !) */\ lo_zuweisung __fi.i[1]; /* untere 32 Bit herausholen (benutzt CL_CPU_BIG_ENDIAN_P !) */\ } #else #define mulu24 mulu32 #endif // Multipliziert zwei 32-Bit-Zahlen miteinander und liefert eine 32-Bit-Zahl: // mulu32_unchecked(arg1,arg2) // > arg1, arg2 : zwei 32-Bit-Zahlen // < ergebnis : eine 32-Bit-Zahl // Es wird vorausgesetzt, daß arg1*arg2 < 2^32. #if defined(__GNUC__) && defined(__sparc64__) && !defined(NO_ASM) inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) { register uint64 _prod; __asm__("umul %1,%2,%0" : "=r" (_prod) : "r" (arg1), "r" (arg2) ); return _prod; } #elif defined(__sparc__) && !defined(NO_ASM) extern "C" uint32 mulu32_unchecked (uint32 x, uint32 y); // extern in Assembler #else // Wir können dafür auch die Bibliotheksroutine des C-Compilers nehmen: inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) { return arg1 * arg2; } #endif // Multipliziert zwei 32-Bit-Zahlen miteinander und liefert eine 64-Bit-Zahl: // mulu32(arg1,arg2,hi=,lo=); // > arg1, arg2 : zwei 32-Bit-Zahlen // < 2^32*hi+lo : eine 64-Bit-Zahl extern "C" uint32 mulu32_ (uint32 arg1, uint32 arg2); // -> Low-Teil #ifdef _MSC_VER // Workaround MSVC compiler bug: extern "C" results in wrong symbols, when // declared inside a namespace! } extern "C" uint32 mulu32_high; namespace cln { // -> High-Teil #else extern "C" uint32 mulu32_high; // -> High-Teil #endif #if defined(__GNUC__) && defined(__m68k__) && !defined(NO_ASM) #define mulu32(x,y,hi_zuweisung,lo_zuweisung) \ ({ var uint32 _x = (x); \ var uint32 _y = (y); \ var uint32 _hi; \ var uint32 _lo; \ __asm__("mulul %3,%0:%1" : "=d" (_hi), "=d"(_lo) : "1" (_x), "dm" (_y) ); \ unused (hi_zuweisung _hi); \ lo_zuweisung _lo; \ }) #elif defined(__GNUC__) && defined(__m68k__) #define mulu32(x,y,hi_zuweisung,lo_zuweisung) \ ({ var uint32 _x = (x); \ var uint32 _y = (y); \ var uint16 _x1 = high16(_x); \ var uint16 _x0 = low16(_x); \ var uint16 _y1 = high16(_y); \ var uint16 _y0 = low16(_y); \ var uint32 _hi = mulu16(_x1,_y1); /* obere Portion */ \ var uint32 _lo = mulu16(_x0,_y0); /* untere Portion */ \ {var uint32 _mid = mulu16(_x0,_y1); /* 1. mittlere Portion */ \ _hi += high16(_mid); _mid = highlow32_0(low16(_mid)); \ _lo += _mid; if (_lo < _mid) { _hi += 1; } /* 64-Bit-Addition */\ } \ {var uint32 _mid = mulu16(_x1,_y0); /* 2. mittlere Portion */ \ _hi += high16(_mid); _mid = highlow32_0(low16(_mid)); \ _lo += _mid; if (_lo < _mid) { _hi += 1; } /* 64-Bit-Addition */\ } \ unused (hi_zuweisung _hi); \ lo_zuweisung _lo; \ }) #elif defined(__GNUC__) && defined(__sparc64__) && !defined(NO_ASM) #define mulu32(x,y,hi_zuweisung,lo_zuweisung) \ ({ var register uint64 _prod; \ __asm__("umul %1,%2,%0" \ : "=r" (_prod) \ : "r" ((uint32)(x)), "r" ((uint32)(y)) \ ); \ unused (hi_zuweisung (uint32)(_prod>>32)); \ lo_zuweisung (uint32)(_prod); \ }) #elif defined(__GNUC__) && defined(__sparc__) && !defined(NO_ASM) #define mulu32(x,y,hi_zuweisung,lo_zuweisung) \ ({ lo_zuweisung mulu32_(x,y); /* extern in Assembler */ \ {var register uint32 _hi __asm__("%g1"); \ unused (hi_zuweisung _hi); \ }}) #elif defined(__GNUC__) && defined(__arm__) && 0 // see comment cl_asm_arm.cc #define mulu32(x,y,hi_zuweisung,lo_zuweisung) \ ({ lo_zuweisung mulu32_(x,y); /* extern in Assembler */ \ {var register uint32 _hi __asm__("%r1"/*"%a2"*/); \ unused (hi_zuweisung _hi); \ }}) #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && !defined(NO_ASM) #define mulu32(x,y,hi_zuweisung,lo_zuweisung) \ ({ var register uint32 _hi; \ var register uint32 _lo; \ __asm__("mull %2" \ : "=d" /* %edx */ (_hi), "=a" /* %eax */ (_lo) \ : "g" ((uint32)(x)), "1" /* %eax */ ((uint32)(y)) \ ); \ unused (hi_zuweisung _hi); lo_zuweisung _lo; \ }) #elif defined(__GNUC__) && defined(__mips__) && !defined(NO_ASM) #define mulu32(x,y,hi_zuweisung,lo_zuweisung) \ ({ var register uint32 _hi; \ var register uint32 _lo; \ __asm__("multu %3,%2 ; mfhi %0 ; mflo %1" \ : "=r" (_hi), "=r" (_lo) \ : "r" ((uint32)(x)), "r" ((uint32)(y)) \ ); \ unused (hi_zuweisung _hi); lo_zuweisung _lo; \ }) #elif defined(__GNUC__) && defined(HAVE_LONGLONG) && !defined(__arm__) #define mulu32(x,y,hi_zuweisung,lo_zuweisung) \ ({ var register uint64 _prod = (uint64)(uint32)(x) * (uint64)(uint32)(y); \ unused (hi_zuweisung (uint32)(_prod>>32)); \ lo_zuweisung (uint32)(_prod); \ }) #elif defined(WATCOM) && defined(__i386__) && !defined(NO_ASM) #define mulu32(x,y,hi_zuweisung,lo_zuweisung) \ { var register uint32 _hi; \ var register uint32 _lo; \ _lo = mulu32_(x,y), _hi = mulu32_high_(); \ unused (hi_zuweisung _hi); lo_zuweisung _lo; \ } extern "C" uint32 mulu32_high_ (void); #pragma aux mulu32_ = 0xF7 0xE2 /* mull %edx */ parm [eax] [edx] value [eax] modify [eax edx]; #pragma aux mulu32_high_ = /* */ value [edx] modify []; #else #define mulu32(x,y,hi_zuweisung,lo_zuweisung) \ { lo_zuweisung mulu32_(x,y); unused (hi_zuweisung mulu32_high); } #if (defined(__m68k__) || defined(__sparc__) || defined(__sparc64__) || defined(__arm__) || (defined(__i386__) && !defined(WATCOM) && !defined(MICROSOFT)) || defined(__x86_64__) || defined(__mips__) || defined(__hppa__)) && !defined(NO_ASM) // mulu32_ extern in Assembler #if defined(__sparc__) || defined(__sparc64__) extern "C" uint32 _get_g1 (void); #define mulu32_high (_get_g1()) // Rückgabe im Register %g1 #elif !defined(__hppa__) #define NEED_VAR_mulu32_high #endif #else #define NEED_FUNCTION_mulu32_ #endif #endif #ifdef HAVE_FAST_LONGLONG // Multipliziert zwei 32-Bit-Zahlen miteinander und liefert eine 64-Bit-Zahl: // mulu32_w(arg1,arg2) // > arg1, arg2 : zwei 32-Bit-Zahlen // < result : eine 64-Bit-Zahl #if defined(__GNUC__) && defined(__sparc64__) && !defined(NO_ASM) // Prefer the umul instruction over the mulx instruction (overkill). #define mulu32_w(x,y) \ ({ var register uint64 _prod; \ __asm__("umul %1,%2,%0" \ : "=r" (_prod) \ : "r" ((uint32)(x)), "r" ((uint32)(y)) \ ); \ _prod; \ }) #elif defined(__GNUC__) #define mulu32_w(x,y) ((uint64)(uint32)(x) * (uint64)(uint32)(y)) #else extern "C" uint64 mulu32_w (uint32 arg1, uint32 arg2); #define NEED_FUNCTION_mulu32_w #endif // Multipliziert zwei 64-Bit-Zahlen miteinander und liefert eine 128-Bit-Zahl: // mulu64(arg1,arg2,hi=,lo=); // > arg1, arg2 : zwei 64-Bit-Zahlen // < 2^64*hi+lo : eine 128-Bit-Zahl extern "C" uint64 mulu64_ (uint64 arg1, uint64 arg2); // -> Low-Teil #ifdef _MSC_VER // Workaround MSVC compiler bug. } extern "C" uint64 mulu64_high; namespace cln { // -> High-Teil #else extern "C" uint64 mulu64_high; // -> High-Teil #endif #if defined(__GNUC__) && defined(__alpha__) && !defined(NO_ASM) #define mulu64(x,y,hi_zuweisung,lo_zuweisung) \ ({ var register uint64 _x = (x); \ var register uint64 _y = (y); \ var register uint64 _hi; \ var register uint64 _lo; \ __asm__("mulq %1,%2,%0" \ : "=r" (_lo) \ : "r" (_x), "r" (_y) \ ); \ __asm__("umulh %1,%2,%0" \ : "=r" (_hi) \ : "r" (_x), "r" (_y) \ ); \ hi_zuweisung _hi; \ lo_zuweisung _lo; \ }) #elif defined(__GNUC__) && defined(__sparc64__) && !defined(NO_ASM) #define mulu64(x,y,hi_zuweisung,lo_zuweisung) \ ({ lo_zuweisung mulu64_(x,y); /* extern in Assembler */ \ {var register uint64 _hi __asm__("%g2"); \ hi_zuweisung _hi; \ }}) #elif defined(__GNUC__) && defined(__x86_64__) && !defined(NO_ASM) #define mulu64(x,y,hi_zuweisung,lo_zuweisung) \ ({ var register uint64 _hi; \ var register uint64 _lo; \ __asm__("mulq %2" \ : "=d" /* %rdx */ (_hi), "=a" /* %rax */ (_lo) \ : "rm" ((uint64)(x)), "1" /* %rax */ ((uint64)(y)) \ ); \ hi_zuweisung _hi; lo_zuweisung _lo; \ }) #elif defined(__GNUC__) && defined(__ia64__) && !defined(NO_ASM) #define mulu64(x,y,hi_zuweisung,lo_zuweisung) \ ({ var register uint64 _x = (x); \ var register uint64 _y = (y); \ var register uint64 _hi; \ __asm__("xma.hu %0 = %1, %2, f0" \ : "=f" (_hi) \ : "f" ((uint64)(_x)), "f" ((uint64)(_y)) \ ); \ hi_zuweisung _hi; lo_zuweisung ((uint64)(_x)*(uint64)(_y));\ }) #else #define mulu64(x,y,hi_zuweisung,lo_zuweisung) \ { lo_zuweisung mulu64_(x,y); hi_zuweisung mulu64_high; } #if defined(__sparc64__) && !defined(NO_ASM) // mulu64_ extern in Assembler extern "C" uint64 _get_g2 (void); #define mulu64_high (_get_g2()) // Rückgabe im Register %g2 #else #define NEED_FUNCTION_mulu64_ #endif #endif #endif /* HAVE_FAST_LONGLONG */ // Dividiert eine 16-Bit-Zahl durch eine 16-Bit-Zahl und // liefert einen 16-Bit-Quotienten und einen 16-Bit-Rest. // divu_1616_1616(x,y,q=,r=); // > uint16 x: Zähler // > uint16 y: Nenner // < uint16 q: floor(x/y) // < uint16 r: x mod y // < x = q*y+r #define divu_1616_1616(x,y,q_zuweisung,r_zuweisung) \ { var uint16 __x = (x); \ var uint16 __y = (y); \ q_zuweisung floor(__x,__y); \ r_zuweisung (__x % __y); \ } // Dividiert eine 32-Bit-Zahl durch eine 16-Bit-Zahl und // liefert einen 16-Bit-Quotienten und einen 16-Bit-Rest. // divu_3216_1616(x,y,q=,r=); // > uint32 x: Zähler // > uint16 y: Nenner // > Es sei bekannt, daß 0 <= x < 2^16*y . // < uint16 q: floor(x/y) // < uint16 r: x mod y // < x = q*y+r #if defined(__sparc__) extern "C" uint32 divu_3216_1616_ (uint32 x, uint16 y); // -> Quotient q, Rest r #else extern "C" uint16 divu_3216_1616_ (uint32 x, uint16 y); // -> Quotient q #ifdef _MSC_VER // Workaround MSVC compiler bug. } extern "C" uint16 divu_16_rest; namespace cln { // -> Rest r #else extern "C" uint16 divu_16_rest; // -> Rest r #endif #endif #if defined(__GNUC__) && defined(__sparc64__) && !defined(NO_ASM) #define divu_3216_1616(x,y,q_zuweisung,r_zuweisung) \ ({var uint32 __x = (x); \ var uint16 __y = (y); \ var uint64 __q; \ var uint64 __r; \ __asm__ __volatile__ ( \ "wr %%g0,%%g0,%%y\n\t" \ "udiv %2,%3,%0\n\t" \ "umul %0,%3,%1\n\t" \ "sub %2,%1,%1" \ : "=&r" (__q), "=&r" (__r) \ : "r" (__x), "r" (__y)); \ q_zuweisung (uint16)__q; \ r_zuweisung (uint16)__r; \ }) #elif defined(__GNUC__) && (defined(__sparc__) || defined(__sparc64__)) && !defined(NO_ASM) #define divu_3216_1616(x,y,q_zuweisung,r_zuweisung) \ ({ var uint32 __qr = divu_3216_1616_(x,y); /* extern in Assembler */\ q_zuweisung low16(__qr); \ r_zuweisung high16(__qr); \ }) #elif defined(__GNUC__) && defined(__m68k__) && !defined(NO_ASM) #define divu_3216_1616(x,y,q_zuweisung,r_zuweisung) \ ({var uint32 __x = (x); \ var uint16 __y = (y); \ var uint32 __qr; \ __asm__ __volatile__ (" \ divu %2,%0 \ " : "=d" (__qr) : "0" (__x), "dm" (__y)); \ q_zuweisung low16(__qr); \ r_zuweisung high16(__qr); \ }) #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && !defined(NO_ASM) #define divu_3216_1616(x,y,q_zuweisung,r_zuweisung) \ ({var uint32 __x = (x); \ var uint16 __y = (y); \ var uint16 __q; \ var uint16 __r; \ __asm__("divw %4" \ : "=a" /* %ax */ (__q), "=d" /* %dx */ (__r) \ : "1" /* %dx */ ((uint16)(high16(__x))), "0" /* %ax */ ((uint16)(low16(__x))), "rm" (__y) \ ); \ q_zuweisung __q; \ r_zuweisung __r; \ }) #elif defined(__GNUC__) && defined(__arm__) && 0 // see comment cl_asm_arm.cc #define divu_3216_1616(x,y,q_zuweisung,r_zuweisung) \ { var uint32 __q = divu_3216_1616_(x,y); /* extern in Assembler */ \ var register uint32 __r __asm__("%r1"/*"%a2"*/); \ q_zuweisung __q; r_zuweisung __r; \ } #elif defined(__GNUC__) && !defined(__arm__) #define divu_3216_1616(x,y,q_zuweisung,r_zuweisung) \ ({var uint32 __x = (x); \ var uint16 __y = (y); \ var uint16 __q = floor(__x,__y); \ q_zuweisung __q; \ r_zuweisung (__x - __q * __y); \ }) #elif (defined(__sparc__) || defined(__sparc64__)) && !defined(NO_ASM) #define divu_3216_1616(x,y,q_zuweisung,r_zuweisung) \ { var uint32 __qr = divu_3216_1616_(x,y); /* extern in Assembler */ \ q_zuweisung low16(__qr); \ r_zuweisung high16(__qr); \ } #elif defined(__arm__) && !defined(NO_ASM) #define divu_3216_1616(x,y,q_zuweisung,r_zuweisung) \ { q_zuweisung divu_3216_1616_(x,y); /* extern in Assembler */ \ r_zuweisung divu_16_rest; \ } #define NEED_VAR_divu_16_rest #else #define divu_3216_1616(x,y,q_zuweisung,r_zuweisung) \ { q_zuweisung divu_3216_1616_(x,y); r_zuweisung divu_16_rest; } #define NEED_FUNCTION_divu_3216_1616_ #endif // Dividiert eine 32-Bit-Zahl durch eine 16-Bit-Zahl und // liefert einen 32-Bit-Quotienten und einen 16-Bit-Rest. // divu_3216_3216(x,y,q=,r=); // > uint32 x: Zähler // > uint16 y: Nenner // Es sei bekannt, daß y>0. // < uint32 q: floor(x/y) // < uint16 r: x mod y // < x = q*y+r extern "C" uint32 divu_3216_3216_ (uint32 x, uint16 y); // -> Quotient q #ifdef _MSC_VER // Workaround MSVC compiler bug. } extern "C" uint16 divu_16_rest; namespace cln { // -> Rest r #else extern "C" uint16 divu_16_rest; // -> Rest r #endif #if defined(__GNUC__) && defined(__sparc64__) && !defined(NO_ASM) #define divu_3216_3216(x,y,q_zuweisung,r_zuweisung) \ ({var uint32 __x = (x); \ var uint16 __y = (y); \ var uint64 __q; \ var uint64 __r; \ __asm__ __volatile__ ( \ "wr %%g0,%%g0,%%y\n\t" \ "udiv %2,%3,%0\n\t" \ "umul %0,%3,%1\n\t" \ "sub %2,%1,%1" \ : "=&r" (__q), "=&r" (__r) \ : "r" (__x), "r" (__y)); \ q_zuweisung (uint32)__q; \ r_zuweisung (uint16)__r; \ }) #elif defined(__sparc__) || defined(__sparc64__) || defined(__i386__) || defined(__x86_64__) #define divu_3216_3216 divu_3232_3232 #else // Methode: (beta = 2^16) // x = x1*beta+x0 schreiben. // Division mit Rest: x1 = q1*y + r1, wobei 0 <= x1 < beta <= beta*y. // Also 0 <= q1 < beta, 0 <= r1 < y. // Division mit Rest: (r1*beta+x0) = q0*y + r0, wobei 0 <= r1*beta+x0 < beta*y. // Also 0 <= q0 < beta, 0 <= r0 < y // und x = x1*beta+x0 = (q1*beta+q0)*y + r0. // Setze q := q1*beta+q0 und r := r0. #define divu_3216_3216(x,y,q_zuweisung,r_zuweisung) \ { var uint32 _x = (x); \ var uint16 _y = (y); \ var uint16 _q1; \ var uint16 _q0; \ var uint16 _r1; \ divu_3216_1616(high16(_x),_y, _q1 = , _r1 = ); \ divu_3216_1616(highlow32(_r1,low16(_x)),_y, _q0 = , r_zuweisung); \ q_zuweisung highlow32(_q1,_q0); \ } #endif // Dividiert eine 32-Bit-Zahl durch eine 32-Bit-Zahl und // liefert einen 32-Bit-Quotienten und einen 32-Bit-Rest. // divu_3232_3232(x,y,q=,r=); // > uint32 x: Zähler // > uint32 y: Nenner // Es sei bekannt, daß y>0. // < uint32 q: floor(x/y) // < uint32 r: x mod y // < x = q*y+r extern "C" uint32 divu_3232_3232_ (uint32 x, uint32 y); // -> Quotient q #ifdef _MSC_VER // Workaround MSVC compiler bug. } extern "C" uint32 divu_32_rest; namespace cln { // -> Rest r #else extern "C" uint32 divu_32_rest; // -> Rest r #endif #if defined(__GNUC__) && defined(__sparc64__) && !defined(NO_ASM) #define divu_3232_3232(x,y,q_zuweisung,r_zuweisung) \ ({var uint32 __x = (x); \ var uint32 __y = (y); \ var uint64 __q; \ var uint64 __r; \ __asm__ __volatile__ ( \ "wr %%g0,%%g0,%%y\n\t" \ "udiv %2,%3,%0\n\t" \ "umul %0,%3,%1\n\t" \ "sub %2,%1,%1" \ : "=&r" (__q), "=&r" (__r) \ : "r" (__x), "r" (__y)); \ q_zuweisung (uint32)__q; \ r_zuweisung (uint32)__r; \ }) #define divu_3232_3232_(x,y) divu_6432_3232_(0,x,y) #elif defined(__sparc__) || defined(__sparc64__) || defined(__i386__) || defined(__x86_64__) #define divu_3232_3232(x,y,q_zuweisung,r_zuweisung) \ divu_6432_3232(0,x,y,q_zuweisung,r_zuweisung) #define divu_3232_3232_(x,y) divu_6432_3232_(0,x,y) #else // Methode: (beta = 2^n = 2^16, n = 16) // Falls y < beta, handelt es sich um eine 32-durch-16-Bit-Division. // Falls y >= beta: // Quotient q = floor(x/y) < beta (da 0 <= x < beta^2, y >= beta). // y habe genau n+k Bits (1 <= k <= n), d.h. 2^(n+k-1) <= y < 2^(n+k). // Schreibe x = 2^k*x1 + x0 mit x1 := floor(x/2^k) // und y = 2^k*y1 + y0 mit y1 := floor(y/2^k) // und bilde den Näherungs-Quotienten floor(x1/y1) // oder (noch besser) floor(x1/(y1+1)). // Wegen 0 <= x1 < 2^(2n) und 0 < 2^(n-1) <= y1 < 2^n // und x1/(y1+1) <= x/y < x1/(y1+1) + 2 // (denn x1/(y1+1) = (x1*2^k)/((y1+1)*2^k) <= (x1*2^k)/y <= x/y // und x/y - x1/(y1+1) = (x+x*y1-x1*y)/(y*(y1+1)) // = (x+x0*y1-x1*y0)/(y*(y1+1)) <= (x+x0*y1)/(y*(y1+1)) // <= x/(y*(y1+1)) + x0/y // <= 2^(2n)/(2^(n+k-1)*(2^(n-1)+1)) + 2^k/2^(n+k-1) // = 2^(n-k+1)/(2^(n-1)+1) + 2^(1-n) <= 2^n/(2^(n-1)+1) + 2^(1-n) < 2 ) // gilt floor(x1/(y1+1)) <= floor(x/y) <= floor(x1/(y1+1)) + 2 . // Man bildet also q:=floor(x1/(y1+1)) (ein Shift um n Bit oder // eine (2n)-durch-n-Bit-Division, mit Ergebnis q <= floor(x/y) < beta) // und x-q*y und muß hiervon noch höchstens 2 mal y abziehen und q // incrementieren, um den Quotienten q = floor(x/y) und den Rest // x-floor(x/y)*y der Division zu bekommen. #define divu_3232_3232(x,y,q_zuweisung,r_zuweisung) \ { var uint32 _x = (x); \ var uint32 _y = (y); \ if (_y <= (uint32)(bit(16)-1)) \ { var uint16 _q1; \ var uint16 _q0; \ var uint16 _r1; \ divu_3216_1616(high16(_x),_y, _q1 = , _r1 = ); \ divu_3216_1616(highlow32(_r1,low16(_x)),_y, _q0 = , r_zuweisung); \ q_zuweisung highlow32(_q1,_q0); \ } \ else \ { var uint32 _x1 = _x; /* x1 := x */ \ var uint32 _y1 = _y; /* y1 := y */ \ var uint16 _q; \ do { _x1 = floor(_x1,2); _y1 = floor(_y1,2); } /* k erhöhen */\ until (_y1 <= (uint32)(bit(16)-1)); /* bis y1 < beta */ \ { var uint16 _y2 = low16(_y1)+1; /* y1+1 bilden */ \ if (_y2==0) \ { _q = high16(_x1); } /* y1+1=beta -> ein Shift */ \ else \ { divu_3216_1616(_x1,_y2,_q=,); } /* Division von x1 durch y1+1 */\ } \ /* _q = q = floor(x1/(y1+1)) */ \ /* x-q*y bilden (eine 16-mal-32-Bit-Multiplikation ohne Überlauf): */\ _x -= highlow32_0(mulu16(_q,high16(_y))); /* q * high16(y) * beta */\ /* gefahrlos, da q*high16(y) <= q*y/beta <= x/beta < beta */ \ _x -= mulu16(_q,low16(_y)); /* q * low16(y) */ \ /* gefahrlos, da q*high16(y)*beta + q*low16(y) = q*y <= x */ \ /* Noch höchstens 2 mal y abziehen: */ \ if (_x >= _y) \ { _q += 1; _x -= _y; \ if (_x >= _y) \ { _q += 1; _x -= _y; } \ } \ r_zuweisung _x; \ q_zuweisung (uint32)(_q); \ } } #define NEED_FUNCTION_divu_3232_3232_ #endif // Dividiert eine 64-Bit-Zahl durch eine 32-Bit-Zahl und // liefert einen 32-Bit-Quotienten und einen 32-Bit-Rest. // divu_6432_3232(xhi,xlo,y,q=,r=); // > uint32 xhi,xlo: x = 2^32*xhi+xlo = Zähler // > uint32 y: Nenner // > Es sei bekannt, daß 0 <= x < 2^32*y . // < uint32 q: floor(x/y) // < uint32 r: x mod y // < x = q*y+r extern "C" uint32 divu_6432_3232_ (uint32 xhi, uint32 xlo, uint32 y); // -> Quotient q #ifdef _MSC_VER // Workaround MSVC compiler bug. } extern "C" uint32 divu_32_rest; namespace cln { // -> Rest r #else extern "C" uint32 divu_32_rest; // -> Rest r #endif #if defined(__GNUC__) && defined(__m68k__) && !defined(NO_ASM) #define divu_6432_3232(xhi,xlo,y,q_zuweisung,r_zuweisung) \ ({var uint32 __xhi = (xhi); \ var uint32 __xlo = (xlo); \ var uint32 __y = (y); \ var uint32 __q; \ var uint32 __r; \ __asm__ __volatile__ (" \ divul %4,%1:%0 \ " : "=d" (__q), "=d" (__r) : "1" (__xhi), "0" (__xlo), "dm" (__y)); \ q_zuweisung __q; \ r_zuweisung __r; \ }) #define divu_6432_3232_(xhi,xlo,y) \ ({var uint32 ___q; divu_6432_3232(xhi,xlo,y,___q=,); ___q; }) #elif defined(__GNUC__) && defined(__sparc64__) && !defined(NO_ASM) #define divu_6432_3232(xhi,xlo,y,q_zuweisung,r_zuweisung) \ ({var uint32 __xhi = (xhi); \ var uint32 __xlo = (xlo); \ var uint32 __y = (y); \ var uint64 __q; \ var uint64 __r; \ __asm__ __volatile__ ( \ "wr %2,%%g0,%%y\n\t" \ "udiv %3,%4,%0\n\t" \ "umul %0,%4,%1\n\t" \ "sub %3,%1,%1" \ : "=&r" (__q), "=&r" (__r) \ : "r" (__xhi), "r" (__xlo), "r" (__y)); \ q_zuweisung (uint32)__q; \ r_zuweisung (uint32)__r; \ }) #elif defined(__GNUC__) && (defined(__sparc__) || defined(__sparc64__)) && !defined(NO_ASM) #define divu_6432_3232(xhi,xlo,y,q_zuweisung,r_zuweisung) \ ({ var uint32 _q = divu_6432_3232_(xhi,xlo,y); /* extern in Assembler */\ var register uint32 _r __asm__("%g1"); \ q_zuweisung _q; r_zuweisung _r; \ }) #elif defined(__GNUC__) && defined(__arm__) && 0 // see comment cl_asm_arm.cc #define divu_6432_3232(xhi,xlo,y,q_zuweisung,r_zuweisung) \ ({ var uint32 _q = divu_6432_3232_(xhi,xlo,y); /* extern in Assembler */\ var register uint32 _r __asm__("%r1"/*"%a2"*/); \ q_zuweisung _q; r_zuweisung _r; \ }) #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && !defined(NO_ASM) #define divu_6432_3232(xhi,xlo,y,q_zuweisung,r_zuweisung) \ ({var uint32 __xhi = (xhi); \ var uint32 __xlo = (xlo); \ var uint32 __y = (y); \ var uint32 __q; \ var uint32 __r; \ __asm__ __volatile__ ( \ "divl %4" \ : "=a" /* %eax */ (__q), "=d" /* %edx */ (__r) \ : "1" /* %edx */ (__xhi), "0" /* %eax */ (__xlo), "rm" (__y) \ ); \ q_zuweisung __q; \ r_zuweisung __r; \ }) #define divu_6432_3232_(xhi,xlo,y) \ ({var uint32 ___q; divu_6432_3232(xhi,xlo,y,___q=,); ___q; }) #elif defined(__GNUC__) && defined(HAVE_LONGLONG) && !defined(__arm__) #define divu_6432_3232(xhi,xlo,y,q_zuweisung,r_zuweisung) \ ({var uint32 __xhi = (xhi); \ var uint32 __xlo = (xlo); \ var uint64 __x = ((uint64)__xhi << 32) | (uint64)__xlo; \ var uint32 __y = (y); \ var uint32 __q = floor(__x,(uint64)__y); \ q_zuweisung __q; r_zuweisung __xlo - __q * __y; \ }) #define divu_6432_3232_(xhi,xlo,y) \ ({var uint32 ___q; divu_6432_3232(xhi,xlo,y,___q=,); ___q; }) #elif defined(WATCOM) && defined(__i386__) && !defined(NO_ASM) #define divu_6432_3232(xhi,xlo,y,q_zuweisung,r_zuweisung) \ { var uint32 __xhi = (xhi); \ var uint32 __xlo = (xlo); \ var uint32 __y = (y); \ var uint32 __q; \ var uint32 __r; \ __q = divu_6432_3232_(__xhi,__xlo,__y); __r = divu_6432_3232_rest(); \ q_zuweisung __q; \ r_zuweisung __r; \ } extern "C" uint32 divu_6432_3232_rest (void); #pragma aux divu_6432_3232_ = 0xF7 0xF1 /* divl %ecx */ parm [edx] [eax] [ecx] value [eax] modify [eax edx]; #pragma aux divu_6432_3232_rest = /* */ value [edx] modify []; #else #define divu_6432_3232(xhi,xlo,y,q_zuweisung,r_zuweisung) \ { q_zuweisung divu_6432_3232_(xhi,xlo,y); r_zuweisung divu_32_rest; } #if (defined(__m68k__) || defined(__sparc__) || defined(__sparc64__) || defined(__arm__) || (defined(__i386__) && !defined(WATCOM) && !defined(MICROSOFT)) || defined(__x86_64__) || defined(__hppa__)) && !defined(NO_ASM) // divu_6432_3232_ extern in Assembler #if defined(__sparc__) || defined(__sparc64__) extern "C" uint32 _get_g1 (void); #define divu_32_rest (_get_g1()) // Rückgabe im Register %g1 #else #define NEED_VAR_divu_32_rest #endif #else #define NEED_FUNCTION_divu_6432_3232_ #endif #endif #ifdef HAVE_FAST_LONGLONG // Dividiert eine 64-Bit-Zahl durch eine 32-Bit-Zahl und // liefert einen 32-Bit-Quotienten und einen 32-Bit-Rest. // divu_6432_3232_w(x,y,q=,r=); // > uint64 x: Zähler // > uint32 y: Nenner // > Es sei bekannt, daß 0 <= x < 2^32*y . // < uint32 q: floor(x/y) // < uint32 r: x mod y // < x = q*y+r #if defined(__GNUC__) && defined(__sparc64__) && !defined(NO_ASM) // Prefer the udiv and umul instructions over the udivx and mulx instructions // (overkill). #define divu_6432_3232_w(x,y,q_zuweisung,r_zuweisung) \ ({var uint64 __x = (x); \ var uint32 __xhi = high32(__x); \ var uint32 __xlo = low32(__x); \ var uint32 __y = (y); \ var uint64 __q; \ var uint64 __r; \ __asm__ __volatile__ ( \ "wr %2,%%g0,%%y\n\t" \ "udiv %3,%4,%0\n\t" \ "umul %0,%4,%1\n\t" \ "sub %3,%1,%1" \ : "=&r" (__q), "=&r" (__r) \ : "r" (__xhi), "r" (__xlo), "r" (__y)); \ q_zuweisung (uint32)__q; \ r_zuweisung (uint32)__r; \ }) #elif defined(__GNUC__) && (defined(__alpha__) || defined(__ia64__) || defined(__mips64__) || defined(__sparc64__)) // On __alpha__, computing the remainder by multiplication is just two // instructions, compared to the __remqu (libc) function call for the % // operator. // On __ia64__, computing the remainder by multiplication is just four // instructions, compared to the __umoddi3 (libgcc) function call for the % // operator. // On __mips64__, computing the remainder by multiplication is just two // instructions, compared to the __umoddi3 (libgcc) function call for the % // operator. // On __sparc64__, computing the remainder by multiplication uses a 32-bit // multiplication instruction, compared to a 64-bit multiplication when the % // operator is used. #define divu_6432_3232_w(x,y,q_zuweisung,r_zuweisung) \ ({var uint64 __x = (x); \ var uint32 __y = (y); \ var uint32 __q = floor(__x,(uint64)__y); \ q_zuweisung __q; r_zuweisung (uint32)__x - __q * __y; \ }) #elif defined(__GNUC__) && defined(__x86_64__) // On __x86_64__, gcc 4.0 performs both quotient and remainder computation // in a single instruction. #define divu_6432_3232_w(x,y,q_zuweisung,r_zuweisung) \ ({var uint64 __x = (x); \ var uint32 __y = (y); \ var uint32 __q = floor(__x,(uint64)__y); \ q_zuweisung __q; r_zuweisung __x % (uint64)__y; \ }) #else #define divu_6432_3232_w(x,y,q_zuweisung,r_zuweisung) \ { var uint64 __x = (x); \ divu_6432_3232(high32(__x),low32(__x),(y),q_zuweisung,r_zuweisung); \ } #endif // Dividiert eine 64-Bit-Zahl durch eine 32-Bit-Zahl und // liefert einen 64-Bit-Quotienten und einen 32-Bit-Rest. // divu_6432_6432(x,y,q=,r=); // > uint64 x: Zähler // > uint32 y: Nenner // > Es sei bekannt, daß y>0. // < uint64 q: floor(x/y) // < uint32 r: x mod y // < x = q*y+r #if defined(__GNUC__) && (defined(__alpha__) || defined(__ia64__) || defined(__mips64__) || defined(__sparc64__)) // On __alpha__, computing the remainder by multiplication is just two // instructions, compared to the __remqu (libc) function call for the % // operator. // On __ia64__, computing the remainder by multiplication is just four // instructions, compared to the __umoddi3 (libgcc) function call for the % // operator. // On __mips64__, computing the remainder by multiplication is just two // instructions, compared to the __umoddi3 (libgcc) function call for the % // operator. // On __sparc64__, computing the remainder by multiplication uses a 32-bit // multiplication instruction, compared to a 64-bit multiplication when the % // operator is used. #define divu_6432_6432(x,y,q_zuweisung,r_zuweisung) \ ({var uint64 _x = (x); \ var uint32 _y = (y); \ var uint64 _q; \ q_zuweisung _q = floor(_x,(uint64)_y); \ r_zuweisung low32(_x) - low32(_q) * _y; \ }) #elif defined(__GNUC__) && defined(__x86_64__) // On __x86_64__, gcc 4.0 performs both quotient and remainder computation // in a single instruction. #define divu_6432_6432(x,y,q_zuweisung,r_zuweisung) \ ({var uint64 _x = (x); \ var uint32 _y = (y); \ q_zuweisung floor(_x,(uint64)_y); \ r_zuweisung _x % (uint64)_y; \ }) #else // Methode: (beta = 2^32) // x = x1*beta+x0 schreiben. // Division mit Rest: x1 = q1*y + r1, wobei 0 <= x1 < beta <= beta*y. // Also 0 <= q1 < beta, 0 <= r1 < y. // Division mit Rest: (r1*beta+x0) = q0*y + r0, wobei 0 <= r1*beta+x0 < beta*y. // Also 0 <= q0 < beta, 0 <= r0 < y // und x = x1*beta+x0 = (q1*beta+q0)*y + r0. // Setze q := q1*beta+q0 und r := r0. #if defined(__GNUC__) #define divu_6432_6432(x,y,q_zuweisung,r_zuweisung) \ ({var uint64 _x = (x); \ var uint32 _y = (y); \ var uint32 _q1; \ var uint32 _q0; \ var uint32 _r1; \ divu_6432_3232(0,high32(_x),_y, _q1 = , _r1 = ); \ divu_6432_3232(_r1,low32(_x),_y, _q0 = , r_zuweisung); \ q_zuweisung highlow64(_q1,_q0); \ }) #else #define divu_6432_6432(x,y,q_zuweisung,r_zuweisung) \ {var uint64 _x = (x); \ var uint32 _y = (y); \ var uint32 _q1; \ var uint32 _q0; \ var uint32 _r1; \ divu_6432_3232(0,high32(_x),_y, _q1 = , _r1 = ); \ divu_6432_3232(_r1,low32(_x),_y, _q0 = , r_zuweisung); \ q_zuweisung highlow64(_q1,_q0); \ } #endif #endif // Dividiert eine 64-Bit-Zahl durch eine 64-Bit-Zahl und // liefert einen 64-Bit-Quotienten und einen 64-Bit-Rest. // divu_6464_6464(x,y,q=,r=); // > uint64 x: Zähler // > uint64 y: Nenner // > Es sei bekannt, daß y>0. // < uint64 q: floor(x/y) // < uint64 r: x mod y // < x = q*y+r #if defined(__GNUC__) && (defined(__alpha__) || defined(__ia64__) || defined(__mips64__) || defined(__sparc64__)) // On __alpha__, computing the remainder by multiplication is just two // instructions, compared to the __remqu (libc) function call for the % // operator. // On __ia64__, computing the remainder by multiplication is just four // instructions, compared to the __umoddi3 (libgcc) function call for the % // operator. // On __mips64__, computing the remainder by multiplication is just two // instructions, compared to the __umoddi3 (libgcc) function call for the % // operator. // On __sparc64__, it doesn't matter. #define divu_6464_6464(x,y,q_zuweisung,r_zuweisung) \ ({var uint64 _x = (x); \ var uint64 _y = (y); \ var uint64 _q; \ q_zuweisung _q = floor(_x,_y); \ r_zuweisung _x - _q * _y; \ }) #elif defined(__GNUC__) && (defined(__sparc64__) || defined(__x86_64__)) // On __sparc64__, it doesn't matter. // On __x86_64__, gcc 4.0 performs both quotient and remainder computation // in a single instruction. #define divu_6464_6464(x,y,q_zuweisung,r_zuweisung) \ ({var uint64 _x = (x); \ var uint64 _y = (y); \ q_zuweisung floor(_x,_y); \ r_zuweisung _x % _y; \ }) #else // For unknown CPUs, we don't know whether gcc's __udivdi3 function plus a // multiplication is slower or faster than our own divu_6464_6464_ routine. // Anyway, call our own routine. extern "C" uint64 divu_6464_6464_ (uint64 x, uint64 y); // -> Quotient q #ifdef _MSC_VER // Workaround MSVC compiler bug. } extern "C" uint64 divu_64_rest; namespace cln { // -> Rest r #else extern "C" uint64 divu_64_rest; // -> Rest r #endif #define divu_6464_6464(x,y,q_zuweisung,r_zuweisung) \ { q_zuweisung divu_6464_6464_(x,y); r_zuweisung divu_64_rest; } #define NEED_VAR_divu_64_rest #define NEED_FUNCTION_divu_6464_6464_ #endif // Dividiert eine 128-Bit-Zahl durch eine 64-Bit-Zahl und // liefert einen 64-Bit-Quotienten und einen 64-Bit-Rest. // divu_12864_6464(xhi,xlo,y,q=,r=); // > uint64 xhi,xlo: x = 2^64*xhi+xlo = Zähler // > uint64 y: Nenner // > Es sei bekannt, daß 0 <= x < 2^64*y . // < uint64 q: floor(x/y) // < uint64 r: x mod y // < x = q*y+r extern "C" uint64 divu_12864_6464_ (uint64 xhi, uint64 xlo, uint64 y); // -> Quotient q #ifdef _MSC_VER // Workaround MSVC compiler bug. } extern "C" uint64 divu_64_rest; namespace cln { // -> Rest r #else extern "C" uint64 divu_64_rest; // -> Rest r #endif #if defined(__GNUC__) && defined(__x86_64__) && !defined(NO_ASM) #define divu_12864_6464(xhi,xlo,y,q_zuweisung,r_zuweisung) \ ({var uint64 __xhi = (xhi); \ var uint64 __xlo = (xlo); \ var uint64 __y = (y); \ var uint64 __q; \ var uint64 __r; \ __asm__ __volatile__ ( \ "divq %4" \ : "=a" /* %rax */ (__q), "=d" /* %rdx */ (__r) \ : "1" /* %rdx */ (__xhi), "0" /* %rax */ (__xlo), "rm" (__y) \ ); \ q_zuweisung __q; \ r_zuweisung __r; \ }) #define divu_12864_64364_(xhi,xlo,y) \ ({var uint64 ___q; divu_12864_6464(xhi,xlo,y,___q=,); ___q; }) #else #define divu_12864_6464(xhi,xlo,y,q_zuweisung,r_zuweisung) \ { q_zuweisung divu_12864_6464_(xhi,xlo,y); r_zuweisung divu_64_rest; } #define NEED_VAR_divu_64_rest #define NEED_FUNCTION_divu_12864_6464_ #endif #endif /* HAVE_FAST_LONGLONG */ // Zieht die Ganzzahl-Wurzel aus einer 32-Bit-Zahl und // liefert eine 16-Bit-Wurzel und einen Rest. // isqrt_32_16(x,y=,sqrtp=); // > uint32 x: Radikand, >= 2^30, < 2^32 // < uint16 y: floor(sqrt(x)), >= 2^15, < 2^16 // < boolean sqrtp: /=0, falls x=y^2 // Methode: // y := 2^16 als Anfangswert, // y := floor((y + floor(x/y))/2) als nächster Wert, // solange z := floor(x/y) < y, setze y := floor((y+z)/2). // y ist fertig; x=y^2 genau dann, wenn z=y und die letzte Division aufging. // (Beweis: // 1. Die Folge der y ist streng monoton fallend. // 2. Stets gilt y >= floor(sqrt(x)) (denn für alle y>0 ist // y + x/y >= 2*sqrt(x) und daher floor((y + floor(x/y))/2) = // floor(y/2 + x/(2*y)) >= floor(sqrt(x)) ). // 3. Am Schluß gilt x >= y^2. // ) #define isqrt_32_16(x,y_zuweisung,sqrtp_zuweisung) \ { var uint32 _x = (x); \ var uint16 _x1 = high16(_x); \ var uint16 _y = floor(_x1,2) | bit(16-1); \ loop \ { var uint16 _z; \ var uint16 _r; \ if (_x1 >= _y) /* Division _x/_y ergäbe Überlauf -> _z > _y */\ { unused (sqrtp_zuweisung FALSE); break; } \ divu_3216_1616(_x,_y, _z=,_r=); /* Dividiere _x/_y */ \ if (_z >= _y) \ { unused (sqrtp_zuweisung (_z == _y) && (_r == 0)); break; } \ _y = floor((uint16)(_z+_y),2) | bit(16-1); /* _y muß >= 2^15 bleiben */\ } \ y_zuweisung _y; \ } // Zieht die Ganzzahl-Wurzel aus einer 64-Bit-Zahl und // liefert eine 32-Bit-Wurzel und einen Rest. // isqrt_64_32(xhi,xlo,y=,sqrtp=); // > uint32 xhi,xlo: Radikand x = 2^32*xhi+xlo, >= 2^62, < 2^64 // < uint32 y: floor(sqrt(x)), >= 2^31, < 2^32 // < boolean sqrtp: /=0, falls x=y^2 #if defined(__sparc__) || defined(__sparc64__) || defined(__m68k__) || defined(__hppa__) // Methode: // y := 2^32 als Anfangswert, // y := floor((y + floor(x/y))/2) als nächster Wert, // solange z := floor(x/y) < y, setze y := floor((y+z)/2). // y ist fertig; x=y^2 genau dann, wenn z=y und die letzte Division aufging. // (Beweis: // 1. Die Folge der y ist streng monoton fallend. // 2. Stets gilt y >= floor(sqrt(x)) (denn für alle y>0 ist // y + x/y >= 2*sqrt(x) und daher floor((y + floor(x/y))/2) = // floor(y/2 + x/(2*y)) >= floor(sqrt(x)) ). // 3. Am Schluß gilt x >= y^2. // ) #define isqrt_64_32(xhi,xlo,y_zuweisung,sqrtp_zuweisung) \ { var uint32 _xhi = (xhi); \ var uint32 _xlo = (xlo); \ var uint32 _y = floor(_xhi,2) | bit(32-1); \ loop \ { var uint32 _z; \ var uint32 _rest; \ if (_xhi >= _y) /* Division _x/_y ergäbe Überlauf -> _z > _y */\ { sqrtp_zuweisung FALSE; break; } \ divu_6432_3232(_xhi,_xlo,_y, _z=,_rest=); /* Dividiere _x/_y */\ if (_z >= _y) \ { sqrtp_zuweisung (_z == _y) && (_rest == 0); break; } \ _y = floor(_z+_y,2) | bit(32-1); /* _y muß >= 2^31 bleiben */ \ } \ y_zuweisung _y; \ } #else // Methode: // Wie bei UDS_sqrt mit n=2. // y = 2^16*yhi + ylo ansetzen. // Dann muß // yhi = floor(y/2^16) = floor(floor(sqrt(x))/2^16) // = floor(sqrt(x)/2^16) = floor(sqrt(x/2^32)) = isqrt(xhi) // sein. Es folgt yhi >= 2^15. // Danach sucht man das größte ylo >=0 mit // x - 2^32*yhi^2 >= 2*2^16*yhi*ylo + ylo^2. // Dazu setzen wir xhi*2^32+xlo := x - 2^32*yhi^2 // (also xhi := xhi - yhi^2, das ist >=0, <=2*yhi). // Die Schätzung für die zweite Ziffer // ylo' := min(2^16-1,floor((xhi*2^32+xlo)/(2*2^16*yhi))) // erfüllt ylo'-1 <= ylo <= ylo', ist also um höchstens 1 zu groß. // (Beweis: Rechte Ungleichung klar, da ylo < 2^16 und // xhi*2^32+xlo >= 2*2^16*yhi*ylo + ylo^2 >= 2*2^16*yhi*ylo // ==> (xhi*2^32+xlo)/(2*2^16*yhi) >= ylo gelten muß. // Linke Ungleichung: Falls floor(...)>=2^16, ist // xhi*2^32+xlo >= 2*2^16*2^16*yhi >= 2*2^16*yhi*(2^16-1) + 2^32 // >= 2*2^16*yhi*(2^16-1) + (2^16-1)^2 // und xhi*2^32+xlo < 2*2^16*2^16*yhi + (2^16)^2, also // ylo = 2^16-1 = ylo'. // Sonst ist ylo' = floor((xhi*2^32+xlo)/(2*2^16*yhi)), also // xhi*2^32+xlo >= 2*2^16*yhi*ylo' >= 2*2^16*yhi*(ylo'-1) + 2^32 // >= 2*2^16*yhi*(ylo'-1) + (ylo'-1)^2, // also ylo >= ylo'-1 nach Definition von ylo.) #define isqrt_64_32(xhi,xlo,y_zuweisung,sqrtp_zuweisung) \ { var uint32 _xhi = (xhi); \ var uint32 _xlo = (xlo); \ var uint16 _yhi; \ var uint16 _ylo; \ /* erste Ziffer berechnen: */ \ isqrt_32_16(_xhi,_yhi=,); /* yhi := isqrt(xhi) */ \ _xhi -= mulu16(_yhi,_yhi); /* jetzt 0 <= xhi <= 2*yhi */ \ /* x = 2^32*yhi^2 + 2^32*xhi + xlo */ \ /* Schätzung für die zweite Ziffer berechnen: */ \ /* ylo := min(2^16-1,floor((xhi*2^32+xlo)/(2*2^16*yhi))) bilden: */\ {var uint32 _z = (_xhi << 15) | (_xlo >> 17); /* < 2^15*(2*yhi+1) */\ var uint32 _r = highlow32_0(_yhi); \ if (_z >= _r) \ { _ylo = bit(16)-1; _r = _z - _r + (uint32)_yhi; } \ else \ { divu_3216_1616(_z,_yhi, _ylo=,_r=); } \ /* x = 2^32*yhi^2 + 2*2^16*yhi*ylo + 2^17*r + (xlo mod 2^17), */ \ /* 0 <= r < yhi + 2^15 */ \ _xlo = (_r << 17) | (_xlo & (bit(17)-1)); \ /* x = 2^32*yhi^2 + 2*2^16*yhi*ylo + 2^32*floor(r/2^15) + xlo */ \ _z = mulu16(_ylo,_ylo); /* z = ylo^2 */ \ /* Versuche vom Rest 2^32*floor(r/2^15) + xlo z zu subtrahieren. */\ /* Falls Rest >= z (d.h. r>=2^15 oder xlo>=z), ist ylo fertig, */ \ /* und es gilt x=y^2 genau dann, wenn r<2^15 und xlo=z. */ \ /* Sonst (d.h. r<2^15 und xlo= 2^32 > z, also x>y^2. */\ if (_r < bit(15)) \ { if (_xlo < _z) \ { _ylo -= 1; sqrtp_zuweisung FALSE; } \ else \ { sqrtp_zuweisung (_xlo == _z); } \ } \ else \ { sqrtp_zuweisung FALSE; } \ y_zuweisung highlow32(_yhi,_ylo); \ }} #endif #ifdef HAVE_FAST_LONGLONG // Zieht die Ganzzahl-Wurzel aus einer 128-Bit-Zahl und // liefert eine 64-Bit-Wurzel und einen Rest. // isqrt_128_64(xhi,xlo,y=,sqrtp=); // > uint64 xhi,xlo: Radikand x = 2^64*xhi+xlo, >= 2^126, < 2^128 // < uint64 y: floor(sqrt(x)), >= 2^63, < 2^64 // < boolean sqrtp: /=0, falls x=y^2 // Methode: // Wie bei UDS_sqrt mit n=2. // y = 2^32*yhi + ylo ansetzen. // Dann muß // yhi = floor(y/2^32) = floor(floor(sqrt(x))/2^32) // = floor(sqrt(x)/2^32) = floor(sqrt(x/2^64)) = isqrt(xhi) // sein. Es folgt yhi >= 2^31. // Danach sucht man das größte ylo >=0 mit // x - 2^64*yhi^2 >= 2*2^32*yhi*ylo + ylo^2. // Dazu setzen wir xhi*2^64+xlo := x - 2^64*yhi^2 // (also xhi := xhi - yhi^2, das ist >=0, <=2*yhi). // Die Schätzung für die zweite Ziffer // ylo' := min(2^32-1,floor((xhi*2^64+xlo)/(2*2^32*yhi))) // erfüllt ylo'-1 <= ylo <= ylo', ist also um höchstens 1 zu groß. // (Beweis: Rechte Ungleichung klar, da ylo < 2^32 und // xhi*2^64+xlo >= 2*2^32*yhi*ylo + ylo^2 >= 2*2^32*yhi*ylo // ==> (xhi*2^64+xlo)/(2*2^32*yhi) >= ylo gelten muß. // Linke Ungleichung: Falls floor(...)>=2^32, ist // xhi*2^64+xlo >= 2*2^32*2^32*yhi >= 2*2^32*yhi*(2^32-1) + 2^64 // >= 2*2^32*yhi*(2^32-1) + (2^32-1)^2 // und xhi*2^64+xlo < 2*2^32*2^32*yhi + (2^32)^2, also // ylo = 2^32-1 = ylo'. // Sonst ist ylo' = floor((xhi*2^64+xlo)/(2*2^32*yhi)), also // xhi*2^64+xlo >= 2*2^32*yhi*ylo' >= 2*2^32*yhi*(ylo'-1) + 2^64 // >= 2*2^32*yhi*(ylo'-1) + (ylo'-1)^2, // also ylo >= ylo'-1 nach Definition von ylo.) #define isqrt_128_64(x_hi,x_lo,y_zuweisung,sqrtp_zuweisung) \ { var uint64 xhi = (x_hi); \ var uint64 xlo = (x_lo); \ var uint32 yhi; \ var uint32 ylo; \ /* erste Ziffer berechnen: */ \ isqrt_64_32(high32(xhi),low32(xhi),yhi=,); /* yhi := isqrt(xhi) */\ xhi -= mulu32_w(yhi,yhi); /* jetzt 0 <= xhi <= 2*yhi */ \ /* x = 2^64*yhi^2 + 2^64*xhi + xlo */ \ /* Schätzung für die zweite Ziffer berechnen: */ \ /* ylo := min(2^32-1,floor((xhi*2^64+xlo)/(2*2^32*yhi))) bilden: */\ {var uint64 z = (xhi << 31) | (xlo >> 33); /* < 2^31*(2*yhi+1) */ \ var uint64 r = highlow64_0(yhi); \ if (z >= r) \ { ylo = bit(32)-1; r = z - r + (uint64)yhi; } \ else \ { divu_6432_3232_w(z,yhi, ylo=,r=); } \ /* x = 2^64*yhi^2 + 2*2^32*yhi*ylo + 2^33*r + (xlo mod 2^33), */ \ /* 0 <= r < yhi + 2^31 */ \ xlo = (r << 33) | (xlo & (bit(33)-1)); \ /* x = 2^64*yhi^2 + 2*2^32*yhi*ylo + 2^64*floor(r/2^31) + xlo */ \ z = mulu32_w(ylo,ylo); /* z = ylo^2 */ \ /* Versuche vom Rest 2^64*floor(r/2^31) + xlo z zu subtrahieren. */\ /* Falls Rest >= z (d.h. r>=2^31 oder xlo>=z), ist ylo fertig, */ \ /* und es gilt x=y^2 genau dann, wenn r<2^31 und xlo=z. */ \ /* Sonst (d.h. r<2^31 und xlo= 2^64 > z, also x>y^2. */\ if (r < bit(31)) \ { if (xlo < z) \ { ylo -= 1; sqrtp_zuweisung FALSE; } \ else \ { sqrtp_zuweisung (xlo == z); } \ } \ else \ { sqrtp_zuweisung FALSE; } \ y_zuweisung highlow64(yhi,ylo); \ }} #endif /* HAVE_FAST_LONGLONG */ // Zieht die Ganzzahl-Wurzel aus einer 32-Bit-Zahl und // liefert eine 16-Bit-Wurzel. // isqrt(x) // > uintL x : Radikand, >=0, <2^32 // < uintL ergebnis : Wurzel, >=0, <2^16 extern uintL isqrt (uintL x); #ifdef HAVE_LONGLONG // Extracts integer root of a 64-bit number and returns a 32-bit number. // isqrt(x) // > uintQ x : radicand, >=0, <2^64 // < uintL result : square root, >=0, <2^32 extern uintL isqrt (uintQ x); #endif // Sorry for this. We need an isqrt function taking uintC arguments but we // cannot use overloading since this would lead to ambiguities with any of the // two signatures above. inline uintL isqrtC (uintC x) { #if (intCsize==32) return isqrt((uintL)x); #else return isqrt((uintQ)x); #endif } // Zieht die Ganzzahl-Wurzel aus einer 64-Bit-Zahl und // liefert eine 32-Bit-Wurzel. // isqrt(x1,x0) // > uintL2 x = x1*2^32+x0 : Radikand, >=0, <2^64 // < uintL ergebnis : Wurzel, >=0, <2^32 extern uintL isqrt (uintL x1, uintL x0); // Bits einer 8-Bit-Zahl zählen: // integerlength8(digit,size=); // setzt size auf die höchste in digit vorkommende Bitnummer. // > digit: ein uint8 >0 // < size: >0, <=8, mit 2^(size-1) <= digit < 2^size #if defined(__GNUC__) && defined(__m68k__) && !defined(NO_ASM) #define integerlength8(digit,size_zuweisung) \ { var uintL _zero_counter; /* zählt die führenden Nullbits in digit */\ __asm__("bfffo %1{#0:#8},%0" : "=d" (_zero_counter) : "dm" ((uint8)(digit)) ); \ size_zuweisung (8-_zero_counter); \ } #elif defined(__sparc__) && !defined(__sparc64__) #define integerlength8(digit,size_zuweisung) \ integerlength32((uint32)(digit),size_zuweisung) // siehe unten #elif defined(__GNUC__) && defined(__i386__) && !defined(NO_ASM) #define integerlength8(digit,size_zuweisung) \ integerlength16((uint16)(digit),size_zuweisung) #else #define integerlength8(digit,size_zuweisung) \ { var uintC _bitsize = 1; \ var uintL _x8 = (uint8)(digit); \ /* _x8 hat höchstens 8 Bits. */\ if (_x8 >= bit(4)) { _x8 = _x8>>4; _bitsize += 4; } \ /* _x8 hat höchstens 4 Bits. */\ if (_x8 >= bit(2)) { _x8 = _x8>>2; _bitsize += 2; } \ /* _x8 hat höchstens 2 Bits. */\ if (_x8 >= bit(1)) { /* _x8 = _x8>>1; */ _bitsize += 1; } \ /* _x8 hat höchstens 1 Bit. Dieses Bit muß gesetzt sein. */\ size_zuweisung _bitsize; \ } #endif // Bits einer 16-Bit-Zahl zählen: // integerlength16(digit,size=); // setzt size auf die höchste in digit vorkommende Bitnummer. // > digit: ein uint16 >0 // < size: >0, <=16, mit 2^(size-1) <= digit < 2^size #if defined(__GNUC__) && defined(__m68k__) && !defined(NO_ASM) #define integerlength16(digit,size_zuweisung) \ { var uintL _zero_counter; /* zählt die führenden Nullbits in digit */\ __asm__("bfffo %1{#0:#16},%0" : "=d" (_zero_counter) : "dm" ((uint16)(digit)) ); \ size_zuweisung (16-_zero_counter); \ } #elif defined(__sparc__) && !defined(__sparc64__) #define integerlength16(digit,size_zuweisung) \ integerlength32((uint32)(digit),size_zuweisung) // siehe unten #elif defined(__GNUC__) && defined(__i386__) && !defined(NO_ASM) #define integerlength16(digit,size_zuweisung) \ { var uintW _one_position; /* Position der führenden 1 */\ __asm__("bsrw %1,%0" : "=r" (_one_position) : "r" ((uint16)(digit)) ); \ size_zuweisung (1+_one_position); \ } // Die weiteren kommen von gcc/longlong.h : #elif defined(__GNUC__) && defined(__ibm032__) && !defined(NO_ASM) // RT/ROMP #define integerlength16(digit,size_zuweisung) \ { var uintL _zero_counter; /* zählt die führenden Nullbits in digit */\ __asm__("clz %0,%1" : "=r" (_zero_counter) : "r" ((uint32)(digit)) ); \ size_zuweisung (16-_zero_counter); \ } #else #define integerlength16(digit,size_zuweisung) \ { var uintC _bitsize = 1; \ var uintWL _x16 = (uint16)(digit); \ /* _x16 hat höchstens 16 Bits. */\ if (_x16 >= bit(8)) { _x16 = _x16>>8; _bitsize += 8; } \ /* _x16 hat höchstens 8 Bits. */\ if (_x16 >= bit(4)) { _x16 = _x16>>4; _bitsize += 4; } \ /* _x16 hat höchstens 4 Bits. */\ if (_x16 >= bit(2)) { _x16 = _x16>>2; _bitsize += 2; } \ /* _x16 hat höchstens 2 Bits. */\ if (_x16 >= bit(1)) { /* _x16 = _x16>>1; */ _bitsize += 1; } \ /* _x16 hat höchstens 1 Bit. Dieses Bit muß gesetzt sein. */\ size_zuweisung _bitsize; \ } #endif // Bits einer 32-Bit-Zahl zählen: // integerlength32(digit,size=); // setzt size auf die höchste in digit vorkommende Bitnummer. // > digit: ein uint32 >0 // < size: >0, <=32, mit 2^(size-1) <= digit < 2^size #if defined(__GNUC__) && defined(__m68k__) && !defined(NO_ASM) #define integerlength32(digit,size_zuweisung) \ { var uintL _zero_counter; /* zählt die führenden Nullbits in digit */\ __asm__("bfffo %1{#0:#32},%0" : "=d" (_zero_counter) : "dm" ((uint32)(digit)) ); \ size_zuweisung (32-_zero_counter); \ } #elif defined(__sparc__) && !defined(__sparc64__) && defined(FAST_DOUBLE) #define integerlength32(digit,size_zuweisung) \ {var union { double f; uint32 i[2]; } __fi; \ const int df_mant_len = 52; /* mantissa bits (excl. hidden bit) */\ const int df_exp_mid = 1022; /* exponent bias */ \ /* Bilde 2^52 + digit: */\ __fi.i[0] = (uint32)(df_mant_len+1+df_exp_mid) << (df_mant_len-32); /* Vorzeichen 0, Exponent 53 */\ __fi.i[1] = (digit); /* untere 32 Bits setzen (benutzt CL_CPU_BIG_ENDIAN_P !) */\ /* subtrahiere 2^52: */\ __fi.f = __fi.f - (double)(4503599627370496.0L); \ /* Hole davon den Exponenten: */\ size_zuweisung ((__fi.i[0] >> (df_mant_len-32)) - df_exp_mid); \ } #elif defined(__GNUC__) && defined(__i386__) && !defined(NO_ASM) #define integerlength32(digit,size_zuweisung) \ { var uintL _one_position; /* Position der führenden 1 */\ __asm__("bsrl %1,%0" : "=r" (_one_position) : "rm" ((uint32)(digit)) ); \ size_zuweisung (1+_one_position); \ } #elif defined(__hppa__) && !defined(NO_ASM) #define integerlength32(digit,size_zuweisung) \ size_zuweisung length32(digit); extern "C" uintL length32 (uintL digit); // extern in Assembler // Die weiteren kommen von gcc/longlong.h : #elif defined(__GNUC__) && (defined(__a29k__) || defined(___AM29K__)) && !defined(NO_ASM) #define integerlength32(digit,size_zuweisung) \ { var uintL _zero_counter; /* zählt die führenden Nullbits in digit */\ __asm__("clz %0,%1" : "=r" (_zero_counter) : "r" ((uint32)(digit)) ); \ size_zuweisung (32-_zero_counter); \ } #elif defined(__GNUC__) && defined(__gmicro__) && !defined(NO_ASM) #define integerlength32(digit,size_zuweisung) \ { var uintL _zero_counter; /* zählt die führenden Nullbits in digit */\ __asm__("bsch/1 %1,%0" : "=g" (_zero_counter) : "g" ((uint32)(digit)) ); \ size_zuweisung (32-_zero_counter); \ } #elif defined(__GNUC__) && defined(__rs6000__) && !defined(NO_ASM) #ifdef _AIX // old assembler syntax #define integerlength32(digit,size_zuweisung) \ { var uintL _zero_counter; /* zählt die führenden Nullbits in digit */\ __asm__("cntlz %0,%1" : "=r" (_zero_counter) : "r" ((uint32)(digit)) ); \ size_zuweisung (32-_zero_counter); \ } #else // new assembler syntax #define integerlength32(digit,size_zuweisung) \ { var uintL _zero_counter; /* zählt die führenden Nullbits in digit */\ __asm__("cntlzw %0,%1" : "=r" (_zero_counter) : "r" ((uint32)(digit)) ); \ size_zuweisung (32-_zero_counter); \ } #endif #elif defined(__GNUC__) && defined(__m88k__) && !defined(NO_ASM) #define integerlength32(digit,size_zuweisung) \ { var uintL _one_position; /* Position der führenden 1 */\ __asm__("ff1 %0,%1" : "=r" (_one_position) : "r" ((uint32)(digit)) ); \ size_zuweisung (1+_one_position); \ } #elif defined(__GNUC__) && defined(__ibm032__) && !defined(NO_ASM) // RT/ROMP #define integerlength32(digit,size_zuweisung) \ { var uintL _x32 = (uint32)(digit); \ if (_x32 >= bit(16)) \ { integerlength16(_x32>>16,size_zuweisung 16 + ); } \ else \ { integerlength16(_x32,size_zuweisung); } \ } #else #define integerlength32(digit,size_zuweisung) \ { var uintC _bitsize = 1; \ var uintL _x32 = (uint32)(digit); \ /* _x32 hat höchstens 32 Bits. */\ if (_x32 >= bit(16)) { _x32 = _x32>>16; _bitsize += 16; } \ /* _x32 hat höchstens 16 Bits. */\ if (_x32 >= bit(8)) { _x32 = _x32>>8; _bitsize += 8; } \ /* _x32 hat höchstens 8 Bits. */\ if (_x32 >= bit(4)) { _x32 = _x32>>4; _bitsize += 4; } \ /* _x32 hat höchstens 4 Bits. */\ if (_x32 >= bit(2)) { _x32 = _x32>>2; _bitsize += 2; } \ /* _x32 hat höchstens 2 Bits. */\ if (_x32 >= bit(1)) { /* _x32 = _x32>>1; */ _bitsize += 1; } \ /* _x32 hat höchstens 1 Bit. Dieses Bit muß gesetzt sein. */\ size_zuweisung _bitsize; \ } #define GENERIC_INTEGERLENGTH32 #endif // Bits einer 64-Bit-Zahl zählen: // integerlength64(digit,size=); // setzt size auf die höchste in digit vorkommende Bitnummer. // > digit: ein uint64 >0 // < size: >0, <=64, mit 2^(size-1) <= digit < 2^size #ifdef GENERIC_INTEGERLENGTH32 #define integerlength64(digit,size_zuweisung) \ { var uintC _bitsize = 1; \ var uint64 _x64 = (uint64)(digit); \ /* _x64 hat höchstens 64 Bits. */\ if (_x64 >= bit(32)) { _x64 = _x64>>32; _bitsize += 32; } \ /* _x64 hat höchstens 32 Bits. */\ if (_x64 >= bit(16)) { _x64 = _x64>>16; _bitsize += 16; } \ /* _x64 hat höchstens 16 Bits. */\ if (_x64 >= bit(8)) { _x64 = _x64>>8; _bitsize += 8; } \ /* _x64 hat höchstens 8 Bits. */\ if (_x64 >= bit(4)) { _x64 = _x64>>4; _bitsize += 4; } \ /* _x64 hat höchstens 4 Bits. */\ if (_x64 >= bit(2)) { _x64 = _x64>>2; _bitsize += 2; } \ /* _x64 hat höchstens 2 Bits. */\ if (_x64 >= bit(1)) { /* _x64 = _x64>>1; */ _bitsize += 1; } \ /* _x64 hat höchstens 1 Bit. Dieses Bit muß gesetzt sein. */\ size_zuweisung _bitsize; \ } #else #define integerlength64(digit,size_zuweisung) \ { var uint64 _x64 = (digit); \ var uintC _bitsize64 = 0; \ var uint32 _x32_from_integerlength64; \ if (_x64 >= (1ULL << 32)) { \ _x32_from_integerlength64 = _x64>>32; _bitsize64 += 32; \ } else { \ _x32_from_integerlength64 = _x64; \ } \ integerlength32(_x32_from_integerlength64, size_zuweisung _bitsize64 + ); \ } #endif // Bits einer uintC-Zahl zählen: // integerlengthC(digit,size=); // setzt size auf die höchste in digit vorkommende Bitnummer. // > digit: ein uintC >0 // < size: >0, <=intCsize, mit 2^(size-1) <= digit < 2^size #if (intCsize==32) #define integerlengthC integerlength32 #endif #if (intCsize==64) #define integerlengthC integerlength64 #endif // Hintere Nullbits eines 32-Bit-Wortes zählen: // ord2_32(digit,count=); // setzt size auf die kleinste in digit vorkommende Bitnummer. // > digit: ein uint32 >0 // < count: >=0, <32, mit 2^count | digit, digit/2^count ungerade #if defined(__GNUC__) && defined(__i386__) && !defined(NO_ASM) #define ord2_32(digit,count_zuweisung) \ { var uintL _one_position; /* Position der letzten 1 */\ __asm__("bsfl %1,%0" : "=r" (_one_position) : "rm" ((uint32)(digit)) ); \ count_zuweisung _one_position; \ } #define FAST_ORD2 #elif defined(__sparc__) && !defined(__sparc64__) #define ord2_32(digit,count_zuweisung) \ { var uint32 n = (digit); \ n = n | -n; \ n = (n<<4) + n; \ n = (n<<6) + n; \ n = n - (n<<16); /* or n = n ^ (n<<16); or n = n &~ (n<<16); */ \ /* static const char ord2_tab [64] = {-1,0,1,12,2,6,-1,13,3,-1,7,-1,-1,-1,-1,14,10,4,-1,-1,8,-1,-1,25,-1,-1,-1,-1,-1,21,27,15,31,11,5,-1,-1,-1,-1,-1,9,-1,-1,24,-1,-1,20,26,30,-1,-1,-1,-1,23,-1,19,29,-1,22,18,28,17,16,-1}; */ \ /* count_zuweisung ord2_tab[n>>26]; */ \ count_zuweisung "\377\000\001\014\002\006\377\015\003\377\007\377\377\377\377\016\012\004\377\377\010\377\377\031\377\377\377\377\377\025\033\017\037\013\005\377\377\377\377\377\011\377\377\030\377\377\024\032\036\377\377\377\377\027\377\023\035\377\026\022\034\021\020"[n>>26]; \ } #define FAST_ORD2 #else // Sei n = ord2(x). Dann ist logxor(x,x-1) = 2^n + (2^n-1) = 2^(n+1)-1. // Also (ord2 x) = (1- (integer-length (logxor x (1- x)))) . #define ord2_32(digit,count_zuweisung) \ { var uint32 _digit = (digit) ^ ((digit) - 1); \ integerlength32(_digit,count_zuweisung -1 + ) \ } #endif // Hintere Nullbits eines 64-Bit-Wortes zählen: // ord2_64(digit,count=); // setzt size auf die kleinste in digit vorkommende Bitnummer. // > digit: ein uint64 >0 // < count: >=0, <64, mit 2^count | digit, digit/2^count ungerade // Sei n = ord2(x). Dann ist logxor(x,x-1) = 2^n + (2^n-1) = 2^(n+1)-1. // Also (ord2 x) = (1- (integer-length (logxor x (1- x)))) . #define ord2_64(digit,count_zuweisung) \ { var uint64 _digit = (digit) ^ ((digit) - 1); \ integerlength64(_digit,count_zuweisung -1 + ) \ } // Bits eines Wortes zählen. // logcount_NN(); // > xNN: ein uintNN // < xNN: Anzahl der darin gesetzten Bits // Bits von x8 zählen: (Input x8, Output x8) #define logcount_8() \ ( /* x8 besteht aus 8 1-Bit-Zählern (0,1). */\ x8 = (x8 & 0x55U) + ((x8 & 0xAAU) >> 1), \ /* x8 besteht aus 4 2-Bit-Zählern (0,1,2). */\ x8 = (x8 & 0x33U) + ((x8 & 0xCCU) >> 2), \ /* x8 besteht aus 2 4-Bit-Zählern (0,1,2,3,4). */\ x8 = (x8 & 0x0FU) + (x8 >> 4) \ /* x8 besteht aus 1 8-Bit-Zähler (0,...,8). */\ ) // Bits von x16 zählen: (Input x16, Output x16) #define logcount_16() \ ( /* x16 besteht aus 16 1-Bit-Zählern (0,1). */\ x16 = (x16 & 0x5555U) + ((x16 & 0xAAAAU) >> 1), \ /* x16 besteht aus 8 2-Bit-Zählern (0,1,2). */\ x16 = (x16 & 0x3333U) + ((x16 & 0xCCCCU) >> 2), \ /* x16 besteht aus 4 4-Bit-Zählern (0,1,2,3,4). */\ x16 = (x16 & 0x0F0FU) + ((x16 & 0xF0F0U) >> 4), \ /* x16 besteht aus 2 8-Bit-Zählern (0,...,8). */\ x16 = (x16 & 0x00FFU) + (x16 >> 8) \ /* x16 besteht aus 1 16-Bit-Zähler (0,...,16). */\ ) // Bits von x32 zählen: (Input x32, Output x32) #define logcount_32() \ ( /* x32 besteht aus 32 1-Bit-Zählern (0,1). */\ x32 = (x32 & 0x55555555UL) + ((x32 & 0xAAAAAAAAUL) >> 1), \ /* x32 besteht aus 16 2-Bit-Zählern (0,1,2). */\ x32 = (x32 & 0x33333333UL) + ((x32 & 0xCCCCCCCCUL) >> 2), \ /* x32 besteht aus 8 4-Bit-Zählern (0,1,2,3,4). */\ x32 = high16(x32)+low16(x32), \ /* x32 besteht aus 4 4-Bit-Zählern (0,...,8). */\ x32 = (x32 & 0x0F0FU) + ((x32 & 0xF0F0U) >> 4), \ /* x32 besteht aus 2 8-Bit-Zählern (0,...,16). */\ x32 = (x32 & 0x00FFU) + (x32 >> 8) \ /* x32 besteht aus 1 16-Bit-Zähler (0,...,32). */\ ) // Bits von x64 zählen: (Input x64, Output x64) #define logcount_64() \ ( /* x64 besteht aus 64 1-Bit-Zählern (0,1). */\ x64 = (x64 & 0x5555555555555555ULL) + ((x64 & 0xAAAAAAAAAAAAAAAAULL) >> 1),\ /* x64 besteht aus 32 2-Bit-Zählern (0,1,2). */\ x64 = (x64 & 0x3333333333333333ULL) + ((x64 & 0xCCCCCCCCCCCCCCCCULL) >> 2),\ /* x64 besteht aus 16 4-Bit-Zählern (0,1,2,3,4). */\ x64 = (uint32)(x64 + (x64 >> 32)), \ /* x64 besteht aus 8 4-Bit-Zählern (0,...,8). */\ x64 = (x64 & 0x0F0F0F0FUL) + ((x64 & 0xF0F0F0F0UL) >> 4), \ /* x64 besteht aus 4 8-Bit-Zählern (0,...,16). */\ x64 = (x64 & 0x00FF00FFU) + ((x64 & 0xFF00FF00U) >> 8), \ /* x64 besteht aus 2 16-Bit-Zählern (0,...,32). */\ x64 = (x64 & 0x0000FFFFU) + (x64 >> 16) \ /* x64 besteht aus 1 16-Bit-Zähler (0,...,64). */\ ) } // namespace cln #endif /* _CL_LOW_H */ cln-1.3.3/src/base/hash/0000755000000000000000000000000012173046176011613 5ustar cln-1.3.3/src/base/hash/cl_hashuniqweak.h0000644000000000000000000000615612034113706015130 0ustar // Weak hash tables for making objects unique #ifndef _CL_HASHUNIQWEAK_H #define _CL_HASHUNIQWEAK_H #include "base/hash/cl_hashuniq.h" namespace cln { // This is a hashuniq table in which an entry can be removed when the // value is not referenced any more. // Best example: string -> symbol uniquification. When a symbol is not // referenced any more (except from the hash table itself), the (string,symbol) // pair may be removed from the hash table. // We don't remove unused entries immediately, only when the hash table // wants to grow. This way the hash table also serves as a cache. // Requirements: // - same as for hashuniq, // - value_type must be a subclass of cl_[gc|rc][object|pointer]. // Note that since the reference counts are compared against 1, it doesn't // make sense to have more than one weak hash table for the same value_type. template struct cl_heap_weak_hashtable_uniq : public cl_heap_hashtable_uniq { // Allocation. void* operator new (size_t size) { return malloc_hook(size); } // Deallocation. void operator delete (void* ptr) { free_hook(ptr); } public: // Constructor. cl_heap_weak_hashtable_uniq () : cl_heap_hashtable_uniq () { this->_garcol_fun = garcol; } private: // Garbage collection. // Before growing the table, we check whether we can remove unused // entries. static bool garcol (cl_heap* _ht) { var cl_heap_weak_hashtable_uniq* ht = (cl_heap_weak_hashtable_uniq*)_ht; // Now ht->_garcol_fun = garcol. // It is not worth doing a garbage collection if the table // is small, say, has fewer than 100 entries. if (ht->_count < 100) return false; // Do a garbage collection. var long removed = 0; for (long i = 0; i < ht->_size; i++) if (ht->_entries[i].next >= 0) { var value_type& v = ht->_entries[i].entry.val; if (!v.pointer_p() || (v.heappointer->refcount == 1)) { // This is hairy. We remove the entry and // free the value after its refcount has // dropped to zero. But in order to protect // against too early destruction (depending on // how the C++ compiler optimizes hashkey()) // we have to temporarily increase the refcount. if (v.pointer_p()) v.inc_pointer_refcount(); ht->remove(hashkey(v)); if (v.pointer_p()) { var cl_heap* p = v.heappointer; if (!(--p->refcount == 0)) throw runtime_exception(); cl_free_heap_object(p); } removed++; } } if (removed == 0) // Unsuccessful. Let the table grow immediately. return false; else if (2*removed < ht->_count) { // Table shrank by less than a factor of 1/1.5. // Don't expand the table now, but expand it next time. ht->_garcol_fun = garcol_nexttime; return true; } else { // Table shrank much. Don't expand the table now, // and try a GC next time. return true; } } static bool garcol_nexttime (cl_heap* _ht) { var cl_heap_weak_hashtable_uniq* ht = (cl_heap_weak_hashtable_uniq*)_ht; // Now ht->_garcol_fun = garcol_nexttime. ht->_garcol_fun = garcol; return false; } }; } // namespace cln #endif /* _CL_HASHUNIQWEAK_H */ cln-1.3.3/src/base/hash/cl_rcpointer_hashweak_rcpointer.h0000644000000000000000000000303712034113706020400 0ustar // cl_rcpointer hash tables #ifndef _CL_RCPOINTER_HASHWEAK_RCPOINTER_H #define _CL_RCPOINTER_HASHWEAK_RCPOINTER_H #include "cln/object.h" #include "base/hash/cl_hash1weak.h" namespace cln { // Equality. static inline bool equal (const cl_rcpointer& x, const cl_rcpointer& y) { return (x.pointer == y.pointer); } // Hash code. Luckily objects don't move around in memory. inline unsigned long hashcode (const cl_rcpointer& x) { return (unsigned long)x.pointer; } typedef cl_htentry1 cl_htentry_from_rcpointer_to_rcpointer; typedef cl_heap_weak_hashtable_1 cl_heap_weak_hashtable_from_rcpointer_to_rcpointer; typedef _cl_hashtable_iterator cl_hashtable_from_rcpointer_to_rcpointer_iterator; struct cl_wht_from_rcpointer_to_rcpointer : public cl_rcpointer { // Constructors. cl_wht_from_rcpointer_to_rcpointer (bool (*maygc_htentry) (const cl_htentry_from_rcpointer_to_rcpointer&)); cl_wht_from_rcpointer_to_rcpointer (const cl_wht_from_rcpointer_to_rcpointer&); // Assignment operators. cl_wht_from_rcpointer_to_rcpointer& operator= (const cl_wht_from_rcpointer_to_rcpointer&); // Iterator. cl_hashtable_from_rcpointer_to_rcpointer_iterator iterator () const { return ((cl_heap_weak_hashtable_from_rcpointer_to_rcpointer*)pointer)->iterator(); } // Lookup. cl_rcpointer * get (const cl_rcpointer& x) const; // Store. void put (const cl_rcpointer& x, const cl_rcpointer& y) const; }; } // namespace cln #endif /* _CL_RCPOINTER_HASHWEAK_RCPOINTER_H */ cln-1.3.3/src/base/hash/cl_hash2.h0000644000000000000000000001523612034113706013444 0ustar // Hash tables with 2 keys and a value #ifndef _CL_HASH2_H #define _CL_HASH2_H #include "base/hash/cl_hash.h" #include "base/cl_iterator.h" namespace cln { // Requirements: // - function bool equal (key1_type,key1_type); // - function bool equal (key2_type,key2_type); // - function unsigned long hashcode (key1_type,key2_type); template struct cl_htentry2 { ALLOCATE_ANYWHERE(cl_htentry2) key1_type key1; key2_type key2; value_type val; const value_type& htvalue () { return val; } cl_htentry2 (const key1_type& k1, const key2_type& k2, const value_type& v) : key1 (k1), key2 (k2), val (v) {} #if (defined(__rs6000__) && !defined(__GNUC__)) cl_htentry2 () {} #endif }; template struct cl_heap_hashtable_2 : public cl_heap_hashtable > { protected: // Abbreviations. typedef cl_heap_hashtable > inherited; typedef typename inherited::htxentry htxentry; public: // Allocation. void* operator new (size_t size) { return malloc_hook(size); } // Deallocation. void operator delete (void* ptr) { free_hook(ptr); } public: // Lookup (htref alias gethash). // Returns a pointer which you should immediately dereference // if it is not NULL. value_type* get (const key1_type& key1, const key2_type& key2) { var long index = this->_slots[hashcode(key1,key2) % this->_modulus] - 1; while (index >= 0) { if (!(index < this->_size)) throw runtime_exception(); if (equal(key1,this->_entries[index].entry.key1) && equal(key2,this->_entries[index].entry.key2)) return &this->_entries[index].entry.val; index = this->_entries[index].next - 1; } return NULL; } // Store (htset alias puthash). void put (const key1_type& key1, const key2_type& key2, const value_type& val) { var unsigned long hcode = hashcode(key1,key2); // Search whether it is already there. { var long index = this->_slots[hcode % this->_modulus] - 1; while (index >= 0) { if (!(index < this->_size)) throw runtime_exception(); if (equal(key1,this->_entries[index].entry.key1) && equal(key2,this->_entries[index].entry.key2)) { this->_entries[index].entry.val = val; return; } index = this->_entries[index].next - 1; } } // Put it into the table. prepare_store(); var long hindex = hcode % this->_modulus; // _modulus may have changed! var long index = this->get_free_index(); new (&this->_entries[index].entry) cl_htentry2 (key1,key2,val); this->_entries[index].next = this->_slots[hindex]; this->_slots[hindex] = 1+index; this->_count++; } // Remove (htrem alias remhash). void remove (const key1_type& key1, const key2_type& key2) { var long* _index = &this->_slots[hashcode(key1,key2) % this->_modulus]; while (*_index > 0) { var long index = *_index - 1; if (!(index < this->_size)) throw runtime_exception(); if (equal(key1,this->_entries[index].entry.key1) && equal(key2,this->_entries[index].entry.key2)) { // Remove _entries[index].entry *_index = this->_entries[index].next; this->_entries[index].~htxentry(); // The entry is now free. this->put_free_index(index); // That's it. this->_count--; return; } _index = &this->_entries[index].next; } } // Iterate through the table. // No stuff should be inserted into the table during the iteration, // or you may find yourself iterating over an entry vector which has // already been freed! // ?? private: // Prepare a store operation: make sure that the free list is non-empty. // This may change the table's size! void prepare_store () { #if !(defined(__sparc__) && !defined(__GNUC__)) if (this->_freelist < -1) return; // Can we make room? if (this->_garcol_fun(this)) if (this->_freelist < -1) return; // No! Have to grow the hash table. grow(); #else // workaround Sun C++ 4.1 inline function compiler bug if (this->_freelist >= -1) { if (!this->_garcol_fun(this) || (this->_freelist >= -1)) grow(); } #endif } void grow () { var long new_size = this->_size + (this->_size >> 1) + 1; // _size*1.5 var long new_modulus = inherited::compute_modulus(new_size); var void* new_total_vector = malloc_hook(new_modulus*sizeof(long) + new_size*sizeof(htxentry)); var long* new_slots = (long*) ((char*)new_total_vector + 0); var htxentry* new_entries = (htxentry *) ((char*)new_total_vector + new_modulus*sizeof(long)); for (var long hi = new_modulus-1; hi >= 0; hi--) new_slots[hi] = 0; var long free_list_head = -1; for (var long i = new_size-1; i >= 0; i--) { new_entries[i].next = free_list_head; free_list_head = -2-i; } var htxentry* old_entries = this->_entries; for (var long old_index = 0; old_index < this->_size; old_index++) if (old_entries[old_index].next >= 0) { var key1_type& key1 = old_entries[old_index].entry.key1; var key2_type& key2 = old_entries[old_index].entry.key2; var value_type& val = old_entries[old_index].entry.val; var long hindex = hashcode(key1,key2) % new_modulus; var long index = -2-free_list_head; free_list_head = new_entries[index].next; new (&new_entries[index].entry) cl_htentry2 (key1,key2,val); new_entries[index].next = new_slots[hindex]; new_slots[hindex] = 1+index; old_entries[old_index].~htxentry(); } free_hook(this->_total_vector); this->_modulus = new_modulus; this->_size = new_size; this->_freelist = free_list_head; this->_slots = new_slots; this->_entries = new_entries; this->_total_vector = new_total_vector; } }; } // namespace cln #endif /* _CL_HASH2_H */ cln-1.3.3/src/base/hash/cl_hash1weak.h0000644000000000000000000000644012034113706014310 0ustar // Weak hash tables with 1 key and a value #ifndef _CL_HASH1WEAK_H #define _CL_HASH1WEAK_H #include "base/hash/cl_hash1.h" namespace cln { // This is a hash table in which an entry can be removed when a user-defined // condition is fulfilled (e.g. the value is not referenced any more). // We don't remove unused entries immediately, only when the hash table // wants to grow. This way the hash table also serves as a cache. // Requirements: // - same as for hash1, // - key1_type must be a subclass of cl_gc[object|pointer], // - value_type must be a subclass of cl_[gc|rc][object|pointer], // - function maygc_htentry(const cl_htentry1&); // must be filled in at runtime. template struct cl_heap_weak_hashtable_1 : public cl_heap_hashtable_1 { // Allocation. void* operator new (size_t size) { return malloc_hook(size); } // Deallocation. void operator delete (void* ptr) { free_hook(ptr); } public: // Function which tells when an unused entry may be garbage collected. bool (* const _maygc_htentry) (const cl_htentry1&); // Constructor. cl_heap_weak_hashtable_1 (bool (*maygc_htentry) (const cl_htentry1&)) : cl_heap_hashtable_1 (), _maygc_htentry (maygc_htentry) { this->_garcol_fun = cl_heap_weak_hashtable_1::garcol; } private: // Garbage collection. // Before growing the table, we check whether we can remove unused // entries. static bool garcol (cl_heap* _ht) { var cl_heap_weak_hashtable_1* ht = (cl_heap_weak_hashtable_1*)_ht; // Now ht->_garcol_fun = garcol. // It is not worth doing a garbage collection if the table // is small, say, has fewer than 100 entries. if (ht->_count < 100) return false; // Do a garbage collection. var long removed = 0; for (long i = 0; i < ht->_size; i++) if (ht->_entries[i].next >= 0) { var cl_htentry1& entry = ht->_entries[i].entry; if (ht->_maygc_htentry(entry)) { // This is hairy. We remove the entry and // free the value after its refcount has // dropped to zero. But in order to protect // against too early destruction // we have to temporarily increase the refcount. if (entry.val.pointer_p()) entry.val.inc_pointer_refcount(); ht->remove(entry.key); if (entry.val.pointer_p()) { var cl_heap* p = entry.val.heappointer; if (!(--p->refcount == 0)) throw runtime_exception(); cl_free_heap_object(p); } removed++; } } if (removed == 0) // Unsuccessful. Let the table grow immediately. return false; else if (2*removed < ht->_count) { // Table shrank by less than a factor of 1/1.5. // Don't expand the table now, but expand it next time. ht->_garcol_fun = cl_heap_weak_hashtable_1::garcol_nexttime; return true; } else { // Table shrank much. Don't expand the table now, // and try a GC next time. return true; } } static bool garcol_nexttime (cl_heap* _ht) { var cl_heap_weak_hashtable_1* ht = (cl_heap_weak_hashtable_1*)_ht; // Now ht->_garcol_fun = garcol_nexttime. ht->_garcol_fun = cl_heap_weak_hashtable_1::garcol; return false; } }; } // namespace cln #endif /* _CL_HASH1WEAK_H */ cln-1.3.3/src/base/hash/cl_rcpointer2_hashweak_rcpointer.h0000644000000000000000000000351512034113706020463 0ustar // cl_rcpointer hash tables #ifndef _CL_RCPOINTER2_HASHWEAK_RCPOINTER_H #define _CL_RCPOINTER2_HASHWEAK_RCPOINTER_H #include "cln/object.h" #include "base/hash/cl_hash2weak.h" namespace cln { // Equality. static inline bool equal (const cl_rcpointer& x, const cl_rcpointer& y) { return (x.pointer == y.pointer); } // Hash code. Luckily objects don't move around in memory. inline unsigned long hashcode (const cl_rcpointer& x1, const cl_rcpointer& x2) { var unsigned long hashcode1 = (unsigned long)x1.pointer; var unsigned long hashcode2 = (unsigned long)x2.pointer; hashcode2 = (hashcode2 << 5) | (hashcode2 >> (long_bitsize-5)); // rotate return hashcode1 ^ hashcode2; } typedef cl_htentry2 cl_htentry_from_rcpointer2_to_rcpointer; typedef cl_heap_weak_hashtable_2 cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer; typedef _cl_hashtable_iterator cl_hashtable_from_rcpointer2_to_rcpointer_iterator; struct cl_wht_from_rcpointer2_to_rcpointer : public cl_rcpointer { // Constructors. cl_wht_from_rcpointer2_to_rcpointer (bool (*maygc_htentry) (const cl_htentry_from_rcpointer2_to_rcpointer&)); cl_wht_from_rcpointer2_to_rcpointer (const cl_wht_from_rcpointer2_to_rcpointer&); // Assignment operators. cl_wht_from_rcpointer2_to_rcpointer& operator= (const cl_wht_from_rcpointer2_to_rcpointer&); // Iterator. cl_hashtable_from_rcpointer2_to_rcpointer_iterator iterator () const { return ((cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer*)pointer)->iterator(); } // Lookup. cl_rcpointer * get (const cl_rcpointer& x, const cl_rcpointer& y) const; // Store. void put (const cl_rcpointer& x, const cl_rcpointer& y, const cl_rcpointer& z) const; }; } // namespace cln #endif /* _CL_RCPOINTER2_HASHWEAK_RCPOINTER_H */ cln-1.3.3/src/base/hash/cl_rcpointer_hashweak_rcpointer.cc0000644000000000000000000000312511201634736020542 0ustar // class cl_wht_from_rcpointer_to_rcpointer. // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/hash/cl_rcpointer_hashweak_rcpointer.h" // Implementation. #include "base/hash/cl_hash1weak.h" namespace cln { static void cl_weak_hashtable_from_rcpointer_to_rcpointer_destructor (cl_heap* pointer) { #if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug (*(cl_heap_weak_hashtable_from_rcpointer_to_rcpointer*)pointer).~cl_heap_weak_hashtable_1(); #else (*(cl_heap_weak_hashtable_from_rcpointer_to_rcpointer*)pointer).~cl_heap_weak_hashtable_from_rcpointer_to_rcpointer(); #endif } cl_class cl_class_weak_hashtable_from_rcpointer_to_rcpointer = { cl_weak_hashtable_from_rcpointer_to_rcpointer_destructor, 0 }; // These are not inline, because they tend to duplicate a lot of template code. cl_wht_from_rcpointer_to_rcpointer::cl_wht_from_rcpointer_to_rcpointer (bool (*maygc_htentry) (const cl_htentry_from_rcpointer_to_rcpointer&)) { var cl_heap_weak_hashtable_from_rcpointer_to_rcpointer* ht = new cl_heap_weak_hashtable_from_rcpointer_to_rcpointer (maygc_htentry); ht->refcount = 1; ht->type = &cl_class_weak_hashtable_from_rcpointer_to_rcpointer; pointer = ht; } cl_rcpointer * cl_wht_from_rcpointer_to_rcpointer::get (const cl_rcpointer& x) const { return ((cl_heap_weak_hashtable_from_rcpointer_to_rcpointer*)pointer)->get(x); } void cl_wht_from_rcpointer_to_rcpointer::put (const cl_rcpointer& x, const cl_rcpointer& y) const { ((cl_heap_weak_hashtable_from_rcpointer_to_rcpointer*)pointer)->put(x,y); } } // namespace cln cln-1.3.3/src/base/hash/cl_hashuniq.h0000644000000000000000000001430112034113706014247 0ustar // Hash tables for making objects unique #ifndef _CL_HASHUNIQ_H #define _CL_HASHUNIQ_H #include "base/hash/cl_hash.h" #include "base/cl_iterator.h" namespace cln { // In such a hash table an entry's key is determined by its value // and not stored explicitly. // Requirements: // - function bool equal (key1_type,key1_type); // - function unsigned long hashcode (key1_type); // - function key1_type hashkey (value_type); // - constructor value_type::value_type (struct hashuniq *, key1_type); template struct cl_htuniqentry { ALLOCATE_ANYWHERE(cl_htuniqentry) value_type val; const value_type& htvalue () { return val; } cl_htuniqentry (const value_type& v) : val (v) {} #if (defined(__rs6000__) && !defined(__GNUC__)) cl_htuniqentry () {} #endif }; template struct cl_heap_hashtable_uniq : public cl_heap_hashtable > { protected: // Abbreviations. typedef cl_heap_hashtable > inherited; typedef typename inherited::htxentry htxentry; public: // Allocation. void* operator new (size_t size) { return malloc_hook(size); } // Deallocation. void operator delete (void* ptr) { free_hook(ptr); } public: // Lookup (htref alias gethash). // Returns a pointer which you should immediately dereference // if it is not NULL. value_type * get (const key1_type& key) { var long index = this->_slots[hashcode(key) % this->_modulus] - 1; while (index >= 0) { if (!(index < this->_size)) throw runtime_exception(); if (equal(key,hashkey(this->_entries[index].entry.val))) return &this->_entries[index].entry.val; index = this->_entries[index].next - 1; } return NULL; } // Store (htset alias puthash). void put (const key1_type& key) { var unsigned long hcode = hashcode(key); // Search whether it is already there. { var long index = this->_slots[hcode % this->_modulus] - 1; while (index >= 0) { if (!(index < this->_size)) throw runtime_exception(); if (equal(key,hashkey(this->_entries[index].entry.val))) return; index = this->_entries[index].next - 1; } } // Put it into the table. prepare_store(); var long hindex = hcode % this->_modulus; // _modulus may have changed! var long index = this->get_free_index(); new (&this->_entries[index].entry) cl_htuniqentry (value_type((struct hashuniq *)0, key)); this->_entries[index].next = this->_slots[hindex]; this->_slots[hindex] = 1+index; this->_count++; } // Remove (htrem alias remhash). void remove (const key1_type& key) { var long* _index = &this->_slots[hashcode(key) % this->_modulus]; while (*_index > 0) { var long index = *_index - 1; if (!(index < this->_size)) throw runtime_exception(); if (equal(key,hashkey(this->_entries[index].entry.val))) { // Remove _entries[index].entry *_index = this->_entries[index].next; this->_entries[index].~htxentry(); // The entry is now free. this->put_free_index(index); // That's it. this->_count--; return; } _index = &this->_entries[index].next; } } // Iterate through the table. // No stuff should be inserted into the table during the iteration, // or you may find yourself iterating over an entry vector which has // already been freed! // ?? private: // Prepare a store operation: make sure that the free list is non-empty. // This may change the table's size! void prepare_store () { #if !(defined(__sparc__) && !defined(__GNUC__)) if (this->_freelist < -1) return; // Can we make room? if (this->_garcol_fun(this)) if (this->_freelist < -1) return; // No! Have to grow the hash table. grow(); #else // workaround Sun C++ 4.1 inline function compiler bug if (this->_freelist >= -1) { if (!this->_garcol_fun(this) || (this->_freelist >= -1)) grow(); } #endif } void grow () { var long new_size = this->_size + (this->_size >> 1) + 1; // _size*1.5 var long new_modulus = inherited::compute_modulus(new_size); var void* new_total_vector = malloc_hook(new_modulus*sizeof(long) + new_size*sizeof(htxentry)); var long* new_slots = (long*) ((char*)new_total_vector + 0); var htxentry* new_entries = (htxentry *) ((char*)new_total_vector + new_modulus*sizeof(long)); for (var long hi = new_modulus-1; hi >= 0; hi--) new_slots[hi] = 0; var long free_list_head = -1; for (var long i = new_size-1; i >= 0; i--) { new_entries[i].next = free_list_head; free_list_head = -2-i; } var htxentry* old_entries = this->_entries; for (var long old_index = 0; old_index < this->_size; old_index++) if (old_entries[old_index].next >= 0) { var value_type& val = old_entries[old_index].entry.val; var long hindex = hashcode(hashkey(val)) % new_modulus; var long index = -2-free_list_head; free_list_head = new_entries[index].next; new (&new_entries[index].entry) cl_htuniqentry (val); new_entries[index].next = new_slots[hindex]; new_slots[hindex] = 1+index; old_entries[old_index].~htxentry(); } free_hook(this->_total_vector); this->_modulus = new_modulus; this->_size = new_size; this->_freelist = free_list_head; this->_slots = new_slots; this->_entries = new_entries; this->_total_vector = new_total_vector; } }; } // namespace cln #endif /* _CL_HASHUNIQ_H */ cln-1.3.3/src/base/hash/cl_hash.h0000644000000000000000000001452712034113706013364 0ustar // General hashtables #ifndef _CL_HASH_H #define _CL_HASH_H #include "cln/object.h" #include "cln/malloc.h" #include "cln/exception.h" #include "base/cl_iterator.h" namespace cln { const long htentry_last = 0; // means that there is no next entry // These forward declarations are needed for Sun CC 3.0.1 and 4.0.1. template struct _cl_hashtable_iterator; template struct cl_heap_hashtable : public cl_heap { friend struct _cl_hashtable_iterator; protected: typedef struct htxentry { long next; // > 0: pseudo-list continues at next-1 // == 0: end of pseudo-list // == -1: end of pseudo-free-list // < -1: part of pseudo-free-list, continues at -next-2 htentry entry; // if next >= 0 } htxentry; long _modulus; // size of the primary entry table, > 0 long _size; // maximum number of entries long _count; // current number of entries long _freelist; // start of pseudo-free-list long * _slots; // vector of length _modulus htxentry * _entries; // vector of length _size void* _total_vector; bool (*_garcol_fun) (cl_heap*); // Function to make room in the table. // Putting some intelligent function here turns // a normal hash table into a "weak" hash table. public: // Allocation. void* operator new (size_t size) { return malloc_hook(size); } // Deallocation. void operator delete (void* ptr) { free_hook(ptr); } // Constructor: build a new, empty table. cl_heap_hashtable (long initial_size = 5) : cl_heap (), _size (initial_size), _count (0), _garcol_fun (no_garcol) { _modulus = compute_modulus(_size); _total_vector = malloc_hook(_modulus*sizeof(long) + _size*sizeof(htxentry)); _slots = (long*) ((char*)_total_vector + 0); _entries = (htxentry *) ((char*)_total_vector + _modulus*sizeof(long)); for (var long hi = _modulus-1; hi >= 0; hi--) _slots[hi] = 0; var long free_list_head = -1; for (var long i = _size-1; i >= 0; i--) { _entries[i].next = free_list_head; free_list_head = -2-i; } _freelist = free_list_head; } // Destructor. ~cl_heap_hashtable () { for (long i = 0; i < _size; i++) if (_entries[i].next >= 0) _entries[i].~htxentry(); free_hook(_total_vector); } // Count number of entries. long num_entries () { #if 0 var long n = 0; for (long i = 0; i < _size; i++) if (_entries[i].next >= 0) n++; return n; #else /* We already have an up-to-date count. */ return _count; #endif } // Iterator. _cl_hashtable_iterator iterator (); protected: // Compute the modulus, given the maximum number of entries. static long compute_modulus (long size) { // It should be somewhat greater than size, since we want to // avoid collisions. // With N = size and M = modulus := k*size, the probability for a // * primary slot to be empty is // (1-1/M)^N == exp(-N/M) == exp(-1/k). // * primary slot to carry a pseudo-list of length 1 is // N 1/M (1-1/M)^(N-1) == exp(-N/M)*N/M == exp(-1/k)*1/k. // * primary slot to carry a pseudo-list of length >1 (collision) is // 1 - (1-1/M)^N - N 1/M (1-1/M)^(N-1) // == 1 - exp(-N/M)*(1 + N/M) == 1 - (exp(-1/k)*(1+1/k)). // Sample values: // = 0 = 1 > 1 // k = 1.0 0.37 0.37 0.26 // k = 1.5 0.51 0.34 0.14 // k = 2.0 0.61 0.30 0.09 // I think k = 1.0 is reasonable. // Furthermore, we make sure that M is not divisible by 2, 3, 5. // Because in some applications, the hash codes are divisible // by 2 or 3, and if the modulus were divisible by this number, // only every second or every third primary slot would be filled, // resulting in many collisions. var long m = 1*size; // Make sure m is not divisible by 2. if ((m % 2) == 0) m++; // Make sure m is not divisible by 3. if ((m % 3) == 0) m += 2; // Make sure m is not divisible by 5. if ((m % 5) == 0) { m += 2; if ((m % 3) == 0) m += 2; } return m; } // Return the index of a free entry. Assumes the free list is non-empty. long get_free_index () { // Check whether there is some in the free list. if (_freelist < -1) { var long index = -2-_freelist; _freelist = _entries[index].next; return index; } #if !(defined(__hppa__) && !defined(__GNUC__)) // workaround HP CC problem throw runtime_exception(); #endif return -1; // dummy } // Put a free index into the free list. void put_free_index (long index) { _entries[index].next = _freelist; _freelist = -2-index; } private: // Default function to make room in a hash table. static bool no_garcol (cl_heap* ht) { unused ht; return false; } }; template struct _cl_hashtable_iterator #if !(defined(__mips__) && !defined(__GNUC__)) // workaround SGI CC bug : cl_abstract_iterator #endif { private: typename cl_heap_hashtable::htxentry * _entries; long _index; public: _cl_hashtable_iterator () : _entries (0), _index (-1) {} public: /* ugh */ _cl_hashtable_iterator (typename cl_heap_hashtable::htxentry * e, long i) : _entries (e), _index (i) { do { _index--; } while (_index >= 0 && _entries[_index].next < 0); } public: bool endp () { return (_index < 0); } htentry& next () { if (_index < 0) throw runtime_exception(); var long old_index = _index; do { _index--; } while (_index >= 0 && _entries[_index].next < 0); return _entries[old_index].entry; } }; template inline _cl_hashtable_iterator cl_heap_hashtable::iterator () { return _cl_hashtable_iterator(_entries,_size); } } // namespace cln #endif /* _CL_HASH_H */ cln-1.3.3/src/base/hash/cl_hash2weak.h0000644000000000000000000000646112034113706014314 0ustar // Weak hash tables with 2 keys and a value #ifndef _CL_HASH2WEAK_H #define _CL_HASH2WEAK_H #include "base/hash/cl_hash2.h" namespace cln { // This is a hash table in which an entry can be removed when a user-defined // condition is fulfilled (e.g. the value is not referenced any more). // We don't remove unused entries immediately, only when the hash table // wants to grow. This way the hash table also serves as a cache. // Requirements: // - same as for hash2, // - key1_type and key2_type must be subclasses of cl_gc[object|pointer], // - value_type must be a subclass of cl_[gc|rc][object|pointer], // - function maygc_htentry(const cl_htentry2&); // must be filled in at runtime. template struct cl_heap_weak_hashtable_2 : public cl_heap_hashtable_2 { // Allocation. void* operator new (size_t size) { return malloc_hook(size); } // Deallocation. void operator delete (void* ptr) { free_hook(ptr); } public: // Function which tells when an unused entry may be garbage collected. bool (* const _maygc_htentry) (const cl_htentry2&); // Constructor. cl_heap_weak_hashtable_2 (bool (*maygc_htentry) (const cl_htentry2&)) : cl_heap_hashtable_2 (), _maygc_htentry (maygc_htentry) { this->_garcol_fun = garcol; } private: // Garbage collection. // Before growing the table, we check whether we can remove unused // entries. static bool garcol (cl_heap* _ht) { var cl_heap_weak_hashtable_2* ht = (cl_heap_weak_hashtable_2*)_ht; // Now ht->_garcol_fun = garcol. // It is not worth doing a garbage collection if the table // is small, say, has fewer than 100 entries. if (ht->_count < 100) return false; // Do a garbage collection. var long removed = 0; for (long i = 0; i < ht->_size; i++) if (ht->_entries[i].next >= 0) { var cl_htentry2& entry = ht->_entries[i].entry; if (ht->_maygc_htentry(entry)) { // This is hairy. We remove the entry and // free the value after its refcount has // dropped to zero. But in order to protect // against too early destruction // we have to temporarily increase the refcount. if (entry.val.pointer_p()) entry.val.inc_pointer_refcount(); ht->remove(entry.key1,entry.key2); if (entry.val.pointer_p()) { var cl_heap* p = entry.val.heappointer; if (!(--p->refcount == 0)) throw runtime_exception(); cl_free_heap_object(p); } removed++; } } if (removed == 0) // Unsuccessful. Let the table grow immediately. return false; else if (2*removed < ht->_count) { // Table shrank by less than a factor of 1/1.5. // Don't expand the table now, but expand it next time. ht->_garcol_fun = garcol_nexttime; return true; } else { // Table shrank much. Don't expand the table now, // and try a GC next time. return true; } } static bool garcol_nexttime (cl_heap* _ht) { var cl_heap_weak_hashtable_2* ht = (cl_heap_weak_hashtable_2*)_ht; // Now ht->_garcol_fun = garcol_nexttime. ht->_garcol_fun = cl_heap_weak_hashtable_2::garcol; return false; } }; } // namespace cln #endif /* _CL_HASH2WEAK_H */ cln-1.3.3/src/base/hash/cl_hashset.h0000644000000000000000000001311612034113706014071 0ustar // Hash sets (hash tables with 1 key and no value) #ifndef _CL_HASHSET_H #define _CL_HASHSET_H #include "base/hash/cl_hash.h" #include "base/cl_iterator.h" namespace cln { // Requirements: // - function bool equal (key1_type,key1_type); // - function unsigned long hashcode (key1_type); template struct cl_htsetentry { ALLOCATE_ANYWHERE(cl_htsetentry) key1_type key; cl_htsetentry (const key1_type& k) : key (k) {} }; template struct cl_heap_hashtable_set : public cl_heap_hashtable > { protected: // Abbreviations. typedef cl_heap_hashtable > inherited; typedef typename inherited::htxentry htxentry; public: // Allocation. void* operator new (size_t size) { return malloc_hook(size); } // Deallocation. void operator delete (void* ptr) { free_hook(ptr); } public: // Lookup (htref alias gethash). bool get (const key1_type& key) { var long index = this->_slots[hashcode(key) % this->_modulus] - 1; while (index >= 0) { if (!(index < this->_size)) throw runtime_exception(); if (equal(key,this->_entries[index].entry.key)) return true; index = this->_entries[index].next - 1; } return false; } // Store (htset alias puthash). void put (const key1_type& key) { var unsigned long hcode = hashcode(key); // Search whether it is already there. { var long index = this->_slots[hcode % this->_modulus] - 1; while (index >= 0) { if (!(index < this->_size)) throw runtime_exception(); if (equal(key,this->_entries[index].entry.key)) return; index = this->_entries[index].next - 1; } } // Put it into the table. prepare_store(); var long hindex = hcode % this->_modulus; // _modulus may have changed! var long index = this->get_free_index(); new (&this->_entries[index].entry) cl_htsetentry (key); this->_entries[index].next = this->_slots[hindex]; this->_slots[hindex] = 1+index; this->_count++; } // Remove (htrem alias remhash). void remove (const key1_type& key) { var long* _index = &this->_slots[hashcode(key) % this->_modulus]; while (*_index > 0) { var long index = *_index - 1; if (!(index < this->_size)) throw runtime_exception(); if (equal(key,this->_entries[index].entry.key)) { // Remove _entries[index].entry *_index = this->_entries[index].next; this->_entries[index].~htxentry(); // The entry is now free. this->put_free_index(index); // That's it. this->_count--; return; } _index = &this->_entries[index].next; } } // Iterate through the table. // No stuff should be inserted into the table during the iteration, // or you may find yourself iterating over an entry vector which has // already been freed! // ?? private: // Prepare a store operation: make sure that the free list is non-empty. // This may change the table's size! void prepare_store () { #if !(defined(__sparc__) && !defined(__GNUC__)) if (this->_freelist < -1) return; // Can we make room? if (this->_garcol_fun(this)) if (this->_freelist < -1) return; // No! Have to grow the hash table. grow(); #else // workaround Sun C++ 4.1 inline function compiler bug if (this->_freelist >= -1) { if (!this->_garcol_fun(this) || (this->_freelist >= -1)) grow(); } #endif } void grow () { var long new_size = this->_size + (this->_size >> 1) + 1; // _size*1.5 var long new_modulus = inherited::compute_modulus(new_size); var void* new_total_vector = malloc_hook(new_modulus*sizeof(long) + new_size*sizeof(htxentry)); var long* new_slots = (long*) ((char*)new_total_vector + 0); var htxentry* new_entries = (htxentry *) ((char*)new_total_vector + new_modulus*sizeof(long)); for (var long hi = new_modulus-1; hi >= 0; hi--) new_slots[hi] = 0; var long free_list_head = -1; for (var long i = new_size-1; i >= 0; i--) { new_entries[i].next = free_list_head; free_list_head = -2-i; } var htxentry* old_entries = this->_entries; for (var long old_index = 0; old_index < this->_size; old_index++) if (old_entries[old_index].next >= 0) { var key1_type& key = old_entries[old_index].entry.key; var long hindex = hashcode(key) % new_modulus; var long index = -2-free_list_head; free_list_head = new_entries[index].next; new (&new_entries[index].entry) cl_htsetentry (key); new_entries[index].next = new_slots[hindex]; new_slots[hindex] = 1+index; old_entries[old_index].~htxentry(); } free_hook(this->_total_vector); this->_modulus = new_modulus; this->_size = new_size; this->_freelist = free_list_head; this->_slots = new_slots; this->_entries = new_entries; this->_total_vector = new_total_vector; } }; } // namespace cln #endif /* _CL_HASHSET_H */ cln-1.3.3/src/base/hash/cl_hash1.h0000644000000000000000000001432712034113706013443 0ustar // Hash tables with 1 key and a value #ifndef _CL_HASH1_H #define _CL_HASH1_H #include "base/hash/cl_hash.h" #include "base/cl_iterator.h" namespace cln { // Requirements: // - function bool equal (key1_type,key1_type); // - function unsigned long hashcode (key1_type); #if (defined(__alpha__) && !defined(__GNUC__)) template struct cl_htentry1; #endif template struct cl_htentry1 { ALLOCATE_ANYWHERE(cl_htentry1) key1_type key; value_type val; const value_type& htvalue () { return val; } cl_htentry1 (const key1_type& k, const value_type& v) : key (k), val (v) {} #if (defined(__rs6000__) && !defined(__GNUC__)) cl_htentry1 () {} #endif }; template struct cl_heap_hashtable_1 : public cl_heap_hashtable > { protected: // Abbreviations. typedef cl_heap_hashtable > inherited; typedef typename inherited::htxentry htxentry; public: // Allocation. void* operator new (size_t size) { return malloc_hook(size); } // Deallocation. void operator delete (void* ptr) { free_hook(ptr); } public: // Lookup (htref alias gethash). // Returns a pointer which you should immediately dereference // if it is not NULL. value_type* get (const key1_type& key) { var long index = this->_slots[hashcode(key) % this->_modulus] - 1; while (index >= 0) { if (!(index < this->_size)) throw runtime_exception(); if (equal(key,this->_entries[index].entry.key)) return &this->_entries[index].entry.val; index = this->_entries[index].next - 1; } return NULL; } // Store (htset alias puthash). void put (const key1_type& key, const value_type& val) { var unsigned long hcode = hashcode(key); // Search whether it is already there. { var long index = this->_slots[hcode % this->_modulus] - 1; while (index >= 0) { if (!(index < this->_size)) throw runtime_exception(); if (equal(key,this->_entries[index].entry.key)) { this->_entries[index].entry.val = val; return; } index = this->_entries[index].next - 1; } } // Put it into the table. prepare_store(); var long hindex = hcode % this->_modulus; // _modulus may have changed! var long index = this->get_free_index(); new (&this->_entries[index].entry) cl_htentry1 (key,val); this->_entries[index].next = this->_slots[hindex]; this->_slots[hindex] = 1+index; this->_count++; } // Remove (htrem alias remhash). void remove (const key1_type& key) { var long* _index = &this->_slots[hashcode(key) % this->_modulus]; while (*_index > 0) { var long index = *_index - 1; if (!(index < this->_size)) throw runtime_exception(); if (equal(key,this->_entries[index].entry.key)) { // Remove _entries[index].entry *_index = this->_entries[index].next; this->_entries[index].~htxentry(); // The entry is now free. this->put_free_index(index); // That's it. this->_count--; return; } _index = &this->_entries[index].next; } } // Iterate through the table. // No stuff should be inserted into the table during the iteration, // or you may find yourself iterating over an entry vector which has // already been freed! // ?? private: // Prepare a store operation: make sure that the free list is non-empty. // This may change the table's size! void prepare_store () { #if !(defined(__sparc__) && !defined(__GNUC__)) if (this->_freelist < -1) return; // Can we make room? if (this->_garcol_fun(this)) if (this->_freelist < -1) return; // No! Have to grow the hash table. grow(); #else // workaround Sun C++ 4.1 inline function compiler bug if (this->_freelist >= -1) { if (!this->_garcol_fun(this) || (this->_freelist >= -1)) grow(); } #endif } void grow () { var long new_size = this->_size + (this->_size >> 1) + 1; // _size*1.5 var long new_modulus = inherited::compute_modulus(new_size); var void* new_total_vector = malloc_hook(new_modulus*sizeof(long) + new_size*sizeof(htxentry)); var long* new_slots = (long*) ((char*)new_total_vector + 0); var htxentry* new_entries = (htxentry *) ((char*)new_total_vector + new_modulus*sizeof(long)); for (var long hi = new_modulus-1; hi >= 0; hi--) new_slots[hi] = 0; var long free_list_head = -1; for (var long i = new_size-1; i >= 0; i--) { new_entries[i].next = free_list_head; free_list_head = -2-i; } var htxentry* old_entries = this->_entries; for (var long old_index = 0; old_index < this->_size; old_index++) if (old_entries[old_index].next >= 0) { var key1_type& key = old_entries[old_index].entry.key; var value_type& val = old_entries[old_index].entry.val; var long hindex = hashcode(key) % new_modulus; var long index = -2-free_list_head; free_list_head = new_entries[index].next; new (&new_entries[index].entry) cl_htentry1 (key,val); new_entries[index].next = new_slots[hindex]; new_slots[hindex] = 1+index; old_entries[old_index].~htxentry(); } free_hook(this->_total_vector); this->_modulus = new_modulus; this->_size = new_size; this->_freelist = free_list_head; this->_slots = new_slots; this->_entries = new_entries; this->_total_vector = new_total_vector; } }; } // namespace cln #endif /* _CL_HASH1_H */ cln-1.3.3/src/base/hash/cl_rcpointer2_hashweak_rcpointer.cc0000644000000000000000000000323111201634736020622 0ustar // class cl_wht_from_rcpointer2_to_rcpointer. // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/hash/cl_rcpointer2_hashweak_rcpointer.h" // Implementation. #include "base/hash/cl_hash2weak.h" namespace cln { static void cl_weak_hashtable_from_rcpointer2_to_rcpointer_destructor (cl_heap* pointer) { #if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug (*(cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer*)pointer).~cl_heap_weak_hashtable_2(); #else (*(cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer*)pointer).~cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer(); #endif } cl_class cl_class_weak_hashtable_from_rcpointer2_to_rcpointer = { cl_weak_hashtable_from_rcpointer2_to_rcpointer_destructor, 0 }; // These are not inline, because they tend to duplicate a lot of template code. cl_wht_from_rcpointer2_to_rcpointer::cl_wht_from_rcpointer2_to_rcpointer (bool (*maygc_htentry) (const cl_htentry_from_rcpointer2_to_rcpointer&)) { var cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer* ht = new cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer (maygc_htentry); ht->refcount = 1; ht->type = &cl_class_weak_hashtable_from_rcpointer2_to_rcpointer; pointer = ht; } cl_rcpointer * cl_wht_from_rcpointer2_to_rcpointer::get (const cl_rcpointer& x, const cl_rcpointer& y) const { return ((cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer*)pointer)->get(x,y); } void cl_wht_from_rcpointer2_to_rcpointer::put (const cl_rcpointer& x, const cl_rcpointer& y, const cl_rcpointer& z) const { ((cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer*)pointer)->put(x,y,z); } } // namespace cln cln-1.3.3/src/base/cl_debug.cc0000644000000000000000000000312312034113706012730 0ustar // Debugging support for dynamic typing. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/object.h" // Implementation. #include "cln/io.h" namespace cln { // The default printer function. void cl_dprint_unknown (cl_heap* pointer) { fprint(cl_debugout, ""); } static void cl_dprint_unknown_immediate (cl_heap* pointer) { fprint(cl_debugout, ""); } // Print an object. This function is callable from the debugger. extern "C" void* cl_print (cl_uint word); void* cl_print (cl_uint word) { var cl_heap* pointer = (cl_heap*)word; if (cl_pointer_p(word)) { var const cl_class* type = pointer->type; if (type->dprint) type->dprint(pointer); else cl_dprint_unknown(pointer); } else { var const cl_class* type = cl_immediate_classes[cl_tag(word)]; if (type && type->dprint) type->dprint(pointer); else cl_dprint_unknown_immediate(pointer); } cl_debugout << std::endl; // newline and flush output return pointer; } void cl_gcobject::debug_print () const { cl_print(word); } void cl_gcpointer::debug_print () const { cl_print(word); } void cl_rcobject::debug_print () const { cl_print(word); } void cl_rcpointer::debug_print () const { cl_print(word); } } // namespace cln cln-1.3.3/src/base/low/0000755000000000000000000000000012173046176011471 5ustar cln-1.3.3/src/base/low/cl_low_div.cc0000644000000000000000000003634211547674420014134 0ustar // Low level: division. // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/cl_low.h" // Implementation. #ifdef NEED_VAR_divu_16_rest uint16 divu_16_rest; #endif #ifdef NEED_FUNCTION_divu_3216_1616_ uint16 divu_16_rest; namespace cln { #if 1 // Most processors have a good 32 by 32 bit division, use that. uint16 divu_3216_1616_ (uint32 x, uint16 y) { var uint16 q = floor(x,(uint32)y); divu_16_rest = x - (uint32)q * (uint32)y; return q; } #else // On processors without a hardware division, we have to produce the quotient's // bits individually. Basically the algorithm is like this: // q := 0; r := x; // if (r >= 2^15*y) { r -= 2^15*y; q |= 2^15; } // if (r >= 2^14*y) { r -= 2^14*y; q |= 2^14; } // ... // if (r >= 2^0*y) { r -= 2^0*y; q |= 2^0; } // We don't want to shift 2^k*y to the right. Instead, we shift r to the left: // q := 0; r := x; // if (r >= 2^15*y) { r -= 2^15*y; q |= 2^15; } // if (2*r >= 2^15*y) { 2*r -= 2^15*y; q |= 2^14; } // ... // if (2^15*r >= 2^15*y) { 2^15*r -= 2^15*y; q |= 2^0; } // In other terms: // q := 0; r := x; s := 2^15*y; // if (r >= s) { r -= s; q |= 2^15; } // r := 2*r; // if (r >= s) { r -= s; q |= 2^14; } // r := 2*r; // ... // r := 2*r; // if (r >= s) { r -= s; q |= 2^0; } // r := r >> 15; // Now, we combine r and q into a single register. The bits of q won't disturb // the "r >= s" comparisons because up to the last comparisons only max 15 // bits have accumulated, and s is a multiple of 2^15. // We can thus shift r and q with a single instruction. // q := 0; r := x; s := 2^15*y; // if (r >= s) { r -= s; r := 2*r+1; } else r := 2*r; // if (r >= s) { r -= s; r := 2*r+1; } else r := 2*r; // ... // if (r >= s) { r -= s; r := 2*r+1; } else r := 2*r; // q := r & (2^16-1); r := r >> 16; // Up to now, this is pretty standard. // On most hardware the comparison "r >= s" already implies doing a subtraction // r - s. It is wasteful to do the subtraction twice. Better do it once and // test the carry afterwards: // q := 0; r := x; s := 2^15*y; // r -= s; if (no subcarry) { r := 2*r+1; } else { r := 2*r+2*s; } // r -= s; if (no subcarry) { r := 2*r+1; } else { r := 2*r+2*s; } // ... // r -= s; if (no subcarry) { r := 2*r+1; } else { r := 2*r+2*s; } // q := r & (2^16-1); r := r >> 16; // In the case of carry we can combine the "+2*s" with the next "-s" operation. // So this becomes "r := 2*r+s". But note about the carries: the case // "(2*r+2*s)-s gives no subcarry" is equivalent to "2*r+s gives an addcarry". // On most processors, subcarry and addcarry are the same bit. So we turn // the subcarry into an addcarry by writing "r += -s" instead of "r -= s" // (or vice versa: writing "2*r-(-s)" instead of "2*r+s"). // q := 0; r := x; s := 2^15*y; // r += -s; // if (addcarry) { r := 2*r+1; r += -s; } else { r := 2*r+s; } // if (addcarry) { r := 2*r+1; r += -s; } else { r := 2*r+s; } // ... // if (addcarry) { r := 2*r+1; } else { r := 2*r+2*s; } // q := r & (2^16-1); r := r >> 16; // This algorithm is implemented in cl_asm_arm.cc and (in slightly modified // form) in cl_asm_sparc.cc. #endif } // namespace cln #endif #ifdef NEED_FUNCTION_divu_3232_3232_ namespace cln { // Dies dient nur noch als Hilfsfunktion für floorD(). // Die Rückgabe des Restes in divu_32_rest ist also hier nicht nötig. uint32 divu_3232_3232_(uint32 x, uint32 y) { var uint32 q; divu_3232_3232(x,y,q=,); return q; } } // namespace cln #endif #ifdef NEED_VAR_divu_32_rest uint32 divu_32_rest; #endif #ifdef NEED_FUNCTION_divu_6432_3232_ uint32 divu_32_rest; namespace cln { uint32 divu_6432_3232_(uint32 xhi, uint32 xlo, uint32 y) // Methode: // Wie UDS_divide mit intDsize=16, a_len=4, b_len=2. { if (y <= (uint32)(bit(16)-1)) // 48-durch-16-Bit-Division, // aufgebaut aus zwei 32-durch-16-Bit-Divisionen: { var uint16 q1; var uint16 q0; var uint16 r1; divu_3216_1616(highlow32(low16(xhi),high16(xlo)),y, q1=,r1=); divu_3216_1616(highlow32(r1,low16(xlo)),y, q0=,divu_32_rest=); return highlow32(q1,q0); } // y>=2^16 {// y shiften: var uintL s = 0; while ((sint32)y >= 0) { y = y<<1; s++; } // x entsprechend shiften: if (!(s==0)) { xhi = (xhi << s) | (xlo >> (32-s)); xlo = xlo << s; } // 64-durch-32-Bit-Division, // aufgebaut aus zwei 48-durch-32-Bit-Divisionen. // Methode für eine 48-durch-32-Bit-Division x/y mit 0 <= x < 2^16*y : // (beta = 2^n = 2^16, n = 16) // Wir wissen beta^2/2 <= y < beta^2, Quotient q = floor(x/y) < beta. // Schreibe x = beta*x1 + x0 mit x1 := floor(x/beta) // und y = beta*y1 + y0 mit y1 := floor(y/beta) // und bilde den Näherungs-Quotienten floor(x1/y1) // oder (noch besser) floor(x1/(y1+1)). // Wegen 0 <= x1 < 2^(2n) und 0 < 2^(n-1) <= y1 < 2^n // und x1/(y1+1) <= x/y < x1/(y1+1) + 2 // (denn x1/(y1+1) = (x1*beta)/((y1+1)*beta) <= (x1*beta)/y <= x/y // und x/y - x1/(y1+1) = (x+x*y1-x1*y)/(y*(y1+1)) // = (x+x0*y1-x1*y0)/(y*(y1+1)) <= (x+x0*y1)/(y*(y1+1)) // <= x/(y*(y1+1)) + x0/y = (x/y)/(y1+1) + x0/y // <= 2^n/(2^(n-1)+1) + 2^n/2^(2n-1) = 2^n/(2^(n-1)+1) + 2^(1-n) < 2 ) // gilt floor(x1/(y1+1)) <= floor(x/y) <= floor(x1/(y1+1)) + 2 . // Man bildet also q:=floor(x1/(y1+1)) (ein Shift um n Bit oder // eine (2n)-durch-n-Bit-Division, mit Ergebnis q <= floor(x/y) < beta) // und x-q*y und muß hiervon noch höchstens 2 mal y abziehen und q // incrementieren, um den Quotienten q = floor(x/y) und den Rest // x-floor(x/y)*y der Division zu bekommen. { var uint16 y1_1 = high16(y)+1; // y1+1 var uint16 q1; var uint16 q0; var uint32 r; // 2^16*xhi+high16(xlo) durch y dividieren: {var uint16 r16; var uint32 r2; if (y1_1==0) { q1 = high16(xhi); r16 = low16(xhi); } else { divu_3216_1616(xhi,y1_1, q1=,r16=); } // q1 = floor(xhi/(y1+1)), r16 = xhi - (y1+1)*q1 (>=0, <=y1) // Bilde r := (2^16*xhi+high16(xlo)) - y*q1 // = 2^16*(xhi-y1*q1) + high16(xlo) - y0*q1 // = 2^16*r16 + 2^16*q1 + high16(xlo) - y0*q1 (>=0) // Dies ist < 2^16*y1 + 2^32 <= y + 2^32 <= 3*y, kann überlaufen! r = highlow32(r16,high16(xlo)); // 2^16*r16 + high16(xlo) < 2^32 r2 = highlow32_0(q1) - mulu16(low16(y),q1); // 2^16*q1 - y0*q1 < 2^32 // 0 <= r+r2 < 3*y. Bei der Addition auf Carry testen! // Carry -> jedenfalls y <= r+r2 < y + 2^32 <= 3*y. // kein Carry -> jedenfalls 0 <= r+r2 < 2^32 <= 2*y. if ((r += r2) < r2) // addieren, r >= 2^32 ? { q1 += 1; r -= y; } // jetzt noch 0 <= r < 2^32 <= 2*y if (r >= y) { q1 += 1; r -= y; } }// Quotient q1, Rest r fertig. // 2^16*r+low16(xlo) durch y dividieren: {var uint16 r16; var uint32 r2; if (y1_1==0) { q0 = high16(r); r16 = low16(r); } else { divu_3216_1616(r,y1_1, q0=,r16=); } // q0 = floor(r/(y1+1)), r16 = r - (y1+1)*q0 (>=0, <=y1) // Bilde r := (2^16*r+low16(xlo)) - y*q0 // = 2^16*(r-y1*q0) + low16(xlo) - y0*q0 // = 2^16*r16 + 2^16*q0 + low16(xlo) - y0*q0 (>=0) // Dies ist < 2^16*y1 + 2^32 <= y + 2^32 <= 3*y, kann überlaufen! r = highlow32(r16,low16(xlo)); // 2^16*r16 + low16(xlo) < 2^32 r2 = highlow32_0(q0) - mulu16(low16(y),q0); // 2^16*q0 - y0*q0 < 2^32 // 0 <= r+r2 < 3*y. Bei der Addition auf Carry testen! // Carry -> jedenfalls y <= r+r2 < y + 2^32 <= 3*y. // kein Carry -> jedenfalls 0 <= r+r2 < 2^32 <= 2*y. if ((r += r2) < r2) // addieren, r >= 2^32 ? { q0 += 1; r -= y; } // jetzt noch 0 <= r < 2^32 <= 2*y if (r >= y) { q0 += 1; r -= y; } }// Quotient q0, Rest r fertig. divu_32_rest = r >> s; // Rest return highlow32(q1,q0); // Quotient } } } } // namespace cln #endif #ifdef NEED_VAR_divu_64_rest uint64 divu_64_rest; #endif #ifdef NEED_FUNCTION_divu_6464_6464_ namespace cln { uint64 divu_6464_6464_(uint64 x, uint64 y) // Methode: (beta = 2^n = 2^32, n = 32) // Falls y < beta, handelt es sich um eine 64-durch-32-Bit-Division. // Falls y >= beta: // Quotient q = floor(x/y) < beta (da 0 <= x < beta^2, y >= beta). // y habe genau n+k Bits (1 <= k <= n), d.h. 2^(n+k-1) <= y < 2^(n+k). // Schreibe x = 2^k*x1 + x0 mit x1 := floor(x/2^k) // und y = 2^k*y1 + y0 mit y1 := floor(y/2^k) // und bilde den Näherungs-Quotienten floor(x1/y1) // oder (noch besser) floor(x1/(y1+1)). // Wegen 0 <= x1 < 2^(2n) und 0 < 2^(n-1) <= y1 < 2^n // und x1/(y1+1) <= x/y < x1/(y1+1) + 2 // (denn x1/(y1+1) = (x1*2^k)/((y1+1)*2^k) <= (x1*2^k)/y <= x/y // und x/y - x1/(y1+1) = (x+x*y1-x1*y)/(y*(y1+1)) // = (x+x0*y1-x1*y0)/(y*(y1+1)) <= (x+x0*y1)/(y*(y1+1)) // <= x/(y*(y1+1)) + x0/y // <= 2^(2n)/(2^(n+k-1)*(2^(n-1)+1)) + 2^k/2^(n+k-1) // = 2^(n-k+1)/(2^(n-1)+1) + 2^(1-n) <= 2^n/(2^(n-1)+1) + 2^(1-n) < 2 ) // gilt floor(x1/(y1+1)) <= floor(x/y) <= floor(x1/(y1+1)) + 2 . // Man bildet also q:=floor(x1/(y1+1)) (ein Shift um n Bit oder // eine (2n)-durch-n-Bit-Division, mit Ergebnis q <= floor(x/y) < beta) // und x-q*y und muss hiervon noch höchstens 2 mal y abziehen und q // incrementieren, um den Quotienten q = floor(x/y) und den Rest // x-floor(x/y)*y der Division zu bekommen. { if (y <= (uint64)(((uint64)1<<32)-1)) { var uint32 q1; var uint32 q0; var uint32 r1; divu_6432_3232(0,high32(x),y, q1 = , r1 = ); divu_6432_3232(r1,low32(x),y, q0 = , divu_64_rest = ); return highlow64(q1,q0); } else { var uint64 x1 = x; // x1 := x var uint64 y1 = y; // y1 := y var uint32 q; do { x1 = floor(x1,2); y1 = floor(y1,2); } // k erhöhen while (!(y1 <= (uint64)(((uint64)1<<32)-1))); // bis y1 < beta { var uint32 y2 = low32(y1)+1; // y1+1 bilden if (y2==0) { q = high32(x1); } // y1+1=beta -> ein Shift else { divu_6432_3232(high32(x1),low32(x1),y2,q=,); } // Division von x1 durch y1+1 } // q = floor(x1/(y1+1)) // x-q*y bilden (eine 32-mal-64-Bit-Multiplikation ohne Überlauf): x -= highlow64_0(mulu32_w(q,high32(y))); // q * high32(y) * beta // gefahrlos, da q*high32(y) <= q*y/beta <= x/beta < beta x -= mulu32_w(q,low32(y)); // q * low32(y) // gefahrlos, da q*high32(y)*beta + q*low32(y) = q*y <= x // Noch höchstens 2 mal y abziehen: if (x >= y) { q += 1; x -= y; if (x >= y) { q += 1; x -= y; } } divu_64_rest = x; return (uint64)q; } } } // namespace cln #endif #ifdef NEED_FUNCTION_divu_12864_6464_ namespace cln { uint64 divu_12864_6464_(uint64 xhi, uint64 xlo, uint64 y) // Methode: // Wie UDS_divide mit intDsize=32, a_len=4, b_len=2. { if (y <= (uint64)(bit(32)-1)) // 96-durch-32-Bit-Division, // aufgebaut aus zwei 64-durch-32-Bit-Divisionen: { var uint32 q1; var uint32 q0; var uint32 r1; divu_6432_3232(low32(xhi),high32(xlo),y, q1=,r1=); divu_6432_3232(r1,low32(xlo),y, q0=,divu_64_rest=); return highlow64(q1,q0); } // y>=2^32 {// y shiften: var uintL s = 0; while ((sint64)y >= 0) { y = y<<1; s++; } // x entsprechend shiften: if (!(s==0)) { xhi = (xhi << s) | (xlo >> (64-s)); xlo = xlo << s; } // 128-durch-64-Bit-Division, // aufgebaut aus zwei 96-durch-64-Bit-Divisionen. // Methode für eine 96-durch-64-Bit-Division x/y mit 0 <= x < 2^32*y : // (beta = 2^n = 2^32, n = 32) // Wir wissen beta^2/2 <= y < beta^2, Quotient q = floor(x/y) < beta. // Schreibe x = beta*x1 + x0 mit x1 := floor(x/beta) // und y = beta*y1 + y0 mit y1 := floor(y/beta) // und bilde den Näherungs-Quotienten floor(x1/y1) // oder (noch besser) floor(x1/(y1+1)). // Wegen 0 <= x1 < 2^(2n) und 0 < 2^(n-1) <= y1 < 2^n // und x1/(y1+1) <= x/y < x1/(y1+1) + 2 // (denn x1/(y1+1) = (x1*beta)/((y1+1)*beta) <= (x1*beta)/y <= x/y // und x/y - x1/(y1+1) = (x+x*y1-x1*y)/(y*(y1+1)) // = (x+x0*y1-x1*y0)/(y*(y1+1)) <= (x+x0*y1)/(y*(y1+1)) // <= x/(y*(y1+1)) + x0/y = (x/y)/(y1+1) + x0/y // <= 2^n/(2^(n-1)+1) + 2^n/2^(2n-1) = 2^n/(2^(n-1)+1) + 2^(1-n) < 2 ) // gilt floor(x1/(y1+1)) <= floor(x/y) <= floor(x1/(y1+1)) + 2 . // Man bildet also q:=floor(x1/(y1+1)) (ein Shift um n Bit oder // eine (2n)-durch-n-Bit-Division, mit Ergebnis q <= floor(x/y) < beta) // und x-q*y und muß hiervon noch höchstens 2 mal y abziehen und q // incrementieren, um den Quotienten q = floor(x/y) und den Rest // x-floor(x/y)*y der Division zu bekommen. { var uint32 y1_1 = high32(y)+1; // y1+1 var uint32 q1; var uint32 q0; var uint64 r; // 2^32*xhi+high32(xlo) durch y dividieren: {var uint32 r32; var uint64 r2; if (y1_1==0) { q1 = high32(xhi); r32 = low32(xhi); } else { divu_6432_3232_w(xhi,y1_1, q1=,r32=); } // q1 = floor(xhi/(y1+1)), r32 = xhi - (y1+1)*q1 (>=0, <=y1) // Bilde r := (2^32*xhi+high32(xlo)) - y*q1 // = 2^32*(xhi-y1*q1) + high32(xlo) - y0*q1 // = 2^32*r32 + 2^32*q1 + high32(xlo) - y0*q1 (>=0) // Dies ist < 2^32*y1 + 2^64 <= y + 2^64 <= 3*y, kann überlaufen! r = highlow64(r32,high32(xlo)); // 2^32*r32 + high32(xlo) < 2^64 r2 = highlow64_0(q1) - mulu32_w(low32(y),q1); // 2^32*q1 - y0*q1 < 2^64 // 0 <= r+r2 < 3*y. Bei der Addition auf Carry testen! // Carry -> jedenfalls y <= r+r2 < y + 2^64 <= 3*y. // kein Carry -> jedenfalls 0 <= r+r2 < 2^64 <= 2*y. if ((r += r2) < r2) // addieren, r >= 2^64 ? { q1 += 1; r -= y; } // jetzt noch 0 <= r < 2^64 <= 2*y if (r >= y) { q1 += 1; r -= y; } }// Quotient q1, Rest r fertig. // 2^32*r+low32(xlo) durch y dividieren: {var uint32 r32; var uint64 r2; if (y1_1==0) { q0 = high32(r); r32 = low32(r); } else { divu_6432_3232_w(r,y1_1, q0=,r32=); } // q0 = floor(r/(y1+1)), r32 = r - (y1+1)*q0 (>=0, <=y1) // Bilde r := (2^32*r+low32(xlo)) - y*q0 // = 2^32*(r-y1*q0) + low32(xlo) - y0*q0 // = 2^32*r32 + 2^32*q0 + low32(xlo) - y0*q0 (>=0) // Dies ist < 2^32*y1 + 2^64 <= y + 2^64 <= 3*y, kann überlaufen! r = highlow64(r32,low32(xlo)); // 2^32*r32 + low32(xlo) < 2^64 r2 = highlow64_0(q0) - mulu32_w(low32(y),q0); // 2^32*q0 - y0*q0 < 2^64 // 0 <= r+r2 < 3*y. Bei der Addition auf Carry testen! // Carry -> jedenfalls y <= r+r2 < y + 2^64 <= 3*y. // kein Carry -> jedenfalls 0 <= r+r2 < 2^64 <= 2*y. if ((r += r2) < r2) // addieren, r >= 2^64 ? { q0 += 1; r -= y; } // jetzt noch 0 <= r < 2^64 <= 2*y if (r >= y) { q0 += 1; r -= y; } }// Quotient q0, Rest r fertig. divu_64_rest = r >> s; // Rest return highlow64(q1,q0); // Quotient } } } } // namespace cln #endif cln-1.3.3/src/base/low/cl_low_mul.cc0000644000000000000000000000364711547674326014156 0ustar // Low level: multiplication. // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/cl_low.h" // Implementation. #ifdef NEED_VAR_mulu32_high uint32 mulu32_high; #endif #ifdef NEED_FUNCTION_mulu32_ uint32 mulu32_high; namespace cln { uint32 mulu32_ (uint32 x, uint32 y) { var uint16 x1 = high16(x); var uint16 x0 = low16(x); var uint16 y1 = high16(y); var uint16 y0 = low16(y); var uint32 hi = mulu16(x1,y1); // obere Portion var uint32 lo = mulu16(x0,y0); // untere Portion {var uint32 mid = mulu16(x0,y1); // 1. mittlere Portion hi += high16(mid); mid = highlow32_0(low16(mid)); lo += mid; if (lo < mid) { hi += 1; } // 64-Bit-Addition } {var uint32 mid = mulu16(x1,y0); // 2. mittlere Portion hi += high16(mid); mid = highlow32_0(low16(mid)); lo += mid; if (lo < mid) { hi += 1; } // 64-Bit-Addition } mulu32_high = hi; return lo; } } // namespace cln #endif #ifdef NEED_FUNCTION_mulu32_w namespace cln { uint64 mulu32_w (uint32 arg1, uint32 arg2) { var uint32 lo = mulu32_(arg1,arg2); var uint32 hi = mulu32_high; return highlow64(hi,lo); } } // namespace cln #endif #ifdef NEED_VAR_mulu64_high uint64 mulu64_high; #endif #ifdef NEED_FUNCTION_mulu64_ uint64 mulu64_high; namespace cln { extern "C" uint64 mulu64_ (uint64 x, uint64 y); uint64 mulu64_ (uint64 x, uint64 y) { var uint32 x1 = high32(x); var uint32 x0 = low32(x); var uint32 y1 = high32(y); var uint32 y0 = low32(y); var uint64 hi = mulu32_w(x1,y1); // obere Portion var uint64 lo = mulu32_w(x0,y0); // untere Portion {var uint64 mid = mulu32_w(x0,y1); // 1. mittlere Portion hi += high32(mid); mid = highlow64_0(low32(mid)); lo += mid; if (lo < mid) { hi += 1; } // 128-Bit-Addition } {var uint64 mid = mulu32_w(x1,y0); // 2. mittlere Portion hi += high32(mid); mid = highlow64_0(low32(mid)); lo += mid; if (lo < mid) { hi += 1; } // 128-Bit-Addition } mulu64_high = hi; return lo; } } // namespace cln #endif cln-1.3.3/src/base/low/cl_low_isqrt.cc0000644000000000000000000000613511201634736014502 0ustar // isqrt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/cl_low.h" // Implementation. namespace cln { // Zieht die Ganzzahl-Wurzel aus einer 32-Bit-Zahl und // liefert eine 16-Bit-Wurzel. // isqrt(x) // > uintL x : Radikand, >=0, <2^32 // < uintL ergebnis : Wurzel, >=0, <2^16 uintL isqrt (uintL x) { // Methode: // x=0 -> y=0, fertig. // y := 2^k als Anfangswert, wobei k>0, k<=16 mit 2^(2k-2) <= x < 2^(2k) sei. // y := floor((y + floor(x/y))/2) als nächster Wert, // solange z := floor(x/y) < y, setze y := floor((y+z)/2). // y ist fertig. // (Beweis: // 1. Die Folge der y ist streng monoton fallend. // 2. Stets gilt y >= floor(sqrt(x)) (denn für alle y>0 ist // y + x/y >= 2*sqrt(x) und daher floor((y + floor(x/y))/2) = // floor(y/2 + x/(2*y)) >= floor(sqrt(x)) ). // 3. Am Schluß gilt x >= y^2. // ) if (x==0) return 0; // x=0 -> y=0 { var uintC k2; integerlength32(x,k2=); // 2^(k2-1) <= x < 2^k2 {var uintC k1 = floor(k2-1,2); // k1 = k-1, k wie oben if (k1 < 16-1) // k < 16 { var uintL y = (x >> (k1+2)) | bit(k1); // stets 2^(k-1) <= y < 2^k loop { var uintL z; divu_3216_1616(x,y, z=,); // Dividiere x/y (geht, da x/y < 2^(2k)/2^(k-1) = 2^(k+1) <= 2^16) if (z >= y) break; y = floor(z+y,2); // geht, da z+y < 2*y < 2^(k+1) <= 2^16 } return y; } else // k = 16, Vorsicht! { var uintL x1 = high16(x); var uintL y = (x >> (16+1)) | bit(16-1); // stets 2^(k-1) <= y < 2^k loop { var uintL z; if (x1 >= y) break; // Division x/y ergäbe Überlauf -> z > y divu_3216_1616(x,y, z=,); // Dividiere x/y if (z >= y) break; y = floor(z+y,2); } return y; } }} } #ifdef HAVE_LONGLONG uintL isqrt (uintQ x) { // As isqrt (uintL) above, but with 64-bit numbers. if (x==0) return 0; // x=0 -> y=0 { var uintC k2; integerlength64(x,k2=); // 2^(k2-1) <= x < 2^k2 {var uintC k1 = floor(k2-1,2); // k1 = k-1, k as above if (k1 < 32-1) // k < 32 { var uintL y = (x >> (k1+2)) | bit(k1); // always 2^(k-1) <= y < 2^k loop { var uintL z; divu_6432_3232(high32(x),low32(x),y, z=,); // z := x/y (works, since x/y < 2^(2k)/2^(k-1) = 2^(k+1) <= 2^32) if (z >= y) break; y = floor(z+y,2); // geht, da z+y < 2*y < 2^(k+1) <= 2^32 } return y; } else // k = 32, careful! { var uintL x1 = high32(x); var uintL y = (x >> (32+1)) | bit(32-1); // stets 2^(k-1) <= y < 2^k loop { var uintL z; if (x1 >= y) break; // division x/y would overflow -> z > y divu_6432_3232(high32(x),low32(x),y, z=,); // divide x/y if (z >= y) break; y = floor(z+y,2); } return y; } }} } #endif } // namespace cln cln-1.3.3/src/base/low/cl_low_isqrt2.cc0000644000000000000000000000376511201634736014572 0ustar // isqrt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/cl_low.h" // Implementation. namespace cln { // Zieht die Ganzzahl-Wurzel aus einer 64-Bit-Zahl und // liefert eine 32-Bit-Wurzel. // isqrt(x1,x0) // > uintL2 x = x1*2^32+x0 : Radikand, >=0, <2^64 // < uintL ergebnis : Wurzel, >=0, <2^32 uintL isqrt (uintL x1, uintL x0) { // Methode: // x=0 -> y=0, fertig. // y := 2^k als Anfangswert, wobei k>0, k<=32 mit 2^(2k-2) <= x < 2^(2k) sei. // y := floor((y + floor(x/y))/2) als nächster Wert, // solange z := floor(x/y) < y, setze y := floor((y+z)/2). // y ist fertig. // (Beweis: // 1. Die Folge der y ist streng monoton fallend. // 2. Stets gilt y >= floor(sqrt(x)) (denn für alle y>0 ist // y + x/y >= 2*sqrt(x) und daher floor((y + floor(x/y))/2) = // floor(y/2 + x/(2*y)) >= floor(sqrt(x)) ). // 3. Am Schluß gilt x >= y^2. // ) if (x1==0) { return isqrt(x0); } // x klein? { var uintC k2; integerlength32(x1,k2=); // 2^(k2+32-1) <= x < 2^(k2+32) {var uintC k = ceiling(k2+32,2); // k wie oben if (k < 32) // k < 32 { var uintL y = ((x1 << (32-k)) | (x0 >> k) | bit(k)) >> 1; // stets 2^(k-1) <= y < 2^k loop { var uintL z; divu_6432_3232(x1,x0,y, z=,); // Dividiere x/y (geht, da x/y < 2^(2k)/2^(k-1) = 2^(k+1) <= 2^32) if (z >= y) break; y = floor(z+y,2); // geht, da z+y < 2*y < 2^(k+1) <= 2^32 } return y; } else // k = 32, Vorsicht! { var uintL y = (x1 >> 1) | bit(32-1); // stets 2^(k-1) <= y < 2^k loop { var uintL z; if (x1 >= y) break; // Division x/y ergäbe Überlauf -> z > y divu_6432_3232(x1,x0,y, z=,); // Dividiere x/y if (z >= y) break; y = floor(z+y,2) | bit(32-1); // y muß >= 2^(k-1) bleiben } return y; } }} } } // namespace cln cln-1.3.3/src/base/cl_offsetof.h0000644000000000000000000000111312034113706013314 0ustar // offsetof() and friends // in GCC 3.0/3.1 has the obscure property of redefining // offsetof every time it is included, not just the first time. // Therefore we do the same thing here, and make sure that this file // gets included after each include of . #undef offsetof #if defined(__GNUG__) #define offsetof(type,ident) ((long)&(((type*)1)->ident)-1) #else #define offsetof(type,ident) ((long)&(((type*)0)->ident)) #endif #ifndef _CL_OFFSETOF_H #define _CL_OFFSETOF_H #define offsetofa(type,ident) offsetof(type,ident[0]) #endif /* _CL_OFFSETOF_H */ cln-1.3.3/src/base/cl_maybe_inline.h0000644000000000000000000000760611201634736014157 0ustar // CLN internal inlining hints #ifndef _CL_MAYBE_INLINE_H #define _CL_MAYBE_INLINE_H #include "cl_config.h" /* * Selectively inline a function in *some* translation units. * * The need to inline a function in some places and not in others came from * three situations: * * 1) Some functions, like cl_SF_zerop or cl_FF_zerop, are just a single * machine instruction when inlined. Putting their definitions into a public * header would expose too many internals of the library, leading violation * of abstraction and increased compilation times. Still, it would be nice * to use the inline version of these functions in the library itself. * * 2) Some functions, like cl_{SF,FF,DF,LF}_idecode, are usually only * invoked through a dispatcher cl_F_idecode that does nothing but dispatch * the call to the right function. Here inlining is used, regardless of * the size of the inlined functions, because it removes one function call * from the chain of function calls. A compiler cannot know that this * caller is the main caller for the 4 inlined functions. * * 3) Similarly, cl_I_from_NDS would be a bottleneck if not inlined: every * creation of a new cl_I goes through this function. A compiler cannot * know a priori the bottlenecks. * * Hence, there is a set of macros which help to create inline and * non-inline versions of a function without duplicating the code. * * Usage: * * 1. In the public header, declare function as usual: * * extern cl_bar cl_foo(const cl_baz&); * * 2. Put the definition into a separate file, say, cl_foo.cc, in the * following way: * * // cl_foo.cc * * #include "cl_macros.h" * #include "whatever/you/need.h" * * CL_INLINE cl_bar CL_INLINE_DECL(cl_foo)(const cl_baz& x) * { * // the actual code goes here * } * * This provides normal (non-inline) version of a function cl_foo. * * 3. In order to use the inline version, do * * // cl_blah.cc * * #include "cl_inline.h" * #include "path/to/cl_foo.cc" * * This will declare and define function cl_foo_inline, which is an inline * version of cl_foo. * * XXX: * The name of the inline version *really* has to be different, since ISO C++ * demands (in 7.1.2.4) * * "If a function with external linkage is declared inline in one translation * unit, it shall be declared inline in all translation units in which it * appears; no diagnostic is required." * * Feel free to implement this functionality in a better *standard-compliant* * way. Or submit a DR (defect report) to the standard committee. */ #define CL_INLINE #define CL_INLINE_DECL(fcn) fcn /* * Use these macros to provide inline and non-inline versions of a function * which uses an inline version of other function(s). */ #define CL_INLINE2 #define CL_INLINE2_DECL(fcn) fcn /* * Some functions (zerop, signum, etc) just dispatch the call to the * appropriate type-specific functions. It would be nice to have these * type-specific functions inlined. However, the compiler can not know that, * unless one gives it a hint. * * Usage: * * const cl_foo CL_FLATTEN cl_bar(const cl_R& x) * { * // the actual code * } * * Please note: * * 1. This is only a *hint*, it's always up to the compiler to NOT inline * a function. * 2. It's ignored if the optimization is switched off. */ #if defined(CL_HAVE_ATTRIBUTE_FLATTEN) #define CL_FLATTEN __attribute__((flatten)) #else #define CL_FLATTEN #endif /* * Tell the compiler to inline a function more aggressively, i.e. even if the * optimization is switched off. * * Usage: * * cl_blah CL_INLINE_HINT cl_foo(const cl_baz& x) * { * // the actual code * } * * Notes: * 1. This is only a hint, it does NOT guarantee the function will be * actually always inlined. * 2. CL_INLINE and CL_INLINE2 macros set this attribute automagically. */ #ifdef __GNUC__ #define CL_INLINE_HINT __attribute__((always_inline)) #else #define CL_INLINE_HINT #endif #endif /* _CL_MAYBE_INLINE_H */ cln-1.3.3/src/base/cl_condition.cc0000644000000000000000000000057711201634736013650 0ustar // Conditions. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/condition.h" // Implementation. namespace cln { // This tells the compiler to put the `cl_condition' vtable into this file. void cl_condition::dummy () {} // The destructor must be defined although it is virtual and abstract. cl_condition::~cl_condition () {} } // namespace cln cln-1.3.3/src/base/digitseq/0000755000000000000000000000000012173046202012467 5ustar cln-1.3.3/src/base/digitseq/cl_2DS_recip.cc0000644000000000000000000000353611201634736015243 0ustar // recip2adic(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/digitseq/cl_2DS.h" // Implementation. #include "base/digit/cl_2D.h" #include "base/digitseq/cl_DS.h" // Break-even point of the Newton iteration vs. standard div2adic. #if CL_USE_GMP const unsigned int recip2adic_threshold = 620; #else // Use the old default values from CLN version <= 1.0.3 as a crude estimate. const unsigned int recip2adic_threshold = 380; #endif namespace cln { void recip2adic (uintC len, const uintD* a_LSDptr, uintD* dest_LSDptr) { // Method: // If len < threshold, use regular 2-adic division. // Else [Newton iteration] set n := ceiling(len/2), // compute recursively b := recip2adic(a mod 2^(intDsize*n)), // return 2*b-a*b^2 mod 2^(intDsize*2*n). CL_ALLOCA_STACK; var uintL k = 0; // number of Newton steps var uintC n = len; while (n >= recip2adic_threshold) { n = ceiling(n,2); k++; } // Nonrecursive step. var uintD* one_LSDptr; num_stack_alloc(n,,one_LSDptr=); lspref(one_LSDptr,0) = 1; clear_loop_lsp(one_LSDptr lspop 1,n-1); div2adic(n,one_LSDptr,a_LSDptr,dest_LSDptr); // Newton iteration. if (k > 0) { var uintD* b2_LSDptr; var uintD* prod_LSDptr; num_stack_alloc(len+1,,b2_LSDptr=); num_stack_alloc(2*len,,prod_LSDptr=); do { // n = ceiling(len/2^k) // Compute n2 = ceiling(len/2^(k-1)), // then n = ceiling(n2/2). k--; var uintC n2 = ((len-1)>>k)+1; // = 2*n or = 2*n-1 // Set b := 2*b-a*b^2 mod 2^(intDsize*n2) cl_UDS_mul_square(dest_LSDptr,n,b2_LSDptr); // b^2 cl_UDS_mul(b2_LSDptr,n2,a_LSDptr,n2,prod_LSDptr); // a*b^2 clear_loop_lsp(dest_LSDptr lspop n,n2-n); shift1left_loop_lsp(dest_LSDptr,n+1); // (n+1 instead of n2 is ok) subfrom_loop_lsp(prod_LSDptr,dest_LSDptr,n2); n = n2; } while (k > 0); } } // Bit complexity (N := len): O(M(N)). } // namespace cln cln-1.3.3/src/base/digitseq/cl_DS_random.cc0000644000000000000000000000163611201634736015336 0ustar // Digit sequence level random number generator. // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/random/cl_random_impl.h" // Implementation. #include "cln/random.h" #include "base/digitseq/cl_DS.h" #include "base/cl_low.h" namespace cln { void random_UDS (random_state& randomstate, uintD* ptr, uintC len) { var uintC count; #if (intDsize==64) dotimesC(count,len, { mspref(ptr,0) = random64(randomstate); ptr = ptr mspop 1; }); #else // (intDsize<=32) dotimesC(count,floor(len,32/intDsize), { var uint32 next = random32(randomstate); // weitere 32/intDsize Digits besorgen set_32_Dptr(ptr,next); ptr = ptr mspop 32/intDsize; }); len = len % (32/intDsize); // Anzahl noch fehlender Digits if (len>0) { var uint32 next = random32(randomstate); // weitere 32/intDsize Digits besorgen set_max32_Dptr(intDsize*len,ptr,next); } #endif } } // namespace cln cln-1.3.3/src/base/digitseq/cl_asm_hppa_.cc0000644000000000000000000000621111547674605015425 0ustar // Externe Routinen zu ARILEV1.D // Prozessor: HPPA, wegen XMPYU nur auf HPPA 1.1 (etwa HP9000/720) // Compiler: GNU-C oder HP-C // Parameter-Übergabe: in Registern %arg0,%arg1,%arg2, Rückgabewert in %ret0. // Einstellungen: intCsize=32, intDsize=32. // Großenteils abgeschrieben von hppa.s aus der PARI/GP-Distribution. .SHORTDATA .IMPORT $global$,DATA .CODE .EXPORT length32 // Liefert integer-size (>=1, <=32) des Arguments /=0. length32 .PROC .CALLINFO .ENTER // Input in %arg0, Output in %ret0 // y = 1; LDI 1,%ret0 // if (x & (bit(31-15)*(bit(16)-1)) == 0) EXTRU,<> %arg0,15,16,%r0 SHD,TR %arg0,%r0,16,%arg0 // x = x<<(32-16); else ADDI 16,%ret0,%ret0 // y = y+16; // if (x & (bit(31-7)*(bit(8)-1)) == 0) EXTRU,<> %arg0,7,8,%r0 SHD,TR %arg0,%r0,24,%arg0 // x = x<<(32-24); else ADDI 8,%ret0,%ret0 // y = y+8; // if (x & (bit(31-3)*(bit(4)-1)) == 0) EXTRU,<> %arg0,3,4,%r0 SHD,TR %arg0,%r0,28,%arg0 // x = x<<(32-28); else ADDI 4,%ret0,%ret0 // y = y+4; // if (x & (bit(31-1)*(bit(2)-1)) == 0) EXTRU,<> %arg0,1,2,%r0 SHD,TR %arg0,%r0,30,%arg0 // x = x<<(32-30); else ADDI 2,%ret0,%ret0 // y = y+2; // if (x & (bit(31-0)*(bit(1)-1)) != 0) EXTRU,= %arg0,0,1,%r0 ADDI 1,%ret0,%ret0 // y = y+1; .LEAVE .PROCEND #ifndef __GNUC__ /* mit GNU-C machen wir mulu32() als Macro, der inline multipliziert */ .SHORTDATA .EXPORT mulu32_high .ALIGN 8 mulu32_high .WORD // 8 Byte Platz .WORD .CODE .EXPORT mulu32_ // extern struct { uint32 lo; uint32 hi; } mulu32_ (uint32 arg1, uint32 arg2); // 2^32*hi+lo := arg1*arg2. mulu32_ .PROC .CALLINFO .ENTER // Input in %arg0,%arg1, Output in %ret0,mulu32_high LDIL L'mulu32_high-$global$,%r1 LDO R'mulu32_high-$global$(%r1),%r1 // %r1 = &x STW %arg0,0(%r1) // x abspeichern FLDWS 0(%r1),%fr4 // und in den Coprozessor laden STW %arg1,0(%r1) // y abspeichern FLDWS 0(%r1),%fr5 // und in den Coprozessor laden XMPYU %fr4,%fr5,%fr6 // beides multiplizieren FSTDS %fr6,0(%r1) // Ergebnis (64 Bit) abspeichern LDWS 4(%r1),%ret0 // low 32 Bit als Ergebnis .LEAVE .PROCEND #endif .END cln-1.3.3/src/base/digitseq/cl_asm_sparc64.h0000644000000000000000000000030611201634736015445 0ustar // List the contents of cl_asm_sparc64.cc. #define COPY_LOOPS #define FILL_LOOPS #define CLEAR_LOOPS #define LOG_LOOPS #define TEST_LOOPS #define ADDSUB_LOOPS #define SHIFT_LOOPS #define MUL_LOOPS cln-1.3.3/src/base/digitseq/cl_asm.h0000644000000000000000000000125211201634736014104 0ustar // Includes the CPU specific cl_asm_*.h file. #include "cl_config.h" #include "base/digitseq/cl_DS_endian.h" #ifndef NO_ASM #if defined(__m68k__) && (intCsize==16) #include "cl_asm_m68k.h" #endif #if defined(__sparc__) && !defined(__sparc64__) #include "cl_asm_sparc.h" #endif #if defined(__sparc64__) #include "cl_asm_sparc64.h" #endif #if defined(__i386__) #include "cl_asm_i386.h" #endif #if (defined(__mips__) || defined(__mipsel__)) && !defined(__mips64__) && (intDsize==32) #include "cl_asm_mips.h" #endif #if defined(__hppa__) && (intDsize==32) #include "cl_asm_hppa.h" #endif #if defined(__arm__) #include "cl_asm_arm.h" #endif #endif // ndef NO_ASM cln-1.3.3/src/base/digitseq/cl_DS_trandom.cc0000644000000000000000000000305211201634736015514 0ustar // Digit sequence level random number generator. // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/random/cl_random_impl.h" // Implementation. #include "cln/random.h" #include "base/digitseq/cl_DS.h" #include "base/cl_low.h" namespace cln { void testrandom_UDS (random_state& randomstate, uintD* MSDptr, uintC len) { // Idea from Torbjörn Granlund, see his "random2.c" file in gmp 2.0. var uintD* ptr = MSDptr mspop len; DS_clear_loop(MSDptr,len,ptr); var uintC bit_pos = 0; var uint32 ran = 0; var uintC ran_bits = 0; while (bit_pos < intDsize*len) { if (ran_bits < log2_intDsize+1) { ran = random32(randomstate); ran_bits = 32; } var uintL n_bits = (ran >> 1) % intDsize + 1; // number of bits if (ran & 1) { // put in a bit string of n_bits bits at position bit_pos. if (bit_pos + n_bits > intDsize*len) { n_bits = intDsize*len - bit_pos; } if (bit_pos / intDsize == (bit_pos + n_bits - 1) / intDsize) { // need to modify one digit lspref(ptr,bit_pos/intDsize) |= (((uintD)1 << n_bits) - 1) << (bit_pos%intDsize); } else { // need to modify two adjacent digits lspref(ptr,bit_pos/intDsize) |= ((uintD)(-1) << (bit_pos%intDsize)); lspref(ptr,bit_pos/intDsize+1) |= (((uintD)1 << ((bit_pos+n_bits)%intDsize)) - 1); } } bit_pos = bit_pos + n_bits; ran = ran >> (log2_intDsize+1); ran_bits -= log2_intDsize+1; } } } // namespace cln cln-1.3.3/src/base/digitseq/cl_DS_div.cc0000644000000000000000000005232611201634736014642 0ustar // cl_UDS_divide(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/digitseq/cl_DS.h" // Implementation. #include "cln/exception.h" namespace cln { // We observe the following timings in seconds: // Time for dividing a 2*n word number by a n word number: // OS: Linux 2.2, intDsize==32, OS: TRU64/4.0, intDsize==64, // Machine: P-III/450MHz Machine: EV5/300MHz: // n standard Newton standard Newton // 10 0.000010 0.000024 0.000036 0.000058 // 30 0.000026 0.000080 0.00012 0.00027 // 100 0.00018 0.00048 0.00084 0.0016 // 300 0.0013 0.0028 0.0062 0.0090 // 1000 0.014 0.019 0.064 0.066 <-(~2200) // 2000 0.058 0.058 <-(~2000) 0.26 0.20 // 3000 0.20 0.11 0.57 0.24 // 10000 2.3 0.50 6.7 1.2 // 30000 24.4 1.2 62.0 2.8 // Time for dividing a 3*n word number by a n word number: // OS: Linux 2.2, intDsize==32, OS: TRU64/4.0, intDsize==64, // Machine: P-III/450MHz Machine: EV5/300MHz: // n standard Newton standard Newton // 10 0.000013 0.000040 0.000063 0.00011 // 30 0.000046 0.00018 0.00024 0.00062 // 100 0.00035 0.0012 0.0016 0.0040 // 300 0.0027 0.0071 0.012 0.021 // 1000 0.029 0.047 0.13 0.16 // 2000 0.12 0.14 <-(~2200) 0.51 0.45 <-(~1600) // 3000 0.40 0.22 1.1 0.52 // 10000 4.5 0.76 13.2 2.0 // 30000 42.0 2.8 123.0 6.0 // Time for dividing m digits by n digits: // OS: Linux 2.2, intDsize==32, OS: TRU64/4.0, intDsize==64, // Machine: P-III/450MHz Machine: EV5/300MHz: // n Newton faster for: Newton faster for: // 2-400 never never // 600 never 670 n { if (n < 900) return false; else if (n < 2200) return (m >= n+50) && (m < 2*n-600); else return m >= n+30; } #else // Use the old default values from CLN version <= 1.0.3 as a crude estimate. // They came from the timings for dividing m digits by n digits on an i486/33: // Dividing 2*N digits by N digits: Dividing 3*N digits by N digits: // N standard Newton standard Newton // 10 0.0003 0.0012 0.0006 0.0025 // 25 0.0013 0.0044 0.0026 0.0103 // 50 0.0047 0.0125 0.0092 0.030 // 100 0.017 0.037 0.035 0.089 // 250 0.108 0.146 0.215 0.362 // 500 0.43 0.44 <-(~550) 0.85 1.10 // 1000 1.72 1.32 3.44 3.21 <-(~740) // 2500 11.2 4.1 23.3 7.9 // 5000 44.3 9.5 89.0 15.6 // 10000 187 20.6 362 33.1 // Time for dividing m digits by n digits: // n = 2,3,5,10,25,50,100,250: Newton never faster. // n = 400: Newton faster for m >= 440, m < 600 // n = 500: Newton faster for m >= 530, m < 900 // n = 600: Newton faster for m >= 630, m < 1250 // n = 700: Newton faster for m >= 730, m < 1530 // n = 800: Newton faster for m >= 825, m < 2600 or m >= 5300 // n = 900: Newton faster for m >= 925, m < 2700 or m >= 3400 // n = 1000: Newton faster for m >= 1020 // n = 1500: Newton faster for m >= 1520 // n = 2000: Newton faster for m >= 2020 // n = 2500: Newton faster for m >= 2520 // n = 5000: Newton faster for m >= 5020 static inline bool cl_recip_suitable (uintC m, uintC n) // m > n { if (n < 500) return false; else if (n < 1000) return (m >= n+30) && (m < 3*n-600); else return m >= n+20; } #endif // Dividiert zwei Unsigned Digit sequences durcheinander. // UDS_divide(a_MSDptr,a_len,a_LSDptr, b_MSDptr,b_len,b_LSDptr, &q,&r); // Die UDS a = a_MSDptr/a_len/a_LSDptr (a>=0) wird durch // die UDS b = b_MSDptr/b_len/b_LSDptr (b>=0) dividiert: // a = q * b + r mit 0 <= r < b. Bei b=0 Error. // q der Quotient, r der Rest. // q = q_MSDptr/q_len/q_LSDptr, r = r_MSDptr/r_len/r_LSDptr beides // Normalized Unsigned Digit sequences. // Vorsicht: q_LSDptr <= r_MSDptr, // Vorzeichenerweiterung von r kann q zerstören! // Vorzeichenerweiterung von q ist erlaubt. // a und b werden nicht modifiziert. // // Methode: // erst a und b normalisieren: a=[a[m-1],...,a[0]], b=[b[n-1],...,b[0]] // mit m>=0 und n>0 (Stellensystem der Basis beta=2^intDsize). // Falls m=n=1, Single-Precision-Division: // r:=0, j:=m, // while j>0 do // {Hier (q[m-1]*beta^(m-1)+...+q[j]*beta^j) * b[0] + r*beta^j = // = a[m-1]*beta^(m-1)+...+a[j]*beta^j und 0<=r=n>1, Multiple-Precision-Division: // Es gilt a/b < beta^(m-n+1). // s:=intDsize-1-(Nummer des höchsten Bits in b[n-1]), 0<=s=beta/2. // Für j=m-n,...,0: {Hier 0 <= r < b*beta^(j+1).} // Berechne q* : // q* := floor((r[j+n]*beta+r[j+n-1])/b[n-1]). // Bei Überlauf (q* >= beta) setze q* := beta-1. // Berechne c2 := ((r[j+n]*beta+r[j+n-1]) - q* * b[n-1])*beta + r[j+n-2] // und c3 := b[n-2] * q*. // {Es ist 0 <= c2 < 2*beta^2, sogar 0 <= c2 < beta^2 falls kein // Überlauf aufgetreten war. Ferner 0 <= c3 < beta^2. // Bei Überlauf und r[j+n]*beta+r[j+n-1] - q* * b[n-1] >= beta, // das heißt c2 >= beta^2, kann man die nächste Abfrage überspringen.} // Solange c3 > c2, {hier 0 <= c2 < c3 < beta^2} setze // q* := q* - 1, c2 := c2 + b[n-1]*beta, c3 := c3 - b[n-2]. // Falls q* > 0: // Setze r := r - b * q* * beta^j, im einzelnen: // [r[n+j],...,r[j]] := [r[n+j],...,r[j]] - q* * [b[n-1],...,b[0]]. // also: u:=0, for i:=0 to n-1 do // u := u + q* * b[i], // r[j+i]:=r[j+i]-(u mod beta) (+ beta, falls Carry), // u:=u div beta (+ 1, falls bei der Subtraktion Carry) // r[n+j]:=r[n+j]-u. // {Da stets u = (q* * [b[i-1],...,b[0]] div beta^i) + 1 // < q* + 1 <= beta, läuft der Übertrag u nicht über.} // Tritt dabei ein negativer Übertrag auf, so setze q* := q* - 1 // und [r[n+j],...,r[j]] := [r[n+j],...,r[j]] + [0,b[n-1],...,b[0]]. // Setze q[j] := q*. // Normalisiere [q[m-n],..,q[0]] und erhalte den Quotienten q, // Schiebe [r[n-1],...,r[0]] um s Bits nach rechts, normalisiere und // erhalte den Rest r. // Dabei kann q[j] auf dem Platz von r[n+j] liegen. void cl_UDS_divide (const uintD* a_MSDptr, uintC a_len, const uintD* a_LSDptr, const uintD* b_MSDptr, uintC b_len, const uintD* b_LSDptr, uintD* roomptr, // ab roomptr kommen a_len+1 freie Digits DS* q_, DS* r_) { // a normalisieren (a_MSDptr erhöhen, a_len erniedrigen): while ((a_len>0) && (mspref(a_MSDptr,0)==0)) { msshrink(a_MSDptr); a_len--; } // b normalisieren (b_MSDptr erhöhen, b_len erniedrigen): loop { if (b_len==0) { throw division_by_0_exception(); } if (mspref(b_MSDptr,0)==0) { msshrink(b_MSDptr); b_len--; } else break; } // jetzt m=a_len >=0 und n=b_len >0. if (a_len < b_len) // mMSDptr = r_MSDptr; q_->len = 0; q_->LSDptr = r_MSDptr; // q = 0, eine NUDS r_->MSDptr = r_MSDptr; r_->len = a_len; r_->LSDptr = r_LSDptr; // r = Kopie von a, eine NUDS return; } elif (b_len==1) // n=1: Single-Precision-Division { // beta^(m-1) <= a < beta^m ==> beta^(m-2) <= a/b < beta^m var uintD* q_MSDptr = roomptr; var uintD* q_LSDptr = q_MSDptr mspop a_len; var uintD* r_MSDptr = q_LSDptr; var uintD* r_LSDptr = r_MSDptr mspop 1; // Speicheraufbau: q_MSDptr/a_len/q_LSDptr r_MSDptr/1/r_LSDptr // | q | | r | {var uintD rest = divucopy_loop_msp(mspref(b_MSDptr,0),a_MSDptr,q_MSDptr,a_len); // Division durch b[0] var uintC r_len; if (!(rest==0)) { mspref(r_MSDptr,0) = rest; r_len=1; } // Rest als r ablegen else { r_MSDptr = r_LSDptr; r_len=0; } // Rest auf 0 normalisieren if (mspref(q_MSDptr,0)==0) { msshrink(q_MSDptr); a_len--; } // q normalisieren q_->MSDptr = q_MSDptr; q_->len = a_len; q_->LSDptr = q_LSDptr; // q ablegen r_->MSDptr = r_MSDptr; r_->len = r_len; r_->LSDptr = r_LSDptr; // r ablegen return; }} else // n>1: Multiple-Precision-Division { // beta^(m-1) <= a < beta^m, beta^(n-1) <= b < beta^n ==> // beta^(m-n-1) <= a/b < beta^(m-n+1). var uintL s; CL_ALLOCA_STACK; // s bestimmen: { var uintD msd = mspref(b_MSDptr,0); // b[n-1] #if 0 s = 0; while ((sintD)msd >= 0) { msd = msd<<1; s++; } #else // ein wenig effizienter, Abfrage auf s=0 vorwegnehmen if ((sintD)msd < 0) { s = 0; goto shift_ok; } else { integerlengthD(msd, s = intDsize - ); goto shift; } #endif } // 0 <= s < intDsize. // Kopiere b und schiebe es dabei um s Bits nach links: if (!(s==0)) shift: { var uintD* new_b_MSDptr; var uintD* new_b_LSDptr; num_stack_alloc(b_len,new_b_MSDptr=,new_b_LSDptr=); shiftleftcopy_loop_lsp(b_LSDptr,new_b_LSDptr,b_len,s); b_MSDptr = new_b_MSDptr; b_LSDptr = new_b_LSDptr; } shift_ok: // Wieder b = b_MSDptr/b_len/b_LSDptr. // Kopiere a und schiebe es dabei um s Bits nach links, erhalte r: {var uintD* r_MSDptr = roomptr; var uintD* r_LSDptr = roomptr mspop (a_len+1); // Speicheraufbau: r_MSDptr/ a_len+1 /r_LSDptr // | r | // später: q_MSDptr/a_len-b_len+1/r_MSDptr/b_len/r_LSDptr // | q | r | if (s==0) { copy_loop_lsp(a_LSDptr,r_LSDptr,a_len); mspref(r_MSDptr,0) = 0; } else { mspref(r_MSDptr,0) = shiftleftcopy_loop_lsp(a_LSDptr,r_LSDptr,a_len,s); } // Nun r = r_MSDptr/a_len+1/r_LSDptr. var uintC j = a_len-b_len; // m-n var uintD* q_MSDptr = r_MSDptr; var uintC q_len = j+1; // q wird m-n+1 Digits haben if (cl_recip_suitable(a_len,b_len)) { // Bestimme Kehrwert c von b. var uintD* c_MSDptr; var uintD* c_LSDptr; num_stack_alloc(j+3,c_MSDptr=,c_LSDptr=); cl_UDS_recip(b_MSDptr,b_len,c_MSDptr,j+1); // c hat j+3 Digits, | beta^(m+2)/b - c | < beta. // Mit a' = floor(a/beta^n) multiplizieren, liefert d': var uintD* d_MSDptr; UDS_UDS_mul_UDS(j+1,r_MSDptr mspop (j+1), j+3,c_MSDptr mspop (j+3), d_MSDptr=,,); // d' has 2*j+4 digits, d := floor(d'/beta^(j+2)) has j+2 digits. // | beta^(m+2)/b - c | < beta ==> (since a < beta^(m+1)) // | beta^(m+2)*a/b - a*c | < beta^(m+2), // 0 <= a - a'*beta^n < beta^n ==> (since c <= 2*beta^(j+2)) // 0 <= a*c - a'*c*beta^n < 2*beta^(m+2) ==> // -beta^(m+2) < beta^(m+2)*a/b - a'*c*beta^n < 3*beta^(m+2) ==> // -1 < a/b - a'*c*beta^(-j-2) < 3 ==> // -1 < a/b - d'*beta^(-j-2) < 3, // -1 < d'*beta^(-j-2) - d <= 0 ==> // -2 < a/b - d < 3 ==> // -2 <= q - d < 3 ==> |q-d| <= 2. var uintD* d_LSDptr = d_MSDptr mspop (j+2); // Zur Bestimmung des Restes wieder mit b multiplizieren: var uintD* p_MSDptr; var uintD* p_LSDptr; UDS_UDS_mul_UDS(j+2,d_LSDptr, b_len,b_LSDptr, p_MSDptr=,,p_LSDptr=); // d ist um höchstens 2 zu groß, muß also evtl. zweimal um 1 // decrementieren, bis das Produkt <= a wird. if ((mspref(p_MSDptr,0) > 0) || (compare_loop_msp(p_MSDptr mspop 1,r_MSDptr,a_len+1) > 0)) { dec_loop_lsp(d_LSDptr,j+2); if (subfrom_loop_lsp(b_LSDptr,p_LSDptr,b_len)) dec_loop_lsp(p_LSDptr lspop b_len,j+2); if ((mspref(p_MSDptr,0) > 0) || (compare_loop_msp(p_MSDptr mspop 1,r_MSDptr,a_len+1) > 0)) { dec_loop_lsp(d_LSDptr,j+2); if (subfrom_loop_lsp(b_LSDptr,p_LSDptr,b_len)) dec_loop_lsp(p_LSDptr lspop b_len,j+2); if ((mspref(p_MSDptr,0) > 0) || (compare_loop_msp(p_MSDptr mspop 1,r_MSDptr,a_len+1) > 0)) throw runtime_exception(); } } // Rest bestimmen: subfrom_loop_lsp(p_LSDptr,r_LSDptr,a_len+1); if (test_loop_msp(r_MSDptr,j)) throw runtime_exception(); r_MSDptr = r_LSDptr lspop b_len; // = r_MSDptr mspop (j+1); // d ist um höchstens 2 zu klein, muß also evtl. zweimal um 1 // incrementieren, bis der Rest < b wird. if ((lspref(r_MSDptr,0) > 0) || (compare_loop_msp(r_MSDptr,b_MSDptr,b_len) >= 0)) { inc_loop_lsp(d_LSDptr,j+2); if (subfrom_loop_lsp(b_LSDptr,r_LSDptr,b_len)) lspref(r_LSDptr,b_len) -= 1; if ((lspref(r_MSDptr,0) > 0) || (compare_loop_msp(r_MSDptr,b_MSDptr,b_len) >= 0)) { inc_loop_lsp(d_LSDptr,j+2); if (subfrom_loop_lsp(b_LSDptr,r_LSDptr,b_len)) lspref(r_LSDptr,b_len) -= 1; if ((lspref(r_MSDptr,0) > 0) || (compare_loop_msp(r_MSDptr,b_MSDptr,b_len) >= 0)) throw runtime_exception(); } } // r ist fertig, q := d. if (mspref(d_MSDptr,0) > 0) throw runtime_exception(); q_len = j+1; copy_loop_msp(d_MSDptr mspop 1,q_MSDptr,q_len); } else { var uintD* r_ptr = r_LSDptr lspop j; // Pointer oberhalb von r[j] j = j+1; var uintD b_msd = mspref(b_MSDptr,0); // b[n-1] var uintD b_2msd = mspref(b_MSDptr,1); // b[n-2] #if HAVE_DD var uintDD b_msdd = highlowDD(b_msd,b_2msd); // b[n-1]*beta+b[n-2] #endif // Divisions-Schleife: (wird m-n+1 mal durchlaufen) // j = Herabzähler, b_MSDptr/b_len/b_LSDptr = [b[n-1],...,b[0]], b_len=n, // r_MSDptr = Pointer auf r[n+j] = Pointer auf q[j], // r_ptr = Pointer oberhalb von r[j]. do { var uintD q_stern; var uintD c1; if (mspref(r_MSDptr,0) < b_msd) // r[j+n] < b[n-1] ? { // Dividiere r[j+n]*beta+r[j+n-1] durch b[n-1], ohne Überlauf: #if HAVE_DD divuD(highlowDD(mspref(r_MSDptr,0),mspref(r_MSDptr,1)),b_msd, q_stern=,c1=); #else divuD(mspref(r_MSDptr,0),mspref(r_MSDptr,1),b_msd, q_stern=,c1=); #endif } else { // Überlauf, also r[j+n]*beta+r[j+n-1] >= beta*b[n-1] q_stern = bitm(intDsize)-1; // q* = beta-1 // Teste ob r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] >= beta // <==> r[j+n]*beta+r[j+n-1] + b[n-1] >= beta*b[n-1]+beta // <==> b[n-1] < floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) {<= beta !} ist. // Wenn ja, direkt zur Subtraktionschleife. // (Andernfalls ist r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] < beta // <==> floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) = b[n-1] ). if ((mspref(r_MSDptr,0) > b_msd) || ((c1 = mspref(r_MSDptr,1)+b_msd) < b_msd)) // r[j+n] >= b[n-1]+1 oder // r[j+n] = b[n-1] und Addition r[j+n-1]+b[n-1] gibt Carry ? { goto subtract; } // ja -> direkt in die Subtraktion } // q_stern = q*, // c1 = (r[j+n]*beta+r[j+n-1]) - q* * b[n-1] (>=0, 0, um b[n-1]*beta+b[n-2] erniedrigen. // Dies kann wegen b[n-1]*beta+b[n-2] >= beta^2/2 // höchstens zwei mal auftreten. if (c3 > c2) { q_stern = q_stern-1; // q* := q* - 1 if (c3-c2 > b_msdd) { q_stern = q_stern-1; } // q* := q* - 1 } } #else // Wie oben, nur mit zweigeteilten c2=[c2hi|c2lo] und c3=[c3hi|c3lo]: #define c2hi c1 { var uintD c2lo = mspref(r_MSDptr,2); // c2hi*beta+c2lo = c1*beta+r[j+n-2] var uintD c3hi; var uintD c3lo; muluD(b_2msd,q_stern, c3hi=,c3lo=); // c3hi*beta+c3lo = b[n-2] * q* if ((c3hi > c2hi) || ((c3hi == c2hi) && (c3lo > c2lo))) { q_stern = q_stern-1; // q* := q* - 1 c3hi -= c2hi; if (c3lo < c2lo) { c3hi--; }; c3lo -= c2lo; // c3 := c3-c2 if ((c3hi > b_msd) || ((c3hi == b_msd) && (c3lo > b_2msd))) { q_stern = q_stern-1; } // q* := q* - 1 } } #undef c2hi #endif if (!(q_stern==0)) subtract: { // Subtraktionsschleife: r := r - b * q* * beta^j var uintD carry = mulusub_loop_lsp(q_stern,b_LSDptr,r_ptr,b_len); // Noch r_ptr[-b_len-1] -= carry, d.h. r_MSDptr[0] -= carry // durchführen und danach r_MSDptr[0] vergessen: if (carry > mspref(r_MSDptr,0)) // Subtraktion ergab Übertrag { q_stern = q_stern-1; // q* := q* - 1 addto_loop_lsp(b_LSDptr,r_ptr,b_len); // Additionsschleife // r[n+j] samt Carry kann vergessen werden... } } // Berechnung von q* ist fertig. msprefnext(r_MSDptr) = q_stern; // als q[j] ablegen r_ptr = r_ptr mspop 1; } until (--j == 0); } // Nun ist q = [q[m-n],..,q[0]] = q_MSDptr/q_len/r_MSDptr // und r = [r[n-1],...,r[0]] = r_MSDptr/b_len/r_LSDptr. // q normalisieren und ablegen: if (mspref(q_MSDptr,0)==0) { msshrink(q_MSDptr); q_len--; } q_->MSDptr = q_MSDptr; q_->len = q_len; q_->LSDptr = r_MSDptr; // Schiebe [r[n-1],...,r[0]] um s Bits nach rechts: if (!(s==0)) { shiftright_loop_msp(r_MSDptr,b_len,s); } // r normalisieren und ablegen: while ((b_len>0) && (mspref(r_MSDptr,0)==0)) { msshrink(r_MSDptr); b_len--; } r_->MSDptr = r_MSDptr; r_->len = b_len; r_->LSDptr = r_LSDptr; return; }} } // Bit complexity (N = a_len): O(M(N)). } // namespace cln cln-1.3.3/src/base/digitseq/cl_DS_recipsqrt.cc0000644000000000000000000001540311201634736016067 0ustar // cl_UDS_recipsqrt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/digitseq/cl_DS.h" // Implementation. #include "base/cl_low.h" #include "cln/exception.h" namespace cln { // Compute the reciprocal square root of a digit sequence. // Input: UDS a_MSDptr/a_len/.. of length a_len, // with 1/4 <= a < 1. // [i.e. 1/4*beta^a_len <= a < beta^a_len] // Output: UDS b_MSDptr/b_len+2/.. of length b_len+1 (b_len>1), plus 1 more bit // in the last limb) such that // 1 <= b <= 2 [i.e. beta^b_len <= b <= 2*beta^b_len] // and | 1/sqrt(a) - b | < 1/2*beta^(-b_len). // If a_len > b_len, only the most significant b_len+1 limbs of a are used. extern void cl_UDS_recipsqrt (const uintD* a_MSDptr, uintC a_len, uintD* b_MSDptr, uintC b_len); // Method: // Using Newton iteration for computation of x^-1/2. // The Newton iteration for f(y) = x-1/y^2 reads: // y --> y - (x-1/y^2)/(2/y^3) = y + y*(1-x*y^2)/2 =: g(y). // We have T^3-3*T+2 = (T-1)^2*(T+2), hence // 1/sqrt(x) - g(y) = 1/(2*sqrt(x)) * (sqrt(x)*y-1)^2 * (sqrt(x)*y+2). // Hence g(y) <= 1/sqrt(x). // If we choose 0 < y_0 <= 1/sqrt(x), then set y_(n+1) := g(y_n), we will // always have 0 < y_n <= 1/sqrt(x). // Since // 1/sqrt(x) - g(y) = sqrt(x)*(sqrt(x)*y+2)/2 * (1/sqrt(x) - y)^2, // which is >= 0 and < 3/2 * (1/sqrt(x) - y)^2, we have a quadratically // convergent iteration. // For n = 1,2,...,b_len we compute approximations y with 1 <= yn <= 2 // and | 1/sqrt(x) - yn | < 1/2*beta^(-n). // Step n=1: // Compute the isqrt of the leading two digits of x, yields one digit. // Compute its reciprocal, then do one iteration as below (n=0 -> m=1). // Step n -> m with n < m <= 2*n: // Write x = xm + xr with 0 <= xr < beta^-(m+1). // Set ym' = yn + (yn*(1-xm*yn*yn))/2, round down to a multiple ym // of beta^-(m+1). // (Actually, compute yn*yn, round up to a multiple of beta^-(m+1), [1] // multiply with xm, round up to a multiple of beta^-(m+1), [2] // subtract from 1, no rounding needed, [2] // multiply with yn, round down to a multiple of beta^-(m+1), [5] // divide by 2, round down to a multiple of beta^-(m+1), [3] // add to yn, no rounding needed. [Max rounding error: ^]) // The exact value ym' (no rounding) would satisfy // 0 <= 1/sqrt(xm) - ym' < 3/2 * (1/sqrt(xm) - yn)^2 // < 3/8 * beta^(-2*n) by hypothesis, // <= 3/8 * beta^-m. // The rounding errors all go into the same direction, so // 0 <= ym' - ym < 3 * beta^-(m+1) < 1/4 * beta^-m. // Combine both inequalities: // 0 <= 1/sqrt(xm) - ym < 1/2 * beta^-m. // Neglecting xr can introduce a small error in the opposite direction: // 0 <= 1/sqrt(xm) - 1/sqrt(x) = (sqrt(x) - sqrt(xm))/(sqrt(x)*sqrt(xm)) // = xr / (sqrt(x)*sqrt(xm)*(sqrt(x)+sqrt(xm))) // <= 4*xr < 4*beta^-(m+1) < 1/2*beta^-m. // Combine both inequalities: // | 1/sqrt(x) - ym | < 1/2 * beta^-m. // (Actually, choosing the opposite rounding direction wouldn't hurt either.) // Choice of n: // So that the computation is minimal, e.g. in the case b_len=10: // 1 -> 2 -> 3 -> 5 -> 10 and not 1 -> 2 -> 4 -> 8 -> 10. void cl_UDS_recipsqrt (const uintD* a_MSDptr, uintC a_len, uintD* b_MSDptr, uintC b_len) { var uintC y_len = b_len+2; var uintC x_len = (a_len <= b_len ? a_len : b_len+1); var const uintD* const x_MSDptr = a_MSDptr; var uintD* y_MSDptr; var uintD* y2_MSDptr; var uintD* y3_MSDptr; var uintD* y4_MSDptr; CL_ALLOCA_STACK; num_stack_alloc(y_len,y_MSDptr=,); num_stack_alloc(2*y_len,y2_MSDptr=,); num_stack_alloc(2*y_len,y3_MSDptr=,); num_stack_alloc(2*y_len,y4_MSDptr=,); // Step n = 1. { var uintD x1 = mspref(x_MSDptr,0); var uintD x2 = (a_len > 1 ? mspref(x_MSDptr,1) : 0); var uintD y0; var uintD y1; var bool sqrtp; isqrtD(x1,x2, y1=,sqrtp=); // 2^31 <= y1 < 2^32. y0 = 1; if (!sqrtp) // want to compute 1/sqrt(x) rounded down if (++y1 == 0) goto step1_done; // 1/1.0000 = 1.0000 // Set y0|y1 := 2^(2*intDsize)/y1 // = 2^intDsize + (2^(2*intDsize)-2^intDsize*y1)/y1. if ((uintD)(-y1) >= y1) { y0 = 2; y1 = 0; } else { #if HAVE_DD divuD(highlowDD_0((uintD)(-y1)),y1, y1=,); #else divuD((uintD)(-y1),0,y1, y1=,); #endif } step1_done: mspref(y_MSDptr,0) = y0; mspref(y_MSDptr,1) = y1; } // Other steps. var int k; integerlengthC(b_len-1,k=); // 2^(k-1) < b_len <= 2^k, so we need k steps, plus one // one more step at the beginning (because step 1 was not complete). var uintC n = 0; for (; k>=0; k--) { var uintC m = ((b_len-1)>>k)+1; // = ceiling(b_len/2^k) // Compute ym := yn + (yn*(1-xm*yn*yn))/2, rounded. // Storage: at y_MSDptr: (1 + n+1) limbs, yn. // at y2_MSDptr: (2 + 2*n+2) limbs, yn^2. // at y3_MSDptr: (1 + m+1) limbs, xm*yn*yn, 1-xm*yn*yn. // at y4_MSDptr: (2-n + m+n+2) limbs, yn*(1-xm*yn*yn). clear_loop_msp(y_MSDptr mspop (n+2),m-n); cl_UDS_mul_square(y_MSDptr mspop (n+2),n+2, y2_MSDptr mspop 2*(n+2)); var uintC xm_len = (m < x_len ? m+1 : x_len); var uintC y2_len = m+2; // = (m+1 <= 2*n+2 ? m+2 : 2*n+3); cl_UDS_mul(x_MSDptr mspop xm_len,xm_len, y2_MSDptr mspop (y2_len+1),y2_len, y3_MSDptr mspop (xm_len+y2_len)); if (mspref(y3_MSDptr,0)==0) // xm*yn*yn < 1 { neg_loop_lsp(y3_MSDptr mspop (m+2),m+2); mspref(y3_MSDptr,0) += 1; if (test_loop_msp(y3_MSDptr,n)) throw runtime_exception(); // check 0 <= y3 < beta^-(n-1) cl_UDS_mul(y_MSDptr mspop (n+2),n+2, y3_MSDptr mspop (m+2),m+2-n, y4_MSDptr mspop (m+4)); shift1right_loop_msp(y4_MSDptr,m+3-n,0); if (addto_loop_lsp(y4_MSDptr mspop (m+3-n),y_MSDptr mspop (m+2),m+3-n)) if ((n<1) || inc_loop_lsp(y_MSDptr mspop (n-1),n-1)) throw runtime_exception(); } else // xm*yn*yn >= 1 (this can happen since xm >= xn) { mspref(y3_MSDptr,0) -= 1; if (test_loop_msp(y3_MSDptr,n)) throw runtime_exception(); // check 0 >= y3 > -beta^-(n-1) cl_UDS_mul(y_MSDptr mspop (n+2),n+2, y3_MSDptr mspop (m+2),m+2-n, y4_MSDptr mspop (m+4)); shift1right_loop_msp(y4_MSDptr,m+3-n,0); if (subfrom_loop_lsp(y4_MSDptr mspop (m+3-n),y_MSDptr mspop (m+2),m+3-n)) if ((n<1) || dec_loop_lsp(y_MSDptr mspop (n-1),n-1)) throw runtime_exception(); } n = m; // n = ceiling(b_len/2^k) limbs of y have now been computed. } copy_loop_msp(y_MSDptr,b_MSDptr,b_len+2); } // Bit complexity (N := b_len): O(M(N)). } // namespace cln cln-1.3.3/src/base/digitseq/cl_DS_mul_fftc.h0000644000000000000000000011624011201634736015515 0ustar // Fast integer multiplication using FFT over the complex numbers. // [Donald Ervin Knuth: The Art of Computer Programming, Vol. II: // Seminumerical Algorithms, second edition. Section 4.3.3, p. 290-294.] // Bruno Haible 6.5.1996, 24.-25.8.1996 // FFT in the complex domain has the drawback that it needs careful round-off // error analysis. But for CPUs with good floating-point performance it might // nevertheless be better than FFT mod Z/mZ. // It is important to have precise round-off error estimates. Although // (by laws of statistics) in the average the actual round-off error makes up // only half of the bits provided for round-off protection, we cannot rely // on this average behaviour, but have to produce correct results. // // Knuth's formula (42), p. 294, says: // If we want to multiply l-bit words using an FFT(2^k), our floating point // numbers shall have m >= 2(k+l) + k + log_2 k + 3.5 mantissa bits. // // Here is a more careful analysis, using absolute error estimates. // // 1. We assume floating point numbers with radix 2, with the properties: // (i) Multiplication with 2^n and 2^-n is exact. // (ii) Negation x -> -x is exact. // (iii) Addition: When adding x and y, with |x| <= 2^a, |y| <= 2^a, // the result |x+y| <= 2^(a+1) has an error <= e*2^(a+1-m). // (iv) Multiplication: When multiplying x and y, with |x| <= 2^a, // |y| <= 2^b, the result |x*y| <= 2^(a+b) has an error <= e*2^(a+b-m). // Here e = 1 for a truncating arithmetic, but e = 1/2 for a rounding // arithmetic like IEEE single and double floats. // 2. Let's introduce some notation: err(x) means |x'-x| where x is the // exact mathematical value and x' is its representation in the machine. // 3. From 1. we get for real numbers x,y: // (i) err(2^n*x) = 2^n * err(x), // (ii) err(-x) = err(x), // (iii) |x| <= 2^a, |y| <= 2^a, then // err(x+y) <= err(x) + err(y) + e*2^(a+1-m), // [or .... ............... + e*2^(a-m) if |x+y| <= 2^a]. // (iv) |x| <= 2^a, |y| <= 2^b, then // err(x*y) <= 2^a * err(y) + 2^b * err(x) + e*2^(a+b-m). // 4. Our complex arithmetic will be based on the formulas: // (i) 2^n*(x+iy) = (2^n*x)+i(2^n*y) // (ii) -(x+iy) = (-x)+i(-y) // (iii) (x+iy)+(u+iv) = (x+u)+i(y+v) // (iv) (x+iy)*(u+iv) = (x*u-y*v)+i(x*v+y*u) // The notation err(z) means |z'-z|, as above, with |.| being the usual // absolute value on complex numbers (_not_ the L^1 norm). // 5. From 3. and 4. we get for complex numbers x,y: // (i) err(2^n*x) = 2^n * err(x), // (ii) err(-x) = err(x), // (iii) |x| <= 2^a, |y| <= 2^a, then // err(x+y) <= err(x) + err(y) + e*2^(a+3/2-m), // (iv) |x| <= 2^a, |y| <= 2^b, then // err(x*y) <= 2^a * err(y) + 2^b * err(x) + 3*e*2^(a+b+1/2-m). // 6. We start out with precomputed roots of unity: // |exp(2 pi i/2^n)| <= 1, // err(exp(2 pi i/2^n)) <= e*2^(1/2-m), (even err(..)=0 for n=0,1,2), // and compute exp(2 pi i * j/2^k) according to the binary digits of j. // This way, each root of unity will be a product of at most k precomputed // roots. If (j mod 2^(k-2)) has n bits, then exp(2 pi i * j/2^k) will // be computed using n factors, i.e. n-1 complex multiplications, and by // 5.iv. we'll have // err(exp(2 pi i * j/2^k)) <= n*e*2^(1/2-m) + max(n-1,0)*3*e*2^(1/2-m) // = max(4*n-3,0)*e*2^(1/2-m). // Hence the maximum roots-of-unity error is (set n=k-2) // err(w^j) <= (4*k-11)*e*2^(1/2-m), // and the average roots-of-unity error is (set n=(k-2)/2) // < 2*(k-2)*e*2^(1/2-m). // 7. Now we start the FFT. // Before the first step, x_i are integral, |x_i| < 2^l and err(x_i) = 0. // After the first butterfly, which replaces (x(i1),x(i2)) by // (x(i1) + x(i2), x(i1) - x(i2)), we have |x_i| < 2^(l+1) and err(x_i) = 0. // Then, for each of the remaining k-1 steps, a butterfly replaces // (x(i1),x(i2)) by (x(i1) + w^exp*x(i2), x(i1) - w^exp*x(i2)). Thus, // after n steps we have |x_i| < 2^(l+n) and err(x_i) <= E_i where // E_0 = 0, // E_1 = 0, // E_(n+1) = (E_n + 2^(l+n)*(4*k-11)*e*2^(1/2-m) + 3*e*2^(l+n+1/2-m)) // + E_n + e*2^(l+n+3/2-m) // = 2*E_n + (4*k-6)*e*2^(l+n+1/2-m) // hence E_n = (2^n-2)*(4*k-6)*e*2^(l+1/2-m). // Setting n = k, we have proved that after the FFT ends, we have // |x_i| < 2^(l+k) and err(x_i) <= (4*k-6)*e*2^(l+k+1/2-m). // 8. The same error analysis holds for the y_i and their FFT. After we // multiply z_i := x_i * y_i, we have // |z_i| < 2^(2*l+2*k) and err(z_i) <= (8*k-9)*e*2^(2*l+2*k+1/2-m). // 9. Then an inverse FFT on z_i is done, which is the same as an FFT // followed by a permutation and a division by 2^k. After n steps of // the FFT, we have |z_i| < 2^(2*l+2*k+n) and err(z_i) <= E_i where // E_0 = (8*k-9)*e*2^(2*l+2*k+1/2-m), // E_(n+1) = (E_n + 2^(2*l+2*k+n)*(4*k-11)*e*2^(1/2-m) // + 3*e*2^(2*l+2*k+n+1/2-m)) // + E_n + e*2^(2*l+2*k+n+3/2-m) // = 2*E_n + (4*k-6)*e*2^(2*l+2*k+n+1/2-m) // hence E_n = 2^n*(8*k-9)*e*2^(2*l+2*k+1/2-m) // + (2^n-1)*(4*k-6)*e*2^(2*l+2*k+1/2-m). // So, after the FFT, we have (set n=k) |z_i| < 2^(2*l+3*k) and // err(z_i) <= (12*k-15)*e*2^(2*l+3*k+1/2-m). // Permutation doesn't change the estimates. After division by 2^k, we get // |z_i| < 2^(2*l+2*k) and // err(z_i) <= (12*k-15)*e*2^(2*l+2*k+1/2-m). // 10. When converting the z_i back to integers, we know that z_i should be // real, integral, and |z_i| < 2^(2*l+k). We can only guarantee that we // can find the integral z_i from the floating-point computation if // (12*k-15)*e*2^(2*l+2*k+1/2-m) < 1/2. // 11. Assuming e = 1/2 and m = 53 (typical values for IEEE double arithmetic), // we get the constraint 2*l < m - 1/2 - 2*k - log_2(12*k-15). // k = 2 l <= 22 // k = 3 l <= 21 // k = 4 l <= 19 // k = 5 l <= 18 // k = 6 l <= 17 // k = 7 l <= 16 // k = 8 l <= 15 // k = 9 l <= 13 // k = 10 l <= 12 // k = 11 l <= 11 // k = 12 l <= 10 // k = 13 l <= 9 // k = 14 l <= 8 // k = 15 l <= 7 // k = 16 l <= 6 // k = 17 l <= 5 // k = 18 l <= 4 // k = 19 l <= 3 // k = 20 l <= 2 // Assuming e = 1/2 and m = 64 ("long double" arithmetic on i387/i486/i586), // we get the constraint 2*l < m - 1/2 - 2*k - log_2(12*k-15). // k = 2 l <= 28 // k = 3 l <= 26 // k = 4 l <= 25 // k = 5 l <= 24 // k = 6 l <= 22 // k = 7 l <= 21 // k = 8 l <= 20 // k = 9 l <= 19 // k = 10 l <= 18 // k = 11 l <= 17 // k = 12 l <= 16 // k = 13 l <= 15 // k = 14 l <= 14 // k = 15 l <= 13 // k = 16 l <= 12 // k = 17 l <= 10 // k = 18 l <= 9 // k = 19 l <= 8 // k = 20 l <= 7 // k = 21 l <= 6 // k = 22 l <= 5 // k = 23 l <= 4 // k = 24 l <= 3 // k = 25 l <= 2 #if !(intDsize==32) #error "complex fft implemented only for intDsize==32" #endif #include "cln/floatparam.h" #include "cln/exception.h" #if defined(HAVE_LONGDOUBLE) && (long_double_mant_bits > double_mant_bits) && (defined(__i386__) || defined(__m68k__) || (defined(__sparc__) && 0)) // Only these CPUs have fast "long double"s in hardware. // On SPARC, "long double"s are emulated in software and don't work. typedef long double fftc_real; #define fftc_real_mant_bits long_double_mant_bits #define fftc_real_rounds long_double_rounds #else typedef double fftc_real; #define fftc_real_mant_bits double_mant_bits #define fftc_real_rounds double_rounds #endif typedef struct fftc_complex { fftc_real re; fftc_real im; } fftc_complex; static const fftc_complex fftc_roots_of_1 [32+1] = // roots_of_1[n] is a (2^n)th root of unity in C. // Also roots_of_1[n-1] = roots_of_1[n]^2. // For simplicity we choose roots_of_1[n] = exp(2 pi i/2^n). { #if (fftc_real_mant_bits == double_mant_bits) // These values have 64 bit precision. { 1.0, 0.0 }, { -1.0, 0.0 }, { 0.0, 1.0 }, { 0.7071067811865475244, 0.7071067811865475244 }, { 0.9238795325112867561, 0.38268343236508977172 }, { 0.9807852804032304491, 0.19509032201612826784 }, { 0.99518472667219688623, 0.098017140329560601996 }, { 0.9987954562051723927, 0.049067674327418014254 }, { 0.9996988186962042201, 0.024541228522912288032 }, { 0.99992470183914454094, 0.0122715382857199260795 }, { 0.99998117528260114264, 0.0061358846491544753597 }, { 0.9999952938095761715, 0.00306795676296597627 }, { 0.99999882345170190993, 0.0015339801862847656123 }, { 0.99999970586288221914, 7.6699031874270452695e-4 }, { 0.99999992646571785114, 3.8349518757139558907e-4 }, { 0.9999999816164292938, 1.9174759731070330744e-4 }, { 0.9999999954041073129, 9.5873799095977345874e-5 }, { 0.99999999885102682754, 4.793689960306688455e-5 }, { 0.99999999971275670683, 2.3968449808418218729e-5 }, { 0.9999999999281891767, 1.1984224905069706422e-5 }, { 0.99999999998204729416, 5.9921124526424278428e-6 }, { 0.99999999999551182357, 2.9960562263346607504e-6 }, { 0.99999999999887795586, 1.4980281131690112288e-6 }, { 0.999999999999719489, 7.4901405658471572114e-7 }, { 0.99999999999992987223, 3.7450702829238412391e-7 }, { 0.99999999999998246807, 1.8725351414619534487e-7 }, { 0.999999999999995617, 9.36267570730980828e-8 }, { 0.99999999999999890425, 4.6813378536549092695e-8 }, { 0.9999999999999997261, 2.340668926827455276e-8 }, { 0.99999999999999993153, 1.1703344634137277181e-8 }, { 0.99999999999999998287, 5.8516723170686386908e-9 }, { 0.9999999999999999957, 2.925836158534319358e-9 }, { 0.9999999999999999989, 1.4629180792671596806e-9 } #else (fftc_real_mant_bits > double_mant_bits) // These values have 128 bit precision. { 1.0L, 0.0L }, { -1.0L, 0.0L }, { 0.0L, 1.0L }, { 0.707106781186547524400844362104849039284L, 0.707106781186547524400844362104849039284L }, { 0.923879532511286756128183189396788286823L, 0.38268343236508977172845998403039886676L }, { 0.980785280403230449126182236134239036975L, 0.195090322016128267848284868477022240928L }, { 0.995184726672196886244836953109479921574L, 0.098017140329560601994195563888641845861L }, { 0.998795456205172392714771604759100694444L, 0.0490676743274180142549549769426826583147L }, { 0.99969881869620422011576564966617219685L, 0.0245412285229122880317345294592829250654L }, { 0.99992470183914454092164649119638322435L, 0.01227153828571992607940826195100321214037L }, { 0.999981175282601142656990437728567716173L, 0.00613588464915447535964023459037258091705L }, { 0.999995293809576171511580125700119899554L, 0.00306795676296597627014536549091984251894L }, { 0.99999882345170190992902571017152601905L, 0.001533980186284765612303697150264079079954L }, { 0.999999705862882219160228217738765677117L, 7.66990318742704526938568357948576643142e-4L }, { 0.99999992646571785114473148070738785695L, 3.83495187571395589072461681181381263396e-4L }, { 0.999999981616429293808346915402909714504L, 1.91747597310703307439909561989000933469e-4L }, { 0.99999999540410731289097193313960614896L, 9.58737990959773458705172109764763511872e-5L }, { 0.9999999988510268275626733077945541084L, 4.79368996030668845490039904946588727468e-5L }, { 0.99999999971275670684941397221864177609L, 2.39684498084182187291865771650218200947e-5L }, { 0.999999999928189176709775095883850490262L, 1.198422490506970642152156159698898480473e-5L }, { 0.99999999998204729417728262414778410738L, 5.99211245264242784287971180889086172999e-6L }, { 0.99999999999551182354431058417299732444L, 2.99605622633466075045481280835705981183e-6L }, { 0.999999999998877955886077016551752536504L, 1.49802811316901122885427884615536112069e-6L }, { 0.999999999999719488971519214794719584451L, 7.49014056584715721130498566730655637157e-7L }, { 0.99999999999992987224287980123972873676L, 3.74507028292384123903169179084633177398e-7L }, { 0.99999999999998246806071995015624773673L, 1.8725351414619534486882457659356361712e-7L }, { 0.999999999999995617015179987529456656217L, 9.3626757073098082799067286680885620193e-8L }, { 0.999999999999998904253794996881763834182L, 4.68133785365490926951155181385400969594e-8L }, { 0.99999999999999972606344874922040343793L, 2.34066892682745527595054934190348440379e-8L }, { 0.999999999999999931515862187305098514444L, 1.170334463413727718124621350323810379807e-8L }, { 0.999999999999999982878965546826274482047L, 5.8516723170686386908097901008341396944e-9L }, { 0.999999999999999995719741386706568611352L, 2.92583615853431935792823046906895590202e-9L }, { 0.999999999999999998929935346676642152265L, 1.46291807926715968052953216186596371037e-9L } #endif }; // Define this for (cheap) consistency checks. //#define DEBUG_FFTC // Define the algorithm of the backward FFT: // Either FORWARD (a normal FFT followed by a permutation) // or RECIPROOT (an FFT with reciprocal root of unity) // or CLEVER (an FFT with reciprocal root of unity but clever computation // of the reciprocals). // Drawback of FORWARD: the permutation pass. // Drawback of RECIPROOT: need all the powers of the root, not only half of them. #define FORWARD 42 #define RECIPROOT 43 #define CLEVER 44 #define FFTC_BACKWARD CLEVER static fftc_real fftc_pow2_table[64] = // table of powers of 2 { 1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0, 512.0, 1024.0, 2048.0, 4096.0, 8192.0, 16384.0, 32768.0, 65536.0, 131072.0, 262144.0, 524288.0, 1048576.0, 2097152.0, 4194304.0, 8388608.0, 16777216.0, 33554432.0, 67108864.0, 134217728.0, 268435456.0, 536870912.0, 1073741824.0, 2147483648.0, 4294967296.0, 8589934592.0, 17179869184.0, 34359738368.0, 68719476736.0, 137438953472.0, 274877906944.0, 549755813888.0, 1099511627776.0, 2199023255552.0, 4398046511104.0, 8796093022208.0, 17592186044416.0, 35184372088832.0, 70368744177664.0, 140737488355328.0, 281474976710656.0, 562949953421312.0, 1125899906842624.0, 2251799813685248.0, 4503599627370496.0, 9007199254740992.0, 18014398509481984.0, 36028797018963968.0, 72057594037927936.0, 144115188075855872.0, 288230376151711744.0, 576460752303423488.0, 1152921504606846976.0, 2305843009213693952.0, 4611686018427387904.0, 9223372036854775808.0 }; // For a constant expression n (0 <= n < 128), returns 2^n of type fftc_real. #define fftc_pow2(n) \ (((n) & 64 ? (fftc_real)18446744073709551616.0 : (fftc_real)1.0) \ * ((n) & 32 ? (fftc_real)4294967296.0 : (fftc_real)1.0) \ * ((n) & 16 ? (fftc_real)65536.0 : (fftc_real)1.0) \ * ((n) & 8 ? (fftc_real)256.0 : (fftc_real)1.0) \ * ((n) & 4 ? (fftc_real)16.0 : (fftc_real)1.0) \ * ((n) & 2 ? (fftc_real)4.0 : (fftc_real)1.0) \ * ((n) & 1 ? (fftc_real)2.0 : (fftc_real)1.0) \ ) // r := a + b static inline void add (const fftc_complex& a, const fftc_complex& b, fftc_complex& r) { r.re = a.re + b.re; r.im = a.im + b.im; } // r := a - b static inline void sub (const fftc_complex& a, const fftc_complex& b, fftc_complex& r) { r.re = a.re - b.re; r.im = a.im - b.im; } // r := a * b static inline void mul (fftc_real a, const fftc_complex& b, fftc_complex& r) { r.re = a * b.re; r.im = a * b.im; } // r := a * b static inline void mul (const fftc_complex& a, const fftc_complex& b, fftc_complex& r) { var fftc_real r_re = a.re * b.re - a.im * b.im; var fftc_real r_im = a.re * b.im + a.im * b.re; r.re = r_re; r.im = r_im; } #ifndef _BIT_REVERSE #define _BIT_REVERSE // Reverse an n-bit number x. n>0. static uintC bit_reverse (uintL n, uintC x) { var uintC y = 0; do { y <<= 1; y |= (x & 1); x >>= 1; } while (!(--n == 0)); return y; } #endif // Compute a complex convolution using FFT: z[0..N-1] := x[0..N-1] * y[0..N-1]. static void fftc_convolution (const uintL n, const uintC N, // N = 2^n fftc_complex * x, // N numbers fftc_complex * y, // N numbers fftc_complex * z // N numbers result ) { CL_ALLOCA_STACK; #if (FFTC_BACKWARD == RECIPROOT) || defined(DEBUG_FFTC) var fftc_complex* const w = cl_alloc_array(fftc_complex,N); #else var fftc_complex* const w = cl_alloc_array(fftc_complex,(N>>1)+1); #endif var uintC i; // Initialize w[i] to w^i, w a primitive N-th root of unity. w[0] = fftc_roots_of_1[0]; #if (FFTC_BACKWARD == RECIPROOT) || defined(DEBUG_FFTC) { var int j; for (j = n-1; j>=0; j--) { var fftc_complex r_j = fftc_roots_of_1[n-j]; w[1<=0; j--) { var fftc_complex r_j = fftc_roots_of_1[n-j]; w[1<>1; i += (2<=3 ? 4*n-11 : 0); epsilon = epsilon / fftc_pow2(fftc_real_mant_bits); if (fftc_real_rounds == rounds_to_nearest) epsilon = 0.5*epsilon; epsilon = 1.414*epsilon; // epsilon = (4*k-11)*e*2^(1/2-m). var fftc_real part; var fftc_complex& w_N = w[N>>1]; part = w_N.re - (fftc_real)(-1.0); if (part > epsilon || part < -epsilon) throw runtime_exception(); part = w_N.im; if (part > epsilon || part < -epsilon) throw runtime_exception(); } { var fftc_complex w_N; mul(w[N-1],fftc_roots_of_1[n], w_N); // Since there was one more multiplication, // we have to replace n by (n+1) in the epsilon above. var fftc_real epsilon; epsilon = (fftc_real)(4*n-7); epsilon = epsilon / fftc_pow2(fftc_real_mant_bits); if (fftc_real_rounds == rounds_to_nearest) epsilon = 0.5*epsilon; epsilon = 1.414*epsilon; // epsilon = (4*k-7)*e*2^(1/2-m). var fftc_real part; part = w_N.re - (fftc_real)1.0; if (part > epsilon || part < -epsilon) throw runtime_exception(); part = w_N.im; if (part > epsilon || part < -epsilon) throw runtime_exception(); } #endif var bool squaring = (x == y); // Do an FFT of length N on x. { var sintL l; /* l = n-1 */ { var const uintC tmax = N>>1; // tmax = 2^(n-1) for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // Butterfly: replace (x(i1),x(i2)) by // (x(i1) + x(i2), x(i1) - x(i2)). var fftc_complex tmp; tmp = x[i2]; sub(x[i1],tmp, x[i2]); add(x[i1],tmp, x[i1]); } } for (l = n-2; l>=0; l--) { var const uintC smax = (uintC)1 << (n-1-l); var const uintC tmax = (uintC)1 << l; for (var uintC s = 0; s < smax; s++) { var uintC exp = bit_reverse(n-1-l,s) << l; for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Butterfly: replace (x(i1),x(i2)) by // (x(i1) + w^exp*x(i2), x(i1) - w^exp*x(i2)). var fftc_complex tmp; mul(x[i2],w[exp], tmp); sub(x[i1],tmp, x[i2]); add(x[i1],tmp, x[i1]); } } } } // Do an FFT of length N on y. if (!squaring) { var sintL l; /* l = n-1 */ { var uintC const tmax = N>>1; // tmax = 2^(n-1) for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // Butterfly: replace (y(i1),y(i2)) by // (y(i1) + y(i2), y(i1) - y(i2)). var fftc_complex tmp; tmp = y[i2]; sub(y[i1],tmp, y[i2]); add(y[i1],tmp, y[i1]); } } for (l = n-2; l>=0; l--) { var const uintC smax = (uintC)1 << (n-1-l); var const uintC tmax = (uintC)1 << l; for (var uintC s = 0; s < smax; s++) { var uintC exp = bit_reverse(n-1-l,s) << l; for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Butterfly: replace (y(i1),y(i2)) by // (y(i1) + w^exp*y(i2), y(i1) - w^exp*y(i2)). var fftc_complex tmp; mul(y[i2],w[exp], tmp); sub(y[i1],tmp, y[i2]); add(y[i1],tmp, y[i1]); } } } } // Multiply the transformed vectors into z. for (i = 0; i < N; i++) mul(x[i],y[i], z[i]); // Undo an FFT of length N on z. { var uintL l; for (l = 0; l < n-1; l++) { var const uintC smax = (uintC)1 << (n-1-l); var const uintC tmax = (uintC)1 << l; #if FFTC_BACKWARD != CLEVER for (var uintC s = 0; s < smax; s++) { var uintC exp = bit_reverse(n-1-l,s) << l; #if FFTC_BACKWARD == RECIPROOT if (exp > 0) exp = N - exp; // negate exp (use w^-1 instead of w) #endif for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Inverse Butterfly: replace (z(i1),z(i2)) by // ((z(i1)+z(i2))/2, (z(i1)-z(i2))/(2*w^exp)). // Do the division by 2 later. var fftc_complex sum; var fftc_complex diff; add(z[i1],z[i2], sum); sub(z[i1],z[i2], diff); z[i1] = sum; mul(diff,w[exp], z[i2]); } } #else // FFTC_BACKWARD == CLEVER: clever handling of negative exponents /* s = 0, exp = 0 */ { for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // Inverse Butterfly: replace (z(i1),z(i2)) by // ((z(i1)+z(i2))/2, (z(i1)-z(i2))/(2*w^exp)), // with exp <-- 0. // Do the division by 2 later. var fftc_complex sum; var fftc_complex diff; add(z[i1],z[i2], sum); sub(z[i1],z[i2], diff); z[i1] = sum; z[i2] = diff; } } for (var uintC s = 1; s < smax; s++) { var uintC exp = bit_reverse(n-1-l,s) << l; exp = (N>>1) - exp; // negate exp (use w^-1 instead of w) for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Inverse Butterfly: replace (z(i1),z(i2)) by // ((z(i1)+z(i2))/2, (z(i1)-z(i2))/(2*w^exp)), // with exp <-- (N/2 - exp). // Do the division by 2 later. var fftc_complex sum; var fftc_complex diff; add(z[i1],z[i2], sum); sub(z[i2],z[i1], diff); // note that w^(N/2) = -1 z[i1] = sum; mul(diff,w[exp], z[i2]); } } #endif } /* l = n-1 */ { var const fftc_real pow2 = (fftc_real)1 / (fftc_real)N; var const uintC tmax = N>>1; // tmax = 2^(n-1) for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // Inverse Butterfly: replace (z(i1),z(i2)) by // ((z(i1)+z(i2))/2, (z(i1)-z(i2))/2). // Do all the divisions by 2 now. var fftc_complex sum; var fftc_complex diff; add(z[i1],z[i2], sum); sub(z[i1],z[i2], diff); mul(pow2,sum, z[i1]); mul(pow2,diff, z[i2]); } } } #if FFTC_BACKWARD == FORWARD // Swap z[i] and z[N-i] for 0 < i < N/2. for (i = (N>>1)-1; i > 0; i--) { var fftc_complex tmp = z[i]; z[i] = z[N-i]; z[N-i] = tmp; } #endif } // For a given k >= 2, the maximum l is determined by // 2*l < m - 1/2 - 2*k - log_2(12*k-15) - (1 if e=1.0, 0 if e=0.5). // This is a decreasing function of k. #define max_l(k) \ (int)((fftc_real_mant_bits \ - 2*(k) \ - ((k)<=2 ? 4 : (k)<=3 ? 5 : (k)<=5 ? 6 : (k)<=8 ? 7 : (k)<=16 ? 8 : (k)<=31 ? 9 : 10) \ - (fftc_real_rounds == rounds_to_nearest ? 0 : 1)) \ / 2) static int max_l_table[32+1] = { 0, 0, max_l(2), max_l(3), max_l(4), max_l(5), max_l(6), max_l(7), max_l(8), max_l(9), max_l(10), max_l(11), max_l(12), max_l(13), max_l(14), max_l(15), max_l(16), max_l(17), max_l(18), max_l(19), max_l(20), max_l(21), max_l(22), max_l(23), max_l(24), max_l(25), max_l(26), max_l(27), max_l(28), max_l(29), max_l(30), max_l(31), max_l(32) }; // Split len uintD's below sourceptr into chunks of l bits, thus filling // N complex numbers at x. static void fill_factor (uintC N, fftc_complex* x, uintL l, const uintD* sourceptr, uintC len) { var uintC i; if (max_l(2) > intDsize && l > intDsize) { // l > intDsize if (max_l(2) > 64 && l > 64) { throw runtime_exception("FFT problem: l > 64 not supported by pow2_table"); } var fftc_real carry = 0; var sintL carrybits = 0; // number of bits in carry (>=0, 0) { var uintD digit = lsprefnext(sourceptr); if (carrybits+intDsize >= l) { x[i].re = carry + (fftc_real)(digit & bitm(l-carrybits)) * fftc_pow2_table[carrybits]; x[i].im = (fftc_real)0; i++; carry = (l-carrybits == intDsize ? (fftc_real)0 : (fftc_real)(digit >> (l-carrybits))); carrybits = carrybits+intDsize-l; } else { carry = carry + (fftc_real)digit * fftc_pow2_table[carrybits]; carrybits = carrybits+intDsize; } len--; } if (carrybits > 0) { x[i].re = carry; x[i].im = (fftc_real)0; i++; } if (i > N) throw runtime_exception(); } else if (max_l(2) >= intDsize && l == intDsize) { // l = intDsize if (len > N) throw runtime_exception(); for (i = 0; i < len; i++) { var uintD digit = lsprefnext(sourceptr); x[i].re = (fftc_real)digit; x[i].im = (fftc_real)0; } } else { // l < intDsize var const uintD l_mask = bit(l)-1; var uintD carry = 0; var sintL carrybits = 0; // number of bits in carry (>=0, = l) { x[i].re = (fftc_real)(carry & l_mask); x[i].im = (fftc_real)0; carry >>= l; carrybits -= l; } else { if (len == 0) break; len--; var uintD digit = lsprefnext(sourceptr); x[i].re = (fftc_real)((carry | (digit << carrybits)) & l_mask); x[i].im = (fftc_real)0; carry = digit >> (l-carrybits); carrybits = intDsize - (l-carrybits); } } while (carrybits > 0) { if (!(i < N)) throw runtime_exception(); x[i].re = (fftc_real)(carry & l_mask); x[i].im = (fftc_real)0; carry >>= l; carrybits -= l; i++; } if (len > 0) throw runtime_exception(); } for ( ; i < N; i++) { x[i].re = (fftc_real)0; x[i].im = (fftc_real)0; } } // Given a not too large floating point number, round it to the nearest integer. static inline fftc_real fftc_fround (fftc_real x) { return #if (fftc_real_rounds == rounds_to_nearest) (x + (fftc_pow2(fftc_real_mant_bits-1)+fftc_pow2(fftc_real_mant_bits-2))) - (fftc_pow2(fftc_real_mant_bits-1)+fftc_pow2(fftc_real_mant_bits-2)); #elif (fftc_real_rounds == rounds_to_infinity) (fftc_pow2(fftc_real_mant_bits-1)+fftc_pow2(fftc_real_mant_bits-2)) - ((fftc_pow2(fftc_real_mant_bits-1)+fftc_pow2(fftc_real_mant_bits-2)) - (x + (fftc_real)0.5)); #else // rounds_to_zero, rounds_to_minus_infinity ((x + (fftc_real)0.5) + (fftc_pow2(fftc_real_mant_bits-1)+fftc_pow2(fftc_real_mant_bits-2))) - (fftc_pow2(fftc_real_mant_bits-1)+fftc_pow2(fftc_real_mant_bits-2)); #endif } // Given a not too large floating point number, round it down. static inline fftc_real fftc_ffloor (fftc_real x) { #if (fftc_real_rounds == rounds_to_nearest) var fftc_real y = (x + (fftc_pow2(fftc_real_mant_bits-1)+fftc_pow2(fftc_real_mant_bits-2))) - (fftc_pow2(fftc_real_mant_bits-1)+fftc_pow2(fftc_real_mant_bits-2)); if (y <= x) return y; else return y - (fftc_real)1.0; #elif (fftc_real_rounds == rounds_to_infinity) return (fftc_pow2(fftc_real_mant_bits-1)+fftc_pow2(fftc_real_mant_bits-2)) - ((fftc_pow2(fftc_real_mant_bits-1)+fftc_pow2(fftc_real_mant_bits-2)) - x); #else // rounds_to_zero, rounds_to_minus_infinity return (x + (fftc_pow2(fftc_real_mant_bits-1)+fftc_pow2(fftc_real_mant_bits-2))) - (fftc_pow2(fftc_real_mant_bits-1)+fftc_pow2(fftc_real_mant_bits-2)); #endif } // Combine the N complex numbers at z into uintD's below destptr. // The z[i] are known to be approximately integers >= 0, < N*2^(2*l). // Assumes room for floor(N*l/intDsize)+(1+ceiling((n+2*l)/intDsize)) uintD's // below destptr. Fills len digits and returns (destptr lspop len). static uintD* unfill_product (uintL n, uintC N, // N = 2^n const fftc_complex * z, uintL l, uintD* destptr) { var uintC i; if (n + 2*l <= intDsize) { // 2-digit carry is sufficient, l < intDsize var uintD carry0 = 0; var uintD carry1 = 0; var uintL shift = 0; // shift next digit before adding it to the carry, >=0, 0) { carry1 += digit >> (intDsize-shift); digit = digit << shift; } if ((carry0 += digit) < digit) carry1 += 1; shift += l; if (shift >= intDsize) { lsprefnext(destptr) = carry0; carry0 = carry1; carry1 = 0; shift -= intDsize; } } lsprefnext(destptr) = carry0; lsprefnext(destptr) = carry1; } else if (n + 2*l <= 2*intDsize) { // 3-digit carry is sufficient, l < intDsize #if HAVE_DD var uintDD carry0 = 0; var uintD carry1 = 0; var uintL shift = 0; // shift next digit before adding it to the carry, >=0, 0) { carry1 += (uintD)(digit >> (2*intDsize-shift)); digit = digit << shift; } if ((carry0 += digit) < digit) carry1 += 1; shift += l; if (shift >= intDsize) { lsprefnext(destptr) = lowD(carry0); carry0 = highlowDD(carry1,highD(carry0)); carry1 = 0; shift -= intDsize; } } lsprefnext(destptr) = lowD(carry0); lsprefnext(destptr) = highD(carry0); lsprefnext(destptr) = carry1; #else var uintD carry0 = 0; var uintD carry1 = 0; var uintD carry2 = 0; var uintL shift = 0; // shift next digit before adding it to the carry, >=0, 0) { carry2 += digit1 >> (intDsize-shift); digit1 = (digit1 << shift) | (digit0 >> (intDsize-shift)); digit0 = digit0 << shift; } if ((carry0 += digit0) < digit0) if ((carry1 += 1) == 0) carry2 += 1; if ((carry1 += digit1) < digit1) carry2 += 1; shift += l; if (shift >= intDsize) { lsprefnext(destptr) = carry0; carry0 = carry1; carry1 = carry2; carry2 = 0; shift -= intDsize; } } lsprefnext(destptr) = carry0; lsprefnext(destptr) = carry1; lsprefnext(destptr) = carry2; #endif } else { // 1-digit+1-float carry is sufficient var uintD carry0 = 0; var fftc_real carry1 = 0; var uintL shift = 0; // shift next digit before adding it to the carry, >=0, = (fftc_real)0 && z[i].re > digit - (fftc_real)0.5 && z[i].re < digit + (fftc_real)0.5)) throw runtime_exception(); #endif if (shift > 0) digit = digit * fftc_pow2_table[shift]; var fftc_real digit1 = fftc_ffloor(digit*((fftc_real)1.0/fftc_pow2(intDsize))); var uintD digit0 = (uintD)(digit - digit1*fftc_pow2(intDsize)); carry1 += digit1; if ((carry0 += digit0) < digit0) carry1 += (fftc_real)1.0; shift += l; while (shift >= intDsize) { lsprefnext(destptr) = carry0; var fftc_real tmp = fftc_ffloor(carry1*((fftc_real)1.0/fftc_pow2(intDsize))); carry0 = (uintD)(carry1 - tmp*fftc_pow2(intDsize)); carry1 = tmp; shift -= intDsize; } } if (carry0 > 0 || carry1 > (fftc_real)0.0) { lsprefnext(destptr) = carry0; while (carry1 > (fftc_real)0.0) { var fftc_real tmp = fftc_ffloor(carry1*((fftc_real)1.0/fftc_pow2(intDsize))); lsprefnext(destptr) = (uintD)(carry1 - tmp*fftc_pow2(intDsize)); carry1 = tmp; } } } return destptr; } static inline void mulu_fftcomplex_nocheck (const uintD* sourceptr1, uintC len1, const uintD* sourceptr2, uintC len2, uintD* destptr) // Es ist 2 <= len1 <= len2. { // We have to find parameters l and k such that // ceiling(len1*intDsize/l) + ceiling(len2*intDsize/l) - 1 <= 2^k, // and (12*k-15)*e*2^(2*l+2*k+1/2-m) < 1/2. // Try primarily to minimize k. Minimizing l buys you nothing. var uintL k; // Computing k: If len1 and len2 differ much, we'll split source2 - // hence for the moment just substitute len1 for len2. // // First approximation of k: A necessary condition for // 2*ceiling(len1*intDsize/l) - 1 <= 2^k // is 2*len1*intDsize/l_max - 1 <= 2^k. { var const int l = max_l(2); var uintC lhs = 2*ceiling(len1*intDsize,l) - 1; // >=1 if (lhs < 3) k = 2; else integerlengthC(lhs-1, k=); // k>=2 } // Try whether this k is ok or whether we have to increase k. for ( ; ; k++) { if (k >= sizeof(max_l_table)/sizeof(max_l_table[0]) || max_l_table[k] <= 0) { throw runtime_exception("FFT problem: numbers too big, floating point precision not sufficient"); } if (2*ceiling(len1*intDsize,max_l_table[k])-1 <= ((uintC)1 << k)) break; } // We could try to reduce l, keeping the same k. But why should we? // Calculate the number of pieces in which source2 will have to be // split. Each of the pieces must satisfy // ceiling(len1*intDsize/l) + ceiling(len2*intDsize/l) - 1 <= 2^k, var uintC len2p; // Try once with k, once with k+1. Compare them. { var uintC remaining_k = ((uintC)1 << k) + 1 - ceiling(len1*intDsize,max_l_table[k]); var uintC max_piecelen_k = floor(remaining_k*max_l_table[k],intDsize); var uintC numpieces_k = ceiling(len2,max_piecelen_k); var uintC remaining_k1 = ((uintC)1 << (k+1)) + 1 - ceiling(len1*intDsize,max_l_table[k+1]); var uintC max_piecelen_k1 = floor(remaining_k1*max_l_table[k+1],intDsize); var uintC numpieces_k1 = ceiling(len2,max_piecelen_k1); if (numpieces_k <= 2*numpieces_k1) { // keep k len2p = max_piecelen_k; } else { // choose k+1 k = k+1; len2p = max_piecelen_k1; } } var const uintL l = max_l_table[k]; var const uintL n = k; var const uintC N = (uintC)1 << n; CL_ALLOCA_STACK; var fftc_complex* const x = cl_alloc_array(fftc_complex,N); var fftc_complex* const y = cl_alloc_array(fftc_complex,N); #ifdef DEBUG_FFTC var fftc_complex* const z = cl_alloc_array(fftc_complex,N); #else var fftc_complex* const z = x; // put z in place of x - saves memory #endif var uintD* const tmpprod1 = cl_alloc_array(uintD,len1+1); var uintC tmpprod_len = floor(l< len2) len2p = len2; if (len2p == 1) { // cheap case var uintD* tmpptr = arrayLSDptr(tmpprod1,len1+1); mulu_loop_lsp(lspref(sourceptr2,0),sourceptr1,tmpptr,len1); if (addto_loop_lsp(tmpptr,destptr,len1+1)) if (inc_loop_lsp(destptr lspop (len1+1),destlen-(len1+1))) throw runtime_exception(); } else { var bool squaring = ((sourceptr1 == sourceptr2) && (len1 == len2p)); // Fill factor x. fill_factor(N,x,l,sourceptr1,len1); // Fill factor y. if (!squaring) fill_factor(N,y,l,sourceptr2,len2p); // Multiply. if (!squaring) fftc_convolution(n,N, &x[0], &y[0], &z[0]); else fftc_convolution(n,N, &x[0], &x[0], &z[0]); #ifdef DEBUG_FFTC // Check result. { var fftc_real re_lo_limit = (fftc_real)(-0.5); var fftc_real re_hi_limit = (fftc_real)N * fftc_pow2_table[l] * fftc_pow2_table[l] + (fftc_real)0.5; var fftc_real im_lo_limit = (fftc_real)(-0.5); var fftc_real im_hi_limit = (fftc_real)0.5; for (var uintC i = 0; i < N; i++) { if (!(z[i].im > im_lo_limit && z[i].im < im_hi_limit)) throw runtime_exception(); if (!(z[i].re > re_lo_limit && z[i].re < re_hi_limit)) throw runtime_exception(); } } #endif var uintD* tmpLSDptr = arrayLSDptr(tmpprod,tmpprod_len); var uintD* tmpMSDptr = unfill_product(n,N,z,l,tmpLSDptr); var uintC tmplen = #if CL_DS_BIG_ENDIAN_P tmpLSDptr - tmpMSDptr; #else tmpMSDptr - tmpLSDptr; #endif if (tmplen > tmpprod_len) throw runtime_exception(); // Add result to destptr[-destlen..-1]: if (tmplen > destlen) { if (test_loop_msp(tmpMSDptr,tmplen-destlen)) throw runtime_exception(); tmplen = destlen; } if (addto_loop_lsp(tmpLSDptr,destptr,tmplen)) if (inc_loop_lsp(destptr lspop tmplen,destlen-tmplen)) throw runtime_exception(); } // Decrement len2. destptr = destptr lspop len2p; destlen -= len2p; sourceptr2 = sourceptr2 lspop len2p; len2 -= len2p; } while (len2 > 0); } #ifndef _CHECKSUM #define _CHECKSUM // Compute a checksum: number mod (2^intDsize-1). static uintD compute_checksum (const uintD* sourceptr, uintC len) { var uintD tmp = ~(uintD)0; // -1-(sum mod 2^intDsize-1), always >0 do { var uintD digit = lsprefnext(sourceptr); if (digit < tmp) tmp -= digit; // subtract digit else tmp -= digit+1; // subtract digit-(2^intDsize-1) } while (--len > 0); return ~tmp; } // Multiply two checksums modulo (2^intDsize-1). static inline uintD multiply_checksum (uintD checksum1, uintD checksum2) { var uintD checksum; var uintD cksum_hi; #if HAVE_DD var uintDD cksum = muluD(checksum1,checksum2); cksum_hi = highD(cksum); checksum = lowD(cksum); #else muluD(checksum1,checksum2, cksum_hi =, checksum =); #endif if ((checksum += cksum_hi) + 1 <= cksum_hi) checksum += 1; return checksum; } #endif // _CHECKSUM static void mulu_fftcomplex (const uintD* sourceptr1, uintC len1, const uintD* sourceptr2, uintC len2, uintD* destptr) { // Compute checksums of the arguments and multiply them. var uintD checksum1 = compute_checksum(sourceptr1,len1); var uintD checksum2 = compute_checksum(sourceptr2,len2); var uintD checksum = multiply_checksum(checksum1,checksum2); mulu_fftcomplex_nocheck(sourceptr1,len1,sourceptr2,len2,destptr); if (!(checksum == compute_checksum(destptr,len1+len2))) { throw runtime_exception("FFT problem: checksum error"); } } cln-1.3.3/src/base/digitseq/cl_asm_sparc_.cc0000644000000000000000000043461611215252132015576 0ustar // Externe Routinen zu ARILEV1.D // Prozessor: SPARC // Compiler: GNU-C oder SUN-C // Parameter-Übergabe: in Registern %o0-%o5. // Einstellungen: intCsize=32, intDsize=32. #if defined(sparc_v8) || defined(__sparc_v8) || defined(__sparc_v8__) #define sparcv8 #endif #ifdef ASM_UNDERSCORE /* SunOS 4 */ #if defined(__STDC__) || defined (__cplusplus) #define C(entrypoint) _##entrypoint #else #define C(entrypoint) _/**/entrypoint #endif #else /* SunOS 5 = Solaris 2 */ #define C(entrypoint) entrypoint #endif // When this file is compiled into a shared library, ELF linkers need to // know which symbols are functions. #if defined(__NetBSD__) || defined(__OpenBSD__) #define DECLARE_FUNCTION(name) .type C(name),@function #elif defined(__svr4__) || defined(__ELF__) #define DECLARE_FUNCTION(name) .type C(name),#function #else #define DECLARE_FUNCTION(name) #endif // Indikatoren für Anweisungen (Instruktionen) in Delay-Slots // (diese werden VOR der vorigen Instruktion ausgeführt): #define _ // Instruktion, die stets ausgeführt wird #define __ // Instruktion, die nur im Sprung-Fall ausgeführt wird // Abkürzungen für Anweisungen: #define ret jmp %i7+8 // return from subroutine #define retl jmp %o7+8 // return from leaf subroutine (no save/restore) .seg "text" .global C(mulu16_),C(mulu32_),C(mulu32_unchecked) .global C(divu_6432_3232_),C(divu_3216_1616_) .global C(copy_loop_up),C(copy_loop_down),C(fill_loop_up),C(fill_loop_down) .global C(clear_loop_up),C(clear_loop_down) .global C(test_loop_up),C(test_loop_down) .global C(xor_loop_up),C(compare_loop_up),C(shiftleftcopy_loop_up),C(shiftxor_loop_up) #if CL_DS_BIG_ENDIAN_P .global C(or_loop_up),C(and_loop_up),C(eqv_loop_up) .global C(nand_loop_up),C(nor_loop_up),C(andc2_loop_up),C(orc2_loop_up) .global C(not_loop_up) .global C(and_test_loop_up) .global C(add_loop_down),C(addto_loop_down),C(inc_loop_down) .global C(sub_loop_down),C(subx_loop_down),C(subfrom_loop_down),C(dec_loop_down) .global C(neg_loop_down) .global C(shift1left_loop_down),C(shiftleft_loop_down),C(shiftleftcopy_loop_down) .global C(shift1right_loop_up),C(shiftright_loop_up),C(shiftrightsigned_loop_up),C(shiftrightcopy_loop_up) .global C(mulusmall_loop_down),C(mulu_loop_down),C(muluadd_loop_down),C(mulusub_loop_down) .global C(divu_loop_up),C(divucopy_loop_up) #else .global C(or_loop_down),C(xor_loop_down),C(and_loop_down),C(eqv_loop_down) .global C(nand_loop_down),C(nor_loop_down),C(andc2_loop_down),C(orc2_loop_down) .global C(not_loop_down) .global C(and_test_loop_down),C(compare_loop_down) .global C(add_loop_up),C(addto_loop_up),C(inc_loop_up) .global C(sub_loop_up),C(subx_loop_up),C(subfrom_loop_up),C(dec_loop_up) .global C(neg_loop_up) .global C(shift1left_loop_up),C(shiftleft_loop_up) .global C(shift1right_loop_down),C(shiftright_loop_down),C(shiftrightsigned_loop_down),C(shiftrightcopy_loop_down) .global C(mulusmall_loop_up),C(mulu_loop_up),C(muluadd_loop_up),C(mulusub_loop_up) .global C(divu_loop_down),C(divucopy_loop_down) #endif #define LOOP_TYPE 1 // 1: Standard-Schleifen // 2: Schleifen ohne Pointer, nur mit Zähler // 3: entrollte Schleifen #define SLOW_LOOPS 0 #define STANDARD_LOOPS (LOOP_TYPE==1) #define COUNTER_LOOPS (LOOP_TYPE==2) #define UNROLLED_LOOPS (LOOP_TYPE==3) #define MULU32_INLINE 1 // 1: mulu32-Aufrufe inline in die Schleifen // extern uint32 mulu16_ (uint16 arg1, uint16 arg2); // ergebnis := arg1*arg2. DECLARE_FUNCTION(mulu16_) C(mulu16_:) // Input in %o0,%o1, Output in %o0 #ifdef sparcv8 umul %o0,%o1,%o0 retl _ nop #else mov %o1,%y nop // Wartetakt, nötig z.B. für SUN SPARCstation IPC andcc %g0,%g0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 // Die 17 unteren Bits von %o2 und die 15 oberen Bits von %y // ergeben das Resultat. (Die anderen Bits sind Null.) rd %y,%o0 srl %o0,17,%o0 sll %o2,15,%o2 retl _ or %o2,%o0,%o0 #endif // extern struct { uint32 lo; uint32 hi; } mulu32_ (uint32 arg1, uint32 arg2); // 2^32*hi+lo := arg1*arg2. DECLARE_FUNCTION(mulu32_) C(mulu32_:) // Input in %o0,%o1, Output in %o0,%g1 #ifdef sparcv8 umul %o0,%o1,%o0 retl _ rd %y,%g1 #else mov %o1,%y sra %o0,31,%o3 // Wartetakt, nötig z.B. für SUN SPARCstation IPC andcc %g0,%g0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%g0,%o2 and %o3,%o1,%o3 // %o3 = (0 falls %o0>=0, %o1 falls %o0<0) add %o2,%o3,%g1 // hi retl _ rd %y,%o0 // lo #endif // extern uint32 mulu32_unchecked (uint32 x, uint32 y); // ergebnis := arg1*arg2 < 2^32. DECLARE_FUNCTION(mulu32_unchecked) C(mulu32_unchecked:) // Input in %o0,%o1, Output in %o0 #ifdef sparcv8 umul %o0,%o1,%o0 retl _ nop #else subcc %o0,%o1,%g0 bcc,a 1f __ mov %o1,%y // arg1 < arg2, also kann man arg1 < 2^16 annehmen. mov %o0,%y nop // Wartetakt, nötig z.B. für SUN SPARCstation IPC andcc %g0,%g0,%o2 mulscc %o2,%o1,%o2 mulscc %o2,%o1,%o2 mulscc %o2,%o1,%o2 mulscc %o2,%o1,%o2 mulscc %o2,%o1,%o2 mulscc %o2,%o1,%o2 mulscc %o2,%o1,%o2 mulscc %o2,%o1,%o2 mulscc %o2,%o1,%o2 mulscc %o2,%o1,%o2 mulscc %o2,%o1,%o2 mulscc %o2,%o1,%o2 mulscc %o2,%o1,%o2 mulscc %o2,%o1,%o2 mulscc %o2,%o1,%o2 mulscc %o2,%o1,%o2 // Die 17 unteren Bits von %o2 und die 15 oberen Bits von %y // ergeben das Resultat. (Die anderen Bits sind Null.) rd %y,%o0 srl %o0,17,%o0 sll %o2,15,%o2 retl _ or %o2,%o0,%o0 1: // arg1 >= arg2, also kann man arg2 < 2^16 annehmen. nop // Wartetakt, nötig z.B. für SUN SPARCstation IPC andcc %g0,%g0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 mulscc %o2,%o0,%o2 // Die 17 unteren Bits von %o2 und die 15 oberen Bits von %y // ergeben das Resultat. rd %y,%o0 srl %o0,17,%o0 sll %o2,15,%o2 retl _ or %o2,%o0,%o0 #endif // extern struct { uint32 q; uint32 r; } divu_6432_3232_ (uint32 xhi, uint32 xlo, uint32 y); // x = 2^32*xhi+xlo = q*y+r schreiben. Sei bekannt, daß 0 <= x < 2^32*y . DECLARE_FUNCTION(divu_6432_3232_) C(divu_6432_3232_:) // Input in %o0,%o1,%o2, Output in %o0,%g1 #if defined(sparcv8) // Problem: Is udiv worth using (gmp-2.0.2 doesn't use it) ?? wr %o0,%g0,%y nop // wait 1 | Necessary for certain sparcv8 nop // wait 2 | processors such as Ross Hypersparc, nop // wait 3 | but not for most of the others. udiv %o1,%o2,%o0 // x durch y dividieren, %o0 := q umul %o0,%o2,%g1 // %g1 := (q*y) mod 2^32 retl _ sub %o1,%g1,%g1 // %g1 := (xlo-q*y) mod 2^32 = r #else // %o0 = xhi, %o1 = xlo, %o2 = y // Divisions-Einzelschritte: // %o0|%o1 wird jeweils um 1 Bit nach links geschoben, // dafür wird rechts in %o1 ein Ergebnisbit (negiert!) reingeschoben. // Je nachdem wird mit %o3|%o1 statt %o0|%o1 weitergemacht (spart 1 'mov'). // Deswegen muß man den Code doppelt vorsehen: einmal mit %o0, einmal mit %o3. #define SA0(label) /* Vergleichsschritt mit %o0 */\ subcc %o0,%o2,%o3; \ bcc label; \ _ addxcc %o1,%o1,%o1 #define SA1(label) /* Vergleichsschritt mit %o3 */\ subcc %o3,%o2,%o0; \ bcc label; \ _ addxcc %o1,%o1,%o1 #define SB0() /* Additionsschritt mit %o0 */\ addx %o0,%o0,%o0 #define SB1() /* Additionsschritt mit %o3 */\ addx %o3,%o3,%o3 // Los geht's: addcc %o2,%o2,%g0 // y = %o2 < 2^31 ? bcc Lsmalldiv // ja -> "kleine" Division _ andcc %o2,1,%g0 // y = %o2 gerade ? be Levendiv // ja -> Division durch gerade Zahl _ srl %o2,1,%o2 // Division durch ungerade Zahl: // floor(x / (2*y'-1)) = floor(floor(x/2) / y') + (0 oder 1 oder 2) // da 0 <= x/(2*y'-1) - x/(2*y') = x/(2*y'-1) / (2*y') = x/y / (2*y') // < 2^32 / (2*y') < 2^32/y <= 2 . add %o2,1,%o2 // %o2 = ceiling(y/2) = y' // Man spart im Vergleich zu Lsmalldiv // zu Beginn eine Verdoppelung von %o0|%o1 : addcc %o1,%o1,%o1; SB0() // dafür am Schluß mehr zu tun... SA0(Lb01) // Bit 31 des Quotienten bestimmen La01: SB0(); SA0(Lb02) // Bit 30 des Quotienten bestimmen La02: SB0(); SA0(Lb03) // Bit 29 des Quotienten bestimmen La03: SB0(); SA0(Lb04) // Bit 28 des Quotienten bestimmen La04: SB0(); SA0(Lb05) // Bit 27 des Quotienten bestimmen La05: SB0(); SA0(Lb06) // Bit 26 des Quotienten bestimmen La06: SB0(); SA0(Lb07) // Bit 25 des Quotienten bestimmen La07: SB0(); SA0(Lb08) // Bit 24 des Quotienten bestimmen La08: SB0(); SA0(Lb09) // Bit 23 des Quotienten bestimmen La09: SB0(); SA0(Lb10) // Bit 22 des Quotienten bestimmen La10: SB0(); SA0(Lb11) // Bit 21 des Quotienten bestimmen La11: SB0(); SA0(Lb12) // Bit 20 des Quotienten bestimmen La12: SB0(); SA0(Lb13) // Bit 19 des Quotienten bestimmen La13: SB0(); SA0(Lb14) // Bit 18 des Quotienten bestimmen La14: SB0(); SA0(Lb15) // Bit 17 des Quotienten bestimmen La15: SB0(); SA0(Lb16) // Bit 16 des Quotienten bestimmen La16: SB0(); SA0(Lb17) // Bit 15 des Quotienten bestimmen La17: SB0(); SA0(Lb18) // Bit 14 des Quotienten bestimmen La18: SB0(); SA0(Lb19) // Bit 13 des Quotienten bestimmen La19: SB0(); SA0(Lb20) // Bit 12 des Quotienten bestimmen La20: SB0(); SA0(Lb21) // Bit 11 des Quotienten bestimmen La21: SB0(); SA0(Lb22) // Bit 10 des Quotienten bestimmen La22: SB0(); SA0(Lb23) // Bit 9 des Quotienten bestimmen La23: SB0(); SA0(Lb24) // Bit 8 des Quotienten bestimmen La24: SB0(); SA0(Lb25) // Bit 7 des Quotienten bestimmen La25: SB0(); SA0(Lb26) // Bit 6 des Quotienten bestimmen La26: SB0(); SA0(Lb27) // Bit 5 des Quotienten bestimmen La27: SB0(); SA0(Lb28) // Bit 4 des Quotienten bestimmen La28: SB0(); SA0(Lb29) // Bit 3 des Quotienten bestimmen La29: SB0(); SA0(Lb30) // Bit 2 des Quotienten bestimmen La30: SB0(); SA0(Lb31) // Bit 1 des Quotienten bestimmen La31: SB0(); SA0(Lb32) // Bit 0 des Quotienten bestimmen La32: SB0() // %o0 = x mod (2*y') xor %o1,-1,%o1 // %o1 = floor( floor(x/2) / y') = floor(x/(2*y')) add %o2,%o2,%o2 sub %o2,1,%o2 // wieder %o2 = 2*y'-1 = y // Quotient und Rest umrechnen: // x = %o1 * 2*y' + %o0 = %o1 * (2*y'-1) + (%o0+%o1) // Also Quotient = %o1, Rest = %o0+%o1. // Noch maximal 2 mal: Quotient += 1, Rest -= y. addcc %o1,%o0,%o0 // Rest mod y bestimmen bcc 1f // Additions-Überlauf -> Quotient erhöhen _ subcc %o0,%o2,%o3 subcc %o3,%o2,%o0 // muß der Quotient nochmals erhöht werden? bcs 2f _ mov %o3,%g1 // Quotient 2 mal erhöhen, Rest %o0 mov %o0,%g1 retl _ add %o1,2,%o0 1: // kein Additions-Überlauf. // Wegen y>=2^31 muß der Quotient noch höchstens 1 mal erhöht werden: bcs 3f // %o0 < %o2 -> Rest %o0 und Quotient %o1 OK _ mov %o3,%g1 2: // Quotient %o1 erhöhen, Rest = %o0-%o2 = %o3 retl _ add %o1,1,%o0 3: // Quotient %o1 und Rest %o0 OK mov %o0,%g1 retl _ mov %o1,%o0 // Parallelschiene zu La01..La32: Lb01: SB1(); SA1(La02) Lb02: SB1(); SA1(La03) Lb03: SB1(); SA1(La04) Lb04: SB1(); SA1(La05) Lb05: SB1(); SA1(La06) Lb06: SB1(); SA1(La07) Lb07: SB1(); SA1(La08) Lb08: SB1(); SA1(La09) Lb09: SB1(); SA1(La10) Lb10: SB1(); SA1(La11) Lb11: SB1(); SA1(La12) Lb12: SB1(); SA1(La13) Lb13: SB1(); SA1(La14) Lb14: SB1(); SA1(La15) Lb15: SB1(); SA1(La16) Lb16: SB1(); SA1(La17) Lb17: SB1(); SA1(La18) Lb18: SB1(); SA1(La19) Lb19: SB1(); SA1(La20) Lb20: SB1(); SA1(La21) Lb21: SB1(); SA1(La22) Lb22: SB1(); SA1(La23) Lb23: SB1(); SA1(La24) Lb24: SB1(); SA1(La25) Lb25: SB1(); SA1(La26) Lb26: SB1(); SA1(La27) Lb27: SB1(); SA1(La28) Lb28: SB1(); SA1(La29) Lb29: SB1(); SA1(La30) Lb30: SB1(); SA1(La31) Lb31: SB1(); SA1(La32) Lb32: SB1() // %o3 = x mod (2*y') xor %o1,-1,%o1 // %o1 = floor( floor(x/2) / y') = floor(x/(2*y')) add %o2,%o2,%o2 sub %o2,1,%o2 // wieder %o2 = 2*y'-1 = y // Quotient und Rest umrechnen: // x = %o1 * 2*y' + %o3 = %o1 * (2*y'-1) + (%o3+%o1) // Also Quotient = %o1, Rest = %o3+%o1. // Noch maximal 2 mal: Quotient += 1, Rest -= y. addcc %o1,%o3,%o3 // Rest mod y bestimmen bcc 1f // Additions-Überlauf -> Quotient erhöhen _ subcc %o3,%o2,%o0 subcc %o0,%o2,%o3 // muß der Quotient nochmals erhöht werden? bcs 2f _ mov %o0,%g1 // Quotient 2 mal erhöhen, Rest %o3 mov %o3,%g1 retl _ add %o1,2,%o0 1: // kein Additions-Überlauf. // Wegen y>=2^31 muß der Quotient noch höchstens 1 mal erhöht werden: bcs 3f // %o3 < %o2 -> Rest %o3 und Quotient %o1 OK _ mov %o0,%g1 2: // Quotient %o1 erhöhen, Rest = %o3-%o2 = %o0 retl _ add %o1,1,%o0 3: // Quotient %o1 und Rest %o3 OK mov %o3,%g1 retl _ mov %o1,%o0 Lsmalldiv: // Division durch y < 2^31 addcc %o1,%o1,%o1 Lc00: SB0(); SA0(Ld01) // Bit 31 des Quotienten bestimmen Lc01: SB0(); SA0(Ld02) // Bit 30 des Quotienten bestimmen Lc02: SB0(); SA0(Ld03) // Bit 29 des Quotienten bestimmen Lc03: SB0(); SA0(Ld04) // Bit 28 des Quotienten bestimmen Lc04: SB0(); SA0(Ld05) // Bit 27 des Quotienten bestimmen Lc05: SB0(); SA0(Ld06) // Bit 26 des Quotienten bestimmen Lc06: SB0(); SA0(Ld07) // Bit 25 des Quotienten bestimmen Lc07: SB0(); SA0(Ld08) // Bit 24 des Quotienten bestimmen Lc08: SB0(); SA0(Ld09) // Bit 23 des Quotienten bestimmen Lc09: SB0(); SA0(Ld10) // Bit 22 des Quotienten bestimmen Lc10: SB0(); SA0(Ld11) // Bit 21 des Quotienten bestimmen Lc11: SB0(); SA0(Ld12) // Bit 20 des Quotienten bestimmen Lc12: SB0(); SA0(Ld13) // Bit 19 des Quotienten bestimmen Lc13: SB0(); SA0(Ld14) // Bit 18 des Quotienten bestimmen Lc14: SB0(); SA0(Ld15) // Bit 17 des Quotienten bestimmen Lc15: SB0(); SA0(Ld16) // Bit 16 des Quotienten bestimmen Lc16: SB0(); SA0(Ld17) // Bit 15 des Quotienten bestimmen Lc17: SB0(); SA0(Ld18) // Bit 14 des Quotienten bestimmen Lc18: SB0(); SA0(Ld19) // Bit 13 des Quotienten bestimmen Lc19: SB0(); SA0(Ld20) // Bit 12 des Quotienten bestimmen Lc20: SB0(); SA0(Ld21) // Bit 11 des Quotienten bestimmen Lc21: SB0(); SA0(Ld22) // Bit 10 des Quotienten bestimmen Lc22: SB0(); SA0(Ld23) // Bit 9 des Quotienten bestimmen Lc23: SB0(); SA0(Ld24) // Bit 8 des Quotienten bestimmen Lc24: SB0(); SA0(Ld25) // Bit 7 des Quotienten bestimmen Lc25: SB0(); SA0(Ld26) // Bit 6 des Quotienten bestimmen Lc26: SB0(); SA0(Ld27) // Bit 5 des Quotienten bestimmen Lc27: SB0(); SA0(Ld28) // Bit 4 des Quotienten bestimmen Lc28: SB0(); SA0(Ld29) // Bit 3 des Quotienten bestimmen Lc29: SB0(); SA0(Ld30) // Bit 2 des Quotienten bestimmen Lc30: SB0(); SA0(Ld31) // Bit 1 des Quotienten bestimmen Lc31: SB0(); SA0(Ld32) // Bit 0 des Quotienten bestimmen Lc32: mov %o0,%g1 // Rest aus %o0 in %g1 abspeichern retl _ xor %o1,-1,%o0 // Quotient nach %o0 // Parallelschiene zu Lc01..Lc32: Ld01: SB1(); SA1(Lc02) Ld02: SB1(); SA1(Lc03) Ld03: SB1(); SA1(Lc04) Ld04: SB1(); SA1(Lc05) Ld05: SB1(); SA1(Lc06) Ld06: SB1(); SA1(Lc07) Ld07: SB1(); SA1(Lc08) Ld08: SB1(); SA1(Lc09) Ld09: SB1(); SA1(Lc10) Ld10: SB1(); SA1(Lc11) Ld11: SB1(); SA1(Lc12) Ld12: SB1(); SA1(Lc13) Ld13: SB1(); SA1(Lc14) Ld14: SB1(); SA1(Lc15) Ld15: SB1(); SA1(Lc16) Ld16: SB1(); SA1(Lc17) Ld17: SB1(); SA1(Lc18) Ld18: SB1(); SA1(Lc19) Ld19: SB1(); SA1(Lc20) Ld20: SB1(); SA1(Lc21) Ld21: SB1(); SA1(Lc22) Ld22: SB1(); SA1(Lc23) Ld23: SB1(); SA1(Lc24) Ld24: SB1(); SA1(Lc25) Ld25: SB1(); SA1(Lc26) Ld26: SB1(); SA1(Lc27) Ld27: SB1(); SA1(Lc28) Ld28: SB1(); SA1(Lc29) Ld29: SB1(); SA1(Lc30) Ld30: SB1(); SA1(Lc31) Ld31: SB1(); SA1(Lc32) Ld32: mov %o3,%g1 // Rest aus %o3 in %g1 abspeichern retl _ xor %o1,-1,%o0 // Quotient nach %o0 Levendiv: // Division durch gerades y. // x/2 durch y/2 dividieren, Quotient OK, Rest evtl. mit 2 multiplizieren. // Es ist schon %o2 = y/2. // Man spart im Vergleich zu Lsmalldiv // zu Beginn eine Verdoppelung von %o0|%o1 : addcc %o1,%o1,%o1; SB0() // dafür am Schluß Bit 0 von x zum Rest dazuschieben. SA0(Lf01) // Bit 31 des Quotienten bestimmen Le01: SB0(); SA0(Lf02) // Bit 30 des Quotienten bestimmen Le02: SB0(); SA0(Lf03) // Bit 29 des Quotienten bestimmen Le03: SB0(); SA0(Lf04) // Bit 28 des Quotienten bestimmen Le04: SB0(); SA0(Lf05) // Bit 27 des Quotienten bestimmen Le05: SB0(); SA0(Lf06) // Bit 26 des Quotienten bestimmen Le06: SB0(); SA0(Lf07) // Bit 25 des Quotienten bestimmen Le07: SB0(); SA0(Lf08) // Bit 24 des Quotienten bestimmen Le08: SB0(); SA0(Lf09) // Bit 23 des Quotienten bestimmen Le09: SB0(); SA0(Lf10) // Bit 22 des Quotienten bestimmen Le10: SB0(); SA0(Lf11) // Bit 21 des Quotienten bestimmen Le11: SB0(); SA0(Lf12) // Bit 20 des Quotienten bestimmen Le12: SB0(); SA0(Lf13) // Bit 19 des Quotienten bestimmen Le13: SB0(); SA0(Lf14) // Bit 18 des Quotienten bestimmen Le14: SB0(); SA0(Lf15) // Bit 17 des Quotienten bestimmen Le15: SB0(); SA0(Lf16) // Bit 16 des Quotienten bestimmen Le16: SB0(); SA0(Lf17) // Bit 15 des Quotienten bestimmen Le17: SB0(); SA0(Lf18) // Bit 14 des Quotienten bestimmen Le18: SB0(); SA0(Lf19) // Bit 13 des Quotienten bestimmen Le19: SB0(); SA0(Lf20) // Bit 12 des Quotienten bestimmen Le20: SB0(); SA0(Lf21) // Bit 11 des Quotienten bestimmen Le21: SB0(); SA0(Lf22) // Bit 10 des Quotienten bestimmen Le22: SB0(); SA0(Lf23) // Bit 9 des Quotienten bestimmen Le23: SB0(); SA0(Lf24) // Bit 8 des Quotienten bestimmen Le24: SB0(); SA0(Lf25) // Bit 7 des Quotienten bestimmen Le25: SB0(); SA0(Lf26) // Bit 6 des Quotienten bestimmen Le26: SB0(); SA0(Lf27) // Bit 5 des Quotienten bestimmen Le27: SB0(); SA0(Lf28) // Bit 4 des Quotienten bestimmen Le28: SB0(); SA0(Lf29) // Bit 3 des Quotienten bestimmen Le29: SB0(); SA0(Lf30) // Bit 2 des Quotienten bestimmen Le30: SB0(); SA0(Lf31) // Bit 1 des Quotienten bestimmen Le31: SB0(); SA0(Lf32) // Bit 0 des Quotienten bestimmen Le32: SB0() // Bit 0 des Restes bestimmen mov %o0,%g1 // Rest aus %o0 in %g1 abspeichern retl _ xor %o1,-1,%o0 // Quotient nach %o0 // Parallelschiene zu Le01..Le32: Lf01: SB1(); SA1(Le02) Lf02: SB1(); SA1(Le03) Lf03: SB1(); SA1(Le04) Lf04: SB1(); SA1(Le05) Lf05: SB1(); SA1(Le06) Lf06: SB1(); SA1(Le07) Lf07: SB1(); SA1(Le08) Lf08: SB1(); SA1(Le09) Lf09: SB1(); SA1(Le10) Lf10: SB1(); SA1(Le11) Lf11: SB1(); SA1(Le12) Lf12: SB1(); SA1(Le13) Lf13: SB1(); SA1(Le14) Lf14: SB1(); SA1(Le15) Lf15: SB1(); SA1(Le16) Lf16: SB1(); SA1(Le17) Lf17: SB1(); SA1(Le18) Lf18: SB1(); SA1(Le19) Lf19: SB1(); SA1(Le20) Lf20: SB1(); SA1(Le21) Lf21: SB1(); SA1(Le22) Lf22: SB1(); SA1(Le23) Lf23: SB1(); SA1(Le24) Lf24: SB1(); SA1(Le25) Lf25: SB1(); SA1(Le26) Lf26: SB1(); SA1(Le27) Lf27: SB1(); SA1(Le28) Lf28: SB1(); SA1(Le29) Lf29: SB1(); SA1(Le30) Lf30: SB1(); SA1(Le31) Lf31: SB1(); SA1(Le32) Lf32: SB1() mov %o3,%g1 // Rest aus %o0 in %g1 abspeichern retl _ xor %o1,-1,%o0 // Quotient nach %o0 #endif // extern struct { uint16 q; uint16 r; } divu_3216_1616_ (uint32 x, uint16 y); // x = q*y+r schreiben. Sei bekannt, daß 0 <= x < 2^16*y . DECLARE_FUNCTION(divu_3216_1616_) C(divu_3216_1616_:) // Input in %o0,%o1, Output in %o0 (Rest und Quotient). #if defined(sparcv8) // Problem: Is udiv worth using (gmp-2.0.2 doesn't use it) ?? wr %g0,%g0,%y nop // wait 1 nop // wait 2 nop // wait 3 udiv %o0,%o1,%o0 // dividieren, Quotient nach %o0 rd %y,%o1 // Rest aus %y sll %o1,16,%o1 // in die oberen 16 Bit schieben retl _ or %o0,%o1,%o0 #else // %o0 = x, %o1 = y // Divisions-Einzelschritte: // %o0 wird jeweils um 1 Bit nach links geschoben, // dafür wird rechts in %o1 ein Ergebnisbit (negiert!) reingeschoben. // Dann wird auf >= 2^15*y verglichen (nicht auf >= 2^16*y, weil man dann das // links herausgeschobene Bit mit vergleichen müßte!) sll %o1,16,%o1 srl %o1,1,%o1 // 2^15*y sub %g0,%o1,%o2 // zum Addieren statt Subtrahieren: -2^15*y // SC0(label) subtrahiert y, schiebt Carry-Bit rechts in %o0 rein // (1 falls Subtraktion aufging, 0 sonst). // Ging die Subtraktion nicht auf, so müßte man noch 2*y addieren. // Das faßt man mit der nächsten Operation zusammen, indem man - statt // y zu subtrahieren - y addiert: // SC1(label) addiert y, schiebt Carry-Bit rechts in %o0 rein // (1 falls Subtraktion aufgegangen wäre, man also wieder im // "positiven Bereich" landet, 0 sonst). #define SC0(label) \ addcc %o0,%o2,%o0; \ bcc label; \ _ addx %o0,%o0,%o0 #define SC1(label) \ addcc %o0,%o1,%o0; \ bcs label; \ _ addx %o0,%o0,%o0 SC0(Lh01) // Bit 15 des Quotienten bestimmen Lg01: SC0(Lh02) // Bit 14 des Quotienten bestimmen Lg02: SC0(Lh03) // Bit 13 des Quotienten bestimmen Lg03: SC0(Lh04) // Bit 12 des Quotienten bestimmen Lg04: SC0(Lh05) // Bit 11 des Quotienten bestimmen Lg05: SC0(Lh06) // Bit 10 des Quotienten bestimmen Lg06: SC0(Lh07) // Bit 9 des Quotienten bestimmen Lg07: SC0(Lh08) // Bit 8 des Quotienten bestimmen Lg08: SC0(Lh09) // Bit 7 des Quotienten bestimmen Lg09: SC0(Lh10) // Bit 6 des Quotienten bestimmen Lg10: SC0(Lh11) // Bit 5 des Quotienten bestimmen Lg11: SC0(Lh12) // Bit 4 des Quotienten bestimmen Lg12: SC0(Lh13) // Bit 3 des Quotienten bestimmen Lg13: SC0(Lh14) // Bit 2 des Quotienten bestimmen Lg14: SC0(Lh15) // Bit 1 des Quotienten bestimmen Lg15: SC0(Lh16) // Bit 0 des Quotienten bestimmen Lg16: // Die oberen 16 Bit von %o0 sind der Rest, // die unteren 16 Bit von %o0 sind der Quotient. retl _ nop Lh01: SC1(Lg02) // Bit 14 des Quotienten bestimmen Lh02: SC1(Lg03) // Bit 13 des Quotienten bestimmen Lh03: SC1(Lg04) // Bit 12 des Quotienten bestimmen Lh04: SC1(Lg05) // Bit 11 des Quotienten bestimmen Lh05: SC1(Lg06) // Bit 10 des Quotienten bestimmen Lh06: SC1(Lg07) // Bit 9 des Quotienten bestimmen Lh07: SC1(Lg08) // Bit 8 des Quotienten bestimmen Lh08: SC1(Lg09) // Bit 7 des Quotienten bestimmen Lh09: SC1(Lg10) // Bit 6 des Quotienten bestimmen Lh10: SC1(Lg11) // Bit 5 des Quotienten bestimmen Lh11: SC1(Lg12) // Bit 4 des Quotienten bestimmen Lh12: SC1(Lg13) // Bit 3 des Quotienten bestimmen Lh13: SC1(Lg14) // Bit 2 des Quotienten bestimmen Lh14: SC1(Lg15) // Bit 1 des Quotienten bestimmen Lh15: SC1(Lg16) // Bit 0 des Quotienten bestimmen Lh16: // Noch 2*y addieren: add %o0,%o1,%o0 retl _ add %o0,%o1,%o0 #endif #if !defined(__GNUC__) .global C(_get_g1) // extern uint32 _get_g1 (void); DECLARE_FUNCTION(_get_g1) C(_get_g1:) retl _ mov %g1,%o0 #endif // extern uintD* copy_loop_up (uintD* sourceptr, uintD* destptr, uintC count); DECLARE_FUNCTION(copy_loop_up) C(copy_loop_up:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ nop 1: ld [%o0],%o3 add %o0,4,%o0 st %o3,[%o1] subcc %o2,1,%o2 bne 1b _ add %o1,4,%o1 2: retl _ mov %o1,%o0 #endif #if COUNTER_LOOPS subcc %g0,%o2,%o2 // %o2 = -count be 2f _ sub %o1,4,%o1 sll %o2,2,%o2 // %o2 = -4*count sub %o0,%o2,%o0 // %o0 = &sourceptr[count] sub %o1,%o2,%o1 // %o1 = &destptr[count-1] 1: ld [%o0+%o2],%o3 // nächstes Digit holen addcc %o2,4,%o2 // Zähler "erniedrigen", Pointer erhöhen bne 1b _ st %o3,[%o1+%o2] // Digit ablegen 2: retl _ add %o1,4,%o0 #endif // extern uintD* copy_loop_down (uintD* sourceptr, uintD* destptr, uintC count); DECLARE_FUNCTION(copy_loop_down) C(copy_loop_down:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o0,4,%o0 1: ld [%o0],%o3 sub %o1,4,%o1 st %o3,[%o1] subcc %o2,1,%o2 bne 1b _ sub %o0,4,%o0 2: retl _ mov %o1,%o0 #endif #if COUNTER_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o0,4,%o0 sll %o2,2,%o2 // %o2 = 4*count sub %o0,%o2,%o0 // %o0 = &sourceptr[-count-1] sub %o1,%o2,%o1 // %o1 = &destptr[-count] 1: ld [%o0+%o2],%o3 // nächstes Digit holen subcc %o2,4,%o2 // Zähler erniedrigen, Pointer erniedrigen bne 1b _ st %o3,[%o1+%o2] // Digit ablegen 2: retl _ mov %o1,%o0 #endif // extern uintD* fill_loop_up (uintD* destptr, uintC count, uintD filler); DECLARE_FUNCTION(fill_loop_up) C(fill_loop_up:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS andcc %o1,%o1,%g0 be 2f _ nop 1: st %o2,[%o0] subcc %o1,1,%o1 bne 1b _ add %o0,4,%o0 2: retl _ nop #endif #if COUNTER_LOOPS subcc %g0,%o1,%o1 // %o1 = -count be 2f _ sub %o0,4,%o0 sll %o1,2,%o1 // %o1 = -4*count sub %o0,%o1,%o0 // %o0 = &destptr[count-1] 1: addcc %o1,4,%o1 // Zähler "erniedrigen", Pointer erhöhen bne 1b _ st %o2,[%o0+%o1] // Digit ablegen 2: retl _ add %o0,4,%o0 #endif // extern uintD* fill_loop_down (uintD* destptr, uintC count, uintD filler); DECLARE_FUNCTION(fill_loop_down) C(fill_loop_down:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS andcc %o1,%o1,%g0 be 2f _ sub %o0,4,%o0 1: st %o2,[%o0] subcc %o1,1,%o1 bne 1b _ sub %o0,4,%o0 2: retl _ add %o0,4,%o0 #endif #if COUNTER_LOOPS andcc %o1,%o1,%g0 be 2f _ sll %o1,2,%o1 // %o1 = 4*count sub %o0,%o1,%o0 // %o0 = &destptr[-count] 1: subcc %o1,4,%o1 // Zähler erniedrigen, Pointer erniedrigen bne 1b _ st %o2,[%o0+%o1] // Digit ablegen 2: retl _ nop #endif // extern uintD* clear_loop_up (uintD* destptr, uintC count); DECLARE_FUNCTION(clear_loop_up) C(clear_loop_up:) // Input in %o0,%o1, Output in %o0 #if STANDARD_LOOPS andcc %o1,%o1,%g0 be 2f _ nop 1: st %g0,[%o0] subcc %o1,1,%o1 bne 1b _ add %o0,4,%o0 2: retl _ nop #endif #if COUNTER_LOOPS subcc %g0,%o1,%o1 // %o1 = -count be 2f _ sub %o0,4,%o0 sll %o1,2,%o1 // %o1 = -4*count sub %o0,%o1,%o0 // %o0 = &destptr[count-1] 1: addcc %o1,4,%o1 // Zähler "erniedrigen", Pointer erhöhen bne 1b _ st %g0,[%o0+%o1] // Digit 0 ablegen 2: retl _ add %o0,4,%o0 #endif // extern uintD* clear_loop_down (uintD* destptr, uintC count); DECLARE_FUNCTION(clear_loop_down) C(clear_loop_down:) // Input in %o0,%o1, Output in %o0 #if STANDARD_LOOPS andcc %o1,%o1,%g0 be 2f _ sub %o0,4,%o0 1: st %g0,[%o0] subcc %o1,1,%o1 bne 1b _ sub %o0,4,%o0 2: retl _ add %o0,4,%o0 #endif #if COUNTER_LOOPS andcc %o1,%o1,%g0 be 2f _ sll %o1,2,%o1 // %o1 = 4*count sub %o0,%o1,%o0 // %o0 = &destptr[-count] 1: subcc %o1,4,%o1 // Zähler erniedrigen, Pointer erniedrigen bne 1b _ st %g0,[%o0+%o1] // Digit 0 ablegen 2: retl _ nop #endif // extern boolean test_loop_up (uintD* ptr, uintC count); DECLARE_FUNCTION(test_loop_up) C(test_loop_up:) // Input in %o0,%o1, Output in %o0 #if STANDARD_LOOPS andcc %o1,%o1,%g0 be 2f _ nop ld [%o0],%o2 1: add %o0,4,%o0 andcc %o2,%o2,%g0 bne 3f _ subcc %o1,1,%o1 bne,a 1b __ ld [%o0],%o2 2: retl _ mov 0,%o0 3: retl _ mov 1,%o0 #endif #if COUNTER_LOOPS subcc %g0,%o1,%o1 // %o1 = -count be 2f _ sll %o1,2,%o1 // %o1 = -4*count sub %o0,%o1,%o0 // %o0 = &ptr[count] ld [%o0+%o1],%o2 // nächstes Digit holen 1: andcc %o2,%o2,%g0 // testen bne 3f _ addcc %o1,4,%o1 // Zähler "erniedrigen", Pointer erhöhen bne,a 1b __ ld [%o0+%o1],%o2 // nächstes Digit holen 2: retl _ mov 0,%o0 3: retl _ mov 1,%o0 #endif // extern boolean test_loop_down (uintD* ptr, uintC count); DECLARE_FUNCTION(test_loop_down) C(test_loop_down:) // Input in %o0,%o1, Output in %o0 #if STANDARD_LOOPS andcc %o1,%o1,%g0 be 2f _ sub %o0,4,%o0 ld [%o0],%o2 1: sub %o0,4,%o0 andcc %o2,%o2,%g0 bne 3f _ subcc %o1,1,%o1 bne,a 1b __ ld [%o0],%o2 2: retl _ mov 0,%o0 3: retl _ mov 1,%o0 #endif #if COUNTER_LOOPS sll %o1,2,%o1 // %o1 = 4*count sub %o0,%o1,%o0 // %o0 = &ptr[-count] subcc %o1,4,%o1 bcs 4f _ nop ld [%o0+%o1],%o2 // nächstes Digit holen 1: subcc %o1,4,%o1 // Zähler erniedrigen, Pointer erniedrigen bcs 3f _ andcc %o2,%o2,%g0 // testen be,a 1b __ ld [%o0+%o1],%o2 // nächstes Digit holen 2: retl _ mov 1,%o0 3: bne 2b _ nop 4: retl _ mov 0,%o0 #endif #if CL_DS_BIG_ENDIAN_P // extern void or_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(or_loop_up) C(or_loop_up:) // Input in %o0,%o1,%o2 #if SLOW_LOOPS andcc %o2,%o2,%g0 be 2f _ nop 1: ld [%o0],%o3 ld [%o1],%o4 add %o1,4,%o1 or %o3,%o4,%o3 st %o3,[%o0] subcc %o2,1,%o2 bne 1b _ add %o0,4,%o0 2: retl _ nop #endif #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr 1: ld [%o0],%o3 // *xptr ld [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 or %o3,%o4,%o3 // verknüpfen st %o3,[%o0] // =: *xptr bne 1b _ add %o0,4,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS subcc %g0,%o2,%o2 // %o2 = -count be 2f _ sub %o0,4,%o0 sll %o2,2,%o2 // %o2 = -4*count sub %o0,%o2,%o0 // %o0 = &xptr[count-1] sub %o1,%o2,%o1 // %o1 = &yptr[count] 1: ld [%o1+%o2],%o3 // nächstes Digit holen addcc %o2,4,%o2 // Zähler "erniedrigen", Pointer erhöhen ld [%o0+%o2],%o4 // noch ein Digit holen or %o4,%o3,%o3 // beide verknüpfen bne 1b _ st %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif #endif // extern void xor_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(xor_loop_up) C(xor_loop_up:) // Input in %o0,%o1,%o2 #if SLOW_LOOPS andcc %o2,%o2,%g0 be 2f _ nop 1: ld [%o0],%o3 ld [%o1],%o4 add %o1,4,%o1 xor %o3,%o4,%o3 st %o3,[%o0] subcc %o2,1,%o2 bne 1b _ add %o0,4,%o0 2: retl _ nop #endif #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr 1: ld [%o0],%o3 // *xptr ld [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 xor %o3,%o4,%o3 // verknüpfen st %o3,[%o0] // =: *xptr bne 1b _ add %o0,4,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS subcc %g0,%o2,%o2 // %o2 = -count be 2f _ sub %o0,4,%o0 sll %o2,2,%o2 // %o2 = -4*count sub %o0,%o2,%o0 // %o0 = &xptr[count-1] sub %o1,%o2,%o1 // %o1 = &yptr[count] 1: ld [%o1+%o2],%o3 // nächstes Digit holen addcc %o2,4,%o2 // Zähler "erniedrigen", Pointer erhöhen ld [%o0+%o2],%o4 // noch ein Digit holen xor %o4,%o3,%o3 // beide verknüpfen bne 1b _ st %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif #if CL_DS_BIG_ENDIAN_P // extern void and_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(and_loop_up) C(and_loop_up:) // Input in %o0,%o1,%o2 #if SLOW_LOOPS andcc %o2,%o2,%g0 be 2f _ nop 1: ld [%o0],%o3 ld [%o1],%o4 add %o1,4,%o1 and %o3,%o4,%o3 st %o3,[%o0] subcc %o2,1,%o2 bne 1b _ add %o0,4,%o0 2: retl _ nop #endif #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr 1: ld [%o0],%o3 // *xptr ld [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 and %o3,%o4,%o3 // verknüpfen st %o3,[%o0] // =: *xptr bne 1b _ add %o0,4,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS subcc %g0,%o2,%o2 // %o2 = -count be 2f _ sub %o0,4,%o0 sll %o2,2,%o2 // %o2 = -4*count sub %o0,%o2,%o0 // %o0 = &xptr[count-1] sub %o1,%o2,%o1 // %o1 = &yptr[count] 1: ld [%o1+%o2],%o3 // nächstes Digit holen addcc %o2,4,%o2 // Zähler "erniedrigen", Pointer erhöhen ld [%o0+%o2],%o4 // noch ein Digit holen and %o4,%o3,%o3 // beide verknüpfen bne 1b _ st %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void eqv_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(eqv_loop_up) C(eqv_loop_up:) // Input in %o0,%o1,%o2 #if SLOW_LOOPS andcc %o2,%o2,%g0 be 2f _ nop 1: ld [%o0],%o3 ld [%o1],%o4 add %o1,4,%o1 xnor %o3,%o4,%o3 st %o3,[%o0] subcc %o2,1,%o2 bne 1b _ add %o0,4,%o0 2: retl _ nop #endif #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr 1: ld [%o0],%o3 // *xptr ld [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 xnor %o3,%o4,%o3 // verknüpfen st %o3,[%o0] // =: *xptr bne 1b _ add %o0,4,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS subcc %g0,%o2,%o2 // %o2 = -count be 2f _ sub %o0,4,%o0 sll %o2,2,%o2 // %o2 = -4*count sub %o0,%o2,%o0 // %o0 = &xptr[count-1] sub %o1,%o2,%o1 // %o1 = &yptr[count] 1: ld [%o1+%o2],%o3 // nächstes Digit holen addcc %o2,4,%o2 // Zähler "erniedrigen", Pointer erhöhen ld [%o0+%o2],%o4 // noch ein Digit holen xnor %o4,%o3,%o3 // beide verknüpfen bne 1b _ st %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void nand_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(nand_loop_up) C(nand_loop_up:) // Input in %o0,%o1,%o2 #if SLOW_LOOPS andcc %o2,%o2,%g0 be 2f _ nop 1: ld [%o0],%o3 ld [%o1],%o4 add %o1,4,%o1 and %o3,%o4,%o3 xor %o3,-1,%o3 st %o3,[%o0] subcc %o2,1,%o2 bne 1b _ add %o0,4,%o0 2: retl _ nop #endif #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr 1: ld [%o0],%o3 // *xptr ld [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 and %o3,%o4,%o3 // verknüpfen xor %o3,-1,%o3 st %o3,[%o0] // =: *xptr bne 1b _ add %o0,4,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS subcc %g0,%o2,%o2 // %o2 = -count be 2f _ sub %o0,4,%o0 sll %o2,2,%o2 // %o2 = -4*count sub %o0,%o2,%o0 // %o0 = &xptr[count-1] sub %o1,%o2,%o1 // %o1 = &yptr[count] 1: ld [%o1+%o2],%o3 // nächstes Digit holen addcc %o2,4,%o2 // Zähler "erniedrigen", Pointer erhöhen ld [%o0+%o2],%o4 // noch ein Digit holen and %o4,%o3,%o3 // beide verknüpfen xor %o3,-1,%o3 bne 1b _ st %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void nor_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(nor_loop_up) C(nor_loop_up:) // Input in %o0,%o1,%o2 #if SLOW_LOOPS andcc %o2,%o2,%g0 be 2f _ nop 1: ld [%o0],%o3 ld [%o1],%o4 add %o1,4,%o1 or %o3,%o4,%o3 xor %o3,-1,%o3 st %o3,[%o0] subcc %o2,1,%o2 bne 1b _ add %o0,4,%o0 2: retl _ nop #endif #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr 1: ld [%o0],%o3 // *xptr ld [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 or %o3,%o4,%o3 // verknüpfen xor %o3,-1,%o3 st %o3,[%o0] // =: *xptr bne 1b _ add %o0,4,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS subcc %g0,%o2,%o2 // %o2 = -count be 2f _ sub %o0,4,%o0 sll %o2,2,%o2 // %o2 = -4*count sub %o0,%o2,%o0 // %o0 = &xptr[count-1] sub %o1,%o2,%o1 // %o1 = &yptr[count] 1: ld [%o1+%o2],%o3 // nächstes Digit holen addcc %o2,4,%o2 // Zähler "erniedrigen", Pointer erhöhen ld [%o0+%o2],%o4 // noch ein Digit holen or %o4,%o3,%o3 // beide verknüpfen xor %o3,-1,%o3 bne 1b _ st %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void andc2_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(andc2_loop_up) C(andc2_loop_up:) // Input in %o0,%o1,%o2 #if SLOW_LOOPS andcc %o2,%o2,%g0 be 2f _ nop 1: ld [%o0],%o3 ld [%o1],%o4 add %o1,4,%o1 andn %o3,%o4,%o3 st %o3,[%o0] subcc %o2,1,%o2 bne 1b _ add %o0,4,%o0 2: retl _ nop #endif #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr 1: ld [%o0],%o3 // *xptr ld [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 andn %o3,%o4,%o3 // verknüpfen st %o3,[%o0] // =: *xptr bne 1b _ add %o0,4,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS subcc %g0,%o2,%o2 // %o2 = -count be 2f _ sub %o0,4,%o0 sll %o2,2,%o2 // %o2 = -4*count sub %o0,%o2,%o0 // %o0 = &xptr[count-1] sub %o1,%o2,%o1 // %o1 = &yptr[count] 1: ld [%o1+%o2],%o3 // nächstes Digit holen addcc %o2,4,%o2 // Zähler "erniedrigen", Pointer erhöhen ld [%o0+%o2],%o4 // noch ein Digit holen andn %o4,%o3,%o3 // beide verknüpfen bne 1b _ st %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void orc2_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(orc2_loop_up) C(orc2_loop_up:) // Input in %o0,%o1,%o2 #if SLOW_LOOPS andcc %o2,%o2,%g0 be 2f _ nop 1: ld [%o0],%o3 ld [%o1],%o4 add %o1,4,%o1 orn %o3,%o4,%o3 st %o3,[%o0] subcc %o2,1,%o2 bne 1b _ add %o0,4,%o0 2: retl _ nop #endif #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr 1: ld [%o0],%o3 // *xptr ld [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 orn %o3,%o4,%o3 // verknüpfen st %o3,[%o0] // =: *xptr bne 1b _ add %o0,4,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS subcc %g0,%o2,%o2 // %o2 = -count be 2f _ sub %o0,4,%o0 sll %o2,2,%o2 // %o2 = -4*count sub %o0,%o2,%o0 // %o0 = &xptr[count-1] sub %o1,%o2,%o1 // %o1 = &yptr[count] 1: ld [%o1+%o2],%o3 // nächstes Digit holen addcc %o2,4,%o2 // Zähler "erniedrigen", Pointer erhöhen ld [%o0+%o2],%o4 // noch ein Digit holen orn %o4,%o3,%o3 // beide verknüpfen bne 1b _ st %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void not_loop_up (uintD* xptr, uintC count); DECLARE_FUNCTION(not_loop_up) C(not_loop_up:) // Input in %o0,%o1 #if STANDARD_LOOPS andcc %o1,%o1,%g0 be 2f _ nop 1: ld [%o0],%o2 subcc %o1,1,%o1 xor %o2,-1,%o2 st %o2,[%o0] bne 1b _ add %o0,4,%o0 2: retl _ nop #endif #if COUNTER_LOOPS subcc %g0,%o1,%o1 // %o1 = -count be 2f _ sub %o0,4,%o0 sll %o1,2,%o1 // %o1 = -4*count sub %o0,%o1,%o0 // %o0 = &destptr[count-1] 1: addcc %o1,4,%o1 // Zähler "erniedrigen", Pointer erhöhen ld [%o0+%o1],%o2 // nächstes Digit holen xor %o2,-1,%o2 bne 1b _ st %o2,[%o0+%o1] // Digit ablegen 2: retl _ nop #endif // extern boolean and_test_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(and_test_loop_up) C(and_test_loop_up:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ nop 1: ld [%o0],%o3 ld [%o1],%o4 add %o0,4,%o0 andcc %o3,%o4,%g0 bne 3f _ subcc %o2,1,%o2 bne 1b _ add %o1,4,%o1 2: retl _ mov 0,%o0 3: retl _ mov 1,%o0 #endif #if COUNTER_LOOPS subcc %g0,%o2,%o2 // %o2 = -count be 2f _ sll %o2,2,%o2 // %o2 = -4*count sub %o0,%o2,%o0 // %o0 = &xptr[count] sub %o1,%o2,%o1 // %o1 = &yptr[count] ld [%o0+%o2],%o3 // nächstes Digit holen 1: ld [%o1+%o2],%o4 // noch ein Digit holen andcc %o3,%o4,%g0 // beide verknüpfen bne 3f _ addcc %o2,4,%o2 // Zähler "erniedrigen", Pointer erhöhen bne,a 1b __ ld [%o0+%o2],%o3 // nächstes Digit holen 2: retl _ mov 0,%o0 3: retl _ mov 1,%o0 #endif #endif // extern cl_signean compare_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(compare_loop_up) C(compare_loop_up:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ nop ld [%o0],%o3 1: ld [%o1],%o4 add %o0,4,%o0 subcc %o3,%o4,%g0 bne 3f _ add %o1,4,%o1 subcc %o2,1,%o2 bne,a 1b __ ld [%o0],%o3 2: retl _ mov 0,%o0 3: blu 4f _ nop retl _ mov 1,%o0 4: retl _ mov -1,%o0 #endif #if COUNTER_LOOPS subcc %g0,%o2,%o2 // %o2 = -count be 2f _ sll %o2,2,%o2 // %o2 = -4*count sub %o0,%o2,%o0 // %o0 = &xptr[count] sub %o1,%o2,%o1 // %o1 = &yptr[count] ld [%o0+%o2],%o3 // nächstes Digit holen 1: ld [%o1+%o2],%o4 // noch ein Digit holen subcc %o3,%o4,%g0 // vergleichen bne 3f _ addcc %o2,4,%o2 // Zähler "erniedrigen", Pointer erhöhen bne,a 1b __ ld [%o0+%o2],%o3 // nächstes Digit holen 2: retl _ mov 0,%o0 3: subcc %o3,%o4,%g0 // nochmals vergleichen blu 4f _ nop retl _ mov 1,%o0 4: retl _ mov -1,%o0 #endif #if CL_DS_BIG_ENDIAN_P // extern uintD add_loop_down (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); DECLARE_FUNCTION(add_loop_down) C(add_loop_down:) // Input in %o0,%o1,%o2,%o3, verändert %g1, Output in %o0 #if STANDARD_LOOPS andcc %o3,%o3,%g0 be 2f _ mov %g0,%g1 // Carry := 0 sub %o0,4,%o0 1: ld [%o0],%o4 // source1-digit sub %o1,4,%o1 ld [%o1],%o5 // source2-digit subcc %g0,%g1,%g0 // carry addxcc %o4,%o5,%o4 // addieren addx %g0,%g0,%g1 // neuer Carry sub %o2,4,%o2 st %o4,[%o2] // Digit ablegen subcc %o3,1,%o3 bne 1b _ sub %o0,4,%o0 2: retl _ mov %g1,%o0 #endif #if COUNTER_LOOPS andcc %o3,%o3,%g0 be 2f _ mov %g0,%g1 // Carry := 0 sub %o0,4,%o0 sub %o1,4,%o1 sll %o3,2,%o3 // %o3 = 4*count sub %o0,%o3,%o0 // %o0 = &sourceptr1[-count-1] sub %o1,%o3,%o1 // %o1 = &sourceptr2[-count-1] sub %o2,%o3,%o2 // %o2 = &destptr[-count] 1: ld [%o0+%o3],%o4 // source1-digit ld [%o1+%o3],%o5 // source2-digit subcc %g0,%g1,%g0 // carry addxcc %o4,%o5,%o4 // addieren addx %g0,%g0,%g1 // neuer Carry subcc %o3,4,%o3 bne 1b _ st %o4,[%o2+%o3] // Digit ablegen 2: retl _ mov %g1,%o0 #endif #if UNROLLED_LOOPS and %o3,7,%o4 // count mod 8 sll %o4,2,%o5 sub %o0,%o5,%o0 // %o0 = &sourceptr1[-(count mod 8)] sub %o1,%o5,%o1 // %o1 = &sourceptr2[-(count mod 8)] sub %o2,%o5,%o2 // %o2 = &destptr[-(count mod 8)] sll %o4,4,%o4 #ifdef PIC mov %o7,%g2 // save return address call 0f // put address of label 0 into %o7 _ add %o7,144,%o5 0: #else set _add_loop_down+176,%o5 #endif sub %o5,%o4,%o5 jmp %o5 // Sprung nach (label 1)+4*(1+4*8-4*(count mod 8)) _ subcc %g0,%g0,%g0 // carry löschen 1: subcc %g0,%g1,%g0 // carry ld [%o0+28],%o4 // source1-digit ld [%o1+28],%o5 // source2-digit addxcc %o5,%o4,%o5 // addieren st %o5,[%o2+28] // Digit ablegen ld [%o0+24],%o4 // source1-digit ld [%o1+24],%o5 // source2-digit addxcc %o5,%o4,%o5 // addieren st %o5,[%o2+24] // Digit ablegen ld [%o0+20],%o4 // source1-digit ld [%o1+20],%o5 // source2-digit addxcc %o5,%o4,%o5 // addieren st %o5,[%o2+20] // Digit ablegen ld [%o0+16],%o4 // source1-digit ld [%o1+16],%o5 // source2-digit addxcc %o5,%o4,%o5 // addieren st %o5,[%o2+16] // Digit ablegen ld [%o0+12],%o4 // source1-digit ld [%o1+12],%o5 // source2-digit addxcc %o5,%o4,%o5 // addieren st %o5,[%o2+12] // Digit ablegen ld [%o0+8],%o4 // source1-digit ld [%o1+8],%o5 // source2-digit addxcc %o5,%o4,%o5 // addieren st %o5,[%o2+8] // Digit ablegen ld [%o0+4],%o4 // source1-digit ld [%o1+4],%o5 // source2-digit addxcc %o5,%o4,%o5 // addieren st %o5,[%o2+4] // Digit ablegen ld [%o0],%o4 // source1-digit ld [%o1],%o5 // source2-digit addxcc %o5,%o4,%o5 // addieren st %o5,[%o2] // Digit ablegen addx %g0,%g0,%g1 // neuer Carry sub %o0,32,%o0 sub %o1,32,%o1 subcc %o3,8,%o3 // noch mindestens 8 Digits abzuarbeiten? bcc 1b _ sub %o2,32,%o2 #ifdef PIC jmp %g2+8 #else retl #endif _ mov %g1,%o0 #endif // extern uintD addto_loop_down (uintD* sourceptr, uintD* destptr, uintC count); DECLARE_FUNCTION(addto_loop_down) C(addto_loop_down:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ mov %g0,%o5 // Carry := 0 sub %o0,4,%o0 1: ld [%o0],%o3 // source-digit sub %o1,4,%o1 ld [%o1],%o4 // dest-digit subcc %g0,%o5,%g0 // carry addxcc %o4,%o3,%o4 // addieren addx %g0,%g0,%o5 // neuer Carry st %o4,[%o1] // Digit ablegen subcc %o2,1,%o2 bne 1b _ sub %o0,4,%o0 2: retl _ mov %o5,%o0 #endif #if COUNTER_LOOPS andcc %o2,%o2,%g0 be 2f _ mov %g0,%o5 // Carry := 0 sub %o0,4,%o0 sub %o1,4,%o1 sll %o2,2,%o2 // %o2 = 4*count sub %o0,%o2,%o0 // %o0 = &sourceptr[-count-1] sub %o1,%o2,%o1 // %o1 = &destptr[-count-1] ld [%o0+%o2],%o3 // source-digit 1: ld [%o1+%o2],%o4 // dest-digit subcc %g0,%o5,%g0 // carry addxcc %o4,%o3,%o4 // addieren addx %g0,%g0,%o5 // neuer Carry st %o4,[%o1+%o2] // Digit ablegen subcc %o2,4,%o2 bne,a 1b __ ld [%o0+%o2],%o3 // source-digit 2: retl _ mov %o5,%o0 #endif #if UNROLLED_LOOPS and %o2,7,%o3 // count mod 8 sll %o3,2,%o4 sub %o0,%o4,%o0 // %o0 = &sourceptr[-(count mod 8)] sub %o1,%o4,%o1 // %o1 = &destptr[-(count mod 8)] sll %o3,4,%o3 #ifdef PIC mov %o7,%g2 // save return address call 0f // put address of label 0 into %o7 _ add %o7,144,%o4 0: #else set _addto_loop_down+172,%o4 #endif sub %o4,%o3,%o4 jmp %o4 // Sprung nach (label 1)+4*(1+4*8-4*(count mod 8)) _ subcc %g0,%g0,%g0 // carry löschen 1: subcc %g0,%o5,%g0 // carry ld [%o0+28],%o3 // source-digit ld [%o1+28],%o4 // dest-digit addxcc %o4,%o3,%o4 // addieren st %o4,[%o1+28] // Digit ablegen ld [%o0+24],%o3 // source-digit ld [%o1+24],%o4 // dest-digit addxcc %o4,%o3,%o4 // addieren st %o4,[%o1+24] // Digit ablegen ld [%o0+20],%o3 // source-digit ld [%o1+20],%o4 // dest-digit addxcc %o4,%o3,%o4 // addieren st %o4,[%o1+20] // Digit ablegen ld [%o0+16],%o3 // source-digit ld [%o1+16],%o4 // dest-digit addxcc %o4,%o3,%o4 // addieren st %o4,[%o1+16] // Digit ablegen ld [%o0+12],%o3 // source-digit ld [%o1+12],%o4 // dest-digit addxcc %o4,%o3,%o4 // addieren st %o4,[%o1+12] // Digit ablegen ld [%o0+8],%o3 // source-digit ld [%o1+8],%o4 // dest-digit addxcc %o4,%o3,%o4 // addieren st %o4,[%o1+8] // Digit ablegen ld [%o0+4],%o3 // source-digit ld [%o1+4],%o4 // dest-digit addxcc %o4,%o3,%o4 // addieren st %o4,[%o1+4] // Digit ablegen ld [%o0],%o3 // source-digit ld [%o1],%o4 // dest-digit addxcc %o4,%o3,%o4 // addieren st %o4,[%o1] // Digit ablegen addx %g0,%g0,%o5 // neuer Carry sub %o0,32,%o0 subcc %o2,8,%o2 // noch mindestens 8 Digits abzuarbeiten? bcc 1b _ sub %o1,32,%o1 #ifdef PIC jmp %g2+8 #else retl #endif _ mov %o5,%o0 #endif // extern uintD inc_loop_down (uintD* ptr, uintC count); DECLARE_FUNCTION(inc_loop_down) C(inc_loop_down:) // Input in %o0,%o1, Output in %o0 #if STANDARD_LOOPS andcc %o1,%o1,%g0 be 2f _ sub %o0,4,%o0 1: ld [%o0],%o2 addcc %o2,1,%o2 bne 3f _ st %o2,[%o0] subcc %o1,1,%o1 bne 1b _ sub %o0,4,%o0 2: retl _ mov 1,%o0 3: retl _ mov 0,%o0 #endif #if COUNTER_LOOPS andcc %o1,%o1,%g0 be 2f _ sub %o0,4,%o0 sll %o1,2,%o1 // %o1 = 4*count sub %o0,%o1,%o0 // %o0 = &ptr[-count-1] ld [%o0+%o1],%o2 // digit holen 1: addcc %o2,1,%o2 // incrementieren bne 3f _ st %o2,[%o0+%o1] // ablegen subcc %o1,4,%o1 // Zähler erniedrigen, Pointer erniedrigen bne,a 1b __ ld [%o0+%o1],%o2 2: retl _ mov 1,%o0 3: retl _ mov 0,%o0 #endif // extern uintD sub_loop_down (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); DECLARE_FUNCTION(sub_loop_down) C(sub_loop_down:) // Input in %o0,%o1,%o2,%o3, verändert %g1, Output in %o0 #if STANDARD_LOOPS andcc %o3,%o3,%g0 be 2f _ mov %g0,%g1 // Carry := 0 sub %o0,4,%o0 1: ld [%o0],%o4 // source1-digit sub %o1,4,%o1 ld [%o1],%o5 // source2-digit subcc %g0,%g1,%g0 // carry subxcc %o4,%o5,%o4 // subtrahieren addx %g0,%g0,%g1 // neuer Carry sub %o2,4,%o2 st %o4,[%o2] // Digit ablegen subcc %o3,1,%o3 bne 1b _ sub %o0,4,%o0 2: retl _ mov %g1,%o0 #endif #if COUNTER_LOOPS andcc %o3,%o3,%g0 be 2f _ mov %g0,%g1 // Carry := 0 sub %o0,4,%o0 sub %o1,4,%o1 sll %o3,2,%o3 // %o3 = 4*count sub %o0,%o3,%o0 // %o0 = &sourceptr1[-count-1] sub %o1,%o3,%o1 // %o1 = &sourceptr2[-count-1] sub %o2,%o3,%o2 // %o2 = &destptr[-count] 1: ld [%o0+%o3],%o4 // source1-digit ld [%o1+%o3],%o5 // source2-digit subcc %g0,%g1,%g0 // carry subxcc %o4,%o5,%o4 // subtrahieren addx %g0,%g0,%g1 // neuer Carry subcc %o3,4,%o3 bne 1b _ st %o4,[%o2+%o3] // Digit ablegen 2: retl _ mov %g1,%o0 #endif #if UNROLLED_LOOPS and %o3,7,%o4 // count mod 8 sll %o4,2,%o5 sub %o0,%o5,%o0 // %o0 = &sourceptr1[-(count mod 8)] sub %o1,%o5,%o1 // %o1 = &sourceptr2[-(count mod 8)] sub %o2,%o5,%o2 // %o2 = &destptr[-(count mod 8)] sll %o4,4,%o4 #ifdef PIC mov %o7,%g2 // save return address call 0f // put address of label 0 into %o7 _ add %o7,144,%o5 0: #else set _sub_loop_down+176,%o5 #endif sub %o5,%o4,%o5 jmp %o5 // Sprung nach (label 1)+4*(1+4*8-4*(count mod 8)) _ subcc %g0,%g0,%g0 // carry löschen 1: subcc %g0,%g1,%g0 // carry ld [%o0+28],%o4 // source1-digit ld [%o1+28],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2+28] // Digit ablegen ld [%o0+24],%o4 // source1-digit ld [%o1+24],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2+24] // Digit ablegen ld [%o0+20],%o4 // source1-digit ld [%o1+20],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2+20] // Digit ablegen ld [%o0+16],%o4 // source1-digit ld [%o1+16],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2+16] // Digit ablegen ld [%o0+12],%o4 // source1-digit ld [%o1+12],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2+12] // Digit ablegen ld [%o0+8],%o4 // source1-digit ld [%o1+8],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2+8] // Digit ablegen ld [%o0+4],%o4 // source1-digit ld [%o1+4],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2+4] // Digit ablegen ld [%o0],%o4 // source1-digit ld [%o1],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2] // Digit ablegen addx %g0,%g0,%g1 // neuer Carry sub %o0,32,%o0 sub %o1,32,%o1 subcc %o3,8,%o3 // noch mindestens 8 Digits abzuarbeiten? bcc 1b _ sub %o2,32,%o2 #ifdef PIC jmp %g2+8 #else retl #endif _ mov %g1,%o0 #endif // extern uintD subx_loop_down (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count, uintD carry); DECLARE_FUNCTION(subx_loop_down) C(subx_loop_down:) // Input in %o0,%o1,%o2,%o3,%o4, verändert %g1, Output in %o0 #if STANDARD_LOOPS andcc %o3,%o3,%g0 be 2f _ mov %o4,%g1 // Carry sub %o0,4,%o0 1: ld [%o0],%o4 // source1-digit sub %o1,4,%o1 ld [%o1],%o5 // source2-digit subcc %g0,%g1,%g0 // carry subxcc %o4,%o5,%o4 // subtrahieren addx %g0,%g0,%g1 // neuer Carry sub %o2,4,%o2 st %o4,[%o2] // Digit ablegen subcc %o3,1,%o3 bne 1b _ sub %o0,4,%o0 2: retl _ mov %g1,%o0 #endif #if COUNTER_LOOPS andcc %o3,%o3,%g0 be 2f _ mov %o4,%g1 // Carry sub %o0,4,%o0 sub %o1,4,%o1 sll %o3,2,%o3 // %o3 = 4*count sub %o0,%o3,%o0 // %o0 = &sourceptr1[-count-1] sub %o1,%o3,%o1 // %o1 = &sourceptr2[-count-1] sub %o2,%o3,%o2 // %o2 = &destptr[-count] 1: ld [%o0+%o3],%o4 // source1-digit ld [%o1+%o3],%o5 // source2-digit subcc %g0,%g1,%g0 // carry subxcc %o4,%o5,%o4 // subtrahieren addx %g0,%g0,%g1 // neuer Carry subcc %o3,4,%o3 bne 1b _ st %o4,[%o2+%o3] // Digit ablegen 2: retl _ mov %g1,%o0 #endif #if UNROLLED_LOOPS and %o3,7,%o5 // count mod 8 sll %o5,2,%g1 sub %o0,%g1,%o0 // %o0 = &sourceptr1[-(count mod 8)] sub %o1,%g1,%o1 // %o1 = &sourceptr2[-(count mod 8)] sub %o2,%g1,%o2 // %o2 = &destptr[-(count mod 8)] sll %o5,4,%o5 #ifdef PIC mov %o7,%g2 // save return address call 0f // put address of label 0 into %o7 _ add %o7,144,%g1 0: #else set _subx_loop_down+176,%g1 #endif sub %g1,%o5,%g1 jmp %g1 // Sprung nach (label 1)+4*(1+4*8-4*(count mod 8)) _ subcc %g0,%o4,%g0 // carry initialisieren 1: subcc %g0,%g1,%g0 // carry ld [%o0+28],%o4 // source1-digit ld [%o1+28],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2+28] // Digit ablegen ld [%o0+24],%o4 // source1-digit ld [%o1+24],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2+24] // Digit ablegen ld [%o0+20],%o4 // source1-digit ld [%o1+20],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2+20] // Digit ablegen ld [%o0+16],%o4 // source1-digit ld [%o1+16],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2+16] // Digit ablegen ld [%o0+12],%o4 // source1-digit ld [%o1+12],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2+12] // Digit ablegen ld [%o0+8],%o4 // source1-digit ld [%o1+8],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2+8] // Digit ablegen ld [%o0+4],%o4 // source1-digit ld [%o1+4],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2+4] // Digit ablegen ld [%o0],%o4 // source1-digit ld [%o1],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2] // Digit ablegen addx %g0,%g0,%g1 // neuer Carry sub %o0,32,%o0 sub %o1,32,%o1 subcc %o3,8,%o3 // noch mindestens 8 Digits abzuarbeiten? bcc 1b _ sub %o2,32,%o2 #ifdef PIC jmp %g2+8 #else retl #endif _ mov %g1,%o0 #endif // extern uintD subfrom_loop_down (uintD* sourceptr, uintD* destptr, uintC count); DECLARE_FUNCTION(subfrom_loop_down) C(subfrom_loop_down:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ mov %g0,%o5 // Carry := 0 sub %o0,4,%o0 1: ld [%o0],%o3 // source-digit sub %o1,4,%o1 ld [%o1],%o4 // dest-digit subcc %g0,%o5,%g0 // carry subxcc %o4,%o3,%o4 // subtrahieren addx %g0,%g0,%o5 // neuer Carry st %o4,[%o1] // Digit ablegen subcc %o2,1,%o2 bne 1b _ sub %o0,4,%o0 2: retl _ mov %o5,%o0 #endif #if COUNTER_LOOPS andcc %o2,%o2,%g0 be 2f _ mov %g0,%o5 // Carry := 0 sub %o0,4,%o0 sub %o1,4,%o1 sll %o2,2,%o2 // %o2 = 4*count sub %o0,%o2,%o0 // %o0 = &sourceptr[-count-1] sub %o1,%o2,%o1 // %o1 = &destptr[-count-1] ld [%o0+%o2],%o3 // source-digit 1: ld [%o1+%o2],%o4 // dest-digit subcc %g0,%o5,%g0 // carry subxcc %o4,%o3,%o4 // subtrahieren addx %g0,%g0,%o5 // neuer Carry st %o4,[%o1+%o2] // Digit ablegen subcc %o2,4,%o2 bne,a 1b __ ld [%o0+%o2],%o3 // source-digit 2: retl _ mov %o5,%o0 #endif #if UNROLLED_LOOPS and %o2,7,%o3 // count mod 8 sll %o3,2,%o4 sub %o0,%o4,%o0 // %o0 = &sourceptr[-(count mod 8)] sub %o1,%o4,%o1 // %o1 = &destptr[-(count mod 8)] sll %o3,4,%o3 #ifdef PIC mov %o7,%g2 // save return address call 0f // put address of label 0 into %o7 _ add %o7,144,%o4 0: #else set _subfrom_loop_down+172,%o4 #endif sub %o4,%o3,%o4 jmp %o4 // Sprung nach (label 1)+4*(1+4*8-4*(count mod 8)) _ subcc %g0,%g0,%g0 // carry löschen 1: subcc %g0,%o5,%g0 // carry ld [%o0+28],%o3 // source-digit ld [%o1+28],%o4 // dest-digit subxcc %o4,%o3,%o4 // subtrahieren st %o4,[%o1+28] // Digit ablegen ld [%o0+24],%o3 // source-digit ld [%o1+24],%o4 // dest-digit subxcc %o4,%o3,%o4 // subtrahieren st %o4,[%o1+24] // Digit ablegen ld [%o0+20],%o3 // source-digit ld [%o1+20],%o4 // dest-digit subxcc %o4,%o3,%o4 // subtrahieren st %o4,[%o1+20] // Digit ablegen ld [%o0+16],%o3 // source-digit ld [%o1+16],%o4 // dest-digit subxcc %o4,%o3,%o4 // subtrahieren st %o4,[%o1+16] // Digit ablegen ld [%o0+12],%o3 // source-digit ld [%o1+12],%o4 // dest-digit subxcc %o4,%o3,%o4 // subtrahieren st %o4,[%o1+12] // Digit ablegen ld [%o0+8],%o3 // source-digit ld [%o1+8],%o4 // dest-digit subxcc %o4,%o3,%o4 // subtrahieren st %o4,[%o1+8] // Digit ablegen ld [%o0+4],%o3 // source-digit ld [%o1+4],%o4 // dest-digit subxcc %o4,%o3,%o4 // subtrahieren st %o4,[%o1+4] // Digit ablegen ld [%o0],%o3 // source-digit ld [%o1],%o4 // dest-digit subxcc %o4,%o3,%o4 // subtrahieren st %o4,[%o1] // Digit ablegen addx %g0,%g0,%o5 // neuer Carry sub %o0,32,%o0 subcc %o2,8,%o2 // noch mindestens 8 Digits abzuarbeiten? bcc 1b _ sub %o1,32,%o1 #ifdef PIC jmp %g2+8 #else retl #endif _ mov %o5,%o0 #endif // extern uintD dec_loop_down (uintD* ptr, uintC count); DECLARE_FUNCTION(dec_loop_down) C(dec_loop_down:) // Input in %o0,%o1, Output in %o0 #if STANDARD_LOOPS andcc %o1,%o1,%g0 be 2f _ sub %o0,4,%o0 1: ld [%o0],%o2 subcc %o2,1,%o2 bcc 3f _ st %o2,[%o0] subcc %o1,1,%o1 bne 1b _ sub %o0,4,%o0 2: retl _ mov -1,%o0 3: retl _ mov 0,%o0 #endif #if COUNTER_LOOPS andcc %o1,%o1,%g0 be 2f _ sub %o0,4,%o0 sll %o1,2,%o1 // %o1 = 4*count sub %o0,%o1,%o0 // %o0 = &ptr[-count-1] ld [%o0+%o1],%o2 // digit holen 1: subcc %o2,1,%o2 // decrementieren bcc 3f _ st %o2,[%o0+%o1] // ablegen subcc %o1,4,%o1 // Zähler erniedrigen, Pointer erniedrigen bne,a 1b __ ld [%o0+%o1],%o2 2: retl _ mov -1,%o0 3: retl _ mov 0,%o0 #endif // extern uintD neg_loop_down (uintD* ptr, uintC count); DECLARE_FUNCTION(neg_loop_down) C(neg_loop_down:) // Input in %o0,%o1, Output in %o0 #if STANDARD_LOOPS // erstes Digit /=0 suchen: andcc %o1,%o1,%g0 be 2f _ sub %o0,4,%o0 1: ld [%o0],%o2 subcc %g0,%o2,%o2 bne 3f _ subcc %o1,1,%o1 bne 1b _ sub %o0,4,%o0 2: retl _ mov 0,%o0 3: // erstes Digit /=0 gefunden, ab jetzt gibt's Carrys st %o2,[%o0] // 1 Digit negieren // alle anderen Digits invertieren: be 5f _ sub %o0,4,%o0 4: ld [%o0],%o2 subcc %o1,1,%o1 xor %o2,-1,%o2 st %o2,[%o0] bne 4b _ sub %o0,4,%o0 5: retl _ mov -1,%o0 #endif #if COUNTER_LOOPS // erstes Digit /=0 suchen: andcc %o1,%o1,%g0 be 2f _ sub %o0,4,%o0 sll %o1,2,%o1 // %o1 = 4*count sub %o0,%o1,%o0 // %o0 = &ptr[-count-1] ld [%o0+%o1],%o2 // digit holen 1: subcc %g0,%o2,%o2 // negieren, testen bne 3f _ subcc %o1,4,%o1 // Zähler erniedrigen, Pointer erniedrigen bne,a 1b __ ld [%o0+%o1],%o2 2: retl _ mov 0,%o0 3: // erstes Digit /=0 gefunden, ab jetzt gibt's Carrys // alle anderen Digits invertieren: add %o1,4,%o1 st %o2,[%o0+%o1] // ablegen subcc %o1,4,%o1 be 5f _ nop ld [%o0+%o1],%o2 4: xor %o2,-1,%o2 st %o2,[%o0+%o1] subcc %o1,4,%o1 bne,a 4b __ ld [%o0+%o1],%o2 5: retl _ mov -1,%o0 #endif // extern uintD shift1left_loop_down (uintD* ptr, uintC count); DECLARE_FUNCTION(shift1left_loop_down) C(shift1left_loop_down:) // Input in %o0,%o1, Output in %o0 andcc %o1,%o1,%g0 be 2f _ mov 0,%o3 // Carry := 0 sub %o0,4,%o0 1: ld [%o0],%o2 // Digit subcc %g0,%o3,%g0 // carry addxcc %o2,%o2,%o2 // shiften addx %g0,%g0,%o3 // neues Carry st %o2,[%o0] // Digit ablegen subcc %o1,1,%o1 bne 1b _ sub %o0,4,%o0 2: retl _ mov %o3,%o0 // extern uintD shiftleft_loop_down (uintD* ptr, uintC count, uintC i, uintD carry); DECLARE_FUNCTION(shiftleft_loop_down) C(shiftleft_loop_down:) // Input in %o0,%o1,%o2,%o3, verändert %g1, Output in %o0 andcc %o1,%o1,%g0 be 2f _ sub %g0,%o2,%g1 // 32-i (mod 32) sub %o0,4,%o0 1: ld [%o0],%o4 // Digit subcc %o1,1,%o1 sll %o4,%o2,%o5 // dessen niedere (32-i) Bits or %o3,%o5,%o5 // mit dem alten Carry kombinieren st %o5,[%o0] // Digit ablegen srl %o4,%g1,%o3 // dessen höchste i Bits liefern den neuen Carry bne 1b _ sub %o0,4,%o0 2: retl _ mov %o3,%o0 // extern uintD shiftleftcopy_loop_down (uintD* sourceptr, uintD* destptr, uintC count, uintC i); DECLARE_FUNCTION(shiftleftcopy_loop_down) C(shiftleftcopy_loop_down:) // Input in %o0,%o1,%o2,%o3, verändert %g1,%g2, Output in %o0 andcc %o2,%o2,%g0 be 2f _ mov 0,%o4 // Carry := 0 sub %g0,%o3,%g1 // 32-i (mod 32) sub %o0,4,%o0 1: ld [%o0],%o5 // Digit subcc %o2,1,%o2 sll %o5,%o3,%g2 // dessen niedere (32-i) Bits or %o4,%g2,%g2 // mit dem alten Carry kombinieren sub %o1,4,%o1 st %g2,[%o1] // Digit ablegen srl %o5,%g1,%o4 // dessen höchste i Bits liefern den neuen Carry bne 1b _ sub %o0,4,%o0 2: retl _ mov %o4,%o0 // extern uintD shift1right_loop_up (uintD* ptr, uintC count, uintD carry); DECLARE_FUNCTION(shift1right_loop_up) C(shift1right_loop_up:) // Input in %o0,%o1,%o2, Output in %o0 andcc %o1,%o1,%g0 be 2f _ sll %o2,31,%o2 // Carry 1: ld [%o0],%o3 // Digit subcc %o1,1,%o1 srl %o3,1,%o4 // shiften or %o2,%o4,%o4 // und mit altem Carry kombinieren st %o4,[%o0] // und ablegen sll %o3,31,%o2 // neuer Carry bne 1b _ add %o0,4,%o0 2: retl _ mov %o2,%o0 // extern uintD shiftright_loop_up (uintD* ptr, uintC count, uintC i); DECLARE_FUNCTION(shiftright_loop_up) C(shiftright_loop_up:) // Input in %o0,%o1,%o2, verändert %g1, Output in %o0 sub %g0,%o2,%g1 // 32-i (mod 32) andcc %o1,%o1,%g0 be 2f _ or %g0,%g0,%o3 // Carry := 0 1: ld [%o0],%o4 // Digit subcc %o1,1,%o1 srl %o4,%o2,%o5 // shiften or %o3,%o5,%o5 // und mit altem Carry kombinieren st %o5,[%o0] // und ablegen sll %o4,%g1,%o3 // neuer Carry bne 1b _ add %o0,4,%o0 2: retl _ mov %o3,%o0 // extern uintD shiftrightsigned_loop_up (uintD* ptr, uintC count, uintC i); DECLARE_FUNCTION(shiftrightsigned_loop_up) C(shiftrightsigned_loop_up:) // Input in %o0,%o1,%o2, verändert %g1, Output in %o0 ld [%o0],%o4 // erstes Digit sub %g0,%o2,%g1 // 32-i (mod 32) sra %o4,%o2,%o5 // shiften st %o5,[%o0] // und ablegen sll %o4,%g1,%o3 // neuer Carry subcc %o1,1,%o1 be 2f _ add %o0,4,%o0 1: ld [%o0],%o4 // Digit subcc %o1,1,%o1 srl %o4,%o2,%o5 // shiften or %o3,%o5,%o5 // und mit altem Carry kombinieren st %o5,[%o0] // und ablegen sll %o4,%g1,%o3 // neuer Carry bne 1b _ add %o0,4,%o0 2: retl _ mov %o3,%o0 // extern uintD shiftrightcopy_loop_up (uintD* sourceptr, uintD* destptr, uintC count, uintC i, uintD carry); DECLARE_FUNCTION(shiftrightcopy_loop_up) C(shiftrightcopy_loop_up:) // Input in %o0,%o1,%o2,%o3,%o4, verändert %g1,%g2, Output in %o0 sub %g0,%o3,%g1 // 32-i (mod 32) andcc %o2,%o2,%g0 be 2f _ sll %o4,%g1,%g2 // erster Carry 1: ld [%o0],%o4 // Digit add %o0,4,%o0 srl %o4,%o3,%o5 // shiften or %g2,%o5,%o5 // und mit altem Carry kombinieren st %o5,[%o1] // und ablegen sll %o4,%g1,%g2 // neuer Carry subcc %o2,1,%o2 bne 1b _ add %o1,4,%o1 2: retl _ mov %g2,%o0 // extern uintD mulusmall_loop_down (uintD digit, uintD* ptr, uintC len, uintD newdigit); DECLARE_FUNCTION(mulusmall_loop_down) C(mulusmall_loop_down:) // Input in %o0,%o1,%o2,%o3, Output in %o0 andcc %o2,%o2,%g0 be 3f _ sub %o1,4,%o1 1: // nächstes Digit [%o1] mit der 6-Bit-Zahl %o0 multiplizieren // und kleinen Carry %o3 dazu: mov %o0,%y ld [%o1],%o4 // Wartetakt! addcc %o3,%o3,%o5 mulscc %o5,%o4,%o5 mulscc %o5,%o4,%o5 mulscc %o5,%o4,%o5 mulscc %o5,%o4,%o5 mulscc %o5,%o4,%o5 mulscc %o5,%o4,%o5 mulscc %o5,%g0,%o5 // Die 26 unteren Bits von %o5 und die 6 oberen Bits von %y // ergeben das Resultat. (Die anderen Bits sind Null.) tst %o4 // Korrektur, falls %o4 negativ war bge 2f _ sra %o5,26,%o3 // 6 obere Bits von %o5 -> neuer Carry add %o3,%o0,%o3 // (falls %o4 negativ war, noch + %o0) 2: rd %y,%o4 srl %o4,26,%o4 // 6 obere Bits von %y sll %o5,6,%o5 // 26 untere Bits von %o5 or %o5,%o4,%o4 // neues Digit st %o4,[%o1] // ablegen subcc %o2,1,%o2 bne 1b _ sub %o1,4,%o1 3: retl _ mov %o3,%o0 // extern void mulu_loop_down (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); #if !MULU32_INLINE DECLARE_FUNCTION(mulu_loop_down) C(mulu_loop_down:) // Input in %i0,%i1,%i2,%i3 save %sp,-96,%sp mov 0,%l0 // Carry 1: sub %i1,4,%i1 ld [%i1],%o1 // nächstes Digit call _mulu32_ // mit digit multiplizieren _ mov %i0,%o0 addcc %l0,%o0,%o0 // und bisherigen Carry addieren addx %g0,%g1,%l0 // High-Digit gibt neuen Carry sub %i2,4,%i2 subcc %i3,1,%i3 bne 1b _ st %o0,[%i2] // Low-Digit ablegen st %l0,[%i2-4] // letzten Carry ablegen ret _ restore #else DECLARE_FUNCTION(mulu_loop_down) C(mulu_loop_down:) // Input in %o0,%o1,%o2,%o3, verändert %g1 mov 0,%o4 // Carry 1: ld [%o1-4],%g1 // nächstes Digit // mit digit multiplizieren: %o0 * %g1 -> %o5|%g1 #ifdef sparcv8 sub %o1,4,%o1 umul %g1,%o0,%g1 rd %y,%o5 #else mov %g1,%y sub %o1,4,%o1 // Wartetakt! andcc %g0,%g0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%g0,%o5 tst %o0 bl,a 2f __ add %o5,%g1,%o5 2: rd %y,%g1 #endif addcc %o4,%g1,%g1 // und bisherigen Carry addieren addx %g0,%o5,%o4 // High-Digit gibt neuen Carry sub %o2,4,%o2 subcc %o3,1,%o3 bne 1b _ st %g1,[%o2] // Low-Digit ablegen retl _ st %o4,[%o2-4] // letzten Carry ablegen #endif // extern uintD muluadd_loop_down (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); DECLARE_FUNCTION(muluadd_loop_down) C(muluadd_loop_down:) // Input in %i0,%i1,%i2,%i3, Output in %i0 #if !MULU32_INLINE save %sp,-96,%sp mov 0,%l0 // Carry 1: sub %i1,4,%i1 ld [%i1],%o1 // nächstes source-Digit call _mulu32_ // mit digit multiplizieren _ mov %i0,%o0 sub %i2,4,%i2 ld [%i2],%o1 // nächstes dest-digit addcc %l0,%o0,%o0 // und bisherigen Carry addieren addx %g0,%g1,%l0 // High-Digit gibt neuen Carry addcc %o1,%o0,%o0 // addieren addx %g0,%l0,%l0 subcc %i3,1,%i3 bne 1b _ st %o0,[%i2] // Low-Digit ablegen mov %l0,%i0 // letzter Carry ret _ restore #else save %sp,-96,%sp mov 0,%l0 // Carry #ifndef sparcv8 sra %i0,31,%l1 // 0 falls %i0>=0, -1 falls %i0<0 #endif 1: ld [%i1-4],%o1 // nächstes source-Digit sub %i1,4,%i1 // mit digit multiplizieren: %i0 * %o1 -> %o2|%o0 #ifdef sparcv8 umul %i0,%o1,%o0 rd %y,%o2 #else mov %o1,%y and %o1,%l1,%o3 // Wartetakt! andcc %g0,%g0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%g0,%o2 add %o2,%o3,%o2 // %o3 = (0 falls %i0>=0, %o1 falls %i0<0) rd %y,%o0 #endif sub %i2,4,%i2 ld [%i2],%o1 // nächstes dest-digit addcc %l0,%o0,%o0 // und bisherigen Carry addieren addx %g0,%o2,%l0 // High-Digit gibt neuen Carry addcc %o1,%o0,%o0 // addieren addx %g0,%l0,%l0 subcc %i3,1,%i3 bne 1b _ st %o0,[%i2] // Low-Digit ablegen mov %l0,%i0 // letzter Carry ret _ restore #endif // extern uintD mulusub_loop_down (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); DECLARE_FUNCTION(mulusub_loop_down) C(mulusub_loop_down:) // Input in %i0,%i1,%i2,%i3, Output in %i0 #if !MULU32_INLINE save %sp,-96,%sp mov 0,%l0 // Carry 1: sub %i1,4,%i1 ld [%i1],%o1 // nächstes source-Digit call _mulu32_ // mit digit multiplizieren _ mov %i0,%o0 sub %i2,4,%i2 ld [%i2],%o1 // nächstes dest-digit addcc %l0,%o0,%o0 // und bisherigen Carry addieren addx %g0,%g1,%l0 // High-Digit gibt neuen Carry subcc %o1,%o0,%o1 // davon das Low-Digit subtrahieren addx %g0,%l0,%l0 subcc %i3,1,%i3 bne 1b _ st %o1,[%i2] // dest-Digit ablegen mov %l0,%i0 // letzter Carry ret _ restore #else save %sp,-96,%sp mov 0,%l0 // Carry #ifndef sparcv8 sra %i0,31,%l1 // 0 falls %i0>=0, -1 falls %i0<0 #endif 1: ld [%i1-4],%o1 // nächstes source-Digit sub %i1,4,%i1 // mit digit multiplizieren: %i0 * %o1 -> %o2|%o0 #ifdef sparcv8 umul %i0,%o1,%o0 rd %y,%o2 #else mov %o1,%y and %o1,%l1,%o3 // Wartetakt! andcc %g0,%g0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%g0,%o2 add %o2,%o3,%o2 // %o3 = (0 falls %i0>=0, %o1 falls %i0<0) rd %y,%o0 #endif sub %i2,4,%i2 ld [%i2],%o1 // nächstes dest-digit addcc %l0,%o0,%o0 // und bisherigen Carry addieren addx %g0,%o2,%l0 // High-Digit gibt neuen Carry subcc %o1,%o0,%o1 // davon das Low-Digit subtrahieren addx %g0,%l0,%l0 subcc %i3,1,%i3 bne 1b _ st %o1,[%i2] // dest-Digit ablegen mov %l0,%i0 // letzter Carry ret _ restore #endif // extern uintD divu_loop_up (uintD digit, uintD* ptr, uintC len); DECLARE_FUNCTION(divu_loop_up) C(divu_loop_up:) // Input in %i0,%i1,%i2, Output in %i0 save %sp,-96,%sp andcc %i2,%i2,%g0 be 2f _ mov 0,%g1 // Rest 1: mov %g1,%o0 // Rest als High-Digit ld [%i1],%o1 // nächstes Digit als Low-Digit call C(divu_6432_3232_) // zusammen durch digit dividieren _ mov %i0,%o2 st %o0,[%i1] // Quotient ablegen, Rest in %g1 subcc %i2,1,%i2 bne 1b _ add %i1,4,%i1 2: mov %g1,%i0 // Rest als Ergebnis ret _ restore // extern uintD divucopy_loop_up (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); DECLARE_FUNCTION(divucopy_loop_up) C(divucopy_loop_up:) // Input in %i0,%i1,%i2,%i3, Output in %i0 save %sp,-96,%sp andcc %i3,%i3,%g0 be 2f _ mov 0,%g1 // Rest 1: mov %g1,%o0 // Rest als High-Digit ld [%i1],%o1 // nächstes Digit als Low-Digit call C(divu_6432_3232_) // zusammen durch digit dividieren _ mov %i0,%o2 st %o0,[%i2] // Quotient ablegen, Rest in %g1 add %i1,4,%i1 subcc %i3,1,%i3 bne 1b _ add %i2,4,%i2 2: mov %g1,%i0 // Rest als Ergebnis ret _ restore #endif #if !CL_DS_BIG_ENDIAN_P // extern void or_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(or_loop_down) C(or_loop_down:) // Input in %o0,%o1,%o2 #if SLOW_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o0,4,%o0 1: ld [%o0],%o3 sub %o1,4,%o1 ld [%o1],%o4 subcc %o2,1,%o2 or %o3,%o4,%o3 st %o3,[%o0] bne 1b _ sub %o0,4,%o0 2: retl _ nop #endif #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr sub %o0,4,%o0 1: ld [%o0],%o3 // *xptr ld [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 or %o3,%o4,%o3 // verknüpfen st %o3,[%o0] // =: *xptr bne 1b _ sub %o0,4,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS andcc %o2,%o2,%g0 be 2f _ sll %o2,2,%o2 // %o2 = 4*count sub %o0,%o2,%o0 // %o0 = &xptr[-count] sub %o1,%o2,%o1 // %o1 = &yptr[-count] 1: subcc %o2,4,%o2 // Zähler erniedrigen, Pointer erniedrigen ld [%o1+%o2],%o3 // nächstes Digit holen ld [%o0+%o2],%o4 // noch ein Digit holen or %o4,%o3,%o3 // beide verknüpfen bne 1b _ st %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void xor_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(xor_loop_down) C(xor_loop_down:) // Input in %o0,%o1,%o2 #if SLOW_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o0,4,%o0 1: ld [%o0],%o3 sub %o1,4,%o1 ld [%o1],%o4 subcc %o2,1,%o2 xor %o3,%o4,%o3 st %o3,[%o0] bne 1b _ sub %o0,4,%o0 2: retl _ nop #endif #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr sub %o0,4,%o0 1: ld [%o0],%o3 // *xptr ld [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 xor %o3,%o4,%o3 // verknüpfen st %o3,[%o0] // =: *xptr bne 1b _ sub %o0,4,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS andcc %o2,%o2,%g0 be 2f _ sll %o2,2,%o2 // %o2 = 4*count sub %o0,%o2,%o0 // %o0 = &xptr[-count] sub %o1,%o2,%o1 // %o1 = &yptr[-count] 1: subcc %o2,4,%o2 // Zähler erniedrigen, Pointer erniedrigen ld [%o1+%o2],%o3 // nächstes Digit holen ld [%o0+%o2],%o4 // noch ein Digit holen xor %o4,%o3,%o3 // beide verknüpfen bne 1b _ st %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void and_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(and_loop_down) C(and_loop_down:) // Input in %o0,%o1,%o2 #if SLOW_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o0,4,%o0 1: ld [%o0],%o3 sub %o1,4,%o1 ld [%o1],%o4 subcc %o2,1,%o2 and %o3,%o4,%o3 st %o3,[%o0] bne 1b _ sub %o0,4,%o0 2: retl _ nop #endif #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr sub %o0,4,%o0 1: ld [%o0],%o3 // *xptr ld [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 and %o3,%o4,%o3 // verknüpfen st %o3,[%o0] // =: *xptr bne 1b _ sub %o0,4,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS andcc %o2,%o2,%g0 be 2f _ sll %o2,2,%o2 // %o2 = 4*count sub %o0,%o2,%o0 // %o0 = &xptr[-count] sub %o1,%o2,%o1 // %o1 = &yptr[-count] 1: subcc %o2,4,%o2 // Zähler erniedrigen, Pointer erniedrigen ld [%o1+%o2],%o3 // nächstes Digit holen ld [%o0+%o2],%o4 // noch ein Digit holen and %o4,%o3,%o3 // beide verknüpfen bne 1b _ st %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void eqv_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(eqv_loop_down) C(eqv_loop_down:) // Input in %o0,%o1,%o2 #if SLOW_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o0,4,%o0 1: ld [%o0],%o3 sub %o1,4,%o1 ld [%o1],%o4 subcc %o2,1,%o2 xnor %o3,%o4,%o3 st %o3,[%o0] bne 1b _ sub %o0,4,%o0 2: retl _ nop #endif #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr sub %o0,4,%o0 1: ld [%o0],%o3 // *xptr ld [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 xnor %o3,%o4,%o3 // verknüpfen st %o3,[%o0] // =: *xptr bne 1b _ sub %o0,4,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS andcc %o2,%o2,%g0 be 2f _ sll %o2,2,%o2 // %o2 = 4*count sub %o0,%o2,%o0 // %o0 = &xptr[-count] sub %o1,%o2,%o1 // %o1 = &yptr[-count] 1: subcc %o2,4,%o2 // Zähler erniedrigen, Pointer erniedrigen ld [%o1+%o2],%o3 // nächstes Digit holen ld [%o0+%o2],%o4 // noch ein Digit holen xnor %o4,%o3,%o3 // beide verknüpfen bne 1b _ st %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void nand_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(nand_loop_down) C(nand_loop_down:) // Input in %o0,%o1,%o2 #if SLOW_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o0,4,%o0 1: ld [%o0],%o3 sub %o1,4,%o1 ld [%o1],%o4 subcc %o2,1,%o2 and %o3,%o4,%o3 xor %o3,-1,%o3 st %o3,[%o0] bne 1b _ sub %o0,4,%o0 2: retl _ nop #endif #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr sub %o0,4,%o0 1: ld [%o0],%o3 // *xptr ld [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 and %o3,%o4,%o3 // verknüpfen xor %o3,-1,%o3 st %o3,[%o0] // =: *xptr bne 1b _ sub %o0,4,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS andcc %o2,%o2,%g0 be 2f _ sll %o2,2,%o2 // %o2 = 4*count sub %o0,%o2,%o0 // %o0 = &xptr[-count] sub %o1,%o2,%o1 // %o1 = &yptr[-count] 1: subcc %o2,4,%o2 // Zähler erniedrigen, Pointer erniedrigen ld [%o1+%o2],%o3 // nächstes Digit holen ld [%o0+%o2],%o4 // noch ein Digit holen and %o4,%o3,%o3 // beide verknüpfen xor %o3,-1,%o3 bne 1b _ st %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void nor_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(nor_loop_down) C(nor_loop_down:) // Input in %o0,%o1,%o2 #if SLOW_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o0,4,%o0 1: ld [%o0],%o3 sub %o1,4,%o1 ld [%o1],%o4 subcc %o2,1,%o2 or %o3,%o4,%o3 xor %o3,-1,%o3 st %o3,[%o0] bne 1b _ sub %o0,4,%o0 2: retl _ nop #endif #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr sub %o0,4,%o0 1: ld [%o0],%o3 // *xptr ld [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 or %o3,%o4,%o3 // verknüpfen xor %o3,-1,%o3 st %o3,[%o0] // =: *xptr bne 1b _ sub %o0,4,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS andcc %o2,%o2,%g0 be 2f _ sll %o2,2,%o2 // %o2 = 4*count sub %o0,%o2,%o0 // %o0 = &xptr[-count] sub %o1,%o2,%o1 // %o1 = &yptr[-count] 1: subcc %o2,4,%o2 // Zähler erniedrigen, Pointer erniedrigen ld [%o1+%o2],%o3 // nächstes Digit holen ld [%o0+%o2],%o4 // noch ein Digit holen or %o4,%o3,%o3 // beide verknüpfen xor %o3,-1,%o3 bne 1b _ st %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void andc2_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(andc2_loop_down) C(andc2_loop_down:) // Input in %o0,%o1,%o2 #if SLOW_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o0,4,%o0 1: ld [%o0],%o3 sub %o1,4,%o1 ld [%o1],%o4 subcc %o2,1,%o2 andn %o3,%o4,%o3 st %o3,[%o0] bne 1b _ sub %o0,4,%o0 2: retl _ nop #endif #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr sub %o0,4,%o0 1: ld [%o0],%o3 // *xptr ld [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 andn %o3,%o4,%o3 // verknüpfen st %o3,[%o0] // =: *xptr bne 1b _ sub %o0,4,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS andcc %o2,%o2,%g0 be 2f _ sll %o2,2,%o2 // %o2 = 4*count sub %o0,%o2,%o0 // %o0 = &xptr[-count] sub %o1,%o2,%o1 // %o1 = &yptr[-count] 1: subcc %o2,4,%o2 // Zähler erniedrigen, Pointer erniedrigen ld [%o1+%o2],%o3 // nächstes Digit holen ld [%o0+%o2],%o4 // noch ein Digit holen andn %o4,%o3,%o3 // beide verknüpfen bne 1b _ st %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void orc2_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(orc2_loop_down) C(orc2_loop_down:) // Input in %o0,%o1,%o2 #if SLOW_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o0,4,%o0 1: ld [%o0],%o3 sub %o1,4,%o1 ld [%o1],%o4 subcc %o2,1,%o2 orn %o3,%o4,%o3 st %o3,[%o0] bne 1b _ sub %o0,4,%o0 2: retl _ nop #endif #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr sub %o0,4,%o0 1: ld [%o0],%o3 // *xptr ld [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 orn %o3,%o4,%o3 // verknüpfen st %o3,[%o0] // =: *xptr bne 1b _ sub %o0,4,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS andcc %o2,%o2,%g0 be 2f _ sll %o2,2,%o2 // %o2 = 4*count sub %o0,%o2,%o0 // %o0 = &xptr[-count] sub %o1,%o2,%o1 // %o1 = &yptr[-count] 1: subcc %o2,4,%o2 // Zähler erniedrigen, Pointer erniedrigen ld [%o1+%o2],%o3 // nächstes Digit holen ld [%o0+%o2],%o4 // noch ein Digit holen orn %o4,%o3,%o3 // beide verknüpfen bne 1b _ st %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void not_loop_down (uintD* xptr, uintC count); DECLARE_FUNCTION(not_loop_down) C(not_loop_down:) // Input in %o0,%o1 #if STANDARD_LOOPS andcc %o1,%o1,%g0 be 2f _ sub %o0,4,%o0 1: ld [%o0],%o2 subcc %o1,1,%o1 xor %o2,-1,%o2 st %o2,[%o0] bne 1b _ sub %o0,4,%o0 2: retl _ nop #endif #if COUNTER_LOOPS andcc %o1,%o1,%g0 be 2f _ sll %o1,2,%o1 // %o1 = 4*count sub %o0,%o1,%o0 // %o0 = &destptr[-count] 1: subcc %o1,4,%o1 // Zähler erniedrigen, Pointer erniedrigen ld [%o0+%o1],%o2 // nächstes Digit holen xor %o2,-1,%o2 bne 1b _ st %o2,[%o0+%o1] // Digit ablegen 2: retl _ nop #endif // extern boolean and_test_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(and_test_loop_down) C(and_test_loop_down:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 4f _ sub %o0,4,%o0 1: ld [%o0],%o3 sub %o1,4,%o1 ld [%o1],%o4 subcc %o2,1,%o2 be 3f _ andcc %o3,%o4,%g0 be 1b _ sub %o0,4,%o0 2: retl _ mov 1,%o0 3: bne 2b _ nop 4: retl _ mov 0,%o0 #endif #if COUNTER_LOOPS sll %o2,2,%o2 // %o2 = 4*count sub %o0,%o2,%o0 // %o0 = &xptr[-count] sub %o1,%o2,%o1 // %o1 = &yptr[-count] subcc %o2,4,%o2 bcs 2f _ nop ld [%o0+%o2],%o3 // nächstes Digit holen 1: ld [%o1+%o2],%o4 // noch ein Digit holen andcc %o3,%o4,%g0 // beide verknüpfen bne 3f _ subcc %o2,4,%o2 // Zähler erniedrigen, Pointer erniedrigen bcc,a 1b __ ld [%o0+%o2],%o3 // nächstes Digit holen 2: retl _ mov 0,%o0 3: retl _ mov 1,%o0 #endif // extern cl_signean compare_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(compare_loop_down) C(compare_loop_down:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ nop 1: ld [%o0-4],%o3 ld [%o1-4],%o4 subcc %o3,%o4,%g0 bne 3f _ sub %o0,4,%o0 subcc %o2,1,%o2 bne 1b _ sub %o1,4,%o1 2: retl _ mov 0,%o0 3: blu 4f _ nop retl _ mov 1,%o0 4: retl _ mov -1,%o0 #endif #if COUNTER_LOOPS sll %o2,2,%o2 // %o2 = 4*count sub %o0,%o2,%o0 // %o0 = &xptr[-count] sub %o1,%o2,%o1 // %o1 = &yptr[-count] subcc %o2,4,%o2 bcs 5f _ nop ld [%o0+%o2],%o3 // nächstes Digit holen 1: ld [%o1+%o2],%o4 // noch ein Digit holen subcc %o2,4,%o2 // Zähler erniedrigen, Pointer erniedrigen bcs 4f _ subcc %o3,%o4,%g0 // vergleichen be,a 1b __ ld [%o0+%o2],%o3 // nächstes Digit holen 2: blu 3f _ nop retl _ mov 1,%o0 3: retl _ mov -1,%o0 4: bne 2b _ nop 5: retl _ mov 0,%o0 #endif // extern uintD add_loop_up (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); DECLARE_FUNCTION(add_loop_up) C(add_loop_up:) // Input in %o0,%o1,%o2,%o3, verändert %g1, Output in %o0 #if STANDARD_LOOPS andcc %o3,%o3,%g0 be 2f _ subcc %g0,%g0,%g0 // Carry := 0 1: ld [%o0],%o4 // source1-digit add %o0,4,%o0 ld [%o1],%o5 // source2-digit add %o1,4,%o1 addxcc %o4,%o5,%o4 // addieren addx %g0,%g0,%g1 // neuer Carry st %o4,[%o2] // Digit ablegen add %o2,4,%o2 subcc %o3,1,%o3 bne 1b _ subcc %g0,%g1,%g0 // carry 2: retl _ addx %g0,%g0,%o0 #endif #if COUNTER_LOOPS subcc %g0,%o3,%o3 // %o3 = -count be 2f _ mov %g0,%g1 // Carry := 0 sll %o3,2,%o3 // %o3 = -4*count sub %o2,4,%o2 sub %o0,%o3,%o0 // %o0 = &sourceptr1[count] sub %o1,%o3,%o1 // %o1 = &sourceptr2[count] sub %o2,%o3,%o2 // %o2 = &destptr[count-1] 1: ld [%o0+%o3],%o4 // source1-digit ld [%o1+%o3],%o5 // source2-digit subcc %g0,%g1,%g0 // carry addxcc %o4,%o5,%o4 // addieren addx %g0,%g0,%g1 // neuer Carry addcc %o3,4,%o3 // Zähler erniedrigen, Pointer erhöhen bne 1b _ st %o4,[%o2+%o3] // Digit ablegen 2: retl _ mov %g1,%o0 #endif #if UNROLLED_LOOPS and %o3,7,%o4 // count mod 8 sll %o4,2,%o5 add %o0,%o5,%o0 // %o0 = &sourceptr1[count mod 8] add %o1,%o5,%o1 // %o1 = &sourceptr2[count mod 8] add %o2,%o5,%o2 // %o2 = &destptr[count mod 8] sll %o4,4,%o4 #ifdef PIC mov %o7,%g2 // save return address call 0f // put address of label 0 into %o7 _ add %o7,144,%o5 0: #else set _add_loop_up+176,%o5 #endif sub %o5,%o4,%o5 jmp %o5 // Sprung nach (label 1)+4*(1+4*8-4*(count mod 8)) _ subcc %g0,%g0,%g0 // carry löschen 1: subcc %g0,%g1,%g0 // carry ld [%o0-32],%o4 // source1-digit ld [%o1-32],%o5 // source2-digit addxcc %o5,%o4,%o5 // addieren st %o5,[%o2-32] // Digit ablegen ld [%o0-28],%o4 // source1-digit ld [%o1-28],%o5 // source2-digit addxcc %o5,%o4,%o5 // addieren st %o5,[%o2-28] // Digit ablegen ld [%o0-24],%o4 // source1-digit ld [%o1-24],%o5 // source2-digit addxcc %o5,%o4,%o5 // addieren st %o5,[%o2-24] // Digit ablegen ld [%o0-20],%o4 // source1-digit ld [%o1-20],%o5 // source2-digit addxcc %o5,%o4,%o5 // addieren st %o5,[%o2-20] // Digit ablegen ld [%o0-16],%o4 // source1-digit ld [%o1-16],%o5 // source2-digit addxcc %o5,%o4,%o5 // addieren st %o5,[%o2-16] // Digit ablegen ld [%o0-12],%o4 // source1-digit ld [%o1-12],%o5 // source2-digit addxcc %o5,%o4,%o5 // addieren st %o5,[%o2-12] // Digit ablegen ld [%o0-8],%o4 // source1-digit ld [%o1-8],%o5 // source2-digit addxcc %o5,%o4,%o5 // addieren st %o5,[%o2-8] // Digit ablegen ld [%o0-4],%o4 // source1-digit ld [%o1-4],%o5 // source2-digit addxcc %o5,%o4,%o5 // addieren st %o5,[%o2-4] // Digit ablegen addx %g0,%g0,%g1 // neuer Carry add %o0,32,%o0 add %o1,32,%o1 subcc %o3,8,%o3 // noch mindestens 8 Digits abzuarbeiten? bcc 1b _ add %o2,32,%o2 #ifdef PIC jmp %g2+8 #else retl #endif _ mov %g1,%o0 #endif // extern uintD addto_loop_up (uintD* sourceptr, uintD* destptr, uintC count); DECLARE_FUNCTION(addto_loop_up) C(addto_loop_up:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ mov %g0,%o5 // Carry := 0 1: ld [%o0],%o3 // source-digit add %o0,4,%o0 ld [%o1],%o4 // dest-digit subcc %g0,%o5,%g0 // carry addxcc %o4,%o3,%o4 // addieren addx %g0,%g0,%o5 // neuer Carry st %o4,[%o1] // Digit ablegen subcc %o2,1,%o2 bne 1b _ add %o1,4,%o1 2: retl _ mov %o5,%o0 #endif #if COUNTER_LOOPS subcc %g0,%o2,%o2 // %o2 = -count be 2f _ mov %g0,%o5 // Carry := 0 sll %o2,2,%o2 // %o2 = -4*count sub %o0,%o2,%o0 // %o0 = &sourceptr[count] sub %o1,%o2,%o1 // %o1 = &destptr[count] ld [%o0+%o2],%o3 // source-digit 1: ld [%o1+%o2],%o4 // dest-digit subcc %g0,%o5,%g0 // carry addxcc %o4,%o3,%o4 // addieren addx %g0,%g0,%o5 // neuer Carry st %o4,[%o1+%o2] // Digit ablegen addcc %o2,4,%o2 // Zähler erniedrigen, Pointer erhöhen bne,a 1b __ ld [%o0+%o2],%o3 // source-digit 2: retl _ mov %o5,%o0 #endif #if UNROLLED_LOOPS and %o2,7,%o3 // count mod 8 sll %o3,2,%o4 add %o0,%o4,%o0 // %o0 = &sourceptr[count mod 8] add %o1,%o4,%o1 // %o1 = &destptr[count mod 8] sll %o3,4,%o3 #ifdef PIC mov %o7,%g2 // save return address call 0f // put address of label 0 into %o7 _ add %o7,144,%o4 0: #else set _addto_loop_up+172,%o4 #endif sub %o4,%o3,%o4 jmp %o4 // Sprung nach (label 1)+4*(1+4*8-4*(count mod 8)) _ subcc %g0,%g0,%g0 // carry löschen 1: subcc %g0,%o5,%g0 // carry ld [%o0-32],%o3 // source-digit ld [%o1-32],%o4 // dest-digit addxcc %o4,%o3,%o4 // addieren st %o4,[%o1-32] // Digit ablegen ld [%o0-28],%o3 // source-digit ld [%o1-28],%o4 // dest-digit addxcc %o4,%o3,%o4 // addieren st %o4,[%o1-28] // Digit ablegen ld [%o0-24],%o3 // source-digit ld [%o1-24],%o4 // dest-digit addxcc %o4,%o3,%o4 // addieren st %o4,[%o1-24] // Digit ablegen ld [%o0-20],%o3 // source-digit ld [%o1-20],%o4 // dest-digit addxcc %o4,%o3,%o4 // addieren st %o4,[%o1-20] // Digit ablegen ld [%o0-16],%o3 // source-digit ld [%o1-16],%o4 // dest-digit addxcc %o4,%o3,%o4 // addieren st %o4,[%o1-16] // Digit ablegen ld [%o0-12],%o3 // source-digit ld [%o1-12],%o4 // dest-digit addxcc %o4,%o3,%o4 // addieren st %o4,[%o1-12] // Digit ablegen ld [%o0-8],%o3 // source-digit ld [%o1-8],%o4 // dest-digit addxcc %o4,%o3,%o4 // addieren st %o4,[%o1-8] // Digit ablegen ld [%o0-4],%o3 // source-digit ld [%o1-4],%o4 // dest-digit addxcc %o4,%o3,%o4 // addieren st %o4,[%o1-4] // Digit ablegen addx %g0,%g0,%o5 // neuer Carry add %o0,32,%o0 subcc %o2,8,%o2 // noch mindestens 8 Digits abzuarbeiten? bcc 1b _ add %o1,32,%o1 #ifdef PIC jmp %g2+8 #else retl #endif _ mov %o5,%o0 #endif // extern uintD inc_loop_up (uintD* ptr, uintC count); DECLARE_FUNCTION(inc_loop_up) C(inc_loop_up:) // Input in %o0,%o1, Output in %o0 #if STANDARD_LOOPS andcc %o1,%o1,%g0 be 2f _ nop ld [%o0],%o2 1: add %o0,4,%o0 addcc %o2,1,%o2 bne 3f _ st %o2,[%o0-4] subcc %o1,1,%o1 bne,a 1b __ ld [%o0],%o2 2: retl _ mov 1,%o0 3: retl _ mov 0,%o0 #endif #if COUNTER_LOOPS subcc %g0,%o1,%o1 // %o1 = -count be 2f _ sll %o1,2,%o1 // %o1 = -4*count sub %o0,%o1,%o0 // %o0 = &ptr[count] ld [%o0+%o1],%o2 // digit holen 1: addcc %o2,1,%o2 // incrementieren bne 3f _ st %o2,[%o0+%o1] // ablegen addcc %o1,4,%o1 // Zähler erniedrigen, Pointer erhöhen bne,a 1b __ ld [%o0+%o1],%o2 2: retl _ mov 1,%o0 3: retl _ mov 0,%o0 #endif // extern uintD sub_loop_up (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); DECLARE_FUNCTION(sub_loop_up) C(sub_loop_up:) // Input in %o0,%o1,%o2,%o3, verändert %g1, Output in %o0 #if STANDARD_LOOPS andcc %o3,%o3,%g0 be 2f _ subcc %g0,%g0,%g0 // Carry := 0 1: ld [%o0],%o4 // source1-digit add %o0,4,%o0 ld [%o1],%o5 // source2-digit add %o1,4,%o1 subxcc %o4,%o5,%o4 // subtrahieren addx %g0,%g0,%g1 // neuer Carry st %o4,[%o2] // Digit ablegen add %o2,4,%o2 subcc %o3,1,%o3 bne 1b _ subcc %g0,%g1,%g0 // carry 2: retl _ addx %g0,%g0,%o0 #endif #if COUNTER_LOOPS subcc %g0,%o3,%o3 // %o3 = -count be 2f _ mov %g0,%g1 // Carry := 0 sll %o3,2,%o3 // %o3 = -4*count sub %o2,4,%o2 sub %o0,%o3,%o0 // %o0 = &sourceptr1[count] sub %o1,%o3,%o1 // %o1 = &sourceptr2[count] sub %o2,%o3,%o2 // %o2 = &destptr[count-1] 1: ld [%o0+%o3],%o4 // source1-digit ld [%o1+%o3],%o5 // source2-digit subcc %g0,%g1,%g0 // carry subxcc %o4,%o5,%o4 // subtrahieren addx %g0,%g0,%g1 // neuer Carry addcc %o3,4,%o3 bne 1b _ st %o4,[%o2+%o3] // Digit ablegen 2: retl _ mov %g1,%o0 #endif #if UNROLLED_LOOPS and %o3,7,%o4 // count mod 8 sll %o4,2,%o5 add %o0,%o5,%o0 // %o0 = &sourceptr1[count mod 8] add %o1,%o5,%o1 // %o1 = &sourceptr2[count mod 8] add %o2,%o5,%o2 // %o2 = &destptr[count mod 8] sll %o4,4,%o4 #ifdef PIC mov %o7,%g2 // save return address call 0f // put address of label 0 into %o7 _ add %o7,144,%o5 0: #else set _sub_loop_up+176,%o5 #endif sub %o5,%o4,%o5 jmp %o5 // Sprung nach (label 1)+4*(1+4*8-4*(count mod 8)) _ subcc %g0,%g0,%g0 // carry löschen 1: subcc %g0,%g1,%g0 // carry ld [%o0-32],%o4 // source1-digit ld [%o1-32],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2-32] // Digit ablegen ld [%o0-28],%o4 // source1-digit ld [%o1-28],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2-28] // Digit ablegen ld [%o0-24],%o4 // source1-digit ld [%o1-24],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2-24] // Digit ablegen ld [%o0-20],%o4 // source1-digit ld [%o1-20],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2-20] // Digit ablegen ld [%o0-16],%o4 // source1-digit ld [%o1-16],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2-16] // Digit ablegen ld [%o0-12],%o4 // source1-digit ld [%o1-12],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2-12] // Digit ablegen ld [%o0-8],%o4 // source1-digit ld [%o1-8],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2-8] // Digit ablegen ld [%o0-4],%o4 // source1-digit ld [%o1-4],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2-4] // Digit ablegen addx %g0,%g0,%g1 // neuer Carry add %o0,32,%o0 add %o1,32,%o1 subcc %o3,8,%o3 // noch mindestens 8 Digits abzuarbeiten? bcc 1b _ add %o2,32,%o2 #ifdef PIC jmp %g2+8 #else retl #endif _ mov %g1,%o0 #endif // extern uintD subx_loop_up (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count, uintD carry); DECLARE_FUNCTION(subx_loop_up) C(subx_loop_up:) // Input in %o0,%o1,%o2,%o3,%o4, verändert %g1, Output in %o0 #if STANDARD_LOOPS andcc %o3,%o3,%g0 be 2f _ subcc %g0,%o4,%g0 // Carry 1: ld [%o0],%o4 // source1-digit add %o0,4,%o0 ld [%o1],%o5 // source2-digit add %o1,4,%o1 subxcc %o4,%o5,%o4 // subtrahieren addx %g0,%g0,%g1 // neuer Carry st %o4,[%o2] // Digit ablegen add %o2,4,%o2 subcc %o3,1,%o3 bne 1b _ subcc %g0,%g1,%g0 // carry 2: retl _ addx %g0,%g0,%o0 #endif #if COUNTER_LOOPS subcc %g0,%o3,%o3 // %o3 = -count be 2f _ mov %o4,%g1 // Carry sll %o3,2,%o3 // %o3 = -4*count sub %o2,4,%o2 sub %o0,%o3,%o0 // %o0 = &sourceptr1[count] sub %o1,%o3,%o1 // %o1 = &sourceptr2[count] sub %o2,%o3,%o2 // %o2 = &destptr[count-1] 1: ld [%o0+%o3],%o4 // source1-digit ld [%o1+%o3],%o5 // source2-digit subcc %g0,%g1,%g0 // carry subxcc %o4,%o5,%o4 // subtrahieren addx %g0,%g0,%g1 // neuer Carry addcc %o3,4,%o3 bne 1b _ st %o4,[%o2+%o3] // Digit ablegen 2: retl _ mov %g1,%o0 #endif #if UNROLLED_LOOPS and %o3,7,%o5 // count mod 8 sll %o5,2,%g1 add %o0,%g1,%o0 // %o0 = &sourceptr1[count mod 8] add %o1,%g1,%o1 // %o1 = &sourceptr2[count mod 8] add %o2,%g1,%o2 // %o2 = &destptr[count mod 8] sll %o5,4,%o5 #ifdef PIC mov %o7,%g2 // save return address call 0f // put address of label 0 into %o7 _ add %o7,144,%g1 0: #else set _subx_loop_up+176,%g1 #endif sub %g1,%o5,%g1 jmp %g1 // Sprung nach _subx_loop_up+4*(12+4*8-4*(count mod 8)) _ subcc %g0,%o4,%g0 // carry initialisieren 1: subcc %g0,%g1,%g0 // carry ld [%o0-32],%o4 // source1-digit ld [%o1-32],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2-32] // Digit ablegen ld [%o0-28],%o4 // source1-digit ld [%o1-28],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2-28] // Digit ablegen ld [%o0-24],%o4 // source1-digit ld [%o1-24],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2-24] // Digit ablegen ld [%o0-20],%o4 // source1-digit ld [%o1-20],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2-20] // Digit ablegen ld [%o0-16],%o4 // source1-digit ld [%o1-16],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2-16] // Digit ablegen ld [%o0-12],%o4 // source1-digit ld [%o1-12],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2-12] // Digit ablegen ld [%o0-8],%o4 // source1-digit ld [%o1-8],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2-8] // Digit ablegen ld [%o0-4],%o4 // source1-digit ld [%o1-4],%o5 // source2-digit subxcc %o4,%o5,%o4 // subtrahieren st %o4,[%o2-4] // Digit ablegen addx %g0,%g0,%g1 // neuer Carry add %o0,32,%o0 add %o1,32,%o1 subcc %o3,8,%o3 // noch mindestens 8 Digits abzuarbeiten? bcc 1b _ add %o2,32,%o2 #ifdef PIC jmp %g2+8 #else retl #endif _ mov %g1,%o0 #endif // extern uintD subfrom_loop_up (uintD* sourceptr, uintD* destptr, uintC count); DECLARE_FUNCTION(subfrom_loop_up) C(subfrom_loop_up:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS andcc %o2,%o2,%g0 be 2f _ mov %g0,%o5 // Carry := 0 1: ld [%o0],%o3 // source-digit add %o0,4,%o0 ld [%o1],%o4 // dest-digit subcc %g0,%o5,%g0 // carry subxcc %o4,%o3,%o4 // subtrahieren addx %g0,%g0,%o5 // neuer Carry st %o4,[%o1] // Digit ablegen subcc %o2,1,%o2 bne 1b _ add %o1,4,%o1 2: retl _ mov %o5,%o0 #endif #if COUNTER_LOOPS subcc %g0,%o2,%o2 // %o2 = -count be 2f _ mov %g0,%o5 // Carry := 0 sll %o2,2,%o2 // %o2 = -4*count sub %o0,%o2,%o0 // %o0 = &sourceptr[count] sub %o1,%o2,%o1 // %o1 = &destptr[count] ld [%o0+%o2],%o3 // source-digit 1: ld [%o1+%o2],%o4 // dest-digit subcc %g0,%o5,%g0 // carry subxcc %o4,%o3,%o4 // subtrahieren addx %g0,%g0,%o5 // neuer Carry st %o4,[%o1+%o2] // Digit ablegen addcc %o2,4,%o2 bne,a 1b __ ld [%o0+%o2],%o3 // source-digit 2: retl _ mov %o5,%o0 #endif #if UNROLLED_LOOPS and %o2,7,%o3 // count mod 8 sll %o3,2,%o4 add %o0,%o4,%o0 // %o0 = &sourceptr[count mod 8] add %o1,%o4,%o1 // %o1 = &destptr[count mod 8] sll %o3,4,%o3 #ifdef PIC mov %o7,%g2 // save return address call 0f // put address of label 0 into %o7 _ add %o7,144,%o4 0: #else set _subfrom_loop_up+172,%o4 #endif sub %o4,%o3,%o4 jmp %o4 // Sprung nach _subfrom_loop_up+4*(11+4*8-4*(count mod 8)) _ subcc %g0,%g0,%g0 // carry löschen 1: subcc %g0,%o5,%g0 // carry ld [%o0-32],%o3 // source-digit ld [%o1-32],%o4 // dest-digit subxcc %o4,%o3,%o4 // subtrahieren st %o4,[%o1-32] // Digit ablegen ld [%o0-28],%o3 // source-digit ld [%o1-28],%o4 // dest-digit subxcc %o4,%o3,%o4 // subtrahieren st %o4,[%o1-28] // Digit ablegen ld [%o0-24],%o3 // source-digit ld [%o1-24],%o4 // dest-digit subxcc %o4,%o3,%o4 // subtrahieren st %o4,[%o1-24] // Digit ablegen ld [%o0-20],%o3 // source-digit ld [%o1-20],%o4 // dest-digit subxcc %o4,%o3,%o4 // subtrahieren st %o4,[%o1-20] // Digit ablegen ld [%o0-16],%o3 // source-digit ld [%o1-16],%o4 // dest-digit subxcc %o4,%o3,%o4 // subtrahieren st %o4,[%o1-16] // Digit ablegen ld [%o0-12],%o3 // source-digit ld [%o1-12],%o4 // dest-digit subxcc %o4,%o3,%o4 // subtrahieren st %o4,[%o1-12] // Digit ablegen ld [%o0-8],%o3 // source-digit ld [%o1-8],%o4 // dest-digit subxcc %o4,%o3,%o4 // subtrahieren st %o4,[%o1-8] // Digit ablegen ld [%o0-4],%o3 // source-digit ld [%o1-4],%o4 // dest-digit subxcc %o4,%o3,%o4 // subtrahieren st %o4,[%o1-4] // Digit ablegen addx %g0,%g0,%o5 // neuer Carry add %o0,32,%o0 subcc %o2,8,%o2 // noch mindestens 8 Digits abzuarbeiten? bcc 1b _ add %o1,32,%o1 #ifdef PIC jmp %g2+8 #else retl #endif _ mov %o5,%o0 #endif // extern uintD dec_loop_up (uintD* ptr, uintC count); DECLARE_FUNCTION(dec_loop_up) C(dec_loop_up:) // Input in %o0,%o1, Output in %o0 #if STANDARD_LOOPS andcc %o1,%o1,%g0 be 2f _ nop ld [%o0],%o2 1: add %o0,4,%o0 subcc %o2,1,%o2 bcc 3f _ st %o2,[%o0-4] subcc %o1,1,%o1 bne,a 1b __ ld [%o0],%o2 2: retl _ mov -1,%o0 3: retl _ mov 0,%o0 #endif #if COUNTER_LOOPS subcc %g0,%o1,%o1 // %o1 = -count be 2f _ sll %o1,2,%o1 // %o1 = -4*count sub %o0,%o1,%o0 // %o0 = &ptr[count] ld [%o0+%o1],%o2 // digit holen 1: subcc %o2,1,%o2 // decrementieren bcc 3f _ st %o2,[%o0+%o1] // ablegen addcc %o1,4,%o1 // Zähler erniedrigen, Pointer erhöhen bne,a 1b __ ld [%o0+%o1],%o2 2: retl _ mov -1,%o0 3: retl _ mov 0,%o0 #endif // extern uintD neg_loop_up (uintD* ptr, uintC count); DECLARE_FUNCTION(neg_loop_up) C(neg_loop_up:) // Input in %o0,%o1, Output in %o0 #if STANDARD_LOOPS // erstes Digit /=0 suchen: andcc %o1,%o1,%g0 be 2f _ add %o0,4,%o0 1: ld [%o0-4],%o2 subcc %g0,%o2,%o2 bne 3f _ subcc %o1,1,%o1 bne 1b _ add %o0,4,%o0 2: retl _ mov 0,%o0 3: // erstes Digit /=0 gefunden, ab jetzt gibt's Carrys // 1 Digit negieren, alle anderen Digits invertieren: be 5f _ st %o2,[%o0-4] 4: ld [%o0],%o2 subcc %o1,1,%o1 xor %o2,-1,%o2 st %o2,[%o0] bne 4b _ add %o0,4,%o0 5: retl _ mov -1,%o0 #endif #if COUNTER_LOOPS // erstes Digit /=0 suchen: subcc %g0,%o1,%o1 // %o1 = -count be 2f _ sll %o1,2,%o1 // %o1 = -4*count sub %o0,%o1,%o0 // %o0 = &ptr[count] ld [%o0+%o1],%o2 // digit holen 1: subcc %g0,%o2,%o2 // negieren, testen bne 3f _ addcc %o1,4,%o1 // Zähler erniedrigen, Pointer erhöhen bne,a 1b __ ld [%o0+%o1],%o2 2: retl _ mov 0,%o0 3: // erstes Digit /=0 gefunden, ab jetzt gibt's Carrys // alle anderen Digits invertieren: sub %o1,4,%o1 st %o2,[%o0+%o1] // ablegen addcc %o1,4,%o1 be 5f _ nop ld [%o0+%o1],%o2 4: xor %o2,-1,%o2 st %o2,[%o0+%o1] addcc %o1,4,%o1 bne,a 4b __ ld [%o0+%o1],%o2 5: retl _ mov -1,%o0 #endif // extern uintD shift1left_loop_up (uintD* ptr, uintC count); DECLARE_FUNCTION(shift1left_loop_up) C(shift1left_loop_up:) // Input in %o0,%o1, Output in %o0 andcc %o1,%o1,%g0 be 2f _ mov 0,%o3 // Carry := 0 1: ld [%o0],%o2 // Digit subcc %g0,%o3,%g0 // carry addxcc %o2,%o2,%o2 // shiften addx %g0,%g0,%o3 // neues Carry st %o2,[%o0] // Digit ablegen subcc %o1,1,%o1 bne 1b _ add %o0,4,%o0 2: retl _ mov %o3,%o0 // extern uintD shiftleft_loop_up (uintD* ptr, uintC count, uintC i, uintD carry); DECLARE_FUNCTION(shiftleft_loop_up) C(shiftleft_loop_up:) // Input in %o0,%o1,%o2,%o3, verändert %g1, Output in %o0 andcc %o1,%o1,%g0 be 2f _ sub %g0,%o2,%g1 // 32-i (mod 32) 1: ld [%o0],%o4 // Digit subcc %o1,1,%o1 sll %o4,%o2,%o5 // dessen niedere (32-i) Bits or %o3,%o5,%o5 // mit dem alten Carry kombinieren st %o5,[%o0] // Digit ablegen srl %o4,%g1,%o3 // dessen höchste i Bits liefern den neuen Carry bne 1b _ add %o0,4,%o0 2: retl _ mov %o3,%o0 #endif // extern uintD shiftleftcopy_loop_up (uintD* sourceptr, uintD* destptr, uintC count, uintC i); DECLARE_FUNCTION(shiftleftcopy_loop_up) C(shiftleftcopy_loop_up:) // Input in %o0,%o1,%o2,%o3, verändert %g1,%g2, Output in %o0 andcc %o2,%o2,%g0 be 2f _ mov 0,%o4 // Carry := 0 sub %g0,%o3,%g1 // 32-i (mod 32) 1: ld [%o0],%o5 // Digit subcc %o2,1,%o2 sll %o5,%o3,%g2 // dessen niedere (32-i) Bits or %o4,%g2,%g2 // mit dem alten Carry kombinieren st %g2,[%o1] // Digit ablegen add %o1,4,%o1 srl %o5,%g1,%o4 // dessen höchste i Bits liefern den neuen Carry bne 1b _ add %o0,4,%o0 2: retl _ mov %o4,%o0 #if !CL_DS_BIG_ENDIAN_P // extern uintD shift1right_loop_down (uintD* ptr, uintC count, uintD carry); DECLARE_FUNCTION(shift1right_loop_down) C(shift1right_loop_down:) // Input in %o0,%o1,%o2, Output in %o0 andcc %o1,%o1,%g0 be 2f _ sll %o2,31,%o2 // Carry sub %o0,4,%o0 1: ld [%o0],%o3 // Digit subcc %o1,1,%o1 srl %o3,1,%o4 // shiften or %o2,%o4,%o4 // und mit altem Carry kombinieren st %o4,[%o0] // und ablegen sll %o3,31,%o2 // neuer Carry bne 1b _ sub %o0,4,%o0 2: retl _ mov %o2,%o0 // extern uintD shiftright_loop_down (uintD* ptr, uintC count, uintC i); DECLARE_FUNCTION(shiftright_loop_down) C(shiftright_loop_down:) // Input in %o0,%o1,%o2, verändert %g1, Output in %o0 sub %g0,%o2,%g1 // 32-i (mod 32) andcc %o1,%o1,%g0 be 2f _ or %g0,%g0,%o3 // Carry := 0 sub %o0,4,%o0 1: ld [%o0],%o4 // Digit subcc %o1,1,%o1 srl %o4,%o2,%o5 // shiften or %o3,%o5,%o5 // und mit altem Carry kombinieren st %o5,[%o0] // und ablegen sll %o4,%g1,%o3 // neuer Carry bne 1b _ sub %o0,4,%o0 2: retl _ mov %o3,%o0 // extern uintD shiftrightsigned_loop_down (uintD* ptr, uintC count, uintC i); DECLARE_FUNCTION(shiftrightsigned_loop_down) C(shiftrightsigned_loop_down:) // Input in %o0,%o1,%o2, verändert %g1, Output in %o0 ld [%o0-4],%o4 // erstes Digit sub %g0,%o2,%g1 // 32-i (mod 32) sra %o4,%o2,%o5 // shiften st %o5,[%o0-4] // und ablegen sll %o4,%g1,%o3 // neuer Carry subcc %o1,1,%o1 be 2f _ sub %o0,8,%o0 1: ld [%o0],%o4 // Digit subcc %o1,1,%o1 srl %o4,%o2,%o5 // shiften or %o3,%o5,%o5 // und mit altem Carry kombinieren st %o5,[%o0] // und ablegen sll %o4,%g1,%o3 // neuer Carry bne 1b _ sub %o0,4,%o0 2: retl _ mov %o3,%o0 // extern uintD shiftrightcopy_loop_down (uintD* sourceptr, uintD* destptr, uintC count, uintC i, uintD carry); DECLARE_FUNCTION(shiftrightcopy_loop_down) C(shiftrightcopy_loop_down:) // Input in %o0,%o1,%o2,%o3,%o4, verändert %g1,%g2, Output in %o0 sub %g0,%o3,%g1 // 32-i (mod 32) andcc %o2,%o2,%g0 be 2f _ sll %o4,%g1,%g2 // erster Carry sub %o0,4,%o0 1: ld [%o0],%o4 // Digit sub %o1,4,%o1 srl %o4,%o3,%o5 // shiften or %g2,%o5,%o5 // und mit altem Carry kombinieren st %o5,[%o1] // und ablegen sll %o4,%g1,%g2 // neuer Carry subcc %o2,1,%o2 bne 1b _ sub %o0,4,%o0 2: retl _ mov %g2,%o0 // extern uintD mulusmall_loop_up (uintD digit, uintD* ptr, uintC len, uintD newdigit); DECLARE_FUNCTION(mulusmall_loop_up) C(mulusmall_loop_up:) // Input in %o0,%o1,%o2,%o3, Output in %o0 andcc %o2,%o2,%g0 be 3f _ nop 1: // nächstes Digit [%o1] mit der 6-Bit-Zahl %o0 multiplizieren // und kleinen Carry %o3 dazu: mov %o0,%y ld [%o1],%o4 // Wartetakt! addcc %o3,%o3,%o5 mulscc %o5,%o4,%o5 mulscc %o5,%o4,%o5 mulscc %o5,%o4,%o5 mulscc %o5,%o4,%o5 mulscc %o5,%o4,%o5 mulscc %o5,%o4,%o5 mulscc %o5,%g0,%o5 // Die 26 unteren Bits von %o5 und die 6 oberen Bits von %y // ergeben das Resultat. (Die anderen Bits sind Null.) tst %o4 // Korrektur, falls %o4 negativ war bge 2f _ sra %o5,26,%o3 // 6 obere Bits von %o5 -> neuer Carry add %o3,%o0,%o3 // (falls %o4 negativ war, noch + %o0) 2: rd %y,%o4 srl %o4,26,%o4 // 6 obere Bits von %y sll %o5,6,%o5 // 26 untere Bits von %o5 or %o5,%o4,%o4 // neues Digit st %o4,[%o1] // ablegen subcc %o2,1,%o2 bne 1b _ add %o1,4,%o1 3: retl _ mov %o3,%o0 // extern void mulu_loop_up (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); #if !MULU32_INLINE DECLARE_FUNCTION(mulu_loop_up) C(mulu_loop_up:) // Input in %i0,%i1,%i2,%i3 save %sp,-96,%sp mov 0,%l0 // Carry 1: ld [%i1],%o1 // nächstes Digit add %i1,4,%i1 call _mulu32_ // mit digit multiplizieren _ mov %i0,%o0 addcc %l0,%o0,%o0 // und bisherigen Carry addieren addx %g0,%g1,%l0 // High-Digit gibt neuen Carry st %o0,[%i2] // Low-Digit ablegen subcc %i3,1,%i3 bne 1b _ add %i2,4,%i2 st %l0,[%i2] // letzten Carry ablegen ret _ restore #else DECLARE_FUNCTION(mulu_loop_up) C(mulu_loop_up:) // Input in %o0,%o1,%o2,%o3, verändert %g1 mov 0,%o4 // Carry 1: ld [%o1],%g1 // nächstes Digit // mit digit multiplizieren: %o0 * %g1 -> %o5|%g1 #ifdef sparcv8 add %o1,4,%o1 umul %g1,%o0,%g1 rd %y,%o5 #else mov %g1,%y add %o1,4,%o1 // Wartetakt! andcc %g0,%g0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%o0,%o5 mulscc %o5,%g0,%o5 tst %o0 bl,a 2f __ add %o5,%g1,%o5 2: rd %y,%g1 #endif addcc %o4,%g1,%g1 // und bisherigen Carry addieren addx %g0,%o5,%o4 // High-Digit gibt neuen Carry st %g1,[%o2] // Low-Digit ablegen subcc %o3,1,%o3 bne 1b _ add %o2,4,%o2 retl _ st %o4,[%o2] // letzten Carry ablegen #endif // extern uintD muluadd_loop_up (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); DECLARE_FUNCTION(muluadd_loop_up) C(muluadd_loop_up:) // Input in %i0,%i1,%i2,%i3, Output in %i0 #if !MULU32_INLINE save %sp,-96,%sp mov 0,%l0 // Carry 1: ld [%i1],%o1 // nächstes source-Digit add %i1,4,%i1 call _mulu32_ // mit digit multiplizieren _ mov %i0,%o0 ld [%i2],%o1 // nächstes dest-digit addcc %l0,%o0,%o0 // und bisherigen Carry addieren addx %g0,%g1,%l0 // High-Digit gibt neuen Carry addcc %o1,%o0,%o0 // addieren addx %g0,%l0,%l0 st %o0,[%i2] // Low-Digit ablegen subcc %i3,1,%i3 bne 1b _ add %i2,4,%i2 mov %l0,%i0 // letzter Carry ret _ restore #else save %sp,-96,%sp mov 0,%l0 // Carry #ifndef sparcv8 sra %i0,31,%l1 // 0 falls %i0>=0, -1 falls %i0<0 #endif 1: ld [%i1],%o1 // nächstes source-Digit add %i1,4,%i1 // mit digit multiplizieren: %i0 * %o1 -> %o2|%o0 #ifdef sparcv8 umul %i0,%o1,%o0 rd %y,%o2 #else mov %o1,%y and %o1,%l1,%o3 // Wartetakt! andcc %g0,%g0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%g0,%o2 add %o2,%o3,%o2 // %o3 = (0 falls %i0>=0, %o1 falls %i0<0) rd %y,%o0 #endif ld [%i2],%o1 // nächstes dest-digit addcc %l0,%o0,%o0 // und bisherigen Carry addieren addx %g0,%o2,%l0 // High-Digit gibt neuen Carry addcc %o1,%o0,%o0 // addieren addx %g0,%l0,%l0 st %o0,[%i2] // Low-Digit ablegen subcc %i3,1,%i3 bne 1b _ add %i2,4,%i2 mov %l0,%i0 // letzter Carry ret _ restore #endif // extern uintD mulusub_loop_up (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); DECLARE_FUNCTION(mulusub_loop_up) C(mulusub_loop_up:) // Input in %i0,%i1,%i2,%i3, Output in %i0 #if !MULU32_INLINE save %sp,-96,%sp mov 0,%l0 // Carry 1: ld [%i1],%o1 // nächstes source-Digit add %i1,4,%i1 call _mulu32_ // mit digit multiplizieren _ mov %i0,%o0 ld [%i2],%o1 // nächstes dest-digit addcc %l0,%o0,%o0 // und bisherigen Carry addieren addx %g0,%g1,%l0 // High-Digit gibt neuen Carry subcc %o1,%o0,%o1 // davon das Low-Digit subtrahieren addx %g0,%l0,%l0 st %o1,[%i2] // dest-Digit ablegen subcc %i3,1,%i3 bne 1b _ add %i2,4,%i2 mov %l0,%i0 // letzter Carry ret _ restore #else save %sp,-96,%sp mov 0,%l0 // Carry #ifndef sparcv8 sra %i0,31,%l1 // 0 falls %i0>=0, -1 falls %i0<0 #endif 1: ld [%i1],%o1 // nächstes source-Digit add %i1,4,%i1 // mit digit multiplizieren: %i0 * %o1 -> %o2|%o0 #ifdef sparcv8 umul %i0,%o1,%o0 rd %y,%o2 #else mov %o1,%y and %o1,%l1,%o3 // Wartetakt! andcc %g0,%g0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%i0,%o2 mulscc %o2,%g0,%o2 add %o2,%o3,%o2 // %o3 = (0 falls %i0>=0, %o1 falls %i0<0) rd %y,%o0 #endif ld [%i2],%o1 // nächstes dest-digit addcc %l0,%o0,%o0 // und bisherigen Carry addieren addx %g0,%o2,%l0 // High-Digit gibt neuen Carry subcc %o1,%o0,%o1 // davon das Low-Digit subtrahieren addx %g0,%l0,%l0 st %o1,[%i2] // dest-Digit ablegen subcc %i3,1,%i3 bne 1b _ add %i2,4,%i2 mov %l0,%i0 // letzter Carry ret _ restore #endif // extern uintD divu_loop_down (uintD digit, uintD* ptr, uintC len); DECLARE_FUNCTION(divu_loop_down) C(divu_loop_down:) // Input in %i0,%i1,%i2, Output in %i0 save %sp,-96,%sp andcc %i2,%i2,%g0 be 2f _ mov 0,%g1 // Rest 1: mov %g1,%o0 // Rest als High-Digit ld [%i1-4],%o1 // nächstes Digit als Low-Digit call C(divu_6432_3232_) // zusammen durch digit dividieren _ mov %i0,%o2 st %o0,[%i1-4] // Quotient ablegen, Rest in %g1 subcc %i2,1,%i2 bne 1b _ sub %i1,4,%i1 2: mov %g1,%i0 // Rest als Ergebnis ret _ restore // extern uintD divucopy_loop_down (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); DECLARE_FUNCTION(divucopy_loop_down) C(divucopy_loop_down:) // Input in %i0,%i1,%i2,%i3, Output in %i0 save %sp,-96,%sp andcc %i3,%i3,%g0 be 2f _ mov 0,%g1 // Rest 1: mov %g1,%o0 // Rest als High-Digit ld [%i1-4],%o1 // nächstes Digit als Low-Digit call C(divu_6432_3232_) // zusammen durch digit dividieren _ mov %i0,%o2 sub %i2,4,%i2 st %o0,[%i2] // Quotient ablegen, Rest in %g1 subcc %i3,1,%i3 bne 1b _ sub %i1,4,%i1 2: mov %g1,%i0 // Rest als Ergebnis ret _ restore #endif // extern void shiftxor_loop_up (uintD* xptr, const uintD* yptr, uintC count, uintC i); DECLARE_FUNCTION(shiftxor_loop_up) C(shiftxor_loop_up:) // Input in %o0,%o1,%o2,%o3, verändert %g1,%g2 andcc %o2,%o2,%g0 be 2f _ sub %g0,%o3,%g1 // 32-i (mod 32) sub %o1,%o0,%o1 ld [%o0],%o4 // *xptr holen 1: ld [%o0+%o1],%o5 // *yptr holen subcc %o2,1,%o2 sll %o5,%o3,%g2 // dessen niedere (32-i) Bits xor %o4,%g2,%o4 // mit dem modifizierten *xptr kombinieren st %o4,[%o0] // und ablegen add %o0,4,%o0 srl %o5,%g1,%g2 // höchste i Bits von *yptr ld [%o0],%o4 // schon mal mit dem nächsten *xptr bne 1b _ xor %o4,%g2,%o4 // verknüpfen st %o4,[%o0] // und ablegen 2: retl _ nop cln-1.3.3/src/base/digitseq/cl_asm_.cc0000644000000000000000000000145311201634736014404 0ustar // Includes the CPU specific cl_asm_*.cc file. #include "cl_config.h" #include "base/digitseq/cl_DS_endian.h" #ifndef NO_ASM #if defined(__m68k__) && (intCsize==16) #include "base/digitseq/cl_asm_m68k_.cc" #endif #if defined(__sparc__) && !defined(__sparc64__) #include "base/digitseq/cl_asm_sparc_.cc" #endif #if defined(__sparc64__) #include "base/digitseq/cl_asm_sparc64_.cc" #endif #if defined(__i386__) #include "base/digitseq/cl_asm_i386_.cc" #endif #if defined(__mips__) && !defined(__mipsel__) #include "base/digitseq/cl_asm_mips_.cc" #endif #if defined(__mipsel__) #include "base/digitseq/cl_asm_mipsel_.cc" #endif #if defined(__hppa__) #include "base/digitseq/cl_asm_hppa_.cc" #endif #if defined(__arm__) #include "base/digitseq/cl_asm_arm_.cc" #endif #endif // ndef NO_ASM cln-1.3.3/src/base/digitseq/cl_asm_sparc64_.cc0000644000000000000000000026710111215252132015741 0ustar // Externe Routinen zu ARILEV1.D // Prozessor: SPARC 64-bit // Compiler: GNU-C oder ... // Parameter-Übergabe: in Registern %o0-%o5. // Parameter-Übergabe: in Registern %o0-%o5. // Argumente vom Typ uint8, uint16, uint32 sind bereits vom Aufrufer zu // uint64 umgewandelt worden (zero-extend, "srl reg,0,reg"). // Argumente vom Typ sint8, sint16, sint32 sind bereits vom Aufrufer zu // sint64 umgewandelt worden (sign-extend, "sra reg,0,reg"). // Ergebnisse vom Typ uint8, uint16, uint32 müssen vor Rückgabe zu uint64 // umgewandelt werden (zero-extend, "srl reg,0,reg"). // Ergebnisse vom Typ sint8, sint16, sint32 müssen vor Rückgabe zu sint64 // umgewandelt werden (sign-extend, "sra reg,0,reg"). // Einstellungen: intCsize=32, intDsize=32. #ifdef ASM_UNDERSCORE #define C(entrypoint) _##entrypoint #else #define C(entrypoint) entrypoint #endif // When this file is compiled into a shared library, ELF linkers need to // know which symbols are functions. #if defined(__NetBSD__) || defined(__OpenBSD__) #define DECLARE_FUNCTION(name) .type C(name),@function #elif defined(__svr4__) || defined(__ELF__) #define DECLARE_FUNCTION(name) .type C(name),#function #else #define DECLARE_FUNCTION(name) #endif // Indikatoren für Anweisungen (Instruktionen) in Delay-Slots // (diese werden VOR der vorigen Instruktion ausgeführt): #define _ // Instruktion, die stets ausgeführt wird #define __ // Instruktion, die nur im Sprung-Fall ausgeführt wird // Abkürzungen für Anweisungen: #define ret jmp %i7+8 // return from subroutine #define retl jmp %o7+8 // return from leaf subroutine (no save/restore) .seg "text" .register %g2,#scratch .global C(mulu16_),C(mulu32_),C(mulu32_unchecked),C(mulu64_) .global C(divu_6432_3232_),C(divu_3216_1616_) .global C(copy_loop_up),C(copy_loop_down),C(fill_loop_up),C(fill_loop_down) .global C(clear_loop_up),C(clear_loop_down) .global C(test_loop_up),C(test_loop_down) .global C(xor_loop_up),C(compare_loop_up),C(shiftleftcopy_loop_up),C(shiftxor_loop_up) #if CL_DS_BIG_ENDIAN_P .global C(or_loop_up),C(and_loop_up),C(eqv_loop_up) .global C(nand_loop_up),C(nor_loop_up),C(andc2_loop_up),C(orc2_loop_up) .global C(not_loop_up) .global C(and_test_loop_up) .global C(add_loop_down),C(addto_loop_down),C(inc_loop_down) .global C(sub_loop_down),C(subx_loop_down),C(subfrom_loop_down),C(dec_loop_down) .global C(neg_loop_down) .global C(shift1left_loop_down),C(shiftleft_loop_down),C(shiftleftcopy_loop_down) .global C(shift1right_loop_up),C(shiftright_loop_up),C(shiftrightsigned_loop_up),C(shiftrightcopy_loop_up) .global C(mulusmall_loop_down),C(mulu_loop_down),C(muluadd_loop_down),C(mulusub_loop_down) #else .global C(or_loop_down),C(xor_loop_down),C(and_loop_down),C(eqv_loop_down) .global C(nand_loop_down),C(nor_loop_down),C(andc2_loop_down),C(orc2_loop_down) .global C(not_loop_down) .global C(and_test_loop_down),C(compare_loop_down) .global C(add_loop_up),C(addto_loop_up),C(inc_loop_up) .global C(sub_loop_up),C(subx_loop_up),C(subfrom_loop_up),C(dec_loop_up) .global C(neg_loop_up) .global C(shift1left_loop_up),C(shiftleft_loop_up) .global C(shift1right_loop_down),C(shiftright_loop_down),C(shiftrightsigned_loop_down),C(shiftrightcopy_loop_down) .global C(mulusmall_loop_up),C(mulu_loop_up),C(muluadd_loop_up),C(mulusub_loop_up) #endif #define LOOP_TYPE 1 // 1: Standard-Schleifen // 2: Schleifen ohne Pointer, nur mit Zähler #define STANDARD_LOOPS (LOOP_TYPE==1) #define COUNTER_LOOPS (LOOP_TYPE==2) // extern uint32 mulu16_ (uint16 arg1, uint16 arg2); // ergebnis := arg1*arg2. DECLARE_FUNCTION(mulu16_) C(mulu16_:) // Input in %o0,%o1, Output in %o0 umul %o0,%o1,%o2 retl _ srl %o2,0,%o0 // extern struct { uint32 lo; uint32 hi; } mulu32_ (uint32 arg1, uint32 arg2); // 2^32*hi+lo := arg1*arg2. DECLARE_FUNCTION(mulu32_) C(mulu32_:) // Input in %o0,%o1, Output in %o0,%g1 umul %o0,%o1,%o2 rd %y,%g1 retl _ srl %o2,0,%o0 // extern uint32 mulu32_unchecked (uint32 x, uint32 y); // ergebnis := arg1*arg2 < 2^32. DECLARE_FUNCTION(mulu32_unchecked) C(mulu32_unchecked:) // Input in %o0,%o1, Output in %o0 umul %o0,%o1,%o2 retl _ srl %o2,0,%o0 // extern struct { uint64 lo; uint64 hi; } mulu64_ (uint64 arg1, uint64 arg2); // 2^64*hi+lo := arg1*arg2. DECLARE_FUNCTION(mulu64_) C(mulu64_:) // Input in %o0,%o1, Output in %o0,%g2 srlx %o0,32,%o2 // %o2 = high32(arg1) srl %o0,0,%o0 // %o0 = low32(arg1) srlx %o1,32,%o3 // %o3 = high32(arg2) srl %o1,0,%o1 // %o1 = low32(arg2) mulx %o2,%o3,%g2 // high part mulx %o2,%o1,%o2 // first mid part mulx %o0,%o3,%o3 // second mid part addcc %o2,%o3,%o2 // sum of mid parts mov 0,%o3 movcs %xcc,1,%o3 // carry from sum of mid parts sllx %o3,32,%o3 add %g2,%o3,%g2 // add to high part srlx %o2,32,%o3 add %g2,%o3,%g2 // add high32(midparts) to high part mulx %o0,%o1,%o0 // low part sllx %o2,32,%o2 addcc %o0,%o2,%o0 // add low32(midparts)*2^32 to low part add %g2,1,%o3 retl _ movcs %xcc,%o3,%g2 // add carry to high part // extern struct { uint32 q; uint32 r; } divu_6432_3232_ (uint32 xhi, uint32 xlo, uint32 y); // x = 2^32*xhi+xlo = q*y+r schreiben. Sei bekannt, daß 0 <= x < 2^32*y . DECLARE_FUNCTION(divu_6432_3232_) C(divu_6432_3232_:) // Input in %o0,%o1,%o2, Output in %o0,%g1 wr %o0,%g0,%y udiv %o1,%o2,%o0 // x durch y dividieren, %o0 := q umul %o0,%o2,%g1 // %g1 := (q*y) mod 2^32 sub %o1,%g1,%g1 // %g1 := (xlo-q*y) mod 2^32 = r retl _ srl %o0,0,%o0 // extern struct { uint16 q; uint16 r; } divu_3216_1616_ (uint32 x, uint16 y); // x = q*y+r schreiben. Sei bekannt, daß 0 <= x < 2^16*y . DECLARE_FUNCTION(divu_3216_1616_) C(divu_3216_1616_:) // Input in %o0,%o1, Output in %o0 (Rest und Quotient). wr %g0,%g0,%y udiv %o0,%o1,%o2 // dividieren, Quotient nach %o2 #if 0 // Who says that %y has some meaningful contents after `udiv' ?? rd %y,%g1 // Rest aus %y #else umul %o2,%o1,%g1 // %g1 := (q*y) mod 2^32 sub %o0,%g1,%g1 // %g1 := (x-q*y) mod 2^32 = r #endif sll %g1,16,%g1 // in die oberen 16 Bit schieben or %o2,%g1,%o0 retl _ srl %o0,0,%o0 #if !defined(__GNUC__) .global C(_get_g1) // extern uint32 _get_g1 (void); DECLARE_FUNCTION(_get_g1) C(_get_g1:) retl _ srl %g1,0,%o0 #endif #if !defined(__GNUC__) .global C(_get_g2) // extern uint64 _get_g2 (void); DECLARE_FUNCTION(_get_g2) C(_get_g2:) retl _ mov %g2,%o0 #endif // extern uintD* copy_loop_up (uintD* sourceptr, uintD* destptr, uintC count); DECLARE_FUNCTION(copy_loop_up) C(copy_loop_up:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ nop 1: ldx [%o0],%o3 add %o0,8,%o0 stx %o3,[%o1] subcc %o2,1,%o2 bne,pt %xcc,1b _ add %o1,8,%o1 2: retl _ mov %o1,%o0 #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o1,8,%o1 sub %g0,%o2,%o2 // %o2 = -count sllx %o2,3,%o2 // %o2 = -8*count sub %o0,%o2,%o0 // %o0 = &sourceptr[count] sub %o1,%o2,%o1 // %o1 = &destptr[count-1] 1: ldx [%o0+%o2],%o3 // nächstes Digit holen addcc %o2,8,%o2 // Zähler "erniedrigen", Pointer erhöhen bne,pt %xcc,1b _ stx %o3,[%o1+%o2] // Digit ablegen 2: retl _ add %o1,8,%o0 #endif // extern uintD* copy_loop_down (uintD* sourceptr, uintD* destptr, uintC count); DECLARE_FUNCTION(copy_loop_down) C(copy_loop_down:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o0,8,%o0 1: ldx [%o0],%o3 sub %o1,8,%o1 stx %o3,[%o1] subcc %o2,1,%o2 bne,pt %xcc,1b _ sub %o0,8,%o0 2: retl _ mov %o1,%o0 #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o0,8,%o0 sllx %o2,3,%o2 // %o2 = 8*count sub %o0,%o2,%o0 // %o0 = &sourceptr[-count-1] sub %o1,%o2,%o1 // %o1 = &destptr[-count] 1: ldx [%o0+%o2],%o3 // nächstes Digit holen subcc %o2,8,%o2 // Zähler erniedrigen, Pointer erniedrigen bne,pt %xcc,1b _ stx %o3,[%o1+%o2] // Digit ablegen 2: retl _ mov %o1,%o0 #endif // extern uintD* fill_loop_up (uintD* destptr, uintC count, uintD filler); DECLARE_FUNCTION(fill_loop_up) C(fill_loop_up:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ nop 1: stx %o2,[%o0] subcc %o1,1,%o1 bne,pt %xcc,1b _ add %o0,8,%o0 2: retl _ nop #endif #if COUNTER_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sub %o0,8,%o0 sub %g0,%o1,%o1 // %o1 = -count sllx %o1,3,%o1 // %o1 = -8*count sub %o0,%o1,%o0 // %o0 = &destptr[count-1] 1: addcc %o1,8,%o1 // Zähler "erniedrigen", Pointer erhöhen bne,pt %xcc,1b _ stx %o2,[%o0+%o1] // Digit ablegen 2: retl _ add %o0,8,%o0 #endif // extern uintD* fill_loop_down (uintD* destptr, uintC count, uintD filler); DECLARE_FUNCTION(fill_loop_down) C(fill_loop_down:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sub %o0,8,%o0 1: stx %o2,[%o0] subcc %o1,1,%o1 bne,pt %xcc,1b _ sub %o0,8,%o0 2: retl _ add %o0,8,%o0 #endif #if COUNTER_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sllx %o1,3,%o1 // %o1 = 8*count sub %o0,%o1,%o0 // %o0 = &destptr[-count] 1: subcc %o1,8,%o1 // Zähler erniedrigen, Pointer erniedrigen bne,pt %xcc,1b _ stx %o2,[%o0+%o1] // Digit ablegen 2: retl _ nop #endif // extern uintD* clear_loop_up (uintD* destptr, uintC count); DECLARE_FUNCTION(clear_loop_up) C(clear_loop_up:) // Input in %o0,%o1, Output in %o0 #if STANDARD_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ nop 1: stx %g0,[%o0] subcc %o1,1,%o1 bne,pt %xcc,1b _ add %o0,8,%o0 2: retl _ nop #endif #if COUNTER_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sub %o0,8,%o0 sub %g0,%o1,%o1 // %o1 = -count sllx %o1,3,%o1 // %o1 = -8*count sub %o0,%o1,%o0 // %o0 = &destptr[count-1] 1: addcc %o1,8,%o1 // Zähler "erniedrigen", Pointer erhöhen bne,pt %xcc,1b _ stx %g0,[%o0+%o1] // Digit 0 ablegen 2: retl _ add %o0,8,%o0 #endif // extern uintD* clear_loop_down (uintD* destptr, uintC count); DECLARE_FUNCTION(clear_loop_down) C(clear_loop_down:) // Input in %o0,%o1, Output in %o0 #if STANDARD_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sub %o0,8,%o0 1: stx %g0,[%o0] subcc %o1,1,%o1 bne,pt %xcc,1b _ sub %o0,8,%o0 2: retl _ add %o0,8,%o0 #endif #if COUNTER_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sllx %o1,3,%o1 // %o1 = 8*count sub %o0,%o1,%o0 // %o0 = &destptr[-count] 1: subcc %o1,8,%o1 // Zähler erniedrigen, Pointer erniedrigen bne,pt %xcc,1b _ stx %g0,[%o0+%o1] // Digit 0 ablegen 2: retl _ nop #endif // extern boolean test_loop_up (uintD* ptr, uintC count); DECLARE_FUNCTION(test_loop_up) C(test_loop_up:) // Input in %o0,%o1, Output in %o0 #if STANDARD_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ nop ldx [%o0],%o2 1: add %o0,8,%o0 brnz,pn %o2,3f _ subcc %o1,1,%o1 bne,a,pt %xcc,1b __ ldx [%o0],%o2 2: retl _ mov 0,%o0 3: retl _ mov 1,%o0 #endif #if COUNTER_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sub %g0,%o1,%o1 // %o1 = -count sllx %o1,3,%o1 // %o1 = -8*count sub %o0,%o1,%o0 // %o0 = &ptr[count] ldx [%o0+%o1],%o2 // nächstes Digit holen 1: brnz,pn %o2,3f // testen _ addcc %o1,8,%o1 // Zähler "erniedrigen", Pointer erhöhen bne,a,pt %xcc,1b __ ldx [%o0+%o1],%o2 // nächstes Digit holen 2: retl _ mov 0,%o0 3: retl _ mov 1,%o0 #endif // extern boolean test_loop_down (uintD* ptr, uintC count); DECLARE_FUNCTION(test_loop_down) C(test_loop_down:) // Input in %o0,%o1, Output in %o0 #if STANDARD_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sub %o0,8,%o0 ldx [%o0],%o2 1: sub %o0,8,%o0 brnz,pn %o2,3f _ subcc %o1,1,%o1 bne,a,pt %xcc,1b __ ldx [%o0],%o2 2: retl _ mov 0,%o0 3: retl _ mov 1,%o0 #endif #if COUNTER_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sllx %o1,3,%o1 // %o1 = 8*count sub %o0,%o1,%o0 // %o0 = &ptr[-count] sub %o1,8,%o1 ldx [%o0+%o1],%o2 // nächstes Digit holen 1: brnz,pn %o2,3f // testen _ subcc %o1,8,%o1 // Zähler erniedrigen, Pointer erniedrigen bcc,a,pt %xcc,1b __ ldx [%o0+%o1],%o2 // nächstes Digit holen 2: retl _ mov 0,%o0 3: retl _ mov 1,%o0 #endif #if CL_DS_BIG_ENDIAN_P // extern void or_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(or_loop_up) C(or_loop_up:) // Input in %o0,%o1,%o2 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr 1: ldx [%o0],%o3 // *xptr ldx [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 or %o3,%o4,%o3 // verknüpfen stx %o3,[%o0] // =: *xptr bne,pt %xcc,1b _ add %o0,8,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o0,8,%o0 sub %g0,%o2,%o2 // %o2 = -count sllx %o2,3,%o2 // %o2 = -8*count sub %o0,%o2,%o0 // %o0 = &xptr[count-1] sub %o1,%o2,%o1 // %o1 = &yptr[count] 1: ldx [%o1+%o2],%o3 // nächstes Digit holen addcc %o2,8,%o2 // Zähler "erniedrigen", Pointer erhöhen ldx [%o0+%o2],%o4 // noch ein Digit holen or %o4,%o3,%o3 // beide verknüpfen bne,pt %xcc,1b _ stx %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif #endif // extern void xor_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(xor_loop_up) C(xor_loop_up:) // Input in %o0,%o1,%o2 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr 1: ldx [%o0],%o3 // *xptr ldx [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 xor %o3,%o4,%o3 // verknüpfen stx %o3,[%o0] // =: *xptr bne,pt %xcc,1b _ add %o0,8,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o0,8,%o0 sub %g0,%o2,%o2 // %o2 = -count sllx %o2,3,%o2 // %o2 = -8*count sub %o0,%o2,%o0 // %o0 = &xptr[count-1] sub %o1,%o2,%o1 // %o1 = &yptr[count] 1: ldx [%o1+%o2],%o3 // nächstes Digit holen addcc %o2,8,%o2 // Zähler "erniedrigen", Pointer erhöhen ldx [%o0+%o2],%o4 // noch ein Digit holen xor %o4,%o3,%o3 // beide verknüpfen bne,pt %xcc,1b _ stx %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif #if CL_DS_BIG_ENDIAN_P // extern void and_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(and_loop_up) C(and_loop_up:) // Input in %o0,%o1,%o2 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr 1: ldx [%o0],%o3 // *xptr ldx [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 and %o3,%o4,%o3 // verknüpfen stx %o3,[%o0] // =: *xptr bne,pt %xcc,1b _ add %o0,8,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o0,8,%o0 sub %g0,%o2,%o2 // %o2 = -count sllx %o2,3,%o2 // %o2 = -8*count sub %o0,%o2,%o0 // %o0 = &xptr[count-1] sub %o1,%o2,%o1 // %o1 = &yptr[count] 1: ldx [%o1+%o2],%o3 // nächstes Digit holen addcc %o2,8,%o2 // Zähler "erniedrigen", Pointer erhöhen ldx [%o0+%o2],%o4 // noch ein Digit holen and %o4,%o3,%o3 // beide verknüpfen bne,pt %xcc,1b _ stx %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void eqv_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(eqv_loop_up) C(eqv_loop_up:) // Input in %o0,%o1,%o2 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr 1: ldx [%o0],%o3 // *xptr ldx [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 xnor %o3,%o4,%o3 // verknüpfen stx %o3,[%o0] // =: *xptr bne,pt %xcc,1b _ add %o0,8,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o0,8,%o0 sub %g0,%o2,%o2 // %o2 = -count sllx %o2,3,%o2 // %o2 = -8*count sub %o0,%o2,%o0 // %o0 = &xptr[count-1] sub %o1,%o2,%o1 // %o1 = &yptr[count] 1: ldx [%o1+%o2],%o3 // nächstes Digit holen addcc %o2,8,%o2 // Zähler "erniedrigen", Pointer erhöhen ldx [%o0+%o2],%o4 // noch ein Digit holen xnor %o4,%o3,%o3 // beide verknüpfen bne,pt %xcc,1b _ stx %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void nand_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(nand_loop_up) C(nand_loop_up:) // Input in %o0,%o1,%o2 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr 1: ldx [%o0],%o3 // *xptr ldx [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 and %o3,%o4,%o3 // verknüpfen xnor %g0,%o3,%o3 stx %o3,[%o0] // =: *xptr bne,pt %xcc,1b _ add %o0,8,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o0,8,%o0 sub %g0,%o2,%o2 // %o2 = -count sllx %o2,3,%o2 // %o2 = -8*count sub %o0,%o2,%o0 // %o0 = &xptr[count-1] sub %o1,%o2,%o1 // %o1 = &yptr[count] 1: ldx [%o1+%o2],%o3 // nächstes Digit holen addcc %o2,8,%o2 // Zähler "erniedrigen", Pointer erhöhen ldx [%o0+%o2],%o4 // noch ein Digit holen and %o4,%o3,%o3 // beide verknüpfen xnor %g0,%o3,%o3 bne,pt %xcc,1b _ stx %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void nor_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(nor_loop_up) C(nor_loop_up:) // Input in %o0,%o1,%o2 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr 1: ldx [%o0],%o3 // *xptr ldx [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 or %o3,%o4,%o3 // verknüpfen xnor %g0,%o3,%o3 stx %o3,[%o0] // =: *xptr bne,pt %xcc,1b _ add %o0,8,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o0,8,%o0 sub %g0,%o2,%o2 // %o2 = -count sllx %o2,3,%o2 // %o2 = -8*count sub %o0,%o2,%o0 // %o0 = &xptr[count-1] sub %o1,%o2,%o1 // %o1 = &yptr[count] 1: ldx [%o1+%o2],%o3 // nächstes Digit holen addcc %o2,8,%o2 // Zähler "erniedrigen", Pointer erhöhen ldx [%o0+%o2],%o4 // noch ein Digit holen or %o4,%o3,%o3 // beide verknüpfen xnor %g0,%o3,%o3 bne,pt %xcc,1b _ stx %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void andc2_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(andc2_loop_up) C(andc2_loop_up:) // Input in %o0,%o1,%o2 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr 1: ldx [%o0],%o3 // *xptr ldx [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 andn %o3,%o4,%o3 // verknüpfen stx %o3,[%o0] // =: *xptr bne,pt %xcc,1b _ add %o0,8,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o0,8,%o0 sub %g0,%o2,%o2 // %o2 = -count sllx %o2,3,%o2 // %o2 = -8*count sub %o0,%o2,%o0 // %o0 = &xptr[count-1] sub %o1,%o2,%o1 // %o1 = &yptr[count] 1: ldx [%o1+%o2],%o3 // nächstes Digit holen addcc %o2,8,%o2 // Zähler "erniedrigen", Pointer erhöhen ldx [%o0+%o2],%o4 // noch ein Digit holen andn %o4,%o3,%o3 // beide verknüpfen bne,pt %xcc,1b _ stx %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void orc2_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(orc2_loop_up) C(orc2_loop_up:) // Input in %o0,%o1,%o2 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr 1: ldx [%o0],%o3 // *xptr ldx [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 orn %o3,%o4,%o3 // verknüpfen stx %o3,[%o0] // =: *xptr bne,pt %xcc,1b _ add %o0,8,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o0,8,%o0 sub %g0,%o2,%o2 // %o2 = -count sllx %o2,3,%o2 // %o2 = -8*count sub %o0,%o2,%o0 // %o0 = &xptr[count-1] sub %o1,%o2,%o1 // %o1 = &yptr[count] 1: ldx [%o1+%o2],%o3 // nächstes Digit holen addcc %o2,8,%o2 // Zähler "erniedrigen", Pointer erhöhen ldx [%o0+%o2],%o4 // noch ein Digit holen orn %o4,%o3,%o3 // beide verknüpfen bne,pt %xcc,1b _ stx %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void not_loop_up (uintD* xptr, uintC count); DECLARE_FUNCTION(not_loop_up) C(not_loop_up:) // Input in %o0,%o1 #if STANDARD_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ nop 1: ldx [%o0],%o2 subcc %o1,1,%o1 xnor %g0,%o2,%o2 stx %o2,[%o0] bne,pt %xcc,1b _ add %o0,8,%o0 2: retl _ nop #endif #if COUNTER_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sub %o0,8,%o0 sub %g0,%o1,%o1 // %o1 = -count sllx %o1,3,%o1 // %o1 = -8*count sub %o0,%o1,%o0 // %o0 = &destptr[count-1] 1: addcc %o1,8,%o1 // Zähler "erniedrigen", Pointer erhöhen ldx [%o0+%o1],%o2 // nächstes Digit holen xnor %g0,%o2,%o2 bne,pt %xcc,1b _ stx %o2,[%o0+%o1] // Digit ablegen 2: retl _ nop #endif // extern boolean and_test_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(and_test_loop_up) C(and_test_loop_up:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ nop 1: ldx [%o0],%o3 ldx [%o1],%o4 add %o0,8,%o0 andcc %o3,%o4,%g0 bne,pn %xcc,3f _ subcc %o2,1,%o2 bne,pt %xcc,1b _ add %o1,8,%o1 2: retl _ mov 0,%o0 3: retl _ mov 1,%o0 #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %g0,%o2,%o2 // %o2 = -count sllx %o2,3,%o2 // %o2 = -8*count sub %o0,%o2,%o0 // %o0 = &xptr[count] sub %o1,%o2,%o1 // %o1 = &yptr[count] ldx [%o0+%o2],%o3 // nächstes Digit holen 1: ldx [%o1+%o2],%o4 // noch ein Digit holen andcc %o3,%o4,%g0 // beide verknüpfen bne,pn %xcc,3f _ addcc %o2,8,%o2 // Zähler "erniedrigen", Pointer erhöhen bne,a,pt %xcc,1b __ ldx [%o0+%o2],%o3 // nächstes Digit holen 2: retl _ mov 0,%o0 3: retl _ mov 1,%o0 #endif #endif // extern cl_signean compare_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(compare_loop_up) C(compare_loop_up:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ nop ldx [%o0],%o3 1: ldx [%o1],%o4 add %o0,8,%o0 subcc %o3,%o4,%g0 bne,pn %xcc,3f _ add %o1,8,%o1 subcc %o2,1,%o2 bne,a,pt %xcc,1b __ ldx [%o0],%o3 2: retl _ mov 0,%o0 3: mov 1,%o0 movlu %xcc,-1,%o0 retl _ sra %o0,0,%o0 // sign-extend %o0 #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %g0,%o2,%o2 // %o2 = -count sllx %o2,3,%o2 // %o2 = -8*count sub %o0,%o2,%o0 // %o0 = &xptr[count] sub %o1,%o2,%o1 // %o1 = &yptr[count] ldx [%o0+%o2],%o3 // nächstes Digit holen 1: ldx [%o1+%o2],%o4 // noch ein Digit holen subcc %o3,%o4,%g0 // vergleichen bne,pn %xcc,3f _ addcc %o2,8,%o2 // Zähler "erniedrigen", Pointer erhöhen bne,a,pt %xcc,1b __ ldx [%o0+%o2],%o3 // nächstes Digit holen 2: retl _ mov 0,%o0 3: subcc %o3,%o4,%g0 // nochmals vergleichen mov 1,%o0 movlu %xcc,-1,%o0 retl _ sra %o0,0,%o0 // sign-extend %o0 #endif #if CL_DS_BIG_ENDIAN_P // extern uintD add_loop_down (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); DECLARE_FUNCTION(add_loop_down) C(add_loop_down:) // Input in %o0,%o1,%o2,%o3, verändert %g1, Output in %o0 #if STANDARD_LOOPS // srl %o3,0,%o3 // zero-extend %o3 = count brz,pn %o3,2f _ mov %g0,%g1 // Carry := 0 sub %o0,8,%o0 1: ldx [%o0],%o4 // source1-digit sub %o1,8,%o1 ldx [%o1],%o5 // source2-digit addcc %o4,%g1,%o4 movcc %xcc,0,%g1 // %g1|%o4 := %o4 + alter Carry %g1 addcc %o4,%o5,%o4 movcs %xcc,1,%g1 // %g1|%o4 := %o4 + alter Carry %g1 + %o5 sub %o2,8,%o2 stx %o4,[%o2] // Digit ablegen subcc %o3,1,%o3 bne,pt %xcc,1b _ sub %o0,8,%o0 2: retl _ mov %g1,%o0 #endif #if COUNTER_LOOPS // srl %o3,0,%o3 // zero-extend %o3 = count brz,pn %o3,2f _ mov %g0,%g1 // Carry := 0 sub %o0,8,%o0 sub %o1,8,%o1 sllx %o3,3,%o3 // %o3 = 8*count sub %o0,%o3,%o0 // %o0 = &sourceptr1[-count-1] sub %o1,%o3,%o1 // %o1 = &sourceptr2[-count-1] sub %o2,%o3,%o2 // %o2 = &destptr[-count] 1: ldx [%o0+%o3],%o4 // source1-digit ldx [%o1+%o3],%o5 // source2-digit addcc %o4,%g1,%o4 movcc %xcc,0,%g1 // %g1|%o4 := %o4 + alter Carry %g1 addcc %o4,%o5,%o4 movcs %xcc,1,%g1 // %g1|%o4 := %o4 + alter Carry %g1 + %o5 subcc %o3,8,%o3 bne,pt %xcc,1b _ stx %o4,[%o2+%o3] // Digit ablegen 2: retl _ mov %g1,%o0 #endif // extern uintD addto_loop_down (uintD* sourceptr, uintD* destptr, uintC count); DECLARE_FUNCTION(addto_loop_down) C(addto_loop_down:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ mov %g0,%o5 // Carry := 0 sub %o0,8,%o0 1: ldx [%o0],%o3 // source-digit sub %o1,8,%o1 ldx [%o1],%o4 // dest-digit addcc %o3,%o5,%o3 movcc %xcc,0,%o5 // %o5|%o3 := %o3 + alter Carry %o5 addcc %o3,%o4,%o4 movcs %xcc,1,%o5 // %o5|%o4 := %o3 + alter Carry %o5 + %o4 stx %o4,[%o1] // Digit ablegen subcc %o2,1,%o2 bne,pt %xcc,1b _ sub %o0,8,%o0 2: retl _ mov %o5,%o0 #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ mov %g0,%o5 // Carry := 0 sub %o0,8,%o0 sub %o1,8,%o1 sllx %o2,3,%o2 // %o2 = 8*count sub %o0,%o2,%o0 // %o0 = &sourceptr[-count-1] sub %o1,%o2,%o1 // %o1 = &destptr[-count-1] ldx [%o0+%o2],%o3 // source-digit 1: ldx [%o1+%o2],%o4 // dest-digit addcc %o3,%o5,%o3 movcc %xcc,0,%o5 // %o5|%o3 := %o3 + alter Carry %o5 addcc %o3,%o4,%o4 movcs %xcc,1,%o5 // %o5|%o4 := %o3 + alter Carry %o5 + %o4 stx %o4,[%o1+%o2] // Digit ablegen subcc %o2,8,%o2 bne,a,pt %xcc,1b __ ldx [%o0+%o2],%o3 // source-digit 2: retl _ mov %o5,%o0 #endif // extern uintD inc_loop_down (uintD* ptr, uintC count); DECLARE_FUNCTION(inc_loop_down) C(inc_loop_down:) // Input in %o0,%o1, Output in %o0 #if STANDARD_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sub %o0,8,%o0 1: ldx [%o0],%o2 addcc %o2,1,%o2 bne,pn %xcc,3f _ stx %o2,[%o0] subcc %o1,1,%o1 bne,pt %xcc,1b _ sub %o0,8,%o0 2: retl _ mov 1,%o0 3: retl _ mov 0,%o0 #endif #if COUNTER_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sub %o0,8,%o0 sllx %o1,3,%o1 // %o1 = 8*count sub %o0,%o1,%o0 // %o0 = &ptr[-count-1] ldx [%o0+%o1],%o2 // digit holen 1: addcc %o2,1,%o2 // incrementieren bne,pn %xcc,3f _ stx %o2,[%o0+%o1] // ablegen subcc %o1,8,%o1 // Zähler erniedrigen, Pointer erniedrigen bne,a,pt %xcc,1b __ ldx [%o0+%o1],%o2 2: retl _ mov 1,%o0 3: retl _ mov 0,%o0 #endif // extern uintD sub_loop_down (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); DECLARE_FUNCTION(sub_loop_down) C(sub_loop_down:) // Input in %o0,%o1,%o2,%o3, verändert %g1, Output in %o0 #if STANDARD_LOOPS // srl %o3,0,%o3 // zero-extend %o3 = count brz,pn %o3,2f _ mov %g0,%g1 // Carry := 0 sub %o1,8,%o1 1: ldx [%o1],%o5 // source2-digit sub %o0,8,%o0 ldx [%o0],%o4 // source1-digit addcc %o5,%g1,%o5 movcc %xcc,0,%g1 // %g1|%o5 := %o5 + alter Carry %g1 subcc %o4,%o5,%o4 movcs %xcc,1,%g1 // %o4-2^64*%g1 := %o4 - %o5 - alter Carry %g1 sub %o2,8,%o2 stx %o4,[%o2] // Digit ablegen subcc %o3,1,%o3 bne,pt %xcc,1b _ sub %o1,8,%o1 2: retl _ mov %g1,%o0 #endif #if COUNTER_LOOPS // srl %o3,0,%o3 // zero-extend %o3 = count brz,pn %o3,2f _ mov %g0,%g1 // Carry := 0 sub %o0,8,%o0 sub %o1,8,%o1 sllx %o3,3,%o3 // %o3 = 8*count sub %o0,%o3,%o0 // %o0 = &sourceptr1[-count-1] sub %o1,%o3,%o1 // %o1 = &sourceptr2[-count-1] sub %o2,%o3,%o2 // %o2 = &destptr[-count] 1: ldx [%o0+%o3],%o4 // source1-digit ldx [%o1+%o3],%o5 // source2-digit addcc %o5,%g1,%o5 movcc %xcc,0,%g1 // %g1|%o5 := %o5 + alter Carry %g1 subcc %o4,%o5,%o4 movcs %xcc,1,%g1 // %o4-2^64*%g1 := %o4 - %o5 - alter Carry %g1 subcc %o3,8,%o3 bne,pt %xcc,1b _ stx %o4,[%o2+%o3] // Digit ablegen 2: retl _ mov %g1,%o0 #endif // extern uintD subx_loop_down (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count, uintD carry); DECLARE_FUNCTION(subx_loop_down) C(subx_loop_down:) // Input in %o0,%o1,%o2,%o3,%o4, verändert %g1, Output in %o0 #if STANDARD_LOOPS // srl %o3,0,%o3 // zero-extend %o3 = count brz,pn %o3,2f _ mov %o4,%g1 // Carry (0 oder -1) sub %o1,8,%o1 1: ldx [%o1],%o5 // source2-digit sub %o0,8,%o0 ldx [%o0],%o4 // source1-digit subcc %o5,%g1,%o5 movcc %xcc,0,%g1 // %o5-2^64*%g1 := %o5 - alter Carry %g1 subcc %o4,%o5,%o4 movcs %xcc,-1,%g1 // %o4+2^64*%g1 := %o4 - %o5 + alter Carry %g1 sub %o2,8,%o2 stx %o4,[%o2] // Digit ablegen subcc %o3,1,%o3 bne,pt %xcc,1b _ sub %o1,8,%o1 2: retl _ mov %g1,%o0 #endif #if COUNTER_LOOPS // srl %o3,0,%o3 // zero-extend %o3 = count brz,pn %o3,2f _ mov %o4,%g1 // Carry (0 oder -1) sub %o0,8,%o0 sub %o1,8,%o1 sllx %o3,3,%o3 // %o3 = 8*count sub %o0,%o3,%o0 // %o0 = &sourceptr1[-count-1] sub %o1,%o3,%o1 // %o1 = &sourceptr2[-count-1] sub %o2,%o3,%o2 // %o2 = &destptr[-count] 1: ldx [%o1+%o3],%o5 // source2-digit ldx [%o0+%o3],%o4 // source1-digit subcc %o5,%g1,%o5 movcc %xcc,0,%g1 // %o5-2^64*%g1 := %o5 - alter Carry %g1 subcc %o4,%o5,%o4 movcs %xcc,-1,%g1 // %o4+2^64*%g1 := %o4 - %o5 + alter Carry %g1 subcc %o3,8,%o3 bne,pt %xcc,1b _ stx %o4,[%o2+%o3] // Digit ablegen 2: retl _ mov %g1,%o0 #endif // extern uintD subfrom_loop_down (uintD* sourceptr, uintD* destptr, uintC count); DECLARE_FUNCTION(subfrom_loop_down) C(subfrom_loop_down:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ mov %g0,%o5 // Carry := 0 sub %o0,8,%o0 1: ldx [%o0],%o3 // source-digit sub %o1,8,%o1 ldx [%o1],%o4 // dest-digit addcc %o3,%o5,%o3 movcc %xcc,0,%o5 // %o5|%o3 := %o3 + alter Carry %o5 subcc %o4,%o3,%o4 movcs %xcc,1,%o5 // %o4-2^64*%o5 := %o4 - %o3 - alter Carry %o5 stx %o4,[%o1] // Digit ablegen subcc %o2,1,%o2 bne,pt %xcc,1b _ sub %o0,8,%o0 2: retl _ mov %o5,%o0 #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ mov %g0,%o5 // Carry := 0 sub %o0,8,%o0 sub %o1,8,%o1 sllx %o2,3,%o2 // %o2 = 8*count sub %o0,%o2,%o0 // %o0 = &sourceptr[-count-1] sub %o1,%o2,%o1 // %o1 = &destptr[-count-1] ldx [%o0+%o2],%o3 // source-digit 1: ldx [%o1+%o2],%o4 // dest-digit addcc %o3,%o5,%o3 movcc %xcc,0,%o5 // %o5|%o3 := %o3 + alter Carry %o5 subcc %o4,%o3,%o4 movcs %xcc,1,%o5 // %o4-2^64*%o5 := %o4 - %o3 - alter Carry %o5 stx %o4,[%o1+%o2] // Digit ablegen subcc %o2,8,%o2 bne,a,pt %xcc,1b __ ldx [%o0+%o2],%o3 // source-digit 2: retl _ mov %o5,%o0 #endif // extern uintD dec_loop_down (uintD* ptr, uintC count); DECLARE_FUNCTION(dec_loop_down) C(dec_loop_down:) // Input in %o0,%o1, Output in %o0 #if STANDARD_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sub %o0,8,%o0 1: ldx [%o0],%o2 subcc %o2,1,%o2 bcc,pn %xcc,3f _ stx %o2,[%o0] subcc %o1,1,%o1 bne,pt %xcc,1b _ sub %o0,8,%o0 2: retl _ mov -1,%o0 3: retl _ mov 0,%o0 #endif #if COUNTER_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sub %o0,8,%o0 sllx %o1,3,%o1 // %o1 = 8*count sub %o0,%o1,%o0 // %o0 = &ptr[-count-1] ldx [%o0+%o1],%o2 // digit holen 1: subcc %o2,1,%o2 // decrementieren bcc,pn %xcc,3f _ stx %o2,[%o0+%o1] // ablegen subcc %o1,8,%o1 // Zähler erniedrigen, Pointer erniedrigen bne,a,pt %xcc,1b __ ldx [%o0+%o1],%o2 2: retl _ mov -1,%o0 3: retl _ mov 0,%o0 #endif // extern uintD neg_loop_down (uintD* ptr, uintC count); DECLARE_FUNCTION(neg_loop_down) C(neg_loop_down:) // Input in %o0,%o1, Output in %o0 #if STANDARD_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count // erstes Digit /=0 suchen: brz,pn %o1,2f _ sub %o0,8,%o0 1: ldx [%o0],%o2 subcc %g0,%o2,%o2 bne,pn %xcc,3f _ subcc %o1,1,%o1 bne,pt %xcc,1b _ sub %o0,8,%o0 2: retl _ mov 0,%o0 3: // erstes Digit /=0 gefunden, ab jetzt gibt's Carrys stx %o2,[%o0] // 1 Digit negieren // alle anderen Digits invertieren: be,pn %xcc,5f _ sub %o0,8,%o0 4: ldx [%o0],%o2 subcc %o1,1,%o1 xnor %g0,%o2,%o2 stx %o2,[%o0] bne,pt %xcc,4b _ sub %o0,8,%o0 5: retl _ mov -1,%o0 #endif #if COUNTER_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count // erstes Digit /=0 suchen: brz,pn %o1,2f _ sub %o0,8,%o0 sllx %o1,3,%o1 // %o1 = 8*count sub %o0,%o1,%o0 // %o0 = &ptr[-count-1] ldx [%o0+%o1],%o2 // digit holen 1: subcc %g0,%o2,%o2 // negieren, testen bne,pn %xcc,3f _ subcc %o1,8,%o1 // Zähler erniedrigen, Pointer erniedrigen bne,a,pt %xcc,1b __ ldx [%o0+%o1],%o2 2: retl _ mov 0,%o0 3: // erstes Digit /=0 gefunden, ab jetzt gibt's Carrys // alle anderen Digits invertieren: add %o1,8,%o1 stx %o2,[%o0+%o1] // ablegen subcc %o1,8,%o1 be,pn %xcc,5f _ nop ldx [%o0+%o1],%o2 4: xnor %g0,%o2,%o2 stx %o2,[%o0+%o1] subcc %o1,8,%o1 bne,a,pt %xcc,4b __ ldx [%o0+%o1],%o2 5: retl _ mov -1,%o0 #endif // extern uintD shift1left_loop_down (uintD* ptr, uintC count); DECLARE_FUNCTION(shift1left_loop_down) C(shift1left_loop_down:) // Input in %o0,%o1, Output in %o0 // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ mov 0,%o3 // Carry := 0 sub %o0,8,%o0 1: ldx [%o0],%o2 // Digit addcc %o2,%o2,%o4 // shiften add %o4,%o3,%o4 // und carry srlx %o2,63,%o3 // neues Carry stx %o4,[%o0] // Digit ablegen subcc %o1,1,%o1 bne,pt %xcc,1b _ sub %o0,8,%o0 2: retl _ mov %o3,%o0 // extern uintD shiftleft_loop_down (uintD* ptr, uintC count, uintC i, uintD carry); DECLARE_FUNCTION(shiftleft_loop_down) C(shiftleft_loop_down:) // Input in %o0,%o1,%o2,%o3, verändert %g1, Output in %o0 // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sub %g0,%o2,%g1 // 64-i (mod 64) sub %o0,8,%o0 1: ldx [%o0],%o4 // Digit subcc %o1,1,%o1 sllx %o4,%o2,%o5 // dessen niedere (64-i) Bits or %o3,%o5,%o5 // mit dem alten Carry kombinieren stx %o5,[%o0] // Digit ablegen srlx %o4,%g1,%o3 // dessen höchste i Bits liefern den neuen Carry bne,pt %xcc,1b _ sub %o0,8,%o0 2: retl _ mov %o3,%o0 // extern uintD shiftleftcopy_loop_down (uintD* sourceptr, uintD* destptr, uintC count, uintC i); DECLARE_FUNCTION(shiftleftcopy_loop_down) C(shiftleftcopy_loop_down:) // Input in %o0,%o1,%o2,%o3, verändert %g1,%g2, Output in %o0 // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ mov 0,%o4 // Carry := 0 sub %g0,%o3,%g1 // 64-i (mod 64) sub %o0,8,%o0 1: ldx [%o0],%o5 // Digit subcc %o2,1,%o2 sllx %o5,%o3,%g2 // dessen niedere (64-i) Bits or %o4,%g2,%g2 // mit dem alten Carry kombinieren sub %o1,8,%o1 stx %g2,[%o1] // Digit ablegen srlx %o5,%g1,%o4 // dessen höchste i Bits liefern den neuen Carry bne,pt %xcc,1b _ sub %o0,8,%o0 2: retl _ mov %o4,%o0 // extern uintD shift1right_loop_up (uintD* ptr, uintC count, uintD carry); DECLARE_FUNCTION(shift1right_loop_up) C(shift1right_loop_up:) // Input in %o0,%o1,%o2, Output in %o0 // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sllx %o2,63,%o2 // Carry 1: ldx [%o0],%o3 // Digit subcc %o1,1,%o1 srlx %o3,1,%o4 // shiften or %o2,%o4,%o4 // und mit altem Carry kombinieren stx %o4,[%o0] // und ablegen sllx %o3,63,%o2 // neuer Carry bne,pt %xcc,1b _ add %o0,8,%o0 2: retl _ mov %o2,%o0 // extern uintD shiftright_loop_up (uintD* ptr, uintC count, uintC i); DECLARE_FUNCTION(shiftright_loop_up) C(shiftright_loop_up:) // Input in %o0,%o1,%o2, verändert %g1, Output in %o0 // srl %o1,0,%o1 // zero-extend %o1 = count sub %g0,%o2,%g1 // 64-i (mod 64) brz,pn %o1,2f _ or %g0,%g0,%o3 // Carry := 0 1: ldx [%o0],%o4 // Digit subcc %o1,1,%o1 srlx %o4,%o2,%o5 // shiften or %o3,%o5,%o5 // und mit altem Carry kombinieren stx %o5,[%o0] // und ablegen sllx %o4,%g1,%o3 // neuer Carry bne,pt %xcc,1b _ add %o0,8,%o0 2: retl _ mov %o3,%o0 // extern uintD shiftrightsigned_loop_up (uintD* ptr, uintC count, uintC i); DECLARE_FUNCTION(shiftrightsigned_loop_up) C(shiftrightsigned_loop_up:) // Input in %o0,%o1,%o2, verändert %g1, Output in %o0 // srl %o1,0,%o1 // zero-extend %o1 = count ldx [%o0],%o4 // erstes Digit sub %g0,%o2,%g1 // 64-i (mod 64) srax %o4,%o2,%o5 // shiften stx %o5,[%o0] // und ablegen sllx %o4,%g1,%o3 // neuer Carry subcc %o1,1,%o1 be,pn %xcc,2f _ add %o0,8,%o0 1: ldx [%o0],%o4 // Digit subcc %o1,1,%o1 srlx %o4,%o2,%o5 // shiften or %o3,%o5,%o5 // und mit altem Carry kombinieren stx %o5,[%o0] // und ablegen sllx %o4,%g1,%o3 // neuer Carry bne,pt %xcc,1b _ add %o0,8,%o0 2: retl _ mov %o3,%o0 // extern uintD shiftrightcopy_loop_up (uintD* sourceptr, uintD* destptr, uintC count, uintC i, uintD carry); DECLARE_FUNCTION(shiftrightcopy_loop_up) C(shiftrightcopy_loop_up:) // Input in %o0,%o1,%o2,%o3,%o4, verändert %g1,%g2, Output in %o0 // srl %o2,0,%o2 // zero-extend %o2 = count sub %g0,%o3,%g1 // 64-i (mod 64) brz,pn %o2,2f _ sllx %o4,%g1,%g2 // erster Carry 1: ldx [%o0],%o4 // Digit add %o0,8,%o0 srlx %o4,%o3,%o5 // shiften or %g2,%o5,%o5 // und mit altem Carry kombinieren stx %o5,[%o1] // und ablegen sllx %o4,%g1,%g2 // neuer Carry subcc %o2,1,%o2 bne,pt %xcc,1b _ add %o1,8,%o1 2: retl _ mov %g2,%o0 // extern uintD mulusmall_loop_down (uintD digit, uintD* ptr, uintC len, uintD newdigit); DECLARE_FUNCTION(mulusmall_loop_down) C(mulusmall_loop_down:) // Input in %o0,%o1,%o2,%o3, Output in %o0, verändert %g1 // srl %o2,0,%o2 // zero-extend %o2 = len brz,pn %o2,2f _ sub %o1,8,%o1 1: // nächstes Digit [%o1] mit der 6-Bit-Zahl %o0 multiplizieren // und kleinen Carry %o3 dazu: ldx [%o1],%o4 sub %o2,1,%o2 srlx %o4,32,%o5 // high32(x) srl %o4,0,%o4 // low32(x) mulx %o4,%o0,%o4 // low32(x)*digit mulx %o5,%o0,%o5 // high32(x)*digit sllx %o5,32,%g1 // low32(high32(x)*digit)*2^32 add %g1,%o3,%g1 // plus carry addcc %o4,%g1,%o4 // plus low32(x)*digit srlx %o5,32,%o3 // high32(high32(x)*digit) add %o3,1,%g1 movcs %xcc,%g1,%o3 // neuer Carry stx %o4,[%o1] // neues Digit ablegen brnz,pt %o2,1b _ sub %o1,8,%o1 2: retl _ mov %o3,%o0 // extern void mulu_loop_down (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); DECLARE_FUNCTION(mulu_loop_down) C(mulu_loop_down:) // Input in %i0,%i1,%i2,%i3 save %sp,-192,%sp mov 0,%l0 // Carry srlx %i0,32,%l1 // %l1 = high32(digit) srl %i0,0,%l2 // %l2 = low32(digit) mov 1,%l3 sllx %l3,32,%l3 // %l3 = 2^32 sub %i1,%i2,%i1 // %i1 = sourceptr - destptr 1: sub %i2,8,%i2 ldx [%i1+%i2],%o0 // nächstes Digit subcc %i3,1,%i3 // mit digit multiplizieren: (%l1*2^32+%l2) * %o0 + %l0 -> %l0|%o0 srlx %o0,32,%o1 srl %o0,0,%o2 mulx %l1,%o1,%o3 // high part mulx %l1,%o2,%o4 // first mid part mulx %l2,%o1,%o1 // second mid part mulx %l2,%o2,%o2 // low part srlx %o2,32,%o5 // low part's upper half add %o4,%o5,%o4 // add to one of the mid parts, no carry addcc %o4,%o1,%o4 // add other mid part add %o3,%l3,%o5 movcs %xcc,%o5,%o3 // if carry, add 2^32 to the high part srlx %o4,32,%o5 sllx %o4,32,%o4 srl %o2,0,%o2 add %o2,%o4,%o0 // combine low32(midparts) and low32(lowpart) addcc %o0,%l0,%o0 // alten Carry addieren add %o3,%o5,%l0 // add high32(midparts) to high part add %l0,1,%o5 movcs %xcc,%o5,%l0 // neuer Carry // Multiplikation fertig brnz,pt %i3,1b _ stx %o0,[%i2] // Low-Digit ablegen stx %l0,[%i2-8] // letzten Carry ablegen ret _ restore // extern uintD muluadd_loop_down (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); DECLARE_FUNCTION(muluadd_loop_down) C(muluadd_loop_down:) // Input in %i0,%i1,%i2,%i3, Output in %i0 save %sp,-192,%sp mov 0,%l0 // Carry srlx %i0,32,%l1 // %l1 = high32(digit) srl %i0,0,%l2 // %l2 = low32(digit) mov 1,%l3 sllx %l3,32,%l3 // %l3 = 2^32 sub %i1,%i2,%i1 // %i1 = sourceptr - destptr 1: sub %i2,8,%i2 ldx [%i1+%i2],%o0 // nächstes Digit ldx [%i2],%i4 // *destptr subcc %i3,1,%i3 // mit digit multiplizieren: (%l1*2^32+%l2) * %o0 + %l0 -> %l0|%o0 srlx %o0,32,%o1 srl %o0,0,%o2 mulx %l1,%o1,%o3 // high part mulx %l1,%o2,%o4 // first mid part mulx %l2,%o1,%o1 // second mid part mulx %l2,%o2,%o2 // low part srlx %o2,32,%o5 // low part's upper half add %o4,%o5,%o4 // add to one of the mid parts, no carry addcc %o4,%o1,%o4 // add other mid part add %o3,%l3,%o5 movcs %xcc,%o5,%o3 // if carry, add 2^32 to the high part srlx %o4,32,%o5 sllx %o4,32,%o4 srl %o2,0,%o2 add %o2,%o4,%o0 // combine low32(midparts) and low32(lowpart) addcc %o0,%l0,%o0 // alten Carry addieren add %o3,%o5,%l0 // add high32(midparts) to high part add %l0,1,%o5 movcs %xcc,%o5,%l0 // neuer Carry // Multiplikation fertig addcc %i4,%o0,%o0 // alten *destptr addieren add %l0,1,%o2 movcs %xcc,%o2,%l0 // neuer Carry brnz,pt %i3,1b _ stx %o0,[%i2] // Low-Digit ablegen mov %l0,%i0 // letzter Carry ret _ restore // extern uintD mulusub_loop_down (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); DECLARE_FUNCTION(mulusub_loop_down) C(mulusub_loop_down:) // Input in %i0,%i1,%i2,%i3, Output in %i0 save %sp,-192,%sp mov 0,%l0 // Carry srlx %i0,32,%l1 // %l1 = high32(digit) srl %i0,0,%l2 // %l2 = low32(digit) mov 1,%l3 sllx %l3,32,%l3 // %l3 = 2^32 sub %i1,%i2,%i1 // %i1 = sourceptr - destptr 1: sub %i2,8,%i2 ldx [%i1+%i2],%o0 // nächstes Digit ldx [%i2],%i4 // *destptr subcc %i3,1,%i3 // mit digit multiplizieren: (%l1*2^32+%l2) * %o0 + %l0 -> %l0|%o0 srlx %o0,32,%o1 srl %o0,0,%o2 mulx %l1,%o1,%o3 // high part mulx %l1,%o2,%o4 // first mid part mulx %l2,%o1,%o1 // second mid part mulx %l2,%o2,%o2 // low part srlx %o2,32,%o5 // low part's upper half add %o4,%o5,%o4 // add to one of the mid parts, no carry addcc %o4,%o1,%o4 // add other mid part add %o3,%l3,%o5 movcs %xcc,%o5,%o3 // if carry, add 2^32 to the high part srlx %o4,32,%o5 sllx %o4,32,%o4 srl %o2,0,%o2 add %o2,%o4,%o0 // combine low32(midparts) and low32(lowpart) addcc %o0,%l0,%o0 // alten Carry addieren add %o3,%o5,%l0 // add high32(midparts) to high part add %l0,1,%o5 movcs %xcc,%o5,%l0 // neuer Carry // Multiplikation fertig subcc %i4,%o0,%o0 // vom alten *destptr subtrahieren add %l0,1,%o2 movcs %xcc,%o2,%l0 // neuer Carry brnz,pt %i3,1b _ stx %o0,[%i2] // Low-Digit ablegen mov %l0,%i0 // letzter Carry ret _ restore #endif #if !CL_DS_BIG_ENDIAN_P // extern void or_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(or_loop_down) C(or_loop_down:) // Input in %o0,%o1,%o2 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr sub %o0,8,%o0 1: ldx [%o0],%o3 // *xptr ldx [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 or %o3,%o4,%o3 // verknüpfen stx %o3,[%o0] // =: *xptr bne,pt %xcc,1b _ sub %o0,8,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sllx %o2,3,%o2 // %o2 = 8*count sub %o0,%o2,%o0 // %o0 = &xptr[-count] sub %o1,%o2,%o1 // %o1 = &yptr[-count] 1: subcc %o2,8,%o2 // Zähler erniedrigen, Pointer erniedrigen ldx [%o1+%o2],%o3 // nächstes Digit holen ldx [%o0+%o2],%o4 // noch ein Digit holen or %o4,%o3,%o3 // beide verknüpfen bne,pt %xcc,1b _ stx %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void xor_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(xor_loop_down) C(xor_loop_down:) // Input in %o0,%o1,%o2 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr sub %o0,8,%o0 1: ldx [%o0],%o3 // *xptr ldx [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 xor %o3,%o4,%o3 // verknüpfen stx %o3,[%o0] // =: *xptr bne,pt %xcc,1b _ sub %o0,8,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sllx %o2,3,%o2 // %o2 = 8*count sub %o0,%o2,%o0 // %o0 = &xptr[-count] sub %o1,%o2,%o1 // %o1 = &yptr[-count] 1: subcc %o2,8,%o2 // Zähler erniedrigen, Pointer erniedrigen ldx [%o1+%o2],%o3 // nächstes Digit holen ldx [%o0+%o2],%o4 // noch ein Digit holen xor %o4,%o3,%o3 // beide verknüpfen bne,pt %xcc,1b _ stx %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void and_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(and_loop_down) C(and_loop_down:) // Input in %o0,%o1,%o2 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr sub %o0,8,%o0 1: ldx [%o0],%o3 // *xptr ldx [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 and %o3,%o4,%o3 // verknüpfen stx %o3,[%o0] // =: *xptr bne,pt %xcc,1b _ sub %o0,8,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sllx %o2,3,%o2 // %o2 = 8*count sub %o0,%o2,%o0 // %o0 = &xptr[-count] sub %o1,%o2,%o1 // %o1 = &yptr[-count] 1: subcc %o2,8,%o2 // Zähler erniedrigen, Pointer erniedrigen ldx [%o1+%o2],%o3 // nächstes Digit holen ldx [%o0+%o2],%o4 // noch ein Digit holen and %o4,%o3,%o3 // beide verknüpfen bne,pt %xcc,1b _ stx %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void eqv_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(eqv_loop_down) C(eqv_loop_down:) // Input in %o0,%o1,%o2 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr sub %o0,8,%o0 1: ldx [%o0],%o3 // *xptr ldx [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 xnor %o3,%o4,%o3 // verknüpfen stx %o3,[%o0] // =: *xptr bne,pt %xcc,1b _ sub %o0,8,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sllx %o2,3,%o2 // %o2 = 8*count sub %o0,%o2,%o0 // %o0 = &xptr[-count] sub %o1,%o2,%o1 // %o1 = &yptr[-count] 1: subcc %o2,8,%o2 // Zähler erniedrigen, Pointer erniedrigen ldx [%o1+%o2],%o3 // nächstes Digit holen ldx [%o0+%o2],%o4 // noch ein Digit holen xnor %o4,%o3,%o3 // beide verknüpfen bne,pt %xcc,1b _ stx %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void nand_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(nand_loop_down) C(nand_loop_down:) // Input in %o0,%o1,%o2 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr sub %o0,8,%o0 1: ldx [%o0],%o3 // *xptr ldx [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 and %o3,%o4,%o3 // verknüpfen xnor %g0,%o3,%o3 stx %o3,[%o0] // =: *xptr bne,pt %xcc,1b _ sub %o0,8,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sllx %o2,3,%o2 // %o2 = 8*count sub %o0,%o2,%o0 // %o0 = &xptr[-count] sub %o1,%o2,%o1 // %o1 = &yptr[-count] 1: subcc %o2,8,%o2 // Zähler erniedrigen, Pointer erniedrigen ldx [%o1+%o2],%o3 // nächstes Digit holen ldx [%o0+%o2],%o4 // noch ein Digit holen and %o4,%o3,%o3 // beide verknüpfen xnor %g0,%o3,%o3 bne,pt %xcc,1b _ stx %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void nor_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(nor_loop_down) C(nor_loop_down:) // Input in %o0,%o1,%o2 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr sub %o0,8,%o0 1: ldx [%o0],%o3 // *xptr ldx [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 or %o3,%o4,%o3 // verknüpfen xnor %g0,%o3,%o3 stx %o3,[%o0] // =: *xptr bne,pt %xcc,1b _ sub %o0,8,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sllx %o2,3,%o2 // %o2 = 8*count sub %o0,%o2,%o0 // %o0 = &xptr[-count] sub %o1,%o2,%o1 // %o1 = &yptr[-count] 1: subcc %o2,8,%o2 // Zähler erniedrigen, Pointer erniedrigen ldx [%o1+%o2],%o3 // nächstes Digit holen ldx [%o0+%o2],%o4 // noch ein Digit holen or %o4,%o3,%o3 // beide verknüpfen xnor %g0,%o3,%o3 bne,pt %xcc,1b _ stx %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void andc2_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(andc2_loop_down) C(andc2_loop_down:) // Input in %o0,%o1,%o2 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr sub %o0,8,%o0 1: ldx [%o0],%o3 // *xptr ldx [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 andn %o3,%o4,%o3 // verknüpfen stx %o3,[%o0] // =: *xptr bne,pt %xcc,1b _ sub %o0,8,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sllx %o2,3,%o2 // %o2 = 8*count sub %o0,%o2,%o0 // %o0 = &xptr[-count] sub %o1,%o2,%o1 // %o1 = &yptr[-count] 1: subcc %o2,8,%o2 // Zähler erniedrigen, Pointer erniedrigen ldx [%o1+%o2],%o3 // nächstes Digit holen ldx [%o0+%o2],%o4 // noch ein Digit holen andn %o4,%o3,%o3 // beide verknüpfen bne,pt %xcc,1b _ stx %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void orc2_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(orc2_loop_down) C(orc2_loop_down:) // Input in %o0,%o1,%o2 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %o1,%o0,%o1 // %o1 = yptr-xptr sub %o0,8,%o0 1: ldx [%o0],%o3 // *xptr ldx [%o0+%o1],%o4 // *yptr subcc %o2,1,%o2 orn %o3,%o4,%o3 // verknüpfen stx %o3,[%o0] // =: *xptr bne,pt %xcc,1b _ sub %o0,8,%o0 // xptr++, yptr++ 2: retl _ nop #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sllx %o2,3,%o2 // %o2 = 8*count sub %o0,%o2,%o0 // %o0 = &xptr[-count] sub %o1,%o2,%o1 // %o1 = &yptr[-count] 1: subcc %o2,8,%o2 // Zähler erniedrigen, Pointer erniedrigen ldx [%o1+%o2],%o3 // nächstes Digit holen ldx [%o0+%o2],%o4 // noch ein Digit holen orn %o4,%o3,%o3 // beide verknüpfen bne,pt %xcc,1b _ stx %o3,[%o1+%o2] // Digit ablegen 2: retl _ nop #endif // extern void not_loop_down (uintD* xptr, uintC count); DECLARE_FUNCTION(not_loop_down) C(not_loop_down:) // Input in %o0,%o1 #if STANDARD_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sub %o0,8,%o0 1: ldx [%o0],%o2 subcc %o1,1,%o1 xnor %g0,%o2,%o2 stx %o2,[%o0] bne,pt %xcc,1b _ sub %o0,8,%o0 2: retl _ nop #endif #if COUNTER_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sllx %o1,3,%o1 // %o1 = 8*count sub %o0,%o1,%o0 // %o0 = &destptr[-count] 1: subcc %o1,8,%o1 // Zähler erniedrigen, Pointer erniedrigen ldx [%o0+%o1],%o2 // nächstes Digit holen xnor %g0,%o2,%o2 bne,pt %xcc,1b _ stx %o2,[%o0+%o1] // Digit ablegen 2: retl _ nop #endif // extern boolean and_test_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(and_test_loop_down) C(and_test_loop_down:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,4f _ sub %o0,8,%o0 1: ldx [%o0],%o3 sub %o1,8,%o1 ldx [%o1],%o4 subcc %o2,1,%o2 be,pn %xcc,3f _ andcc %o3,%o4,%g0 be,pt %xcc,1b _ sub %o0,8,%o0 2: retl _ mov 1,%o0 3: bne 2b _ nop 4: retl _ mov 0,%o0 #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count sllx %o2,3,%o2 // %o2 = 8*count sub %o0,%o2,%o0 // %o0 = &xptr[-count] sub %o1,%o2,%o1 // %o1 = &yptr[-count] subcc %o2,8,%o2 bcs,pn %xcc,2f _ nop ldx [%o0+%o2],%o3 // nächstes Digit holen 1: ldx [%o1+%o2],%o4 // noch ein Digit holen andcc %o3,%o4,%g0 // beide verknüpfen bne,pn %xcc,3f _ subcc %o2,8,%o2 // Zähler erniedrigen, Pointer erniedrigen bcc,a,pt %xcc,1b __ ldx [%o0+%o2],%o3 // nächstes Digit holen 2: retl _ mov 0,%o0 3: retl _ mov 1,%o0 #endif // extern cl_signean compare_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(compare_loop_down) C(compare_loop_down:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ nop 1: ldx [%o0-8],%o3 ldx [%o1-8],%o4 subcc %o3,%o4,%g0 bne,pn %xcc,3f _ sub %o0,8,%o0 subcc %o2,1,%o2 bne,pn %xcc,1b _ sub %o1,8,%o1 2: retl _ mov 0,%o0 3: mov 1,%o0 movlu %xcc,-1,%o0 retl _ sra %o0,0,%o0 // sign-extend %o0 #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count sllx %o2,3,%o2 // %o2 = 8*count sub %o0,%o2,%o0 // %o0 = &xptr[-count] sub %o1,%o2,%o1 // %o1 = &yptr[-count] subcc %o2,8,%o2 bcs,pn %xcc,4f _ nop ldx [%o0+%o2],%o3 // nächstes Digit holen 1: ldx [%o1+%o2],%o4 // noch ein Digit holen subcc %o2,8,%o2 // Zähler erniedrigen, Pointer erniedrigen bcs,pn %xcc,3f _ subcc %o3,%o4,%g0 // vergleichen be,a,pt %xcc,1b __ ldx [%o0+%o2],%o3 // nächstes Digit holen 2: mov 1,%o0 movlu %xcc,-1,%o0 retl _ sra %o0,0,%o0 // sign-extend %o0 3: bne 2b _ nop 4: retl _ mov 0,%o0 #endif // extern uintD add_loop_up (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); DECLARE_FUNCTION(add_loop_up) C(add_loop_up:) // Input in %o0,%o1,%o2,%o3, verändert %g1, Output in %o0 #if STANDARD_LOOPS // srl %o3,0,%o3 // zero-extend %o3 = count brz,pn %o3,2f _ mov %g0,%g1 // Carry := 0 1: ldx [%o0],%o4 // source1-digit add %o0,8,%o0 ldx [%o1],%o5 // source2-digit add %o1,8,%o1 addcc %o4,%g1,%o4 movcc %xcc,0,%g1 // %g1|%o4 := %o4 + alter Carry %g1 addcc %o4,%o5,%o4 movcs %xcc,1,%g1 // %g1|%o4 := %o4 + alter Carry %g1 + %o5 stx %o4,[%o2] // Digit ablegen subcc %o3,1,%o3 bne,pt %xcc,1b _ add %o2,8,%o2 2: retl _ mov %g1,%o0 #endif #if COUNTER_LOOPS // srl %o3,0,%o3 // zero-extend %o3 = count brz,pn %o3,2f _ mov %g0,%g1 // Carry := 0 sub %g0,%o3,%o3 // %o3 = -count sllx %o3,3,%o3 // %o3 = -8*count sub %o2,8,%o2 sub %o0,%o3,%o0 // %o0 = &sourceptr1[count] sub %o1,%o3,%o1 // %o1 = &sourceptr2[count] sub %o2,%o3,%o2 // %o2 = &destptr[count-1] 1: ldx [%o0+%o3],%o4 // source1-digit ldx [%o1+%o3],%o5 // source2-digit addcc %o4,%g1,%o4 movcc %xcc,0,%g1 // %g1|%o4 := %o4 + alter Carry %g1 addcc %o4,%o5,%o4 movcs %xcc,1,%g1 // %g1|%o4 := %o4 + alter Carry %g1 + %o5 addcc %o3,8,%o3 // Zähler erniedrigen, Pointer erhöhen bne,pt %xcc,1b _ stx %o4,[%o2+%o3] // Digit ablegen 2: retl _ mov %g1,%o0 #endif // extern uintD addto_loop_up (uintD* sourceptr, uintD* destptr, uintC count); DECLARE_FUNCTION(addto_loop_up) C(addto_loop_up:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ mov %g0,%o5 // Carry := 0 1: ldx [%o0],%o3 // source-digit add %o0,8,%o0 ldx [%o1],%o4 // dest-digit addcc %o3,%o5,%o3 movcc %xcc,0,%o5 // %o5|%o3 := %o3 + alter Carry %o5 addcc %o3,%o4,%o4 movcs %xcc,1,%o5 // %o5|%o4 := %o3 + alter Carry %o5 + %o4 stx %o4,[%o1] // Digit ablegen subcc %o2,1,%o2 bne,pt %xcc,1b _ add %o1,8,%o1 2: retl _ mov %o5,%o0 #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ mov %g0,%o5 // Carry := 0 sub %g0,%o2,%o2 // %o2 = -count sllx %o2,3,%o2 // %o2 = -8*count sub %o0,%o2,%o0 // %o0 = &sourceptr[count] sub %o1,%o2,%o1 // %o1 = &destptr[count] ldx [%o0+%o2],%o3 // source-digit 1: ldx [%o1+%o2],%o4 // dest-digit addcc %o3,%o5,%o3 movcc %xcc,0,%o5 // %o5|%o3 := %o3 + alter Carry %o5 addcc %o3,%o4,%o4 movcs %xcc,1,%o5 // %o5|%o4 := %o3 + alter Carry %o5 + %o4 stx %o4,[%o1+%o2] // Digit ablegen addcc %o2,8,%o2 // Zähler erniedrigen, Pointer erhöhen bne,a,pt %xcc,1b __ ldx [%o0+%o2],%o3 // source-digit 2: retl _ mov %o5,%o0 #endif // extern uintD inc_loop_up (uintD* ptr, uintC count); DECLARE_FUNCTION(inc_loop_up) C(inc_loop_up:) // Input in %o0,%o1, Output in %o0 #if STANDARD_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ nop ldx [%o0],%o2 1: add %o0,8,%o0 addcc %o2,1,%o2 bne,pn %xcc,3f _ stx %o2,[%o0-8] subcc %o1,1,%o1 bne,a,pt %xcc,1b __ ldx [%o0],%o2 2: retl _ mov 1,%o0 3: retl _ mov 0,%o0 #endif #if COUNTER_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sub %g0,%o1,%o1 // %o1 = -count sllx %o1,3,%o1 // %o1 = -8*count sub %o0,%o1,%o0 // %o0 = &ptr[count] ldx [%o0+%o1],%o2 // digit holen 1: addcc %o2,1,%o2 // incrementieren bne,pn %xcc,3f _ stx %o2,[%o0+%o1] // ablegen addcc %o1,8,%o1 // Zähler erniedrigen, Pointer erhöhen bne,a,pt %xcc,1b __ ldx [%o0+%o1],%o2 2: retl _ mov 1,%o0 3: retl _ mov 0,%o0 #endif // extern uintD sub_loop_up (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); DECLARE_FUNCTION(sub_loop_up) C(sub_loop_up:) // Input in %o0,%o1,%o2,%o3, verändert %g1, Output in %o0 #if STANDARD_LOOPS // srl %o3,0,%o3 // zero-extend %o3 = count brz,pn %o3,2f _ mov %g0,%g1 // Carry := 0 1: ldx [%o0],%o4 // source1-digit add %o0,8,%o0 ldx [%o1],%o5 // source2-digit add %o1,8,%o1 addcc %o5,%g1,%o5 movcc %xcc,0,%g1 // %g1|%o5 := %o5 + alter Carry %g1 subcc %o4,%o5,%o4 movcs %xcc,1,%g1 // %o4-2^64*%g1 := %o4 - %o5 - alter Carry %g1 stx %o4,[%o2] // Digit ablegen subcc %o3,1,%o3 bne,pt %xcc,1b _ add %o2,8,%o2 2: retl _ mov %g1,%o0 #endif #if COUNTER_LOOPS // srl %o3,0,%o3 // zero-extend %o3 = count brz,pn %o3,2f _ mov %g0,%g1 // Carry := 0 sub %g0,%o3,%o3 // %o3 = -count sllx %o3,3,%o3 // %o3 = -8*count sub %o2,8,%o2 sub %o0,%o3,%o0 // %o0 = &sourceptr1[count] sub %o1,%o3,%o1 // %o1 = &sourceptr2[count] sub %o2,%o3,%o2 // %o2 = &destptr[count-1] 1: ldx [%o1+%o3],%o5 // source2-digit ldx [%o0+%o3],%o4 // source1-digit addcc %o5,%g1,%o5 movcc %xcc,0,%g1 // %g1|%o5 := %o5 + alter Carry %g1 subcc %o4,%o5,%o4 movcs %xcc,1,%g1 // %o4-2^64*%g1 := %o4 - %o5 - alter Carry %g1 addcc %o3,8,%o3 bne,pt %xcc,1b _ stx %o4,[%o2+%o3] // Digit ablegen 2: retl _ mov %g1,%o0 #endif // extern uintD subx_loop_up (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count, uintD carry); DECLARE_FUNCTION(subx_loop_up) C(subx_loop_up:) // Input in %o0,%o1,%o2,%o3,%o4, verändert %g1, Output in %o0 #if STANDARD_LOOPS // srl %o3,0,%o3 // zero-extend %o3 = count brz,pn %o3,2f _ mov %o4,%g1 // Carry (0 oder -1) 1: ldx [%o0],%o4 // source1-digit add %o0,8,%o0 ldx [%o1],%o5 // source2-digit add %o1,8,%o1 subcc %o5,%g1,%o5 movcc %xcc,0,%g1 // %o5-2^64*%g1 := %o5 - alter Carry %g1 subcc %o4,%o5,%o4 movcs %xcc,-1,%g1 // %o4+2^64*%g1 := %o4 - %o5 + alter Carry %g1 stx %o4,[%o2] // Digit ablegen subcc %o3,1,%o3 bne,pt %xcc,1b _ add %o2,8,%o2 2: retl _ mov %g1,%o0 #endif #if COUNTER_LOOPS // srl %o3,0,%o3 // zero-extend %o3 = count brz,pn %o3,2f _ mov %o4,%g1 // Carry (0 oder -1) sub %g0,%o3,%o3 // %o3 = -count sllx %o3,3,%o3 // %o3 = -8*count sub %o2,8,%o2 sub %o0,%o3,%o0 // %o0 = &sourceptr1[count] sub %o1,%o3,%o1 // %o1 = &sourceptr2[count] sub %o2,%o3,%o2 // %o2 = &destptr[count-1] 1: ldx [%o1+%o3],%o5 // source2-digit ldx [%o0+%o3],%o4 // source1-digit subcc %o5,%g1,%o5 movcc %xcc,0,%g1 // %o5-2^64*%g1 := %o5 - alter Carry %g1 subcc %o4,%o5,%o4 movcs %xcc,-1,%g1 // %o4+2^64*%g1 := %o4 - %o5 + alter Carry %g1 addcc %o3,8,%o3 bne,pt %xcc,1b _ stx %o4,[%o2+%o3] // Digit ablegen 2: retl _ mov %g1,%o0 #endif // extern uintD subfrom_loop_up (uintD* sourceptr, uintD* destptr, uintC count); DECLARE_FUNCTION(subfrom_loop_up) C(subfrom_loop_up:) // Input in %o0,%o1,%o2, Output in %o0 #if STANDARD_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ mov %g0,%o5 // Carry := 0 1: ldx [%o0],%o3 // source-digit add %o0,8,%o0 ldx [%o1],%o4 // dest-digit addcc %o3,%o5,%o3 movcc %xcc,0,%o5 // %o5|%o3 := %o3 + alter Carry %o5 subcc %o4,%o3,%o4 movcs %xcc,1,%o5 // %o4-2^64*%o5 := %o4 - %o3 - alter Carry %o5 stx %o4,[%o1] // Digit ablegen subcc %o2,1,%o2 bne,pt %xcc,1b _ add %o1,8,%o1 2: retl _ mov %o5,%o0 #endif #if COUNTER_LOOPS // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ mov %g0,%o5 // Carry := 0 sub %g0,%o2,%o2 // %o2 = -count sllx %o2,3,%o2 // %o2 = -8*count sub %o0,%o2,%o0 // %o0 = &sourceptr[count] sub %o1,%o2,%o1 // %o1 = &destptr[count] ldx [%o0+%o2],%o3 // source-digit 1: ldx [%o1+%o2],%o4 // dest-digit addcc %o3,%o5,%o3 movcc %xcc,0,%o5 // %o5|%o3 := %o3 + alter Carry %o5 subcc %o4,%o3,%o4 movcs %xcc,1,%o5 // %o4-2^64*%o5 := %o4 - %o3 - alter Carry %o5 stx %o4,[%o1+%o2] // Digit ablegen addcc %o2,8,%o2 bne,a,pt %xcc,1b __ ldx [%o0+%o2],%o3 // source-digit 2: retl _ mov %o5,%o0 #endif // extern uintD dec_loop_up (uintD* ptr, uintC count); DECLARE_FUNCTION(dec_loop_up) C(dec_loop_up:) // Input in %o0,%o1, Output in %o0 #if STANDARD_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ nop ldx [%o0],%o2 1: add %o0,8,%o0 subcc %o2,1,%o2 bcc,pn %xcc,3f _ stx %o2,[%o0-8] subcc %o1,1,%o1 bne,a,pt %xcc,1b __ ldx [%o0],%o2 2: retl _ mov -1,%o0 3: retl _ mov 0,%o0 #endif #if COUNTER_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sub %g0,%o1,%o1 // %o1 = -count sllx %o1,3,%o1 // %o1 = -8*count sub %o0,%o1,%o0 // %o0 = &ptr[count] ldx [%o0+%o1],%o2 // digit holen 1: subcc %o2,1,%o2 // decrementieren bcc,pn %xcc,3f _ stx %o2,[%o0+%o1] // ablegen addcc %o1,8,%o1 // Zähler erniedrigen, Pointer erhöhen bne,a,pt %xcc,1b __ ldx [%o0+%o1],%o2 2: retl _ mov -1,%o0 3: retl _ mov 0,%o0 #endif // extern uintD neg_loop_up (uintD* ptr, uintC count); DECLARE_FUNCTION(neg_loop_up) C(neg_loop_up:) // Input in %o0,%o1, Output in %o0 #if STANDARD_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count // erstes Digit /=0 suchen: brz,pn %o1,2f _ add %o0,8,%o0 1: ldx [%o0-8],%o2 subcc %g0,%o2,%o2 bne,pn %xcc,3f _ subcc %o1,1,%o1 bne,pt %xcc,1b _ add %o0,8,%o0 2: retl _ mov 0,%o0 3: // erstes Digit /=0 gefunden, ab jetzt gibt's Carrys // 1 Digit negieren, alle anderen Digits invertieren: be,pn %xcc,5f _ stx %o2,[%o0-8] 4: ldx [%o0],%o2 subcc %o1,1,%o1 xnor %g0,%o2,%o2 stx %o2,[%o0] bne,pt %xcc,4b _ add %o0,8,%o0 5: retl _ mov -1,%o0 #endif #if COUNTER_LOOPS // srl %o1,0,%o1 // zero-extend %o1 = count // erstes Digit /=0 suchen: brz,pn %o1,2f _ sub %g0,%o1,%o1 // %o1 = -count sllx %o1,3,%o1 // %o1 = -8*count sub %o0,%o1,%o0 // %o0 = &ptr[count] ldx [%o0+%o1],%o2 // digit holen 1: subcc %g0,%o2,%o2 // negieren, testen bne,pn %xcc,3f _ addcc %o1,8,%o1 // Zähler erniedrigen, Pointer erhöhen bne,a,pt %xcc,1b __ ldx [%o0+%o1],%o2 2: retl _ mov 0,%o0 3: // erstes Digit /=0 gefunden, ab jetzt gibt's Carrys // alle anderen Digits invertieren: sub %o1,8,%o1 stx %o2,[%o0+%o1] // ablegen addcc %o1,8,%o1 be,pn %xcc,5f _ nop ldx [%o0+%o1],%o2 4: xnor %g0,%o2,%o2 stx %o2,[%o0+%o1] addcc %o1,8,%o1 bne,a,pt %xcc,4b __ ldx [%o0+%o1],%o2 5: retl _ mov -1,%o0 #endif // extern uintD shift1left_loop_up (uintD* ptr, uintC count); DECLARE_FUNCTION(shift1left_loop_up) C(shift1left_loop_up:) // Input in %o0,%o1, Output in %o0 // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ mov 0,%o3 // Carry := 0 1: ldx [%o0],%o2 // Digit addcc %o2,%o2,%o4 // shiften add %o4,%o3,%o4 // und carry srlx %o2,63,%o3 // neues Carry stx %o4,[%o0] // Digit ablegen subcc %o1,1,%o1 bne,pt %xcc,1b _ add %o0,8,%o0 2: retl _ mov %o3,%o0 // extern uintD shiftleft_loop_up (uintD* ptr, uintC count, uintC i, uintD carry); DECLARE_FUNCTION(shiftleft_loop_up) C(shiftleft_loop_up:) // Input in %o0,%o1,%o2,%o3, verändert %g1, Output in %o0 // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sub %g0,%o2,%g1 // 64-i (mod 64) 1: ldx [%o0],%o4 // Digit subcc %o1,1,%o1 sllx %o4,%o2,%o5 // dessen niedere (64-i) Bits or %o3,%o5,%o5 // mit dem alten Carry kombinieren stx %o5,[%o0] // Digit ablegen srlx %o4,%g1,%o3 // dessen höchste i Bits liefern den neuen Carry bne,pt %xcc,1b _ add %o0,8,%o0 2: retl _ mov %o3,%o0 #endif // extern uintD shiftleftcopy_loop_up (uintD* sourceptr, uintD* destptr, uintC count, uintC i); DECLARE_FUNCTION(shiftleftcopy_loop_up) C(shiftleftcopy_loop_up:) // Input in %o0,%o1,%o2,%o3, verändert %g1,%g2, Output in %o0 // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ mov 0,%o4 // Carry := 0 sub %g0,%o3,%g1 // 64-i (mod 64) 1: ldx [%o0],%o5 // Digit subcc %o2,1,%o2 sllx %o5,%o3,%g2 // dessen niedere (64-i) Bits or %o4,%g2,%g2 // mit dem alten Carry kombinieren stx %g2,[%o1] // Digit ablegen add %o1,8,%o1 srlx %o5,%g1,%o4 // dessen höchste i Bits liefern den neuen Carry bne,pt %xcc,1b _ add %o0,8,%o0 2: retl _ mov %o4,%o0 #if !CL_DS_BIG_ENDIAN_P // extern uintD shift1right_loop_down (uintD* ptr, uintC count, uintD carry); DECLARE_FUNCTION(shift1right_loop_down) C(shift1right_loop_down:) // Input in %o0,%o1,%o2, Output in %o0 // srl %o1,0,%o1 // zero-extend %o1 = count brz,pn %o1,2f _ sllx %o2,63,%o2 // Carry sub %o0,8,%o0 1: ldx [%o0],%o3 // Digit subcc %o1,1,%o1 srlx %o3,1,%o4 // shiften or %o2,%o4,%o4 // und mit altem Carry kombinieren stx %o4,[%o0] // und ablegen sllx %o3,63,%o2 // neuer Carry bne,pt %xcc,1b _ sub %o0,8,%o0 2: retl _ mov %o2,%o0 // extern uintD shiftright_loop_down (uintD* ptr, uintC count, uintC i); DECLARE_FUNCTION(shiftright_loop_down) C(shiftright_loop_down:) // Input in %o0,%o1,%o2, verändert %g1, Output in %o0 // srl %o1,0,%o1 // zero-extend %o1 = count sub %g0,%o2,%g1 // 64-i (mod 64) brz,pn %o1,2f _ or %g0,%g0,%o3 // Carry := 0 sub %o0,8,%o0 1: ldx [%o0],%o4 // Digit subcc %o1,1,%o1 srlx %o4,%o2,%o5 // shiften or %o3,%o5,%o5 // und mit altem Carry kombinieren stx %o5,[%o0] // und ablegen sllx %o4,%g1,%o3 // neuer Carry bne,pt %xcc,1b _ sub %o0,8,%o0 2: retl _ mov %o3,%o0 // extern uintD shiftrightsigned_loop_down (uintD* ptr, uintC count, uintC i); DECLARE_FUNCTION(shiftrightsigned_loop_down) C(shiftrightsigned_loop_down:) // Input in %o0,%o1,%o2, verändert %g1, Output in %o0 // srl %o1,0,%o1 // zero-extend %o1 = count ldx [%o0-8],%o4 // erstes Digit sub %g0,%o2,%g1 // 64-i (mod 64) srax %o4,%o2,%o5 // shiften stx %o5,[%o0-8] // und ablegen sllx %o4,%g1,%o3 // neuer Carry subcc %o1,1,%o1 be,pn %xcc,2f _ sub %o0,16,%o0 1: ldx [%o0],%o4 // Digit subcc %o1,1,%o1 srlx %o4,%o2,%o5 // shiften or %o3,%o5,%o5 // und mit altem Carry kombinieren stx %o5,[%o0] // und ablegen sllx %o4,%g1,%o3 // neuer Carry bne,pt %xcc,1b _ sub %o0,8,%o0 2: retl _ mov %o3,%o0 // extern uintD shiftrightcopy_loop_down (uintD* sourceptr, uintD* destptr, uintC count, uintC i, uintD carry); DECLARE_FUNCTION(shiftrightcopy_loop_down) C(shiftrightcopy_loop_down:) // Input in %o0,%o1,%o2,%o3,%o4, verändert %g1,%g2, Output in %o0 // srl %o2,0,%o2 // zero-extend %o2 = count sub %g0,%o3,%g1 // 64-i (mod 64) brz,pn %o2,2f _ sllx %o4,%g1,%g2 // erster Carry sub %o0,8,%o0 1: ldx [%o0],%o4 // Digit sub %o1,8,%o1 srlx %o4,%o3,%o5 // shiften or %g2,%o5,%o5 // und mit altem Carry kombinieren stx %o5,[%o1] // und ablegen sllx %o4,%g1,%g2 // neuer Carry subcc %o2,1,%o2 bne,pt %xcc,1b _ sub %o0,8,%o0 2: retl _ mov %g2,%o0 // extern uintD mulusmall_loop_up (uintD digit, uintD* ptr, uintC len, uintD newdigit); DECLARE_FUNCTION(mulusmall_loop_up) C(mulusmall_loop_up:) // Input in %o0,%o1,%o2,%o3, Output in %o0, verändert %g1 // srl %o2,0,%o2 // zero-extend %o2 = len brz,pn %o2,2f _ nop 1: // nächstes Digit [%o1] mit der 6-Bit-Zahl %o0 multiplizieren // und kleinen Carry %o3 dazu: ldx [%o1],%o4 sub %o2,1,%o2 srlx %o4,32,%o5 // high32(x) srl %o4,0,%o4 // low32(x) mulx %o4,%o0,%o4 // low32(x)*digit mulx %o5,%o0,%o5 // high32(x)*digit sllx %o5,32,%g1 // low32(high32(x)*digit)*2^32 add %g1,%o3,%g1 // plus carry addcc %o4,%g1,%o4 // plus low32(x)*digit srlx %o5,32,%o3 // high32(high32(x)*digit) add %o3,1,%g1 movcs %xcc,%g1,%o3 // neuer Carry stx %o4,[%o1] // neues Digit ablegen brnz,pt %o2,1b _ add %o1,8,%o1 2: retl _ mov %o3,%o0 // extern void mulu_loop_up (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); DECLARE_FUNCTION(mulu_loop_up) C(mulu_loop_up:) // Input in %i0,%i1,%i2,%i3 save %sp,-192,%sp mov 0,%l0 // Carry srlx %i0,32,%l1 // %l1 = high32(digit) srl %i0,0,%l2 // %l2 = low32(digit) mov 1,%l3 sllx %l3,32,%l3 // %l3 = 2^32 sub %i1,%i2,%i1 // %i1 = sourceptr - destptr 1: ldx [%i1+%i2],%o0 // nächstes Digit subcc %i3,1,%i3 // mit digit multiplizieren: (%l1*2^32+%l2) * %o0 + %l0 -> %l0|%o0 srlx %o0,32,%o1 srl %o0,0,%o2 mulx %l1,%o1,%o3 // high part mulx %l1,%o2,%o4 // first mid part mulx %l2,%o1,%o1 // second mid part mulx %l2,%o2,%o2 // low part srlx %o2,32,%o5 // low part's upper half add %o4,%o5,%o4 // add to one of the mid parts, no carry addcc %o4,%o1,%o4 // add other mid part add %o3,%l3,%o5 movcs %xcc,%o5,%o3 // if carry, add 2^32 to the high part srlx %o4,32,%o5 sllx %o4,32,%o4 srl %o2,0,%o2 add %o2,%o4,%o0 // combine low32(midparts) and low32(lowpart) addcc %o0,%l0,%o0 // alten Carry addieren add %o3,%o5,%l0 // add high32(midparts) to high part add %l0,1,%o5 movcs %xcc,%o5,%l0 // neuer Carry // Multiplikation fertig stx %o0,[%i2] // Low-Digit ablegen brnz,pt %i3,1b _ add %i2,8,%i2 stx %l0,[%i2] // letzten Carry ablegen ret _ restore // extern uintD muluadd_loop_up (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); DECLARE_FUNCTION(muluadd_loop_up) C(muluadd_loop_up:) // Input in %i0,%i1,%i2,%i3, Output in %i0 save %sp,-192,%sp mov 0,%l0 // Carry srlx %i0,32,%l1 // %l1 = high32(digit) srl %i0,0,%l2 // %l2 = low32(digit) mov 1,%l3 sllx %l3,32,%l3 // %l3 = 2^32 sub %i1,%i2,%i1 // %i1 = sourceptr - destptr 1: ldx [%i1+%i2],%o0 // nächstes Digit ldx [%i2],%i4 // *destptr subcc %i3,1,%i3 // mit digit multiplizieren: (%l1*2^32+%l2) * %o0 + %l0 -> %l0|%o0 srlx %o0,32,%o1 srl %o0,0,%o2 mulx %l1,%o1,%o3 // high part mulx %l1,%o2,%o4 // first mid part mulx %l2,%o1,%o1 // second mid part mulx %l2,%o2,%o2 // low part srlx %o2,32,%o5 // low part's upper half add %o4,%o5,%o4 // add to one of the mid parts, no carry addcc %o4,%o1,%o4 // add other mid part add %o3,%l3,%o5 movcs %xcc,%o5,%o3 // if carry, add 2^32 to the high part srlx %o4,32,%o5 sllx %o4,32,%o4 srl %o2,0,%o2 add %o2,%o4,%o0 // combine low32(midparts) and low32(lowpart) addcc %o0,%l0,%o0 // alten Carry addieren add %o3,%o5,%l0 // add high32(midparts) to high part add %l0,1,%o5 movcs %xcc,%o5,%l0 // neuer Carry // Multiplikation fertig addcc %i4,%o0,%o0 // alten *destptr addieren add %l0,1,%o2 movcs %xcc,%o2,%l0 // neuer Carry stx %o0,[%i2] // Low-Digit ablegen brnz,pt %i3,1b _ add %i2,8,%i2 mov %l0,%i0 // letzter Carry ret _ restore // extern uintD mulusub_loop_up (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); DECLARE_FUNCTION(mulusub_loop_up) C(mulusub_loop_up:) // Input in %i0,%i1,%i2,%i3, Output in %i0 save %sp,-192,%sp mov 0,%l0 // Carry srlx %i0,32,%l1 // %l1 = high32(digit) srl %i0,0,%l2 // %l2 = low32(digit) mov 1,%l3 sllx %l3,32,%l3 // %l3 = 2^32 sub %i1,%i2,%i1 // %i1 = sourceptr - destptr 1: ldx [%i1+%i2],%o0 // nächstes Digit ldx [%i2],%i4 // *destptr subcc %i3,1,%i3 // mit digit multiplizieren: (%l1*2^32+%l2) * %o0 + %l0 -> %l0|%o0 srlx %o0,32,%o1 srl %o0,0,%o2 mulx %l1,%o1,%o3 // high part mulx %l1,%o2,%o4 // first mid part mulx %l2,%o1,%o1 // second mid part mulx %l2,%o2,%o2 // low part srlx %o2,32,%o5 // low part's upper half add %o4,%o5,%o4 // add to one of the mid parts, no carry addcc %o4,%o1,%o4 // add other mid part add %o3,%l3,%o5 movcs %xcc,%o5,%o3 // if carry, add 2^32 to the high part srlx %o4,32,%o5 sllx %o4,32,%o4 srl %o2,0,%o2 add %o2,%o4,%o0 // combine low32(midparts) and low32(lowpart) addcc %o0,%l0,%o0 // alten Carry addieren add %o3,%o5,%l0 // add high32(midparts) to high part add %l0,1,%o5 movcs %xcc,%o5,%l0 // neuer Carry // Multiplikation fertig subcc %i4,%o0,%o0 // vom alten *destptr subtrahieren add %l0,1,%o2 movcs %xcc,%o2,%l0 // neuer Carry stx %o0,[%i2] // Low-Digit ablegen brnz,pt %i3,1b _ add %i2,8,%i2 mov %l0,%i0 // letzter Carry ret _ restore #endif // extern void shiftxor_loop_up (uintD* xptr, const uintD* yptr, uintC count, uintC i); DECLARE_FUNCTION(shiftxor_loop_up) C(shiftxor_loop_up:) // Input in %o0,%o1,%o2,%o3, verändert %g1,%g2 // srl %o2,0,%o2 // zero-extend %o2 = count brz,pn %o2,2f _ sub %g0,%o3,%g1 // 64-i (mod 64) sub %o1,%o0,%o1 ldx [%o0],%o4 // *xptr holen 1: ldx [%o0+%o1],%o5 // *yptr holen subcc %o2,1,%o2 sllx %o5,%o3,%g2 // dessen niedere (64-i) Bits xor %o4,%g2,%o4 // mit dem modifizierten *xptr kombinieren stx %o4,[%o0] // und ablegen add %o0,8,%o0 srlx %o5,%g1,%g2 // höchste i Bits von *yptr ldx [%o0],%o4 // schon mal mit dem nächsten *xptr bne,pt %xcc,1b _ xor %o4,%g2,%o4 // verknüpfen stx %o4,[%o0] // und ablegen 2: retl _ nop cln-1.3.3/src/base/digitseq/cl_DS_mul_fftcs.h0000644000000000000000000012561311201634736015704 0ustar // Fast integer multiplication using FFT over the complex numbers, // exploiting symmetry. // [Donald Ervin Knuth: The Art of Computer Programming, Vol. II: // Seminumerical Algorithms, second edition. Section 4.3.3, p. 290-294.] // Bruno Haible 6.5.1996, 24.-25.8.1996, 31.8.1996 // FFT in the complex domain has the drawback that it needs careful round-off // error analysis. But for CPUs with good floating-point performance it might // nevertheless be better than FFT mod Z/mZ. // The usual FFT(2^n) computes the values of a polynomial p(z) mod (z^(2^n)-1) // at the (2^n)-th roots of unity. For our purposes, we start out with // polynomials with real coefficients. So the values at z_j = exp(2 pi i j/N) // and z_-j = exp(- 2 pi i j/N) will be complex conjugates of each other, // which means that there exists a polynomial r(z) of degree <= 1 with real // coefficients such that p(z_j) = r(z_j) and p(z_-j) = r(z_-j). This // implies that r(z) is the remainder of p(z) divided by // (z - z_j) (z - z_-j) = (z^2 - 2 cos(2 pi j/N) z + 1). // // Based on this insight, we replace the usual n FFT steps // for m = n...0: // (z^(2^n)-1) = prod(j=0..2^(n-m)-1, (z^(2^m) - exp(2 pi j/2^(n-m)))) // by // for m = n...1: // (z^(2^n)-1) = (z^(2^m)-1) * prod(j=1..2^(n-m)-1, factor_m[j](z)) // where // factor_m[j](z) = prod(k mod 2^n with k == j or k == -j mod 2^(n-m+1), // (z - exp(2 pi i k/N)) ) // = prod(k=0..2^(m-1)-1, // (z - exp(2 pi i (j+2^(n-m+1)k)/N)) // (z - exp(- 2 pi i (j+2^(n-m+1)k)/N)) ) // = (z^(2^(m-1)) - exp(2 pi i j 2^(m-1)/N)) // (z^(2^(m-1)) - exp(- 2 pi i j 2^(m-1)/N)) // = (z^(2^(m-1)) - exp(2 pi i j/2^(n-m+1))) // (z^(2^(m-1)) - exp(- 2 pi i j/2^(n-m+1))) // = (z^(2^m) - 2 cos(2 pi j/2^(n-m+1)) z^(2^(m-1)) + 1). // The factors and the input are real polynomials, hence all intermediate // and final remainders will be real as well. // // However, instead of storing // p(z) mod (z^(2^m) - 2 cos(2 pi j/2^(n-m+1)) z^(2^(m-1)) + 1), // we compute and store // realpart and imagpart of p(z) mod (z^(2^(m-1)) - exp(2 pi i j 2^(m-1)/N)). // This way, the round-off error estimates are better because we don't have // to multiply with numbers > 1, and because during the final reverse FFT, we // don't have to divide by numbers around 2^(-n). // // The usual FFT algorithm // Input: polynomial p in x[0..2^n-1]. // for l = n-1..0: // step m=l+1 -> m=l // for s in {0,..,2^(n-1-l)-1}: // exp := bit_reverse(n-1-l,s)*2^l, // // chinese remainder algorithm for (z^(2^(l+1)) - w^(2*exp)) = // // = (z^(2^l) - w^exp) * (z^(2^l) - w^(exp+2^(n-1))). // for t in {0,..,2^l-1}: // i1 := s*2^(l+1) + t, i2 := s*2^(l+1) + 2^l + t, // replace (x[i1],x[i2]) by (x[i1] + w^exp*x[i2], x[i1] - w^exp*x[i2]) // Invariant: // for m = n..0: // for j in {0..2^(n-m)-1}: // p(z) mod (z^(2^m) - exp(2 pi i j/2^(n-m))) // in x[bit_reverse(n-m,j)*2^m .. bit_reverse(n-m,j)*2^m+2^m-1]. // Output: p(z_j) in x[bit_reverse(n,j)]. // is thus replaced by the algorithm // Input: polynomial p in x[0..2^n-1]. // for l = n-1..1: // step m=l+1 -> m=l // for s in {0}: // // chinese remainder algorithm for // // (z^(2^(l+1)) - 1) = (z^(2^l) - 1) * (z^(2^l) + 1). // for t in {0,..,2^l-1}: // i1 := t, i2 := 2^l + t, // replace (x[i1],x[i2]) by (x[i1] + x[i2], x[i1] - x[i2]) // // chinese remainder algorithm for // // (z^(2^l) + 1) = (z^(2^(l-1)) - i) * (z^(2^(l-1)) + i). // // Nothing to do because of // // a[0]z^0+...+a[2^l-1]z^(2^l-1) mod (z^(2^(l-1)) - i) // // = (a[0]z^0+...+a[2^(l-1)-1]z^(2^(l-1)-1)) // // + i*(a[2^(l-1)]z^0+...+a[2^l-1]z^(2^(l-1)-1)) // // and because of the way we store the real parts and imaginary parts. // for s in {1,..,2^(n-1-l)-1}: // exp := shuffle(n-1-l,s)*2^(l-1), // // chinese remainder algorithm for // // (z^(2^l) - w^(2*exp)) // // = (z^(2^(l-1)) - w^exp) * conj(z^(2^(l-1)) - w^(2^(n-1)-exp)). // for t in {0,..,2^(l-1)-1}: // i1 := s*2^(l+1) + t, i2 := s*2^(l+1) + 2^(l-1) + t, // i3 := s*2^(l+1) + 2^l + t, i4 := s*2^(l+1) + 2^l + 2^(l-1) + t, // replace (x[i1],x[i2],x[i3],x[i4]) by // (x[i1] + x[i2]*Re(w^exp) - x[i4]*Im(w^exp), // x[i3] + x[i4]*Re(w^exp) + x[i2]*Im(w^exp), // x[i1] - x[i2]*Re(w^exp) + x[i4]*Im(w^exp), // -x[i3] + x[i4]*Re(w^exp) + x[i2]*Im(w^exp)) // Invariant: // for m = n..1: // p(z) mod (z^(2^m) - 1) in x[0..2^m-1], // for j in {1,..,2^(n-m)-1}: // p(z) mod (z^(2^(m-1)) - exp(2 pi i j/2^(n-m+1))) // in x[invshuffle(n-m,j)*2^m + (0 .. 2^(m-1)-1)] (realpart) // and x[invshuffle(n-m,j)*2^m+2^(m-1) + (0 .. 2^(m-1)-1)] (imagpart). // Output: p(z) mod (z^2 - 1) in x[0],x[1], // p(z) mod (z - exp(2 pi i j/2^n)) (0 < j < 2^(n-1)) // = x[2*invshuffle(n-1,j)] + i*x[2*invshuffle(n-1,j)+1], // p(z) mod (z - exp(- 2 pi i j/2^n)) (0 < j < 2^(n-1)) // = x[2*invshuffle(n-1,j)] - i*x[2*invshuffle(n-1,j)+1]. // // The shuffle function is defined like this: // shuffle(n,j) defined for n >= 0, 0 < j < 2^n, yields 0 < shuffle(n,j) < 2^n. // Definition by splitting off the least significant bit: // n = 0: void. // n > 0: shuffle(n,1) = 2^(n-1), // n > 0, 0 < j < 2^(n-1): shuffle(n,2*j) = shuffle(n-1,j), // n > 0, 0 < j < 2^(n-1): shuffle(n,2*j+1) = 2^n - shuffle(n-1,j). // Its inverse function is defined like this: // invshuffle(n,j) defined for n >= 0, 0 < j < 2^n, 0 < invshuffle(n,j) < 2^n. // Definition by splitting off the most significant bit: // n = 0: void. // n > 0, 0 < j < 2^(n-1): invshuffle(n,j) = invshuffle(n-1,j)*2, // n > 0, j = 2^(n-1): invshuffle(n,j) = 1, // n > 0, 2^(n-1) < j < 2^n: invshuffle(n,j) = invshuffle(n-1,2^n-j)*2+1. // Note that shuffle(n,.) and invshuffle(n,.) are _not_ the same permutation // for n>=4. // It is important to have precise round-off error estimates. Although // (by laws of statistics) in the average the actual round-off error makes up // only half of the bits provided for round-off protection, we cannot rely // on this average behaviour, but have to produce correct results. // // Knuth's formula (42), p. 294, says: // If we want to multiply l-bit words using an FFT(2^k), our floating point // numbers shall have m >= 2(k+l) + k + log_2 k + 3.5 mantissa bits. // // Here is a more careful analysis, using absolute error estimates. // // 1. We assume floating point numbers with radix 2, with the properties: // (i) Multiplication with 2^n and 2^-n is exact. // (ii) Negation x -> -x is exact. // (iii) Addition: When adding x and y, with |x| <= 2^a, |y| <= 2^a, // the result |x+y| <= 2^(a+1) has an error <= e*2^(a+1-m). // (iv) Multiplication: When multiplying x and y, with |x| <= 2^a, // |y| <= 2^b, the result |x*y| <= 2^(a+b) has an error <= e*2^(a+b-m). // Here e = 1 for a truncating arithmetic, but e = 1/2 for a rounding // arithmetic like IEEE single and double floats. // 2. Let's introduce some notation: err(x) means |x'-x| where x is the // exact mathematical value and x' is its representation in the machine. // 3. From 1. we get for real numbers x,y: // (i) err(2^n*x) = 2^n * err(x), // (ii) err(-x) = err(x), // (iii) |x| <= 2^a, |y| <= 2^a, then // err(x+y) <= err(x) + err(y) + e*2^(a+1-m), // [or .... ............... + e*2^(a-m) if |x+y| <= 2^a]. // (iv) |x| <= 2^a, |y| <= 2^b, then // err(x*y) <= 2^a * err(y) + 2^b * err(x) + e*2^(a+b-m). // 4. Our complex arithmetic will be based on the formulas: // (i) 2^n*(x+iy) = (2^n*x)+i(2^n*y) // (ii) -(x+iy) = (-x)+i(-y) // (iii) (x+iy)+(u+iv) = (x+u)+i(y+v) // (iv) (x+iy)*(u+iv) = (x*u-y*v)+i(x*v+y*u) // The notation err(z) means |z'-z|, as above, with |.| being the usual // absolute value on complex numbers (_not_ the L^1 norm). // 5. From 3. and 4. we get for complex numbers x,y: // (i) err(2^n*x) = 2^n * err(x), // (ii) err(-x) = err(x), // (iii) |x| <= 2^a, |y| <= 2^a, then // err(x+y) <= err(x) + err(y) + e*2^(a+3/2-m), // (iv) |x| <= 2^a, |y| <= 2^b, then // err(x*y) <= 2^a * err(y) + 2^b * err(x) + 3*e*2^(a+b+1/2-m). // 6. We start out with precomputed roots of unity: // |exp(2 pi i/2^n)| <= 1, // err(exp(2 pi i/2^n)) <= e*2^(1/2-m), (even err(..)=0 for n=0,1,2), // and compute exp(2 pi i * j/2^k) according to the binary digits of j. // This way, each root of unity will be a product of at most k precomputed // roots. If (j mod 2^(k-2)) has n bits, then exp(2 pi i * j/2^k) will // be computed using n factors, i.e. n-1 complex multiplications, and by // 5.iv. we'll have // err(exp(2 pi i * j/2^k)) <= n*e*2^(1/2-m) + max(n-1,0)*3*e*2^(1/2-m) // = max(4*n-3,0)*e*2^(1/2-m). // Hence the maximum roots-of-unity error is (set n=k-2) // err(w^j) <= (4*k-11)*e*2^(1/2-m), // and the average roots-of-unity error is (set n=(k-2)/2) // < 2*(k-2)*e*2^(1/2-m). // 7. Now we start the FFT. // Before the first step, x_i are integral, |x_i| < 2^l and err(x_i) = 0. // After the first butterfly, which replaces (x(i1),x(i2)) by // (x(i1) + x(i2), x(i1) - x(i2)), we have |x_i| < 2^(l+1) and err(x_i) = 0. // Then, for each of the remaining k-1 steps, a butterfly replaces // (x(i1),x(i2)) by (x(i1) + w^exp*x(i2), x(i1) - w^exp*x(i2)). Thus, // after n steps we have |x_i| < 2^(l+n) and err(x_i) <= E_i where // E_0 = 0, // E_1 = 0, // E_(n+1) = (E_n + 2^(l+n)*(4*k-11)*e*2^(1/2-m) + 3*e*2^(l+n+1/2-m)) // + E_n + e*2^(l+n+3/2-m) // = 2*E_n + (4*k-6)*e*2^(l+n+1/2-m) // hence E_n = (2^n-2)*(4*k-6)*e*2^(l+1/2-m). // Setting n = k, we have proved that after the FFT ends, we have // |x_i| < 2^(l+k) and err(x_i) <= (4*k-6)*e*2^(l+k+1/2-m). // 8. The same error analysis holds for the y_i and their FFT. After we // multiply z_i := x_i * y_i, we have // |z_i| < 2^(2*l+2*k) and err(z_i) <= (8*k-9)*e*2^(2*l+2*k+1/2-m). // 9. Then an inverse FFT on z_i is done, which is the same as an FFT // followed by a permutation and a division by 2^k. After n steps of // the FFT, we have |z_i| < 2^(2*l+2*k+n) and err(z_i) <= E_i where // E_0 = (8*k-9)*e*2^(2*l+2*k+1/2-m), // E_(n+1) = (E_n + 2^(2*l+2*k+n)*(4*k-11)*e*2^(1/2-m) // + 3*e*2^(2*l+2*k+n+1/2-m)) // + E_n + e*2^(2*l+2*k+n+3/2-m) // = 2*E_n + (4*k-6)*e*2^(2*l+2*k+n+1/2-m) // hence E_n = 2^n*(8*k-9)*e*2^(2*l+2*k+1/2-m) // + (2^n-1)*(4*k-6)*e*2^(2*l+2*k+1/2-m). // So, after the FFT, we have (set n=k) |z_i| < 2^(2*l+3*k) and // err(z_i) <= (12*k-15)*e*2^(2*l+3*k+1/2-m). // Permutation doesn't change the estimates. After division by 2^k, we get // |z_i| < 2^(2*l+2*k) and // err(z_i) <= (12*k-15)*e*2^(2*l+2*k+1/2-m). // 10. When converting the z_i back to integers, we know that z_i should be // real, integral, and |z_i| < 2^(2*l+k). We can only guarantee that we // can find the integral z_i from the floating-point computation if // (12*k-15)*e*2^(2*l+2*k+1/2-m) < 1/2. // 11. Assuming e = 1/2 and m = 53 (typical values for IEEE double arithmetic), // we get the constraint 2*l < m - 1/2 - 2*k - log_2(12*k-15). // k = 2 l <= 22 // k = 3 l <= 21 // k = 4 l <= 19 // k = 5 l <= 18 // k = 6 l <= 17 // k = 7 l <= 16 // k = 8 l <= 15 // k = 9 l <= 13 // k = 10 l <= 12 // k = 11 l <= 11 // k = 12 l <= 10 // k = 13 l <= 9 // k = 14 l <= 8 // k = 15 l <= 7 // k = 16 l <= 6 // k = 17 l <= 5 // k = 18 l <= 4 // k = 19 l <= 3 // k = 20 l <= 2 // Assuming e = 1/2 and m = 64 ("long double" arithmetic on i387/i486/i586), // we get the constraint 2*l < m - 1/2 - 2*k - log_2(12*k-15). // k = 2 l <= 28 // k = 3 l <= 26 // k = 4 l <= 25 // k = 5 l <= 24 // k = 6 l <= 22 // k = 7 l <= 21 // k = 8 l <= 20 // k = 9 l <= 19 // k = 10 l <= 18 // k = 11 l <= 17 // k = 12 l <= 16 // k = 13 l <= 15 // k = 14 l <= 14 // k = 15 l <= 13 // k = 16 l <= 12 // k = 17 l <= 10 // k = 18 l <= 9 // k = 19 l <= 8 // k = 20 l <= 7 // k = 21 l <= 6 // k = 22 l <= 5 // k = 23 l <= 4 // k = 24 l <= 3 // k = 25 l <= 2 #if !(intDsize==32) #error "complex symmetric fft implemented only for intDsize==32" #endif #include "cln/floatparam.h" #include "cln/exception.h" #if defined(HAVE_LONGDOUBLE) && (long_double_mant_bits > double_mant_bits) && (defined(__i386__) || defined(__m68k__) || (defined(__sparc__) && 0)) // Only these CPUs have fast "long double"s in hardware. // On SPARC, "long double"s are emulated in software and don't work. typedef long double fftcs_real; #define fftcs_real_mant_bits long_double_mant_bits #define fftcs_real_rounds long_double_rounds #else typedef double fftcs_real; #define fftcs_real_mant_bits double_mant_bits #define fftcs_real_rounds double_rounds #endif typedef struct fftcs_complex { fftcs_real re; fftcs_real im; } fftcs_complex; static const fftcs_complex fftcs_roots_of_1 [32+1] = // roots_of_1[n] is a (2^n)th root of unity in C. // Also roots_of_1[n-1] = roots_of_1[n]^2. // For simplicity we choose roots_of_1[n] = exp(2 pi i/2^n). { #if (fftcs_real_mant_bits == double_mant_bits) // These values have 64 bit precision. { 1.0, 0.0 }, { -1.0, 0.0 }, { 0.0, 1.0 }, { 0.7071067811865475244, 0.7071067811865475244 }, { 0.9238795325112867561, 0.38268343236508977172 }, { 0.9807852804032304491, 0.19509032201612826784 }, { 0.99518472667219688623, 0.098017140329560601996 }, { 0.9987954562051723927, 0.049067674327418014254 }, { 0.9996988186962042201, 0.024541228522912288032 }, { 0.99992470183914454094, 0.0122715382857199260795 }, { 0.99998117528260114264, 0.0061358846491544753597 }, { 0.9999952938095761715, 0.00306795676296597627 }, { 0.99999882345170190993, 0.0015339801862847656123 }, { 0.99999970586288221914, 7.6699031874270452695e-4 }, { 0.99999992646571785114, 3.8349518757139558907e-4 }, { 0.9999999816164292938, 1.9174759731070330744e-4 }, { 0.9999999954041073129, 9.5873799095977345874e-5 }, { 0.99999999885102682754, 4.793689960306688455e-5 }, { 0.99999999971275670683, 2.3968449808418218729e-5 }, { 0.9999999999281891767, 1.1984224905069706422e-5 }, { 0.99999999998204729416, 5.9921124526424278428e-6 }, { 0.99999999999551182357, 2.9960562263346607504e-6 }, { 0.99999999999887795586, 1.4980281131690112288e-6 }, { 0.999999999999719489, 7.4901405658471572114e-7 }, { 0.99999999999992987223, 3.7450702829238412391e-7 }, { 0.99999999999998246807, 1.8725351414619534487e-7 }, { 0.999999999999995617, 9.36267570730980828e-8 }, { 0.99999999999999890425, 4.6813378536549092695e-8 }, { 0.9999999999999997261, 2.340668926827455276e-8 }, { 0.99999999999999993153, 1.1703344634137277181e-8 }, { 0.99999999999999998287, 5.8516723170686386908e-9 }, { 0.9999999999999999957, 2.925836158534319358e-9 }, { 0.9999999999999999989, 1.4629180792671596806e-9 } #else (fftcs_real_mant_bits > double_mant_bits) // These values have 128 bit precision. { 1.0L, 0.0L }, { -1.0L, 0.0L }, { 0.0L, 1.0L }, { 0.707106781186547524400844362104849039284L, 0.707106781186547524400844362104849039284L }, { 0.923879532511286756128183189396788286823L, 0.38268343236508977172845998403039886676L }, { 0.980785280403230449126182236134239036975L, 0.195090322016128267848284868477022240928L }, { 0.995184726672196886244836953109479921574L, 0.098017140329560601994195563888641845861L }, { 0.998795456205172392714771604759100694444L, 0.0490676743274180142549549769426826583147L }, { 0.99969881869620422011576564966617219685L, 0.0245412285229122880317345294592829250654L }, { 0.99992470183914454092164649119638322435L, 0.01227153828571992607940826195100321214037L }, { 0.999981175282601142656990437728567716173L, 0.00613588464915447535964023459037258091705L }, { 0.999995293809576171511580125700119899554L, 0.00306795676296597627014536549091984251894L }, { 0.99999882345170190992902571017152601905L, 0.001533980186284765612303697150264079079954L }, { 0.999999705862882219160228217738765677117L, 7.66990318742704526938568357948576643142e-4L }, { 0.99999992646571785114473148070738785695L, 3.83495187571395589072461681181381263396e-4L }, { 0.999999981616429293808346915402909714504L, 1.91747597310703307439909561989000933469e-4L }, { 0.99999999540410731289097193313960614896L, 9.58737990959773458705172109764763511872e-5L }, { 0.9999999988510268275626733077945541084L, 4.79368996030668845490039904946588727468e-5L }, { 0.99999999971275670684941397221864177609L, 2.39684498084182187291865771650218200947e-5L }, { 0.999999999928189176709775095883850490262L, 1.198422490506970642152156159698898480473e-5L }, { 0.99999999998204729417728262414778410738L, 5.99211245264242784287971180889086172999e-6L }, { 0.99999999999551182354431058417299732444L, 2.99605622633466075045481280835705981183e-6L }, { 0.999999999998877955886077016551752536504L, 1.49802811316901122885427884615536112069e-6L }, { 0.999999999999719488971519214794719584451L, 7.49014056584715721130498566730655637157e-7L }, { 0.99999999999992987224287980123972873676L, 3.74507028292384123903169179084633177398e-7L }, { 0.99999999999998246806071995015624773673L, 1.8725351414619534486882457659356361712e-7L }, { 0.999999999999995617015179987529456656217L, 9.3626757073098082799067286680885620193e-8L }, { 0.999999999999998904253794996881763834182L, 4.68133785365490926951155181385400969594e-8L }, { 0.99999999999999972606344874922040343793L, 2.34066892682745527595054934190348440379e-8L }, { 0.999999999999999931515862187305098514444L, 1.170334463413727718124621350323810379807e-8L }, { 0.999999999999999982878965546826274482047L, 5.8516723170686386908097901008341396944e-9L }, { 0.999999999999999995719741386706568611352L, 2.92583615853431935792823046906895590202e-9L }, { 0.999999999999999998929935346676642152265L, 1.46291807926715968052953216186596371037e-9L } #endif }; // Define this for (cheap) consistency checks. #define DEBUG_FFTCS static fftcs_real fftcs_pow2_table[64] = // table of powers of 2 { 1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0, 512.0, 1024.0, 2048.0, 4096.0, 8192.0, 16384.0, 32768.0, 65536.0, 131072.0, 262144.0, 524288.0, 1048576.0, 2097152.0, 4194304.0, 8388608.0, 16777216.0, 33554432.0, 67108864.0, 134217728.0, 268435456.0, 536870912.0, 1073741824.0, 2147483648.0, 4294967296.0, 8589934592.0, 17179869184.0, 34359738368.0, 68719476736.0, 137438953472.0, 274877906944.0, 549755813888.0, 1099511627776.0, 2199023255552.0, 4398046511104.0, 8796093022208.0, 17592186044416.0, 35184372088832.0, 70368744177664.0, 140737488355328.0, 281474976710656.0, 562949953421312.0, 1125899906842624.0, 2251799813685248.0, 4503599627370496.0, 9007199254740992.0, 18014398509481984.0, 36028797018963968.0, 72057594037927936.0, 144115188075855872.0, 288230376151711744.0, 576460752303423488.0, 1152921504606846976.0, 2305843009213693952.0, 4611686018427387904.0, 9223372036854775808.0 }; // For a constant expression n (0 <= n < 128), returns 2^n of type fftcs_real. #define fftcs_pow2(n) \ (((n) & 64 ? (fftcs_real)18446744073709551616.0 : (fftcs_real)1.0) \ * ((n) & 32 ? (fftcs_real)4294967296.0 : (fftcs_real)1.0) \ * ((n) & 16 ? (fftcs_real)65536.0 : (fftcs_real)1.0) \ * ((n) & 8 ? (fftcs_real)256.0 : (fftcs_real)1.0) \ * ((n) & 4 ? (fftcs_real)16.0 : (fftcs_real)1.0) \ * ((n) & 2 ? (fftcs_real)4.0 : (fftcs_real)1.0) \ * ((n) & 1 ? (fftcs_real)2.0 : (fftcs_real)1.0) \ ) // r := a * b static inline void mul (const fftcs_complex& a, const fftcs_complex& b, fftcs_complex& r) { var fftcs_real r_re = a.re * b.re - a.im * b.im; var fftcs_real r_im = a.re * b.im + a.im * b.re; r.re = r_re; r.im = r_im; } static uintC shuffle (uintL n, uintC x) { var uintC y = 0; var sintC v = 1; // Invariant: y + v*shuffle(n,x). do { if (x & 1) if (x == 1) return y + (v << (n-1)); else { y = y + (v << n); v = -v; } x >>= 1; } while (!(--n == 0)); throw runtime_exception(); } #if 0 // unused static uintC invshuffle (uintL n, uintC x) { var uintC y = 0; var uintC v = 1; // Invariant: y + v*invshuffle(n,x). do { if (x == ((uintC)1 << (n-1))) return y + v; else if (x > ((uintC)1 << (n-1))) { x = ((uintC)1 << n) - x; y = y+v; } v <<= 1; } while (!(--n == 0)); throw runtime_exception(); } #endif // Compute a real convolution using FFT: z[0..N-1] := x[0..N-1] * y[0..N-1]. static void fftcs_convolution (const uintL n, const uintC N, // N = 2^n fftcs_real * x, // N numbers fftcs_real * y, // N numbers fftcs_real * z // N numbers result ) { CL_ALLOCA_STACK; var fftcs_complex* const w = cl_alloc_array(fftcs_complex,N>>2); var uintC i; // Initialize w[i] to w^i, w a primitive N-th root of unity. w[0] = fftcs_roots_of_1[0]; { var int j; for (j = n-3; j>=0; j--) { var fftcs_complex r_j = fftcs_roots_of_1[n-j]; w[1<>2; i += (2< 0; l--) { /* s = 0 */ { var const uintC tmax = (uintC)1 << l; for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // replace (x[i1],x[i2]) by // (x[i1] + x[i2], x[i1] - x[i2]) var fftcs_real tmp; tmp = x[i2]; x[i2] = x[i1] - tmp; x[i1] = x[i1] + tmp; } } var const uintC smax = (uintC)1 << (n-1-l); var const uintC tmax = (uintC)1 << (l-1); for (var uintC s = 1; s < smax; s++) { var uintC exp = shuffle(n-1-l,s) << (l-1); for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; var uintC i3 = i2 + tmax; var uintC i4 = i3 + tmax; // replace (x[i1],x[i2],x[i3],x[i4]) by // (x[i1] + x[i2]*Re(w^exp) - x[i4]*Im(w^exp), // x[i3] + x[i4]*Re(w^exp) + x[i2]*Im(w^exp), // x[i1] - x[i2]*Re(w^exp) + x[i4]*Im(w^exp), // -x[i3] + x[i4]*Re(w^exp) + x[i2]*Im(w^exp)) var fftcs_real diff; var fftcs_real sum; var fftcs_real tmp1; var fftcs_real tmp3; diff = x[i2] * w[exp].re - x[i4] * w[exp].im; sum = x[i4] * w[exp].re + x[i2] * w[exp].im; tmp1 = x[i1]; tmp3 = x[i3]; x[i1] = tmp1 + diff; x[i2] = tmp3 + sum; x[i3] = tmp1 - diff; x[i4] = sum - tmp3; } } } /* l = 0 */ { // replace (x[0],x[1]) by (x[0]+x[1], x[0]-x[1]) var fftcs_real tmp; tmp = x[1]; x[1] = x[0] - tmp; x[0] = x[0] + tmp; } } // Do an FFT of length N on y. if (!squaring) { var uintL l; for (l = n-1; l > 0; l--) { /* s = 0 */ { var const uintC tmax = (uintC)1 << l; for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // replace (y[i1],y[i2]) by // (y[i1] + y[i2], y[i1] - y[i2]) var fftcs_real tmp; tmp = y[i2]; y[i2] = y[i1] - tmp; y[i1] = y[i1] + tmp; } } var const uintC smax = (uintC)1 << (n-1-l); var const uintC tmax = (uintC)1 << (l-1); for (var uintC s = 1; s < smax; s++) { var uintC exp = shuffle(n-1-l,s) << (l-1); for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; var uintC i3 = i2 + tmax; var uintC i4 = i3 + tmax; // replace (y[i1],y[i2],y[i3],y[i4]) by // (y[i1] + y[i2]*Re(w^exp) - y[i4]*Im(w^exp), // y[i3] + y[i4]*Re(w^exp) + y[i2]*Im(w^exp), // y[i1] - y[i2]*Re(w^exp) + y[i4]*Im(w^exp), // -y[i3] + y[i4]*Re(w^exp) + y[i2]*Im(w^exp)) var fftcs_real diff; var fftcs_real sum; var fftcs_real tmp1; var fftcs_real tmp3; diff = y[i2] * w[exp].re - y[i4] * w[exp].im; sum = y[i4] * w[exp].re + y[i2] * w[exp].im; tmp1 = y[i1]; tmp3 = y[i3]; y[i1] = tmp1 + diff; y[i2] = tmp3 + sum; y[i3] = tmp1 - diff; y[i4] = sum - tmp3; } } } /* l = 0 */ { // replace (y[0],y[1]) by (y[0]+y[1], y[0]-y[1]) var fftcs_real tmp; tmp = y[1]; y[1] = y[0] - tmp; y[0] = y[0] + tmp; } } // Multiply the transformed vectors into z. { // Multiplication mod (z-1). z[0] = x[0] * y[0]; // Multiplication mod (z+1). z[1] = x[1] * y[1]; for (i = 2; i < N; i += 2) // Multiplication mod (z - exp(2 pi i j/2^n)), j = shuffle(n-1,i/2). mul(*(fftcs_complex*)&x[i],*(fftcs_complex*)&y[i], *(fftcs_complex*)&z[i]); } // Undo an FFT of length N on z. { var uintL l; /* l = 0 */ { // replace (z[0],z[1]) by ((z[0]+z[1])/2, (z[0]-z[1])/2) var fftcs_real tmp; tmp = z[1]; z[1] = (z[0] - tmp) * (fftcs_real)0.5; z[0] = (z[0] + tmp) * (fftcs_real)0.5; } for (l = 1; l < n; l++) { /* s = 0 */ { var const uintC tmax = (uintC)1 << l; for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // replace (z[i1],z[i2]) by // ((z[i1]+z[i2])/2, (z[i1]-z[i2])/2) // Do the division by 2 later. var fftcs_real tmp; tmp = z[i2]; z[i2] = z[i1] - tmp; z[i1] = z[i1] + tmp; } } var const uintC smax = (uintC)1 << (n-1-l); var const uintC tmax = (uintC)1 << (l-1); for (var uintC s = 1; s < smax; s++) { var uintC exp = shuffle(n-1-l,s) << (l-1); for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; var uintC i3 = i2 + tmax; var uintC i4 = i3 + tmax; // replace (z[i1],z[i2],z[i3],z[i4]) by // ((z[i1]+z[i3])/2, // (z[i1]-z[i3])/2*Re(w^exp)+(z[i2]+z[i4])/2*Im(w^exp), // (z[i2]-z[i4])/2, // (z[i2]+z[i4])/2*Re(w^exp)-(z[i1]-z[i3])/2*Im(w^exp)) // Do the division by 2 later. var fftcs_real diff13; var fftcs_real sum24; var fftcs_real tmp1; var fftcs_real tmp3; diff13 = z[i1] - z[i3]; sum24 = z[i2] + z[i4]; tmp1 = z[i1] + z[i3]; tmp3 = z[i2] - z[i4]; z[i1] = tmp1; z[i2] = diff13 * w[exp].re + sum24 * w[exp].im; z[i3] = tmp3; z[i4] = sum24 * w[exp].re - diff13 * w[exp].im; } } } // Do all divisions by 2 now. { var fftcs_real f = (fftcs_real)2.0 / (fftcs_real)N; // 2^-(n-1) for (i = 0; i < N; i++) z[i] = z[i]*f; } } } // For a given k >= 2, the maximum l is determined by // 2*l < m - 1/2 - 2*k - log_2(12*k-15) - (1 if e=1.0, 0 if e=0.5). // This is a decreasing function of k. #define max_l(k) \ (int)((fftcs_real_mant_bits \ - 2*(k) \ - ((k)<=2 ? 4 : (k)<=3 ? 5 : (k)<=5 ? 6 : (k)<=8 ? 7 : (k)<=16 ? 8 : (k)<=31 ? 9 : 10) \ - (fftcs_real_rounds == rounds_to_nearest ? 0 : 1)) \ / 2) static int max_l_table[32+1] = { 0, 0, max_l(2), max_l(3), max_l(4), max_l(5), max_l(6), max_l(7), max_l(8), max_l(9), max_l(10), max_l(11), max_l(12), max_l(13), max_l(14), max_l(15), max_l(16), max_l(17), max_l(18), max_l(19), max_l(20), max_l(21), max_l(22), max_l(23), max_l(24), max_l(25), max_l(26), max_l(27), max_l(28), max_l(29), max_l(30), max_l(31), max_l(32) }; // Split len uintD's below sourceptr into chunks of l bits, thus filling // N real numbers at x. static void fill_factor (uintC N, fftcs_real* x, uintL l, const uintD* sourceptr, uintC len) { var uintC i; if (max_l(2) > intDsize && l > intDsize) { // l > intDsize if (max_l(2) > 64 && l > 64) { throw runtime_exception("FFT problem: l > 64 not supported by pow2_table"); } var fftcs_real carry = 0; var sintL carrybits = 0; // number of bits in carry (>=0, 0) { var uintD digit = lsprefnext(sourceptr); if (carrybits+intDsize >= l) { x[i] = carry + (fftcs_real)(digit & bitm(l-carrybits)) * fftcs_pow2_table[carrybits]; i++; carry = (l-carrybits == intDsize ? (fftcs_real)0 : (fftcs_real)(digit >> (l-carrybits))); carrybits = carrybits+intDsize-l; } else { carry = carry + (fftcs_real)digit * fftcs_pow2_table[carrybits]; carrybits = carrybits+intDsize; } len--; } if (carrybits > 0) { x[i] = carry; i++; } if (i > N) throw runtime_exception(); } else if (max_l(2) >= intDsize && l == intDsize) { // l = intDsize if (len > N) throw runtime_exception(); for (i = 0; i < len; i++) { var uintD digit = lsprefnext(sourceptr); x[i] = (fftcs_real)digit; } } else { // l < intDsize var const uintD l_mask = bit(l)-1; var uintD carry = 0; var sintL carrybits = 0; // number of bits in carry (>=0, = l) { x[i] = (fftcs_real)(carry & l_mask); carry >>= l; carrybits -= l; } else { if (len == 0) break; len--; var uintD digit = lsprefnext(sourceptr); x[i] = (fftcs_real)((carry | (digit << carrybits)) & l_mask); carry = digit >> (l-carrybits); carrybits = intDsize - (l-carrybits); } } while (carrybits > 0) { if (!(i < N)) throw runtime_exception(); x[i] = (fftcs_real)(carry & l_mask); carry >>= l; carrybits -= l; i++; } if (len > 0) throw runtime_exception(); } for ( ; i < N; i++) x[i] = (fftcs_real)0; } // Given a not too large floating point number, round it to the nearest integer. static inline fftcs_real fftcs_fround (fftcs_real x) { return #if (fftcs_real_rounds == rounds_to_nearest) (x + (fftcs_pow2(fftcs_real_mant_bits-1)+fftcs_pow2(fftcs_real_mant_bits-2))) - (fftcs_pow2(fftcs_real_mant_bits-1)+fftcs_pow2(fftcs_real_mant_bits-2)); #elif (fftcs_real_rounds == rounds_to_infinity) (fftcs_pow2(fftcs_real_mant_bits-1)+fftcs_pow2(fftcs_real_mant_bits-2)) - ((fftcs_pow2(fftcs_real_mant_bits-1)+fftcs_pow2(fftcs_real_mant_bits-2)) - (x + (fftcs_real)0.5)); #else // rounds_to_zero, rounds_to_minus_infinity ((x + (fftcs_real)0.5) + (fftcs_pow2(fftcs_real_mant_bits-1)+fftcs_pow2(fftcs_real_mant_bits-2))) - (fftcs_pow2(fftcs_real_mant_bits-1)+fftcs_pow2(fftcs_real_mant_bits-2)); #endif } // Given a not too large floating point number, round it down. static inline fftcs_real fftcs_ffloor (fftcs_real x) { #if (fftcs_real_rounds == rounds_to_nearest) var fftcs_real y = (x + (fftcs_pow2(fftcs_real_mant_bits-1)+fftcs_pow2(fftcs_real_mant_bits-2))) - (fftcs_pow2(fftcs_real_mant_bits-1)+fftcs_pow2(fftcs_real_mant_bits-2)); if (y <= x) return y; else return y - (fftcs_real)1.0; #elif (fftcs_real_rounds == rounds_to_infinity) return (fftcs_pow2(fftcs_real_mant_bits-1)+fftcs_pow2(fftcs_real_mant_bits-2)) - ((fftcs_pow2(fftcs_real_mant_bits-1)+fftcs_pow2(fftcs_real_mant_bits-2)) - x); #else // rounds_to_zero, rounds_to_minus_infinity return (x + (fftcs_pow2(fftcs_real_mant_bits-1)+fftcs_pow2(fftcs_real_mant_bits-2))) - (fftcs_pow2(fftcs_real_mant_bits-1)+fftcs_pow2(fftcs_real_mant_bits-2)); #endif } // Combine the N real numbers at z into uintD's below destptr. // The z[i] are known to be approximately integers >= 0, < N*2^(2*l). // Assumes room for floor(N*l/intDsize)+(1+ceiling((n+2*l)/intDsize)) uintD's // below destptr. Fills len digits and returns (destptr lspop len). static uintD* unfill_product (uintL n, uintC N, // N = 2^n const fftcs_real * z, uintL l, uintD* destptr) { var uintC i; if (n + 2*l <= intDsize) { // 2-digit carry is sufficient, l < intDsize var uintD carry0 = 0; var uintD carry1 = 0; var uintL shift = 0; // shift next digit before adding it to the carry, >=0, 0) { carry1 += digit >> (intDsize-shift); digit = digit << shift; } if ((carry0 += digit) < digit) carry1 += 1; shift += l; if (shift >= intDsize) { lsprefnext(destptr) = carry0; carry0 = carry1; carry1 = 0; shift -= intDsize; } } lsprefnext(destptr) = carry0; lsprefnext(destptr) = carry1; } else if (n + 2*l <= 2*intDsize) { // 3-digit carry is sufficient, l < intDsize #if HAVE_DD var uintDD carry0 = 0; var uintD carry1 = 0; var uintL shift = 0; // shift next digit before adding it to the carry, >=0, 0) { carry1 += (uintD)(digit >> (2*intDsize-shift)); digit = digit << shift; } if ((carry0 += digit) < digit) carry1 += 1; shift += l; if (shift >= intDsize) { lsprefnext(destptr) = lowD(carry0); carry0 = highlowDD(carry1,highD(carry0)); carry1 = 0; shift -= intDsize; } } lsprefnext(destptr) = lowD(carry0); lsprefnext(destptr) = highD(carry0); lsprefnext(destptr) = carry1; #else var uintD carry0 = 0; var uintD carry1 = 0; var uintD carry2 = 0; var uintL shift = 0; // shift next digit before adding it to the carry, >=0, 0) { carry2 += digit1 >> (intDsize-shift); digit1 = (digit1 << shift) | (digit0 >> (intDsize-shift)); digit0 = digit0 << shift; } if ((carry0 += digit0) < digit0) if ((carry1 += 1) == 0) carry2 += 1; if ((carry1 += digit1) < digit1) carry2 += 1; shift += l; if (shift >= intDsize) { lsprefnext(destptr) = carry0; carry0 = carry1; carry1 = carry2; carry2 = 0; shift -= intDsize; } } lsprefnext(destptr) = carry0; lsprefnext(destptr) = carry1; lsprefnext(destptr) = carry2; #endif } else { // 1-digit+1-float carry is sufficient var uintD carry0 = 0; var fftcs_real carry1 = 0; var uintL shift = 0; // shift next digit before adding it to the carry, >=0, = (fftcs_real)0 && z[i] > digit - (fftcs_real)0.5 && z[i] < digit + (fftcs_real)0.5)) throw runtime_exception(); #endif if (shift > 0) digit = digit * fftcs_pow2_table[shift]; var fftcs_real digit1 = fftcs_ffloor(digit*((fftcs_real)1.0/fftcs_pow2(intDsize))); var uintD digit0 = (uintD)(digit - digit1*fftcs_pow2(intDsize)); carry1 += digit1; if ((carry0 += digit0) < digit0) carry1 += (fftcs_real)1.0; shift += l; while (shift >= intDsize) { lsprefnext(destptr) = carry0; var fftcs_real tmp = fftcs_ffloor(carry1*((fftcs_real)1.0/fftcs_pow2(intDsize))); carry0 = (uintD)(carry1 - tmp*fftcs_pow2(intDsize)); carry1 = tmp; shift -= intDsize; } } if (carry0 > 0 || carry1 > (fftcs_real)0.0) { lsprefnext(destptr) = carry0; while (carry1 > (fftcs_real)0.0) { var fftcs_real tmp = fftcs_ffloor(carry1*((fftcs_real)1.0/fftcs_pow2(intDsize))); lsprefnext(destptr) = (uintD)(carry1 - tmp*fftcs_pow2(intDsize)); carry1 = tmp; } } } return destptr; } static inline void mulu_fftcs_nocheck (const uintD* sourceptr1, uintC len1, const uintD* sourceptr2, uintC len2, uintD* destptr) // Es ist 2 <= len1 <= len2. { // We have to find parameters l and k such that // ceiling(len1*intDsize/l) + ceiling(len2*intDsize/l) - 1 <= 2^k, // and (12*k-15)*e*2^(2*l+2*k+1/2-m) < 1/2. // Try primarily to minimize k. Minimizing l buys you nothing. var uintL k; // Computing k: If len1 and len2 differ much, we'll split source2 - // hence for the moment just substitute len1 for len2. // // First approximation of k: A necessary condition for // 2*ceiling(len1*intDsize/l) - 1 <= 2^k // is 2*len1*intDsize/l_max - 1 <= 2^k. { var const int l = max_l(2); var uintC lhs = 2*ceiling(len1*intDsize,l) - 1; // >=1 if (lhs < 3) k = 2; else integerlengthC(lhs-1, k=); // k>=2 } // Try whether this k is ok or whether we have to increase k. for ( ; ; k++) { if (k >= sizeof(max_l_table)/sizeof(max_l_table[0]) || max_l_table[k] <= 0) { throw runtime_exception("FFT problem: numbers too big, floating point precision not sufficient"); } if (2*ceiling(len1*intDsize,max_l_table[k])-1 <= ((uintC)1 << k)) break; } // We could try to reduce l, keeping the same k. But why should we? // Calculate the number of pieces in which source2 will have to be // split. Each of the pieces must satisfy // ceiling(len1*intDsize/l) + ceiling(len2*intDsize/l) - 1 <= 2^k, var uintC len2p; // Try once with k, once with k+1. Compare them. { var uintC remaining_k = ((uintC)1 << k) + 1 - ceiling(len1*intDsize,max_l_table[k]); var uintC max_piecelen_k = floor(remaining_k*max_l_table[k],intDsize); var uintC numpieces_k = ceiling(len2,max_piecelen_k); var uintC remaining_k1 = ((uintC)1 << (k+1)) + 1 - ceiling(len1*intDsize,max_l_table[k+1]); var uintC max_piecelen_k1 = floor(remaining_k1*max_l_table[k+1],intDsize); var uintC numpieces_k1 = ceiling(len2,max_piecelen_k1); if (numpieces_k <= 2*numpieces_k1) { // keep k len2p = max_piecelen_k; } else { // choose k+1 k = k+1; len2p = max_piecelen_k1; } } var const uintL l = max_l_table[k]; var const uintL n = k; var const uintC N = (uintC)1 << n; CL_ALLOCA_STACK; var fftcs_real* const x = cl_alloc_array(fftcs_real,N); var fftcs_real* const y = cl_alloc_array(fftcs_real,N); #ifdef DEBUG_FFTCS var fftcs_real* const z = cl_alloc_array(fftcs_real,N); #else var fftcs_real* const z = x; // put z in place of x - saves memory #endif var uintD* const tmpprod1 = cl_alloc_array(uintD,len1+1); var uintC tmpprod_len = floor(l< len2) len2p = len2; if (len2p == 1) { // cheap case var uintD* tmpptr = arrayLSDptr(tmpprod1,len1+1); mulu_loop_lsp(lspref(sourceptr2,0),sourceptr1,tmpptr,len1); if (addto_loop_lsp(tmpptr,destptr,len1+1)) if (inc_loop_lsp(destptr lspop (len1+1),destlen-(len1+1))) throw runtime_exception(); } else { var bool squaring = ((sourceptr1 == sourceptr2) && (len1 == len2p)); // Fill factor x. fill_factor(N,x,l,sourceptr1,len1); // Fill factor y. if (!squaring) fill_factor(N,y,l,sourceptr2,len2p); // Multiply. if (!squaring) fftcs_convolution(n,N, &x[0], &y[0], &z[0]); else fftcs_convolution(n,N, &x[0], &x[0], &z[0]); #ifdef DEBUG_FFTCS // Check result. { var fftcs_real re_lo_limit = (fftcs_real)(-0.5); var fftcs_real re_hi_limit = (fftcs_real)N * fftcs_pow2_table[l] * fftcs_pow2_table[l] + (fftcs_real)0.5; for (var uintC i = 0; i < N; i++) if (!(z[i] > re_lo_limit && z[i] < re_hi_limit)) throw runtime_exception(); } #endif var uintD* tmpLSDptr = arrayLSDptr(tmpprod,tmpprod_len); var uintD* tmpMSDptr = unfill_product(n,N,z,l,tmpLSDptr); var uintC tmplen = #if CL_DS_BIG_ENDIAN_P tmpLSDptr - tmpMSDptr; #else tmpMSDptr - tmpLSDptr; #endif if (tmplen > tmpprod_len) throw runtime_exception(); // Add result to destptr[-destlen..-1]: if (tmplen > destlen) { if (test_loop_msp(tmpMSDptr,tmplen-destlen)) throw runtime_exception(); tmplen = destlen; } if (addto_loop_lsp(tmpLSDptr,destptr,tmplen)) if (inc_loop_lsp(destptr lspop tmplen,destlen-tmplen)) throw runtime_exception(); } // Decrement len2. destptr = destptr lspop len2p; destlen -= len2p; sourceptr2 = sourceptr2 lspop len2p; len2 -= len2p; } while (len2 > 0); } #ifndef _CHECKSUM #define _CHECKSUM // Compute a checksum: number mod (2^intDsize-1). static uintD compute_checksum (const uintD* sourceptr, uintC len) { var uintD tmp = ~(uintD)0; // -1-(sum mod 2^intDsize-1), always >0 do { var uintD digit = lsprefnext(sourceptr); if (digit < tmp) tmp -= digit; // subtract digit else tmp -= digit+1; // subtract digit-(2^intDsize-1) } while (--len > 0); return ~tmp; } // Multiply two checksums modulo (2^intDsize-1). static inline uintD multiply_checksum (uintD checksum1, uintD checksum2) { var uintD checksum; var uintD cksum_hi; #if HAVE_DD var uintDD cksum = muluD(checksum1,checksum2); cksum_hi = highD(cksum); checksum = lowD(cksum); #else muluD(checksum1,checksum2, cksum_hi =, checksum =); #endif if ((checksum += cksum_hi) + 1 <= cksum_hi) checksum += 1; return checksum; } #endif // _CHECKSUM static void mulu_fftcs (const uintD* sourceptr1, uintC len1, const uintD* sourceptr2, uintC len2, uintD* destptr) { // Compute checksums of the arguments and multiply them. var uintD checksum1 = compute_checksum(sourceptr1,len1); var uintD checksum2 = compute_checksum(sourceptr2,len2); var uintD checksum = multiply_checksum(checksum1,checksum2); mulu_fftcs_nocheck(sourceptr1,len1,sourceptr2,len2,destptr); if (!(checksum == compute_checksum(destptr,len1+len2))) { throw runtime_exception("FFT problem: checksum error"); } } cln-1.3.3/src/base/digitseq/cl_DS_mul_fftr.h0000644000000000000000000012252211201634736015534 0ustar // Fast integer multiplication using FFT over the complex numbers, modified // to work with real numbers only in the implementation. // [Donald Ervin Knuth: The Art of Computer Programming, Vol. II: // Seminumerical Algorithms, second edition. Section 4.3.3, p. 290-294.] // Bruno Haible 6.5.1996, 24.-25.8.1996, 27.-30.8.1996 // FFT in the complex domain has the drawback that it needs careful round-off // error analysis. But for CPUs with good floating-point performance it might // nevertheless be better than FFT mod Z/mZ. // The usual FFT(2^n) computes the values of a polynomial p(z) mod (z^(2^n)-1) // at the (2^n)-th roots of unity. For our purposes, we start out with // polynomials with real coefficients. So the values at z_j = exp(2 pi i j/N) // and z_-j = exp(- 2 pi i j/N) will be complex conjugates of each other, // which means that there exists a polynomial r(z) of degree <= 1 with real // coefficients such that p(z_j) = r(z_j) and p(z_-j) = r(z_-j). This // implies that r(z) is the remainder of p(z) divided by // (z - z_j) (z - z_-j) = (z^2 - 2 cos(2 pi j/N) z + 1). // // Based on this insight, we replace the usual n FFT steps // for m = n...0: // (z^(2^n)-1) = prod(j=0..2^(n-m)-1, (z^(2^m) - exp(2 pi j/2^(n-m)))) // by // for m = n...1: // (z^(2^n)-1) = (z^(2^m)-1) * prod(j=1..2^(n-m)-1, factor_m[j](z)) // where // factor_m[j](z) = prod(k mod 2^n with k == j or k == -j mod 2^(n-m+1), // (z - exp(2 pi i k/N)) ) // = prod(k=0..2^(m-1)-1, // (z - exp(2 pi i (j+2^(n-m+1)k)/N)) // (z - exp(- 2 pi i (j+2^(n-m+1)k)/N)) ) // = (z^(2^(m-1)) - exp(2 pi i j 2^(m-1)/N)) // (z^(2^(m-1)) - exp(- 2 pi i j 2^(m-1)/N)) // = (z^(2^(m-1)) - exp(2 pi i j/2^(n-m+1))) // (z^(2^(m-1)) - exp(- 2 pi i j/2^(n-m+1))) // = (z^(2^m) - 2 cos(2 pi j/2^(n-m+1)) z^(2^(m-1)) + 1). // The factors and the input are real polynomials, hence all intermediate // and final remainders will be real as well. // // The usual FFT algorithm // Input: polynomial p in x[0..2^n-1]. // for l = n-1..0: // step m=l+1 -> m=l // for s in {0,..,2^(n-1-l)-1}: // exp := bit_reverse(n-1-l,s)*2^l, // // chinese remainder algorithm for (z^(2^(l+1)) - w^(2*exp)) = // // = (z^(2^l) - w^exp) * (z^(2^l) - w^(exp+2^(n-1))). // for t in {0,..,2^l-1}: // i1 := s*2^(l+1) + t, i2 := s*2^(l+1) + 2^l + t, // replace (x[i1],x[i2]) by (x[i1] + w^exp*x[i2], x[i1] - w^exp*x[i2]) // Invariant: // for m = n..0: // for j in {0..2^(n-m)-1}: // p(z) mod (z^(2^m) - exp(2 pi i j/2^(n-m))) // in x[bit_reverse(n-m,j)*2^m .. bit_reverse(n-m,j)*2^m+2^m-1]. // Output: p(z_j) in x[bit_reverse(n,j)]. // is thus replaced by the algorithm // Input: polynomial p in x[0..2^n-1]. // for l = n-1..1: // step m=l+1 -> m=l // for s in {0}: // // chinese remainder algorithm for (z^(2^(l+1)) - 1) = // // = (z^(2^l) - 1) * (z^(2^l) + 1). // for t in {0,..,2^l-1}: // i1 := t, i2 := 2^l + t, // replace (x[i1],x[i2]) by (x[i1] + x[i2], x[i1] - x[i2]) // for s in {1,..,2^(n-1-l)-1}: // exp := shuffle(n-1-l,s)*2^(l-1), // // chinese remainder algorithm for // // (z^(2^(l+1)) - 2 cos(2 pi 2*exp/N) z^(2^l) + 1) = // // = (z^(2^l) - 2 cos(2 pi exp/N) z^(2^(l-1)) + 1) // // * (z^(2^l) - 2 cos(2 pi (2^(n-1)-exp)/N) z^(2^(l-1)) + 1) // gam := 2 cos(2 pi exp/N), // for t in {0,..,2^(l-1)-1}: // i1 := s*2^(l+1) + t, i2 := s*2^(l+1) + 2^(l-1) + t, // i3 := s*2^(l+1) + 2^l + t, i4 := s*2^(l+1) + 2^l + 2^(l-1) + t, // replace (x[i1],x[i2],x[i3],x[i4]) by // (x[i1]-x[i3] - x[i4]*gam, x[i3]*gam + x[i2]+x[i4]*(gam^2-1), // x[i1]-x[i3] + x[i4]*gam, - x[i3]*gam + x[i2]+x[i4]*(gam^2-1)) // Invariant: // for m = n..1: // p(z) mod (z^(2^m) - 1) in x[0..2^m-1], // for j in {1,..,2^(n-m)-1}: // p(z) mod (z^(2^m) - 2 cos(2 pi j/2^(n-m+1)) z^(2^(m-1)) + 1) // in x[invshuffle(n-m,j)*2^m .. invshuffle(n-m,j)*2^m+2^m-1]. // Output: p(z) mod (z^2 - 1) in x[0],x[1], // p(z) mod (z^2 - 2 cos(2 pi j/2^n) z + 1) (0 < j < 2^(n-1)) // in x[2*invshuffle(n-1,j)],x[2*invshuffle(n-1,j)+1]. // // The shuffle function is defined like this: // shuffle(n,j) defined for n >= 0, 0 < j < 2^n, yields 0 < shuffle(n,j) < 2^n. // Definition by splitting off the least significant bit: // n = 0: void. // n > 0: shuffle(n,1) = 2^(n-1), // n > 0, 0 < j < 2^(n-1): shuffle(n,2*j) = shuffle(n-1,j), // n > 0, 0 < j < 2^(n-1): shuffle(n,2*j+1) = 2^n - shuffle(n-1,j). // Its inverse function is defined like this: // invshuffle(n,j) defined for n >= 0, 0 < j < 2^n, 0 < invshuffle(n,j) < 2^n. // Definition by splitting off the most significant bit: // n = 0: void. // n > 0, 0 < j < 2^(n-1): invshuffle(n,j) = invshuffle(n-1,j)*2, // n > 0, j = 2^(n-1): invshuffle(n,j) = 1, // n > 0, 2^(n-1) < j < 2^n: invshuffle(n,j) = invshuffle(n-1,2^n-j)*2+1. // Note that shuffle(n,.) and invshuffle(n,.) are _not_ the same permutation // for n>=4. // It is important to have precise round-off error estimates. Although // (by laws of statistics) in the average the actual round-off error makes up // only half of the bits provided for round-off protection, we cannot rely // on this average behaviour, but have to produce correct results. // // Knuth's formula (42), p. 294, says: // If we want to multiply l-bit words using an FFT(2^k), our floating point // numbers shall have m >= 2(k+l) + k + log_2 k + 3.5 mantissa bits. // // Here is a more careful analysis, using absolute error estimates. // // 1. We assume floating point numbers with radix 2, with the properties: // (i) Multiplication with 2^n and 2^-n is exact. // (ii) Negation x -> -x is exact. // (iii) Addition: When adding x and y, with |x| <= 2^a, |y| <= 2^a, // the result |x+y| <= 2^(a+1) has an error <= e*2^(a+1-m). // (iv) Multiplication: When multiplying x and y, with |x| <= 2^a, // |y| <= 2^b, the result |x*y| <= 2^(a+b) has an error <= e*2^(a+b-m). // (v) Division: When dividing x by y, with |x| <= 2^a, // 2^b <= |y| <= 2^(b+1), the result |x/y| <= 2^(a-b) has an error // <= e*2^(a-b-m). // Here e = 1 for a truncating arithmetic, but e = 1/2 for a rounding // arithmetic like IEEE single and double floats. // 2. Let's introduce some notation: err(x) means |x'-x| where x is the // exact mathematical value and x' is its representation in the machine. // 3. From 1. we get for real numbers x,y: // (i) err(2^n*x) = 2^n * err(x), // (ii) err(-x) = err(x), // (iii) |x| <= 2^a, |y| <= 2^a, then // err(x+y) <= err(x) + err(y) + e*2^(a+1-m), // [or .... ............... + e*2^(a-m) if |x+y| <= 2^a]. // (iv) |x| <= 2^a, |y| <= 2^b, then // err(x*y) <= 2^a * err(y) + 2^b * err(x) + e*2^(a+b-m). // (v) |x| <= 2^a, 2^b <= |y| <= 2^(b+1), then // err(x/y) <= 2^(-b) * err(x) + 2^(a-2b) * err(y) + e*2^(a-b-m). // 4. Our complex arithmetic will be based on the formulas: // (i) 2^n*(x+iy) = (2^n*x)+i(2^n*y) // (ii) -(x+iy) = (-x)+i(-y) // (iii) (x+iy)+(u+iv) = (x+u)+i(y+v) // (iv) (x+iy)*(u+iv) = (x*u-y*v)+i(x*v+y*u) // The notation err(z) means |z'-z|, as above, with |.| being the usual // absolute value on complex numbers (_not_ the L^1 norm). // 5. From 3. and 4. we get for complex numbers x,y: // (i) err(2^n*x) = 2^n * err(x), // (ii) err(-x) = err(x), // (iii) |x| <= 2^a, |y| <= 2^a, then // err(x+y) <= err(x) + err(y) + e*2^(a+3/2-m), // (iv) |x| <= 2^a, |y| <= 2^b, then // err(x*y) <= 2^a * err(y) + 2^b * err(x) + 3*e*2^(a+b+1/2-m). // 6. We start out with precomputed roots of unity: // |exp(2 pi i/2^n)| <= 1, // err(exp(2 pi i/2^n)) <= e*2^(1/2-m), (even err(..)=0 for n=0,1,2), // and compute exp(2 pi i * j/2^k) according to the binary digits of j. // This way, each root of unity will be a product of at most k precomputed // roots. If (j mod 2^(k-2)) has n bits, then exp(2 pi i * j/2^k) will // be computed using n factors, i.e. n-1 complex multiplications, and by // 5.iv. we'll have // err(exp(2 pi i * j/2^k)) <= n*e*2^(1/2-m) + max(n-1,0)*3*e*2^(1/2-m) // = max(4*n-3,0)*e*2^(1/2-m). // Hence the maximum roots-of-unity error is (set n=k-2) // err(w^j) <= (4*k-11)*e*2^(1/2-m), // and the average roots-of-unity error is (set n=(k-2)/2) // < 2*(k-2)*e*2^(1/2-m). // 7. We use precomputed values of gam = 2*cos(2*pi*j/2^k) (0 < j < 2^(k-2)), // 12*2^-k <= |gam| <= 2, // err(gam) <= (4*k-11)*e*2^(3/2-m), // and // err(gam-1) <= (4*k-11)*e*2^(3/2-m), // err(gam+1) <= (4*k-9)*e*2^(3/2-m), // err(gam^2-1) <= (20*k-51)*e*2^(3/2-m), // err(1/gam) <= (4*k-10)*e*(2*k-9/2-m). // 8. Now we start the FFT. // Before the first step, x_i are integral, |x_i| < 2^l and err(x_i) = 0. // After the first butterfly, which replaces (x(i1),x(i2)) by // (x(i1) + x(i2), x(i1) - x(i2)), we have |x_i| < 2^(l+1) and err(x_i) = 0. // Then, for each of the remaining k-2 steps, a butterfly replaces // (x[i1],x[i2],x[i3],x[i4]) by // (x[i1]-x[i3] - x[i4]*gam, x[i3]*gam + x[i2]+x[i4]*(gam^2-1), // x[i1]-x[i3] + x[i4]*gam, - x[i3]*gam + x[i2]+x[i4]*(gam^2-1)). // Thus, after n steps we have |x_i| < 2^(l+3n) and err(x_i) <= E_i where // E_0 = 0, // E_1 = 0, // E_(n+1) = ... // // This is just too complicated. We use fftc's round-off error estimates. // As a consequence, sometimes the algorithm bails out, saying // "FFT problem: checksum error"!!! #if !(intDsize==32) #error "real fft implemented only for intDsize==32" #endif #include "cln/floatparam.h" #include "cln/exception.h" #if defined(HAVE_LONGDOUBLE) && (long_double_mant_bits > double_mant_bits) && (defined(__i386__) || defined(__m68k__) || (defined(__sparc__) && 0)) // Only these CPUs have fast "long double"s in hardware. // On SPARC, "long double"s are emulated in software and don't work. typedef long double fftr_real; #define fftr_real_mant_bits long_double_mant_bits #define fftr_real_rounds long_double_rounds #else typedef double fftr_real; #define fftr_real_mant_bits double_mant_bits #define fftr_real_rounds double_rounds #endif // We need complex numbers for precomputing the roots of unity. typedef struct fftr_complex { fftr_real re; fftr_real im; } fftr_complex; // For every integer exp, we need to precompute gam = 2 cos(2 pi exp/N). typedef union { fftr_complex c; // exp(2 pi i exp/N) struct { fftr_real d; // gam = 2 cos(2 pi exp/N) fftr_real e; // gam^2-1 fftr_real f; // 1/gam } gam; } fftr_cosinus; static const fftr_complex fftr_roots_of_1 [32+1] = // roots_of_1[n] is a (2^n)th root of unity in C. // Also roots_of_1[n-1] = roots_of_1[n]^2. // For simplicity we choose roots_of_1[n] = exp(2 pi i/2^n). { #if (fftr_real_mant_bits == double_mant_bits) // These values have 64 bit precision. { 1.0, 0.0 }, { -1.0, 0.0 }, { 0.0, 1.0 }, { 0.7071067811865475244, 0.7071067811865475244 }, { 0.9238795325112867561, 0.38268343236508977172 }, { 0.9807852804032304491, 0.19509032201612826784 }, { 0.99518472667219688623, 0.098017140329560601996 }, { 0.9987954562051723927, 0.049067674327418014254 }, { 0.9996988186962042201, 0.024541228522912288032 }, { 0.99992470183914454094, 0.0122715382857199260795 }, { 0.99998117528260114264, 0.0061358846491544753597 }, { 0.9999952938095761715, 0.00306795676296597627 }, { 0.99999882345170190993, 0.0015339801862847656123 }, { 0.99999970586288221914, 7.6699031874270452695e-4 }, { 0.99999992646571785114, 3.8349518757139558907e-4 }, { 0.9999999816164292938, 1.9174759731070330744e-4 }, { 0.9999999954041073129, 9.5873799095977345874e-5 }, { 0.99999999885102682754, 4.793689960306688455e-5 }, { 0.99999999971275670683, 2.3968449808418218729e-5 }, { 0.9999999999281891767, 1.1984224905069706422e-5 }, { 0.99999999998204729416, 5.9921124526424278428e-6 }, { 0.99999999999551182357, 2.9960562263346607504e-6 }, { 0.99999999999887795586, 1.4980281131690112288e-6 }, { 0.999999999999719489, 7.4901405658471572114e-7 }, { 0.99999999999992987223, 3.7450702829238412391e-7 }, { 0.99999999999998246807, 1.8725351414619534487e-7 }, { 0.999999999999995617, 9.36267570730980828e-8 }, { 0.99999999999999890425, 4.6813378536549092695e-8 }, { 0.9999999999999997261, 2.340668926827455276e-8 }, { 0.99999999999999993153, 1.1703344634137277181e-8 }, { 0.99999999999999998287, 5.8516723170686386908e-9 }, { 0.9999999999999999957, 2.925836158534319358e-9 }, { 0.9999999999999999989, 1.4629180792671596806e-9 } #else (fftr_real_mant_bits > double_mant_bits) // These values have 128 bit precision. { 1.0L, 0.0L }, { -1.0L, 0.0L }, { 0.0L, 1.0L }, { 0.707106781186547524400844362104849039284L, 0.707106781186547524400844362104849039284L }, { 0.923879532511286756128183189396788286823L, 0.38268343236508977172845998403039886676L }, { 0.980785280403230449126182236134239036975L, 0.195090322016128267848284868477022240928L }, { 0.995184726672196886244836953109479921574L, 0.098017140329560601994195563888641845861L }, { 0.998795456205172392714771604759100694444L, 0.0490676743274180142549549769426826583147L }, { 0.99969881869620422011576564966617219685L, 0.0245412285229122880317345294592829250654L }, { 0.99992470183914454092164649119638322435L, 0.01227153828571992607940826195100321214037L }, { 0.999981175282601142656990437728567716173L, 0.00613588464915447535964023459037258091705L }, { 0.999995293809576171511580125700119899554L, 0.00306795676296597627014536549091984251894L }, { 0.99999882345170190992902571017152601905L, 0.001533980186284765612303697150264079079954L }, { 0.999999705862882219160228217738765677117L, 7.66990318742704526938568357948576643142e-4L }, { 0.99999992646571785114473148070738785695L, 3.83495187571395589072461681181381263396e-4L }, { 0.999999981616429293808346915402909714504L, 1.91747597310703307439909561989000933469e-4L }, { 0.99999999540410731289097193313960614896L, 9.58737990959773458705172109764763511872e-5L }, { 0.9999999988510268275626733077945541084L, 4.79368996030668845490039904946588727468e-5L }, { 0.99999999971275670684941397221864177609L, 2.39684498084182187291865771650218200947e-5L }, { 0.999999999928189176709775095883850490262L, 1.198422490506970642152156159698898480473e-5L }, { 0.99999999998204729417728262414778410738L, 5.99211245264242784287971180889086172999e-6L }, { 0.99999999999551182354431058417299732444L, 2.99605622633466075045481280835705981183e-6L }, { 0.999999999998877955886077016551752536504L, 1.49802811316901122885427884615536112069e-6L }, { 0.999999999999719488971519214794719584451L, 7.49014056584715721130498566730655637157e-7L }, { 0.99999999999992987224287980123972873676L, 3.74507028292384123903169179084633177398e-7L }, { 0.99999999999998246806071995015624773673L, 1.8725351414619534486882457659356361712e-7L }, { 0.999999999999995617015179987529456656217L, 9.3626757073098082799067286680885620193e-8L }, { 0.999999999999998904253794996881763834182L, 4.68133785365490926951155181385400969594e-8L }, { 0.99999999999999972606344874922040343793L, 2.34066892682745527595054934190348440379e-8L }, { 0.999999999999999931515862187305098514444L, 1.170334463413727718124621350323810379807e-8L }, { 0.999999999999999982878965546826274482047L, 5.8516723170686386908097901008341396944e-9L }, { 0.999999999999999995719741386706568611352L, 2.92583615853431935792823046906895590202e-9L }, { 0.999999999999999998929935346676642152265L, 1.46291807926715968052953216186596371037e-9L } #endif }; // Define this for (cheap) consistency checks. #define DEBUG_FFTR static fftr_real fftr_pow2_table[64] = // table of powers of 2 { 1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0, 512.0, 1024.0, 2048.0, 4096.0, 8192.0, 16384.0, 32768.0, 65536.0, 131072.0, 262144.0, 524288.0, 1048576.0, 2097152.0, 4194304.0, 8388608.0, 16777216.0, 33554432.0, 67108864.0, 134217728.0, 268435456.0, 536870912.0, 1073741824.0, 2147483648.0, 4294967296.0, 8589934592.0, 17179869184.0, 34359738368.0, 68719476736.0, 137438953472.0, 274877906944.0, 549755813888.0, 1099511627776.0, 2199023255552.0, 4398046511104.0, 8796093022208.0, 17592186044416.0, 35184372088832.0, 70368744177664.0, 140737488355328.0, 281474976710656.0, 562949953421312.0, 1125899906842624.0, 2251799813685248.0, 4503599627370496.0, 9007199254740992.0, 18014398509481984.0, 36028797018963968.0, 72057594037927936.0, 144115188075855872.0, 288230376151711744.0, 576460752303423488.0, 1152921504606846976.0, 2305843009213693952.0, 4611686018427387904.0, 9223372036854775808.0 }; // For a constant expression n (0 <= n < 128), returns 2^n of type fftr_real. #define fftr_pow2(n) \ (((n) & 64 ? (fftr_real)18446744073709551616.0 : (fftr_real)1.0) \ * ((n) & 32 ? (fftr_real)4294967296.0 : (fftr_real)1.0) \ * ((n) & 16 ? (fftr_real)65536.0 : (fftr_real)1.0) \ * ((n) & 8 ? (fftr_real)256.0 : (fftr_real)1.0) \ * ((n) & 4 ? (fftr_real)16.0 : (fftr_real)1.0) \ * ((n) & 2 ? (fftr_real)4.0 : (fftr_real)1.0) \ * ((n) & 1 ? (fftr_real)2.0 : (fftr_real)1.0) \ ) // r := a * b static inline void mul (const fftr_complex& a, const fftr_complex& b, fftr_complex& r) { var fftr_real r_re = a.re * b.re - a.im * b.im; var fftr_real r_im = a.re * b.im + a.im * b.re; r.re = r_re; r.im = r_im; } static uintC shuffle (uintL n, uintC x) { var uintC y = 0; var sintC v = 1; // Invariant: y + v*shuffle(n,x). do { if (x & 1) if (x == 1) return y + (v << (n-1)); else { y = y + (v << n); v = -v; } x >>= 1; } while (!(--n == 0)); throw runtime_exception(); } #if 0 // unused static uintC invshuffle (uintL n, uintC x) { var uintC y = 0; var uintC v = 1; // Invariant: y + v*invshuffle(n,x). do { if (x == ((uintC)1 << (n-1))) return y + v; else if (x > ((uintC)1 << (n-1))) { x = ((uintC)1 << n) - x; y = y+v; } v <<= 1; } while (!(--n == 0)); throw runtime_exception(); } #endif // Compute a real convolution using FFT: z[0..N-1] := x[0..N-1] * y[0..N-1]. static void fftr_convolution (const uintL n, const uintC N, // N = 2^n fftr_real * x, // N numbers fftr_real * y, // N numbers fftr_real * z // N numbers result ) { CL_ALLOCA_STACK; var fftr_cosinus* const w = cl_alloc_array(fftr_cosinus,N>>2); var uintC i; // Initialize w[exp].c to exp(2 pi i exp/N). w[0].c = fftr_roots_of_1[0]; { var int j; for (j = n-3; j>=0; j--) { var fftr_complex r_j = fftr_roots_of_1[n-j]; w[1<>2; i += (2<>2; i++) { var fftr_real gam = w[i].c.re * (fftr_real)2.0; w[i].gam.d = gam; w[i].gam.e = (gam - (fftr_real)1.0) * (gam + (fftr_real)1.0); w[i].gam.f = (fftr_real)1.0 / gam; } var bool squaring = (x == y); // Do an FFT of length N on x. { var uintL l; for (l = n-1; l > 0; l--) { /* s = 0 */ { var const uintC tmax = (uintC)1 << l; for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // replace (x[i1],x[i2]) by // (x[i1] + x[i2], x[i1] - x[i2]) var fftr_real tmp; tmp = x[i2]; x[i2] = x[i1] - tmp; x[i1] = x[i1] + tmp; } } var const uintC smax = (uintC)1 << (n-1-l); var const uintC tmax = (uintC)1 << (l-1); for (var uintC s = 1; s < smax; s++) { var uintC exp = shuffle(n-1-l,s) << (l-1); for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; var uintC i3 = i2 + tmax; var uintC i4 = i3 + tmax; // replace (x[i1],x[i2],x[i3],x[i4]) by // (x[i1]-x[i3] - x[i4]*gam, // x[i3]*gam + x[i2]+x[i4]*(gam^2-1), // x[i1]-x[i3] + x[i4]*gam, // - x[i3]*gam + x[i2]+x[i4]*(gam^2-1)) var fftr_real sum13; var fftr_real sum24; var fftr_real tmp3; var fftr_real tmp4; sum13 = x[i1] - x[i3]; tmp3 = x[i3]*w[exp].gam.d; tmp4 = x[i4]*w[exp].gam.d; sum24 = x[i2]+x[i4]*w[exp].gam.e; x[i1] = sum13 - tmp4; x[i3] = sum13 + tmp4; x[i2] = sum24 + tmp3; x[i4] = sum24 - tmp3; } } } /* l = 0 */ { // replace (x[0],x[1]) by (x[0]+x[1], x[0]-x[1]) var fftr_real tmp; tmp = x[1]; x[1] = x[0] - tmp; x[0] = x[0] + tmp; } } // Do an FFT of length N on y. if (!squaring) { var uintL l; for (l = n-1; l > 0; l--) { /* s = 0 */ { var const uintC tmax = (uintC)1 << l; for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // replace (y[i1],y[i2]) by // (y[i1] + y[i2], y[i1] - y[i2]) var fftr_real tmp; tmp = y[i2]; y[i2] = y[i1] - tmp; y[i1] = y[i1] + tmp; } } var const uintC smax = (uintC)1 << (n-1-l); var const uintC tmax = (uintC)1 << (l-1); for (var uintC s = 1; s < smax; s++) { var uintC exp = shuffle(n-1-l,s) << (l-1); for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; var uintC i3 = i2 + tmax; var uintC i4 = i3 + tmax; // replace (y[i1],y[i2],y[i3],y[i4]) by // (y[i1]-y[i3] - y[i4]*gam, // y[i3]*gam + y[i2]+y[i4]*(gam^2-1), // y[i1]-y[i3] + y[i4]*gam, // - y[i3]*gam + y[i2]+y[i4]*(gam^2-1)) var fftr_real sum13; var fftr_real sum24; var fftr_real tmp3; var fftr_real tmp4; sum13 = y[i1] - y[i3]; tmp3 = y[i3]*w[exp].gam.d; tmp4 = y[i4]*w[exp].gam.d; sum24 = y[i2]+y[i4]*w[exp].gam.e; y[i1] = sum13 - tmp4; y[i3] = sum13 + tmp4; y[i2] = sum24 + tmp3; y[i4] = sum24 - tmp3; } } } /* l = 0 */ { // replace (y[0],y[1]) by (y[0]+y[1], y[0]-y[1]) var fftr_real tmp; tmp = y[1]; y[1] = y[0] - tmp; y[0] = y[0] + tmp; } } // Multiply the transformed vectors into z. { // Multiplication mod (z-1). z[0] = x[0] * y[0]; // Multiplication mod (z+1). z[1] = x[1] * y[1]; #if 0 // This needs w[1..2^(n-1)-1]. var const uintC smax = (uintC)1 << (n-1); for (var uintC s = 1; s < smax; s++) { // Multiplication mod (z^2 - 2 cos(2 pi j/2^n) z + 1) // with j = shuffle(n-1,s). var uintC exp = shuffle(n-1,s); var fftr_real tmp0 = x[2*s] * y[2*s]; var fftr_real tmp1 = x[2*s] * y[2*s+1] + x[2*s+1] * y[2*s]; var fftr_real tmp2 = x[2*s+1] * y[2*s+1]; z[2*s] = tmp0 - tmp2; z[2*s+1] = tmp1 + tmp2*w[exp].gam.d; } #else // This only needs w[1..2^(n-2)-1]. // Multiplication mod (z^2+1). /* s = 1 */ { var fftr_real tmp0 = x[2] * y[2]; var fftr_real tmp1 = x[2] * y[3] + x[3] * y[2]; var fftr_real tmp2 = x[3] * y[3]; z[2] = tmp0 - tmp2; z[3] = tmp1; } var const uintC smax = (uintC)1 << (n-2); for (var uintC s = 1; s < smax; s++) { var uintC exp = shuffle(n-2,s); // Multiplication mod (z^2 - 2 cos(2 pi j/2^n) z + 1) // with j = shuffle(n-1,2*s) = shuffle(n-2,s). var fftr_real gam = w[exp].gam.d; { var fftr_real tmp0 = x[4*s] * y[4*s]; var fftr_real tmp1 = x[4*s] * y[4*s+1] + x[4*s+1] * y[4*s]; var fftr_real tmp2 = x[4*s+1] * y[4*s+1]; z[4*s] = tmp0 - tmp2; z[4*s+1] = tmp1 + tmp2 * gam; } // Multiplication mod (z^2 - 2 cos(2 pi j/2^n) z + 1) // with j = shuffle(n-1,2*s+1) = 2^(n-1) - shuffle(n-2,s). { var fftr_real tmp0 = x[4*s+2] * y[4*s+2]; var fftr_real tmp1 = x[4*s+2] * y[4*s+3] + x[4*s+3] * y[4*s+2]; var fftr_real tmp2 = x[4*s+3] * y[4*s+3]; z[4*s+2] = tmp0 - tmp2; z[4*s+3] = tmp1 - tmp2 * gam; } } #endif } // Undo an FFT of length N on z. { var uintL l; /* l = 0 */ { // replace (z[0],z[1]) by ((z[0]+z[1])/2, (z[0]-z[1])/2) var fftr_real tmp; tmp = z[1]; z[1] = (z[0] - tmp) * (fftr_real)0.5; z[0] = (z[0] + tmp) * (fftr_real)0.5; } for (l = 1; l < n; l++) { /* s = 0 */ { var const uintC tmax = (uintC)1 << l; for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // replace (z[i1],z[i2]) by // ((z[i1]+z[i2])/2, (z[i1]-z[i2])/2) // Do the division by 2 later. var fftr_real tmp; tmp = z[i2]; z[i2] = z[i1] - tmp; z[i1] = z[i1] + tmp; } } var const uintC smax = (uintC)1 << (n-1-l); var const uintC tmax = (uintC)1 << (l-1); for (var uintC s = 1; s < smax; s++) { var uintC exp = shuffle(n-1-l,s) << (l-1); for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; var uintC i3 = i2 + tmax; var uintC i4 = i3 + tmax; // replace (z[i1],z[i2],z[i3],z[i4]) by // ((z[i1]+z[i3]+(z[i2]-z[i4])/gam)/2, // (z[i2]+z[i4]-(z[i3]-z[i1])/gam*(gam^2-1))/2, // (z[i2]-z[i4])/(gam*2), // (z[i3]-z[i1])/(gam*2)) // Do the division by 2 later. var fftr_real sum13; var fftr_real sum24; var fftr_real tmp3; var fftr_real tmp4; sum13 = z[i1] + z[i3]; sum24 = z[i2] + z[i4]; tmp4 = (z[i3] - z[i1]) * w[exp].gam.f; tmp3 = (z[i2] - z[i4]) * w[exp].gam.f; z[i1] = sum13 + tmp3; z[i2] = sum24 - tmp4*w[exp].gam.e; z[i3] = tmp3; z[i4] = tmp4; } } } // Do all divisions by 2 now. { var fftr_real f = (fftr_real)2.0 / (fftr_real)N; // 2^-(n-1) for (i = 0; i < N; i++) z[i] = z[i]*f; } } } // For a given k >= 2, the maximum l is determined by // 2*l < m - 1/2 - 2*k - log_2(12*k-15) - (1 if e=1.0, 0 if e=0.5). // This is a decreasing function of k. #define max_l(k) \ (int)((fftr_real_mant_bits \ - 2*(k) \ - ((k)<=2 ? 4 : (k)<=3 ? 5 : (k)<=5 ? 6 : (k)<=8 ? 7 : (k)<=16 ? 8 : (k)<=31 ? 9 : 10) \ - (fftr_real_rounds == rounds_to_nearest ? 0 : 1)) \ / 2) static int max_l_table[32+1] = { 0, 0, max_l(2), max_l(3), max_l(4), max_l(5), max_l(6), max_l(7), max_l(8), max_l(9), max_l(10), max_l(11), max_l(12), max_l(13), max_l(14), max_l(15), max_l(16), max_l(17), max_l(18), max_l(19), max_l(20), max_l(21), max_l(22), max_l(23), max_l(24), max_l(25), max_l(26), max_l(27), max_l(28), max_l(29), max_l(30), max_l(31), max_l(32) }; // Split len uintD's below sourceptr into chunks of l bits, thus filling // N real numbers at x. static void fill_factor (uintC N, fftr_real* x, uintL l, const uintD* sourceptr, uintC len) { var uintC i; if (max_l(2) > intDsize && l > intDsize) { // l > intDsize if (max_l(2) > 64 && l > 64) { throw runtime_exception("FFT problem: l > 64 not supported by pow2_table"); } var fftr_real carry = 0; var sintL carrybits = 0; // number of bits in carry (>=0, 0) { var uintD digit = lsprefnext(sourceptr); if (carrybits+intDsize >= l) { x[i] = carry + (fftr_real)(digit & bitm(l-carrybits)) * fftr_pow2_table[carrybits]; i++; carry = (l-carrybits == intDsize ? (fftr_real)0 : (fftr_real)(digit >> (l-carrybits))); carrybits = carrybits+intDsize-l; } else { carry = carry + (fftr_real)digit * fftr_pow2_table[carrybits]; carrybits = carrybits+intDsize; } len--; } if (carrybits > 0) { x[i] = carry; i++; } if (i > N) throw runtime_exception(); } else if (max_l(2) >= intDsize && l == intDsize) { // l = intDsize if (len > N) throw runtime_exception(); for (i = 0; i < len; i++) { var uintD digit = lsprefnext(sourceptr); x[i] = (fftr_real)digit; } } else { // l < intDsize var const uintD l_mask = bit(l)-1; var uintD carry = 0; var sintL carrybits = 0; // number of bits in carry (>=0, = l) { x[i] = (fftr_real)(carry & l_mask); carry >>= l; carrybits -= l; } else { if (len == 0) break; len--; var uintD digit = lsprefnext(sourceptr); x[i] = (fftr_real)((carry | (digit << carrybits)) & l_mask); carry = digit >> (l-carrybits); carrybits = intDsize - (l-carrybits); } } while (carrybits > 0) { if (!(i < N)) throw runtime_exception(); x[i] = (fftr_real)(carry & l_mask); carry >>= l; carrybits -= l; i++; } if (len > 0) throw runtime_exception(); } for ( ; i < N; i++) x[i] = (fftr_real)0; } // Given a not too large floating point number, round it to the nearest integer. static inline fftr_real fftr_fround (fftr_real x) { return #if (fftr_real_rounds == rounds_to_nearest) (x + (fftr_pow2(fftr_real_mant_bits-1)+fftr_pow2(fftr_real_mant_bits-2))) - (fftr_pow2(fftr_real_mant_bits-1)+fftr_pow2(fftr_real_mant_bits-2)); #elif (fftr_real_rounds == rounds_to_infinity) (fftr_pow2(fftr_real_mant_bits-1)+fftr_pow2(fftr_real_mant_bits-2)) - ((fftr_pow2(fftr_real_mant_bits-1)+fftr_pow2(fftr_real_mant_bits-2)) - (x + (fftr_real)0.5)); #else // rounds_to_zero, rounds_to_minus_infinity ((x + (fftr_real)0.5) + (fftr_pow2(fftr_real_mant_bits-1)+fftr_pow2(fftr_real_mant_bits-2))) - (fftr_pow2(fftr_real_mant_bits-1)+fftr_pow2(fftr_real_mant_bits-2)); #endif } // Given a not too large floating point number, round it down. static inline fftr_real fftr_ffloor (fftr_real x) { #if (fftr_real_rounds == rounds_to_nearest) var fftr_real y = (x + (fftr_pow2(fftr_real_mant_bits-1)+fftr_pow2(fftr_real_mant_bits-2))) - (fftr_pow2(fftr_real_mant_bits-1)+fftr_pow2(fftr_real_mant_bits-2)); if (y <= x) return y; else return y - (fftr_real)1.0; #elif (fftr_real_rounds == rounds_to_infinity) return (fftr_pow2(fftr_real_mant_bits-1)+fftr_pow2(fftr_real_mant_bits-2)) - ((fftr_pow2(fftr_real_mant_bits-1)+fftr_pow2(fftr_real_mant_bits-2)) - x); #else // rounds_to_zero, rounds_to_minus_infinity return (x + (fftr_pow2(fftr_real_mant_bits-1)+fftr_pow2(fftr_real_mant_bits-2))) - (fftr_pow2(fftr_real_mant_bits-1)+fftr_pow2(fftr_real_mant_bits-2)); #endif } // Combine the N real numbers at z into uintD's below destptr. // The z[i] are known to be approximately integers >= 0, < N*2^(2*l). // Assumes room for floor(N*l/intDsize)+(1+ceiling((n+2*l)/intDsize)) uintD's // below destptr. Fills len digits and returns (destptr lspop len). static uintD* unfill_product (uintL n, uintC N, // N = 2^n const fftr_real * z, uintL l, uintD* destptr) { var uintC i; if (n + 2*l <= intDsize) { // 2-digit carry is sufficient, l < intDsize var uintD carry0 = 0; var uintD carry1 = 0; var uintL shift = 0; // shift next digit before adding it to the carry, >=0, 0) { carry1 += digit >> (intDsize-shift); digit = digit << shift; } if ((carry0 += digit) < digit) carry1 += 1; shift += l; if (shift >= intDsize) { lsprefnext(destptr) = carry0; carry0 = carry1; carry1 = 0; shift -= intDsize; } } lsprefnext(destptr) = carry0; lsprefnext(destptr) = carry1; } else if (n + 2*l <= 2*intDsize) { // 3-digit carry is sufficient, l < intDsize #if HAVE_DD var uintDD carry0 = 0; var uintD carry1 = 0; var uintL shift = 0; // shift next digit before adding it to the carry, >=0, 0) { carry1 += (uintD)(digit >> (2*intDsize-shift)); digit = digit << shift; } if ((carry0 += digit) < digit) carry1 += 1; shift += l; if (shift >= intDsize) { lsprefnext(destptr) = lowD(carry0); carry0 = highlowDD(carry1,highD(carry0)); carry1 = 0; shift -= intDsize; } } lsprefnext(destptr) = lowD(carry0); lsprefnext(destptr) = highD(carry0); lsprefnext(destptr) = carry1; #else var uintD carry0 = 0; var uintD carry1 = 0; var uintD carry2 = 0; var uintL shift = 0; // shift next digit before adding it to the carry, >=0, 0) { carry2 += digit1 >> (intDsize-shift); digit1 = (digit1 << shift) | (digit0 >> (intDsize-shift)); digit0 = digit0 << shift; } if ((carry0 += digit0) < digit0) if ((carry1 += 1) == 0) carry2 += 1; if ((carry1 += digit1) < digit1) carry2 += 1; shift += l; if (shift >= intDsize) { lsprefnext(destptr) = carry0; carry0 = carry1; carry1 = carry2; carry2 = 0; shift -= intDsize; } } lsprefnext(destptr) = carry0; lsprefnext(destptr) = carry1; lsprefnext(destptr) = carry2; #endif } else { // 1-digit+1-float carry is sufficient var uintD carry0 = 0; var fftr_real carry1 = 0; var uintL shift = 0; // shift next digit before adding it to the carry, >=0, = (fftr_real)0 && z[i] > digit - (fftr_real)0.5 && z[i] < digit + (fftr_real)0.5)) throw runtime_exception(); #endif if (shift > 0) digit = digit * fftr_pow2_table[shift]; var fftr_real digit1 = fftr_ffloor(digit*((fftr_real)1.0/fftr_pow2(intDsize))); var uintD digit0 = (uintD)(digit - digit1*fftr_pow2(intDsize)); carry1 += digit1; if ((carry0 += digit0) < digit0) carry1 += (fftr_real)1.0; shift += l; while (shift >= intDsize) { lsprefnext(destptr) = carry0; var fftr_real tmp = fftr_ffloor(carry1*((fftr_real)1.0/fftr_pow2(intDsize))); carry0 = (uintD)(carry1 - tmp*fftr_pow2(intDsize)); carry1 = tmp; shift -= intDsize; } } if (carry0 > 0 || carry1 > (fftr_real)0.0) { lsprefnext(destptr) = carry0; while (carry1 > (fftr_real)0.0) { var fftr_real tmp = fftr_ffloor(carry1*((fftr_real)1.0/fftr_pow2(intDsize))); lsprefnext(destptr) = (uintD)(carry1 - tmp*fftr_pow2(intDsize)); carry1 = tmp; } } } return destptr; } static inline void mulu_fftr_nocheck (const uintD* sourceptr1, uintC len1, const uintD* sourceptr2, uintC len2, uintD* destptr) // Es ist 2 <= len1 <= len2. { // We have to find parameters l and k such that // ceiling(len1*intDsize/l) + ceiling(len2*intDsize/l) - 1 <= 2^k, // and (12*k-15)*e*2^(2*l+2*k+1/2-m) < 1/2. // Try primarily to minimize k. Minimizing l buys you nothing. var uintL k; // Computing k: If len1 and len2 differ much, we'll split source2 - // hence for the moment just substitute len1 for len2. // // First approximation of k: A necessary condition for // 2*ceiling(len1*intDsize/l) - 1 <= 2^k // is 2*len1*intDsize/l_max - 1 <= 2^k. { var const int l = max_l(2); var uintC lhs = 2*ceiling(len1*intDsize,l) - 1; // >=1 if (lhs < 3) k = 2; else integerlengthC(lhs-1, k=); // k>=2 } // Try whether this k is ok or whether we have to increase k. for ( ; ; k++) { if (k >= sizeof(max_l_table)/sizeof(max_l_table[0]) || max_l_table[k] <= 0) { throw runtime_exception("FFT problem: numbers too big, floating point precision not sufficient"); } if (2*ceiling(len1*intDsize,max_l_table[k])-1 <= ((uintC)1 << k)) break; } // We could try to reduce l, keeping the same k. But why should we? // Calculate the number of pieces in which source2 will have to be // split. Each of the pieces must satisfy // ceiling(len1*intDsize/l) + ceiling(len2*intDsize/l) - 1 <= 2^k, var uintC len2p; // Try once with k, once with k+1. Compare them. { var uintC remaining_k = ((uintC)1 << k) + 1 - ceiling(len1*intDsize,max_l_table[k]); var uintC max_piecelen_k = floor(remaining_k*max_l_table[k],intDsize); var uintC numpieces_k = ceiling(len2,max_piecelen_k); var uintC remaining_k1 = ((uintC)1 << (k+1)) + 1 - ceiling(len1*intDsize,max_l_table[k+1]); var uintC max_piecelen_k1 = floor(remaining_k1*max_l_table[k+1],intDsize); var uintC numpieces_k1 = ceiling(len2,max_piecelen_k1); if (numpieces_k <= 2*numpieces_k1) { // keep k len2p = max_piecelen_k; } else { // choose k+1 k = k+1; len2p = max_piecelen_k1; } } var const uintL l = max_l_table[k]; var const uintL n = k; var const uintC N = (uintC)1 << n; CL_ALLOCA_STACK; var fftr_real* const x = cl_alloc_array(fftr_real,N); var fftr_real* const y = cl_alloc_array(fftr_real,N); #ifdef DEBUG_FFTR var fftr_real* const z = cl_alloc_array(fftr_real,N); #else var fftr_real* const z = x; // put z in place of x - saves memory #endif var uintD* const tmpprod1 = cl_alloc_array(uintD,len1+1); var uintC tmpprod_len = floor(l< len2) len2p = len2; if (len2p == 1) { // cheap case var uintD* tmpptr = arrayLSDptr(tmpprod1,len1+1); mulu_loop_lsp(lspref(sourceptr2,0),sourceptr1,tmpptr,len1); if (addto_loop_lsp(tmpptr,destptr,len1+1)) if (inc_loop_lsp(destptr lspop (len1+1),destlen-(len1+1))) throw runtime_exception(); } else { var bool squaring = ((sourceptr1 == sourceptr2) && (len1 == len2p)); // Fill factor x. fill_factor(N,x,l,sourceptr1,len1); // Fill factor y. if (!squaring) fill_factor(N,y,l,sourceptr2,len2p); // Multiply. if (!squaring) fftr_convolution(n,N, &x[0], &y[0], &z[0]); else fftr_convolution(n,N, &x[0], &x[0], &z[0]); #ifdef DEBUG_FFTR // Check result. { var fftr_real re_lo_limit = (fftr_real)(-0.5); var fftr_real re_hi_limit = (fftr_real)N * fftr_pow2_table[l] * fftr_pow2_table[l] + (fftr_real)0.5; for (var uintC i = 0; i < N; i++) if (!(z[i] > re_lo_limit && z[i] < re_hi_limit)) throw runtime_exception(); } #endif var uintD* tmpLSDptr = arrayLSDptr(tmpprod,tmpprod_len); var uintD* tmpMSDptr = unfill_product(n,N,z,l,tmpLSDptr); var uintC tmplen = #if CL_DS_BIG_ENDIAN_P tmpLSDptr - tmpMSDptr; #else tmpMSDptr - tmpLSDptr; #endif if (tmplen > tmpprod_len) throw runtime_exception(); // Add result to destptr[-destlen..-1]: if (tmplen > destlen) { if (test_loop_msp(tmpMSDptr,tmplen-destlen)) throw runtime_exception(); tmplen = destlen; } if (addto_loop_lsp(tmpLSDptr,destptr,tmplen)) if (inc_loop_lsp(destptr lspop tmplen,destlen-tmplen)) throw runtime_exception(); } // Decrement len2. destptr = destptr lspop len2p; destlen -= len2p; sourceptr2 = sourceptr2 lspop len2p; len2 -= len2p; } while (len2 > 0); } #ifndef _CHECKSUM #define _CHECKSUM // Compute a checksum: number mod (2^intDsize-1). static uintD compute_checksum (const uintD* sourceptr, uintC len) { var uintD tmp = ~(uintD)0; // -1-(sum mod 2^intDsize-1), always >0 do { var uintD digit = lsprefnext(sourceptr); if (digit < tmp) tmp -= digit; // subtract digit else tmp -= digit+1; // subtract digit-(2^intDsize-1) } while (--len > 0); return ~tmp; } // Multiply two checksums modulo (2^intDsize-1). static inline uintD multiply_checksum (uintD checksum1, uintD checksum2) { var uintD checksum; var uintD cksum_hi; #if HAVE_DD var uintDD cksum = muluD(checksum1,checksum2); cksum_hi = highD(cksum); checksum = lowD(cksum); #else muluD(checksum1,checksum2, cksum_hi =, checksum =); #endif if ((checksum += cksum_hi) + 1 <= cksum_hi) checksum += 1; return checksum; } #endif // _CHECKSUM static void mulu_fftr (const uintD* sourceptr1, uintC len1, const uintD* sourceptr2, uintC len2, uintD* destptr) { // Compute checksums of the arguments and multiply them. var uintD checksum1 = compute_checksum(sourceptr1,len1); var uintD checksum2 = compute_checksum(sourceptr2,len2); var uintD checksum = multiply_checksum(checksum1,checksum2); mulu_fftr_nocheck(sourceptr1,len1,sourceptr2,len2,destptr); if (!(checksum == compute_checksum(destptr,len1+len2))) { throw runtime_exception("FFT problem: checksum error."); } } cln-1.3.3/src/base/digitseq/cl_DS_mul.cc0000644000000000000000000005406611201634736014660 0ustar // cl_UDS_mul(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/digitseq/cl_DS.h" // Implementation. #include "base/cl_low.h" #include "cln/malloc.h" #include "cln/exception.h" namespace cln { // Multiplikations-Doppelschleife: // Multipliziert zwei UDS und legt das Ergebnis in einer dritten UDS ab. // cl_UDS_mul(sourceptr1,len1,sourceptr2,len2,destptr); // multipliziert die UDS sourceptr1[-len1..-1] (len1>0) // mit der UDS sourceptr2[-len1..-1] (len2>0) // und legt das Ergebnis in der UDS destptr[-len..-1] (len=len1+len2) ab. // Unterhalb von destptr werden len Digits Platz benötigt. void cl_UDS_mul (const uintD* sourceptr1, uintC len1, const uintD* sourceptr2, uintC len2, uintD* destptr); // Spezialfall sourceptr1 == sourceptr2 && len1 == len2. void cl_UDS_mul_square (const uintD* sourceptr, uintC len, uintD* destptr); // Multiplikation nach Schulmethode: static inline void mulu_2loop (const uintD* sourceptr1, uintC len1, const uintD* sourceptr2, uintC len2, uintD* destptr) { // Es ist 2 <= len1 <= len2. // Erster Schleifendurchlauf: mulu_loop_lsp(lsprefnext(sourceptr1),sourceptr2,destptr,len2); lsshrink(destptr); var uintD* destptr2 = destptr lspop len2; // äußere Schleife läuft über source1 : dotimespC(len1,len1-1, { // innere Schleife läuft über source2 : var uintD carry = muluadd_loop_lsp(lsprefnext(sourceptr1),sourceptr2,destptr,len2); lsprefnext(destptr2) = carry; // UDS um das Carry-Digit verlängern lsshrink(destptr); }); } static inline void mulu_2loop_square (const uintD* sourceptr, uintC len, uintD* destptr) { // Es ist 2 <= len. // Gemischte Produkte: #if 0 // 2*( x[1] * x[0..0] * b^1 // + x[2] * x[1..0] * b^2 // + ... // + x[n-1] * x[n-2..0]*b^(n-1)) { var const uintD* sourceptr1 = sourceptr lspop 1; var uintD* destptr1 = destptr; lsprefnext(destptr1) = 0; var uintD* destptr2 = destptr1; var uintC count; for (count = 1; count < len; count++) { // sourceptr1 = sourceptr lspop count, destptr1 = destptr lspop count, // destptr2 = destptr lspop (2*count-1). lsprefnext(destptr2) = 0; var uintD carry = muluadd_loop_lsp(lsprefnext(sourceptr1),sourceptr,destptr1,count); lsprefnext(destptr2) = carry; destptr1 = destptr1 lspop 1; } { var uintD carry = shift1left_loop_lsp(destptr lspop 1,2*len-2); lspref(destptr2,0) = (carry==0 ? 0 : 1); } } #else // 2*( x[n-1..1] * x[0] * b^1 // + x[n-1..2] * x[1] * b^3 // + ... // + x[n-1..n-1] * x[n-2] * b^(2*n-3)) { var const uintD* sourceptr1 = sourceptr; var uintD* destptr2 = destptr; lsprefnext(destptr2) = 0; var uintC count = len-1; { var uintD digit = lsprefnext(sourceptr1); mulu_loop_lsp(digit,sourceptr1,destptr2,count); } var uintD* destptr1 = destptr lspop (len+1); while (--count > 0) { destptr2 = destptr2 lspop 2; var uintD digit = lsprefnext(sourceptr1); var uintD carry = muluadd_loop_lsp(digit,sourceptr1,destptr2,count); lsprefnext(destptr1) = carry; } { var uintD carry = shift1left_loop_lsp(destptr lspop 1,2*len-2); lspref(destptr1,0) = (carry==0 ? 0 : 1); } } #endif // Quadrate: len = 2*len; do { len -= 2; var uintD digit = lsprefnext(sourceptr); #if HAVE_DD var uintDD prod = muluD(digit,digit); var uintDD accu = highlowDD(lspref(destptr,1),lspref(destptr,0)); accu += prod; lspref(destptr,0) = lowD(accu); lspref(destptr,1) = highD(accu); destptr = destptr lspop 2; if (accu < prod) { inc_loop_lsp(destptr,len); } #else var uintD hi; var uintD lo; muluD(digit,digit, hi=,lo=); var uintD tmp; tmp = lspref(destptr,0) + lo; lspref(destptr,0) = tmp; if (tmp < lo) hi++; tmp = lspref(destptr,1) + hi; lspref(destptr,1) = tmp; destptr = destptr lspop 2; if (tmp < hi) { inc_loop_lsp(destptr,len); } #endif } while (len > 0); } // Karatsuba-multiplication: O(n^(log 3 / log 2)) static void mulu_karatsuba_square (const uintD* sourceptr, uintC len, uintD* destptr); #include "base/digitseq/cl_DS_mul_kara.h" // karatsuba_threshold = length, from which on Karatsuba-multiplication is a // gain and will be preferred. The break-even point is determined from // timings. The test is (progn (time (! 5000)) nil), which does many small // and some very large multiplications. The measured runtimes are: // OS: Linux 2.2, intDsize==32, OS: TRU64/4.0, intDsize==64, // Machine: P-III/450MHz Machine: EV5/300MHz: // threshold time in 0.01 sec. time in 0.01 sec. // 5 3.55 2.29 // 10 2.01 1.71 // 15 1.61 1.61 // 20 1.51 1.60 <- // 25 1.45 1.63 // 30 1.39 1.66 // 35 1.39 <- 1.67 // 40 1.39 1.71 // 45 1.40 1.75 // 50 1.41 1.78 // 55 1.41 1.79 // 60 1.44 1.84 // 65 1.44 1.85 // 70 1.43 1.85 // 75 1.45 1.89 // 80 1.47 1.91 // 90 1.51 1.96 // 100 1.53 1.97 // 150 1.62 2.13 // 250 1.75 2.19 // 500 1.87 2.17 // 1000 1.87 2.18 // 2000 1.88 2.17 // The optimum appears to be between 20 and 40. But since that optimum // depends on the ratio time(uintD-mul)/time(uintD-add) and the measured // times are more sensitive to a shift towards lower thresholds we are // careful and choose a value at the upper end: #if CL_USE_GMP const unsigned int cl_karatsuba_threshold = 35; #else const unsigned int cl_karatsuba_threshold = 16; // (In CLN version <= 1.0.3 cl_karatsuba_threshold was always 16) #endif #if 0 // Doesn't seem to be worth the effort // FFT-Multiplikation nach Nussbaumer: O(n log n log log n) #include "base/digitseq/cl_DS_mul_nuss.h" // nuss_threshold = Länge, ab der die Nussbaumer-Multiplikation bevorzugt // wird. Der Break-Even-Point bestimmt sich aus Zeitmessungen. // Multiplikation zweier N-Wort-Zahlen unter Linux mit einem 80486: // N kara nuss nuss-asm (time in sec.) // 1000 0.36 1.05 0.70 // 5000 4.69 10.0 6.71 // 25000 61.6 62.7 40.2 // 32500 91.8 62.7 40.3 // 35000 102.7 124.7 80.4 // 50000 185 132 85.2 int cl_nuss_threshold = 1000000; // FFT-Multiplikation in Z/pZ: O(n log n log log n) #include "base/digitseq/cl_DS_mul_fftp.h" // fftp_threshold = Länge, ab der die FFT-Multiplikation mod p bevorzugt // wird. Der Break-Even-Point bestimmt sich aus Zeitmessungen. // Multiplikation zweier N-Wort-Zahlen unter Linux mit einem 80486: // N kara fftp (time in sec.) // 1000 0.36 1.57 // 5000 4.66 14.86 // 25000 61.1 75.0 // 32500 90.8 75.5 // 35000 101.6 150.1 // 50000 183 160 int cl_fftp_threshold = 1000000; // FFT-Multiplikation in Z/pZ: O(n log n log log n) // für drei verschiedene Primzahlen p1,p2,p3 < 2^32. #include "base/digitseq/cl_DS_mul_fftp3.h" // fftp3_threshold = Länge, ab der die FFT-Multiplikation mod p_i bevorzugt // wird. Der Break-Even-Point bestimmt sich aus Zeitmessungen. // Multiplikation zweier N-Wort-Zahlen unter Linux mit einem 80486: // N kara fftp3 fftp (time in sec.) // 1000 0.36 0.59 1.57 // 5000 4.66 5.44 14.89 // 10000 13.98 11.91 32.43 // 25000 61.1 27.4 75.4 // 32500 90.5 28.1 75.5 // 35000 101.4 54.8 150.4 // 50000 183 58.9 161.6 int cl_fftp3_threshold = 1000000; // FFT-Multiplikation in Z/pZ: O(n log n log log n) // für drei verschiedene Primzahlen p1,p2,p3 < 2^32, // mit Montgomery-Multiplikation. #include "base/digitseq/cl_DS_mul_fftp3m.h" // fftp3_threshold = Länge, ab der die FFT-Multiplikation mod p_i bevorzugt // wird. Der Break-Even-Point bestimmt sich aus Zeitmessungen. // Multiplikation zweier N-Wort-Zahlen unter // Linux mit einem 80486, 33 MHz, mit Benutzung der GMP-Low-Level-Funktionen: // N kara fftm fftp3m fftp3 fftp (time in sec.) // 1000 0.35 0.49 0.54 0.59 1.58 // 2500 1.48 0.97 2.34 2.52 6.99 // 5000 4.43 2.19 5.08 5.48 15.16 // 10000 13.33 4.68 10.93 11.82 32.94 // 25000 58.5 12.0 25.3 27.4 77.0 // 32500 86.0 25.0 26.1 28.0 77.3 // 35000 96.5 25.0 50.8 54.9 152.8 // 50000 176 25.2 54.2 58.5 163.4 // und auf einer SPARC 20 mit 75 MHz, ohne GMP-Low-Level-Funktionen: // N kara fftm fftp3m fftp3 fftp (time in sec.) // 1000 0.076 0.096 0.113 0.233 0.415 // 2500 0.32 0.21 0.48 1.03 1.82 // 5000 0.97 0.51 1.03 2.22 3.96 // 10000 2.99 1.03 2.23 4.72 8.59 // 25000 13.22 2.73 4.99 10.78 19.73 // 32500 19.3 5.7 5.2 10.9 19.7 // 35000 21.5 5.9 10.0 21.7 39.4 // 50000 39.5 6.0 11.3 23.1 42.7 int cl_fftp3m_threshold = 1000000; #endif // FFT-Multiplikation in Z/pZ: O(n^1.29) #include "base/digitseq/cl_DS_mul_fftm.h" // fftm_threshold = length, from which on FFT multiplication mod m is a gain // and will be preferred. The break-even point is determined from timings. // The times to multiply two N-limb numbers are: // OS: Linux 2.2, intDsize==32, OS: TRU64/4.0, intDsize==64, // Machine: P-III/450MHz Machine: EV5/300MHz: // N kara fftm (time in sec.) kara fftm // 1000 0.005 0.016 0.018 0.028 // 1500 0.009 0.012 0.032 0.028 // 2000 0.015 0.025 0.053 0.052 <- // 2500 0.022 0.026 0.067 0.052 // 3000 0.029 0.027 <- 0.093 0.053 // 3500 0.035 0.037 0.12 0.031 // 4000 0.045 0.028 0.16 0.12 // 5000 0.064 0.050 0.20 0.11 // 7000 0.110 0.051 0.37 0.20 // 10000 0.19 0.11 0.61 0.26 // 20000 0.59 0.23 1.85 0.55 // 30000 1.10 0.25 3.79 0.56 // 50000 2.52 1.76 8.15 1.37 // 70000 4.41 2.30 14.09 2.94 // 100000 7.55 1.53 24.48 2.96 // More playing around with timings reveals that there are some values where // FFT multiplication is somewhat slower than Karatsuba, both for len1==len2 // and also if len1= 6 (else infinite recursion) #else // Use the old default value from CLN version <= 1.0.3 as a crude estimate. const unsigned int cl_fftm_threshold = 1250; #endif // This is the threshold for multiplication of equally sized factors. // When the lengths differ much, the threshold varies: // OS: Linux 2.2, intDsize==32, OS: TRU64/4.0, intDsize==64, // Machine: P-III/450MHz Machine: EV5/300MHz: // len2 = 3000 len1 >= 2600 len1 >= 800 // len2 = 4000 len1 >= 1500 len1 >= 700 // len2 = 5000 len1 >= 1100 len1 >= 600 // len2 = 6000 len1 >= 1300 len1 >= 700 // len2 = 7000 len1 >= 1100 len1 >= 600 // len2 = 8000 len1 >= 900 len1 >= 500 // len2 = 9000 len1 >= 1300 len1 >= 600 // len2 = 10000 len1 >= 1100 len1 >= 500 // len2 = 11000 len1 >= 1000 len1 >= 500 // len2 = 12000 len1 >= 900 len1 >= 700 // len2 = 13000 len1 >= 900 len1 >= 500 // len2 = 14000 len1 >= 900 len1 >= 600 // Here are the timigs from CLN version <= 1.0.3: // // len2 = 3000 len1 >= 800 // // len2 = 3500 len1 >= 700 // // len2 = 4000 len1 >= 580 // // len2 = 4500 len1 >= 430 // // len2 = 5000 len1 >= 370 // // len2 = 5500 len1 >= 320 // // len2 = 6000 len1 >= 500 // // len2 = 7000 len1 >= 370 // // len2 = 8000 len1 >= 330 // // len2 = 9000 len1 >= 420 // // len2 =10000 len1 >= 370 // // len2 =11000 len1 >= 330 // // len2 =12000 len1 >= 330 // // len2 =13000 len1 >= 350 // Let's choose the following condition: #if CL_USE_GMP const unsigned int cl_fftm_threshold1 = 600; #else // Use the old default values from CLN version <= 1.0.3 as a crude estimate. const unsigned int cl_fftm_threshold1 = 330; #endif const unsigned int cl_fftm_threshold2 = 2*cl_fftm_threshold; // len1 > cl_fftm_threshold1 && len2 > cl_fftm_threshold2 // && len1 >= cl_fftm_threshold1 + cl_fftm_threshold/(len2-cl_fftm_threshold1)*(cl_fftm_threshold-cl_fftm_threshold1). static inline bool cl_fftm_suitable (uintC len1, uintC len2) { if (len1 >= cl_fftm_threshold) return true; if (len1 > cl_fftm_threshold1) if (len2 > cl_fftm_threshold2) { const unsigned int prod_threshold = cl_fftm_threshold*(cl_fftm_threshold-cl_fftm_threshold1); if (len1-cl_fftm_threshold1 >= prod_threshold) return true; if (len2-cl_fftm_threshold1 >= prod_threshold) return true; var uint32 hi; var uint32 lo; mulu32(len1-cl_fftm_threshold1,len2-cl_fftm_threshold1, hi=,lo=); if (hi > 0 || lo >= prod_threshold) return true; } return false; } #if 0 // Doesn't seem to be worth the effort // FFT-Multiplikation über den komplexen Zahlen. #include "base/digitseq/cl_DS_mul_fftc.h" // Multiplikation zweier N-Wort-Zahlen unter // Linux mit einem i486 33 MHz // N kara/fftm fftc fftclong // 1000 0.35 1.52 0.94 // 2500 0.98 7.6/8.4 4.7 // 5000 2.2 18.2 10.2 // 10000 4.7 34 22 // Multiplikation zweier N-Wort-Zahlen unter // Linux mit einem i586 90/100 MHz // N kara/fftm fftc fftclong // 1000 0.03 0.20 0.16 // 2500 0.16 1.6 0.92 // 5000 0.3 2.6 2.2 // 10000 0.7 7.1 4.8 // 25000 1.6 (50MB) 20.7(22MB) // Multiplikation zweier N-Wort-Zahlen unter // Solaris, Sparc 20, 75 MHz // N kara/fftm fftc // 1000 0.07 0.14 // 2500 0.21 0.76 // 5000 0.44 1.75 // 10000 0.88 4.95 // 25000 2.3 (15MB) // FFT-Multiplikation über den komplexen Zahlen, Symmetrie ausnutzend. #include "base/digitseq/cl_DS_mul_fftcs.h" // Multiplikation zweier N-Wort-Zahlen unter // Linux mit einem i486 33 MHz // N kara/fftm fftcs fftcslong // 1000 0.34 0.71 0.43 // 2500 0.98 3.4 2.1 // 5000 2.2 8.0 4.7 // 10000 4.7 16.1 10.4 // Multiplikation zweier N-Wort-Zahlen unter // Solaris, Sparc 20, 75 MHz // N kara/fftm fftcs // 300 0.010 0.012 // 400 0.018 0.027 // 500 0.023 0.027 // 600 0.031 0.027 // 700 0.031 0.027 // 800 0.051 0.058 // 900 0.064 0.059 // 1000 0.069 0.059 // 1250 0.088 0.13 // 1500 0.088 0.13 // 1750 0.088 0.13 // 2000 0.19 0.13 // 2500 0.19 0.29 // 3000 0.19 0.33 // 3500 0.20 0.31 // 4000 0.37 0.70 // 4500 0.38 0.70 // 5000 0.43 0.69 // 6000 0.43 0.69 // 7000 0.43 1.62 // 8000 0.88 1.60 // 9000 0.88 1.6 // 10000 0.90 1.55 // 12000 0.89 4.7 // 14000 0.90 5.2 // 16000 1.43 5.2 #endif #if 0 // Keine gute Fehlerabschätzung // FFT-Multiplikation über den komplexen Zahlen, mit reellen Zahlen rechnend. #include "base/digitseq/cl_DS_mul_fftr.h" // Multiplikation zweier N-Wort-Zahlen unter // Linux mit einem i486 33 MHz // N kara/fftm fftr fftrlong // 1000 0.34 0.64 0.40 // 2500 0.98 3.5 2.0 // 5000 2.2 7.2/7.7 4.6 // 10000 4.7 16.6 10.0 #endif void cl_UDS_mul (const uintD* sourceptr1, uintC len1, const uintD* sourceptr2, uintC len2, uintD* destptr) { // len1<=len2 erzwingen: if (len1>len2) {{var const uintD* temp; temp = sourceptr1; sourceptr1 = sourceptr2; sourceptr2 = temp; } {var uintC temp; temp = len1; len1 = len2; len2 = temp; }} if (len1==1) // nur eine Einfachschleife { mulu_loop_lsp(lsprefnext(sourceptr1),sourceptr2,destptr,len2); } else { #if CL_USE_GMP && __GNU_MP__ >= 4 mpn_mul(destptr,sourceptr2,len2,sourceptr1,len1); #else if (len1 < cl_karatsuba_threshold) // Multiplikation nach Schulmethode mulu_2loop(sourceptr1,len1,sourceptr2,len2,destptr); else // len1 groß if (!cl_fftm_suitable(len1,len2)) // Karatsuba-Multiplikation // (ausgelagert, um die eigentliche Multiplikationsfunktion nicht // durch zu viele Registervariablen zu belasten): mulu_karatsuba(sourceptr1,len1,sourceptr2,len2,destptr); else //mulu_fft_modp(sourceptr1,len1,sourceptr2,len2,destptr); //mulu_nussbaumer(sourceptr1,len1,sourceptr2,len2,destptr); //mulu_fft_modp3(sourceptr1,len1,sourceptr2,len2,destptr); mulu_fft_modm(sourceptr1,len1,sourceptr2,len2,destptr); #endif #ifdef DEBUG_MUL_XXX { // Check the correctness of an other multiplication algorithm: CL_ALLOCA_STACK; var uintD* tmpprod_xxx = cl_alloc_array(uintD,len1+len2); mulu_xxx(sourceptr1,len1,sourceptr2,len2,arrayLSDptr(tmpprod_xxx,len1+len2)); if (compare_loop_msp(destptr lspop (len1+len2),arrayMSDptr(tmpprod_xxx,len1+len2),len1+len2)) throw runtime_exception(); } #endif } } // Special support for squaring. // Squaring takes approximately 69% of the time of a normal multiplication. #include "cl_DS_mul_kara_sqr.h" // defines mulu_karatsuba_square() void cl_UDS_mul_square (const uintD* sourceptr, uintC len, uintD* destptr) { if (len==1) { var uintD digit = lspref(sourceptr,0); #if HAVE_DD var uintDD prod = muluD(digit,digit); lspref(destptr,0) = lowD(prod); lspref(destptr,1) = highD(prod); #else muluD(digit,digit, lspref(destptr,1)=,lspref(destptr,0)=); #endif } else { if (len < cl_karatsuba_threshold) mulu_2loop_square(sourceptr,len,destptr); else #if CL_USE_GMP && __GNU_MP__ >= 4 mpn_mul(destptr,sourceptr,len,sourceptr,len); #else if (!(len >= cl_fftm_threshold)) mulu_karatsuba_square(sourceptr,len,destptr); else mulu_fft_modm(sourceptr,len,sourceptr,len,destptr); #endif } } } // namespace cln cln-1.3.3/src/base/digitseq/cl_DS_mul_fftm.h0000644000000000000000000004767411201634736015545 0ustar // Fast integer multiplication using FFT in a modular ring. // Bruno Haible 14.5.,16.5.1996 // FFT in the complex domain has the drawback that it needs careful round-off // error analysis. So here we choose another field of characteristic 0: Q_p. // Since Q_p contains exactly the (p-1)th roots of unity, we choose // p == 1 mod N and have the Nth roots of unity (N = 2^n) in Q_p and // even in Z_p. Actually, we compute in Z/(p^m Z). // All operations the FFT algorithm needs is addition, subtraction, // multiplication, multiplication by the Nth root and unity and division // by N. Hence we can use the domain Z/(p^m Z) even if p is not a prime! // We use the Schönhage-Strassen choice of the modulus: p = 2^R+1. This // has two big advantages: Multiplication and division by 2 (which is a // (2R)th root of unity) or a power of 2 is just a shift and an subtraction. // And multiplication mod p is just a normal multiplication, followed by // a subtraction. // In order to exploit the (2R)th root of unity for FFT, we choose R = 2^r, // and do an FFT of size M with M = 2^m and M | 2R. // Say we want to compute the product of two integers with N1 and N2 bits, // respectively. We choose N >= N1+N2 and K, R, M with // ceiling(N1/K)+ceiling(N2/K)-1 <= M (i.e. roughly N <= K*M), // 2*K+ceiling(log2(M)) <= R, // R = 2^r, M = 2^m, M | 2R. // We then split each of the factors in M K-bit chunks each, and do // an FFT mod p = 2^R+1. We then recover the convolution of the chunks // from the FFT product (the first inequality ensures that this is possible). // The second inequality ensures that we have no overflow, i.e. the // convolution result is valid in Z, not only in Z/pZ. // The computation time (bit complexity) will be proportional to // Mul(N) = O(M log(M) * O(2R)) + M * Mul(R+1). // Hence we try to choose R as small as possible. // Roughly, R >= 2*K, R >= M/2, hence R^2 >= K*M >= N. // For example, when N1 = N2 = 1000000: // Choosing R = 1024, M = 2048, K = 506, ceiling(N1/K) = ceiling(N2/K) = 1977, // M >= 3953, doesn't work. // Choosing R = 2048, M = 4096, K = 1018, ceiling(N1/K) = ceiling(N2/K) = 983, // M >= 1965, works. // Actually, we will also want intDsize | K, so that splitting into chunks // and putting together the result can be done without shifts. So // choose R = 2048, M = 4096, K = 992, ceiling(N1/K) = ceiling(N2/K) = 1009. // We see that M = 2048 suffices. // In contrast to Nussbaumer multiplication, here we can use the standard // Karatsuba algorithm for multiplication mod p = 2^R+1. We don't have to // recurse until N=1. // Define this for (cheap) consistency checks. //#define DEBUG_FFTM // Operations modulo p = 2^R+1, each chunk represented as chlen words // (chlen = floor(R/intDsize)+1). static inline void assign (const uintC R, const uintC chlen, const uintD* a, uintD* r) { unused R; copy_loop_lsp(a,r,chlen); } // r := (a + b) mod p static void addm (const uintC R, const uintC chlen, const uintD* a, const uintD* b, uintD* r) { unused R; // r := a+b. add_loop_lsp(a,b, r, chlen); #if 0 if (lspref(r,chlen-1) < ((uintD)1 << (R % intDsize))) return; if (lspref(r,chlen-1) == ((uintD)1 << (R % intDsize))) if (!DS_test_loop(r lspop (chlen-1),chlen-1,r)) return; // r >= p, so subtract r := r-p. lspref(r,chlen-1) -= ((uintD)1 << (R % intDsize)); dec_loop_lsp(r,chlen); #else if (lspref(r,chlen-1) < 1) return; if (lspref(r,chlen-1) == 1) if (!DS_test_loop(r lspop (chlen-1),chlen-1,r)) return; // r >= p, so subtract r := r-p. lspref(r,chlen-1) -= 1; dec_loop_lsp(r,chlen); #endif } // r := (a - b) mod p static void subm (const uintC R, const uintC chlen, const uintD* a, const uintD* b, uintD* r) { unused R; // r := a-b. sub_loop_lsp(a,b, r, chlen); #if 0 if ((sintD)lspref(r,chlen-1) >= 0) return; // r < 0, so add r := r+p. lspref(r,chlen-1) += ((uintD)1 << (R % intDsize)); inc_loop_lsp(r,chlen); #else if ((sintD)lspref(r,chlen-1) >= 0) return; // r < 0, so add r := r+p. lspref(r,chlen-1) += 1; inc_loop_lsp(r,chlen); #endif } // r := (a << s) mod p (0 <= s < R). // Assume that a and r don't overlap. static void shiftleftm (const uintC R, const uintC chlen, const uintD* a, uintL s, uintD* r) { // Write a = 2^(R-s)*b + c, then // a << s = 2^R*b + (c << s) = (c << s) - b. #if 0 if (chlen == 1) { // R < intDsize. var uintD b = lspref(a,0) >> (R-s); var uintD c = lspref(a,0) & (((uintD)1 << (R-s)) - 1); c = c << s; c -= b; if ((sintD)c < 0) c += ((uintD)1 << R) + 1; lspref(r,0) = c; return; } #endif // Here R >= intDsize, hence intDsize | R. if ((s % intDsize) == 0) { var uintP lenb = s/intDsize; var uintP lenc = (R-s)/intDsize; // chlen = 1 + lenb + lenc. lspref(r,lenb+lenc) = 0; copy_loop_lsp(a,r lspop lenb,lenc); copy_loop_lsp(a lspop lenc,r,lenb); if ((lspref(a,lenb+lenc) > 0) || neg_loop_lsp(r,lenb)) // -b gives carry? if (dec_loop_lsp(r lspop lenb,lenc)) // add p = 2^R+1 to compensate with carry inc_loop_lsp(r,chlen); } else { var uintP lenb = floor(s,intDsize); var uintP lenc = floor(R-s,intDsize)+1; // chlen = 1 + lenb + lenc. s = s % intDsize; lspref(r,lenb+lenc) = 0; var uintD b0 = shiftleftcopy_loop_lsp(a,r lspop lenb,lenc,s); var uintD bov; if (lenb == 0) bov = b0; else { bov = shiftleftcopy_loop_lsp(a lspop lenc,r,lenb,s); lspref(r,0) |= b0; } bov |= lspref(a,lenb+lenc) << s; if (neg_loop_lsp(r,lenb)) bov++; if (lspref(r,lenb) >= bov) lspref(r,lenb) -= bov; else { lspref(r,lenb) -= bov; if (dec_loop_lsp(r lspop (lenb+1),lenc-1)) // add p = 2^R+1 to compensate with carry inc_loop_lsp(r,chlen); } } } // r := (a * b) mod p static void mulm (const uintC R, const uintC chlen, const uintD* a, const uintD* b, uintD* r) { unused R; // The leading digits are very likely to be 0. var uintP a_len = chlen; if (lspref(a,a_len-1) == 0) do { a_len--; } while ((a_len > 0) && (lspref(a,a_len-1) == 0)); if (a_len == 0) { clear_loop_lsp(r,chlen); return; } var uintP b_len = chlen; if (lspref(b,b_len-1) == 0) do { b_len--; } while ((b_len > 0) && (lspref(b,b_len-1) == 0)); if (b_len == 0) { clear_loop_lsp(r,chlen); return; } CL_SMALL_ALLOCA_STACK; var uintD* tmp = cl_small_alloc_array(uintD,2*chlen); cl_UDS_mul(a,a_len, b,b_len, arrayLSDptr(tmp,2*chlen)); DS_clear_loop(arrayMSDptr(tmp,2*chlen),2*chlen-(a_len+b_len),arrayLSDptr(tmp,2*chlen) lspop (a_len+b_len)); // To divide c (0 <= c < p^2) by p = 2^R+1, // we set q := floor(c/2^R) and r := c - q*p = (c mod 2^R) - q. // If this becomes negative, set r := r + p (at most twice). // (This works because floor(c/p) <= q <= floor(c/p)+2.) // (Actually, here, 0 <= c <= (p-1)^2, hence // floor(c/p) <= q <= floor(c/p)+1, so we have // to set r := r + p at most once!) #if 0 if (chlen == 1) { // R < intDsize. var uintD r0 = (arrayLSref(tmp,2,0) & (((uintD)1 << R) - 1)) - ((arrayLSref(tmp,2,1) << (intDsize-R)) | (arrayLSref(tmp,2,0) >> R)); if ((sintD)r0 < 0) r0 += ((uintD)1 << R) + 1; lspref(r,0) = r0; return; } #endif // Here R >= intDsize, hence intDsize | R. // R/intDsize = chlen-1. // arrayLSref(tmp,2*chlen,2*chlen-1) = 0, arrayLSref(tmp,2*chlen,2*chlen-2) <= 1. lspref(r,chlen-1) = 0; if (sub_loop_lsp(arrayLSDptr(tmp,2*chlen),arrayLSDptr(tmp,2*chlen) lspop (chlen-1),r,chlen-1) || arrayLSref(tmp,2*chlen,2*chlen-2)) // add p = 2^R+1 to compensate with carry inc_loop_lsp(r,chlen); } // b := (a / 2) mod p static void shiftm (const uintC R, const uintC chlen, const uintD* a, uintD* b) { unused R; shiftrightcopy_loop_msp(a lspop chlen,b lspop chlen,chlen,1,0); if (lspref(a,0) & 1) { // ((a + p) >> 1) = (a >> 1) + (p>>1) + 1. #if 0 if (chlen == 1) // R < intDsize. lspref(b,0) |= ((uintD)1 << (R-1)); else #endif // intDsize | R. lspref(b,chlen-2) |= ((uintD)1 << (intDsize-1)); inc_loop_lsp(b,chlen); } } #ifndef _BIT_REVERSE #define _BIT_REVERSE // Reverse an n-bit number x. n>0. static uintC bit_reverse (uintL n, uintC x) { var uintC y = 0; do { y <<= 1; y |= (x & 1); x >>= 1; } while (!(--n == 0)); return y; } #endif static void mulu_fftm (const uintL r, const uintC R, // R = 2^r const uintL m, const uintC M, // M = 2^m const uintC k, // K = intDsize*k const uintD* sourceptr1, uintC len1, const uintD* sourceptr2, uintC len2, uintD* destptr) // Assume: // ceiling(len1/k)+ceiling(len2/k)-1 <= M, // 2*K+m <= R, // R = 2^r, M = 2^m, M | 2R. // m > 0. { var const uintC chlen = floor(R,intDsize)+1; // chunk length (in words) CL_ALLOCA_STACK; var uintD* const arrX = cl_alloc_array(uintD,chlen<= k) { copy_loop_lsp(sptr,ptr,k); clear_loop_lsp(ptr lspop k,chlen-k); sptr = sptr lspop k; slen -= k; } else { copy_loop_lsp(sptr,ptr,slen); clear_loop_lsp(ptr lspop slen,chlen-slen); i++; break; } } // X(i) := ... := X(M-1) := 0 clear_loop_up(&arrX[chlen*i],chlen*(M-i)); } if (!squaring) { var const uintD* sptr = sourceptr2; var uintC slen = len2; for (i = 0; i < M; i++) { var uintD* ptr = Y(i); if (slen >= k) { copy_loop_lsp(sptr,ptr,k); clear_loop_lsp(ptr lspop k,chlen-k); sptr = sptr lspop k; slen -= k; } else { copy_loop_lsp(sptr,ptr,slen); clear_loop_lsp(ptr lspop slen,chlen-slen); i++; break; } } // Y(i) := ... := Y(M-1) := 0 clear_loop_up(&arrY[chlen*i],chlen*(M-i)); } // Do an FFT of length M on X. w = 2^(2R/M) = 2^(2^(r+1-m)). { var sintL l; /* l = m-1 */ { var const uintC tmax = M>>1; // tmax = 2^(m-1) for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // Butterfly: replace (X(i1),X(i2)) by // (X(i1) + X(i2), X(i1) - X(i2)). assign(R,chlen, X(i2), tmp); subm(R,chlen, X(i1),tmp, X(i2)); addm(R,chlen, X(i1),tmp, X(i1)); } } for (l = m-2; l>=0; l--) { var const uintC smax = (uintC)1 << (m-1-l); var const uintC tmax = (uintC)1 << l; for (var uintC s = 0; s < smax; s++) { // w^exp = 2^(exp << (r+1-m)). var uintC exp = bit_reverse(m-1-l,s) << (r-(m-1-l)); for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Butterfly: replace (X(i1),X(i2)) by // (X(i1) + w^exp*X(i2), X(i1) - w^exp*X(i2)). shiftleftm(R,chlen, X(i2),exp, tmp); subm(R,chlen, X(i1),tmp, X(i2)); addm(R,chlen, X(i1),tmp, X(i1)); } } } } // Do an FFT of length M on Y. w = 2^(2R/M) = 2^(2^(r+1-m)). if (!squaring) { var sintL l; /* l = m-1 */ { var const uintC tmax = M>>1; // tmax = 2^(m-1) for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // Butterfly: replace (Y(i1),Y(i2)) by // (Y(i1) + Y(i2), Y(i1) - Y(i2)). assign(R,chlen, Y(i2), tmp); subm(R,chlen, Y(i1),tmp, Y(i2)); addm(R,chlen, Y(i1),tmp, Y(i1)); } } for (l = m-2; l>=0; l--) { var const uintC smax = (uintC)1 << (m-1-l); var const uintC tmax = (uintC)1 << l; for (var uintC s = 0; s < smax; s++) { // w^exp = 2^(exp << (r+1-m)). var uintC exp = bit_reverse(m-1-l,s) << (r-(m-1-l)); for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Butterfly: replace (Y(i1),Y(i2)) by // (Y(i1) + w^exp*Y(i2), Y(i1) - w^exp*Y(i2)). shiftleftm(R,chlen, Y(i2),exp, tmp); subm(R,chlen, Y(i1),tmp, Y(i2)); addm(R,chlen, Y(i1),tmp, Y(i1)); } } } } // Multiply the transformed vectors into Z. if (!squaring) { for (i = 0; i < M; i++) mulm(R,chlen, X(i),Y(i),Z(i)); } else { for (i = 0; i < M; i++) mulm(R,chlen, X(i),X(i),Z(i)); } // Undo an FFT of length M on Z. w = 2^(2R/M) = 2^(2^(r+1-m)). { var uintL l; for (l = 0; l < m-1; l++) { var const uintC smax = (uintC)1 << (m-1-l); var const uintC tmax = (uintC)1 << l; /* s = 0, exp = 0 */ { for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // Inverse Butterfly: replace (Z(i1),Z(i2)) by // ((Z(i1)+Z(i2))/2, (Z(i1)-Z(i2))/(2*w^exp)), // with exp <-- 0. addm(R,chlen, Z(i1),Z(i2), sum); subm(R,chlen, Z(i1),Z(i2), diff); shiftm(R,chlen, sum, Z(i1)); shiftm(R,chlen, diff, Z(i2)); } } for (var uintC s = 1; s < smax; s++) { // w^exp = 2^(exp << (r+1-m)). var uintC exp = bit_reverse(m-1-l,s) << (r-(m-1-l)); exp = R - exp; // negate exp (use w^-1 instead of w) for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Inverse Butterfly: replace (Z(i1),Z(i2)) by // ((Z(i1)+Z(i2))/2, (Z(i1)-Z(i2))/(2*w^exp)), // with exp <-- (M/2 - exp). addm(R,chlen, Z(i1),Z(i2), sum); subm(R,chlen, Z(i2),Z(i1), diff); // note that w^(M/2) = 2^R = -1 shiftm(R,chlen, sum, Z(i1)); shiftleftm(R,chlen, diff,exp-1, Z(i2)); } } } /* l = m-1 */ { var const uintC tmax = M>>1; // tmax = 2^(m-1) for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // Inverse Butterfly: replace (Z(i1),Z(i2)) by // ((Z(i1)+Z(i2))/2, (Z(i1)-Z(i2))/2). addm(R,chlen, Z(i1),Z(i2), sum); subm(R,chlen, Z(i1),Z(i2), diff); shiftm(R,chlen, sum, Z(i1)); shiftm(R,chlen, diff, Z(i2)); } } } var uintC zchlen = 2*k + ceiling(m,intDsize); #ifdef DEBUG_FFTM // Check that every Z(i) has at most 2*K+m bits. { var uintC zerodigits = chlen - zchlen; for (i = 0; i < M; i++) if (DS_test_loop(Z(i) lspop chlen,zerodigits,Z(i) lspop zchlen)) throw runtime_exception(); } #endif // Put together result. var uintC destlen = len1+len2; clear_loop_lsp(destptr,destlen); for (i = 0; i < M; i++, destptr = destptr lspop k, destlen -= k) { if (zchlen <= destlen) { if (addto_loop_lsp(Z(i),destptr,zchlen)) if (inc_loop_lsp(destptr lspop zchlen,destlen-zchlen)) throw runtime_exception(); } else { #ifdef DEBUG_FFTM if (DS_test_loop(Z(i) lspop zchlen,zchlen-destlen,Z(i) lspop destlen)) throw runtime_exception(); #endif if (addto_loop_lsp(Z(i),destptr,destlen)) throw runtime_exception(); } if (destlen <= k) { i++; break; } } #ifdef DEBUG_FFTM // Check that Z(i)..Z(M-1) are all zero. if (test_loop_up(&arrZ[chlen*i],chlen*(M-i))) throw runtime_exception(); #endif #undef diff #undef sum #undef tmp #undef Z #undef Y #undef X } // The running time of mulu_fftm() is roughly // O(M log(M) * O(2R)) + M * R^(1+c), where c = log3/log2 - 1 = 0.585... // Try to minimize this given the constraints // ceiling(len1/k)+ceiling(len2/k)-1 <= M, // K = intDsize*k, 2*K+m <= R, // R = 2^r, M = 2^m, M | 2R. // m > 0. // Necessary conditions: // len1+len2 <= k*(M+1), intDsize*(len1+len2) <= K*(M+1) <= (R-1)/2 * (2*R+1) < R^2. // 2*intDsize+1 <= R, log2_intDsize+1 < r. // So we start with len1 <= len2, // r := max(log2_intDsize+2,ceiling(ceiling(log2(intDsize*2*len1))/2)), R := 2^r. // try // kmax := floor((R-(r+1))/(2*intDsize)), Kmax := intDsize*kmax, // m := max(1,ceiling(log2(2*ceiling(len1/kmax)-1))), M := 2^m, // if m > r+1 retry with r <- r+1. // [Now we are sure that we can at least multiply len1 and len1 digits using these // values of r and m, symbolically (r,m) OKFOR (len1,len1).] // [Normally, we will have m=r+1 or m=r.] // For (len1,len2), we might want to split the second integer into pieces. // If (r,m) OKFOR (len1,len2) // If (r-1,m) OKFOR (len1,ceiling(len2/2)) // then use (r-1,m) and two pieces // else use (r,m) and one piece // else // q1 := number of pieces len2 needs to be splitted into to be OKFOR (r,m), // If m= log2_intDsize+2, R >= 4*intDsize, so chlen >= 5. // To avoid infinite recursion, mulu_fft_modm() must only be called with len1 > 5. static bool okfor (uintL r, uintL m, uintC len1, uintC len2) { var uintC R = (uintC)1 << r; var uintC M = (uintC)1 << m; var uintC k = floor(R-m,2*intDsize); return (ceiling(len1,k)+ceiling(len2,k) <= M+1); } static uintC numpieces (uintL r, uintL m, uintC len1, uintC len2) { var uintC R = (uintC)1 << r; var uintC M = (uintC)1 << m; var uintC k = floor(R-m,2*intDsize); var uintC piecelen2 = (M+1-ceiling(len1,k))*k; #ifdef DEBUG_FFTM if ((sintC)piecelen2 <= 0) throw runtime_exception(); #endif return ceiling(len2,piecelen2); } static void mulu_fft_modm (const uintD* sourceptr1, uintC len1, const uintD* sourceptr2, uintC len2, uintD* destptr) // Called only with 6 <= len1 <= len2. { var uint32 n; integerlengthC(len1-1, n=); // 2^(n-1) < len1 <= 2^n var uintL r; var uintL m; r = ceiling(log2_intDsize+1+n,2); if (r < log2_intDsize+2) r = log2_intDsize+2; retry: { var uintC k = floor(((uintC)1 << r) - (r+1), 2*intDsize); var uintC M = 2*ceiling(len1,k)-1; integerlengthC(M, m=); if (m == 0) m = 1; if (m > r+1) { r++; goto retry; } } #ifdef DEBUG_FFTM if (!(m > 0 && m <= r+1 && okfor(r,m,len1,len1))) throw runtime_exception(); #endif if (okfor(r,m,len1,len2)) { if ((m <= r) && (r > log2_intDsize+2) && okfor(r-1,m,len1,ceiling(len2,2))) if (!(sourceptr1 == sourceptr2 && len1 == len2)) // when squaring, keep one piece r--; } else { var uintC q1 = numpieces(r,m,len1,len2); if (m <= r) { var uintC q2 = numpieces(r,m+1,len1,len2); if (2*q2 <= q1) m++; } else { var uintC q2 = numpieces(r+1,m,len1,len2); if (3*q2 <= q1) r++; } } var uintC R = (uintC)1 << r; var uintC M = (uintC)1 << m; var uintC k = floor(R-m,2*intDsize); var uintC piecelen2 = (M+1-ceiling(len1,k))*k; if (piecelen2 >= len2) { // One piece only. mulu_fftm(r,R, m,M, k, sourceptr1,len1, sourceptr2,len2, destptr); return; } CL_ALLOCA_STACK; var uintD* tmpptr; num_stack_alloc(len1+piecelen2,,tmpptr=); var uintC destlen = len1+len2; clear_loop_lsp(destptr,destlen); do { var uintC len2p; // length of a piece of source2 len2p = piecelen2; if (len2p > len2) len2p = len2; // len2p = min(piecelen2,len2). var uintC destlenp = len1 + len2p; // destlenp = min(len1+piecelen2,destlen). // Use tmpptr[-destlenp..-1]. if (len2p == 1) { // cheap case mulu_loop_lsp(lspref(sourceptr2,0),sourceptr1,tmpptr,len1); } else if (2*len2p < piecelen2) { // semi-cheap case cl_UDS_mul(sourceptr1,len1, sourceptr2,len2p, tmpptr); } else { mulu_fftm(r,R, m,M, k, sourceptr1,len1, sourceptr2,len2p, tmpptr); } if (addto_loop_lsp(tmpptr,destptr,destlenp)) if (inc_loop_lsp(destptr lspop destlenp,destlen-destlenp)) throw runtime_exception(); // Decrement len2. destptr = destptr lspop len2p; destlen -= len2p; sourceptr2 = sourceptr2 lspop len2p; len2 -= len2p; } while (len2 > 0); } cln-1.3.3/src/base/digitseq/cl_DS_mul_fftp3.h0000644000000000000000000005273111201634736015621 0ustar // Fast integer multiplication using FFT in a modular ring. // Bruno Haible 5.5.1996, 30.6.1996 // FFT in the complex domain has the drawback that it needs careful round-off // error analysis. So here we choose another field of characteristic 0: Q_p. // Since Q_p contains exactly the (p-1)th roots of unity, we choose // p == 1 mod N and have the Nth roots of unity (N = 2^n) in Q_p and // even in Z_p. Actually, we compute in Z/(p^m Z). // All operations the FFT algorithm needs is addition, subtraction, // multiplication, multiplication by the Nth root of unity and division // by N. Hence we can use the domain Z/(p^m Z) even if p is not a prime! // We want to compute the convolution of N 32-bit words. The resulting // words are < (2^32)^2 * N. To avoid computing with numbers greater than // 32 bits, we compute in Z/pZ for three different primes p in parallel, // i.e. we compute in the ring (Z / p1 Z) x (Z / p2 Z) x (Z / p3 Z). We choose // p1 = 3*2^30+1, p2 = 13*2^28+1, p3 = 29*2^27+1 (or 15*2^27+1 or 17*2^27+1). // Because of p1*p2*p3 >= (2^32)^2 * N, the chinese remainder theorem will // faithfully combine 3 32-bit words to a word < (2^32)^2 * N. #if !(intDsize==32) #error "fft mod p implemented only for intDsize==32" #endif static const uint32 p1 = 1+(3<<30); // = 3221225473 static const uint32 p2 = 1+(13<<28); // = 3489660929 static const uint32 p3 = 1+(29<<27); // = 3892314113 typedef struct { uint32 w1; // remainder mod p1 uint32 w2; // remainder mod p2 uint32 w3; // remainder mod p3 } fftp3_word; static const fftp3_word fftp3_roots_of_1 [27+1] = // roots_of_1[n] is a (2^n)th root of unity in our ring. // (Also roots_of_1[n-1] = roots_of_1[n]^2, but we don't need this.) { { 1, 1, 1 }, { 3221225472, 3489660928, 3892314112 }, { 1013946479, 1647819299, 800380159 }, { 1031213943, 1728043888, 1502037594 }, { 694614138, 156262243, 1093602721 }, { 347220834, 408915340, 491290336 }, { 680684264, 452506952, 846570852 }, { 1109768284, 1230864251, 390870396 }, { 602134989, 11914870, 1791906422 }, { 1080308101, 336213294, 158126993 }, { 381653707, 1548648704, 1432108380 }, { 902453688, 429650884, 798472051 }, { 1559299664, 775532293, 1877725713 }, { 254499731, 727160889, 1192318337 }, { 1376063215, 1557302953, 1642774092 }, { 1284040478, 937059094, 1876917422 }, { 336664489, 1411926644, 682311165 }, { 894491787, 534027329, 473693773 }, { 795860341, 1178663675, 1313928891 }, { 23880336, 1707047452, 93147496 }, { 790585193, 892284267, 1647947905 }, { 877386874, 1729337527, 1233672227 }, { 1510644826, 333000282, 296593948 }, { 353060343, 901807544, 659274384 }, { 716717815, 1281544649, 1457308949 }, { 1020271667, 1713714919, 627726344 }, { 139914905, 950720020, 1119863241 }, { 709308748, 675675166, 538726428 } }; // Define this for (cheap) consistency checks. //#define DEBUG_FFTP3 // Define this for extensive consistency checks. //#define DEBUG_FFTP3_OPERATIONS // Define the algorithm of the backward FFT: // Either FORWARD (a normal FFT followed by a permutation) // or RECIPROOT (an FFT with reciprocal root of unity) // or CLEVER (an FFT with reciprocal root of unity but clever computation // of the reciprocals). // Drawback of FORWARD: the permutation pass. // Drawback of RECIPROOT: need all the powers of the root, not only half of them. #define FORWARD 42 #define RECIPROOT 43 #define CLEVER 44 #define FFTP3_BACKWARD CLEVER #ifdef DEBUG_FFTP3_OPERATIONS #define check_fftp3_word(x) if ((x.w1 >= p1) || (x.w2 >= p2) || (x.w3 >= p3)) throw runtime_exception() #else #define check_fftp3_word(x) #endif // r := 0 mod p static inline void zerop3 (fftp3_word& r) { r.w1 = 0; r.w2 = 0; r.w3 = 0; } // r := x mod p static inline void setp3 (uint32 x, fftp3_word& r) { if (p1 >= ((uint32)1 << 31)) r.w1 = (x >= p1 ? x - p1 : x); else divu_3232_3232(x,p1, ,r.w1=); if (p2 >= ((uint32)1 << 31)) r.w2 = (x >= p2 ? x - p2 : x); else divu_3232_3232(x,p2, ,r.w2=); if (p3 >= ((uint32)1 << 31)) r.w3 = (x >= p3 ? x - p3 : x); else divu_3232_3232(x,p3, ,r.w3=); } // Chinese remainder theorem: // (Z / p1 Z) x (Z / p2 Z) x (Z / p3 Z) == Z / p1*p2*p3 Z = Z / P Z. // Return r as an integer >= 0, < p1*p2*p3, as 3-digit-sequence res. static void combinep3 (const fftp3_word& r, uintD* resLSDptr) { check_fftp3_word(r); // Compute e1 * r.w1 + e2 * r.w2 + e3 * r.w3 where the idempotents are // found as: xgcd(pi,p/pi) = 1 = ui*pi + vi*P/pi, ei = 1 - ui*pi. // e1 = 35002755423056150739595925972 // e2 = 14584479687667766215746868453 // e3 = 37919651490985126265126719818 // Since e1+e2+e3 > 2*P, we prefer to compute with the negated // idempotents, their sum is < P: // -e1 = 8750687877798370870638831149 // -e2 = 29168963613186755394487888668 // -e3 = 5833791809869395345108037303 // We will have 0 <= -e1 * r.w1 + -e2 * r.w2 + -e3 * r.w3 < // < -e1 * p1 + -e2 * p2 + -e3 * p3 < 2^32 * p1*p2*p3 < 2^128. // The sum of the products fits in 4 digits, we divide by p1*p2*p3 // as a 3-digit sequence and finally negate the remainder. #if CL_DS_BIG_ENDIAN_P var const uintD p123 [3] = { 0x8D600002, 0x06800002, 0x78000001 }; var const uintD e1 [3] = { 0x1C46663C, 0x647FFF9D, 0x7E66662D }; var const uintD e2 [3] = { 0x5E40004D, 0xEDAAAB66, 0xEAAAAB1C }; var const uintD e3 [3] = { 0x12D99977, 0xB45554FE, 0x0EEEEEB7 }; #else var const uintD p123 [3] = { 0x78000001, 0x06800002, 0x8D600002 }; var const uintD e1 [3] = { 0x7E66662D, 0x647FFF9D, 0x1C46663C }; var const uintD e2 [3] = { 0xEAAAAB1C, 0xEDAAAB66, 0x5E40004D }; var const uintD e3 [3] = { 0x0EEEEEB7, 0xB45554FE, 0x12D99977 }; #endif var uintD sum [4]; var uintD* const sumLSDptr = arrayLSDptr(sum,4); mulu_loop_lsp(r.w1,arrayLSDptr(e1,3), sumLSDptr,3); lspref(sumLSDptr,3) += muluadd_loop_lsp(r.w2,arrayLSDptr(e2,3), sumLSDptr,3); lspref(sumLSDptr,3) += muluadd_loop_lsp(r.w3,arrayLSDptr(e3,3), sumLSDptr,3); #if 0 {CL_ALLOCA_STACK; var DS q; var DS r; UDS_divide(arrayMSDptr(sum,4),4,arrayLSDptr(sum,4), arrayMSDptr(p123,3),3,arrayLSDptr(p123,3), &q,&r ); ASSERT(q.len <= 1) ASSERT(r.len <= 3) copy_loop_lsp(r.LSDptr,arrayLSDptr(sum,4),r.len); DS_clear_loop(arrayMSDptr(sum,4) mspop 1,3-r.len,arrayLSDptr(sum,4) lspop r.len); } #else // Division wie UDS_divide mit a_len=4, b_len=3. { var uintD q_stern; var uintD c1; #if HAVE_DD divuD(highlowDD(lspref(sumLSDptr,3),lspref(sumLSDptr,2)),lspref(arrayLSDptr(p123,3),2), q_stern=,c1=); { var uintDD c2 = highlowDD(c1,lspref(sumLSDptr,1)); var uintDD c3 = muluD(lspref(arrayLSDptr(p123,3),1),q_stern); if (c3 > c2) { q_stern = q_stern-1; if (c3-c2 > highlowDD(lspref(arrayLSDptr(p123,3),2),lspref(arrayLSDptr(p123,3),1))) { q_stern = q_stern-1; } } } #else divuD(lspref(sumLSDptr,3),lspref(sumLSDptr,2),lspref(arrayLSDptr(p123,3),2), q_stern=,c1=); { var uintD c2lo = lspref(sumLSDptr,1); var uintD c3hi; var uintD c3lo; muluD(lspref(arrayLSDptr(p123,3),1),q_stern, c3hi=,c3lo=); if ((c3hi > c1) || ((c3hi == c1) && (c3lo > c2lo))) { q_stern = q_stern-1; c3hi -= c1; if (c3lo < c2lo) { c3hi--; }; c3lo -= c2lo; if ((c3hi > lspref(arrayLSDptr(p123,3),2)) || ((c3hi == lspref(arrayLSDptr(p123,3),2)) && (c3lo > lspref(arrayLSDptr(p123,3),1)))) { q_stern = q_stern-1; } } } #endif if (!(q_stern==0)) { var uintD carry = mulusub_loop_lsp(q_stern,arrayLSDptr(p123,3),sumLSDptr,3); if (carry > lspref(sumLSDptr,3)) { q_stern = q_stern-1; addto_loop_lsp(arrayLSDptr(p123,3),sumLSDptr,3); } } } #endif if (lspref(sumLSDptr,0)==0 && lspref(sumLSDptr,1)==0 && lspref(sumLSDptr,2)==0) { clear_loop_lsp(resLSDptr,3); } else { sub_loop_lsp(arrayLSDptr(p123,3),sumLSDptr,resLSDptr,3); } } // r := (a + b) mod p static inline void addp3 (const fftp3_word& a, const fftp3_word& b, fftp3_word& r) { var uint32 x; check_fftp3_word(a); check_fftp3_word(b); // Add single 32-bit words mod pi. if (((x = (a.w1 + b.w1)) < b.w1) || (x >= p1)) x -= p1; r.w1 = x; if (((x = (a.w2 + b.w2)) < b.w2) || (x >= p2)) x -= p2; r.w2 = x; if (((x = (a.w3 + b.w3)) < b.w3) || (x >= p3)) x -= p3; r.w3 = x; check_fftp3_word(r); } // r := (a - b) mod p static inline void subp3 (const fftp3_word& a, const fftp3_word& b, fftp3_word& r) { check_fftp3_word(a); check_fftp3_word(b); // Subtract single 32-bit words mod pi. r.w1 = (a.w1 < b.w1 ? a.w1-b.w1+p1 : a.w1-b.w1); r.w2 = (a.w2 < b.w2 ? a.w2-b.w2+p2 : a.w2-b.w2); r.w3 = (a.w3 < b.w3 ? a.w3-b.w3+p3 : a.w3-b.w3); check_fftp3_word(r); } // r := (a * b) mod p static void mulp3 (const fftp3_word& a, const fftp3_word& b, fftp3_word& res) { check_fftp3_word(a); check_fftp3_word(b); // To divide c (0 <= c < p^2) by p = m*2^n+1, // we set q := floor(floor(c/2^n)/m) and // r := c - q*p = (floor(c/2^n) mod m)*2^n + (c mod 2^n) - q. // If this becomes negative, set r := r + p (at most twice). // (This works because floor(c/p) <= q <= floor(c/p)+2.) // (Actually, here, 0 <= c <= (p-1)^2, hence // floor(c/p) <= q <= floor(c/p)+1, so we have // to set r := r + p at most once!) #if 1 #define mul_mod_p(aw,bw,result_zuweisung,p,n,m) \ { \ var uint32 hi; \ var uint32 lo; \ mulu32(aw,bw, hi=,lo=); \ divu_6432_3232(hi,lo,p, ,result_zuweisung); \ } #else #define mul_mod_p(aw,bw,result_zuweisung,p,n,m) \ { \ var uint32 hi; \ var uint32 lo; \ mulu32(aw,bw, hi=,lo=); \ var uint32 q; \ var uint32 r; \ divu_6432_3232(hi>>n,(hi<<(32-n))|(lo>>n), m, q=,r=); \ r = (r << n) | (lo & (((uint32)1<= q) { r = r-q; } else { r = r-q+p; } \ result_zuweisung r; \ } #endif // p1 = 3*2^30+1, n = 30, m = 3 mul_mod_p(a.w1,b.w1,res.w1=,p1,30,3); // p2 = 13*2^28+1, n = 28, m = 13 mul_mod_p(a.w2,b.w2,res.w2=,p2,28,13); // p3 = 29*2^27+1, n = 27, m = 29 mul_mod_p(a.w3,b.w3,res.w3=,p3,27,29); #undef mul_mod_p check_fftp3_word(res); } #ifdef DEBUG_FFTP3_OPERATIONS static void mulp3_doublecheck (const fftp3_word& a, const fftp3_word& b, fftp3_word& r) { fftp3_word zero, ma, mb, or; zerop3(zero); subp3(zero,a, ma); subp3(zero,b, mb); mulp3(ma,mb, or); mulp3(a,b, r); if (!((r.w1 == or.w1) && (r.w2 == or.w2) && (r.w3 == or.w3))) throw runtime_exception(); } #define mulp3 mulp3_doublecheck #endif /* DEBUG_FFTP3_OPERATIONS */ // b := (a / 2) mod p static inline void shiftp3 (const fftp3_word& a, fftp3_word& b) { check_fftp3_word(a); b.w1 = (a.w1 & 1 ? (a.w1 >> 1) + (p1 >> 1) + 1 : (a.w1 >> 1)); b.w2 = (a.w2 & 1 ? (a.w2 >> 1) + (p2 >> 1) + 1 : (a.w2 >> 1)); b.w3 = (a.w3 & 1 ? (a.w3 >> 1) + (p3 >> 1) + 1 : (a.w3 >> 1)); check_fftp3_word(b); } #ifndef _BIT_REVERSE #define _BIT_REVERSE // Reverse an n-bit number x. n>0. static uintC bit_reverse (uintL n, uintC x) { var uintC y = 0; do { y <<= 1; y |= (x & 1); x >>= 1; } while (!(--n == 0)); return y; } #endif // Compute an convolution mod p using FFT: z[0..N-1] := x[0..N-1] * y[0..N-1]. static void fftp3_convolution (const uintL n, const uintC N, // N = 2^n fftp3_word * x, // N words fftp3_word * y, // N words fftp3_word * z // N words result ) { CL_ALLOCA_STACK; #if (FFTP3_BACKWARD == RECIPROOT) || defined(DEBUG_FFTP3) var fftp3_word* const w = cl_alloc_array(fftp3_word,N); #else var fftp3_word* const w = cl_alloc_array(fftp3_word,(N>>1)+1); #endif var uintC i; // Initialize w[i] to w^i, w a primitive N-th root of unity. w[0] = fftp3_roots_of_1[0]; w[1] = fftp3_roots_of_1[n]; #if (FFTP3_BACKWARD == RECIPROOT) || defined(DEBUG_FFTP3) for (i = 2; i < N; i++) mulp3(w[i-1],fftp3_roots_of_1[n], w[i]); #else // need only half of the roots for (i = 2; i < N>>1; i++) mulp3(w[i-1],fftp3_roots_of_1[n], w[i]); #endif #ifdef DEBUG_FFTP3 // Check that w is really a primitive N-th root of unity. { var fftp3_word w_N; mulp3(w[N-1],fftp3_roots_of_1[n], w_N); if (!(w_N.w1 == 1 && w_N.w2 == 1 && w_N.w3 == 1)) throw runtime_exception(); w_N = w[N>>1]; if (!(w_N.w1 == p1-1 && w_N.w2 == p2-1 && w_N.w3 == p3-1)) throw runtime_exception(); } #endif var bool squaring = (x == y); // Do an FFT of length N on x. { var sintL l; /* l = n-1 */ { var const uintC tmax = N>>1; // tmax = 2^(n-1) for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // Butterfly: replace (x(i1),x(i2)) by // (x(i1) + x(i2), x(i1) - x(i2)). var fftp3_word tmp; tmp = x[i2]; subp3(x[i1],tmp, x[i2]); addp3(x[i1],tmp, x[i1]); } } for (l = n-2; l>=0; l--) { var const uintC smax = (uintC)1 << (n-1-l); var const uintC tmax = (uintC)1 << l; for (var uintC s = 0; s < smax; s++) { var uintC exp = bit_reverse(n-1-l,s) << l; for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Butterfly: replace (x(i1),x(i2)) by // (x(i1) + w^exp*x(i2), x(i1) - w^exp*x(i2)). var fftp3_word tmp; mulp3(x[i2],w[exp], tmp); subp3(x[i1],tmp, x[i2]); addp3(x[i1],tmp, x[i1]); } } } } // Do an FFT of length N on y. if (!squaring) { var sintL l; /* l = n-1 */ { var uintC const tmax = N>>1; // tmax = 2^(n-1) for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // Butterfly: replace (y(i1),y(i2)) by // (y(i1) + y(i2), y(i1) - y(i2)). var fftp3_word tmp; tmp = y[i2]; subp3(y[i1],tmp, y[i2]); addp3(y[i1],tmp, y[i1]); } } for (l = n-2; l>=0; l--) { var const uintC smax = (uintC)1 << (n-1-l); var const uintC tmax = (uintC)1 << l; for (var uintC s = 0; s < smax; s++) { var uintC exp = bit_reverse(n-1-l,s) << l; for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Butterfly: replace (y(i1),y(i2)) by // (y(i1) + w^exp*y(i2), y(i1) - w^exp*y(i2)). var fftp3_word tmp; mulp3(y[i2],w[exp], tmp); subp3(y[i1],tmp, y[i2]); addp3(y[i1],tmp, y[i1]); } } } } // Multiply the transformed vectors into z. for (i = 0; i < N; i++) mulp3(x[i],y[i], z[i]); // Undo an FFT of length N on z. { var uintL l; for (l = 0; l < n-1; l++) { var const uintC smax = (uintC)1 << (n-1-l); var const uintC tmax = (uintC)1 << l; #if FFTP3_BACKWARD != CLEVER for (var uintC s = 0; s < smax; s++) { var uintC exp = bit_reverse(n-1-l,s) << l; #if FFTP3_BACKWARD == RECIPROOT if (exp > 0) exp = N - exp; // negate exp (use w^-1 instead of w) #endif for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Inverse Butterfly: replace (z(i1),z(i2)) by // ((z(i1)+z(i2))/2, (z(i1)-z(i2))/(2*w^exp)). var fftp3_word sum; var fftp3_word diff; addp3(z[i1],z[i2], sum); subp3(z[i1],z[i2], diff); shiftp3(sum, z[i1]); mulp3(diff,w[exp], diff); shiftp3(diff, z[i2]); } } #else // FFTP3_BACKWARD == CLEVER: clever handling of negative exponents /* s = 0, exp = 0 */ { for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // Inverse Butterfly: replace (z(i1),z(i2)) by // ((z(i1)+z(i2))/2, (z(i1)-z(i2))/(2*w^exp)), // with exp <-- 0. var fftp3_word sum; var fftp3_word diff; addp3(z[i1],z[i2], sum); subp3(z[i1],z[i2], diff); shiftp3(sum, z[i1]); shiftp3(diff, z[i2]); } } for (var uintC s = 1; s < smax; s++) { var uintC exp = bit_reverse(n-1-l,s) << l; exp = (N>>1) - exp; // negate exp (use w^-1 instead of w) for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Inverse Butterfly: replace (z(i1),z(i2)) by // ((z(i1)+z(i2))/2, (z(i1)-z(i2))/(2*w^exp)), // with exp <-- (N/2 - exp). var fftp3_word sum; var fftp3_word diff; addp3(z[i1],z[i2], sum); subp3(z[i2],z[i1], diff); // note that w^(N/2) = -1 shiftp3(sum, z[i1]); mulp3(diff,w[exp], diff); shiftp3(diff, z[i2]); } } #endif } /* l = n-1 */ { var const uintC tmax = N>>1; // tmax = 2^(n-1) for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // Inverse Butterfly: replace (z(i1),z(i2)) by // ((z(i1)+z(i2))/2, (z(i1)-z(i2))/2). var fftp3_word sum; var fftp3_word diff; addp3(z[i1],z[i2], sum); subp3(z[i1],z[i2], diff); shiftp3(sum, z[i1]); shiftp3(diff, z[i2]); } } } #if FFTP3_BACKWARD == FORWARD // Swap z[i] and z[N-i] for 0 < i < N/2. for (i = (N>>1)-1; i > 0; i--) { var fftp3_word tmp = z[i]; z[i] = z[N-i]; z[N-i] = tmp; } #endif } static void mulu_fft_modp3 (const uintD* sourceptr1, uintC len1, const uintD* sourceptr2, uintC len2, uintD* destptr) // Es ist 2 <= len1 <= len2. { // Methode: // source1 ist ein Stück der Länge N1, source2 ein oder mehrere Stücke // der Länge N2, mit N1+N2 <= N, wobei N Zweierpotenz ist. // sum(i=0..N-1, x_i b^i) * sum(i=0..N-1, y_i b^i) wird errechnet, // indem man die beiden Polynome // sum(i=0..N-1, x_i T^i), sum(i=0..N-1, y_i T^i) // multipliziert, und zwar durch Fourier-Transformation (s.o.). var uint32 n; integerlengthC(len1-1, n=); // 2^(n-1) < len1 <= 2^n var uintC len = (uintC)1 << n; // kleinste Zweierpotenz >= len1 // Wählt man N = len, so hat man ceiling(len2/(len-len1+1)) * FFT(len). // Wählt man N = 2*len, so hat man ceiling(len2/(2*len-len1+1)) * FFT(2*len). // Wir wählen das billigere von beiden: // Bei ceiling(len2/(len-len1+1)) <= 2 * ceiling(len2/(2*len-len1+1)) // nimmt man N = len, bei ....... > ........ dagegen N = 2*len. // (Wahl von N = 4*len oder mehr bringt nur in Extremfällen etwas.) if (len2 > 2 * (len-len1+1) * (len2 <= (2*len-len1+1) ? 1 : ceiling(len2,(2*len-len1+1)))) { n = n+1; len = len << 1; } var const uintC N = len; // N = 2^n CL_ALLOCA_STACK; var fftp3_word* const x = cl_alloc_array(fftp3_word,N); var fftp3_word* const y = cl_alloc_array(fftp3_word,N); #ifdef DEBUG_FFTP3 var fftp3_word* const z = cl_alloc_array(fftp3_word,N); #else var fftp3_word* const z = x; // put z in place of x - saves memory #endif var uintD* const tmpprod = cl_alloc_array(uintD,len1+1); var uintP i; var uintC destlen = len1+len2; clear_loop_lsp(destptr,destlen); do { var uintC len2p; // length of a piece of source2 len2p = N - len1 + 1; if (len2p > len2) len2p = len2; // len2p = min(N-len1+1,len2). if (len2p == 1) { // cheap case var uintD* tmpptr = arrayLSDptr(tmpprod,len1+1); mulu_loop_lsp(lspref(sourceptr2,0),sourceptr1,tmpptr,len1); if (addto_loop_lsp(tmpptr,destptr,len1+1)) if (inc_loop_lsp(destptr lspop (len1+1),destlen-(len1+1))) throw runtime_exception(); } else { var uintC destlenp = len1 + len2p - 1; // destlenp = min(N,destlen-1). var bool squaring = ((sourceptr1 == sourceptr2) && (len1 == len2p)); // Fill factor x. { for (i = 0; i < len1; i++) setp3(lspref(sourceptr1,i), x[i]); for (i = len1; i < N; i++) zerop3(x[i]); } // Fill factor y. if (!squaring) { for (i = 0; i < len2p; i++) setp3(lspref(sourceptr2,i), y[i]); for (i = len2p; i < N; i++) zerop3(y[i]); } // Multiply. if (!squaring) fftp3_convolution(n,N, &x[0], &y[0], &z[0]); else fftp3_convolution(n,N, &x[0], &x[0], &z[0]); // Add result to destptr[-destlen..-1]: { var uintD* ptr = destptr; // ac2|ac1|ac0 are an accumulator. var uint32 ac0 = 0; var uint32 ac1 = 0; var uint32 ac2 = 0; var uint32 tmp; for (i = 0; i < destlenp; i++) { // Convert z[i] to a 3-digit number. var uintD z_i[3]; combinep3(z[i],arrayLSDptr(z_i,3)); #ifdef DEBUG_FFTP3 if (!(arrayLSref(z_i,3,2) < N)) throw runtime_exception(); #endif // Add z[i] to the accumulator. tmp = arrayLSref(z_i,3,0); if ((ac0 += tmp) < tmp) { if (++ac1 == 0) ++ac2; } tmp = arrayLSref(z_i,3,1); if ((ac1 += tmp) < tmp) ++ac2; tmp = arrayLSref(z_i,3,2); ac2 += tmp; // Add the accumulator's least significant word to destptr: tmp = lspref(ptr,0); if ((ac0 += tmp) < tmp) { if (++ac1 == 0) ++ac2; } lspref(ptr,0) = ac0; lsshrink(ptr); ac0 = ac1; ac1 = ac2; ac2 = 0; } // ac2 = 0. if (ac1 > 0) { if (!((i += 2) <= destlen)) throw runtime_exception(); tmp = lspref(ptr,0); if ((ac0 += tmp) < tmp) ++ac1; lspref(ptr,0) = ac0; lsshrink(ptr); tmp = lspref(ptr,0); ac1 += tmp; lspref(ptr,0) = ac1; lsshrink(ptr); if (ac1 < tmp) if (inc_loop_lsp(ptr,destlen-i)) throw runtime_exception(); } else if (ac0 > 0) { if (!((i += 1) <= destlen)) throw runtime_exception(); tmp = lspref(ptr,0); ac0 += tmp; lspref(ptr,0) = ac0; lsshrink(ptr); if (ac0 < tmp) if (inc_loop_lsp(ptr,destlen-i)) throw runtime_exception(); } } #ifdef DEBUG_FFTP3 // If destlenp < N, check that the remaining z[i] are 0. for (i = destlenp; i < N; i++) if (z[i].w1 > 0 || z[i].w2 > 0 || z[i].w3 > 0) throw runtime_exception(); #endif } // Decrement len2. destptr = destptr lspop len2p; destlen -= len2p; sourceptr2 = sourceptr2 lspop len2p; len2 -= len2p; } while (len2 > 0); } cln-1.3.3/src/base/digitseq/cl_DS_mul_fftp3m.h0000644000000000000000000007353611201634736016004 0ustar // Fast integer multiplication using FFT in a modular ring. // Bruno Haible 5.5.1996, 30.6.1996, 20.8.1996 // FFT in the complex domain has the drawback that it needs careful round-off // error analysis. So here we choose another field of characteristic 0: Q_p. // Since Q_p contains exactly the (p-1)th roots of unity, we choose // p == 1 mod N and have the Nth roots of unity (N = 2^n) in Q_p and // even in Z_p. Actually, we compute in Z/(p^m Z). // All operations the FFT algorithm needs is addition, subtraction, // multiplication, multiplication by the Nth root of unity and division // by N. Hence we can use the domain Z/(p^m Z) even if p is not a prime! // We want to compute the convolution of N 32-bit words. The resulting // words are < (2^32)^2 * N. To avoid computing with numbers greater than // 32 bits, we compute in Z/pZ for three different primes p in parallel, // i.e. we compute in the ring (Z / p1 Z) x (Z / p2 Z) x (Z / p3 Z). We choose // p1 = 3*2^30+1, p2 = 15*2^27+1, p3 = 7*2^26+1. // Because of p1*p2*p3 >= 2^91 >= (2^32)^2 * N, the chinese remainder theorem // will faithfully combine 3 32-bit words to a word < (2^32)^2 * N. // Furthermore we use Montgomery's modular multiplication trick // [Peter L. Montgomery: Modular multiplication without trial division, // Mathematics of Computation 44 (1985), 519-521.] // // Assume we want to compute modulo M, M odd. V and N will be chosen // so that V*N==1 mod M and that (a,b) --> a*b*V mod M can be more easily // computed than (a,b) --> a*b mod M. Then, we have a ring isomorphism // (Z/MZ, +, * mod M) \isomorph (Z/MZ, +, (a,b) --> a*b*V mod M) // x mod M --------> x*N mod M // It is thus preferrable to use x*N mod M as a "representation" of x mod M, // especially for computations which involve at least several multiplications. // // The precise algorithm to compute a*b*V mod M, given a and b, and the choice // of N and V depend on M and on the hardware. The general idea is this: // Choose N = 2^n, so that division by N is easy. Recall that V == N^-1 mod M. // 1. Given a and b as m-bit numbers (M <= 2^m), compute a*b in full // precision. // 2. Write a*b = c*N+d, i.e. split it into components c and d. // 3. Now a*b*V = c*N*V+d*V == c+d*V mod M. // 4. Instead of computing d*V mod M // a. by full multiplication and then division mod M, or // b. by left shifts: repeated application of // x := 2*x+(0 or 1); if (x >= M) { x := x-M; } // we compute // c. by right shifts (recall that d*V == d*2^-n mod M): repeated application // of if (x odd) { x := (x+M)/2; } else { x := x/2; } // Usually one will choose N = 2^m, so that c and d have both m bits. // Several variations are possible: In step 4 one can implement the right // shifts in hardware. Or (for example when N = 2^160 and working on a // 32-bit machine) one can do 32 shift steps at the same time: // Choose M' == M^-1 mod 2^32 and compute n/32 times // x := (x - ((x mod 2^32) * M' mod 2^32) * M) / 2^32. // // Here, we deal with moduli M = p_i = j*2^k+1. These form of primes comes // in because we need 2^n-th roots of unity mod M. But is also comes handy // for Montgomery multiplication: Instead of choosing N = 2^32 (which makes // up for very easy splitting in step 1) and V = j^2*2^(2*k-32), we better // choose N = 2^k and V = -j. The algorithm now goes like this (recall that // M is an m-bit number and j is an (m-k)-bit number): // 1. Compute a*b in full precision, as a 2*m <= 64 bit number. // 2. Split a*b = c*N+d, with c an (2m-k)-bit number and d an k-bit number. // 3. a*b*V == c+d*V mod M. // 4. Compute c mod M by splitting off the leading (m-k+1) bits of c and // using table lookup; the remainder (c mod 2^(m-1)) is already reduced // mod M. // Compute d*|V| the standard way; |V| has only few bits. d*|V| is // already reduced mod M, because d*|V| < j*2^k < M. // In order to get best performance, we carefully choose the primes so that // a. the table of size 2^(m-k+1) doesn't get too large, // b. multiplication by V is easy. // Here is a list of the interesting primes < 2^32: // // U*M+V*N = 1 // prime bits N=2^n V U 2m<=n+32 ? // M m n // // 3*2^30+1 32 30 -3 1 n (*) // // 13*2^28+1 32 28 -13 1 n // // 15*2^27+1 31 27 -15 1 n (*) // 17*2^27+1 32 27 -17 1 n // 29*2^27+1 32 27 -29 1 n // // 7*2^26+1 29 26 -7 1 y (*) // 27*2^26+1 31 26 -27 1 n // 37*2^26+1 32 26 -37 1 n // 43*2^26+1 32 26 -43 1 n // // 5*2^25+1 28 25 -5 1 y // 33*2^25+1 31 25 -33 1 n // 51*2^25+1 31 25 -51 1 n // 63*2^25+1 31 25 -63 1 n // 81*2^25+1 32 25 -81 1 n // 125*2^25+1 32 25 -125 1 n // // 45*2^24+1 30 24 -45 1 n // 73*2^24+1 31 24 -73 1 n // 127*2^24+1 31 24 -127 1 n // 151*2^24+1 32 24 -151 1 n // 157*2^24+1 32 24 -157 1 n // 171*2^24+1 32 24 -171 1 n // 193*2^24+1 32 24 -193 1 n // 235*2^24+1 32 24 -235 1 n // 243*2^24+1 32 24 -243 1 n // // 45*2^23+1 29 23 -45 1 n // ... // // The inequality 2m<=n+32 would mean that c fits in a 32-bit word, but that's // actually irrelevant because we can fetch the most significant bits of c // before actually computing c. // We choose the primes marked with an asterisk. #if !(intDsize==32) #error "fft mod p implemented only for intDsize==32" #endif // Avoid clash with fftp3 #define p1 fftp3m_p1 #define p2 fftp3m_p2 #define p3 fftp3m_p3 #define n1 fftp3m_n1 #define n2 fftp3m_n2 #define n3 fftp3m_n3 static const uint32 p1 = 1+(3<<30); // = 3221225473 static const uint32 p2 = 1+(15<<27); // = 2013265921 static const uint32 p3 = 1+(7<<26); // = 469762049 static const uint32 n1 = 30; // Montgomery: represent x mod p1 as x*2^n1 mod p1 static const uint32 n2 = 27; // Montgomery: represent x mod p2 as x*2^n2 mod p2 static const uint32 n3 = 26; // Montgomery: represent x mod p3 as x*2^n3 mod p3 typedef struct { uint32 w1; // remainder mod p1 uint32 w2; // remainder mod p2 uint32 w3; // remainder mod p3 } fftp3m_word; static const fftp3m_word fftp3m_roots_of_1 [26+1] = // roots_of_1[n] is a (2^n)th root of unity in our ring. // (Also roots_of_1[n-1] = roots_of_1[n]^2, but we don't need this.) { #if 0 // in standard representation { 1, 1, 1 }, { 3221225472, 2013265920, 469762048 }, { 1013946479, 284861408, 19610091 }, { 1031213943, 211723194, 26623616 }, { 694614138, 78945800, 111570435 }, { 347220834, 772607190, 135956445 }, { 680684264, 288289890, 181505383 }, { 1109768284, 112574482, 145518049 }, { 602134989, 928726468, 109721424 }, { 1080308101, 875419223, 2847903 }, { 381653707, 510575142, 110273149 }, { 902453688, 193023072, 65701394 }, { 1559299664, 313561437, 181642641 }, { 254499731, 121307056, 82315502 }, { 1376063215, 20899142, 142137197 }, { 1284040478, 956809618, 207661045 }, { 336664489, 317295870, 194405005 }, { 894491787, 785393806, 2821902 }, { 795860341, 738526384, 230963948 }, { 23880336, 956561758, 59211404 }, { 790585193, 352904935, 95374542 }, { 877386874, 836313293, 153165757 }, { 1510644826, 971592443, 74027009 }, { 353060343, 692611595, 24417505 }, { 716717815, 791167605, 26032760 }, { 1020271667, 751686895, 150976424 }, { 139914905, 477826617, 71902965 } #else // in Montgomery representation { 1073741824, 134217728, 67108864 }, { 2147483649, 1879048193, 402653185 }, { 1809501489, 1054751064, 265634015 }, { 2877487492, 1193844673, 331740947 }, { 2989687427, 665825587, 252496823 }, { 3105485195, 1961758775, 114795379 }, { 1920588894, 1994046595, 175397252 }, { 703819063, 932019131, 314756028 }, { 3020513810, 1682915367, 51434375 }, { 713639124, 1015380543, 133810885 }, { 946523922, 1576574394, 454008742 }, { 2920407577, 1597744532, 191940679 }, { 1627717094, 1589708641, 309595372 }, { 2062650405, 126130591, 189567235 }, { 615054086, 267042180, 382347871 }, { 1719470156, 1681043157, 238769593 }, { 961520328, 1992112863, 240663313 }, { 2923061544, 81858141, 402250056 }, { 808455044, 487635820, 302549471 }, { 3213265361, 1681059681, 461303277 }, { 1883955251, 1318650285, 254810522 }, { 781279533, 1017987605, 179445770 }, { 570193549, 1008968995, 459186762 }, { 3103538692, 624914534, 466273834 }, { 834835886, 1960521414, 331825355 }, { 1807393093, 1292064821, 246867396 }, { 2100845347, 1578757629, 56837012 } #endif }; // Define this for (cheap) consistency checks. //#define DEBUG_FFTP3M // Define this for extensive consistency checks. //#define DEBUG_FFTP3M_OPERATIONS // Define the algorithm of the backward FFT: // Either FORWARD (a normal FFT followed by a permutation) // or RECIPROOT (an FFT with reciprocal root of unity) // or CLEVER (an FFT with reciprocal root of unity but clever computation // of the reciprocals). // Drawback of FORWARD: the permutation pass. // Drawback of RECIPROOT: need all the powers of the root, not only half of them. #define FORWARD 42 #define RECIPROOT 43 #define CLEVER 44 #define FFTP3M_BACKWARD CLEVER #ifdef DEBUG_FFTP3M_OPERATIONS #define check_fftp3m_word(x) if ((x.w1 >= p1) || (x.w2 >= p2) || (x.w3 >= p3)) throw runtime_exception() #else #define check_fftp3m_word(x) #endif // r := 0 mod p static inline void zerop3m (fftp3m_word& r) { r.w1 = 0; r.w2 = 0; r.w3 = 0; } // r := x mod p static inline void setp3m (uint32 x, fftp3m_word& r) { var uint32 hi; var uint32 lo; hi = x >> (32-n1); lo = x << n1; divu_6432_3232(hi,lo,p1, ,r.w1=); hi = x >> (32-n2); lo = x << n2; divu_6432_3232(hi,lo,p2, ,r.w2=); hi = x >> (32-n3); lo = x << n3; divu_6432_3232(hi,lo,p3, ,r.w3=); } // Chinese remainder theorem: // (Z / p1 Z) x (Z / p2 Z) x (Z / p3 Z) == Z / p1*p2*p3 Z = Z / P Z. // Return r as an integer >= 0, < p1*p2*p3, as 3-digit-sequence res. // This routine also does the "de-Montgomerizing". static void combinep3m (const fftp3m_word& r, uintD* resLSDptr) { check_fftp3m_word(r); // Compute e1 * v1 * r.w1 + e2 * v2 * r.w2 + e3 * v3 * r.w3 where // vi == 2^-ni mod pi, and the idempotents ei are found as: // xgcd(pi,p/pi) = 1 = ui*pi + vi*P/pi, ei = 1 - ui*pi. // e1 = 1709008312966733882383995583 // e2 = 2781580629833601225216537109 // e3 = 1602397205945693664242711343 // e1*v1 = 965961209845827124691257285 // e2*v2 = 927193593718183024654651603 // e3*v3 = 969191855872201893987508667 // We will have 0 <= e1*v1 * r.w1 + e2*v2 * r.w2 + e3*v3 * r.w3 < // < e1*v1 * p1 + e2*v2 * p2 + e3*v3 * p3 < 3 * 2^32 * p1*p2*p3 < 2^128. // The sum of the products fits in 4 digits, we divide by p1*p2*p3 // as a 3-digit sequence, thus getting the remainder. #if 0 #if CL_DS_BIG_ENDIAN_P var const uintD p123 [3] = { 0x09D80000, 0x7C200001, 0x54000001 }; var const uintD e1v1 [3] = { 0x031F063E, 0x1CD1F37E, 0x20E0C7C5 }; var const uintD e2v2 [3] = { 0x02FEF4E1, 0x6E62C875, 0x788590D3 }; var const uintD e3v3 [3] = { 0x0321B25B, 0xC8DB371B, 0xF0E861BB }; #else var const uintD p123 [3] = { 0x54000001, 0x7C200001, 0x09D80000 }; var const uintD e1v1 [3] = { 0x20E0C7C5, 0x1CD1F37E, 0x031F063E }; var const uintD e2v2 [3] = { 0x788590D3, 0x6E62C875, 0x02FEF4E1 }; var const uintD e3v3 [3] = { 0xF0E861BB, 0xC8DB371B, 0x0321B25B }; #endif #else // The final division step requires a shift left by 4 bits in order // to normalize p1*p2*p3. We combine this shift left with the // multiplications. Note that since e1v1 + e2v2 + e3v3 < p1*p2*p3, // there is no risk of overflow. #if CL_DS_BIG_ENDIAN_P var const uintD p123 [3] = { 0x9D800007, 0xC2000015, 0x40000010 }; var const uintD e1v1 [3] = { 0x31F063E1, 0xCD1F37E2, 0x0E0C7C50 }; var const uintD e2v2 [3] = { 0x2FEF4E16, 0xE62C8757, 0x88590D30 }; var const uintD e3v3 [3] = { 0x321B25BC, 0x8DB371BF, 0x0E861BB0 }; #else var const uintD p123 [3] = { 0x40000010, 0xC2000015, 0x9D800007 }; var const uintD e1v1 [3] = { 0x0E0C7C50, 0xCD1F37E2, 0x31F063E1 }; var const uintD e2v2 [3] = { 0x88590D30, 0xE62C8757, 0x2FEF4E16 }; var const uintD e3v3 [3] = { 0x0E861BB0, 0x8DB371BF, 0x321B25BC }; #endif #endif var uintD sum [4]; var uintD* const sumLSDptr = arrayLSDptr(sum,4); mulu_loop_lsp(r.w1,arrayLSDptr(e1v1,3), sumLSDptr,3); lspref(sumLSDptr,3) += muluadd_loop_lsp(r.w2,arrayLSDptr(e2v2,3), sumLSDptr,3); lspref(sumLSDptr,3) += muluadd_loop_lsp(r.w3,arrayLSDptr(e3v3,3), sumLSDptr,3); #if 0 {CL_ALLOCA_STACK; var DS q; var DS r; UDS_divide(arrayMSDptr(sum,4),4,arrayLSDptr(sum,4), arrayMSDptr(p123,3),3,arrayLSDptr(p123,3), &q,&r ); ASSERT(q.len <= 1) ASSERT(r.len <= 3) copy_loop_lsp(r.LSDptr,arrayLSDptr(sum,4),r.len); DS_clear_loop(arrayMSDptr(sum,4) mspop 1,3-r.len,arrayLSDptr(sum,4) lspop r.len); } #else // Division wie UDS_divide mit a_len=4, b_len=3. { var uintD q_stern; var uintD c1; #if HAVE_DD divuD(highlowDD(lspref(sumLSDptr,3),lspref(sumLSDptr,2)),lspref(arrayLSDptr(p123,3),2), q_stern=,c1=); { var uintDD c2 = highlowDD(c1,lspref(sumLSDptr,1)); var uintDD c3 = muluD(lspref(arrayLSDptr(p123,3),1),q_stern); if (c3 > c2) { q_stern = q_stern-1; if (c3-c2 > highlowDD(lspref(arrayLSDptr(p123,3),2),lspref(arrayLSDptr(p123,3),1))) { q_stern = q_stern-1; } } } #else divuD(lspref(sumLSDptr,3),lspref(sumLSDptr,2),lspref(arrayLSDptr(p123,3),2), q_stern=,c1=); { var uintD c2lo = lspref(sumLSDptr,1); var uintD c3hi; var uintD c3lo; muluD(lspref(arrayLSDptr(p123,3),1),q_stern, c3hi=,c3lo=); if ((c3hi > c1) || ((c3hi == c1) && (c3lo > c2lo))) { q_stern = q_stern-1; c3hi -= c1; if (c3lo < c2lo) { c3hi--; }; c3lo -= c2lo; if ((c3hi > lspref(arrayLSDptr(p123,3),2)) || ((c3hi == lspref(arrayLSDptr(p123,3),2)) && (c3lo > lspref(arrayLSDptr(p123,3),1)))) { q_stern = q_stern-1; } } } #endif if (!(q_stern==0)) { var uintD carry = mulusub_loop_lsp(q_stern,arrayLSDptr(p123,3),sumLSDptr,3); if (carry > lspref(sumLSDptr,3)) { q_stern = q_stern-1; addto_loop_lsp(arrayLSDptr(p123,3),sumLSDptr,3); } } } #endif #ifdef DEBUG_FFTP3M_OPERATIONS if (compare_loop_msp(sumLSDptr lspop 3,arrayMSDptr(p123,3),3) >= 0) throw runtime_exception(); #endif // Renormalize the division's remainder: shift right by 4 bits. shiftrightcopy_loop_msp(sumLSDptr lspop 3,resLSDptr lspop 3,3,4,0); } // r := (a + b) mod p static inline void addp3m (const fftp3m_word& a, const fftp3m_word& b, fftp3m_word& r) { var uint32 x; check_fftp3m_word(a); check_fftp3m_word(b); // Add single 32-bit words mod pi. if (((x = (a.w1 + b.w1)) < b.w1) || (x >= p1)) x -= p1; r.w1 = x; if ((x = (a.w2 + b.w2)) >= p2) // x doesn't overflow since p2 <= 2^31 x -= p2; r.w2 = x; if ((x = (a.w3 + b.w3)) >= p3) // x doesn't overflow since p3 <= 2^31 x -= p3; r.w3 = x; check_fftp3m_word(r); } // r := (a - b) mod p static inline void subp3m (const fftp3m_word& a, const fftp3m_word& b, fftp3m_word& r) { check_fftp3m_word(a); check_fftp3m_word(b); // Subtract single 32-bit words mod pi. r.w1 = (a.w1 < b.w1 ? a.w1-b.w1+p1 : a.w1-b.w1); r.w2 = (a.w2 < b.w2 ? a.w2-b.w2+p2 : a.w2-b.w2); r.w3 = (a.w3 < b.w3 ? a.w3-b.w3+p3 : a.w3-b.w3); check_fftp3m_word(r); } // r := (a * b) mod p static void mulp3m (const fftp3m_word& a, const fftp3m_word& b, fftp3m_word& res) { check_fftp3m_word(a); check_fftp3m_word(b); // Multiplication à la Montgomery: #define mul_mod_p(aw,bw,result_zuweisung,p,m,n,j,js,table) \ { /* table[i] == i*2^(m-1) mod p for 0 <= i < 2^(m-n+1) */\ var uint32 hi; \ var uint32 lo; \ mulu32(aw,bw, hi=,lo=); \ /* hi has 2m-32 bits */ \ var const int l = (m-1)-(32-n); \ var uint32 r = table[hi>>l]; \ hi = ((hi << (32-l)) >> (n-l)) | (lo >> n); \ /* hi = c mod 2^(m-1), has m-1 bits */ \ lo = lo & (bit(n)-1); \ /* lo = d, has n bits */ \ lo = (lo << js) - lo; \ /* lo = d*|V|, has m bits */ \ /* Finally compute (r + hi - lo) mod p. */ \ if (m < 32) { \ r += hi; \ if (r >= p) \ { r = r - p; } \ } else { \ if (((r += hi) < hi) || (r >= p)) \ { r = r - p; } \ } \ r = (r < lo ? r-lo+p : r-lo); \ /* ifdef DEBUG_FFTP3M_OPERATIONS * \ var uint32 tmp; \ mulu32(aw,bw, hi=,lo=); \ divu_6432_3232(hi,lo,p, ,tmp=); \ mulu32(tmp,j, hi=, lo=); \ divu_6432_3232(hi,lo,p, ,tmp=); \ if (tmp != 0) { tmp = p-tmp; } \ if (tmp != r) \ throw runtime_exception(); \ * endif DEBUG_FFTP3M_OPERATIONS */ \ result_zuweisung r; \ } // p1 = 3*2^30+1, n1 = 30, j1 = 3 = 2^2-1 static uint32 table1 [8] = { 0, 2147483648, 1073741823, 3221225471, 2147483646, 1073741821, 3221225469, 2147483644 }; mul_mod_p(a.w1,b.w1,res.w1=,p1,32,30,3,2,table1); // p2 = 15*2^27+1, n2 = 27, j2 = 15 = 2^4-1 static uint32 table2 [32] = { 0, 1073741824, 134217727, 1207959551, 268435454, 1342177278, 402653181, 1476395005, 536870908, 1610612732, 671088635, 1744830459, 805306362, 1879048186, 939524089, 2013265913, 1073741816, 134217719, 1207959543, 268435446, 1342177270, 402653173, 1476394997, 536870900, 1610612724, 671088627, 1744830451, 805306354, 1879048178, 939524081, 2013265905, 1073741808 }; mul_mod_p(a.w2,b.w2,res.w2=,p2,31,27,15,4,table2); // p3 = 7*2^26+1, n3 = 26, j3 = 7 = 2^3-1 static uint32 table3 [16] = { 0, 268435456, 67108863, 335544319, 134217726, 402653182, 201326589, 469762045, 268435452, 67108859, 335544315, 134217722, 402653178, 201326585, 469762041, 268435448 }; mul_mod_p(a.w3,b.w3,res.w3=,p3,29,26,7,3,table3); #undef mul_mod_p check_fftp3m_word(res); } #ifdef DEBUG_FFTP3M_OPERATIONS static void mulp3m_doublecheck (const fftp3m_word& a, const fftp3m_word& b, fftp3m_word& r) { fftp3m_word zero, ma, mb, or; zerop3m(zero); subp3m(zero,a, ma); subp3m(zero,b, mb); mulp3m(ma,mb, or); mulp3m(a,b, r); if (!((r.w1 == or.w1) && (r.w2 == or.w2) && (r.w3 == or.w3))) throw runtime_exception(); } #define mulp3m mulp3m_doublecheck #endif /* DEBUG_FFTP3M_OPERATIONS */ // b := (a / 2) mod p static inline void shiftp3m (const fftp3m_word& a, fftp3m_word& b) { check_fftp3m_word(a); b.w1 = (a.w1 & 1 ? (a.w1 >> 1) + (p1 >> 1) + 1 : (a.w1 >> 1)); b.w2 = (a.w2 & 1 ? (a.w2 >> 1) + (p2 >> 1) + 1 : (a.w2 >> 1)); b.w3 = (a.w3 & 1 ? (a.w3 >> 1) + (p3 >> 1) + 1 : (a.w3 >> 1)); check_fftp3m_word(b); } #ifndef _BIT_REVERSE #define _BIT_REVERSE // Reverse an n-bit number x. n>0. static uintC bit_reverse (uintL n, uintC x) { var uintC y = 0; do { y <<= 1; y |= (x & 1); x >>= 1; } while (!(--n == 0)); return y; } #endif // Compute an convolution mod p using FFT: z[0..N-1] := x[0..N-1] * y[0..N-1]. static void fftp3m_convolution (const uintL n, const uintC N, // N = 2^n fftp3m_word * x, // N words fftp3m_word * y, // N words fftp3m_word * z // N words result ) { CL_ALLOCA_STACK; #if (FFTP3M_BACKWARD == RECIPROOT) || defined(DEBUG_FFTP3M) var fftp3m_word* const w = cl_alloc_array(fftp3m_word,N); #else var fftp3m_word* const w = cl_alloc_array(fftp3m_word,(N>>1)+1); #endif var uintC i; // Initialize w[i] to w^i, w a primitive N-th root of unity. w[0] = fftp3m_roots_of_1[0]; w[1] = fftp3m_roots_of_1[n]; #if (FFTP3M_BACKWARD == RECIPROOT) || defined(DEBUG_FFTP3M) for (i = 2; i < N; i++) mulp3m(w[i-1],fftp3m_roots_of_1[n], w[i]); #else // need only half of the roots for (i = 2; i < N>>1; i++) mulp3m(w[i-1],fftp3m_roots_of_1[n], w[i]); #endif #ifdef DEBUG_FFTP3M // Check that w is really a primitive N-th root of unity. { var fftp3m_word w_N; mulp3m(w[N-1],fftp3m_roots_of_1[n], w_N); if (!( w_N.w1 == (uint32)1<>1]; if (!( w_N.w1 == p1-((uint32)1<>1; // tmax = 2^(n-1) for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // Butterfly: replace (x(i1),x(i2)) by // (x(i1) + x(i2), x(i1) - x(i2)). var fftp3m_word tmp; tmp = x[i2]; subp3m(x[i1],tmp, x[i2]); addp3m(x[i1],tmp, x[i1]); } } for (l = n-2; l>=0; l--) { var const uintC smax = (uintC)1 << (n-1-l); var const uintC tmax = (uintC)1 << l; for (var uintC s = 0; s < smax; s++) { var uintC exp = bit_reverse(n-1-l,s) << l; for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Butterfly: replace (x(i1),x(i2)) by // (x(i1) + w^exp*x(i2), x(i1) - w^exp*x(i2)). var fftp3m_word tmp; mulp3m(x[i2],w[exp], tmp); subp3m(x[i1],tmp, x[i2]); addp3m(x[i1],tmp, x[i1]); } } } } // Do an FFT of length N on y. if (!squaring) { var sintL l; /* l = n-1 */ { var uintC const tmax = N>>1; // tmax = 2^(n-1) for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // Butterfly: replace (y(i1),y(i2)) by // (y(i1) + y(i2), y(i1) - y(i2)). var fftp3m_word tmp; tmp = y[i2]; subp3m(y[i1],tmp, y[i2]); addp3m(y[i1],tmp, y[i1]); } } for (l = n-2; l>=0; l--) { var const uintC smax = (uintC)1 << (n-1-l); var const uintC tmax = (uintC)1 << l; for (var uintC s = 0; s < smax; s++) { var uintC exp = bit_reverse(n-1-l,s) << l; for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Butterfly: replace (y(i1),y(i2)) by // (y(i1) + w^exp*y(i2), y(i1) - w^exp*y(i2)). var fftp3m_word tmp; mulp3m(y[i2],w[exp], tmp); subp3m(y[i1],tmp, y[i2]); addp3m(y[i1],tmp, y[i1]); } } } } // Multiply the transformed vectors into z. for (i = 0; i < N; i++) mulp3m(x[i],y[i], z[i]); // Undo an FFT of length N on z. { var uintL l; for (l = 0; l < n-1; l++) { var const uintC smax = (uintC)1 << (n-1-l); var const uintC tmax = (uintC)1 << l; #if FFTP3M_BACKWARD != CLEVER for (var uintC s = 0; s < smax; s++) { var uintC exp = bit_reverse(n-1-l,s) << l; #if FFTP3M_BACKWARD == RECIPROOT if (exp > 0) exp = N - exp; // negate exp (use w^-1 instead of w) #endif for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Inverse Butterfly: replace (z(i1),z(i2)) by // ((z(i1)+z(i2))/2, (z(i1)-z(i2))/(2*w^exp)). var fftp3m_word sum; var fftp3m_word diff; addp3m(z[i1],z[i2], sum); subp3m(z[i1],z[i2], diff); shiftp3m(sum, z[i1]); mulp3m(diff,w[exp], diff); shiftp3m(diff, z[i2]); } } #else // FFTP3M_BACKWARD == CLEVER: clever handling of negative exponents /* s = 0, exp = 0 */ { for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // Inverse Butterfly: replace (z(i1),z(i2)) by // ((z(i1)+z(i2))/2, (z(i1)-z(i2))/(2*w^exp)), // with exp <-- 0. var fftp3m_word sum; var fftp3m_word diff; addp3m(z[i1],z[i2], sum); subp3m(z[i1],z[i2], diff); shiftp3m(sum, z[i1]); shiftp3m(diff, z[i2]); } } for (var uintC s = 1; s < smax; s++) { var uintC exp = bit_reverse(n-1-l,s) << l; exp = (N>>1) - exp; // negate exp (use w^-1 instead of w) for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Inverse Butterfly: replace (z(i1),z(i2)) by // ((z(i1)+z(i2))/2, (z(i1)-z(i2))/(2*w^exp)), // with exp <-- (N/2 - exp). var fftp3m_word sum; var fftp3m_word diff; addp3m(z[i1],z[i2], sum); subp3m(z[i2],z[i1], diff); // note that w^(N/2) = -1 shiftp3m(sum, z[i1]); mulp3m(diff,w[exp], diff); shiftp3m(diff, z[i2]); } } #endif } /* l = n-1 */ { var const uintC tmax = N>>1; // tmax = 2^(n-1) for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // Inverse Butterfly: replace (z(i1),z(i2)) by // ((z(i1)+z(i2))/2, (z(i1)-z(i2))/2). var fftp3m_word sum; var fftp3m_word diff; addp3m(z[i1],z[i2], sum); subp3m(z[i1],z[i2], diff); shiftp3m(sum, z[i1]); shiftp3m(diff, z[i2]); } } } #if FFTP3M_BACKWARD == FORWARD // Swap z[i] and z[N-i] for 0 < i < N/2. for (i = (N>>1)-1; i > 0; i--) { var fftp3m_word tmp = z[i]; z[i] = z[N-i]; z[N-i] = tmp; } #endif } static void mulu_fft_modp3m (const uintD* sourceptr1, uintC len1, const uintD* sourceptr2, uintC len2, uintD* destptr) // Es ist 2 <= len1 <= len2. { // Methode: // source1 ist ein Stück der Länge N1, source2 ein oder mehrere Stücke // der Länge N2, mit N1+N2 <= N, wobei N Zweierpotenz ist. // sum(i=0..N-1, x_i b^i) * sum(i=0..N-1, y_i b^i) wird errechnet, // indem man die beiden Polynome // sum(i=0..N-1, x_i T^i), sum(i=0..N-1, y_i T^i) // multipliziert, und zwar durch Fourier-Transformation (s.o.). var uint32 n; integerlengthC(len1-1, n=); // 2^(n-1) < len1 <= 2^n var uintC len = (uintC)1 << n; // kleinste Zweierpotenz >= len1 // Wählt man N = len, so hat man ceiling(len2/(len-len1+1)) * FFT(len). // Wählt man N = 2*len, so hat man ceiling(len2/(2*len-len1+1)) * FFT(2*len). // Wir wählen das billigere von beiden: // Bei ceiling(len2/(len-len1+1)) <= 2 * ceiling(len2/(2*len-len1+1)) // nimmt man N = len, bei ....... > ........ dagegen N = 2*len. // (Wahl von N = 4*len oder mehr bringt nur in Extremfällen etwas.) if (len2 > 2 * (len-len1+1) * (len2 <= (2*len-len1+1) ? 1 : ceiling(len2,(2*len-len1+1)))) { n = n+1; len = len << 1; } var const uintC N = len; // N = 2^n CL_ALLOCA_STACK; var fftp3m_word* const x = cl_alloc_array(fftp3m_word,N); var fftp3m_word* const y = cl_alloc_array(fftp3m_word,N); #ifdef DEBUG_FFTP3M var fftp3m_word* const z = cl_alloc_array(fftp3m_word,N); #else var fftp3m_word* const z = x; // put z in place of x - saves memory #endif var uintD* const tmpprod = cl_alloc_array(uintD,len1+1); var uintP i; var uintC destlen = len1+len2; clear_loop_lsp(destptr,destlen); do { var uintC len2p; // length of a piece of source2 len2p = N - len1 + 1; if (len2p > len2) len2p = len2; // len2p = min(N-len1+1,len2). if (len2p == 1) { // cheap case var uintD* tmpptr = arrayLSDptr(tmpprod,len1+1); mulu_loop_lsp(lspref(sourceptr2,0),sourceptr1,tmpptr,len1); if (addto_loop_lsp(tmpptr,destptr,len1+1)) if (inc_loop_lsp(destptr lspop (len1+1),destlen-(len1+1))) throw runtime_exception(); } else { var uintC destlenp = len1 + len2p - 1; // destlenp = min(N,destlen-1). var bool squaring = ((sourceptr1 == sourceptr2) && (len1 == len2p)); // Fill factor x. { for (i = 0; i < len1; i++) setp3m(lspref(sourceptr1,i), x[i]); for (i = len1; i < N; i++) zerop3m(x[i]); } // Fill factor y. if (!squaring) { for (i = 0; i < len2p; i++) setp3m(lspref(sourceptr2,i), y[i]); for (i = len2p; i < N; i++) zerop3m(y[i]); } // Multiply. if (!squaring) fftp3m_convolution(n,N, &x[0], &y[0], &z[0]); else fftp3m_convolution(n,N, &x[0], &x[0], &z[0]); // Add result to destptr[-destlen..-1]: { var uintD* ptr = destptr; // ac2|ac1|ac0 are an accumulator. var uint32 ac0 = 0; var uint32 ac1 = 0; var uint32 ac2 = 0; var uint32 tmp; for (i = 0; i < destlenp; i++) { // Convert z[i] to a 3-digit number. var uintD z_i[3]; combinep3m(z[i],arrayLSDptr(z_i,3)); #ifdef DEBUG_FFTP3M if (!(arrayLSref(z_i,3,2) < N)) throw runtime_exception(); #endif // Add z[i] to the accumulator. tmp = arrayLSref(z_i,3,0); if ((ac0 += tmp) < tmp) { if (++ac1 == 0) ++ac2; } tmp = arrayLSref(z_i,3,1); if ((ac1 += tmp) < tmp) ++ac2; tmp = arrayLSref(z_i,3,2); ac2 += tmp; // Add the accumulator's least significant word to destptr: tmp = lspref(ptr,0); if ((ac0 += tmp) < tmp) { if (++ac1 == 0) ++ac2; } lspref(ptr,0) = ac0; lsshrink(ptr); ac0 = ac1; ac1 = ac2; ac2 = 0; } // ac2 = 0. if (ac1 > 0) { if (!((i += 2) <= destlen)) throw runtime_exception(); tmp = lspref(ptr,0); if ((ac0 += tmp) < tmp) ++ac1; lspref(ptr,0) = ac0; lsshrink(ptr); tmp = lspref(ptr,0); ac1 += tmp; lspref(ptr,0) = ac1; lsshrink(ptr); if (ac1 < tmp) if (inc_loop_lsp(ptr,destlen-i)) throw runtime_exception(); } else if (ac0 > 0) { if (!((i += 1) <= destlen)) throw runtime_exception(); tmp = lspref(ptr,0); ac0 += tmp; lspref(ptr,0) = ac0; lsshrink(ptr); if (ac0 < tmp) if (inc_loop_lsp(ptr,destlen-i)) throw runtime_exception(); } } #ifdef DEBUG_FFTP3M // If destlenp < N, check that the remaining z[i] are 0. for (i = destlenp; i < N; i++) if (z[i].w1 > 0 || z[i].w2 > 0 || z[i].w3 > 0) throw runtime_exception(); #endif } // Decrement len2. destptr = destptr lspop len2p; destlen -= len2p; sourceptr2 = sourceptr2 lspop len2p; len2 -= len2p; } while (len2 > 0); } #undef n3 #undef n2 #undef n1 #undef p3 #undef p2 #undef p1 cln-1.3.3/src/base/digitseq/cl_asm_mips.h0000644000000000000000000000023511201634736015134 0ustar // List the contents of cl_asm_mips.cc. #define COPY_LOOPS #define FILL_LOOPS #define CLEAR_LOOPS #define LOG_LOOPS #define TEST_LOOPS #define ADDSUB_LOOPS cln-1.3.3/src/base/digitseq/cl_2DS_div.cc0000644000000000000000000001610011201634736014712 0ustar // div2adic(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/digitseq/cl_2DS.h" // Implementation. #include "base/digit/cl_2D.h" #include "base/digitseq/cl_DS.h" #include "cln/exception.h" namespace cln { // Time for dividing a n word number by a n word number, this is the common // case and therefore the important one: // OS: Linux 2.2, intDsize==32, OS: TRU64/4.0, intDsize==64, // Machine: P-III/450MHz Machine: EV5/300MHz: // n standard Newton standard Newton // 30 0.00002 0.00006 0.00004 0.00020 // 100 0.00009 0.00045 0.00033 0.0015 // 300 0.00069 0.0028 0.0028 0.0085 // 1000 0.018 0.019 0.031 0.065 // 2000 0.028 0.057 0.12 0.20 // 3000 0.078 0.11 <-(~4500) 0.28 0.23 <-(~2700) // 10000 1.09 0.48 3.14 1.13 // 30000 10.1 1.21 29.7 2.70 // Time for dividing a 2*n word number by a n word number: // OS: Linux 2.2, intDsize==32, OS: TRU64/4.0, intDsize==64, // Machine: P-III/450MHz Machine: EV5/300MHz: // n standard Newton standard Newton // 30 0.00004 0.00019 0.00013 0.00067 // 100 0.00032 0.0014 0.0013 0.0046 // 300 0.0027 0.0084 0.011 0.025 // 1000 0.029 0.057 0.12 0.20 // 2000 0.16 0.18 <-(~2400) 0.50 0.46 <-(~1800) // 3000 0.38 0.22 1.1 0.50 // 10000 4.5 1.05 13.0 2.48 // 30000 51.7 2.67 120.0 6.31 // Newton faster for: Newton faster for: // 1.0*N / N 3300= 4400/(m/n)^2, i.e. (m/66)^2 > n { var uintC mq = floor(m,66); if ((mq >= bit(intCsize/2)) || (mq*mq > n)) return true; else return false; } } #else // Use the old default values from CLN version <= 1.0.3 as a crude estimate. // They came from timings on a i486 33 MHz running Linux: // Divide N digits by N digits Divide 2*N digits by N digits // N standard Newton N standard Newton // 10 0.00015 0.00054 10 0.00023 0.00054 // 25 0.00065 0.00256 25 0.00116 0.00256 // 50 0.0024 0.0083 50 0.0044 0.0082 // 100 0.0089 0.027 100 0.0172 0.027 // 250 0.054 0.130 250 0.107 0.130 // 500 0.22 0.42 500 0.425 0.42 <-(~500) // 1000 0.86 1.30 1000 1.72 1.30 // 2500 5.6 4.1 <-(~2070) 2500 11.0 4.1 // 5000 22.3 9.4 5000 44.7 9.3 // 10000 91.2 20.6 10000 182 20.5 // // 1.0*N / N : Newton for N >= 2070 or 1790 >= N >= 1460 // 1.1*N / N : Newton for N >= 1880 or 1790 >= N >= 1320 // 1.2*N / N : Newton for N >= 1250 // 1.3*N / N : Newton for N >= 1010 // 1.4*N / N : Newton for N >= 940 // 1.5*N / N : Newton for N >= 750 // 1.6*N / N : Newton for N >= 625 // 1.7*N / N : Newton for N >= 550 // 1.8*N / N : Newton for N >= 500 // 1.9*N / N : Newton for N >= 500 // 2.0*N / N : Newton for N >= 500 static inline bool cl_recip_suitable (uintC m, uintC n) // n <= m { if (n < 500) return false; else // when n >= 2100/(m/n)^2, i.e. (m/46)^2 > n { var uintC mq = floor(m,46); if ((mq >= bit(intCsize/2)) || (mq*mq > n)) return true; else return false; } } #endif void div2adic (uintC a_len, const uintD* a_LSDptr, uintC b_len, const uintD* b_LSDptr, uintD* dest_LSDptr) { var uintC lendiff = a_len - b_len; if (cl_recip_suitable(a_len,b_len)) { // Division using reciprocal (Newton-Hensel algorithm). CL_ALLOCA_STACK; // Bestimme Kehrwert c von b mod 2^(intDsize*b_len). var uintD* c_LSDptr; num_stack_alloc(b_len,,c_LSDptr=); recip2adic(b_len,b_LSDptr,c_LSDptr); // Bestimme q := a * c mod 2^(intDsize*b_len). var uintD* q_LSDptr; num_stack_alloc(2*b_len,,q_LSDptr=); cl_UDS_mul(a_LSDptr,b_len,c_LSDptr,b_len,q_LSDptr); // Zur Bestimmung des Restes wieder mit b multiplizieren: var uintD* p_LSDptr; num_stack_alloc(2*b_len,,p_LSDptr=); cl_UDS_mul(q_LSDptr,b_len,b_LSDptr,b_len,p_LSDptr); // Überprüfen, daß p == a mod 2^(intDsize*b_len): if (compare_loop_msp(a_LSDptr lspop b_len,p_LSDptr lspop b_len,b_len)) throw runtime_exception(); // Quotient q und "Rest" (a-b*q)/2^(intDsize*b_len) ablegen: copy_loop_lsp(q_LSDptr,dest_LSDptr,b_len); if (lendiff <= b_len) { sub_loop_lsp(a_LSDptr lspop b_len,p_LSDptr lspop b_len,dest_LSDptr lspop b_len,lendiff); } else { var uintD carry = sub_loop_lsp(a_LSDptr lspop b_len,p_LSDptr lspop b_len,dest_LSDptr lspop b_len,b_len); copy_loop_lsp(a_LSDptr lspop 2*b_len,dest_LSDptr lspop 2*b_len,lendiff-b_len); if (carry) { dec_loop_lsp(dest_LSDptr lspop 2*b_len,lendiff-b_len); } } } else { // Standard division. var uintD b0inv = div2adic(1,lspref(b_LSDptr,0)); // b' copy_loop_lsp(a_LSDptr,dest_LSDptr,a_len); // d := a do { var uintD digit = lspref(dest_LSDptr,0); // nächstes d[j] digit = mul2adic(b0inv,digit); // digit = nächstes c[j] if (a_len <= b_len) { mulusub_loop_lsp(digit,b_LSDptr,dest_LSDptr,a_len); } // d := d - b * c[j] * beta^j else // a_len > b_len, b wird als durch Nullen fortgesetzt gedacht. { var uintD carry = mulusub_loop_lsp(digit,b_LSDptr,dest_LSDptr,b_len); if (lspref(dest_LSDptr,b_len) >= carry) { lspref(dest_LSDptr,b_len) -= carry; } else { lspref(dest_LSDptr,b_len) -= carry; dec_loop_lsp(dest_LSDptr lspop (b_len+1),a_len-(b_len+1)); } } // Nun ist lspref(dest_LSDptr,0) = 0. lspref(dest_LSDptr,0) = digit; // c[j] ablegen lsshrink(dest_LSDptr); a_len--; // nächstes j } until (a_len==lendiff); } } // Bit complexity (N = max(a_len,b_len)): O(M(N)). } // namespace cln cln-1.3.3/src/base/digitseq/cl_asm_arm.h0000644000000000000000000000030211201634736014736 0ustar // List the contents of cl_asm_arm.cc. #define COPY_LOOPS #define FILL_LOOPS #define CLEAR_LOOPS #define LOG_LOOPS #define TEST_LOOPS #define ADDSUB_LOOPS #define SHIFT_LOOPS #define MUL_LOOPS cln-1.3.3/src/base/digitseq/cl_asm_mipsel_.cc0000644000000000000000000000011211201634736015744 0ustar // The endianness is irrelevant for that code: #include "cl_asm_mips_.cc" cln-1.3.3/src/base/digitseq/cl_DS_sqrt.cc0000644000000000000000000004054611201634736015052 0ustar // cl_UDS_sqrt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/digitseq/cl_DS.h" // Implementation. #include "base/cl_low.h" #include "cln/exception.h" namespace cln { // We observe the following timings: // Time for square root of a_len = 2*N by b_len = N digits, // OS: Linux 2.2, intDsize==32, OS: TRU64/4.0, intDsize==64, // Machine: P-III/450MHz Machine: EV5/300MHz: // N standard Newton standard Newton // 30 0.00002 0.00009 0.00011 0.00027 // 100 0.00012 0.00052 0.00057 0.0017 // 300 0.00087 0.0031 0.0037 0.0091 // 1000 0.0089 0.020 0.037 0.069 // 3000 0.087 0.11 <-(~3200) 0.30 0.28 <- (~2750) // 10000 1.27 0.55 3.5 1.3 // 30000 12.7 1.35 31.1 3.4 // Newton faster for 3200= 3200; } #else // Use the old default values from CLN version <= 1.0.3 as a crude estimate. // Time for square root of a_len = 2*N by b_len = N digits, // on a i486 33 MHz running Linux: // N standard Newton // 10 0.00022 0.00132 // 25 0.00082 0.0047 // 50 0.0026 0.0130 // 100 0.0095 0.038 // 250 0.057 0.154 // 500 0.22 0.46 // 1000 0.90 1.39 // 2500 6.0 4.6 // 5000 24.1 10.7 // 10000 98 23.2 // -----> Newton faster for 1570 <= N <= 1790 and for N >= 2100. static inline bool cl_recipsqrt_suitable (uintC n) { return n >= 2100; } #endif // Bildet zu einer Unsigned Digit sequence a die Wurzel // (genauer: Gaußklammer aus Wurzel aus a). // squarep = cl_UDS_sqrt(a_MSDptr,a_len,a_LSDptr, &b); // > a_MSDptr/a_len/a_LSDptr: eine UDS // < NUDS b: Gaußklammer der Wurzel aus a // < squarep: true falls a = b^2, false falls b^2 < a < (b+1)^2. // Methode: // erst A normalisieren. A=0 --> B=0, fertig. // Wähle n so, daß beta^(2n-2) <= A < beta^(2n). // Wähle s (0<=s<16) so, daß beta^(2n)/4 <= A*2^(2s) < beta^(2n). // Setze A:=A*2^(2s) und kopiere dabei A. Suche B=floor(sqrt(A)). // Mache Platz für B=[0,b[n-1],...,b[0]], (mit einem Nulldigit Platz davor, // da dort nicht B, sondern 2*B abgespeichert werden wird). // Auf den Plätzen [a[2n-1],...,a[2n-2j]] wird die Differenz // [a[2n-1],...,a[2n-2j]] - [b[n-1],...,b[n-j]] ^ 2 abgespeichert. // Bestimme b[n-1] = floor(sqrt(a[2n-1]*beta+a[2n-2])) mit Heron/Newton: // {x:=beta als vorheriger Anfangswert, dann:} // x := floor((beta+a[2n-1])/2) // wiederhole: d:=floor((a[2n-1]*beta+a[2n-2])/x). // Falls d=beta/4 ist b[n-1]>=beta/2.} // Erniedrige [a[2n-1],a[2n-2]] um b[n-1]^2. // Für j=1,...,n: // {Hier [b[n-1],...,b[n-j]] = floor(sqrt(altes [a[2n-1],...,a[2n-2j]])), // in [a[2n-1],...,a[2n-2j]] steht jetzt der Rest // [a[2n-1],...,a[2n-2j]] - [b[n-1],...,b[n-j]]^2, er ist >=0 und // und <= 2 * [b[n-1],...,b[n-j]], belegt daher höchstens j Digits und 1 Bit. // Daher sind nur [a[2n-j],...,a[2n-2j]] von Belang.} // Für j= 0). // Im einzelnen: // b* := min(beta-1,floor([a[2n-j],a[2n-j-1],a[2n-j-2]]/(2*b[n-1]))), // [a[2n-j],...,a[2n-2j-1]] wie angegeben erniedigen. // Solange die Differenz <0 ist, setze b* := b* - 1 und // erhöhe [a[2n-j],...,a[2n-2j-1]] um 2 * [b[n-1],...,b[n-j]]. // Erniedrige [a[2n-j],...,a[2n-2j-2]] um b* ^ 2. // Tritt dabei ein negativer Carry auf, // so setze b* := b* - 1, // setze b[n-j-1] := b* (im Speicher um 1 Bit nach links verschoben), // erhöhe [a[2n-j],...,a[2n-2j-2]] um 2*[b[n-1],...,b[n-j-1]]+1. // Sonst setze b[n-j-1] := b* (im Speicher um 1 Bit nach links verschoben). // Nächstes j. // Für j=n: // Falls [a[n],...,a[0]] = [0,...,0], ist die Wurzel exakt, sonst nicht. // Ergebnis ist [b[n-1],...,b[0]] * 2^(-s), schiebe also im Speicher // [b[n],...,b[0]] um s+1 Bits nach rechts. // Das Ergebnis ist eine NUDS der Länge n. bool cl_UDS_sqrt (const uintD* a_MSDptr, uintC a_len, const uintD* a_LSDptr, DS* b_) { // A normalisieren: while ((a_len>0) && (mspref(a_MSDptr,0)==0)) { msshrink(a_MSDptr); a_len--; } if (a_len==0) // A=0 -> B := NUDS 0 { b_->LSDptr = b_->MSDptr; b_->len = 0; return true; } CL_ALLOCA_STACK; // n und s bestimmen: var uintC n = ceiling(a_len,2); // a_len = 2n oder 2n-1, n>0. var uintL s; { var uintD msd = mspref(a_MSDptr,0); // a[2n] bzw. a[2n-1] #if 0 s = 0; while /* ((msd & (bit(intDsize-1)|bit(intDsize-2))) ==0) */ (((sintD)msd >= 0) && ((sintD)(msd<<1) >= 0)) { msd = msd<<2; s++; } #else integerlengthD(msd, s = intDsize - ); s = s>>1; #endif } // Noch ist s nur modulo intDsize/2 bestimmt. // A um 2s Bits nach links verschoben kopieren: var uintD* new_a_MSDptr; { var uintD* new_a_LSDptr; num_stack_alloc(2*n,new_a_MSDptr=,new_a_LSDptr=); // 2n Digits Platz belegen {var uintL shiftcount = 2*s; if (!((a_len & bit(0)) ==0)) // a_len ungerade? { s += intDsize/2; lsprefnext(new_a_LSDptr) = 0; } // ja -> ein Nulldigit einschieben if (shiftcount==0) { copy_loop_lsp(a_LSDptr,new_a_LSDptr,a_len); } else { shiftleftcopy_loop_lsp(a_LSDptr,new_a_LSDptr,a_len,shiftcount); } }} #define a_MSDptr new_a_MSDptr // Nun ist A = a_MSDptr/2n/.. if (cl_recipsqrt_suitable(n)) { // C := 1/sqrt(A) und dann D := A*C näherungsweise errechnen. // D evtl. korrigieren, liefert B. var uintD* c_MSDptr; var uintD* c_LSDptr; var uintD* d_MSDptr; var uintD* d_LSDptr; var uintD* d2_MSDptr; num_stack_alloc(n+2, c_MSDptr=,c_LSDptr=); num_stack_alloc(2*n+3, d_MSDptr=,d_LSDptr=); num_stack_alloc(2*n, d2_MSDptr=,); // 1/4 <= a < 1. cl_UDS_recipsqrt(a_MSDptr,2*n,c_MSDptr,n); // 1 <= c <= 2, | 1/sqrt(a) - c | < 1/2*beta^-n. cl_UDS_mul(a_MSDptr mspop (n+1),n+1,c_LSDptr,n+2,d_LSDptr); // 1/4 <= d < 2, | sqrt(a) - d | < beta^-n. if (mspref(d_MSDptr,0) > 0) { dec_loop_lsp(d_MSDptr mspop (n+1),n+1); if (mspref(d_MSDptr,0) > 0) throw runtime_exception(); } // D is our guess for B. Square to see how much we have to correct. cl_UDS_mul_square(d_MSDptr mspop (1+n),n,d2_MSDptr mspop 2*n); // Store D. b_->LSDptr = copy_loop_msp(d_MSDptr mspop 1,b_->MSDptr,n); b_->len = n; // Store 2*D in place of D. if (shift1left_loop_lsp(d_MSDptr mspop (1+n),n)) mspref(d_MSDptr,0) = 1; // Compare D^2 against A. if (subfrom_loop_lsp(d2_MSDptr mspop 2*n,a_MSDptr mspop 2*n,2*n)) // guessed too high, decrement D { dec_loop_lsp(b_->LSDptr,n); dec_loop_lsp(d_MSDptr mspop (1+n),1+n); // store 2*D+1 if (!addto_loop_lsp(d_MSDptr mspop (1+n),a_MSDptr mspop 2*n,1+n)) throw runtime_exception(); if (!inc_loop_lsp(a_MSDptr mspop (n-1),n-1)) throw runtime_exception(); } else if (test_loop_msp(a_MSDptr,n-1)) // guessed way too low throw runtime_exception(); else if (compare_loop_msp(a_MSDptr mspop (n-1),d_MSDptr,1+n) > 0) // guessed too low, increment D { inc_loop_lsp(b_->LSDptr,n); mspref(d_MSDptr,n) |= bit(0); // store 2*D-1 subfrom_loop_lsp(d_MSDptr mspop (1+n),a_MSDptr mspop 2*n,1+n); inc_loop_lsp(d_MSDptr mspop (1+n),1+n); // store 2*D if (compare_loop_msp(a_MSDptr mspop (n-1),d_MSDptr,1+n) > 0) throw runtime_exception(); } else // guessed ok {} // Schiebe b um s Bits nach rechts: if (s > 0) shiftright_loop_msp(b_->MSDptr,n,s); // Teste, ob alle a[n],...,a[0]=0 sind: if (test_loop_msp(a_MSDptr mspop (n-1),n+1)) return false; else return true; // ja -> Wurzel exakt } // Platz für B belegen: { var uintD* b_MSDptr = b_->MSDptr mspop -1; // ab hier n+1 Digits Platz var uintD b_msd; // B = [0,b[n-1],...,b[0]] = b_MSDptr/n+1/.. // Bestimmung von b[n-1]: { var uintD a_msd = mspref(a_MSDptr,0); // a[2n-1] var uintD a_2msd = mspref(a_MSDptr,1); // a[2n-2] #if HAVE_DD var uintDD a_msdd = highlowDD(a_msd,a_2msd); // a[2n-1]*beta+a[2n-2] #endif // Anfangswert: x := floor((beta + a[2n-1])/2) var uintD x = floor(a_msd,2) | bit(intDsize-1); loop // Heron-Iterationsschleife { var uintD d; // Dividiere d := floor((a[2n-1]*beta+a[2n-2])/x) : if (a_msd>=x) break; // Überlauf -> d>=beta -> fertig #if HAVE_DD divuD(a_msdd,x, d=,); #else divuD(a_msd,a_2msd,x, d=,); #endif if (d >= x) break; // d>=x -> fertig // Nächste Iteration: x := floor((x+d)/2) // (Da die Folge der x bekanntlich monoton fallend ist // und bei b[n-1] >= beta/2 endet, muß x >= beta/2 werden, // d.h. x+d>=beta.) #if HAVE_DD x = (uintD)(floor((uintDD)x + (uintDD)d, 2)); #else x = floor((uintD)(x+d),2) | bit(intDsize-1); #endif } // x = b[n-1] fertig berechnet. b_msd = x; // Quadrieren und von [a[2n-1],a[2n-2]] abziehen: #if HAVE_DD a_msdd -= muluD(x,x); mspref(a_MSDptr,0) = highD(a_msdd); mspref(a_MSDptr,1) = lowD(a_msdd); #else {var uintD x2hi; var uintD x2lo; muluD(x,x, x2hi=,x2lo=); mspref(a_MSDptr,0) = a_msd - x2hi; if (a_2msd < x2lo) { mspref(a_MSDptr,0) -= 1; } mspref(a_MSDptr,1) = a_2msd - x2lo; } #endif mspref(b_MSDptr,0) = 1; mspref(b_MSDptr,1) = x<<1; // b[n-1] ablegen } {var uintC j = 0; var uintD* a_mptr = a_MSDptr mspop 0; var uintD* a_lptr = a_MSDptr mspop 2; var uintD* b_ptr = b_MSDptr mspop 2; // Wurzel-Hauptschleife until (++j == n) // j=1,...,n { // b_MSDptr = Pointer auf b[n], b_ptr = Pointer hinter b[n-j]. // a_mptr = Pointer auf a[2n-j], a_lptr = Pointer hinter a[2n-2j]. // Bestimme b* : var uintD b_stern; { var uintD a_1d = mspref(a_mptr,0); // a[2n-j], =0 oder =1 var uintD a_2d = mspref(a_mptr,1); // a[2n-j-1] var uintD a_3d = mspref(a_mptr,2); // a[2n-j-2] // a[2n-j]*beta^2+a[2n-j-1]*beta+a[2n-j-2] durch 2 dividieren, // dann durch b_msd = b[n-1] dividieren: #if HAVE_DD var uintDD a_123dd = highlowDD(a_2d,a_3d); a_123dd = a_123dd>>1; if (!(a_1d==0)) { a_123dd |= bit(2*intDsize-1); } if (highD(a_123dd) >= b_msd) { b_stern = bitm(intDsize)-1; } // bei Überlauf: beta-1 else { divuD(a_123dd,b_msd, b_stern=,); } #else a_3d = a_3d>>1; if (!((a_2d & bit(0)) ==0)) { a_3d |= bit(intDsize-1); } a_2d = a_2d>>1; if (!(a_1d==0)) { a_2d |= bit(intDsize-1); } if (a_2d >= b_msd) { b_stern = bitm(intDsize)-1; } // bei Überlauf: beta-1 else { divuD(a_2d,a_3d,b_msd, b_stern=,); } #endif } // b_stern = b* in der ersten Schätzung. a_lptr = a_lptr mspop 1; // Pointer hinter a[2n-2j-1] // Subtraktion [a[2n-j],...,a[2n-2j-1]] -= b* * [b[n],b[n-1],...,b[n-j]] : { var uintD carry = mulusub_loop_lsp(b_stern,b_ptr,a_lptr,j+1); if (mspref(a_mptr,0) >= carry) { mspref(a_mptr,0) -= carry; } else { mspref(a_mptr,0) -= carry; // a[2n-j] wird <0 // negativer Übertrag -> b* nach unten korrigieren: loop { b_stern = b_stern-1; // b* := b* - 1 // erhöhe [a[2n-j],...,a[2n-2j-1]] um [b[n],...,b[n-j]]: if (!(( addto_loop_lsp(b_ptr,a_lptr,j+1) ==0))) if ((mspref(a_mptr,0) += 1) ==0) // Übertrag zu a[2n-j] break; // macht a[2n-j] wieder >=0 -> Subtraktionsergebnis >=0 } } } // b_stern = b* in der zweiten Schätzung. a_mptr = a_mptr mspop 1; // Pointer auf a[2n-j-1] a_lptr = a_lptr mspop 1; // Pointer hinter a[2n-2j-2] // Ziehe b* ^ 2 von [a[2n-j],...,a[2n-2j-2]] ab: #if HAVE_DD { var uintDD b_stern_2 = muluD(b_stern,b_stern); var uintDD a_12dd = highlowDD(lspref(a_lptr,1),lspref(a_lptr,0)); // a[2n-2j-1]*beta+a[2n-2j-2] var uintDD a_12dd_new = a_12dd - b_stern_2; lspref(a_lptr,1) = highD(a_12dd_new); lspref(a_lptr,0) = lowD(a_12dd_new); if (a_12dd >= b_stern_2) goto b_stern_ok; } #else { var uintD b_stern_2_hi; var uintD b_stern_2_lo; muluD(b_stern,b_stern, b_stern_2_hi=,b_stern_2_lo=); {var uintD a_1d = lspref(a_lptr,1); // a[2n-2j-1] var uintD a_2d = lspref(a_lptr,0); // a[2n-2j-2] var uintD a_1d_new = a_1d - b_stern_2_hi; var uintD a_2d_new = a_2d - b_stern_2_lo; if (a_2d < b_stern_2_lo) { a_1d_new -= 1; } lspref(a_lptr,1) = a_1d_new; lspref(a_lptr,0) = a_2d_new; if ((a_1d > b_stern_2_hi) || ((a_1d == b_stern_2_hi) && (a_2d >= b_stern_2_lo)) ) goto b_stern_ok; }} #endif if (TRUE) { // muß noch [a[2n-j],...,a[2n-2j]] um 1 erniedrigen: if ( dec_loop_lsp(a_lptr lspop 2,j+1) ==0) goto b_stern_ok; // Subtraktion von b*^2 lieferte negativen Carry b_stern = b_stern-1; // b* := b* - 1 // erhöhe [a[2n-j-1],...,a[2n-2j-2]] um [b[n],...,b[n-j],0] + 2 * b* + 1 if ((sintD)b_stern < 0) { mspref(b_ptr,-1) |= bit(0); } // höchstes Bit von b* in b[n-j] ablegen mspref(b_ptr,0) = (uintD)(b_stern<<1)+1; // niedrige Bits von b* und eine 1 als b[n-j-1] ablegen addto_loop_lsp(b_ptr mspop 1,a_lptr,j+2); // (a[2n-j] wird nicht mehr gebraucht.) mspref(b_ptr,0) -= 1; // niedrige Bits von b* in b[n-j-1] ablegen b_ptr = b_ptr mspop 1; } else b_stern_ok: { // b* als b[n-j-1] ablegen: if ((sintD)b_stern < 0) { mspref(b_ptr,-1) |= bit(0); } // höchstes Bit von b* in b[n-j] ablegen mspref(b_ptr,0) = (uintD)(b_stern<<1); // niedrige Bits von b* als b[n-j-1] ablegen b_ptr = b_ptr mspop 1; } } // b_MSDptr = Pointer auf b[n], b_ptr = Pointer hinter b[0]. // a_mptr = Pointer auf a[n]. // Schiebe [b[n],...,b[0]] um s+1 Bits nach rechts: if (s == intDsize-1) { lsshrink(b_ptr); } else { shiftright_loop_msp(b_MSDptr,n+1,s+1); msshrink(b_MSDptr); } // b = b_MSDptr/n/b_ptr ist fertig, eine NUDS. b_->MSDptr = b_MSDptr; b_->len = n; b_->LSDptr = b_ptr; // Teste, ob alle a[n],...,a[0]=0 sind: if (test_loop_msp(a_mptr,n+1)) { return false; } else { return true; } // ja -> Wurzel exakt }} } // Bit complexity (N := a_len): O(M(N)). } // namespace cln cln-1.3.3/src/base/digitseq/cl_asm_i386_.cc0000644000000000000000000026116611547674552015203 0ustar // Externe Routinen zu ARILEV1.D // Prozessor: 80386 im native mode // Assembler-Syntax: GNU oder SUN, Moves von links nach rechts // Compiler: GNU-C oder SUN-C // Parameter-Übergabe: auf dem Stack 4(%esp),8(%esp),... // Register: %eax,%edx,%ecx dürfen stets verändert werden, alles andere retten. // Ergebnis-Übergabe: in %eax // Einstellungen: intCsize=32, intDsize=32. // Bruno Haible 14.8.1992 // Zum Teil abgeschrieben von Bernhard Degels "v-i386.s" #ifdef ASM_UNDERSCORE #if defined(__STDC__) || defined (__cplusplus) #define C(entrypoint) _##entrypoint #else #define C(entrypoint) _/**/entrypoint #endif #else #define C(entrypoint) entrypoint #endif #ifdef ASM_UNDERSCORE #if defined(__STDC__) || defined (__cplusplus) #define L(label) L##label #else #define L(label) L/**/label #endif #else #if defined(__STDC__) || defined (__cplusplus) #define L(label) .L##label #else #define L(label) .L/**/label #endif #endif #if defined(ASM_UNDERSCORE) || defined(COHERENT) /* defined(__EMX__) || defined(__GO32__) || defined(linux) || defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(COHERENT) || ... */ // GNU-Assembler oder MWC-Assembler #define repz repe #define shcl %cl, #else /* defined(sun) || ... */ // SUN-Assembler oder Consensys-Assembler #define jecxz orl %ecx,%ecx ; jz #define shcl #endif #if defined(__EMX__) // Direction-Flag ist defaultmäßig gelöscht #define dir0start #define dir0end #define dir1start std #define dir1end cld #elif 1 // Wir gehen auf Nummer sicher. #define dir0start cld #define dir0end #define dir1start std #define dir1end cld #else // Direction-Flag darf nach Belieben modifiziert werden #define dir0start cld #define dir0end #define dir1start std #define dir1end #endif // Alignment. Note that some assemblers need ".align 3,0x90" whereas other // assemblers don't like this syntax. So we put in the "nop"s by hand. #if defined(ASM_UNDERSCORE) && !(defined(__CYGWIN32__) || defined(__MINGW32__)) // BSD syntax assembler #define ALIGN .align 3 #else // ELF syntax assembler #define ALIGN .align 8 #endif // When this file is compiled into a shared library, ELF linkers need to // know which symbols are functions. #if defined(__svr4__) || defined(__ELF__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__ROSE__) || defined(_SEQUENT_) || defined(DGUX) || defined(_SCO_COFF) || defined(_SCO_ELF) #define DECLARE_FUNCTION(name) .type C(name),@function #else #define DECLARE_FUNCTION(name) #endif .text .globl C(copy_loop_up) .globl C(copy_loop_down) .globl C(fill_loop_up) .globl C(fill_loop_down) .globl C(clear_loop_up) .globl C(clear_loop_down) .globl C(test_loop_up) .globl C(test_loop_down) .globl C(xor_loop_up) .globl C(compare_loop_up) .globl C(shiftleftcopy_loop_up) .globl C(shiftxor_loop_up) #if CL_DS_BIG_ENDIAN_P .globl C(or_loop_up) .globl C(and_loop_up) .globl C(eqv_loop_up) .globl C(nand_loop_up) .globl C(nor_loop_up) .globl C(andc2_loop_up) .globl C(orc2_loop_up) .globl C(not_loop_up) .globl C(and_test_loop_up) .globl C(add_loop_down) .globl C(addto_loop_down) .globl C(inc_loop_down) .globl C(sub_loop_down) .globl C(subx_loop_down) .globl C(subfrom_loop_down) .globl C(dec_loop_down) .globl C(neg_loop_down) .globl C(shift1left_loop_down) .globl C(shiftleft_loop_down) .globl C(shiftleftcopy_loop_down) .globl C(shift1right_loop_up) .globl C(shiftright_loop_up) .globl C(shiftrightsigned_loop_up) .globl C(shiftrightcopy_loop_up) .globl C(mulusmall_loop_down) .globl C(mulu_loop_down) .globl C(muluadd_loop_down) .globl C(mulusub_loop_down) .globl C(divu_loop_up) .globl C(divucopy_loop_up) #else .globl C(or_loop_down) .globl C(xor_loop_down) .globl C(and_loop_down) .globl C(eqv_loop_down) .globl C(nand_loop_down) .globl C(nor_loop_down) .globl C(andc2_loop_down) .globl C(orc2_loop_down) .globl C(not_loop_down) .globl C(and_test_loop_down) .globl C(compare_loop_down) .globl C(add_loop_up) .globl C(addto_loop_up) .globl C(inc_loop_up) .globl C(sub_loop_up) .globl C(subx_loop_up) .globl C(subfrom_loop_up) .globl C(dec_loop_up) .globl C(neg_loop_up) .globl C(shift1left_loop_up) .globl C(shiftleft_loop_up) .globl C(shift1right_loop_down) .globl C(shiftright_loop_down) .globl C(shiftrightsigned_loop_down) .globl C(shiftrightcopy_loop_down) .globl C(mulusmall_loop_up) .globl C(mulu_loop_up) .globl C(muluadd_loop_up) .globl C(mulusub_loop_up) .globl C(divu_loop_down) .globl C(divucopy_loop_down) #endif #ifndef __GNUC__ /* mit GNU-C machen wir mulu32() als Macro, der inline multipliziert */ // extern struct { uint32 lo; uint32 hi; } mulu32_ (uint32 arg1, uint32 arg2); // 2^32*hi+lo := arg1*arg2. .globl C(mulu32_) ALIGN DECLARE_FUNCTION(mulu32_) C(mulu32_:) movl 4(%esp),%eax // arg1 mull 8(%esp) // %edx|%eax := arg1 * arg2 movl %edx,C(mulu32_high) // %edx = hi abspeichern ret // %eax = lo als Ergebnis #endif #ifndef __GNUC__ /* mit GNU-C machen wir divu_6432_3232() als Macro, der inline dividiert */ // extern struct { uint32 q; uint32 r; } divu_6432_3232_ (uint32 xhi, uint32 xlo, uint32 y); // x = 2^32*xhi+xlo = q*y+r schreiben. Sei bekannt, daß 0 <= x < 2^32*y . .globl C(divu_6432_3232_) ALIGN DECLARE_FUNCTION(divu_6432_3232_) C(divu_6432_3232_:) movl 4(%esp),%edx movl 8(%esp),%eax divl 12(%esp) // x = %edx|%eax durch dividieren movl %edx,C(divu_32_rest) // Rest %edx = r abspeichern ret // Quotient %eax = q als Ergebnis #endif // extern uintD* copy_loop_up (uintD* sourceptr, uintD* destptr, uintC count); ALIGN DECLARE_FUNCTION(copy_loop_up) C(copy_loop_up:) movl %edi,%edx // %edi retten movl %esi,%eax // %esi retten movl 4(%esp),%esi // %esi = sourceptr movl 8(%esp),%edi // %edi = destptr movl 12(%esp),%ecx // %ecx = count dir0start rep movsl // %ecx mal aufwärts (%edi) := (%esi) dir0end movl %eax,%esi // %esi zurück movl %edi,%eax // %edi als Ergebnis movl %edx,%edi // %edi zurück ret // extern uintD* copy_loop_down (uintD* sourceptr, uintD* destptr, uintC count); ALIGN DECLARE_FUNCTION(copy_loop_down) C(copy_loop_down:) movl %edi,%edx // %edi retten movl %esi,%eax // %esi retten movl 4(%esp),%esi // %esi = sourceptr movl 8(%esp),%edi // %edi = destptr movl 12(%esp),%ecx // %ecx = count leal -4(%esi),%esi leal -4(%edi),%edi dir1start rep movsl // %ecx mal abwärts (%edi) := (%esi) dir1end movl %eax,%esi // %esi zurück leal 4(%edi),%eax // %edi als Ergebnis movl %edx,%edi // %edi zurück ret // extern uintD* fill_loop_up (uintD* destptr, uintC count, uintD filler); ALIGN DECLARE_FUNCTION(fill_loop_up) C(fill_loop_up:) movl %edi,%edx // %edi retten movl 4(%esp),%edi // %edi = destptr movl 8(%esp),%ecx // %ecx = count movl 12(%esp),%eax // %eax = filler dir0start rep stosl // %ecx mal aufwärts (%edi) := %eax dir0end movl %edi,%eax // %edi als Ergebnis movl %edx,%edi // %edi zurück ret // extern uintD* fill_loop_down (uintD* destptr, uintC count, uintD filler); ALIGN DECLARE_FUNCTION(fill_loop_down) C(fill_loop_down:) movl %edi,%edx // %edi retten movl 4(%esp),%edi // %edi = destptr movl 8(%esp),%ecx // %ecx = count movl 12(%esp),%eax // %eax = filler leal -4(%edi),%edi dir1start rep stosl // %ecx mal abwärts (%edi) := %eax dir1end leal 4(%edi),%eax // %edi als Ergebnis movl %edx,%edi // %edi zurück ret // extern uintD* clear_loop_up (uintD* destptr, uintC count); ALIGN DECLARE_FUNCTION(clear_loop_up) C(clear_loop_up:) movl %edi,%edx // %edi retten movl 4(%esp),%edi // %edi = destptr movl 8(%esp),%ecx // %ecx = count xorl %eax,%eax // %eax = 0 dir0start rep stosl // %ecx mal aufwärts (%edi) := %eax dir0end movl %edi,%eax // %edi als Ergebnis movl %edx,%edi // %edi zurück ret // extern uintD* clear_loop_down (uintD* destptr, uintC count); ALIGN DECLARE_FUNCTION(clear_loop_down) C(clear_loop_down:) movl %edi,%edx // %edi retten movl 4(%esp),%edi // %edi = destptr movl 8(%esp),%ecx // %ecx = count leal -4(%edi),%edi xorl %eax,%eax // %eax = 0 dir1start rep stosl // %ecx mal abwärts (%edi) := %eax dir1end leal 4(%edi),%eax // %edi als Ergebnis movl %edx,%edi // %edi zurück ret // extern boolean test_loop_up (uintD* ptr, uintC count); ALIGN DECLARE_FUNCTION(test_loop_up) C(test_loop_up:) movl %edi,%edx // %edi retten movl 4(%esp),%edi // %edi = ptr movl 8(%esp),%ecx // %ecx = count xorl %eax,%eax // %eax = 0 dir0start repz // Falls %ecx > 0: scasl // %ecx mal aufwärts (%edi) testen // und weiterschleifen, falls Z, d.h. (%edi)=0. dir0end // Noch ist %eax = 0. jz L(tlu1) // alles =0 -> Ergebnis 0 incl %eax // Ergebnis 1 L(tlu1:) movl %edx,%edi // %edi zurück ret // extern boolean test_loop_down (uintD* ptr, uintC count); ALIGN DECLARE_FUNCTION(test_loop_down) C(test_loop_down:) movl %edi,%edx // %edi retten movl 4(%esp),%edi // %edi = ptr movl 8(%esp),%ecx // %ecx = count xorl %eax,%eax // %eax = 0 leal -4(%edi),%edi dir1start repz // Falls %ecx > 0: scasl // %ecx mal aufwärts (%edi) testen // und weiterschleifen, falls Z, d.h. (%edi)=0. dir1end // Noch ist %eax = 0. jz L(tld1) // alles =0 -> Ergebnis 0 incl %eax // Ergebnis 1 L(tld1:) movl %edx,%edi // %edi zurück ret #if CL_DS_BIG_ENDIAN_P // extern void or_loop_up (uintD* xptr, uintD* yptr, uintC count); ALIGN DECLARE_FUNCTION(or_loop_up) C(or_loop_up:) pushl %esi // %esi retten movl 8(%esp),%edx // %edx = xptr movl 12(%esp),%esi // %esi = yptr movl 16(%esp),%ecx // %ecx = count subl %edx,%esi jecxz L(olu2) // %ecx = 0 ? L(olu1:) movl (%edx,%esi),%eax // *yptr orl %eax,(%edx) // *xptr |= ... leal 4(%edx),%edx // xptr++, yptr++ decl %ecx jnz L(olu1) L(olu2:) popl %esi // %esi zurück ret #endif // extern void xor_loop_up (uintD* xptr, uintD* yptr, uintC count); ALIGN DECLARE_FUNCTION(xor_loop_up) C(xor_loop_up:) pushl %esi // %esi retten movl 8(%esp),%edx // %edx = xptr movl 12(%esp),%esi // %esi = yptr movl 16(%esp),%ecx // %ecx = count subl %edx,%esi jecxz L(xlu2) // %ecx = 0 ? L(xlu1:) movl (%edx,%esi),%eax // *yptr xorl %eax,(%edx) // *xptr ^= ... leal 4(%edx),%edx // xptr++, yptr++ decl %ecx jnz L(xlu1) L(xlu2:) popl %esi // %esi zurück ret #if CL_DS_BIG_ENDIAN_P // extern void and_loop_up (uintD* xptr, uintD* yptr, uintC count); ALIGN DECLARE_FUNCTION(and_loop_up) C(and_loop_up:) pushl %esi // %esi retten movl 8(%esp),%edx // %edx = xptr movl 12(%esp),%esi // %esi = yptr movl 16(%esp),%ecx // %ecx = count subl %edx,%esi jecxz L(alu2) // %ecx = 0 ? L(alu1:) movl (%edx,%esi),%eax // *yptr andl %eax,(%edx) // *xptr &= ... leal 4(%edx),%edx // xptr++, yptr++ decl %ecx jnz L(alu1) L(alu2:) popl %esi // %esi zurück ret // extern void eqv_loop_up (uintD* xptr, uintD* yptr, uintC count); ALIGN DECLARE_FUNCTION(eqv_loop_up) C(eqv_loop_up:) pushl %esi // %esi retten movl 8(%esp),%edx // %edx = xptr movl 12(%esp),%esi // %esi = yptr movl 16(%esp),%ecx // %ecx = count subl %edx,%esi jecxz L(elu2) // %ecx = 0 ? L(elu1:) movl (%edx),%eax // *xptr xorl (%edx,%esi),%eax // ^ *yptr notl %eax // ~(...) movl %eax,(%edx) // =: *xptr leal 4(%edx),%edx // xptr++, yptr++ decl %ecx jnz L(elu1) L(elu2:) popl %esi // %esi zurück ret // extern void nand_loop_up (uintD* xptr, uintD* yptr, uintC count); ALIGN DECLARE_FUNCTION(nand_loop_up) C(nand_loop_up:) pushl %esi // %esi retten movl 8(%esp),%edx // %edx = xptr movl 12(%esp),%esi // %esi = yptr movl 16(%esp),%ecx // %ecx = count subl %edx,%esi jecxz L(nalu2) // %ecx = 0 ? L(nalu1:) movl (%edx),%eax // *xptr andl (%edx,%esi),%eax // & *yptr notl %eax // ~(...) movl %eax,(%edx) // =: *xptr leal 4(%edx),%edx // xptr++, yptr++ decl %ecx jnz L(nalu1) L(nalu2:) popl %esi // %esi zurück ret // extern void nor_loop_up (uintD* xptr, uintD* yptr, uintC count); ALIGN DECLARE_FUNCTION(nor_loop_up) C(nor_loop_up:) pushl %esi // %esi retten movl 8(%esp),%edx // %edx = xptr movl 12(%esp),%esi // %esi = yptr movl 16(%esp),%ecx // %ecx = count subl %edx,%esi jecxz L(nolu2) // %ecx = 0 ? L(nolu1:) movl (%edx),%eax // *xptr orl (%edx,%esi),%eax // | *yptr notl %eax // ~(...) movl %eax,(%edx) // =: *xptr leal 4(%edx),%edx // xptr++, yptr++ decl %ecx jnz L(nolu1) L(nolu2:) popl %esi // %esi zurück ret // extern void andc2_loop_up (uintD* xptr, uintD* yptr, uintC count); ALIGN DECLARE_FUNCTION(andc2_loop_up) C(andc2_loop_up:) pushl %esi // %esi retten movl 8(%esp),%edx // %edx = xptr movl 12(%esp),%esi // %esi = yptr movl 16(%esp),%ecx // %ecx = count subl %edx,%esi jecxz L(aclu2) // %ecx = 0 ? L(aclu1:) movl (%edx,%esi),%eax // *yptr notl %eax // ~ *yptr andl %eax,(%edx) // *xptr &= ... leal 4(%edx),%edx // xptr++, yptr++ decl %ecx jnz L(aclu1) L(aclu2:) popl %esi // %esi zurück ret // extern void orc2_loop_up (uintD* xptr, uintD* yptr, uintC count); ALIGN DECLARE_FUNCTION(orc2_loop_up) C(orc2_loop_up:) pushl %esi // %esi retten movl 8(%esp),%edx // %edx = xptr movl 12(%esp),%esi // %esi = yptr movl 16(%esp),%ecx // %ecx = count subl %edx,%esi jecxz L(oclu2) // %ecx = 0 ? L(oclu1:) movl (%edx,%esi),%eax // *yptr notl %eax // ~ *yptr orl %eax,(%edx) // *xptr |= ... leal 4(%edx),%edx // xptr++, yptr++ decl %ecx jnz L(oclu1) L(oclu2:) popl %esi // %esi zurück ret // extern void not_loop_up (uintD* xptr, uintC count); ALIGN DECLARE_FUNCTION(not_loop_up) C(not_loop_up:) movl 4(%esp),%edx // %edx = xptr movl 8(%esp),%ecx // %ecx = count jecxz L(nlu2) // %ecx = 0 ? nop ; nop ; nop ; nop ; nop ; nop L(nlu1:) notl (%edx) // ~= *xptr leal 4(%edx),%edx // xptr++ decl %ecx jnz L(nlu1) L(nlu2:) ret // extern boolean and_test_loop_up (uintD* xptr, uintD* yptr, uintC count); ALIGN DECLARE_FUNCTION(and_test_loop_up) C(and_test_loop_up:) pushl %esi // %esi retten movl 8(%esp),%edx // %edx = xptr movl 12(%esp),%esi // %esi = yptr movl 16(%esp),%ecx // %ecx = count jecxz L(atlu2) // %ecx = 0 ? subl %edx,%esi L(atlu1:) movl (%edx,%esi),%eax // *yptr andl (%edx),%eax // *xptr & ... jnz L(atlu3) leal 4(%edx),%edx // xptr++, yptr++ decl %ecx jnz L(atlu1) L(atlu2:) xorl %eax,%eax // Ergebnis 0 popl %esi // %esi zurück ret L(atlu3:) movl $1,%eax // Ergebnis 1 (nicht irgendwas /=0 !) popl %esi // %esi zurück ret #endif // extern cl_signean compare_loop_up (uintD* xptr, uintD* yptr, uintC count); ALIGN DECLARE_FUNCTION(compare_loop_up) C(compare_loop_up:) movl %esi,%edx // %esi retten movl %edi,%eax // %edi retten movl 4(%esp),%esi // %esi = xptr movl 8(%esp),%edi // %edi = yptr movl 12(%esp),%ecx // %ecx = count cmpl %ecx,%ecx // initialize flags for the case %ecx is 0 dir0start repz // Falls %ecx > 0: cmpsl // %ecx mal aufwärts (%edi) und (%esi) vergleichen // und weiterschleifen, falls Z, d.h. (%edi)=(%esi). dir0end // Flags -> Ergebnis: // Z,NC -> bis zum Schluß (%esi)-(%edi) = 0 -> x=y -> Ergebnis 0 // NZ,C -> schließlich (%esi)-(%edi) < 0 -> x Ergebnis -1 // NZ,NC -> schließlich (%esi)-(%edi) > 0 -> x>y -> Ergebnis +1 movl %eax,%edi // %edi zurück movl %edx,%esi // %esi zurück jbe L(cmlu1) // "be" = Z oder C movl $1,%eax // Ergebnis +1 ret L(cmlu1:) sbbl %eax,%eax // Ergebnis -1 (falls C) oder 0 (falls NC) ret #if CL_DS_BIG_ENDIAN_P // extern uintD add_loop_down (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); ALIGN DECLARE_FUNCTION(add_loop_down) C(add_loop_down:) pushl %esi // %esi retten pushl %edi // %edi retten movl 12(%esp),%edx // %edx = sourceptr1 movl 16(%esp),%esi // %esi = sourceptr2 movl 20(%esp),%edi // %edi = destptr movl 24(%esp),%ecx // %ecx = count subl %edi,%edx subl %edi,%esi orl %ecx,%ecx // %ecx = 0 ?, Carry löschen jz L(ald2) L(ald1:) leal -4(%edi),%edi // sourceptr1--, sourceptr2--, destptr-- movl (%edx,%edi),%eax // *sourceptr1 adcl (%esi,%edi),%eax // + *sourceptr2 + carry movl %eax,(%edi) // =: *destptr, neuen Carry behalten decl %ecx jnz L(ald1) L(ald2:) sbbl %eax,%eax // Ergebnis := - Carry popl %edi // %edi zurück popl %esi // %esi zurück ret // extern uintD addto_loop_down (uintD* sourceptr, uintD* destptr, uintC count); ALIGN DECLARE_FUNCTION(addto_loop_down) C(addto_loop_down:) pushl %edi // %edi retten movl 8(%esp),%edx // %edx = sourceptr movl 12(%esp),%edi // %edi = destptr movl 16(%esp),%ecx // %ecx = count subl %edi,%edx orl %ecx,%ecx // %ecx = 0 ?, Carry löschen jz L(atld2) L(atld1:) leal -4(%edi),%edi // sourceptr--, destptr-- movl (%edx,%edi),%eax // *sourceptr adcl %eax,(%edi) // + *destptr + carry =: *destptr, neuer Carry decl %ecx jnz L(atld1) L(atld2:) sbbl %eax,%eax // Ergebnis := - Carry popl %edi // %edi zurück ret // extern uintD inc_loop_down (uintD* ptr, uintC count); ALIGN DECLARE_FUNCTION(inc_loop_down) C(inc_loop_down:) movl 4(%esp),%edx // %edx = ptr movl 8(%esp),%ecx // %ecx = count jecxz L(ild2) // %ecx = 0 ? L(ild1:) leal -4(%edx),%edx addl $1,(%edx) // (*ptr)++ jnc L(ild3) // kein Carry -> fertig decl %ecx jnz L(ild1) L(ild2:) movl $1,%eax // Ergebnis := 1 ret L(ild3:) xorl %eax,%eax // Ergebnis := 0 ret // extern uintD sub_loop_down (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); ALIGN DECLARE_FUNCTION(sub_loop_down) C(sub_loop_down:) pushl %esi // %esi retten pushl %edi // %edi retten movl 12(%esp),%edx // %edx = sourceptr1 movl 16(%esp),%esi // %esi = sourceptr2 movl 20(%esp),%edi // %edi = destptr movl 24(%esp),%ecx // %ecx = count subl %edi,%edx subl %edi,%esi orl %ecx,%ecx // %ecx = 0 ?, Carry löschen jz L(sld2) L(sld1:) leal -4(%edi),%edi // sourceptr1--, sourceptr2--, destptr-- movl (%edx,%edi),%eax // *sourceptr1 sbbl (%esi,%edi),%eax // - *sourceptr2 - carry movl %eax,(%edi) // =: *destptr, neuen Carry behalten decl %ecx jnz L(sld1) L(sld2:) sbbl %eax,%eax // Ergebnis := - Carry popl %edi // %edi zurück popl %esi // %esi zurück ret // extern uintD subx_loop_down (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count, uintD carry); ALIGN DECLARE_FUNCTION(subx_loop_down) C(subx_loop_down:) pushl %esi // %esi retten pushl %edi // %edi retten movl 12(%esp),%edx // %edx = sourceptr1 movl 16(%esp),%esi // %esi = sourceptr2 movl 20(%esp),%edi // %edi = destptr movl 24(%esp),%ecx // %ecx = count jecxz L(sxld2) // %ecx = 0 ? subl %edi,%edx subl %edi,%esi movl 28(%esp),%eax // carry, 0 oder -1 addl %eax,%eax // Bit 31 davon in den Carry nop ; nop L(sxld1:) leal -4(%edi),%edi // sourceptr1--, sourceptr2--, destptr-- movl (%edx,%edi),%eax // *sourceptr1 sbbl (%esi,%edi),%eax // - *sourceptr2 - carry movl %eax,(%edi) // =: *destptr, neuen Carry behalten decl %ecx jnz L(sxld1) sbbl %eax,%eax // Ergebnis := - Carry popl %edi // %edi zurück popl %esi // %esi zurück ret L(sxld2:) movl 28(%esp),%eax // Ergebnis := carry popl %edi // %edi zurück popl %esi // %esi zurück ret // extern uintD subfrom_loop_down (uintD* sourceptr, uintD* destptr, uintC count); ALIGN DECLARE_FUNCTION(subfrom_loop_down) C(subfrom_loop_down:) pushl %edi // %edi retten movl 8(%esp),%edx // %edx = sourceptr movl 12(%esp),%edi // %edi = destptr movl 16(%esp),%ecx // %ecx = count subl %edi,%edx orl %ecx,%ecx // %ecx = 0 ?, Carry löschen jz L(sfld2) L(sfld1:) leal -4(%edi),%edi // sourceptr--, destptr-- movl (%edx,%edi),%eax // *sourceptr sbbl %eax,(%edi) // *destptr - *sourceptr - carry =: *destptr, neuer Carry decl %ecx jnz L(sfld1) L(sfld2:) sbbl %eax,%eax // Ergebnis := - Carry popl %edi // %edi zurück ret // extern uintD dec_loop_down (uintD* ptr, uintC count); ALIGN DECLARE_FUNCTION(dec_loop_down) C(dec_loop_down:) movl 4(%esp),%edx // %edx = ptr movl 8(%esp),%ecx // %ecx = count jecxz L(dld2) // %ecx = 0 ? L(dld1:) leal -4(%edx),%edx subl $1,(%edx) // (*ptr)-- jnc L(dld3) // kein Carry -> fertig decl %ecx jnz L(dld1) L(dld2:) movl $-1,%eax // Ergebnis := -1 ret L(dld3:) xorl %eax,%eax // Ergebnis := 0 ret // extern uintD neg_loop_down (uintD* ptr, uintC count); ALIGN DECLARE_FUNCTION(neg_loop_down) C(neg_loop_down:) movl 4(%esp),%edx // %edx = ptr movl 8(%esp),%ecx // %ecx = count // erstes Digit /=0 suchen: jecxz L(nld2) // %ecx = 0 ? L(nld1:) leal -4(%edx),%edx negl (%edx) jnz L(nld3) decl %ecx jnz L(nld1) L(nld2:) xorl %eax,%eax // Ergebnis := 0 ret nop ; nop ; nop ; nop ; nop ; nop L(nld3:) // erstes Digit /=0 gefunden, ab jetzt gibt's Carrys // alle anderen Digits invertieren: decl %ecx jz L(nld5) L(nld4:) leal -4(%edx),%edx notl (%edx) decl %ecx jnz L(nld4) L(nld5:) movl $-1,%eax // Ergebnis := -1 ret // extern uintD shift1left_loop_down (uintD* ptr, uintC count); ALIGN DECLARE_FUNCTION(shift1left_loop_down) C(shift1left_loop_down:) movl 4(%esp),%edx // %edx = ptr movl 8(%esp),%ecx // %ecx = count orl %ecx,%ecx // %ecx = 0 ?, Carry löschen jz L(s1lld2) nop ; nop ; nop ; nop L(s1lld1:) leal -4(%edx),%edx // ptr-- rcll $1,(%edx) // *ptr und Carry um 1 Bit links rotieren decl %ecx jnz L(s1lld1) L(s1lld2:) sbbl %eax,%eax // Ergebnis := - Carry ret // extern uintD shiftleft_loop_down (uintD* ptr, uintC count, uintC i, uintD carry); ALIGN DECLARE_FUNCTION(shiftleft_loop_down) C(shiftleft_loop_down:) pushl %edi // %edi retten pushl %ebx // %ebx retten movl 12(%esp),%edi // %edi = ptr movl 16(%esp),%edx // %edx = count movb 20(%esp),%cl // %cl = i orl %edx,%edx // count = 0 ? jz L(slld4) // erstes Digit shiften: leal -4(%edi),%edi movl (%edi),%eax // Digit in %eax halten movl %eax,%ebx // und in %ebx rechnen: shll %cl,%ebx // um i Bits links shiften orl 24(%esp),%ebx // und die unteren i Bits eintragen movl %ebx,(%edi) // und wieder ablegen // Letztes Digit in %eax. decl %edx jz L(slld2) nop ; nop ; nop ; nop L(slld1:) // weiteres Digit shiften: leal -4(%edi),%edi movl (%edi),%ebx shldl shcl %eax,(%edi) // (%edi) um %cl=i Bits links shiften, %eax von rechts reinshiften // Letztes Digit in %ebx. decl %edx jz L(slld3) // weiteres Digit shiften: leal -4(%edi),%edi movl (%edi),%eax shldl shcl %ebx,(%edi) // (%edi) um %cl=i Bits links shiften, %ebx von rechts reinshiften // Letztes Digit in %eax. decl %edx jnz L(slld1) L(slld2:) movl %eax,%ebx L(slld3:) xorl %eax,%eax // %eax := 0 shldl shcl %ebx,%eax // %eax := höchste %cl=i Bits von %ebx popl %ebx // %ebx zurück popl %edi // %edi zurück ret L(slld4:) movl 24(%esp),%eax // %eax := carry popl %ebx // %ebx zurück popl %edi // %edi zurück ret // extern uintD shiftleftcopy_loop_down (uintD* sourceptr, uintD* destptr, uintC count, uintC i); ALIGN DECLARE_FUNCTION(shiftleftcopy_loop_down) C(shiftleftcopy_loop_down:) pushl %esi // %esi retten pushl %edi // %edi retten pushl %ebx // %ebx retten movl 16(%esp),%esi // %esi = sourceptr movl 20(%esp),%edi // %edi = destptr movl 24(%esp),%edx // count movb 28(%esp),%cl // i orl %edx,%edx // count = 0 ? jz L(slcld4) subl %edi,%esi // erstes Digit shiften: leal -4(%edi),%edi // sourceptr--, destptr-- movl (%edi,%esi),%ebx // *sourceptr in %ebx halten movl %ebx,%eax // und in %eax rechnen: shll %cl,%eax // um i Bits links shiften, rechts Nullen rein movl %eax,(%edi) // und als *destptr ablegen // Letztes Digit in %ebx. negb %cl // 32-i decl %edx jz L(slcld2) L(slcld1:) // weiteres Digit shiften: leal -4(%edi),%edi // sourceptr--, destptr-- movl (%edi,%esi),%eax // nächstes Digit nach %eax shrdl shcl %eax,%ebx // %ebx um %cl=32-i Bits rechts shiften, %eax von links reinshiften movl %ebx,(%edi) // %ebx als *destptr ablegen // Letztes Digit in %eax. decl %edx jz L(slcld3) // weiteres Digit shiften: leal -4(%edi),%edi // sourceptr--, destptr-- movl (%edi,%esi),%ebx // nächstes Digit nach %ebx shrdl shcl %ebx,%eax // %eax um %cl=32-i Bits rechts shiften, %ebx von links reinshiften movl %eax,(%edi) // %eax als *destptr ablegen // Letztes Digit in %ebx. decl %edx jnz L(slcld1) L(slcld2:) movl %ebx,%eax L(slcld3:) shrl %cl,%eax // %eax um 32-i Bits nach rechts shiften popl %ebx // %ebx zurück popl %edi // %edi zurück popl %esi // %esi zurück ret L(slcld4:) xorl %eax,%eax // %eax := 0 popl %ebx // %ebx zurück popl %edi // %edi zurück popl %esi // %esi zurück ret // extern uintD shift1right_loop_up (uintD* ptr, uintC count, uintD carry); ALIGN DECLARE_FUNCTION(shift1right_loop_up) C(shift1right_loop_up:) movl 4(%esp),%edx // %edx = ptr movl 8(%esp),%ecx // %ecx = count movl 12(%esp),%eax // %eax = carry (0 oder -1) jecxz L(s1rld3) // %ecx = 0 ? addl %eax,%eax // Carry := Bit 31 von carry L(s1rld1:) rcrl $1,(%edx) // *ptr und Carry um 1 Bit rechts rotieren leal 4(%edx),%edx // ptr++ decl %ecx jnz L(s1rld1) L(s1rld2:) sbbl %eax,%eax // Ergebnis := - Carry L(s1rld3:) ret // extern uintD shiftright_loop_up (uintD* ptr, uintC count, uintC i); ALIGN DECLARE_FUNCTION(shiftright_loop_up) C(shiftright_loop_up:) pushl %edi // %edi retten pushl %ebx // %ebx retten movl 12(%esp),%edi // %edi = ptr movl 16(%esp),%edx // %edx = count movb 20(%esp),%cl // %cl = i orl %edx,%edx // count = 0 ? jz L(srlu4) // erstes Digit shiften: movl (%edi),%eax // Digit in %eax halten movl %eax,%ebx // und in %ebx rechnen: shrl %cl,%ebx // um i Bits rechts shiften movl %ebx,(%edi) // und wieder ablegen // Letztes Digit in %eax. decl %edx jz L(srlu2) nop ; nop ; nop L(srlu1:) // weiteres Digit shiften: leal 4(%edi),%edi movl (%edi),%ebx shrdl shcl %eax,(%edi) // (%edi) um %cl=i Bits rechts shiften, %eax von links reinshiften // Letztes Digit in %ebx. decl %edx jz L(srlu3) // weiteres Digit shiften: leal 4(%edi),%edi movl (%edi),%eax shrdl shcl %ebx,(%edi) // (%edi) um %cl=i Bits rechts shiften, %ebx von links reinshiften // Letztes Digit in %eax. decl %edx jnz L(srlu1) L(srlu2:) movl %eax,%ebx L(srlu3:) xorl %eax,%eax // %eax := 0 shrdl shcl %ebx,%eax // %eax := niedrigste %cl=i Bits von %ebx, als Bits 31..32-i popl %ebx // %ebx zurück popl %edi // %edi zurück ret L(srlu4:) xorl %eax,%eax // %eax := 0 popl %ebx // %ebx zurück popl %edi // %edi zurück ret // extern uintD shiftrightsigned_loop_up (uintD* ptr, uintC count, uintC i); ALIGN DECLARE_FUNCTION(shiftrightsigned_loop_up) C(shiftrightsigned_loop_up:) pushl %edi // %edi retten pushl %ebx // %ebx retten movl 12(%esp),%edi // %edi = ptr movl 16(%esp),%edx // %edx = count movb 20(%esp),%cl // %cl = i // erstes Digit shiften: movl (%edi),%eax // Digit in %eax halten movl %eax,%ebx // und in %ebx rechnen: sarl %cl,%ebx // um i Bits rechts shiften, Vorzeichen vervielfachen movl %ebx,(%edi) // und wieder ablegen // Letztes Digit in %eax. decl %edx jz L(srslu2) L(srslu1:) // weiteres Digit shiften: leal 4(%edi),%edi movl (%edi),%ebx shrdl shcl %eax,(%edi) // (%edi) um %cl=i Bits rechts shiften, %eax von links reinshiften // Letztes Digit in %ebx. decl %edx jz L(srslu3) // weiteres Digit shiften: leal 4(%edi),%edi movl (%edi),%eax shrdl shcl %ebx,(%edi) // (%edi) um %cl=i Bits rechts shiften, %ebx von links reinshiften // Letztes Digit in %eax. decl %edx jnz L(srslu1) L(srslu2:) movl %eax,%ebx L(srslu3:) xorl %eax,%eax // %eax := 0 shrdl shcl %ebx,%eax // %eax := niedrigste %cl=i Bits von %ebx, als Bits 31..32-i popl %ebx // %ebx zurück popl %edi // %edi zurück ret // extern uintD shiftrightcopy_loop_up (uintD* sourceptr, uintD* destptr, uintC count, uintC i, uintD carry); ALIGN DECLARE_FUNCTION(shiftrightcopy_loop_up) C(shiftrightcopy_loop_up:) pushl %esi // %esi retten pushl %edi // %edi retten pushl %ebx // %ebx retten movl 16(%esp),%esi // %esi = sourceptr movl 20(%esp),%edi // %edi = destptr movl 24(%esp),%edx // count movb 28(%esp),%cl // i negb %cl // 32-i movl 32(%esp),%eax // %eax = carry orl %edx,%edx // count = 0 ? jz L(srcld3) subl %edi,%esi // erstes Digit shiften: movl (%edi,%esi),%ebx // *sourceptr in %ebx halten shldl shcl %ebx,%eax // carry um %cl=32-i Bits links shiften, dabei *sourceptr rein movl %eax,(%edi) // und als *destptr ablegen // Letztes Digit in %ebx. decl %edx jz L(srcld2) L(srcld1:) // weiteres Digit shiften: leal 4(%edi),%edi // sourceptr++, destptr++ movl (%edi,%esi),%eax // nächstes Digit nach %eax shldl shcl %eax,%ebx // %ebx um %cl=32-i Bits links shiften, %eax von rechts reinshiften movl %ebx,(%edi) // %ebx als *destptr ablegen // Letztes Digit in %eax. decl %edx jz L(srcld3) // weiteres Digit shiften: leal 4(%edi),%edi // sourceptr++, destptr++ movl (%edi,%esi),%ebx // nächstes Digit nach %ebx shldl shcl %ebx,%eax // %eax um %cl=32-i Bits links shiften, %ebx von rechts reinshiften movl %eax,(%edi) // %eax als *destptr ablegen // Letztes Digit in %ebx. decl %edx jnz L(srcld1) L(srcld2:) movl %ebx,%eax L(srcld3:) shll %cl,%eax // %eax um 32-i Bits nach links shiften popl %ebx // %ebx zurück popl %edi // %edi zurück popl %esi // %esi zurück ret // extern uintD mulusmall_loop_down (uintD digit, uintD* ptr, uintC len, uintD newdigit); ALIGN DECLARE_FUNCTION(mulusmall_loop_down) C(mulusmall_loop_down:) pushl %ebp // %ebp retten pushl %edi // %edi retten pushl %ebx // %ebx retten movl 16(%esp),%ebx // %ebx = digit movl 20(%esp),%edi // %edi = ptr movl 24(%esp),%ecx // %ecx = len movl 28(%esp),%ebp // %ebp = carry := newdigit movl %ecx,%eax negl %eax // %eax = -len jz L(msld2) leal -4(%edi,%eax,4),%edi // %edi = &ptr[-1-len] nop ; nop ; nop L(msld1:) movl (%edi,%ecx,4),%eax // *ptr mull %ebx // %edx|%eax := digit * *ptr addl %ebp,%eax // carry und Low-Teil des Produktes addieren movl $0,%ebp adcl %edx,%ebp // Übertrag zum High-Teil %edx dazu, gibt neuen carry movl %eax,(%edi,%ecx,4) // Low-Teil als *ptr ablegen decl %ecx // count--, ptr-- jnz L(msld1) L(msld2:) movl %ebp,%eax // Ergebnis := letzter Übertrag popl %ebx // %ebx zurück popl %edi // %edi zurück popl %ebp // %ebp zurück ret // extern void mulu_loop_down (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); ALIGN DECLARE_FUNCTION(mulu_loop_down) C(mulu_loop_down:) pushl %ebp // %ebp retten pushl %edi // %edi retten pushl %esi // %esi retten pushl %ebx // %ebx retten movl 20(%esp),%ebx // %ebx = digit movl 24(%esp),%esi // %esi = sourceptr movl 28(%esp),%edi // %edi = destptr movl 32(%esp),%ecx // %ecx = len movl %ecx,%eax notl %eax // %eax = -1-len leal (%esi,%eax,4),%esi // %esi = &sourceptr[-1-len] leal (%edi,%eax,4),%edi // %edi = &destptr[-1-len] xorl %ebp,%ebp // %epb = carry := 0 L(muld1:) movl (%esi,%ecx,4),%eax // *sourceptr mull %ebx // %edx|%eax := digit * *sourceptr addl %ebp,%eax // carry und Low-Teil des Produktes addieren movl $0,%ebp adcl %edx,%ebp // Übertrag zum High-Teil %edx dazu, gibt neuen carry movl %eax,(%edi,%ecx,4) // Low-Teil als *destptr ablegen decl %ecx // count--, sourceptr--, destptr-- jnz L(muld1) movl %ebp,(%edi) // letzten Übertrag ablegen popl %ebx // %ebx zurück popl %esi // %esi zurück popl %edi // %edi zurück popl %ebp // %ebp zurück ret // extern uintD muluadd_loop_down (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); ALIGN DECLARE_FUNCTION(muluadd_loop_down) C(muluadd_loop_down:) pushl %ebp // %ebp retten pushl %edi // %edi retten pushl %esi // %esi retten pushl %ebx // %ebx retten movl 20(%esp),%ebx // %ebx = digit movl 24(%esp),%esi // %esi = sourceptr movl 28(%esp),%edi // %edi = destptr movl 32(%esp),%ecx // %ecx = len movl %ecx,%eax notl %eax // %eax = -1-len leal (%esi,%eax,4),%esi // %esi = &sourceptr[-1-len] leal (%edi,%eax,4),%edi // %edi = &destptr[-1-len] xorl %ebp,%ebp // %epb = carry := 0 L(muald1:) movl (%esi,%ecx,4),%eax // *sourceptr mull %ebx // %edx|%eax := digit * *sourceptr addl %ebp,%eax // carry und Low-Teil des Produktes addieren movl $0,%ebp adcl %ebp,%edx // Übertrag zum High-Teil %edx dazu addl %eax,(%edi,%ecx,4) // Low-Teil zu *destptr addieren adcl %edx,%ebp // zweiten Übertrag zu %edx addieren, gibt neuen carry decl %ecx // count--, sourceptr--, destptr-- jnz L(muald1) movl %ebp,%eax // Ergebnis := letzter Übertrag popl %ebx // %ebx zurück popl %esi // %esi zurück popl %edi // %edi zurück popl %ebp // %ebp zurück ret // extern uintD mulusub_loop_down (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); ALIGN DECLARE_FUNCTION(mulusub_loop_down) C(mulusub_loop_down:) pushl %ebp // %ebp retten pushl %edi // %edi retten pushl %esi // %esi retten pushl %ebx // %ebx retten movl 20(%esp),%ebx // %ebx = digit movl 24(%esp),%esi // %esi = sourceptr movl 28(%esp),%edi // %edi = destptr movl 32(%esp),%ecx // %ecx = len movl %ecx,%eax notl %eax // %eax = -1-len leal (%esi,%eax,4),%esi // %esi = &sourceptr[-1-len] leal (%edi,%eax,4),%edi // %edi = &destptr[-1-len] xorl %ebp,%ebp // %epb = carry := 0 L(musld1:) movl (%esi,%ecx,4),%eax // *sourceptr mull %ebx // %edx|%eax := digit * *sourceptr addl %ebp,%eax // carry und Low-Teil des Produktes addieren movl $0,%ebp adcl %ebp,%edx // Übertrag zum High-Teil %edx dazu subl %eax,(%edi,%ecx,4) // Low-Teil von *destptr subtrahieren adcl %edx,%ebp // zweiten Übertrag zu %edx addieren, gibt neuen carry decl %ecx // count--, sourceptr--, destptr-- jnz L(musld1) movl %ebp,%eax // Ergebnis := letzter Übertrag popl %ebx // %ebx zurück popl %esi // %esi zurück popl %edi // %edi zurück popl %ebp // %ebp zurück ret // extern uintD divu_loop_up (uintD digit, uintD* ptr, uintC len); ALIGN DECLARE_FUNCTION(divu_loop_up) C(divu_loop_up:) pushl %edi // %edi retten pushl %ebx // %ebx retten movl 12(%esp),%ebx // %ebx = digit movl 16(%esp),%edi // %edi = ptr movl 20(%esp),%ecx // %ecx = len xorl %edx,%edx // %edx = Rest := 0 jecxz L(dlu2) // %ecx = 0 ? L(dlu1:) movl (%edi),%eax // nächstes Digit *ptr divl %ebx // Division von %edx|%eax durch %ebx movl %eax,(%edi) // Quotient %eax ablegen, Rest in %edx behalten leal 4(%edi),%edi // ptr++ decl %ecx jnz L(dlu1) L(dlu2:) movl %edx,%eax // Ergebnis := letzter Rest popl %ebx // %ebx zurück popl %edi // %edi zurück ret // extern uintD divucopy_loop_up (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); ALIGN DECLARE_FUNCTION(divucopy_loop_up) C(divucopy_loop_up:) pushl %edi // %edi retten pushl %esi // %esi retten pushl %ebx // %ebx retten movl 16(%esp),%ebx // %ebx = digit movl 20(%esp),%esi // %esi = sourceptr movl 24(%esp),%edi // %edi = destptr movl 28(%esp),%ecx // %ecx = len xorl %edx,%edx // %edx = Rest := 0 jecxz L(dclu2) // %ecx = 0 ? subl %edi,%esi L(dclu1:) movl (%esi,%edi),%eax // nächstes Digit *ptr divl %ebx // Division von %edx|%eax durch %ebx movl %eax,(%edi) // Quotient %eax ablegen, Rest in %edx behalten leal 4(%edi),%edi // sourceptr++, destptr++ decl %ecx jnz L(dclu1) L(dclu2:) movl %edx,%eax // Ergebnis := letzter Rest popl %ebx // %ebx zurück popl %esi // %esi zurück popl %edi // %edi zurück ret #endif #if !CL_DS_BIG_ENDIAN_P // extern void or_loop_down (uintD* xptr, uintD* yptr, uintC count); ALIGN DECLARE_FUNCTION(or_loop_down) C(or_loop_down:) pushl %esi // %esi retten movl 8(%esp),%edx // %edx = xptr movl 12(%esp),%esi // %esi = yptr movl 16(%esp),%ecx // %ecx = count subl %edx,%esi jecxz L(old2) // %ecx = 0 ? L(old1:) leal -4(%edx),%edx // xptr--, yptr-- movl (%edx,%esi),%eax // *yptr orl %eax,(%edx) // *xptr |= ... decl %ecx jnz L(old1) L(old2:) popl %esi // %esi zurück ret // extern void xor_loop_down (uintD* xptr, uintD* yptr, uintC count); ALIGN DECLARE_FUNCTION(xor_loop_down) C(xor_loop_down:) pushl %esi // %esi retten movl 8(%esp),%edx // %edx = xptr movl 12(%esp),%esi // %esi = yptr movl 16(%esp),%ecx // %ecx = count subl %edx,%esi jecxz L(xld2) // %ecx = 0 ? L(xld1:) leal -4(%edx),%edx // xptr--, yptr-- movl (%edx,%esi),%eax // *yptr xorl %eax,(%edx) // *xptr ^= ... decl %ecx jnz L(xld1) L(xld2:) popl %esi // %esi zurück ret // extern void and_loop_down (uintD* xptr, uintD* yptr, uintC count); ALIGN DECLARE_FUNCTION(and_loop_down) C(and_loop_down:) pushl %esi // %esi retten movl 8(%esp),%edx // %edx = xptr movl 12(%esp),%esi // %esi = yptr movl 16(%esp),%ecx // %ecx = count subl %edx,%esi jecxz L(ald2) // %ecx = 0 ? L(ald1:) leal -4(%edx),%edx // xptr--, yptr-- movl (%edx,%esi),%eax // *yptr andl %eax,(%edx) // *xptr &= ... decl %ecx jnz L(ald1) L(ald2:) popl %esi // %esi zurück ret // extern void eqv_loop_down (uintD* xptr, uintD* yptr, uintC count); ALIGN DECLARE_FUNCTION(eqv_loop_down) C(eqv_loop_down:) pushl %esi // %esi retten movl 8(%esp),%edx // %edx = xptr movl 12(%esp),%esi // %esi = yptr movl 16(%esp),%ecx // %ecx = count subl %edx,%esi jecxz L(eld2) // %ecx = 0 ? L(eld1:) leal -4(%edx),%edx // xptr--, yptr-- movl (%edx),%eax // *xptr xorl (%edx,%esi),%eax // ^ *yptr notl %eax // ~(...) movl %eax,(%edx) // =: *xptr decl %ecx jnz L(eld1) L(eld2:) popl %esi // %esi zurück ret // extern void nand_loop_down (uintD* xptr, uintD* yptr, uintC count); ALIGN DECLARE_FUNCTION(nand_loop_down) C(nand_loop_down:) pushl %esi // %esi retten movl 8(%esp),%edx // %edx = xptr movl 12(%esp),%esi // %esi = yptr movl 16(%esp),%ecx // %ecx = count subl %edx,%esi jecxz L(nald2) // %ecx = 0 ? L(nald1:) leal -4(%edx),%edx // xptr--, yptr-- movl (%edx),%eax // *xptr andl (%edx,%esi),%eax // & *yptr notl %eax // ~(...) movl %eax,(%edx) // =: *xptr decl %ecx jnz L(nald1) L(nald2:) popl %esi // %esi zurück ret // extern void nor_loop_down (uintD* xptr, uintD* yptr, uintC count); ALIGN DECLARE_FUNCTION(nor_loop_down) C(nor_loop_down:) pushl %esi // %esi retten movl 8(%esp),%edx // %edx = xptr movl 12(%esp),%esi // %esi = yptr movl 16(%esp),%ecx // %ecx = count subl %edx,%esi jecxz L(nold2) // %ecx = 0 ? L(nold1:) leal -4(%edx),%edx // xptr--, yptr-- movl (%edx),%eax // *xptr orl (%edx,%esi),%eax // | *yptr notl %eax // ~(...) movl %eax,(%edx) // =: *xptr decl %ecx jnz L(nold1) L(nold2:) popl %esi // %esi zurück ret // extern void andc2_loop_down (uintD* xptr, uintD* yptr, uintC count); ALIGN DECLARE_FUNCTION(andc2_loop_down) C(andc2_loop_down:) pushl %esi // %esi retten movl 8(%esp),%edx // %edx = xptr movl 12(%esp),%esi // %esi = yptr movl 16(%esp),%ecx // %ecx = count subl %edx,%esi jecxz L(acld2) // %ecx = 0 ? L(acld1:) leal -4(%edx),%edx // xptr--, yptr-- movl (%edx,%esi),%eax // *yptr notl %eax // ~ *yptr andl %eax,(%edx) // *xptr &= ... decl %ecx jnz L(acld1) L(acld2:) popl %esi // %esi zurück ret // extern void orc2_loop_down (uintD* xptr, uintD* yptr, uintC count); ALIGN DECLARE_FUNCTION(orc2_loop_down) C(orc2_loop_down:) pushl %esi // %esi retten movl 8(%esp),%edx // %edx = xptr movl 12(%esp),%esi // %esi = yptr movl 16(%esp),%ecx // %ecx = count subl %edx,%esi jecxz L(ocld2) // %ecx = 0 ? L(ocld1:) leal -4(%edx),%edx // xptr--, yptr-- movl (%edx,%esi),%eax // *yptr notl %eax // ~ *yptr orl %eax,(%edx) // *xptr |= ... decl %ecx jnz L(ocld1) L(ocld2:) popl %esi // %esi zurück ret // extern void not_loop_down (uintD* xptr, uintC count); ALIGN DECLARE_FUNCTION(not_loop_down) C(not_loop_down:) movl 4(%esp),%edx // %edx = xptr movl 8(%esp),%ecx // %ecx = count jecxz L(nld2) // %ecx = 0 ? nop ; nop ; nop ; nop ; nop ; nop L(nld1:) leal -4(%edx),%edx // xptr-- notl (%edx) // ~= *xptr decl %ecx jnz L(nld1) L(nld2:) ret // extern boolean and_test_loop_down (uintD* xptr, uintD* yptr, uintC count); ALIGN DECLARE_FUNCTION(and_test_loop_down) C(and_test_loop_down:) pushl %esi // %esi retten movl 8(%esp),%edx // %edx = xptr movl 12(%esp),%esi // %esi = yptr movl 16(%esp),%ecx // %ecx = count jecxz L(atld2) // %ecx = 0 ? subl %edx,%esi L(atld1:) leal -4(%edx),%edx // xptr--, yptr-- movl (%edx,%esi),%eax // *yptr andl (%edx),%eax // *xptr & ... jnz L(atld3) decl %ecx jnz L(atld1) L(atld2:) xorl %eax,%eax // Ergebnis 0 popl %esi // %esi zurück ret L(atld3:) movl $1,%eax // Ergebnis 1 (nicht irgendwas /=0 !) popl %esi // %esi zurück ret // extern cl_signean compare_loop_down (uintD* xptr, uintD* yptr, uintC count); ALIGN DECLARE_FUNCTION(compare_loop_down) C(compare_loop_down:) movl %esi,%edx // %esi retten movl %edi,%eax // %edi retten movl 4(%esp),%esi // %esi = xptr movl 8(%esp),%edi // %edi = yptr movl 12(%esp),%ecx // %ecx = count leal -4(%esi),%esi leal -4(%edi),%edi cmpl %ecx,%ecx // initialize flags for the case %ecx is 0 dir1start repz // Falls %ecx > 0: cmpsl // %ecx mal aufwärts (%edi) und (%esi) vergleichen // und weiterschleifen, falls Z, d.h. (%edi)=(%esi). dir1end // Flags -> Ergebnis: // Z,NC -> bis zum Schluß (%esi)-(%edi) = 0 -> x=y -> Ergebnis 0 // NZ,C -> schließlich (%esi)-(%edi) < 0 -> x Ergebnis -1 // NZ,NC -> schließlich (%esi)-(%edi) > 0 -> x>y -> Ergebnis +1 movl %eax,%edi // %edi zurück movl %edx,%esi // %esi zurück jbe L(cmld1) // "be" = Z oder C movl $1,%eax // Ergebnis +1 ret L(cmld1:) sbbl %eax,%eax // Ergebnis -1 (falls C) oder 0 (falls NC) ret // extern uintD add_loop_up (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); ALIGN DECLARE_FUNCTION(add_loop_up) C(add_loop_up:) pushl %esi // %esi retten pushl %edi // %edi retten movl 12(%esp),%edx // %edx = sourceptr1 movl 16(%esp),%esi // %esi = sourceptr2 movl 20(%esp),%edi // %edi = destptr movl 24(%esp),%ecx // %ecx = count subl %edi,%edx subl %edi,%esi orl %ecx,%ecx // %ecx = 0 ?, Carry löschen jz L(alu2) L(alu1:) movl (%edx,%edi),%eax // *sourceptr1 adcl (%esi,%edi),%eax // + *sourceptr2 + carry movl %eax,(%edi) // =: *destptr, neuen Carry behalten leal 4(%edi),%edi // sourceptr1++, sourceptr2++, destptr++ decl %ecx jnz L(alu1) L(alu2:) sbbl %eax,%eax // Ergebnis := - Carry popl %edi // %edi zurück popl %esi // %esi zurück ret // extern uintD addto_loop_up (uintD* sourceptr, uintD* destptr, uintC count); ALIGN DECLARE_FUNCTION(addto_loop_up) C(addto_loop_up:) pushl %edi // %edi retten movl 8(%esp),%edx // %edx = sourceptr movl 12(%esp),%edi // %edi = destptr movl 16(%esp),%ecx // %ecx = count subl %edi,%edx orl %ecx,%ecx // %ecx = 0 ?, Carry löschen jz L(atlu2) L(atlu1:) movl (%edx,%edi),%eax // *sourceptr adcl %eax,(%edi) // + *destptr + carry =: *destptr, neuer Carry leal 4(%edi),%edi // sourceptr++, destptr++ decl %ecx jnz L(atlu1) L(atlu2:) sbbl %eax,%eax // Ergebnis := - Carry popl %edi // %edi zurück ret // extern uintD inc_loop_up (uintD* ptr, uintC count); ALIGN DECLARE_FUNCTION(inc_loop_up) C(inc_loop_up:) movl 4(%esp),%edx // %edx = ptr movl 8(%esp),%ecx // %ecx = count jecxz L(ilu2) // %ecx = 0 ? L(ilu1:) addl $1,(%edx) // (*ptr)++ jnc L(ilu3) // kein Carry -> fertig leal 4(%edx),%edx decl %ecx jnz L(ilu1) L(ilu2:) movl $1,%eax // Ergebnis := 1 ret L(ilu3:) xorl %eax,%eax // Ergebnis := 0 ret // extern uintD sub_loop_up (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); ALIGN DECLARE_FUNCTION(sub_loop_up) C(sub_loop_up:) pushl %esi // %esi retten pushl %edi // %edi retten movl 12(%esp),%edx // %edx = sourceptr1 movl 16(%esp),%esi // %esi = sourceptr2 movl 20(%esp),%edi // %edi = destptr movl 24(%esp),%ecx // %ecx = count subl %edi,%edx subl %edi,%esi orl %ecx,%ecx // %ecx = 0 ?, Carry löschen jz L(slu2) L(slu1:) movl (%edx,%edi),%eax // *sourceptr1 sbbl (%esi,%edi),%eax // - *sourceptr2 - carry movl %eax,(%edi) // =: *destptr, neuen Carry behalten leal 4(%edi),%edi // sourceptr1++, sourceptr2++, destptr++ decl %ecx jnz L(slu1) L(slu2:) sbbl %eax,%eax // Ergebnis := - Carry popl %edi // %edi zurück popl %esi // %esi zurück ret // extern uintD subx_loop_up (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count, uintD carry); ALIGN DECLARE_FUNCTION(subx_loop_up) C(subx_loop_up:) pushl %esi // %esi retten pushl %edi // %edi retten movl 12(%esp),%edx // %edx = sourceptr1 movl 16(%esp),%esi // %esi = sourceptr2 movl 20(%esp),%edi // %edi = destptr movl 24(%esp),%ecx // %ecx = count jecxz L(sxlu2) // %ecx = 0 ? subl %edi,%edx subl %edi,%esi movl 28(%esp),%eax // carry, 0 oder -1 addl %eax,%eax // Bit 31 davon in den Carry nop ; nop L(sxlu1:) movl (%edx,%edi),%eax // *sourceptr1 sbbl (%esi,%edi),%eax // - *sourceptr2 - carry movl %eax,(%edi) // =: *destptr, neuen Carry behalten leal 4(%edi),%edi // sourceptr1++, sourceptr2++, destptr++ decl %ecx jnz L(sxlu1) sbbl %eax,%eax // Ergebnis := - Carry popl %edi // %edi zurück popl %esi // %esi zurück ret L(sxlu2:) movl 28(%esp),%eax // Ergebnis := carry popl %edi // %edi zurück popl %esi // %esi zurück ret // extern uintD subfrom_loop_up (uintD* sourceptr, uintD* destptr, uintC count); ALIGN DECLARE_FUNCTION(subfrom_loop_up) C(subfrom_loop_up:) pushl %edi // %edi retten movl 8(%esp),%edx // %edx = sourceptr movl 12(%esp),%edi // %edi = destptr movl 16(%esp),%ecx // %ecx = count subl %edi,%edx orl %ecx,%ecx // %ecx = 0 ?, Carry löschen jz L(sflu2) L(sflu1:) movl (%edx,%edi),%eax // *sourceptr sbbl %eax,(%edi) // *destptr - *sourceptr - carry =: *destptr, neuer Carry leal 4(%edi),%edi // sourceptr++, destptr++ decl %ecx jnz L(sflu1) L(sflu2:) sbbl %eax,%eax // Ergebnis := - Carry popl %edi // %edi zurück ret // extern uintD dec_loop_up (uintD* ptr, uintC count); ALIGN DECLARE_FUNCTION(dec_loop_up) C(dec_loop_up:) movl 4(%esp),%edx // %edx = ptr movl 8(%esp),%ecx // %ecx = count jecxz L(dlu2) // %ecx = 0 ? L(dlu1:) subl $1,(%edx) // (*ptr)-- jnc L(dlu3) // kein Carry -> fertig leal 4(%edx),%edx decl %ecx jnz L(dlu1) L(dlu2:) movl $-1,%eax // Ergebnis := -1 ret L(dlu3:) xorl %eax,%eax // Ergebnis := 0 ret // extern uintD neg_loop_up (uintD* ptr, uintC count); ALIGN DECLARE_FUNCTION(neg_loop_up) C(neg_loop_up:) movl 4(%esp),%edx // %edx = ptr movl 8(%esp),%ecx // %ecx = count // erstes Digit /=0 suchen: jecxz L(nlu2) // %ecx = 0 ? L(nlu1:) negl (%edx) jnz L(nlu3) leal 4(%edx),%edx decl %ecx jnz L(nlu1) L(nlu2:) xorl %eax,%eax // Ergebnis := 0 ret nop ; nop ; nop ; nop ; nop ; nop L(nlu3:) // erstes Digit /=0 gefunden, ab jetzt gibt's Carrys // alle anderen Digits invertieren: decl %ecx jz L(nlu5) L(nlu4:) leal 4(%edx),%edx notl (%edx) decl %ecx jnz L(nlu4) L(nlu5:) movl $-1,%eax // Ergebnis := -1 ret // extern uintD shift1left_loop_up (uintD* ptr, uintC count); ALIGN DECLARE_FUNCTION(shift1left_loop_up) C(shift1left_loop_up:) movl 4(%esp),%edx // %edx = ptr movl 8(%esp),%ecx // %ecx = count orl %ecx,%ecx // %ecx = 0 ?, Carry löschen jz L(s1llu2) nop ; nop ; nop ; nop L(s1llu1:) rcll $1,(%edx) // *ptr und Carry um 1 Bit links rotieren leal 4(%edx),%edx // ptr++ decl %ecx jnz L(s1llu1) L(s1llu2:) sbbl %eax,%eax // Ergebnis := - Carry ret // extern uintD shiftleft_loop_up (uintD* ptr, uintC count, uintC i, uintD carry); ALIGN DECLARE_FUNCTION(shiftleft_loop_up) C(shiftleft_loop_up:) pushl %edi // %edi retten pushl %ebx // %ebx retten movl 12(%esp),%edi // %edi = ptr movl 16(%esp),%edx // %edx = count movb 20(%esp),%cl // %cl = i orl %edx,%edx // count = 0 ? jz L(sllu4) // erstes Digit shiften: movl (%edi),%eax // Digit in %eax halten movl %eax,%ebx // und in %ebx rechnen: shll %cl,%ebx // um i Bits links shiften orl 24(%esp),%ebx // und die unteren i Bits eintragen movl %ebx,(%edi) // und wieder ablegen leal 4(%edi),%edi // Letztes Digit in %eax. decl %edx jz L(sllu2) nop ; nop ; nop ; nop L(sllu1:) // weiteres Digit shiften: movl (%edi),%ebx shldl shcl %eax,(%edi) // (%edi) um %cl=i Bits links shiften, %eax von rechts reinshiften leal 4(%edi),%edi // Letztes Digit in %ebx. decl %edx jz L(sllu3) // weiteres Digit shiften: movl (%edi),%eax shldl shcl %ebx,(%edi) // (%edi) um %cl=i Bits links shiften, %ebx von rechts reinshiften leal 4(%edi),%edi // Letztes Digit in %eax. decl %edx jnz L(sllu1) L(sllu2:) movl %eax,%ebx L(sllu3:) xorl %eax,%eax // %eax := 0 shldl shcl %ebx,%eax // %eax := höchste %cl=i Bits von %ebx popl %ebx // %ebx zurück popl %edi // %edi zurück ret L(sllu4:) movl 24(%esp),%eax // %eax := carry popl %ebx // %ebx zurück popl %edi // %edi zurück ret #endif // extern uintD shiftleftcopy_loop_up (uintD* sourceptr, uintD* destptr, uintC count, uintC i); ALIGN DECLARE_FUNCTION(shiftleftcopy_loop_up) C(shiftleftcopy_loop_up:) pushl %esi // %esi retten pushl %edi // %edi retten pushl %ebx // %ebx retten movl 16(%esp),%esi // %esi = sourceptr movl 20(%esp),%edi // %edi = destptr movl 24(%esp),%edx // count movb 28(%esp),%cl // i orl %edx,%edx // count = 0 ? jz L(slclu4) subl %edi,%esi // erstes Digit shiften: movl (%edi,%esi),%ebx // *sourceptr in %ebx halten movl %ebx,%eax // und in %eax rechnen: shll %cl,%eax // um i Bits links shiften, rechts Nullen rein movl %eax,(%edi) // und als *destptr ablegen leal 4(%edi),%edi // sourceptr++, destptr++ // Letztes Digit in %ebx. negb %cl // 32-i decl %edx jz L(slclu2) L(slclu1:) // weiteres Digit shiften: movl (%edi,%esi),%eax // nächstes Digit nach %eax shrdl shcl %eax,%ebx // %ebx um %cl=32-i Bits rechts shiften, %eax von links reinshiften movl %ebx,(%edi) // %ebx als *destptr ablegen leal 4(%edi),%edi // sourceptr++, destptr++ // Letztes Digit in %eax. decl %edx jz L(slclu3) // weiteres Digit shiften: movl (%edi,%esi),%ebx // nächstes Digit nach %ebx shrdl shcl %ebx,%eax // %eax um %cl=32-i Bits rechts shiften, %ebx von links reinshiften movl %eax,(%edi) // %eax als *destptr ablegen leal 4(%edi),%edi // sourceptr++, destptr++ // Letztes Digit in %ebx. decl %edx jnz L(slclu1) L(slclu2:) movl %ebx,%eax L(slclu3:) shrl %cl,%eax // %eax um 32-i Bits nach rechts shiften popl %ebx // %ebx zurück popl %edi // %edi zurück popl %esi // %esi zurück ret L(slclu4:) xorl %eax,%eax // %eax := 0 popl %ebx // %ebx zurück popl %edi // %edi zurück popl %esi // %esi zurück ret #if !CL_DS_BIG_ENDIAN_P // extern uintD shift1right_loop_down (uintD* ptr, uintC count, uintD carry); ALIGN DECLARE_FUNCTION(shift1right_loop_down) C(shift1right_loop_down:) movl 4(%esp),%edx // %edx = ptr movl 8(%esp),%ecx // %ecx = count movl 12(%esp),%eax // %eax = carry (0 oder -1) jecxz L(s1rlu3) // %ecx = 0 ? addl %eax,%eax // Carry := Bit 31 von carry L(s1rlu1:) leal -4(%edx),%edx // ptr-- rcrl $1,(%edx) // *ptr und Carry um 1 Bit rechts rotieren decl %ecx jnz L(s1rlu1) L(s1rlu2:) sbbl %eax,%eax // Ergebnis := - Carry L(s1rlu3:) ret // extern uintD shiftright_loop_down (uintD* ptr, uintC count, uintC i); ALIGN DECLARE_FUNCTION(shiftright_loop_down) C(shiftright_loop_down:) pushl %edi // %edi retten pushl %ebx // %ebx retten movl 12(%esp),%edi // %edi = ptr movl 16(%esp),%edx // %edx = count movb 20(%esp),%cl // %cl = i orl %edx,%edx // count = 0 ? jz L(srld4) // erstes Digit shiften: leal -4(%edi),%edi movl (%edi),%eax // Digit in %eax halten movl %eax,%ebx // und in %ebx rechnen: shrl %cl,%ebx // um i Bits rechts shiften movl %ebx,(%edi) // und wieder ablegen // Letztes Digit in %eax. decl %edx jz L(srld2) L(srld1:) // weiteres Digit shiften: leal -4(%edi),%edi movl (%edi),%ebx shrdl shcl %eax,(%edi) // (%edi) um %cl=i Bits rechts shiften, %eax von links reinshiften // Letztes Digit in %ebx. decl %edx jz L(srld3) // weiteres Digit shiften: leal -4(%edi),%edi movl (%edi),%eax shrdl shcl %ebx,(%edi) // (%edi) um %cl=i Bits rechts shiften, %ebx von links reinshiften // Letztes Digit in %eax. decl %edx jnz L(srld1) L(srld2:) movl %eax,%ebx L(srld3:) xorl %eax,%eax // %eax := 0 shrdl shcl %ebx,%eax // %eax := niedrigste %cl=i Bits von %ebx, als Bits 31..32-i popl %ebx // %ebx zurück popl %edi // %edi zurück ret L(srld4:) xorl %eax,%eax // %eax := 0 popl %ebx // %ebx zurück popl %edi // %edi zurück ret // extern uintD shiftrightsigned_loop_down (uintD* ptr, uintC count, uintC i); ALIGN DECLARE_FUNCTION(shiftrightsigned_loop_down) C(shiftrightsigned_loop_down:) pushl %edi // %edi retten pushl %ebx // %ebx retten movl 12(%esp),%edi // %edi = ptr movl 16(%esp),%edx // %edx = count movb 20(%esp),%cl // %cl = i // erstes Digit shiften: leal -4(%edi),%edi movl (%edi),%eax // Digit in %eax halten movl %eax,%ebx // und in %ebx rechnen: sarl %cl,%ebx // um i Bits rechts shiften, Vorzeichen vervielfachen movl %ebx,(%edi) // und wieder ablegen // Letztes Digit in %eax. decl %edx jz L(srsld2) nop ; nop ; nop ; nop L(srsld1:) // weiteres Digit shiften: leal -4(%edi),%edi movl (%edi),%ebx shrdl shcl %eax,(%edi) // (%edi) um %cl=i Bits rechts shiften, %eax von links reinshiften // Letztes Digit in %ebx. decl %edx jz L(srsld3) // weiteres Digit shiften: leal -4(%edi),%edi movl (%edi),%eax shrdl shcl %ebx,(%edi) // (%edi) um %cl=i Bits rechts shiften, %ebx von links reinshiften // Letztes Digit in %eax. decl %edx jnz L(srsld1) L(srsld2:) movl %eax,%ebx L(srsld3:) xorl %eax,%eax // %eax := 0 shrdl shcl %ebx,%eax // %eax := niedrigste %cl=i Bits von %ebx, als Bits 31..32-i popl %ebx // %ebx zurück popl %edi // %edi zurück ret // extern uintD shiftrightcopy_loop_down (uintD* sourceptr, uintD* destptr, uintC count, uintC i, uintD carry); ALIGN DECLARE_FUNCTION(shiftrightcopy_loop_down) C(shiftrightcopy_loop_down:) pushl %esi // %esi retten pushl %edi // %edi retten pushl %ebx // %ebx retten movl 16(%esp),%esi // %esi = sourceptr movl 20(%esp),%edi // %edi = destptr movl 24(%esp),%edx // count movb 28(%esp),%cl // i negb %cl // 32-i movl 32(%esp),%eax // %eax = carry orl %edx,%edx // count = 0 ? jz L(srclu3) subl %edi,%esi // erstes Digit shiften: leal -4(%edi),%edi // sourceptr--, destptr-- movl (%edi,%esi),%ebx // *sourceptr in %ebx halten shldl shcl %ebx,%eax // carry um %cl=32-i Bits links shiften, dabei *sourceptr rein movl %eax,(%edi) // und als *destptr ablegen // Letztes Digit in %ebx. decl %edx jz L(srclu2) nop ; nop ; nop L(srclu1:) // weiteres Digit shiften: leal -4(%edi),%edi // sourceptr--, destptr-- movl (%edi,%esi),%eax // nächstes Digit nach %eax shldl shcl %eax,%ebx // %ebx um %cl=32-i Bits links shiften, %eax von rechts reinshiften movl %ebx,(%edi) // %ebx als *destptr ablegen // Letztes Digit in %eax. decl %edx jz L(srclu3) // weiteres Digit shiften: leal -4(%edi),%edi // sourceptr--, destptr-- movl (%edi,%esi),%ebx // nächstes Digit nach %ebx shldl shcl %ebx,%eax // %eax um %cl=32-i Bits links shiften, %ebx von rechts reinshiften movl %eax,(%edi) // %eax als *destptr ablegen // Letztes Digit in %ebx. decl %edx jnz L(srclu1) L(srclu2:) movl %ebx,%eax L(srclu3:) shll %cl,%eax // %eax um 32-i Bits nach links shiften popl %ebx // %ebx zurück popl %edi // %edi zurück popl %esi // %esi zurück ret // extern uintD mulusmall_loop_up (uintD digit, uintD* ptr, uintC len, uintD newdigit); ALIGN DECLARE_FUNCTION(mulusmall_loop_up) C(mulusmall_loop_up:) pushl %ebp // %ebp retten pushl %edi // %edi retten pushl %ebx // %ebx retten movl 16(%esp),%ebx // %ebx = digit movl 20(%esp),%edi // %edi = ptr movl 24(%esp),%ecx // %ecx = len movl 28(%esp),%ebp // %ebp = carry := newdigit leal (%edi,%ecx,4),%edi // %edi = &ptr[len] negl %ecx // %ecx = -count jz L(mslu2) L(mslu1:) movl (%edi,%ecx,4),%eax // *ptr mull %ebx // %edx|%eax := digit * *ptr addl %ebp,%eax // carry und Low-Teil des Produktes addieren movl $0,%ebp adcl %edx,%ebp // Übertrag zum High-Teil %edx dazu, gibt neuen carry movl %eax,(%edi,%ecx,4) // Low-Teil als *ptr ablegen incl %ecx // count--, ptr++ jnz L(mslu1) L(mslu2:) movl %ebp,%eax // Ergebnis := letzter Übertrag popl %ebx // %ebx zurück popl %edi // %edi zurück popl %ebp // %ebp zurück ret // extern void mulu_loop_up (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); ALIGN DECLARE_FUNCTION(mulu_loop_up) C(mulu_loop_up:) pushl %ebp // %ebp retten pushl %edi // %edi retten pushl %esi // %esi retten pushl %ebx // %ebx retten movl 20(%esp),%ebx // %ebx = digit movl 24(%esp),%esi // %esi = sourceptr movl 28(%esp),%edi // %edi = destptr movl 32(%esp),%ecx // %ecx = len leal (%esi,%ecx,4),%esi // %esi = &sourceptr[len] leal (%edi,%ecx,4),%edi // %edi = &destptr[len] negl %ecx // %ecx = -count xorl %ebp,%ebp // %epb = carry := 0 nop ; nop L(mulu1:) movl (%esi,%ecx,4),%eax // *sourceptr mull %ebx // %edx|%eax := digit * *sourceptr addl %ebp,%eax // carry und Low-Teil des Produktes addieren movl $0,%ebp adcl %edx,%ebp // Übertrag zum High-Teil %edx dazu, gibt neuen carry movl %eax,(%edi,%ecx,4) // Low-Teil als *destptr ablegen incl %ecx // count--, sourceptr++, destptr++ jnz L(mulu1) movl %ebp,(%edi) // letzten Übertrag ablegen popl %ebx // %ebx zurück popl %esi // %esi zurück popl %edi // %edi zurück popl %ebp // %ebp zurück ret // extern uintD muluadd_loop_up (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); ALIGN DECLARE_FUNCTION(muluadd_loop_up) C(muluadd_loop_up:) pushl %ebp // %ebp retten pushl %edi // %edi retten pushl %esi // %esi retten pushl %ebx // %ebx retten movl 20(%esp),%ebx // %ebx = digit movl 24(%esp),%esi // %esi = sourceptr movl 28(%esp),%edi // %edi = destptr movl 32(%esp),%ecx // %ecx = len leal (%esi,%ecx,4),%esi // %esi = &sourceptr[len] leal (%edi,%ecx,4),%edi // %edi = &destptr[len] negl %ecx // %ecx = -count xorl %ebp,%ebp // %epb = carry := 0 nop ; nop L(mualu1:) movl (%esi,%ecx,4),%eax // *sourceptr mull %ebx // %edx|%eax := digit * *sourceptr addl %ebp,%eax // carry und Low-Teil des Produktes addieren movl $0,%ebp adcl %ebp,%edx // Übertrag zum High-Teil %edx dazu addl %eax,(%edi,%ecx,4) // Low-Teil zu *destptr addieren adcl %edx,%ebp // zweiten Übertrag zu %edx addieren, gibt neuen carry incl %ecx // count--, sourceptr++, destptr++ jnz L(mualu1) movl %ebp,%eax // Ergebnis := letzter Übertrag popl %ebx // %ebx zurück popl %esi // %esi zurück popl %edi // %edi zurück popl %ebp // %ebp zurück ret // extern uintD mulusub_loop_up (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); ALIGN DECLARE_FUNCTION(mulusub_loop_up) C(mulusub_loop_up:) pushl %ebp // %ebp retten pushl %edi // %edi retten pushl %esi // %esi retten pushl %ebx // %ebx retten movl 20(%esp),%ebx // %ebx = digit movl 24(%esp),%esi // %esi = sourceptr movl 28(%esp),%edi // %edi = destptr movl 32(%esp),%ecx // %ecx = len leal (%esi,%ecx,4),%esi // %esi = &sourceptr[len] leal (%edi,%ecx,4),%edi // %edi = &destptr[len] negl %ecx // %ecx = -count xorl %ebp,%ebp // %epb = carry := 0 nop ; nop L(muslu1:) movl (%esi,%ecx,4),%eax // *sourceptr mull %ebx // %edx|%eax := digit * *sourceptr addl %ebp,%eax // carry und Low-Teil des Produktes addieren movl $0,%ebp adcl %ebp,%edx // Übertrag zum High-Teil %edx dazu subl %eax,(%edi,%ecx,4) // Low-Teil von *destptr subtrahieren adcl %edx,%ebp // zweiten Übertrag zu %edx addieren, gibt neuen carry incl %ecx // count--, sourceptr++, destptr++ jnz L(muslu1) movl %ebp,%eax // Ergebnis := letzter Übertrag popl %ebx // %ebx zurück popl %esi // %esi zurück popl %edi // %edi zurück popl %ebp // %ebp zurück ret // extern uintD divu_loop_down (uintD digit, uintD* ptr, uintC len); ALIGN DECLARE_FUNCTION(divu_loop_down) C(divu_loop_down:) pushl %edi // %edi retten pushl %ebx // %ebx retten movl 12(%esp),%ebx // %ebx = digit movl 16(%esp),%edi // %edi = ptr movl 20(%esp),%ecx // %ecx = len xorl %edx,%edx // %edx = Rest := 0 jecxz L(dld2) // %ecx = 0 ? L(dld1:) leal -4(%edi),%edi // ptr-- movl (%edi),%eax // nächstes Digit *ptr divl %ebx // Division von %edx|%eax durch %ebx movl %eax,(%edi) // Quotient %eax ablegen, Rest in %edx behalten decl %ecx jnz L(dld1) L(dld2:) movl %edx,%eax // Ergebnis := letzter Rest popl %ebx // %ebx zurück popl %edi // %edi zurück ret // extern uintD divucopy_loop_down (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); ALIGN DECLARE_FUNCTION(divucopy_loop_down) C(divucopy_loop_down:) pushl %edi // %edi retten pushl %esi // %esi retten pushl %ebx // %ebx retten movl 16(%esp),%ebx // %ebx = digit movl 20(%esp),%esi // %esi = sourceptr movl 24(%esp),%edi // %edi = destptr movl 28(%esp),%ecx // %ecx = len xorl %edx,%edx // %edx = Rest := 0 jecxz L(dcld2) // %ecx = 0 ? subl %edi,%esi L(dcld1:) leal -4(%edi),%edi // sourceptr--, destptr-- movl (%esi,%edi),%eax // nächstes Digit *ptr divl %ebx // Division von %edx|%eax durch %ebx movl %eax,(%edi) // Quotient %eax ablegen, Rest in %edx behalten decl %ecx jnz L(dcld1) L(dcld2:) movl %edx,%eax // Ergebnis := letzter Rest popl %ebx // %ebx zurück popl %esi // %esi zurück popl %edi // %edi zurück ret #endif // extern void shiftxor_loop_up (uintD* xptr, const uintD* yptr, uintC count, uintC i); ALIGN DECLARE_FUNCTION(shiftxor_loop_up) C(shiftxor_loop_up:) pushl %esi // %esi retten pushl %edi // %edi retten pushl %ebx // %ebx retten movl 16(%esp),%esi // %esi = xptr movl 20(%esp),%edi // %edi = yptr movl 24(%esp),%edx // count movb 28(%esp),%cl // i orl %edx,%edx // count = 0 ? jz L(shxlu4) subl %esi,%edi // erstes Digit shiften: movl (%esi,%edi),%ebx // *yptr in %ebx halten movl %ebx,%eax // und in %eax rechnen: shll %cl,%eax // um i Bits links shiften, rechts Nullen rein xorl %eax,(%esi) // und mit *xptr verknüpfen und ablegen leal 4(%esi),%esi // sourceptr++, destptr++ // Letztes Digit in %ebx. negb %cl // 32-i decl %edx jz L(shxlu2) L(shxlu1:) // weiteres Digit shiften: movl (%esi,%edi),%eax // nächstes Digit nach %eax shrdl shcl %eax,%ebx // %ebx um %cl=32-i Bits rechts shiften, %eax von links reinshiften xorl %ebx,(%esi) // %ebx mit *xptr verknüpfen und ablegen leal 4(%esi),%esi // xptr++, yptr++ // Letztes Digit in %eax. decl %edx jz L(shxlu3) // weiteres Digit shiften: movl (%esi,%edi),%ebx // nächstes Digit nach %ebx shrdl shcl %ebx,%eax // %eax um %cl=32-i Bits rechts shiften, %ebx von links reinshiften xorl %eax,(%esi) // %eax mit *xptr verknüpfen und ablegen leal 4(%esi),%esi // xptr++, yptr++ // Letztes Digit in %ebx. decl %edx jnz L(shxlu1) L(shxlu2:) movl %ebx,%eax L(shxlu3:) shrl %cl,%eax // %eax um 32-i Bits nach rechts shiften xorl %eax,(%esi) // und mit *xptr verknüpfen und ablegen L(shxlu4:) popl %ebx // %ebx zurück popl %edi // %edi zurück popl %esi // %esi zurück ret cln-1.3.3/src/base/digitseq/cl_asm_arm_.cc0000644000000000000000000047016111547674637015272 0ustar // ariarm.d (c) Copyright 1994, 1997 P.J.Burwood // little-endian modifications (c) Copyright 1996 B. Haible // external routines for arilev1.d // Processor: ARM in APCS mode // Assembler-Syntax: ObjAsm under RISC OS, GAS otherwise // Assumptions: intCsize=32, intDsize=32. // Parameter passing conventions: APCS means that registers a1-a4 and ip // do not have to be preserved across function calls. // Note: A sequence of up to 4 conditional instructions is used in preference // to a branch. #ifdef __riscos // ObjAsm syntax a1 RN 0 a2 RN 1 a3 RN 2 a4 RN 3 v1 RN 4 v2 RN 5 v3 RN 6 v4 RN 7 v5 RN 8 v6 RN 9 sl RN 10 fp RN 11 ip RN 12 sp RN 13 lr RN 14 pc RN 15 f0 FN 0 f1 FN 1 f2 FN 2 f3 FN 3 f4 FN 4 f5 FN 5 f6 FN 6 f7 FN 7 #define C(x) _##x #define EXPORT(x) EXPORT x #define DECLARE_FUNCTION(x) #define GLABEL(x) _##x #define LABEL(x) _##x AREA |C$$code|,CODE,READONLY #else // GAS syntax a1 .req r0 a2 .req r1 a3 .req r2 a4 .req r3 v1 .req r4 v2 .req r5 v3 .req r6 v4 .req r7 v5 .req r8 v6 .req r9 rfp .req r9 sl .req r10 fp .req r11 ip .req r12 sp .req r13 lr .req r14 pc .req r15 #define C(x) _##x #define EXPORT(x) .global _##x #if defined(__NetBSD__) #define DECLARE_FUNCTION(x) .type _##x,%function #else #define DECLARE_FUNCTION(x) #endif #define GLABEL(x) _##x##: #define LABEL(x) x##: #define RRX rrx #define END #endif #if defined(__arm7m__) || defined(__arm8__) || defined(__arm9__) || defined(__strongarm__) // ARM7M and later have 32x32 -> 64 multiplies which execute in 2-4 clocks. #define HAVE_umull #endif #if defined(__GNUC__) && 0 // With GNU C, we would like to pass the second return value in a2, don't // need a global variable. Unfortunately, the current Acorn gcc crashes if // we declare an appropriate local register variable with __asm__. // It would be possible to declare the functions as returning a 64-bit // result, but given the quality of gcc code dealing with 64-bit entities // and the subtleties of 64-bit returns values (passed in register or in // memory?) we now let it be. #else // Use three global variables. #define MULU32_HIGH #define DIVU_16_REST #define DIVU_32_REST #endif #ifdef __riscos #ifdef MULU32_HIGH ptr_mulu32_high IMPORT mulu32_high DCD mulu32_high #endif #ifdef DIVU_16_REST ptr_divu_16_rest IMPORT divu_16_rest DCD divu_16_rest #endif #ifdef DIVU_32_REST ptr_divu_32_rest IMPORT divu_32_rest DCD divu_32_rest #endif #else #ifdef MULU32_HIGH ptr_mulu32_high: .word _mulu32_high .align 0 #endif #ifdef DIVU_16_REST ptr_divu_16_rest: .word _divu_16_rest .align 0 #endif #ifdef DIVU_32_REST ptr_divu_32_rest: .word _divu_32_rest .align 0 #endif #endif // extern uint32 mulu32_ (uint32 x, uint32 y); // entry // a1 = x // a2 = y // exit // a1 = low32(x*y) // a2 = high32(x*y) // mulu32_high = high32(x*y) // a3,a4,ip destroyed EXPORT(mulu32_) DECLARE_FUNCTION(mulu32_) GLABEL(mulu32_) #ifdef HAVE_umull MOV a3,a2 UMULL a1,a2,a3,a1 #else MOV ip,a1,LSR #16 // temp := top half of x MOV a3,a2,LSR #16 // hi := top half of y BIC a1,a1,ip,LSL #16 // x := bottom half of x BIC a2,a2,a3,LSL #16 // y := bottom half of y MUL a4,a1,a2 // low section of result MUL a2,ip,a2 // ) middle sections MUL a1,a3,a1 // ) of result MUL a3,ip,a3 // high section of result ADDS a2,a2,a1 // add middle sections // (can't use mla as we need carry) ADDCS a3,a3,#0x10000 // carry from above add ADDS a1,a4,a2,LSL #16 // x is now bottom 32 bits of result ADC a2,a3,a2,LSR #16 // hi is top 32 bits #endif #ifdef MULU32_HIGH LDR a3,[pc,#ptr_mulu32_high-.-8] STR a2,[a3,#0] #endif MOVS pc,lr // extern uint16 divu_3216_1616_ (uint32 x, uint16 y); // entry // a1 = x // a2 = y // exit // a1 = q = floor(x/y) // a2 = r = x-q*y // divu_16_rest = r = x-q*y // a3 destroyed EXPORT(divu_3216_1616_) DECLARE_FUNCTION(divu_3216_1616_) GLABEL(divu_3216_1616_) // see cl_low_div.cc for algorithm // in that notation: a1 = r, a2 = -s. MOV a2,a2,LSL#15 // multiply divisor by 2^15 RSB a2,a2,#0 // negate divisor ADDS a1,a2,a1 // dividend = dividend + -divisor/2 SUBCC a1,a1,a2 // dividend = dividend - -divisor/2 ADCS a1,a2,a1,LSL#1 // dividend = dividend*2 + -divisor // and shift quotient SUBCC a1,a1,a2 // do this another 14 times ADCS a1,a2,a1,LSL#1 SUBCC a1,a1,a2 ADCS a1,a2,a1,LSL#1 SUBCC a1,a1,a2 ADCS a1,a2,a1,LSL#1 SUBCC a1,a1,a2 ADCS a1,a2,a1,LSL#1 SUBCC a1,a1,a2 ADCS a1,a2,a1,LSL#1 SUBCC a1,a1,a2 ADCS a1,a2,a1,LSL#1 SUBCC a1,a1,a2 ADCS a1,a2,a1,LSL#1 SUBCC a1,a1,a2 ADCS a1,a2,a1,LSL#1 SUBCC a1,a1,a2 ADCS a1,a2,a1,LSL#1 SUBCC a1,a1,a2 ADCS a1,a2,a1,LSL#1 SUBCC a1,a1,a2 ADCS a1,a2,a1,LSL#1 SUBCC a1,a1,a2 ADCS a1,a2,a1,LSL#1 SUBCC a1,a1,a2 ADCS a1,a2,a1,LSL#1 SUBCC a1,a1,a2 ADCS a1,a2,a1,LSL#1 SUBCC a1,a1,a2 // do the last conditional subtraction MOV a2,a1,LSR#15 // move remainder into a2 and shift ADC a1,a1,a1 // move last bit of quotient in MOV a1,a1,LSL#16 // AND out top 16 bits by shifting up MOV a1,a1,LSR#16 // and back down again #ifdef DIVU_16_REST LDR a3,[pc,#ptr_divu_16_rest-.-8] // save rest so can be picked up later STR a2,[a3,#0] // the result is 16 bits #endif MOVS pc, lr // extern uint32 divu_6432_3232_ (uint32 xhi, uint32 xlo, uint32 y); // -> Quotient q // extern uint32 divu_32_rest; // -> Rest r // see cl_low_div.cc for algorithm // entry // a1 = xhi (dividend) // a2 = xlo (dividend) // a3 = y (divisor) // exit // a1 = 32 bit quotient // a2 = 32 bit remainder // a3, a4 destroyed EXPORT(divu_6432_3232_) DECLARE_FUNCTION(divu_6432_3232_) GLABEL(divu_6432_3232_) STMFD sp!, {v1,v2,v3,v4,v5,v6,lr} MOV v2, a2 // = xlo MOV v1, a3 // = y CMP a3,#0x10000 // y <= (uint32)(bit(16)-1) BCS divu_6432_3232_l1 MOV a2, v2, LSR #16 ORR a1, a2, a1, ASL #16 // = highlow32(low16(xhi),high16(xlo)) MOV a2, v1 BL C(divu_3216_1616_) MOV v3, a1 // = q1 MOV a1, v2, ASL #16 MOV a1, a1, LSR #16 ORR a1, a1, a2, ASL #16 // = highlow32(r1,low16(xlo)) MOV a2, v1 BL C(divu_3216_1616_) ORR a1, a1, v3, ASL #16 // = highlow32(q1,q0) #ifdef DIVU_32_REST LDR a4,[pc,#ptr_divu_32_rest-.-8] STR a2,[a4,#0] // divu_32_rest = remainder #endif LDMFD sp!, {v1,v2,v3,v4,v5,v6,pc}^ LABEL(divu_6432_3232_l1) MOV v3, #0 // s = 0 MOVS a4, v1, LSR #16 // while ((sint32)y >= 0) ADDEQ v3, v3, #16 // { y = y<<1; s++; } MOVEQ v1, v1, ASL #16 MOVS a4, v1, LSR #24 ADDEQ v3, v3, #8 MOVEQ v1, v1, ASL #8 MOVS a4, v1, LSR #28 ADDEQ v3, v3, #4 MOVEQ v1, v1, ASL #4 MOVS a4, v1, LSR #30 ADDEQ v3, v3, #2 MOVEQ v1, v1, ASL #2 MOVS a4, v1, LSR #31 ADDEQ v3, v3, #1 MOVEQ v1, v1, ASL #1 CMPS v3, #0 MOVNE a2, a1, ASL v3 // if (!(s==0)) RSBNE a1, v3, #32 // { xhi = (xhi << s) ORRNE a1, a2, v2, LSR a1 // | (xlo >> (32-s)); MOVNE v2, v2, ASL v3 // xlo = xlo << s; } ADD a2, v1, #0x10000 // y1_1 = high16(y)+1 MOVS v5, a2, LSR #16 // if (y1_1 = 0) MOVEQ v4, a1, ASL #16 // r16 = low16(xhi) * 2^16 MOVEQ a1, a1, LSR #16 // q1 = high16(xhi) MOVNE a2, v5 BLNE C(divu_3216_1616_) // divu_3216_1616(xhi,y1_1, q1=,r16=) MOVNE v4, a2, ASL #16 // r16 = r16 * 2^16 ORR v4, v4, v2, LSR #16 // r = highlow32(r16,high16(xlo)) MOV a4, v1, ASL #16 // tmp = mulu16(low16(y),q1) MOV a4, a4, LSR #16 MUL a3, a4, a1 RSB a3, a3, a1, ASL #16 // r2 = highlow32_0(q1) - tmp MOV v6, a1 // = q1 ADDS a1, v4, a3 // r += r2 ADDCS v6, v6, #1 // if ( r < r2 ) { q1 += 1 SUBCS a1, a1, v1 // r -= y } CMP a1, v1 // if (r >= y) ADDCS v6, v6, #1 // { q1 += 1 SUBCS a1, a1, v1 // r -= y } CMP v5, #0 // if (y1_1 = 0) MOVEQ v4, a1, ASL #16 // { r16 = low16(r) * 2^16 MOVEQ a1, a1, LSR #16 // q0 = high16(r) } MOVNE a2, v5 BLNE C(divu_3216_1616_) // divu_3216_1616(r,y1_1, q0=,r16=) MOVNE v4, a2, ASL #16 // r16 = r16 * 2^16 MOV v2, v2, ASL #16 ORR v4, v4, v2, LSR #16 // r = highlow32(r16,low16(xlo)) MOV a4, v1, ASL #16 // tmp = mulu16(low16(y),q0) MOV a4, a4, LSR #16 MUL a3, a4, a1 RSB a3, a3, a1, ASL #16 // r2 = highlow32_0(q0) - tmp ADDS v4, v4, a3 // r += r2 ADDCS a1, a1, #1 // if ( r < r2 ) { q0 += 1 SUBCS v4, v4, v1 // r -= y } CMP v4, v1 // if (r >= y) ADDCS a1, a1, #1 // { q0 += 1 SUBCS v4, v4, v1 // r -= y } MOV a2, v4, LSR v3 // remainder = r >> s ORR a1, a1, v6, ASL #16 // return highlow32(q1,q0) #ifdef DIVU_32_REST LDR a3,[pc,#ptr_divu_32_rest-.-8] STR a2,[a3,#0] // divu_32_rest = remainder #endif LDMFD sp!, {v1,v2,v3,v4,v5,v6,pc}^ // extern uintD* copy_loop_up (uintD* sourceptr, uintD* destptr, uintC count); // entry // a1 = source pointer // a2 = destination pointer // a3 = count of words to store // exit // a1 = address of last word stored + 1 // a2 - a4, ip destroyed EXPORT(copy_loop_up) // word aligned copy loop up DECLARE_FUNCTION(copy_loop_up) GLABEL(copy_loop_up) ANDS a4,a3,#3 // multiple of 4 words ? BEQ copy_loop_up_l1 // yup, so branch CMP a4,#2 // copy the first 1-3 words LDR a4,[a1],#4 // to align the total to a multiple STR a4,[a2],#4 // of 4 words LDRGE a4,[a1],#4 STRGE a4,[a2],#4 LDRGT a4,[a1],#4 STRGT a4,[a2],#4 LABEL(copy_loop_up_l1) BICS a4,a3,#3 // set counter to multiple of 4 MOVEQ a1,a2 // return addr of last word stored MOVEQS pc,lr // if zero then we're done STMFD sp!,{v1,lr} // save work regs LABEL(copy_loop_up_l2) LDMIA a1!,{a3,v1,ip,lr} // copy 4 words in one go STMIA a2!,{a3,v1,ip,lr} SUBS a4,a4,#8 // decrement counter by 8 LDMGEIA a1!,{a3,v1,ip,lr} // if count still positive then copy STMGEIA a2!,{a3,v1,ip,lr} // 4 more words BGT copy_loop_up_l2 // and loop MOV a1,a2 // return addr of last word stored LDMFD sp!,{v1,pc}^ // restore work regs and return // extern uintD* copy_loop_down (uintD* sourceptr, uintD* destptr, uintC count); // entry // a1 = source pointer // a2 = destination pointer // a3 = count of words to store // exit // a1 = address of last word stored // a2 - a4, ip destroyed EXPORT(copy_loop_down) // word aligned copy loop down DECLARE_FUNCTION(copy_loop_down) GLABEL(copy_loop_down) ANDS a4,a3,#3 // multiple of 4 words ? BEQ copy_loop_down_l1 // yup, so branch CMP a4,#2 // copy the first 1-3 words LDR a4,[a1,#-4]! // to align the total to a multiple STR a4,[a2,#-4]! // of 4 words LDRGE a4,[a1,#-4]! STRGE a4,[a2,#-4]! LDRGT a4,[a1,#-4]! STRGT a4,[a2,#-4]! LABEL(copy_loop_down_l1) BICS a4,a3,#3 // set counter to multiple of 4 MOVEQ a1,a2 // return addr of last word stored MOVEQS pc,lr // if zero then we're done STMFD sp!,{v1,lr} // save work regs LABEL(copy_loop_down_l2) LDMDB a1!,{a3,v1,ip,lr} // copy 4 words in one go STMDB a2!,{a3,v1,ip,lr} SUBS a4,a4,#8 // decrement counter by 8 LDMGEDB a1!,{a3,v1,ip,lr} // if count still positive then copy STMGEDB a2!,{a3,v1,ip,lr} // 4 more words BGT copy_loop_down_l2 // and loop MOV a1,a2 // return addr of last word stored LDMFD sp!,{v1,pc}^ // restore work regs and return // extern uintD* clear_loop_up (uintD* destptr, uintC count); // entry // a1 = destination pointer // a2 = count of words to store // exit // a1 = address of last word stored + 1 // a2 - a4, ip destroyed EXPORT(clear_loop_up) // word aligned clear loop up DECLARE_FUNCTION(clear_loop_up) GLABEL(clear_loop_up) MOV a3,#0 // set filler to 0 // and drop into fill_loop_up // extern uintD* fill_loop_up (uintD* destptr, uintC count, uintD filler); // entry // a1 = destination pointer // a2 = count of words to store // a3 = word to store // exit // a1 = address of last word stored + 1 // a2 - a4, ip destroyed EXPORT(fill_loop_up) // word aligned fill loop up DECLARE_FUNCTION(fill_loop_up) GLABEL(fill_loop_up) ANDS a4,a2,#3 // multiple of 4 words ? BEQ fill_loop_up_l1 // yup, so branch CMP a4,#2 // store the first 1-3 words STR a3,[a1],#4 // to align the total to a multiple STRGE a3,[a1],#4 // of 4 words STRGT a3,[a1],#4 LABEL(fill_loop_up_l1) BICS a4,a2,#3 // set counter to multiple of 4 MOVEQS pc,lr // if zero then we're done STMFD sp!,{v1,lr} // save work regs MOV v1,a3 // copy filler to three other MOV ip,a3 // registers MOV lr,a3 LABEL(fill_loop_up_l2) STMIA a1!,{a3,v1,ip,lr} // store 4 fillers in one go SUBS a4,a4,#8 // decrement counter by 8 STMGEIA a1!,{a3,v1,ip,lr} // if count still positive then store 4 BGT fill_loop_up_l2 // more and loop LDMFD sp!,{v1,pc}^ // restore work regs and return // extern uintD* clear_loop_down (uintD* destptr, uintC count); // entry // a1 = destination pointer // a2 = count of words to store // exit // a1 = address of last word stored + 1 // a2 - a4, ip destroyed EXPORT(clear_loop_down) // word aligned clear loop down DECLARE_FUNCTION(clear_loop_down) GLABEL(clear_loop_down) MOV a3,#0 // set filler to 0 // and drop into fill_loop_down // extern uintD* fill_loop_down (uintD* destptr, uintC count, uintD filler); // entry // a1 = destination pointer // a2 = count of words to store // a3 = word to store // exit // a1 = address of last word stored // a2 - a4, ip destroyed EXPORT(fill_loop_down) // word aligned fill loop down DECLARE_FUNCTION(fill_loop_down) GLABEL(fill_loop_down) ANDS a4,a2,#3 // multiple of 4 words ? BEQ fill_loop_down_l1 // yup, so branch CMP a4,#2 // store the first 1-3 words STR a3,[a1,#-4]! // to align the total to a multiple STRGE a3,[a1,#-4]! // of 4 words STRGT a3,[a1,#-4]! LABEL(fill_loop_down_l1) BICS a4,a2,#3 // set counter to multiple of 4 MOVEQS pc,lr // if zero then we're done STMFD sp!,{v1,lr} // save work regs MOV v1,a3 // copy filler to three other MOV ip,a3 // registers MOV lr,a3 LABEL(fill_loop_down_l2) STMDB a1!,{a3,v1,ip,lr} // store 4 fillers in one go SUBS a4,a4,#8 // decrement counter by 8 STMGEDB a1!,{a3,v1,ip,lr} // if count still positive then store 4 BGT fill_loop_down_l2 // more and loop LDMFD sp!,{v1,pc}^ // restore work regs and return // extern void test_loop_up (uintD* xptr, uintC count); // entry // a1 = xptr // a2 = count of words to be TESTed // exit // a1 = TRUE if any words are non-zero else FALSE // a2 - a4, ip destroyed EXPORT(test_loop_up) // word aligned test loop up DECLARE_FUNCTION(test_loop_up) GLABEL(test_loop_up) MOV ip,a1 // move xptr to ip MOV a1,#1 // set result to TRUE ANDS a3,a2,#3 // multiple of 4 words ? BEQ test_loop_up_l1 // yup, so branch LDR a4,[ip],#4 // TEST the first 1-3 words TEQ a4,#0 // align the total to a multiple of 4 MOVNES pc,lr // return TRUE if AND_TEST ok CMP a3,#2 BLT test_loop_up_l1 // need to branch 'cos PSR set LDRGE a4,[ip],#4 // when checking against zero TEQGE a4,#0 MOVNES pc,lr CMP a3,#2 BLE test_loop_up_l1 // need to branch 'cos PSR set LDRGT a4,[ip],#4 // when checking against zero TEQGT a4,#0 MOVNES pc,lr LABEL(test_loop_up_l1) BICS a4,a2,#3 // set counter to multiple of 4 MOVEQ a1,#0 // return FALSE MOVEQS pc,lr // if zero then we're done STMFD sp!,{v1,lr} // save work regs LABEL(test_loop_up_l2) LDMIA ip!,{a2,a3,v1,lr} // load 4 words in one go TEQ a2,#0 // TEST the four words TEQEQ a3,#0 TEQEQ v1,#0 TEQEQ lr,#0 LDMNEFD sp!,{v1,pc}^ SUBS a4,a4,#4 // decrement counter by 4 BGT test_loop_up_l2 // if count still positive then loop MOV a1,#0 LDMFD sp!,{v1,pc}^ // restore work regs and return // extern void test_loop_down (uintD* xptr, uintC count); // entry // a1 = xptr // a2 = count of words to be TESTed // exit // a1 = TRUE if any words are non-zero else FALSE // a2 - a4, ip destroyed EXPORT(test_loop_down) // word aligned test loop down DECLARE_FUNCTION(test_loop_down) GLABEL(test_loop_down) MOV ip,a1 // move xptr to ip MOV a1,#1 // set result to TRUE ANDS a3,a2,#3 // multiple of 4 words ? BEQ test_loop_down_l1 // yup, so branch LDR a4,[ip,#-4]! // TEST the first 1-3 words TEQ a4,#0 // align the total to a multiple of 4 MOVNES pc,lr // return TRUE if AND_TEST ok CMP a3,#2 BLT test_loop_down_l1 // need to branch 'cos PSR set LDRGE a4,[ip,#-4]! // when checking against zero TEQGE a4,#0 MOVNES pc,lr CMP a3,#2 BLE test_loop_down_l1 // need to branch 'cos PSR set LDRGT a4,[ip,#-4]! // when checking against zero TEQGT a4,#0 MOVNES pc,lr LABEL(test_loop_down_l1) BICS a4,a2,#3 // set counter to multiple of 4 MOVEQ a1,#0 // return FALSE MOVEQS pc,lr // if zero then we're done STMFD sp!,{v1,lr} // save work regs LABEL(test_loop_down_l2) LDMDB ip!,{a2,a3,v1,lr} // load 4 words in one go TEQ a2,#0 // TEST the four words TEQEQ a3,#0 TEQEQ v1,#0 TEQEQ lr,#0 LDMNEFD sp!,{v1,pc}^ SUBS a4,a4,#4 // decrement counter by 4 BGT test_loop_down_l2 // if count still positive then loop MOV a1,#0 LDMFD sp!,{v1,pc}^ // restore work regs and return #if CL_DS_BIG_ENDIAN_P // extern void or_loop_up (uintD* xptr, uintD* yptr, uintC count); // entry // a1 = xptr // a2 = yptr // a3 = count of words to be ORed // exit // xptr |= yptr for count words // a1 - a4, ip destroyed EXPORT(or_loop_up) // word aligned or loop up DECLARE_FUNCTION(or_loop_up) GLABEL(or_loop_up) ANDS a4,a3,#3 // multiple of 4 words ? BEQ or_loop_up_l1 // yup, so branch CMP a4,#2 // OR the first 1-3 words LDR a4,[a2],#4 // to align the total to a multiple LDR ip,[a1] // of 4 words ORR ip,ip,a4 STR ip,[a1],#4 BLT or_loop_up_l1 // better to branch than skip instrs. LDRGE a4,[a2],#4 LDRGE ip,[a1] ORRGE ip,ip,a4 STRGE ip,[a1],#4 LDRGT a4,[a2],#4 LDRGT ip,[a1] ORRGT ip,ip,a4 STRGT ip,[a1],#4 LABEL(or_loop_up_l1) BICS a4,a3,#3 // set counter to multiple of 4 MOVEQS pc,lr // if zero then we're done STMFD sp!,{v1-v5,lr} // save work regs LABEL(or_loop_up_l2) LDMIA a2!,{a3,v1,v2,ip} // load 4 words in one go LDMIA a1,{v3,v4,v5,lr} // load target words ORR v3,v3,a3 // OR the four words ORR v4,v4,v1 ORR v5,v5,v2 ORR lr,lr,ip STMIA a1!,{v3,v4,v5,lr} // store 4 results SUBS a4,a4,#4 // decrement counter by 4 BGT or_loop_up_l2 // if count still positive then loop LDMFD sp!,{v1-v5,pc}^ // restore work regs and return #endif // extern void xor_loop_up (uintD* xptr, uintD* yptr, uintC count); // entry // a1 = xptr // a2 = yptr // a3 = count of words to be XORed // exit // xptr ^= yptr for count words // a1 - a4, ip destroyed EXPORT(xor_loop_up) // word aligned xor loop up DECLARE_FUNCTION(xor_loop_up) GLABEL(xor_loop_up) ANDS a4,a3,#3 // multiple of 4 words ? BEQ xor_loop_up_l1 // yup, so branch CMP a4,#2 // XOR the first 1-3 words LDR a4,[a2],#4 // to align the total to a multiple LDR ip,[a1] // of 4 words EOR ip,ip,a4 STR ip,[a1],#4 BLT xor_loop_up_l1 // better to branch than skip instrs. LDRGE a4,[a2],#4 LDRGE ip,[a1] EORGE ip,ip,a4 STRGE ip,[a1],#4 LDRGT a4,[a2],#4 LDRGT ip,[a1] EORGT ip,ip,a4 STRGT ip,[a1],#4 LABEL(xor_loop_up_l1) BICS a4,a3,#3 // set counter to multiple of 4 MOVEQS pc,lr // if zero then we're done STMFD sp!,{v1-v5,lr} // save work regs LABEL(xor_loop_up_l2) LDMIA a2!,{a3,v1,v2,ip} // load 4 words in one go LDMIA a1,{v3,v4,v5,lr} // load target words EOR v3,v3,a3 // XOR the four words EOR v4,v4,v1 EOR v5,v5,v2 EOR lr,lr,ip STMIA a1!,{v3,v4,v5,lr} // store 4 results SUBS a4,a4,#4 // decrement counter by 4 BGT xor_loop_up_l2 // if count still positive then loop LDMFD sp!,{v1-v5,pc}^ // restore work regs and return #if CL_DS_BIG_ENDIAN_P // extern void and_loop_up (uintD* xptr, uintD* yptr, uintC count); // entry // a1 = xptr // a2 = yptr // a3 = count of words to be ANDed // exit // xptr &= yptr for count words // a1 - a4, ip destroyed EXPORT(and_loop_up) // word aligned and loop up DECLARE_FUNCTION(and_loop_up) GLABEL(and_loop_up) ANDS a4,a3,#3 // multiple of 4 words ? BEQ and_loop_up_l1 // yup, so branch CMP a4,#2 // AND the first 1-3 words LDR a4,[a2],#4 // to align the total to a multiple LDR ip,[a1] // of 4 words AND ip,ip,a4 STR ip,[a1],#4 BLT and_loop_up_l1 // better to branch than skip instrs. LDRGE a4,[a2],#4 LDRGE ip,[a1] ANDGE ip,ip,a4 STRGE ip,[a1],#4 LDRGT a4,[a2],#4 LDRGT ip,[a1] ANDGT ip,ip,a4 STRGT ip,[a1],#4 LABEL(and_loop_up_l1) BICS a4,a3,#3 // set counter to multiple of 4 MOVEQS pc,lr // if zero then we're done STMFD sp!,{v1-v5,lr} // save work regs LABEL(and_loop_up_l2) LDMIA a2!,{a3,v1,v2,ip} // load 4 words in one go LDMIA a1,{v3,v4,v5,lr} // load target words AND v3,v3,a3 // AND the four words AND v4,v4,v1 AND v5,v5,v2 AND lr,lr,ip STMIA a1!,{v3,v4,v5,lr} // store 4 results SUBS a4,a4,#4 // decrement counter by 4 BGT and_loop_up_l2 // if count still positive then loop LDMFD sp!,{v1-v5,pc}^ // restore work regs and return // extern void eqv_loop_up (uintD* xptr, uintD* yptr, uintC count); // entry // a1 = xptr // a2 = yptr // a3 = count of words to be XORed // exit // xptr = ~(xptr ^ yptr) for count words // a1 - a4, ip destroyed EXPORT(eqv_loop_up) // word aligned eqv loop up DECLARE_FUNCTION(eqv_loop_up) GLABEL(eqv_loop_up) ANDS a4,a3,#3 // multiple of 4 words ? BEQ eqv_loop_up_l1 // yup, so branch CMP a4,#2 // EQV the first 1-3 words LDR a4,[a2],#4 // to align the total to a multiple LDR ip,[a1] // of 4 words EOR ip,ip,a4 MVN ip,ip STR ip,[a1],#4 BLT eqv_loop_up_l1 // better to branch than skip instrs. LDRGE a4,[a2],#4 LDRGE ip,[a1] EORGE ip,ip,a4 MVNGE ip,ip STRGE ip,[a1],#4 BLE eqv_loop_up_l1 // better to branch than skip instrs. LDRGT a4,[a2],#4 LDRGT ip,[a1] EORGT ip,ip,a4 MVNGT ip,ip STRGT ip,[a1],#4 LABEL(eqv_loop_up_l1) BICS a4,a3,#3 // set counter to multiple of 4 MOVEQS pc,lr // if zero then we're done STMFD sp!,{v1-v5,lr} // save work regs LABEL(eqv_loop_up_l2) LDMIA a2!,{a3,v1,v2,ip} // load 4 words in one go LDMIA a1,{v3,v4,v5,lr} // load target words EOR v3,v3,a3 // EVQ the four words MVN v3,v3 EOR v4,v4,v1 MVN v4,v4 EOR v5,v5,v2 MVN v5,v5 EOR lr,lr,ip MVN lr,lr STMIA a1!,{v3,v4,v5,lr} // store 4 results SUBS a4,a4,#4 // decrement counter by 4 BGT eqv_loop_up_l2 // if count still positive then loop LDMFD sp!,{v1-v5,pc}^ // restore work regs and return // extern void nand_loop_up (uintD* xptr, uintD* yptr, uintC count); // entry // a1 = xptr // a2 = yptr // a3 = count of words to be NANDed // exit // xptr = ~(xptr & yptr) for count words // a1 - a4, ip destroyed EXPORT(nand_loop_up) // word aligned nand loop up DECLARE_FUNCTION(nand_loop_up) GLABEL(nand_loop_up) ANDS a4,a3,#3 // multiple of 4 words ? BEQ nand_loop_up_l1 // yup, so branch CMP a4,#2 // NAND the first 1-3 words LDR a4,[a2],#4 // to align the total to a multiple LDR ip,[a1] // of 4 words AND ip,ip,a4 MVN ip,ip STR ip,[a1],#4 BLT nand_loop_up_l1 // better to branch than skip instrs. LDRGE a4,[a2],#4 LDRGE ip,[a1] ANDGE ip,ip,a4 MVNGE ip,ip STRGE ip,[a1],#4 BLE nand_loop_up_l1 // better to branch than skip instrs. LDRGT a4,[a2],#4 LDRGT ip,[a1] ANDGT ip,ip,a4 MVNGT ip,ip STRGT ip,[a1],#4 LABEL(nand_loop_up_l1) BICS a4,a3,#3 // set counter to multiple of 4 MOVEQS pc,lr // if zero then we're done STMFD sp!,{v1-v5,lr} // save work regs LABEL(nand_loop_up_l2) LDMIA a2!,{a3,v1,v2,ip} // load 4 words in one go LDMIA a1,{v3,v4,v5,lr} // load target words AND v3,v3,a3 // NAND the four words MVN v3,v3 AND v4,v4,v1 MVN v4,v4 AND v5,v5,v2 MVN v5,v5 AND lr,lr,ip MVN lr,lr STMIA a1!,{v3,v4,v5,lr} // store 4 results SUBS a4,a4,#4 // decrement counter by 4 BGT nand_loop_up_l2 // if count still positive then loop LDMFD sp!,{v1-v5,pc}^ // restore work regs and return // extern void nor_loop_up (uintD* xptr, uintD* yptr, uintC count); // entry // a1 = xptr // a2 = yptr // a3 = count of words to be NORed // exit // xptr = ~(xptr | yptr) for count words // a1 - a4, ip destroyed EXPORT(nor_loop_up) // word aligned nor loop up DECLARE_FUNCTION(nor_loop_up) GLABEL(nor_loop_up) ANDS a4,a3,#3 // multiple of 4 words ? BEQ nor_loop_up_l1 // yup, so branch CMP a4,#2 // NOR the first 1-3 words LDR a4,[a2],#4 // to align the total to a multiple LDR ip,[a1] // of 4 words ORR ip,ip,a4 MVN ip,ip STR ip,[a1],#4 BLT nor_loop_up_l1 // better to branch than skip instrs. LDRGE a4,[a2],#4 LDRGE ip,[a1] ORRGE ip,ip,a4 MVNGE ip,ip STRGE ip,[a1],#4 BLE nor_loop_up_l1 // better to branch than skip instrs. LDRGT a4,[a2],#4 LDRGT ip,[a1] ORRGT ip,ip,a4 MVNGT ip,ip STRGT ip,[a1],#4 LABEL(nor_loop_up_l1) BICS a4,a3,#3 // set counter to multiple of 4 MOVEQS pc,lr // if zero then we're done STMFD sp!,{v1-v5,lr} // save work regs LABEL(nor_loop_up_l2) LDMIA a2!,{a3,v1,v2,ip} // load 4 words in one go LDMIA a1,{v3,v4,v5,lr} // load target words ORR v3,v3,a3 // NOR the four words MVN v3,v3 ORR v4,v4,v1 MVN v4,v4 ORR v5,v5,v2 MVN v5,v5 ORR lr,lr,ip MVN lr,lr STMIA a1!,{v3,v4,v5,lr} // store 4 results SUBS a4,a4,#4 // decrement counter by 4 BGT nor_loop_up_l2 // if count still positive then loop LDMFD sp!,{v1-v5,pc}^ // restore work regs and return // extern void andc2_loop_up (uintD* xptr, uintD* yptr, uintC count); // entry // a1 = xptr // a2 = yptr // a3 = count of words to be ANDC2ed // exit // xptr = xptr & ~yptr for count words // a1 - a4, ip destroyed EXPORT(andc2_loop_up) // word aligned andc2 loop up DECLARE_FUNCTION(andc2_loop_up) GLABEL(andc2_loop_up) ANDS a4,a3,#3 // multiple of 4 words ? BEQ andc2_loop_up_l1 // yup, so branch CMP a4,#2 // ANDC2 the first 1-3 words LDR a4,[a2],#4 // to align the total to a multiple LDR ip,[a1] // of 4 words BIC ip,ip,a4 STR ip,[a1],#4 BLT andc2_loop_up_l1 // better to branch than skip instrs. LDRGE a4,[a2],#4 LDRGE ip,[a1] BICGE ip,ip,a4 STRGE ip,[a1],#4 LDRGT a4,[a2],#4 LDRGT ip,[a1] BICGT ip,ip,a4 STRGT ip,[a1],#4 LABEL(andc2_loop_up_l1) BICS a4,a3,#3 // set counter to multiple of 4 MOVEQS pc,lr // if zero then we're done STMFD sp!,{v1-v5,lr} // save work regs LABEL(andc2_loop_up_l2) LDMIA a2!,{a3,v1,v2,ip} // load 4 words in one go LDMIA a1,{v3,v4,v5,lr} // load target words BIC v3,v3,a3 // ANDC2 the four words BIC v4,v4,v1 BIC v5,v5,v2 BIC lr,lr,ip STMIA a1!,{v3,v4,v5,lr} // store 4 results SUBS a4,a4,#4 // decrement counter by 4 BGT andc2_loop_up_l2 // if count still positive then loop LDMFD sp!,{v1-v5,pc}^ // restore work regs and return // extern void orc2_loop_up (uintD* xptr, uintD* yptr, uintC count); // entry // a1 = xptr // a2 = yptr // a3 = count of words to be XORed // exit // xptr = xptr | ~yptr for count words // a1 - a4, ip destroyed EXPORT(orc2_loop_up) // word aligned orc2 loop up DECLARE_FUNCTION(orc2_loop_up) GLABEL(orc2_loop_up) ANDS a4,a3,#3 // multiple of 4 words ? BEQ orc2_loop_up_l1 // yup, so branch CMP a4,#2 // ORC2 the first 1-3 words LDR a4,[a2],#4 // to align the total to a multiple LDR ip,[a1] // of 4 words MVN a4,a4 ORR ip,ip,a4 STR ip,[a1],#4 BLT orc2_loop_up_l1 // better to branch than skip instrs. LDRGE a4,[a2],#4 LDRGE ip,[a1] MVNGE a4,a4 ORRGE ip,ip,a4 STRGE ip,[a1],#4 BLE orc2_loop_up_l1 // better to branch than skip instrs. LDRGT a4,[a2],#4 LDRGT ip,[a1] MVNGT a4,a4 ORRGT ip,ip,a4 STRGT ip,[a1],#4 LABEL(orc2_loop_up_l1) BICS a4,a3,#3 // set counter to multiple of 4 MOVEQS pc,lr // if zero then we're done STMFD sp!,{v1-v5,lr} // save work regs LABEL(orc2_loop_up_l2) LDMIA a2!,{a3,v1,v2,ip} // load 4 words in one go LDMIA a1,{v3,v4,v5,lr} // load target words MVN a3,a3 // ORC2 the four words ORR v3,v3,a3 MVN v1,v1 ORR v4,v4,v1 MVN v2,v2 ORR v5,v5,v2 MVN ip,ip ORR lr,lr,ip STMIA a1!,{v3,v4,v5,lr} // store 4 results SUBS a4,a4,#4 // decrement counter by 4 BGT orc2_loop_up_l2 // if count still positive then loop LDMFD sp!,{v1-v5,pc}^ // restore work regs and return // extern void not_loop_up (uintD* xptr, uintC count); // entry // a1 = xptr // a2 = count of words to be NOTed // exit // xptr = ~xptr for count words // a1 - a4, ip destroyed EXPORT(not_loop_up) // word aligned not loop up DECLARE_FUNCTION(not_loop_up) GLABEL(not_loop_up) ANDS a3,a2,#3 // multiple of 4 words ? BEQ not_loop_up_l1 // yup, so branch CMP a3,#2 // NOT the first 1-3 words LDR a3,[a1] // to align the total to a multiple MVN a3,a3 // of 4 words STR a3,[a1],#4 BLT not_loop_up_l1 // better to branch than skip instrs. LDRGE a3,[a1] MVNGE a3,a3 STRGE a3,[a1],#4 LDRGT a3,[a1] MVNGT a3,a3 STRGT a3,[a1],#4 LABEL(not_loop_up_l1) BICS a4,a2,#3 // set counter to multiple of 4 MOVEQS pc,lr // if zero then we're done STMFD sp!,{lr} // save work regs LABEL(not_loop_up_l2) LDMIA a1,{a2,a3,ip,lr} // load 4 words in one go,NO writeback MVN a2,a2 // NOT the four words MVN a3,a3 MVN ip,ip MVN lr,lr STMIA a1!,{a2,a3,ip,lr} // store 4 results SUBS a4,a4,#4 // decrement counter by 4 BGT not_loop_up_l2 // if count still positive then loop LDMFD sp!,{pc}^ // restore work regs and return // extern void and_test_loop_up (uintD* xptr, uintD* yptr, uintC count); // entry // a1 = xptr // a2 = yptr // a3 = count of words to be AND_TESTed // exit // a1 = TRUE if any words ANDed together are non-zero else FALSE // a2 - a4, ip destroyed EXPORT(and_test_loop_up) // word aligned and_test loop up DECLARE_FUNCTION(and_test_loop_up) GLABEL(and_test_loop_up) ANDS a4,a3,#3 // multiple of 4 words ? BEQ and_test_loop_up_l1 // yup, so branch CMP a4,#2 LDR a4,[a2],#4 // AND_TEST the first 1-3 words LDR ip,[a1],#4 // to align the total to a multiple TST ip,a4 // of 4 words MOVNE a1,#1 // return TRUE if AND_TEST ok MOVNES pc,lr BCC and_test_loop_up_l1 // better to branch than skip instrs. LDRGE a4,[a2],#4 LDRGE ip,[a1],#4 TSTGE ip,a4 MOVNE a1,#1 MOVNES pc,lr ANDS a4,a3,#3 CMP a4,#2 BLE and_test_loop_up_l1 // better to branch than skip instrs. LDRGT a4,[a2],#4 LDRGT ip,[a1],#4 TSTGT ip,a4 MOVNE a1,#1 MOVNES pc,lr LABEL(and_test_loop_up_l1) BICS a4,a3,#3 // set counter to multiple of 4 MOVEQ a1,#0 // return FALSE MOVEQS pc,lr // if zero then we're done STMFD sp!,{v1-v6,lr} // save work regs MOV v6,a1 // move xptr to v6 MOV a1,#1 // set result to TRUE LABEL(and_test_loop_up_l2) LDMIA a2!,{a3,v1,v2,ip} // load 4 words in one go LDMIA v6!,{v3,v4,v5,lr} // load target words TST v3,a3 // AND_TEST the four words TSTEQ v4,v1 TSTEQ v5,v2 TSTEQ lr,ip LDMNEFD sp!,{v1-v6,pc}^ SUBS a4,a4,#4 // decrement counter by 4 BGT and_test_loop_up_l2 // if count still positive then loop MOV a1,#0 LDMFD sp!,{v1-v6,pc}^ // restore work regs and return #endif // extern void compare_loop_up (uintD* xptr, uintD* yptr, uintC count); // entry // a1 = xptr // a2 = yptr // a3 = count of words to be COMPAREd // exit // a1 = +1 if first non-equal word in xptr[] and yptr[] // xptr[i] > yptr[i] // -1 if xptr[i] < yptr[i] // 0 otherwise // a2 - a4, ip destroyed EXPORT(compare_loop_up) // word aligned compare loop up DECLARE_FUNCTION(compare_loop_up) GLABEL(compare_loop_up) ANDS a4,a3,#3 // multiple of 4 words ? BEQ compare_loop_up_l1 // yup, so branch LDR a4,[a2],#4 // COMPARE the first 1-3 words LDR ip,[a1],#4 // to align the total to a multiple CMP ip,a4 // of 4 words MVNLO a1,#0 // x < y -> -1 MOVHI a1,#1 // x > y -> +1 MOVNES pc,lr // and return result if not equal ANDS a4,a3,#3 CMP a4,#2 BLT compare_loop_up_l1 // need to branch 'cos PSR used LDR a4,[a2],#4 LDR ip,[a1],#4 CMP ip,a4 MVNLO a1,#0 MOVHI a1,#1 MOVNES pc,lr ANDS a4,a3,#3 CMP a4,#2 BLE compare_loop_up_l1 // need to branch 'cos PSR used LDR a4,[a2],#4 LDR ip,[a1],#4 CMP ip,a4 MVNLO a1,#0 MOVHI a1,#1 MOVNES pc,lr LABEL(compare_loop_up_l1) BICS a4,a3,#3 // set counter to multiple of 4 MOVEQ a1,#0 // xptr[] == yptr[] -> 0 MOVEQS pc,lr // if zero then we're done STMFD sp!,{v1-v6,lr} // save work regs MOV v6,a1 // move xptr to v6 MOV a1,#1 // set result to +1 LABEL(compare_loop_up_l2) LDMIA a2!,{a3,v1,v2,ip} // load 4 words in one go LDMIA v6!,{v3,v4,v5,lr} // load test words CMP v3,a3 // COMPARE the four words CMPEQ v4,v1 CMPEQ v5,v2 CMPEQ lr,ip MVNLO a1,#0 // x < y -> -1 (a1 already holds +1) LDMNEFD sp!,{v1-v6,pc}^ SUBS a4,a4,#4 // decrement counter by 4 BGT compare_loop_up_l2 // if count still positive then loop MOV a1,#0 LDMFD sp!,{v1-v6,pc}^ // restore work regs and return #if CL_DS_BIG_ENDIAN_P // extern uintD addto_loop_down (uintD* sourceptr, uintD* destptr, uintC count); // entry // a1 = sourceptr // a2 = destptr // a3 = count of words to be added // exit // destptr[] = sourceptr[] + destptr[] // a1 = last carry // a2 - a4, ip destroyed EXPORT(addto_loop_down) // word aligned addto loop down DECLARE_FUNCTION(addto_loop_down) GLABEL(addto_loop_down) MOV a4,a3 // set regs for a call MOV a3,a2 // to add_loop_down // and drop into add_loop_down // extern uintD add_loop_down (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); // entry // a1 = sourceptr1 // a2 = sourceptr2 // a3 = destptr // a4 = count of words to be added // exit // destptr[] = sourceptr1[] + sourceptr2[] // a1 = last carry // a2 - a4, ip destroyed EXPORT(add_loop_down) // word aligned add loop down DECLARE_FUNCTION(add_loop_down) GLABEL(add_loop_down) ANDS ip,a4,#3 // multiple of 4 words ? BEQ add_loop_down_l1 // yup, so branch STMFD sp!,{v6,lr} LDR v6,[a2,#-4]! // add the first 1-3 words LDR lr,[a1,#-4]! // to align the total to a multiple ADDS lr,lr,v6 // of 4 words STR lr,[a3,#-4]! TEQ ip,#1 BEQ add_loop_down_l0 // need to branch 'cos PSR used LDR v6,[a2,#-4]! LDR lr,[a1,#-4]! ADCS lr,lr,v6 STR lr,[a3,#-4]! TEQ ip,#2 BEQ add_loop_down_l0 // need to branch 'cos PSR used LDR v6,[a2,#-4]! LDR lr,[a1,#-4]! ADCS lr,lr,v6 STR lr,[a3,#-4]! LABEL(add_loop_down_l0) // at least one add has happened BICS a4,a4,#3 // set counter to multiple of 4 BNE add_loop_down_l3 // branch if more adds to do ADCEQ a1,a4,a4 // set result to Carry (a4 is 0) LDMEQFD sp!,{v6,pc}^ // and return LABEL(add_loop_down_l1) BICS a4,a4,#3 // set counter to multiple of 4 MOVEQ a1,#0 // no adds, so C = 0 MOVEQS pc,lr // if zero then we're done CMN a4,#0 // clear carry bit STMFD sp!,{v6,lr} LABEL(add_loop_down_l3) STMFD sp!,{v1-v5} // save work regs LABEL(add_loop_down_l2) LDMDB a2!,{v1,v2,v3,ip} // load 4 words in one go LDMDB a1!,{v4,v5,v6,lr} // and from source2 ADCS lr,lr,ip // add the four words with carry ADCS v6,v6,v3 ADCS v5,v5,v2 ADCS v4,v4,v1 STMDB a3!,{v4,v5,v6,lr} // store 4 results SUB a4,a4,#4 // decrement counter by 4, preserve C TEQ a4,#0 // are we done ? BNE add_loop_down_l2 // if count non-zero then loop ADC a1,a4,a4 // set result to Carry (a4 is 0) LDMFD sp!,{v1-v6,pc}^ // restore work regs and return // extern uintD inc_loop_down (uintD* ptr, uintC count); // entry // a1 = ptr // a2 = count of words to be INCed // exit // a1 = 0 if any words are non-zero after increment else 1 // stop incrementing when first word becomes non-zero // a2 - a4, ip destroyed EXPORT(inc_loop_down) // word aligned inc loop down DECLARE_FUNCTION(inc_loop_down) GLABEL(inc_loop_down) ANDS a3,a2,#1 // multiple of 2 words ? BEQ inc_loop_down_l1 // yup, so branch LDR a4,[a1,#-4]! // INC the first word ADDS a4,a4,#1 // align the total to a multiple of 2 STR a4,[a1] MOVNE a1,#0 // set result to 0 MOVNES pc,lr // return 0 if non-zero result LABEL(inc_loop_down_l1) BICS a4,a2,#1 // set counter to multiple of 2 MOVEQ a1,#1 // return 1 MOVEQS pc,lr // if zero then we're done MOV ip,a1 // move ptr to ip MOV a1,#0 // set result to 0 ANDS a3,a4,#3 BEQ inc_loop_down_l3 LDMDB ip,{a2,a3} // load 2 words in one go ADDS a3,a3,#1 // INC the two words ADDEQS a2,a2,#1 // stopping when first word non-zero STMDB ip!,{a2,a3} // store 2 results MOVNES pc,lr // return 0 if any result non-zero SUBS a4,a4,#2 // decrement counter by 2 MOVEQ a1,#1 // if finished loop then MOVEQS pc,lr // return 1 LABEL(inc_loop_down_l3) // now a multiple of 4 words STMFD sp!,{v1,lr} // save work regs LABEL(inc_loop_down_l2) LDMDB ip,{a2,a3,v1,lr} // load 4 words in one go ADDS lr,lr,#1 // INC the four words ADDEQS v1,v1,#1 // stopping when first word non-zero ADDEQS a3,a3,#1 ADDEQS a2,a2,#1 STMDB ip!,{a2,a3,v1,lr} // store 4 results LDMNEFD sp!,{v1,pc}^ // return 0 if any result non-zero SUBS a4,a4,#4 // decrement counter by 4 BGT inc_loop_down_l2 // if count still positive then loop MOV a1,#1 LDMFD sp!,{v1,pc}^ // restore work regs and return 1 // extern uintD sub_loop_down (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); // entry // a1 = sourceptr1 // a2 = sourceptr2 // a3 = destptr // a4 = count of words to be subtracted // exit // destptr[] = sourceptr1[] - sourceptr2[] // a1 = last carry // a2 - a4, ip destroyed EXPORT(sub_loop_down) // word aligned sub loop down LABEL(sub_loop_down) ANDS ip,a4,#3 // multiple of 4 words ? BEQ sub_loop_down_l1 // yup, so branch STMFD sp!,{v6,lr} LDR v6,[a2,#-4]! // subtract the first 1-3 words LDR lr,[a1,#-4]! // to align the total to a multiple SUBS lr,lr,v6 // of 4 words STR lr,[a3,#-4]! TEQ ip,#1 BNE sub_loop_down_l0 // branch if more than one subtract LABEL(sub_loop_down_l4) // drop through for better instr. timings BICS a4,a4,#3 // set counter to multiple of 4 SBCEQ a1,a4,a4 // set result to Carry (a4 is 0) LDMEQFD sp!,{v6,pc}^ // and return STMFD sp!,{v1-v5} // save work regs B sub_loop_down_l2 // branch if more subtracts to do LABEL(sub_loop_down_l0) LDR v6,[a2,#-4]! LDR lr,[a1,#-4]! SBCS lr,lr,v6 STR lr,[a3,#-4]! TEQ ip,#2 BEQ sub_loop_down_l4 // need to branch 'cos PSR used LDR v6,[a2,#-4]! LDR lr,[a1,#-4]! SBCS lr,lr,v6 STR lr,[a3,#-4]! B sub_loop_down_l4 LABEL(sub_loop_down_l1) BICS a4,a4,#3 // set counter to multiple of 4 MOVEQ a1,#0 // no subtracts, so C = 0 MOVEQS pc,lr // if zero then we're done CMP a4,#0 // set carry bit, since a4 > 0 STMFD sp!,{v1-v6,lr} // save work regs LABEL(sub_loop_down_l2) LDMDB a2!,{v1,v2,v3,ip} // load 4 words in one go LDMDB a1!,{v4,v5,v6,lr} // and from source2 SBCS lr,lr,ip // subtract the four words with carry SBCS v6,v6,v3 SBCS v5,v5,v2 SBCS v4,v4,v1 STMDB a3!,{v4,v5,v6,lr} // store 4 results SUB a4,a4,#4 // decrement counter by 4, preserve C TEQ a4,#0 // are we done ? BNE sub_loop_down_l2 // if count non-zero then loop SBC a1,a4,a4 // set result to Carry (a4 is 0) LDMFD sp!,{v1-v6,pc}^ // restore work regs and return // extern uintD subx_loop_down (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count, uintD carry); // entry // a1 = sourceptr1 // a2 = sourceptr2 // a3 = destptr // a4 = count of words to be subtracted // [sp] = carry // exit // destptr[] = sourceptr1[] - sourceptr2[] // a1 = last carry // a2 - a4, ip destroyed EXPORT(subx_loop_down) // word aligned xsub loop down LABEL(subx_loop_down) LDR ip,[sp] // get starting value of carry LABEL(subx_loop_down_lsub) RSBS ip,ip,#0 // set carry in PSR ANDS ip,a4,#3 // multiple of 4 words ? BEQ subx_loop_down_l1 // yup, so branch STMFD sp!,{v6,lr} LDR v6,[a2,#-4]! // subtract the first 1-3 words LDR lr,[a1,#-4]! // to align the total to a multiple SBCS lr,lr,v6 // of 4 words STR lr,[a3,#-4]! TEQ ip,#1 BNE subx_loop_down_l0 // branch if more than one subtract LABEL(subx_loop_down_l4) // drop through for better instr. timings BICS a4,a4,#3 // set counter to multiple of 4 SBCEQ a1,a4,a4 // set result to Carry (a4 is 0) LDMEQFD sp!,{v6,pc}^ // and return STMFD sp!,{v1-v5} // save work regs B subx_loop_down_l2 // branch if more subtracts to do LABEL(subx_loop_down_l0) LDR v6,[a2,#-4]! LDR lr,[a1,#-4]! SBCS lr,lr,v6 STR lr,[a3,#-4]! TEQ ip,#2 BEQ subx_loop_down_l4 // need to branch 'cos PSR used LDR v6,[a2,#-4]! LDR lr,[a1,#-4]! SBCS lr,lr,v6 STR lr,[a3,#-4]! B subx_loop_down_l4 LABEL(subx_loop_down_l1) BICS a4,a4,#3 // set counter to multiple of 4 SBCEQ a1,a4,a4 // set result to Carry (a4 is 0) MOVEQS pc,lr // if zero then we're done STMFD sp!,{v1-v6,lr} // save work regs LABEL(subx_loop_down_l2) LDMDB a2!,{v1,v2,v3,ip} // load 4 words in one go LDMDB a1!,{v4,v5,v6,lr} // and from source2 SBCS lr,lr,ip // subtract the four words with carry SBCS v6,v6,v3 SBCS v5,v5,v2 SBCS v4,v4,v1 STMDB a3!,{v4,v5,v6,lr} // store 4 results SUB a4,a4,#4 // decrement counter by 4, preserve C TEQ a4,#0 // are we done ? BNE subx_loop_down_l2 // if count non-zero then loop SBC a1,a4,a4 // set result to Carry (a4 is 0) LDMFD sp!,{v1-v6,pc}^ // restore work regs and return // extern uintD subfrom_loop_down (uintD* sourceptr, uintD* destptr, uintC count); // entry // a1 = sourceptr // a2 = destptr // a3 = count of words to be subtracted // exit // destptr[] = destptr[] - sourceptr[] // a1 = last carry // a2 - a4, ip destroyed EXPORT(subfrom_loop_down) // word aligned subfrom loop down DECLARE_FUNCTION(subfrom_loop_down) GLABEL(subfrom_loop_down) ANDS ip,a3,#3 // multiple of 4 words ? BEQ subfrom_loop_down_l1 // yup, so branch STMFD sp!,{lr} LDR a4,[a1,#-4]! // subtract the first 1-3 words LDR lr,[a2,#-4]! // to align the total to a multiple SUBS lr,lr,a4 // of 4 words STR lr,[a2] TEQ ip,#1 BNE subfrom_loop_down_l0 // branch if more than one subtract LABEL(subfrom_loop_down_l4) // drop through for better instr. timings BICS a4,a3,#3 // set counter to multiple of 4 SBCEQ a1,a4,a4 // set result to Carry (a4 is 0) LDMEQFD sp!,{pc}^ // and return STMFD sp!,{v1-v5} // save work regs B subfrom_loop_down_l2 // branch if more subtracts to do LABEL(subfrom_loop_down_l0) LDR a4,[a1,#-4]! LDR lr,[a2,#-4]! SBCS lr,lr,a4 STR lr,[a2] TEQ ip,#2 BEQ subfrom_loop_down_l4 // need to branch 'cos PSR used LDR a4,[a1,#-4]! LDR lr,[a2,#-4]! SBCS lr,lr,a4 STR lr,[a2] B subfrom_loop_down_l4 LABEL(subfrom_loop_down_l1) BICS a4,a3,#3 // set counter to multiple of 4 MOVEQ a1,#0 // no subtracts, so C = 0 MOVEQS pc,lr // if zero then we're done CMP a4,#0 // set carry bit, since a4 > 0 STMFD sp!,{v1-v5,lr} // save work regs LABEL(subfrom_loop_down_l2) LDMDB a1!,{a3,v1,v2,ip} // load 4 words in one go LDMDB a2,{v3,v4,v5,lr} // and from destptr SBCS lr,lr,ip // subtract the four words with carry SBCS v5,v5,v2 SBCS v4,v4,v1 SBCS v3,v3,a3 STMDB a2!,{v3,v4,v5,lr} // store 4 results SUB a4,a4,#4 // decrement counter by 4, preserve C TEQ a4,#0 // are we done ? BNE subfrom_loop_down_l2 // if count non-zero then loop SBC a1,a4,a4 // set result to Carry (a4 is 0) LDMFD sp!,{v1-v5,pc}^ // restore work regs and return // extern uintD dec_loop_down (uintD* ptr, uintC count); // entry // a1 = ptr // a2 = count of words to be DECed // exit // a1 = 0 if any words are non-zero before decrement else -1 // stop decrementing when first word is non-zero // a2 - a4, ip destroyed EXPORT(dec_loop_down) // word aligned dec loop down DECLARE_FUNCTION(dec_loop_down) GLABEL(dec_loop_down) ANDS a3,a2,#1 // multiple of 2 words ? BEQ dec_loop_down_l1 // yup, so branch LDR a4,[a1,#-4]! // DEC the first word SUBS a4,a4,#1 // align the total to a multiple of 2 STR a4,[a1] MOVCS a1,#0 // set result to 0 MOVCSS pc,lr // return 0 if non-zero result LABEL(dec_loop_down_l1) BICS a4,a2,#1 // set counter to multiple of 2 MVNEQ a1,#0 // return -1 MOVEQS pc,lr // if zero then we're done MOV ip,a1 // move ptr to ip MOV a1,#0 // set result to 0 ANDS a3,a4,#3 BEQ dec_loop_down_l3 LDMDB ip,{a2,a3} // load 2 words in one go SUBS a3,a3,#1 // DEC the two words SUBCCS a2,a2,#1 // stopping when first word non-zero STMDB ip!,{a2,a3} // store 2 results MOVCSS pc,lr // return 0 if any result non-zero SUBS a4,a4,#2 // decrement counter by 2 MVNEQ a1,#0 // if finished loop then MOVEQS pc,lr // return -1 LABEL(dec_loop_down_l3) // now a multiple of 4 words STMFD sp!,{v1,lr} // save work regs LABEL(dec_loop_down_l2) LDMDB ip,{a2,a3,v1,lr} // load 4 words in one go SUBS lr,lr,#1 // DEC the four words SUBCCS v1,v1,#1 // stopping when first word non-zero SUBCCS a3,a3,#1 SUBCCS a2,a2,#1 STMDB ip!,{a2,a3,v1,lr} // store 4 results LDMCSFD sp!,{v1,pc}^ // return 0 if any carry SUBS a4,a4,#4 // decrement counter by 4 BGT dec_loop_down_l2 // if count still positive then loop MVN a1,#0 LDMFD sp!,{v1,pc}^ // restore work regs and return -1 // extern void neg_loop_down (uintD* ptr, uintC count); // entry // a1 = ptr // a2 = count of words. The long integer is to be NEGated // exit // ptr[] = -ptr[] for count words // a1 = last carry // a2 - a4, ip destroyed EXPORT(neg_loop_down) // word aligned neg loop down DECLARE_FUNCTION(neg_loop_down) GLABEL(neg_loop_down) CMPS a2,#0 // count = 0 ? MOVEQ a1,#0 // yup, so return 0 MOVEQS pc,lr LABEL(neg_loop_down_l1) // skip all the zero words first LDR a3,[a1,#-4]! // compare words against zero CMPS a3,#0 // downwards in memory BNE neg_loop_down_l2 // non-zero, so negate rest of words SUBS a2,a2,#1 // reduce count of words BNE neg_loop_down_l1 // more ?, so loop MOV a1,#0 // return 0 MOVS pc,lr LABEL(neg_loop_down_l2) RSB a3,a3,#0 // first non-zero word = -word STR a3,[a1] SUBS a2,a2,#1 MVNEQ a1,#0 // done ? -> return -1 MOVEQS pc,lr // now NOT rest of the words ANDS a3,a2,#3 // multiple of 4 words ? BEQ neg_loop_down_l3 // yup, so branch CMP a3,#2 // NOT the first 1-3 words LDR a3,[a1,#-4]! // to align the total to a multiple MVN a3,a3 // of 4 words STR a3,[a1] BLT neg_loop_down_l3 // better to branch than skip instrs. LDRGE a3,[a1,#-4]! MVNGE a3,a3 STRGE a3,[a1] LDRGT a3,[a1,#-4]! MVNGT a3,a3 STRGT a3,[a1] LABEL(neg_loop_down_l3) BICS a4,a2,#3 // set counter to multiple of 4 MVNEQ a1,#0 // set result to -1 MOVEQS pc,lr // if zero then we're done STMFD sp!,{lr} // save work regs LABEL(neg_loop_down_l4) LDMDB a1,{a2,a3,ip,lr} // load 4 words in one go,NO writeback MVN a2,a2 // NOT the four words MVN a3,a3 MVN ip,ip MVN lr,lr STMDB a1!,{a2,a3,ip,lr} // store 4 results SUBS a4,a4,#4 // decrement counter by 4 BGT neg_loop_down_l4 // if count still positive then loop MVN a1,#0 // set result to -1 LDMFD sp!,{pc}^ // restore work regs and return -1 // extern uintD shift1left_loop_down (uintD* ptr, uintC count); // entry // a1 = ptr // a2 = count of words to be shifted left // exit // a1 = carry out from last shift left // a2 - a4, ip destroyed EXPORT(shift1left_loop_down) // word aligned shift1left loop down DECLARE_FUNCTION(shift1left_loop_down) GLABEL(shift1left_loop_down) CMN a1,#0 // clear carry bit, since a1 > 0 ANDS a3,a2,#1 // multiple of 2 words ? BEQ shift1left_loop_down_l1 // yup, so branch LDR a4,[a1,#-4]! // shift left the first word ADDS a4,a4,a4 STR a4,[a1] LABEL(shift1left_loop_down_l1) BICS a4,a2,#1 // set counter to multiple of 2 ADCEQ a1,a4,a4 // if zero set result to C (a4 is 0) MOVEQS pc,lr // and return ANDS a3,a4,#3 // multiple of 4 words ? BEQ shift1left_loop_down_l3 // yup, so branch LDMDB a1,{a2,a3} // load 2 words in one go ADCS a3,a3,a3 // shift left the two words ADCS a2,a2,a2 STMDB a1!,{a2,a3} // store 2 results BICS a4,a4,#2 // decrement counter by 2 ADCEQ a1,a4,a4 // set result to Carry (a4 is 0) MOVEQS pc,lr // and return LABEL(shift1left_loop_down_l3) // now a multiple of 4 words STMFD sp!,{lr} // save work regs LABEL(shift1left_loop_down_l2) LDMDB a1,{a2,a3,ip,lr} // load 4 words in one go ADCS lr,lr,lr // shift left the four words ADCS ip,ip,ip ADCS a3,a3,a3 ADCS a2,a2,a2 STMDB a1!,{a2,a3,ip,lr} // store 4 results SUB a4,a4,#4 // decrement counter by 4 TEQ a4,#0 // are we done ? BNE shift1left_loop_down_l2 // if count non-zero then loop ADC a1,a4,a4 // set result to Carry (a4 is 0) LDMFD sp!,{pc}^ // restore work regs and return 1 // extern uintD shiftleft_loop_down (uintD* ptr, uintC count, uintC i, uintD carry); // entry // a1 = ptr // a2 = count of words to be shifted left // a3 = size of left shift // a4 = value to ORR in for first shift // exit // a1 = shift out from last shift left // a2 - a4, ip destroyed EXPORT(shiftleft_loop_down) // word aligned shiftleft loop down DECLARE_FUNCTION(shiftleft_loop_down) GLABEL(shiftleft_loop_down) STMFD sp!,{v6,lr} RSB v6,a3,#32 // size of complementary right shift ANDS ip,a2,#3 // multiple of 4 words ? BEQ shiftleft_loop_down_l1 // yup, so branch LDR lr,[a1,#-4]! // shiftleft the first 1-3 words ORR a4,a4,lr,ASL a3 // to align the total to a multiple STR a4,[a1,#0] // of 4 words MOV a4,lr,LSR v6 CMP ip,#2 BLT shiftleft_loop_down_l1 // better to branch than skip instrs. LDRGE lr,[a1,#-4]! ORRGE a4,a4,lr,ASL a3 STRGE a4,[a1,#0] MOVGE a4,lr,LSR v6 LDRGT lr,[a1,#-4]! ORRGT a4,a4,lr,ASL a3 STRGT a4,[a1,#0] MOVGT a4,lr,LSR v6 LABEL(shiftleft_loop_down_l1) BICS ip,a2,#3 // set counter to multiple of 4 MOVEQ a1,a4 // if zero then we're done LDMEQFD sp!,{v6,pc}^ // so return last shift out STMFD sp!,{v1-v3} // save work regs LABEL(shiftleft_loop_down_l2) LDMDB a1,{a2,v1,v2,v3} // load 4 words in one go ORR lr,a4,v3,ASL a3 // shiftleft the four words MOV a4,v3,LSR v6 // keep carry in a4 ORR v3,a4,v2,ASL a3 // and store results up a register MOV a4,v2,LSR v6 // to regs v1-v3,lr ORR v2,a4,v1,ASL a3 MOV a4,v1,LSR v6 ORR v1,a4,a2,ASL a3 MOV a4,a2,LSR v6 STMDB a1!,{v1,v2,v3,lr} // store 4 results SUBS ip,ip,#4 // decrement counter by 4 BGT shiftleft_loop_down_l2 // if count still positive then loop MOV a1,a4 // result = last shift out LDMFD sp!,{v1-v3,v6,pc}^ // restore work regs and return // extern uintD shiftleftcopy_loop_down (uintD* sourceptr, uintD* destptr, uintC count, uintC i); // entry // a1 = sourceptr // a2 = destptr // a3 = count of words to be shifted left // a4 = size of left shift // exit // a1 = shift out from last shift left // a2 - a4, ip destroyed EXPORT(shiftleftcopy_loop_down) // word aligned shiftleftcopy loop down DECLARE_FUNCTION(shiftleftcopy_loop_down) GLABEL(shiftleftcopy_loop_down) STMFD sp!,{v5,v6,lr} MOV v5,#0 // initial shift carry RSB v6,a4,#32 // size of complementary right shift ANDS ip,a3,#3 // multiple of 4 words ? BEQ shiftleftcopy_loop_down_l1 // yup, so branch LDR lr,[a1,#-4]! // shiftleft the first 1-3 words ORR v5,v5,lr,ASL a4 // to align the total to a multiple STR v5,[a2,#-4]! // of 4 words MOV v5,lr,LSR v6 CMP ip,#2 BLT shiftleftcopy_loop_down_l1 // better to branch than skip instrs. LDRGE lr,[a1,#-4]! ORRGE v5,v5,lr,ASL a4 STRGE v5,[a2,#-4]! MOVGE v5,lr,LSR v6 LDRGT lr,[a1,#-4]! ORRGT v5,v5,lr,ASL a4 STRGT v5,[a2,#-4]! MOVGT v5,lr,LSR v6 LABEL(shiftleftcopy_loop_down_l1) BICS ip,a3,#3 // set counter to multiple of 4 MOVEQ a1,v5 // if zero then we're done LDMEQFD sp!,{v5,v6,pc}^ // so return last shift out STMFD sp!,{v1-v3} // save work regs LABEL(shiftleftcopy_loop_down_l2) LDMDB a1!,{a3,v1,v2,v3} // load 4 words in one go ORR lr,v5,v3,ASL a4 // shiftleft the four words MOV v5,v3,LSR v6 // keep carry in v5 ORR v3,v5,v2,ASL a4 // and store results up a register MOV v5,v2,LSR v6 // to regs v1-v3,lr ORR v2,v5,v1,ASL a4 MOV v5,v1,LSR v6 ORR v1,v5,a3,ASL a4 MOV v5,a3,LSR v6 STMDB a2!,{v1,v2,v3,lr} // store 4 results SUBS ip,ip,#4 // decrement counter by 4 BGT shiftleftcopy_loop_down_l2 // if count still positive then loop MOV a1,v5 // result = last shift out LDMFD sp!,{v1-v3,v5,v6,pc}^ // restore work regs and return // extern uintD shift1right_loop_up (uintD* ptr, uintC count, uintD carry); // entry // a1 = ptr // a2 = count of words to be shifted right // a3 = carry // exit // a1 = carry out from last shift right // a2 - a4, ip destroyed EXPORT(shift1right_loop_up) // word aligned shift1right loop up DECLARE_FUNCTION(shift1right_loop_up) GLABEL(shift1right_loop_up) MOVS a3,a3,LSR #1 // set carry ANDS a3,a2,#1 // multiple of 2 words ? BEQ shift1right_loop_up_l1 // yup, so branch LDR a4,[a1] // shift right the first word MOVS a4,a4,RRX STR a4,[a1],#4 LABEL(shift1right_loop_up_l1) BICS a4,a2,#1 // set counter to multiple of 2 MOVEQ a1,a4,RRX // if zero set result to C (a4 is 0) MOVEQS pc,lr // and return ANDS a3,a4,#3 // multiple of 4 words ? BEQ shift1right_loop_up_l3 // yup, so branch LDMIA a1,{a2,a3} // load 2 words in one go MOVS a2,a2,RRX // shift right the two words MOVS a3,a3,RRX STMIA a1!,{a2,a3} // store 2 results BICS a4,a4,#2 // decrement counter by 2 ADCEQ a1,a4,a4 // set result to Carry (a4 is 0) MOVEQS pc,lr // and return LABEL(shift1right_loop_up_l3) // now a multiple of 4 words STMFD sp!,{lr} // save work regs LABEL(shift1right_loop_up_l2) LDMIA a1,{a2,a3,ip,lr} // load 4 words in one go MOVS a2,a2,RRX // shift right the four words MOVS a3,a3,RRX MOVS ip,ip,RRX MOVS lr,lr,RRX STMIA a1!,{a2,a3,ip,lr} // store 4 results SUB a4,a4,#4 // decrement counter by 4 TEQ a4,#0 // are we done ? BNE shift1right_loop_up_l2 // if count non-zero then loop MOV a1,a4,RRX // set result to Carry (a4 is 0) LDMFD sp!,{pc}^ // restore work regs and return 1 // extern uintD shiftright_loop_up (uintD* ptr, uintC count, uintC i); // entry // a1 = ptr // a2 = count of words to be shifted right // a3 = size of right shift // exit // a1 = shift out from last shift right // a2 - a4, ip destroyed EXPORT(shiftright_loop_up) // word aligned shiftright loop up DECLARE_FUNCTION(shiftright_loop_up) GLABEL(shiftright_loop_up) STMFD sp!,{v6,lr} MOV a4,#0 // initial shift carry RSB v6,a3,#32 // size of complementary left shift LABEL(shiftright_loop_up_l0) ANDS ip,a2,#3 // multiple of 4 words ? BEQ shiftright_loop_up_l1 // yup, so branch LDR lr,[a1] // shiftright the first 1-3 words ORR a4,a4,lr,LSR a3 // to align the total to a multiple STR a4,[a1],#4 // of 4 words MOV a4,lr,ASL v6 CMP ip,#2 BLT shiftright_loop_up_l1 // better to branch than skip instrs. LDRGE lr,[a1] ORRGE a4,a4,lr,LSR a3 STRGE a4,[a1],#4 MOVGE a4,lr,ASL v6 LDRGT lr,[a1] ORRGT a4,a4,lr,LSR a3 STRGT a4,[a1],#4 MOVGT a4,lr,ASL v6 LABEL(shiftright_loop_up_l1) BICS ip,a2,#3 // set counter to multiple of 4 MOVEQ a1,a4 // if zero then we're done LDMEQFD sp!,{v6,pc}^ // so return last shift out STMFD sp!,{v1-v3} // save work regs LABEL(shiftright_loop_up_l2) LDMIA a1,{v1,v2,v3,lr} // load 4 words in one go ORR a2,a4,v1,LSR a3 // shiftright the four words MOV a4,v1,ASL v6 // keep carry in a4 ORR v1,a4,v2,LSR a3 // and store results down a register MOV a4,v2,ASL v6 // to regs a2,v1-v3 ORR v2,a4,v3,LSR a3 MOV a4,v3,ASL v6 ORR v3,a4,lr,LSR a3 MOV a4,lr,ASL v6 STMIA a1!,{a2,v1,v2,v3} // store 4 results SUBS ip,ip,#4 // decrement counter by 4 BGT shiftright_loop_up_l2 // if count still positive then loop MOV a1,a4 // result = last shift out LDMFD sp!,{v1-v3,v6,pc}^ // restore work regs and return // extern uintD shiftrightsigned_loop_up (uintD* ptr, uintC count, uintC i); // entry // a1 = ptr // a2 = count of words to be shifted right signed // a3 = size of right shift // exit // a1 = shift out from last shift right // a2 - a4, ip destroyed EXPORT(shiftrightsigned_loop_up)// word aligned shiftrightsigned loop up DECLARE_FUNCTION(shiftrightsigned_loop_up) GLABEL(shiftrightsigned_loop_up) STMFD sp!,{v6,lr} RSB v6,a3,#32 // size of complementary left shift LDR lr,[a1] // setup carry for first shift. MOV a4,lr,ASR #31 // this is the sign extended bits AND a4,a4,a4,LSL v6 // 31->(32-i) of the first word B shiftright_loop_up_l0 // use right shift code now // extern uintD shiftrightcopy_loop_up (uintD* sourceptr, uintD* destptr, uintC count, uintC i, uintD carry); // entry // a1 = sourceptr // a2 = destptr // a3 = count of words to be shifted right // a4 = size of right shift // [sp] = carry for first shift // exit // a1 = shift out from last shift right // a2 - a4, ip destroyed EXPORT(shiftrightcopy_loop_up) // word aligned shiftrightcopy loop up DECLARE_FUNCTION(shiftrightcopy_loop_up) GLABEL(shiftrightcopy_loop_up) STMFD sp!,{v5,v6,lr} LDR v5,[sp,#12] // initial shift carry RSB v6,a4,#32 // size of complementary left shift MOV v5,v5,ASL v6 LABEL(shiftrightcopy_loop_up_l0) ANDS ip,a3,#3 // multiple of 4 words ? BEQ shiftrightcopy_loop_up_l1 // yup, so branch LDR lr,[a1],#4 // shiftright the first 1-3 words ORR v5,v5,lr,LSR a4 // to align the total to a multiple STR v5,[a2],#4 // of 4 words MOV v5,lr,ASL v6 CMP ip,#2 BLT shiftrightcopy_loop_up_l1 // better to branch than skip instrs. LDRGE lr,[a1],#4 ORRGE v5,v5,lr,LSR a4 STRGE v5,[a2],#4 MOVGE v5,lr,ASL v6 LDRGT lr,[a1],#4 ORRGT v5,v5,lr,LSR a4 STRGT v5,[a2],#4 MOVGT v5,lr,ASL v6 LABEL(shiftrightcopy_loop_up_l1) BICS ip,a3,#3 // set counter to multiple of 4 MOVEQ a1,v5 // if zero then we're done LDMEQFD sp!,{v5,v6,pc}^ // so return last shift out STMFD sp!,{v1-v3} // save work regs LABEL(shiftrightcopy_loop_up_l2) LDMIA a1!,{v1,v2,v3,lr} // load 4 words in one go ORR a3,v5,v1,LSR a4 // shiftright the four words MOV v5,v1,ASL v6 // keep carry in v5 ORR v1,v5,v2,LSR a4 // and store results down a register MOV v5,v2,ASL v6 // to regs a2,v1-v3 ORR v2,v5,v3,LSR a4 MOV v5,v3,ASL v6 ORR v3,v5,lr,LSR a4 MOV v5,lr,ASL v6 STMIA a2!,{a3,v1,v2,v3} // store 4 results SUBS ip,ip,#4 // decrement counter by 4 BGT shiftrightcopy_loop_up_l2 // if count still positive then loop MOV a1,v5 // result = last shift out LDMFD sp!,{v1-v3,v5,v6,pc}^ // restore work regs and return #ifndef HAVE_umull // mulu32_64_vregs // entry // a1 = x // ip = y // exit // v1 = low32(x*y) // ip = high32(x*y) // v2,v3,v4 destroyed LABEL(mulu32_64_vregs) MOV v1,a1,LSR #16 // temp := top half of x MOV v2,ip,LSR #16 // hi := top half of y BIC v3,a1,v1,LSL #16 // x := bottom half of x BIC ip,ip,v2,LSL #16 // y := bottom half of y MUL v4,v3,ip // low section of result MUL ip,v1,ip // ) middle sections MUL v3,v2,v3 // ) of result MUL v2,v1,v2 // high section of result ADDS ip,ip,v3 // add middle sections // (can't use mla as we need carry) ADDCS v2,v2,#0x10000 // carry from above add ADDS v1,v4,ip,LSL #16 // x is now bottom 32 bits of result ADC ip,v2,ip,LSR #16 // hi is top 32 bits MOVS pc,lr #endif // extern uintD mulusmall_loop_down (uintD digit, uintD* ptr, uintC len, uintD newdigit); // entry // a1 = digit // a2 = ptr // a3 = count of words to be multiplied down // a4 = new digit = carry // exit // a1 = final carry of multiply // a2 - a4, ip destroyed EXPORT(mulusmall_loop_down) DECLARE_FUNCTION(mulusmall_loop_down) GLABEL(mulusmall_loop_down) CMP a3,#0 MOVEQ a1,a4 MOVEQS pc,lr #ifdef HAVE_umull STMFD sp!,{v1,lr} LABEL(mulusmall_loop_down_l1) LDR ip,[a2,#-4]! UMULL v1,ip,a1,ip // muluD(digit,*--ptr,hi=,lo=) ADDS v1,v1,a4 // lo += carry ADC a4,ip,#0 // if (lo yptr[i] // -1 if xptr[i] < yptr[i] // 0 otherwise // a2 - a4, ip destroyed EXPORT(compare_loop_down) // word aligned compare loop down DECLARE_FUNCTION(compare_loop_down) GLABEL(compare_loop_down) ANDS a4,a3,#3 // multiple of 4 words ? BEQ compare_loop_down_l1 // yup, so branch LDR a4,[a2,#-4]! // COMPARE the first 1-3 words LDR ip,[a1,#-4]! // to align the total to a multiple CMP ip,a4 // of 4 words MVNLO a1,#0 // x < y -> -1 MOVHI a1,#1 // x > y -> +1 MOVNES pc,lr // and return result if not equal ANDS a4,a3,#3 CMP a4,#2 BLT compare_loop_down_l1 // need to branch 'cos PSR used LDR a4,[a2,#-4]! LDR ip,[a1,#-4]! CMP ip,a4 MVNLO a1,#0 MOVHI a1,#1 MOVNES pc,lr ANDS a4,a3,#3 CMP a4,#2 BLE compare_loop_down_l1 // need to branch 'cos PSR used LDR a4,[a2,#-4]! LDR ip,[a1,#-4]! CMP ip,a4 MVNLO a1,#0 MOVHI a1,#1 MOVNES pc,lr LABEL(compare_loop_down_l1) BICS a4,a3,#3 // set counter to multiple of 4 MOVEQ a1,#0 // xptr[] == yptr[] -> 0 MOVEQS pc,lr // if zero then we're done STMFD sp!,{v1-v6,lr} // save work regs MOV v6,a1 // move xptr to v6 MOV a1,#1 // set result to +1 LABEL(compare_loop_down_l2) LDMDB a2!,{a3,v1,v2,ip} // load 4 words in one go LDMDB v6!,{v3,v4,v5,lr} // load test words CMP lr,ip // COMPARE the four words CMPEQ v5,v2 CMPEQ v4,v1 CMPEQ v3,a3 MVNLO a1,#0 // x < y -> -1 (a1 already holds +1) LDMNEFD sp!,{v1-v6,pc}^ SUBS a4,a4,#4 // decrement counter by 4 BGT compare_loop_down_l2 // if count still positive then loop MOV a1,#0 LDMFD sp!,{v1-v6,pc}^ // restore work regs and return // extern uintD addto_loop_up (uintD* sourceptr, uintD* destptr, uintC count); // entry // a1 = sourceptr // a2 = destptr // a3 = count of words to be added // exit // destptr[] = sourceptr[] + destptr[] // a1 = last carry // a2 - a4, ip destroyed EXPORT(addto_loop_up) // word aligned addto loop up DECLARE_FUNCTION(addto_loop_up) GLABEL(addto_loop_up) MOV a4,a3 // set regs for a call MOV a3,a2 // to add_loop_up // and drop into add_loop_up // extern uintD add_loop_up (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); // entry // a1 = sourceptr1 // a2 = sourceptr2 // a3 = destptr // a4 = count of words to be added // exit // destptr[] = sourceptr1[] + sourceptr2[] // a1 = last carry // a2 - a4, ip destroyed EXPORT(add_loop_up) // word aligned add loop up DECLARE_FUNCTION(add_loop_up) GLABEL(add_loop_up) ANDS ip,a4,#3 // multiple of 4 words ? BEQ add_loop_up_l1 // yup, so branch STMFD sp!,{v6,lr} LDR v6,[a2],#4 // add the first 1-3 words LDR lr,[a1],#4 // to align the total to a multiple ADDS lr,lr,v6 // of 4 words STR lr,[a3],#4 TEQ ip,#1 BEQ add_loop_up_l0 // need to branch 'cos PSR used LDR v6,[a2],#4 LDR lr,[a1],#4 ADCS lr,lr,v6 STR lr,[a3],#4 TEQ ip,#2 BEQ add_loop_up_l0 // need to branch 'cos PSR used LDR v6,[a2],#4 LDR lr,[a1],#4 ADCS lr,lr,v6 STR lr,[a3],#4 LABEL(add_loop_up_l0) // at least one add has happened BICS a4,a4,#3 // set counter to multiple of 4 BNE add_loop_up_l3 // branch if more adds to do ADCEQ a1,a4,a4 // set result to Carry (a4 is 0) LDMEQFD sp!,{v6,pc}^ // and return LABEL(add_loop_up_l1) BICS a4,a4,#3 // set counter to multiple of 4 MOVEQ a1,#0 // no adds, so C = 0 MOVEQS pc,lr // if zero then we're done CMN a4,#0 // clear carry bit STMFD sp!,{v6,lr} LABEL(add_loop_up_l3) STMFD sp!,{v1-v5} // save work regs LABEL(add_loop_up_l2) LDMIA a2!,{v1,v2,v3,ip} // load 4 words in one go LDMIA a1!,{v4,v5,v6,lr} // and from source2 ADCS v4,v4,v1 // add the four words with carry ADCS v5,v5,v2 ADCS v6,v6,v3 ADCS lr,lr,ip STMIA a3!,{v4,v5,v6,lr} // store 4 results SUB a4,a4,#4 // decrement counter by 4, preserve C TEQ a4,#0 // are we done ? BNE add_loop_up_l2 // if count non-zero then loop ADC a1,a4,a4 // set result to Carry (a4 is 0) LDMFD sp!,{v1-v6,pc}^ // restore work regs and return // extern uintD inc_loop_up (uintD* ptr, uintC count); // entry // a1 = ptr // a2 = count of words to be INCed // exit // a1 = 0 if any words are non-zero after increment else 1 // stop incrementing when first word becomes non-zero // a2 - a4, ip destroyed EXPORT(inc_loop_up) // word aligned inc loop up DECLARE_FUNCTION(inc_loop_up) GLABEL(inc_loop_up) ANDS a3,a2,#1 // multiple of 2 words ? BEQ inc_loop_up_l1 // yup, so branch LDR a4,[a1] // INC the first word ADDS a4,a4,#1 // align the total to a multiple of 2 STR a4,[a1],#4 MOVNE a1,#0 // set result to 0 MOVNES pc,lr // return 0 if non-zero result LABEL(inc_loop_up_l1) BICS a4,a2,#1 // set counter to multiple of 2 MOVEQ a1,#1 // return 1 MOVEQS pc,lr // if zero then we're done MOV ip,a1 // move ptr to ip MOV a1,#0 // set result to 0 ANDS a3,a4,#3 BEQ inc_loop_up_l3 LDMIA ip,{a2,a3} // load 2 words in one go ADDS a2,a2,#1 // INC the two words ADDEQS a3,a3,#1 // stopping when first word non-zero STMIA ip!,{a2,a3} // store 2 results MOVNES pc,lr // return 0 if any result non-zero SUBS a4,a4,#2 // decrement counter by 2 MOVEQ a1,#1 // if finished loop then MOVEQS pc,lr // return 1 LABEL(inc_loop_up_l3) // now a multiple of 4 words STMFD sp!,{v1,lr} // save work regs LABEL(inc_loop_up_l2) LDMIA ip,{a2,a3,v1,lr} // load 4 words in one go ADDS a2,a2,#1 // INC the four words ADDEQS a3,a3,#1 // stopping when first word non-zero ADDEQS v1,v1,#1 ADDEQS lr,lr,#1 STMIA ip!,{a2,a3,v1,lr} // store 4 results LDMNEFD sp!,{v1,pc}^ // return 0 if any result non-zero SUBS a4,a4,#4 // decrement counter by 4 BGT inc_loop_up_l2 // if count still positive then loop MOV a1,#1 LDMFD sp!,{v1,pc}^ // restore work regs and return 1 // extern uintD sub_loop_up (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); // entry // a1 = sourceptr1 // a2 = sourceptr2 // a3 = destptr // a4 = count of words to be subtracted // exit // destptr[] = sourceptr1[] - sourceptr2[] // a1 = last carry // a2 - a4, ip destroyed EXPORT(sub_loop_up) // word aligned sub loop up DECLARE_FUNCTION(sub_loop_up) GLABEL(sub_loop_up) ANDS ip,a4,#3 // multiple of 4 words ? BEQ sub_loop_up_l1 // yup, so branch STMFD sp!,{v6,lr} LDR v6,[a2],#4 // subtract the first 1-3 words LDR lr,[a1],#4 // to align the total to a multiple SUBS lr,lr,v6 // of 4 words STR lr,[a3],#4 TEQ ip,#1 BNE sub_loop_up_l0 // branch if more than one subtract LABEL(sub_loop_up_l4) // drop through for better instr. timings BICS a4,a4,#3 // set counter to multiple of 4 SBCEQ a1,a4,a4 // set result to Carry (a4 is 0) LDMEQFD sp!,{v6,pc}^ // and return STMFD sp!,{v1-v5} // save work regs B sub_loop_up_l2 // branch if more subtracts to do LABEL(sub_loop_up_l0) LDR v6,[a2],#4 LDR lr,[a1],#4 SBCS lr,lr,v6 STR lr,[a3],#4 TEQ ip,#2 BEQ sub_loop_up_l4 // need to branch 'cos PSR used LDR v6,[a2],#4 LDR lr,[a1],#4 SBCS lr,lr,v6 STR lr,[a3],#4 B sub_loop_up_l4 LABEL(sub_loop_up_l1) BICS a4,a4,#3 // set counter to multiple of 4 MOVEQ a1,#0 // no subtracts, so C = 0 MOVEQS pc,lr // if zero then we're done CMP a4,#0 // set carry bit, since a4 > 0 STMFD sp!,{v1-v6,lr} // save work regs LABEL(sub_loop_up_l2) LDMIA a2!,{v1,v2,v3,ip} // load 4 words in one go LDMIA a1!,{v4,v5,v6,lr} // and from source2 SBCS v4,v4,v1 // subtract the four words with carry SBCS v5,v5,v2 SBCS v6,v6,v3 SBCS lr,lr,ip STMIA a3!,{v4,v5,v6,lr} // store 4 results SUB a4,a4,#4 // decrement counter by 4, preserve C TEQ a4,#0 // are we done ? BNE sub_loop_up_l2 // if count non-zero then loop SBC a1,a4,a4 // set result to Carry (a4 is 0) LDMFD sp!,{v1-v6,pc}^ // restore work regs and return // extern uintD subx_loop_up (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count, uintD carry); // entry // a1 = sourceptr1 // a2 = sourceptr2 // a3 = destptr // a4 = count of words to be subtracted // [sp] = carry // exit // destptr[] = sourceptr1[] - sourceptr2[] // a1 = last carry // a2 - a4, ip destroyed EXPORT(subx_loop_up) // word aligned xsub loop up DECLARE_FUNCTION(subx_loop_up) GLABEL(subx_loop_up) LDR ip,[sp] // get starting value of carry LABEL(subx_loop_up_lsub) RSBS ip,ip,#0 // set carry in PSR ANDS ip,a4,#3 // multiple of 4 words ? BEQ subx_loop_up_l1 // yup, so branch STMFD sp!,{v6,lr} LDR v6,[a2],#4 // subtract the first 1-3 words LDR lr,[a1],#4 // to align the total to a multiple SBCS lr,lr,v6 // of 4 words STR lr,[a3],#4 TEQ ip,#1 BNE subx_loop_up_l0 // branch if more than one subtract LABEL(subx_loop_up_l4) // drop through for better instr. timings BICS a4,a4,#3 // set counter to multiple of 4 SBCEQ a1,a4,a4 // set result to Carry (a4 is 0) LDMEQFD sp!,{v6,pc}^ // and return STMFD sp!,{v1-v5} // save work regs B subx_loop_up_l2 // branch if more subtracts to do LABEL(subx_loop_up_l0) LDR v6,[a2],#4 LDR lr,[a1],#4 SBCS lr,lr,v6 STR lr,[a3],#4 TEQ ip,#2 BEQ subx_loop_up_l4 // need to branch 'cos PSR used LDR v6,[a2],#4 LDR lr,[a1],#4 SBCS lr,lr,v6 STR lr,[a3],#4 B subx_loop_up_l4 LABEL(subx_loop_up_l1) BICS a4,a4,#3 // set counter to multiple of 4 SBCEQ a1,a4,a4 // set result to Carry (a4 is 0) MOVEQS pc,lr // if zero then we're done STMFD sp!,{v1-v6,lr} // save work regs LABEL(subx_loop_up_l2) LDMIA a2!,{v1,v2,v3,ip} // load 4 words in one go LDMIA a1!,{v4,v5,v6,lr} // and from source2 SBCS v4,v4,v1 // subtract the four words with carry SBCS v5,v5,v2 SBCS v6,v6,v3 SBCS lr,lr,ip STMIA a3!,{v4,v5,v6,lr} // store 4 results SUB a4,a4,#4 // decrement counter by 4, preserve C TEQ a4,#0 // are we done ? BNE subx_loop_up_l2 // if count non-zero then loop SBC a1,a4,a4 // set result to Carry (a4 is 0) LDMFD sp!,{v1-v6,pc}^ // restore work regs and return // extern uintD subfrom_loop_up (uintD* sourceptr, uintD* destptr, uintC count); // entry // a1 = sourceptr // a2 = destptr // a3 = count of words to be subtracted // exit // destptr[] = destptr[] - sourceptr[] // a1 = last carry // a2 - a4, ip destroyed EXPORT(subfrom_loop_up) // word aligned subfrom loop up DECLARE_FUNCTION(subfrom_loop_up) GLABEL(subfrom_loop_up) ANDS ip,a3,#3 // multiple of 4 words ? BEQ subfrom_loop_up_l1 // yup, so branch STMFD sp!,{lr} LDR a4,[a1],#4 // subtract the first 1-3 words LDR lr,[a2] // to align the total to a multiple SUBS lr,lr,a4 // of 4 words STR lr,[a2],#4 TEQ ip,#1 BNE subfrom_loop_up_l0 // branch if more than one subtract LABEL(subfrom_loop_up_l4) // drop through for better instr. timings BICS a4,a3,#3 // set counter to multiple of 4 SBCEQ a1,a4,a4 // set result to Carry (a4 is 0) LDMEQFD sp!,{pc}^ // and return STMFD sp!,{v1-v5} // save work regs B subfrom_loop_up_l2 // branch if more subtracts to do LABEL(subfrom_loop_up_l0) LDR a4,[a1],#4 LDR lr,[a2] SBCS lr,lr,a4 STR lr,[a2],#4 TEQ ip,#2 BEQ subfrom_loop_up_l4 // need to branch 'cos PSR used LDR a4,[a1],#4 LDR lr,[a2] SBCS lr,lr,a4 STR lr,[a2],#4 B subfrom_loop_up_l4 LABEL(subfrom_loop_up_l1) BICS a4,a3,#3 // set counter to multiple of 4 MOVEQ a1,#0 // no subtracts, so C = 0 MOVEQS pc,lr // if zero then we're done CMP a4,#0 // set carry bit, since a4 > 0 STMFD sp!,{v1-v5,lr} // save work regs LABEL(subfrom_loop_up_l2) LDMIA a1!,{a3,v1,v2,ip} // load 4 words in one go LDMIA a2,{v3,v4,v5,lr} // and from destptr SBCS v3,v3,a3 // subtract the four words with carry SBCS v4,v4,v1 SBCS v5,v5,v2 SBCS lr,lr,ip STMIA a2!,{v3,v4,v5,lr} // store 4 results SUB a4,a4,#4 // decrement counter by 4, preserve C TEQ a4,#0 // are we done ? BNE subfrom_loop_up_l2 // if count non-zero then loop SBC a1,a4,a4 // set result to Carry (a4 is 0) LDMFD sp!,{v1-v5,pc}^ // restore work regs and return // extern uintD dec_loop_up (uintD* ptr, uintC count); // entry // a1 = ptr // a2 = count of words to be DECed // exit // a1 = 0 if any words are non-zero before decrement else -1 // stop decrementing when first word is non-zero // a2 - a4, ip destroyed EXPORT(dec_loop_up) // word aligned dec loop up DECLARE_FUNCTION(dec_loop_up) GLABEL(dec_loop_up) ANDS a3,a2,#1 // multiple of 2 words ? BEQ dec_loop_up_l1 // yup, so branch LDR a4,[a1] // DEC the first word SUBS a4,a4,#1 // align the total to a multiple of 2 STR a4,[a1],#4 MOVCS a1,#0 // set result to 0 MOVCSS pc,lr // return 0 if non-zero result LABEL(dec_loop_up_l1) BICS a4,a2,#1 // set counter to multiple of 2 MVNEQ a1,#0 // return -1 MOVEQS pc,lr // if zero then we're done MOV ip,a1 // move ptr to ip MOV a1,#0 // set result to 0 ANDS a3,a4,#3 BEQ dec_loop_up_l3 LDMIA ip,{a2,a3} // load 2 words in one go SUBS a2,a2,#1 // DEC the two words SUBCCS a3,a3,#1 // stopping when first word non-zero STMIA ip!,{a2,a3} // store 2 results MOVCSS pc,lr // return 0 if any result non-zero SUBS a4,a4,#2 // decrement counter by 2 MVNEQ a1,#0 // if finished loop then MOVEQS pc,lr // return -1 LABEL(dec_loop_up_l3) // now a multiple of 4 words STMFD sp!,{v1,lr} // save work regs LABEL(dec_loop_up_l2) LDMIA ip,{a2,a3,v1,lr} // load 4 words in one go SUBS a2,a2,#1 // DEC the four words SUBCCS a3,a3,#1 // stopping when first word non-zero SUBCCS v1,v1,#1 SUBCCS lr,lr,#1 STMIA ip!,{a2,a3,v1,lr} // store 4 results LDMCSFD sp!,{v1,pc}^ // return 0 if any carry SUBS a4,a4,#4 // decrement counter by 4 BGT dec_loop_up_l2 // if count still positive then loop MVN a1,#0 LDMFD sp!,{v1,pc}^ // restore work regs and return -1 // extern void neg_loop_up (uintD* ptr, uintC count); // entry // a1 = ptr // a2 = count of words. The long integer is to be NEGated // exit // ptr[] = -ptr[] for count words // a1 = last carry // a2 - a4, ip destroyed EXPORT(neg_loop_up) // word aligned neg loop up DECLARE_FUNCTION(neg_loop_up) GLABEL(neg_loop_up) CMPS a2,#0 // count = 0 ? MOVEQ a1,#0 // yup, so return 0 MOVEQS pc,lr LABEL(neg_loop_up_l1) // skip all the zero words first LDR a3,[a1],#4 // compare words against zero CMPS a3,#0 // upwards in memory BNE neg_loop_up_l2 // non-zero, so negate rest of words SUBS a2,a2,#1 // reduce count of words BNE neg_loop_up_l1 // more ?, so loop MOV a1,#0 // return 0 MOVS pc,lr LABEL(neg_loop_up_l2) RSB a3,a3,#0 // first non-zero word = -word STR a3,[a1,#-4] SUBS a2,a2,#1 MVNEQ a1,#0 // done ? -> return -1 MOVEQS pc,lr // now NOT rest of the words ANDS a3,a2,#3 // multiple of 4 words ? BEQ neg_loop_up_l3 // yup, so branch CMP a3,#2 // NOT the first 1-3 words LDR a3,[a1] // to align the total to a multiple MVN a3,a3 // of 4 words STR a3,[a1],#4 BLT neg_loop_up_l3 // better to branch than skip instrs. LDRGE a3,[a1] MVNGE a3,a3 STRGE a3,[a1],#4 LDRGT a3,[a1] MVNGT a3,a3 STRGT a3,[a1],#4 LABEL(neg_loop_up_l3) BICS a4,a2,#3 // set counter to multiple of 4 MVNEQ a1,#0 // set result to -1 MOVEQS pc,lr // if zero then we're done STMFD sp!,{lr} // save work regs LABEL(neg_loop_up_l4) LDMIA a1,{a2,a3,ip,lr} // load 4 words in one go,NO writeback MVN a2,a2 // NOT the four words MVN a3,a3 MVN ip,ip MVN lr,lr STMIA a1!,{a2,a3,ip,lr} // store 4 results SUBS a4,a4,#4 // decrement counter by 4 BGT neg_loop_up_l4 // if count still positive then loop MVN a1,#0 // set result to -1 LDMFD sp!,{pc}^ // restore work regs and return -1 // extern uintD shift1left_loop_up (uintD* ptr, uintC count); // entry // a1 = ptr // a2 = count of words to be shifted left // exit // a1 = carry out from last shift left // a2 - a4, ip destroyed EXPORT(shift1left_loop_up) // word aligned shift1left loop up DECLARE_FUNCTION(shift1left_loop_up) GLABEL(shift1left_loop_up) CMN a1,#0 // clear carry bit, since a1 > 0 ANDS a3,a2,#1 // multiple of 2 words ? BEQ shift1left_loop_up_l1 // yup, so branch LDR a4,[a1] // shift left the first word ADDS a4,a4,a4 STR a4,[a1],#4 LABEL(shift1left_loop_up_l1) BICS a4,a2,#1 // set counter to multiple of 2 ADCEQ a1,a4,a4 // if zero set result to C (a4 is 0) MOVEQS pc,lr // and return ANDS a3,a4,#3 // multiple of 4 words ? BEQ shift1left_loop_up_l3 // yup, so branch LDMIA a1,{a2,a3} // load 2 words in one go ADCS a2,a2,a2 // shift left the two words ADCS a3,a3,a3 STMIA a1!,{a2,a3} // store 2 results BICS a4,a4,#2 // decrement counter by 2 ADCEQ a1,a4,a4 // set result to Carry (a4 is 0) MOVEQS pc,lr // and return LABEL(shift1left_loop_up_l3) // now a multiple of 4 words STMFD sp!,{lr} // save work regs LABEL(shift1left_loop_up_l2) LDMIA a1,{a2,a3,ip,lr} // load 4 words in one go ADCS a2,a2,a2 // shift left the four words ADCS a3,a3,a3 ADCS ip,ip,ip ADCS lr,lr,lr STMIA a1!,{a2,a3,ip,lr} // store 4 results SUB a4,a4,#4 // decrement counter by 4 TEQ a4,#0 // are we done ? BNE shift1left_loop_up_l2 // if count non-zero then loop ADC a1,a4,a4 // set result to Carry (a4 is 0) LDMFD sp!,{pc}^ // restore work regs and return 1 // extern uintD shiftleft_loop_up (uintD* ptr, uintC count, uintC i, uintD carry); // entry // a1 = ptr // a2 = count of words to be shifted left // a3 = size of left shift // a4 = value to ORR in for first shift // exit // a1 = shift out from last shift left // a2 - a4, ip destroyed EXPORT(shiftleft_loop_up) // word aligned shiftleft loop up DECLARE_FUNCTION(shiftleft_loop_up) GLABEL(shiftleft_loop_up) STMFD sp!,{v6,lr} RSB v6,a3,#32 // size of complementary right shift ANDS ip,a2,#3 // multiple of 4 words ? BEQ shiftleft_loop_up_l1 // yup, so branch LDR lr,[a1] // shiftleft the first 1-3 words ORR a4,a4,lr,ASL a3 // to align the total to a multiple STR a4,[a1],#4 // of 4 words MOV a4,lr,LSR v6 CMP ip,#2 BLT shiftleft_loop_up_l1 // better to branch than skip instrs. LDRGE lr,[a1] ORRGE a4,a4,lr,ASL a3 STRGE a4,[a1],#4 MOVGE a4,lr,LSR v6 LDRGT lr,[a1] ORRGT a4,a4,lr,ASL a3 STRGT a4,[a1],#4 MOVGT a4,lr,LSR v6 LABEL(shiftleft_loop_up_l1) BICS ip,a2,#3 // set counter to multiple of 4 MOVEQ a1,a4 // if zero then we're done LDMEQFD sp!,{v6,pc}^ // so return last shift out STMFD sp!,{v1-v3} // save work regs LABEL(shiftleft_loop_up_l2) LDMIA a1,{v1,v2,v3,lr} // load 4 words in one go ORR a2,a4,v1,ASL a3 // shiftleft the four words MOV a4,v1,LSR v6 // keep carry in a4 ORR v1,a4,v2,ASL a3 // and store results down a register MOV a4,v2,LSR v6 // to regs a2,v1-v3 ORR v2,a4,v3,ASL a3 MOV a4,v3,LSR v6 ORR v3,a4,lr,ASL a3 MOV a4,lr,LSR v6 STMIA a1!,{a2,v1,v2,v3} // store 4 results SUBS ip,ip,#4 // decrement counter by 4 BGT shiftleft_loop_up_l2 // if count still positive then loop MOV a1,a4 // result = last shift out LDMFD sp!,{v1-v3,v6,pc}^ // restore work regs and return #endif // extern uintD shiftleftcopy_loop_up (uintD* sourceptr, uintD* destptr, uintC count, uintC i); // entry // a1 = sourceptr // a2 = destptr // a3 = count of words to be shifted left // a4 = size of left shift // exit // a1 = shift out from last shift left // a2 - a4, ip destroyed EXPORT(shiftleftcopy_loop_up) // word aligned shiftleftcopy loop up DECLARE_FUNCTION(shiftleftcopy_loop_up) GLABEL(shiftleftcopy_loop_up) STMFD sp!,{v5,v6,lr} MOV v5,#0 // initial shift carry RSB v6,a4,#32 // size of complementary right shift ANDS ip,a3,#3 // multiple of 4 words ? BEQ shiftleftcopy_loop_up_l1 // yup, so branch LDR lr,[a1],#4 // shiftleft the first 1-3 words ORR v5,v5,lr,ASL a4 // to align the total to a multiple STR v5,[a2],#4 // of 4 words MOV v5,lr,LSR v6 CMP ip,#2 BLT shiftleftcopy_loop_up_l1 // better to branch than skip instrs. LDRGE lr,[a1],#4 ORRGE v5,v5,lr,ASL a4 STRGE v5,[a2],#4 MOVGE v5,lr,LSR v6 LDRGT lr,[a1],#4 ORRGT v5,v5,lr,ASL a4 STRGT v5,[a2],#4 MOVGT v5,lr,LSR v6 LABEL(shiftleftcopy_loop_up_l1) BICS ip,a3,#3 // set counter to multiple of 4 MOVEQ a1,v5 // if zero then we're done LDMEQFD sp!,{v5,v6,pc}^ // so return last shift out STMFD sp!,{v1-v3} // save work regs LABEL(shiftleftcopy_loop_up_l2) LDMIA a1!,{v1,v2,v3,lr} // load 4 words in one go ORR a3,v5,v1,ASL a4 // shiftleft the four words MOV v5,v1,LSR v6 // keep carry in v5 ORR v1,v5,v2,ASL a4 // and store results down a register MOV v5,v2,LSR v6 // to regs a3,v1-v3 ORR v2,v5,v3,ASL a4 MOV v5,v3,LSR v6 ORR v3,v5,lr,ASL a4 MOV v5,lr,LSR v6 STMIA a2!,{a3,v1,v2,v3} // store 4 results SUBS ip,ip,#4 // decrement counter by 4 BGT shiftleftcopy_loop_up_l2 // if count still positive then loop MOV a1,v5 // result = last shift out LDMFD sp!,{v1-v3,v5,v6,pc}^ // restore work regs and return #if !CL_DS_BIG_ENDIAN_P // extern uintD shift1right_loop_down (uintD* ptr, uintC count, uintD carry); // entry // a1 = ptr // a2 = count of words to be shifted right // a3 = carry // exit // a1 = carry out from last shift right // a2 - a4, ip destroyed EXPORT(shift1right_loop_down) // word aligned shift1right loop down DECLARE_FUNCTION(shift1right_loop_down) GLABEL(shift1right_loop_down) MOVS a3,a3,LSR #1 // set carry ANDS a3,a2,#1 // multiple of 2 words ? BEQ shift1right_loop_down_l1 // yup, so branch LDR a4,[a1,#-4]! // shift right the first word MOVS a4,a4,RRX STR a4,[a1] LABEL(shift1right_loop_down_l1) BICS a4,a2,#1 // set counter to multiple of 2 MOVEQ a1,a4,RRX // if zero set result to C (a4 is 0) MOVEQS pc,lr // and return ANDS a3,a4,#3 // multiple of 4 words ? BEQ shift1right_loop_down_l3 // yup, so branch LDMDB a1,{a2,a3} // load 2 words in one go MOVS a3,a3,RRX // shift right the two words MOVS a2,a2,RRX STMDB a1!,{a2,a3} // store 2 results BICS a4,a4,#2 // decrement counter by 2 ADCEQ a1,a4,a4 // set result to Carry (a4 is 0) MOVEQS pc,lr // and return LABEL(shift1right_loop_down_l3) // now a multiple of 4 words STMFD sp!,{lr} // save work regs LABEL(shift1right_loop_down_l2) LDMDB a1,{a2,a3,ip,lr} // load 4 words in one go MOVS lr,lr,RRX // shift right the four words MOVS ip,ip,RRX MOVS a3,a3,RRX MOVS a2,a2,RRX STMDB a1!,{a2,a3,ip,lr} // store 4 results SUB a4,a4,#4 // decrement counter by 4 TEQ a4,#0 // are we done ? BNE shift1right_loop_down_l2 // if count non-zero then loop MOV a1,a4,RRX // set result to Carry (a4 is 0) LDMFD sp!,{pc}^ // restore work regs and return 1 // extern uintD shiftright_loop_down (uintD* ptr, uintC count, uintC i); // entry // a1 = ptr // a2 = count of words to be shifted right // a3 = size of right shift // exit // a1 = shift out from last shift right // a2 - a4, ip destroyed EXPORT(shiftright_loop_down) // word aligned shiftright loop down DECLARE_FUNCTION(shiftright_loop_down) GLABEL(shiftright_loop_down) STMFD sp!,{v6,lr} MOV a4,#0 // initial shift carry RSB v6,a3,#32 // size of complementary left shift LABEL(shiftright_loop_down_l0) ANDS ip,a2,#3 // multiple of 4 words ? BEQ shiftright_loop_down_l1 // yup, so branch LDR lr,[a1,#-4]! // shiftright the first 1-3 words ORR a4,a4,lr,LSR a3 // to align the total to a multiple STR a4,[a1] // of 4 words MOV a4,lr,ASL v6 CMP ip,#2 BLT shiftright_loop_down_l1 // better to branch than skip instrs. LDRGE lr,[a1,#-4]! ORRGE a4,a4,lr,LSR a3 STRGE a4,[a1] MOVGE a4,lr,ASL v6 LDRGT lr,[a1,#-4]! ORRGT a4,a4,lr,LSR a3 STRGT a4,[a1] MOVGT a4,lr,ASL v6 LABEL(shiftright_loop_down_l1) BICS ip,a2,#3 // set counter to multiple of 4 MOVEQ a1,a4 // if zero then we're done LDMEQFD sp!,{v6,pc}^ // so return last shift out STMFD sp!,{v1-v3} // save work regs LABEL(shiftright_loop_down_l2) LDMDB a1,{a2,v1,v2,v3} // load 4 words in one go ORR lr,a4,v3,LSR a3 // shiftright the four words MOV a4,v3,ASL v6 // keep carry in a4 ORR v3,a4,v2,LSR a3 // and store results up a register MOV a4,v2,ASL v6 // to regs v1-v3,lr ORR v2,a4,v1,LSR a3 MOV a4,v1,ASL v6 ORR v1,a4,a2,LSR a3 MOV a4,a2,ASL v6 STMDB a1!,{v1,v2,v3,lr} // store 4 results SUBS ip,ip,#4 // decrement counter by 4 BGT shiftright_loop_down_l2 // if count still positive then loop MOV a1,a4 // result = last shift out LDMFD sp!,{v1-v3,v6,pc}^ // restore work regs and return // extern uintD shiftrightsigned_loop_down (uintD* ptr, uintC count, uintC i); // entry // a1 = ptr // a2 = count of words to be shifted right signed // a3 = size of right shift // exit // a1 = shift out from last shift right // a2 - a4, ip destroyed EXPORT(shiftrightsigned_loop_down)// word aligned shiftrightsigned loop down DECLARE_FUNCTION(shiftrightsigned_loop_down) GLABEL(shiftrightsigned_loop_down) STMFD sp!,{v6,lr} RSB v6,a3,#32 // size of complementary left shift LDR lr,[a1,#-4] // setup carry for first shift. MOV a4,lr,ASR #31 // this is the sign extended bits AND a4,a4,a4,LSL v6 // 31->(32-i) of the first word B shiftright_loop_down_l0 // use right shift code now // extern uintD shiftrightcopy_loop_down (uintD* sourceptr, uintD* destptr, uintC count, uintC i, uintD carry); // entry // a1 = sourceptr // a2 = destptr // a3 = count of words to be shifted right // a4 = size of right shift // [sp] = carry for first shift // exit // a1 = shift out from last shift right // a2 - a4, ip destroyed EXPORT(shiftrightcopy_loop_down)// word aligned shiftrightcopy loop down DECLARE_FUNCTION(shiftrightcopy_loop_down) GLABEL(shiftrightcopy_loop_down) STMFD sp!,{v5,v6,lr} LDR v5,[sp,#12] // initial shift carry RSB v6,a4,#32 // size of complementary left shift MOV v5,v5,ASL v6 LABEL(shiftrightcopy_loop_down_l0) ANDS ip,a3,#3 // multiple of 4 words ? BEQ shiftrightcopy_loop_down_l1 // yup, so branch LDR lr,[a1,#-4]! // shiftright the first 1-3 words ORR v5,v5,lr,LSR a4 // to align the total to a multiple STR v5,[a2,#-4]! // of 4 words MOV v5,lr,ASL v6 CMP ip,#2 BLT shiftrightcopy_loop_down_l1 // better to branch than skip instrs. LDRGE lr,[a1,#-4]! ORRGE v5,v5,lr,LSR a4 STRGE v5,[a2,#-4]! MOVGE v5,lr,ASL v6 LDRGT lr,[a1,#-4]! ORRGT v5,v5,lr,LSR a4 STRGT v5,[a2,#-4]! MOVGT v5,lr,ASL v6 LABEL(shiftrightcopy_loop_down_l1) BICS ip,a3,#3 // set counter to multiple of 4 MOVEQ a1,v5 // if zero then we're done LDMEQFD sp!,{v5,v6,pc}^ // so return last shift out STMFD sp!,{v1-v3} // save work regs LABEL(shiftrightcopy_loop_down_l2) LDMDB a1!,{a3,v1,v2,v3} // load 4 words in one go ORR lr,v5,v3,LSR a4 // shiftright the four words MOV v5,v3,ASL v6 // keep carry in v5 ORR v3,v5,v2,LSR a4 // and store results up a register MOV v5,v2,ASL v6 // to regs v1-v3,lr ORR v2,v5,v1,LSR a4 MOV v5,v1,ASL v6 ORR v1,v5,a3,LSR a4 MOV v5,a3,ASL v6 STMDB a2!,{v1,v2,v3,lr} // store 4 results SUBS ip,ip,#4 // decrement counter by 4 BGT shiftrightcopy_loop_down_l2 // if count still positive then loop MOV a1,v5 // result = last shift out LDMFD sp!,{v1-v3,v5,v6,pc}^ // restore work regs and return #ifndef HAVE_umull // mulu32_64_vregs // entry // a1 = x // ip = y // exit // v1 = low32(x*y) // ip = high32(x*y) // v2,v3,v4 destroyed LABEL(mulu32_64_vregs) MOV v1,a1,LSR #16 // temp := top half of x MOV v2,ip,LSR #16 // hi := top half of y BIC v3,a1,v1,LSL #16 // x := bottom half of x BIC ip,ip,v2,LSL #16 // y := bottom half of y MUL v4,v3,ip // low section of result MUL ip,v1,ip // ) middle sections MUL v3,v2,v3 // ) of result MUL v2,v1,v2 // high section of result ADDS ip,ip,v3 // add middle sections // (can't use mla as we need carry) ADDCS v2,v2,#0x10000 // carry from above add ADDS v1,v4,ip,LSL #16 // x is now bottom 32 bits of result ADC ip,v2,ip,LSR #16 // hi is top 32 bits MOVS pc,lr #endif // extern uintD mulusmall_loop_up (uintD digit, uintD* ptr, uintC len, uintD newdigit); // entry // a1 = digit // a2 = ptr // a3 = count of words to be multiplied up // a4 = new digit = carry // exit // a1 = final carry of multiply // a2 - a4, ip destroyed EXPORT(mulusmall_loop_up) DECLARE_FUNCTION(mulusmall_loop_up) GLABEL(mulusmall_loop_up) CMP a3,#0 MOVEQ a1,a4 MOVEQS pc,lr #ifdef HAVE_umull STMFD sp!,{v1,lr} LABEL(mulusmall_loop_up_l1) LDR ip,[a2] UMULL v1,ip,a1,ip // muluD(digit,*--ptr,hi=,lo=) ADDS v1,v1,a4 // lo += carry ADC a4,ip,#0 // if (lo0 var uintC k_lo = len - k_hi; // Länge der Low-Teile: ceiling(len/2) >0 // Es gilt k_hi <= k_lo <= len, k_lo + k_hi = len. // Summe x1+x0 berechnen: var uintD* sum_MSDptr; var uintC sum_len = k_lo; // = max(k_lo,k_hi) var uintD* sum_LSDptr; num_stack_small_alloc_1(sum_len,sum_MSDptr=,sum_LSDptr=); {var uintD carry = // Hauptteile von x1 und x0 addieren: add_loop_lsp(sourceptr lspop k_lo,sourceptr,sum_LSDptr,k_hi); if (!(k_lo==k_hi)) // noch k_lo-k_hi = 1 Digits abzulegen { mspref(sum_MSDptr,0) = lspref(sourceptr,k_lo-1); // = lspref(sourceptr,k_hi) if (!(carry==0)) { if (++(mspref(sum_MSDptr,0)) == 0) carry=1; else carry=0; } } if (carry) { lsprefnext(sum_MSDptr) = 1; sum_len++; } } // Platz für Produkte x0*x0, x1*x1: { var uintC prodhi_len = 2*k_hi; var uintD* prodhi_LSDptr = prod_LSDptr lspop 2*k_lo; // prod_MSDptr/2*len/prod_LSDptr wird zuerst die beiden // Produkte x1*x1 in prod_MSDptr/2*k_hi/prodhi_LSDptr // und x0*x0 in prodhi_LSDptr/2*k_lo/prod_LSDptr, // dann das Produkt (b^k*x1+x0)*(b^k*x1+x0) enthalten. // Platz fürs Produkt (x1+x0)*(x1+x0) belegen: {var uintD* prodmid_MSDptr; var uintC prodmid_len = 2*sum_len; var uintD* prodmid_LSDptr; num_stack_small_alloc(prodmid_len,prodmid_MSDptr=,prodmid_LSDptr=); // Produkt (x1+x0)*(x1+x0) berechnen: cl_UDS_mul_square(sum_LSDptr,sum_len,prodmid_LSDptr); // Das Produkt beansprucht 2*k_lo + (0 oder 1) <= 2*sum_len = prodmid_len Digits. // Produkt x0*x0 berechnen: cl_UDS_mul_square(sourceptr,k_lo,prod_LSDptr); // Produkt x1*x1 berechnen: cl_UDS_mul_square(sourceptr lspop k_lo,k_hi,prodhi_LSDptr); // Und x1*x1 abziehen: {var uintD carry = subfrom_loop_lsp(prodhi_LSDptr,prodmid_LSDptr,prodhi_len); // Carry um maximal prodmid_len-prodhi_len Digits weitertragen: if (!(carry==0)) { dec_loop_lsp(prodmid_LSDptr lspop prodhi_len,prodmid_len-prodhi_len); } } // Und x0*x0 abziehen: {var uintD carry = subfrom_loop_lsp(prod_LSDptr,prodmid_LSDptr,2*k_lo); // Falls Carry: Produkt beansprucht 2*k_lo+1 Digits. // Carry um maximal 1 Digit weitertragen: if (!(carry==0)) { lspref(prodmid_LSDptr,2*k_lo) -= 1; } } // prodmid_LSDptr[-prodmid_len..-1] enthält nun 2*x0*x1. // Dies ist < 2 * b^k_lo * b^k_hi = 2 * b^len, // paßt also in len+1 Digits. // prodmid_len, wenn möglich, um maximal 2 verkleinern: // (benutzt prodmid_len >= 2*k_lo >= len >= 2) if (mspref(prodmid_MSDptr,0)==0) { prodmid_len--; if (mspref(prodmid_MSDptr,1)==0) { prodmid_len--; } } // Nun ist k_lo+prodmid_len <= 2*len . // (Denn es war prodmid_len = 2*sum_len <= 2*(k_lo+1) // <= len+3, und nach 2-maliger Verkleinerung jedenfalls // prodmid_len <= len+1. Wegen k_lo < len also // k_lo + prodmid_len <= (len-1)+(len+1) = 2*len.) // prodmid*b^k = 2*x0*x1*b^k zu prod = x1*x1*b^(2*k) + x0*x0 addieren: {var uintD carry = addto_loop_lsp(prodmid_LSDptr,prod_LSDptr lspop k_lo,prodmid_len); if (!(carry==0)) { inc_loop_lsp(prod_LSDptr lspop (k_lo+prodmid_len),prod_len-(k_lo+prodmid_len)); } } }}} cln-1.3.3/src/base/digitseq/cl_DS_mul_kara.h0000644000000000000000000003315111201634736015510 0ustar static void mulu_karatsuba (const uintD* sourceptr1, uintC len1, const uintD* sourceptr2, uintC len2, uintD* destptr) // Karatsuba-Multiplikation // Prinzip: (x1*b^k+x0) * (y1*b^k+y0) // = x1*y1 * b^2k + ((x1+x0)*(y1+y0)-x1*y1-x0*y0) * b^k + x0*y0 // Methode 1 (Collins/Loos, Degel): // source2 wird in floor(len2/len1) einzelne UDS mit je einer // Länge len3 (len1 <= len3 < 2*len1) unterteilt, // jeweils k=floor(len3/2). // Methode 2 (Haible): // source2 wird in ceiling(len2/len1) einzelne UDS mit je einer // Länge len3 (0 < len3 <= len1) unterteilt, jeweils k=floor(len1/2). // Aufwand für die hinteren Einzelteile: // bei beiden Methoden jeweils 3*len1^2. // Aufwand für das vorderste Teil (alles, falls len1 <= len2 < 2*len1) // mit r = len1, s = (len2 mod len1) + len1 (>= len1, < 2*len1): // bei Methode 1: // | : | r // | : | s // (r-s/2)*s/2 + s/2*s/2 + s/2*s/2 = r*s/2 + s^2/4 . // bei Methode 2: // | : | r // | | : | s // (s-r)*r + r/2*r/2 + r/2*r/2 + r/2*r/2 = r*s - r^2/4 . // Wegen (r*s/2 + s^2/4) - (r*s - r^2/4) = (r-s)^2/4 >= 0 // ist Methode 2 günstiger. // Denkfehler! Dies gilt - wenn überhaupt - nur knapp oberhalb des // Break-Even-Points. // Im allgemeinen ist der Multiplikationsaufwand für zwei Zahlen der // Längen u bzw. v nämlich gegeben durch min(u,v)^c * max(u,v), // wobei c = log3/log2 - 1 = 0.585... // Dadurch wird der Aufwand in Abhängigkeit des Parameters t = k, // r/2 <= t <= s/2 (der einzig sinnvolle Bereich), zu // (r-t)^c*(s-t) + t^c*(s-t) + t^(1+c). // Dessen Optimum liegt (im Bereich r <= s <= 2*r) // - im klassischen Fall c=1 tatsächlich stets bei t=r/2 [Methode 2], // - im Karatsuba-Fall c=0.6 aber offenbar bei t=s/2 [Methode 1] // oder ganz knapp darunter. // Auch erweist sich Methode 1 im Experiment als effizienter. // Daher implementieren wir Methode 1 : { // Es ist 2 <= len1 <= len2. // Spezialfall Quadrieren abfangen (häufig genug, daß sich das lohnt): if (sourceptr1 == sourceptr2) if (len1 == len2) { mulu_karatsuba_square(sourceptr1,len1,destptr); return; } var bool first_part = true; // Flag, ob jetzt das erste Teilprodukt berechnet wird if (len2 >= 2*len1) { CL_SMALL_ALLOCA_STACK; // Teilprodukte von jeweils len1 mal len1 Digits bilden: var uintC k_lo = floor(len1,2); // Länge der Low-Teile: floor(len1/2) >0 var uintC k_hi = len1 - k_lo; // Länge der High-Teile: ceiling(len1/2) >0 // Es gilt k_lo <= k_hi <= len1, k_lo + k_hi = len1. // Summe x1+x0 berechnen: var uintD* sum1_MSDptr; var uintC sum1_len = k_hi; // = max(k_lo,k_hi) var uintD* sum1_LSDptr; num_stack_small_alloc_1(sum1_len,sum1_MSDptr=,sum1_LSDptr=); {var uintD carry = // Hauptteile von x1 und x0 addieren: add_loop_lsp(sourceptr1 lspop k_lo,sourceptr1,sum1_LSDptr,k_lo); if (!(k_lo==k_hi)) // noch k_hi-k_lo = 1 Digits abzulegen { mspref(sum1_MSDptr,0) = lspref(sourceptr1,len1-1); // = lspref(sourceptr1,2*k_lo) if (!(carry==0)) { if (++(mspref(sum1_MSDptr,0)) == 0) carry=1; else carry=0; } } if (carry) { lsprefnext(sum1_MSDptr) = 1; sum1_len++; } } { // Platz für Summe y1+y0 belegen: var uintC sum2_maxlen = k_hi+1; var uintD* sum2_LSDptr; num_stack_small_alloc(sum2_maxlen,,sum2_LSDptr=); // Platz für Produkte x0*y0, x1*y1 belegen: { var uintD* prod_MSDptr; var uintD* prod_LSDptr; var uintD* prodhi_LSDptr; num_stack_small_alloc(2*len1,prod_MSDptr=,prod_LSDptr=); prodhi_LSDptr = prod_LSDptr lspop 2*k_lo; // prod_MSDptr/2*len1/prod_LSDptr wird zuerst die beiden // Produkte x1*y1 in prod_MSDptr/2*k_hi/prodhi_LSDptr // und x0*y0 in prodhi_LSDptr/2*k_lo/prod_LSDptr, // dann das Produkt (b^k*x1+x0)*(b^k*y1+y0) enthalten. // Platz fürs Produkt (x1+x0)*(y1+y0) belegen: {var uintD* prodmid_MSDptr; var uintD* prodmid_LSDptr; num_stack_small_alloc(sum1_len+sum2_maxlen,prodmid_MSDptr=,prodmid_LSDptr=); // Schleife über die hinteren Einzelteile: do { // Produkt x0*y0 berechnen: cl_UDS_mul(sourceptr1,k_lo,sourceptr2,k_lo,prod_LSDptr); // Produkt x1*y1 berechnen: cl_UDS_mul(sourceptr1 lspop k_lo,k_hi,sourceptr2 lspop k_lo,k_hi,prodhi_LSDptr); // Summe y1+y0 berechnen: {var uintC sum2_len = k_hi; // = max(k_lo,k_hi) var uintD* sum2_MSDptr = sum2_LSDptr lspop sum2_len; {var uintD carry = // Hauptteile von y1 und y0 addieren: add_loop_lsp(sourceptr2 lspop k_lo,sourceptr2,sum2_LSDptr,k_lo); if (!(k_lo==k_hi)) // noch k_hi-k_lo = 1 Digits abzulegen { mspref(sum2_MSDptr,0) = lspref(sourceptr2,len1-1); // = lspref(sourceptr2,2*k_lo) if (!(carry==0)) { if (++(mspref(sum2_MSDptr,0)) == 0) carry=1; else carry=0; } } if (carry) { lsprefnext(sum2_MSDptr) = 1; sum2_len++; } } // Produkt (x1+x0)*(y1+y0) berechnen: cl_UDS_mul(sum1_LSDptr,sum1_len,sum2_LSDptr,sum2_len,prodmid_LSDptr); // Das Produkt beansprucht 2*k_hi + (0 oder 1) <= sum1_len + sum2_len Digits. {var uintC prodmid_len = sum1_len+sum2_len; // Davon x1*y1 abziehen: {var uintD carry = subfrom_loop_lsp(prodhi_LSDptr,prodmid_LSDptr,2*k_hi); // Falls Carry: Produkt beansprucht 2*k_hi+1 Digits. // Carry um maximal 1 Digit weitertragen: if (!(carry==0)) { lspref(prodmid_LSDptr,2*k_hi) -= 1; } } // Und x0*y0 abziehen: {var uintD carry = subfrom_loop_lsp(prod_LSDptr,prodmid_LSDptr,2*k_lo); // Carry um maximal prodmid_len-2*k_lo Digits weitertragen: if (!(carry==0)) { dec_loop_lsp(prodmid_LSDptr lspop 2*k_lo,prodmid_len-2*k_lo); } } // prodmid_LSDptr[-prodmid_len..-1] enthält nun x0*y1+x1*y0. // Dies wird zu prod = x1*y1*b^(2*k) + x0*y0 addiert: {var uintD carry = addto_loop_lsp(prodmid_LSDptr,prod_LSDptr lspop k_lo,prodmid_len); // (Benutze dabei k_lo+prodmid_len <= k_lo+2*(k_hi+1) = 2*len1-k_lo+2 <= 2*len1 .) if (!(carry==0)) { inc_loop_lsp(prod_LSDptr lspop (k_lo+prodmid_len),2*len1-(k_lo+prodmid_len)); } }}} // Das Teilprodukt zum Gesamtprodukt addieren: if (first_part) { copy_loop_lsp(prod_LSDptr,destptr,2*len1); destptr = destptr lspop len1; first_part = false; } else { var uintD carry = addto_loop_lsp(prod_LSDptr,destptr,len1); destptr = destptr lspop len1; copy_loop_lsp(prod_LSDptr lspop len1,destptr,len1); if (!(carry==0)) { inc_loop_lsp(destptr,len1); } } sourceptr2 = sourceptr2 lspop len1; len2 -= len1; } while (len2 >= 2*len1); }}} } // Nun ist len1 <= len2 < 2*len1. // letztes Teilprodukt von len1 mal len2 Digits bilden: {CL_SMALL_ALLOCA_STACK; var uintD* prod_MSDptr; var uintC prod_len = len1+len2; var uintD* prod_LSDptr; num_stack_small_alloc(prod_len,prod_MSDptr=,prod_LSDptr=); { var uintC k_hi = floor(len2,2); // Länge der High-Teile: floor(len2/2) >0 var uintC k_lo = len2 - k_hi; // Länge der Low-Teile: ceiling(len2/2) >0 // Es gilt k_hi <= k_lo <= len1 <= len2, k_lo + k_hi = len2. var uintC x1_len = len1-k_lo; // <= len2-k_lo = k_hi <= k_lo // Summe x1+x0 berechnen: var uintD* sum1_MSDptr; var uintC sum1_len = k_lo; // = max(k_lo,k_hi) var uintD* sum1_LSDptr; num_stack_small_alloc_1(sum1_len,sum1_MSDptr=,sum1_LSDptr=); {var uintD carry = // x1 und unteren Teil von x0 addieren: add_loop_lsp(sourceptr1 lspop k_lo,sourceptr1,sum1_LSDptr,x1_len); // und den oberen Teil von x0 dazu: copy_loop_lsp(sourceptr1 lspop x1_len,sum1_LSDptr lspop x1_len,k_lo-x1_len); if (!(carry==0)) { carry = inc_loop_lsp(sum1_LSDptr lspop x1_len,k_lo-x1_len); if (carry) { lsprefnext(sum1_MSDptr) = 1; sum1_len++; } } } {// Summe y1+y0 berechnen: var uintD* sum2_MSDptr; var uintC sum2_len = k_lo; // = max(k_lo,k_hi) var uintD* sum2_LSDptr; num_stack_small_alloc_1(sum2_len,sum2_MSDptr=,sum2_LSDptr=); {var uintD carry = // Hauptteile von y1 und y0 addieren: add_loop_lsp(sourceptr2 lspop k_lo,sourceptr2,sum2_LSDptr,k_hi); if (!(k_lo==k_hi)) // noch k_lo-k_hi = 1 Digits abzulegen { mspref(sum2_MSDptr,0) = lspref(sourceptr2,k_lo-1); // = lspref(sourceptr2,k_hi) if (!(carry==0)) { if (++(mspref(sum2_MSDptr,0)) == 0) carry=1; else carry=0; } } if (carry) { lsprefnext(sum2_MSDptr) = 1; sum2_len++; } } // Platz für Produkte x0*y0, x1*y1: { var uintC prodhi_len = x1_len+k_hi; var uintD* prodhi_LSDptr = prod_LSDptr lspop 2*k_lo; // prod_MSDptr/len1+len2/prod_LSDptr wird zuerst die beiden // Produkte x1*y1 in prod_MSDptr/x1_len+k_hi/prodhi_LSDptr // und x0*y0 in prodhi_LSDptr/2*k_lo/prod_LSDptr, // dann das Produkt (b^k*x1+x0)*(b^k*y1+y0) enthalten. // Platz fürs Produkt (x1+x0)*(y1+y0) belegen: {var uintD* prodmid_MSDptr; var uintC prodmid_len = sum1_len+sum2_len; var uintD* prodmid_LSDptr; num_stack_small_alloc(prodmid_len,prodmid_MSDptr=,prodmid_LSDptr=); // Produkt (x1+x0)*(y1+y0) berechnen: cl_UDS_mul(sum1_LSDptr,sum1_len,sum2_LSDptr,sum2_len,prodmid_LSDptr); // Das Produkt beansprucht 2*k_lo + (0 oder 1) <= sum1_len + sum2_len = prodmid_len Digits. // Produkt x0*y0 berechnen: cl_UDS_mul(sourceptr1,k_lo,sourceptr2,k_lo,prod_LSDptr); // Produkt x1*y1 berechnen: if (!(x1_len==0)) { cl_UDS_mul(sourceptr1 lspop k_lo,x1_len,sourceptr2 lspop k_lo,k_hi,prodhi_LSDptr); // Und x1*y1 abziehen: {var uintD carry = subfrom_loop_lsp(prodhi_LSDptr,prodmid_LSDptr,prodhi_len); // Carry um maximal prodmid_len-prodhi_len Digits weitertragen: if (!(carry==0)) { dec_loop_lsp(prodmid_LSDptr lspop prodhi_len,prodmid_len-prodhi_len); } }} else // Produkt x1*y1=0, nichts abzuziehen { clear_loop_lsp(prodhi_LSDptr,prodhi_len); } // Und x0*y0 abziehen: {var uintD carry = subfrom_loop_lsp(prod_LSDptr,prodmid_LSDptr,2*k_lo); // Falls Carry: Produkt beansprucht 2*k_lo+1 Digits. // Carry um maximal 1 Digit weitertragen: if (!(carry==0)) { lspref(prodmid_LSDptr,2*k_lo) -= 1; } } // prodmid_LSDptr[-prodmid_len..-1] enthält nun x0*y1+x1*y0. // Dies ist < b^k_lo * b^k_hi + b^x1_len * b^k_lo // = b^len2 + b^len1 <= 2 * b^len2, // paßt also in len2+1 Digits. // Im Fall x1_len=0 ist es sogar < b^k_lo * b^k_hi = b^len2, // es paßt also in len2 Digits. // prodmid_len, wenn möglich, um maximal 2 verkleinern: // (benutzt prodmid_len >= 2*k_lo >= len2 >= 2) if (mspref(prodmid_MSDptr,0)==0) { prodmid_len--; if (mspref(prodmid_MSDptr,1)==0) { prodmid_len--; } } // Nun ist k_lo+prodmid_len <= len1+len2 . // (Denn es war prodmid_len = sum1_len+sum2_len <= 2*(k_lo+1) // <= len2+3, und nach 2-maliger Verkleinerung jedenfalls // prodmid_len <= len2+1. Im Falle k_lo < len1 also // k_lo + prodmid_len <= (len1-1)+(len2+1) = len1+len2. // Im Falle k_lo = len1 aber ist x1_len=0, sum1_len = k_lo, also // war prodmid_len = sum1_len+sum2_len <= 2*k_lo+1 <= len2+2, // nach 2-maliger Verkleinerung jedenfalls prodmid_len <= len2.) // prodmid*b^k = (x0*y1+x1*y0)*b^k zu prod = x1*y1*b^(2*k) + x0*y0 addieren: {var uintD carry = addto_loop_lsp(prodmid_LSDptr,prod_LSDptr lspop k_lo,prodmid_len); if (!(carry==0)) { inc_loop_lsp(prod_LSDptr lspop (k_lo+prodmid_len),prod_len-(k_lo+prodmid_len)); } }}}}} // Das Teilprodukt zum Gesamtprodukt addieren: if (first_part) { copy_loop_lsp(prod_LSDptr,destptr,prod_len); } else { var uintD carry = addto_loop_lsp(prod_LSDptr,destptr,len1); destptr = destptr lspop len1; copy_loop_lsp(prod_LSDptr lspop len1,destptr,len2); if (!(carry==0)) { inc_loop_lsp(destptr,len2); } } }} cln-1.3.3/src/base/digitseq/cl_asm_m68k_.cc0000644000000000000000000017513511547674521015273 0ustar // Externe Routinen zu ARILEV1.D // Prozessor: 680x0 mit x>=2 // Assembler-Syntax: meist "$" streichen, auf A/UX "$" durch "%" ersetzen // Compiler: CC oder GNU-C auf SUN3 oder AMIGA oder A/UX // Parameter-Übergabe: // auf dem Stack: sp@(4), sp@(8), ... (.W-Größen belegen 4 Byte!), // Rückgabewert in d0. // Register a0-a1,d0-d1 frei verwendbar, // Register a2-a4,d2-d7 müssen gerettet werden. // Einstellungen: intCsize=16, intDsize=32. #ifdef ASM_UNDERSCORE #if defined(__STDC__) || defined (__cplusplus) #define C(entrypoint) _##entrypoint #else #define C(entrypoint) _/**/entrypoint #endif #else #define C(entrypoint) entrypoint #endif // Befehl, der das X- und das C-Bit löscht (und evtl. d1 modifiziert): #if defined(sun) // SUN-Assembler #define clrx subw $d1,$d1 #else // GNU-Assembler #if defined(__STDC__) || defined (__cplusplus) // Some preprocessors keep the backslash in place, some don't. // In any case, we will filter it out later. #define clrx andb \#0x0e,$ccr #else #define clrx andb #0x0e,$ccr #endif #endif // When this file is compiled into a shared library, ELF linkers need to // know which symbols are functions. #if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__ELF__) || defined(__svr4__) #define DECLARE_FUNCTION(name) .type C(name),@function #else #define DECLARE_FUNCTION(name) #endif .text .globl C(copy_loop_up),C(copy_loop_down),C(fill_loop_up),C(fill_loop_down) .globl C(clear_loop_up),C(clear_loop_down) .globl C(test_loop_up),C(test_loop_down) .globl C(xor_loop_up),C(compare_loop_up),C(shiftleftcopy_loop_up),C(shiftxor_loop_up) #if CL_DS_BIG_ENDIAN_P .globl C(or_loop_up),C(and_loop_up),C(eqv_loop_up) .globl C(nand_loop_up),C(nor_loop_up),C(andc2_loop_up),C(orc2_loop_up) .globl C(not_loop_up) .globl C(and_test_loop_up) .globl C(add_loop_down),C(addto_loop_down),C(inc_loop_down) .globl C(sub_loop_down),C(subx_loop_down),C(subfrom_loop_down),C(dec_loop_down) .globl C(neg_loop_down) .globl C(shift1left_loop_down),C(shiftleft_loop_down),C(shiftleftcopy_loop_down) .globl C(shift1right_loop_up),C(shiftright_loop_up),C(shiftrightsigned_loop_up),C(shiftrightcopy_loop_up) .globl C(mulusmall_loop_down),C(mulu_loop_down),C(muluadd_loop_down),C(mulusub_loop_down) .globl C(divu_loop_up),C(divucopy_loop_up) #else .globl C(or_loop_down),C(xor_loop_down),C(and_loop_down),C(eqv_loop_down) .globl C(nand_loop_down),C(nor_loop_down),C(andc2_loop_down),C(orc2_loop_down) .globl C(not_loop_down) .globl C(and_test_loop_down),C(compare_loop_down) .globl C(add_loop_up),C(addto_loop_up),C(inc_loop_up) .globl C(sub_loop_up),C(subx_loop_up),C(subfrom_loop_up),C(dec_loop_up) .globl C(neg_loop_up) .globl C(shift1left_loop_up),C(shiftleft_loop_up) .globl C(shift1right_loop_down),C(shiftright_loop_down),C(shiftrightsigned_loop_down),C(shiftrightcopy_loop_down) .globl C(mulusmall_loop_up),C(mulu_loop_up),C(muluadd_loop_up),C(mulusub_loop_up) .globl C(divu_loop_down),C(divucopy_loop_down) #endif #ifndef __GNUC__ /* mit GNU-C machen wir mulu32() als Macro, der inline multipliziert */ .globl C(mulu32_) | extern struct { uint32 lo; uint32 hi; } mulu32_ (uint32 arg1, uint32 arg2); | 2^32*hi+lo := arg1*arg2. DECLARE_FUNCTION(mulu32_) C(mulu32_:) | Input in d0,d1, Output in d0,mulu32_high movel $sp@(4),$d0 movel $sp@(8),$d1 mulul $d1,$d1:$d0 movel $d1,(C(mulu32_high)) | Adressierung?? Deklaration?? rts #endif #ifndef __GNUC__ /* mit GNU-C machen wir divu_6432_3232() als Macro, der inline dividiert */ .globl C(divu_6432_3232_) | extern struct { uint32 q; uint32 r; } divu_6432_3232_ (uint32 xhi, uint32 xlo, uint32 y); | x = 2^32*xhi+xlo = q*y+r schreiben. Sei bekannt, daß 0 <= x < 2^32*y . DECLARE_FUNCTION(divu_6432_3232_) C(divu_6432_3232_:) | Input in d1,d0,d2, Output in d0,divu_32_rest movel $sp@(4),$d1 movel $sp@(8),$d0 divul $sp@(12),$d1:$d0 | x = d1|d0 durch y dividieren movel $d1,(C(divu_32_rest)) | Rest ablegen | Adressierung?? Deklaration?? rts #endif | extern uintD* copy_loop_up (uintD* sourceptr, uintD* destptr, uintC count); DECLARE_FUNCTION(copy_loop_up) C(copy_loop_up:) | Input in a0,a1,d0.W, Output in d0 movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 bras 2f 1: movel $a0@+,$a1@+ 2: dbra $d0,1b movel $a1,$d0 rts | extern uintD* copy_loop_down (uintD* sourceptr, uintD* destptr, uintC count); DECLARE_FUNCTION(copy_loop_down) C(copy_loop_down:) | Input in a0,a1,d0.W, Output in d0 movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 bras 2f 1: movel $a0@-,$a1@- 2: dbra $d0,1b movel $a1,$d0 rts | extern uintD* fill_loop_up (uintD* destptr, uintC count, uintD filler); DECLARE_FUNCTION(fill_loop_up) C(fill_loop_up:) | Input in a0,d0.W,d1, Output in d0 movel $sp@(4),$a0 movew $sp@(8+2),$d0 movel $sp@(12),$d1 bras 2f 1: movel $d1,$a0@+ 2: dbra $d0,1b movel $a0,$d0 rts | extern uintD* fill_loop_down (uintD* destptr, uintC count, uintD filler); DECLARE_FUNCTION(fill_loop_down) C(fill_loop_down:) | Input in a0,d0.W,d1, Output in d0 movel $sp@(4),$a0 movew $sp@(8+2),$d0 movel $sp@(12),$d1 bras 2f 1: movel $d1,$a0@- 2: dbra $d0,1b movel $a0,$d0 rts | extern uintD* clear_loop_up (uintD* destptr, uintC count); DECLARE_FUNCTION(clear_loop_up) C(clear_loop_up:) | Input in a0,d0.W, Output in d0 movel $sp@(4),$a0 movew $sp@(8+2),$d0 bras 2f 1: clrl $a0@+ 2: dbra $d0,1b movel $a0,$d0 rts | extern uintD* clear_loop_down (uintD* destptr, uintC count); DECLARE_FUNCTION(clear_loop_down) C(clear_loop_down:) | Input in a0,d0.W, Output in d0 movel $sp@(4),$a0 movew $sp@(8+2),$d0 bras 2f 1: clrl $a0@- 2: dbra $d0,1b movel $a0,$d0 rts | extern boolean test_loop_up (uintD* ptr, uintC count); DECLARE_FUNCTION(test_loop_up) C(test_loop_up:) | Input in a0,d0.W, Output in d0.W=d0.L movel $sp@(4),$a0 movew $sp@(8+2),$d0 bras 2f 1: tstl $a0@+ bnes 3f 2: dbra $d0,1b clrl $d0 rts 3: moveq #1,$d0 rts | extern boolean test_loop_down (uintD* ptr, uintC count); DECLARE_FUNCTION(test_loop_down) C(test_loop_down:) | Input in a0,d0.W, Output in d0.W=d0.L movel $sp@(4),$a0 movew $sp@(8+2),$d0 bras 2f 1: tstl $a0@- bnes 3f 2: dbra $d0,1b clrl $d0 rts 3: moveq #1,$d0 rts #if CL_DS_BIG_ENDIAN_P | extern void or_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(or_loop_up) C(or_loop_up:) | Input in a0,a1,d0.W, verändert d1 movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 bras 2f 1: movel $a1@+,$d1 orl $d1,$a0@+ 2: dbra $d0,1b rts #endif | extern void xor_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(xor_loop_up) C(xor_loop_up:) | Input in a0,a1,d0.W, verändert d1 movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 bras 2f 1: movel $a1@+,$d1 eorl $d1,$a0@+ 2: dbra $d0,1b rts #if CL_DS_BIG_ENDIAN_P | extern void and_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(and_loop_up) C(and_loop_up:) | Input in a0,a1,d0.W, verändert d1 movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 bras 2f 1: movel $a1@+,$d1 andl $d1,$a0@+ 2: dbra $d0,1b rts | extern void eqv_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(eqv_loop_up) C(eqv_loop_up:) | Input in a0,a1,d0.W, verändert d1 movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 bras 2f 1: movel $a1@+,$d1 eorl $d1,$a0@ notl $a0@+ 2: dbra $d0,1b rts | extern void nand_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(nand_loop_up) C(nand_loop_up:) | Input in a0,a1,d0.W, verändert d1 movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 bras 2f 1: movel $a1@+,$d1 andl $d1,$a0@ notl $a0@+ 2: dbra $d0,1b rts | extern void nor_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(nor_loop_up) C(nor_loop_up:) | Input in a0,a1,d0.W, verändert d1 movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 bras 2f 1: movel $a1@+,$d1 orl $d1,$a0@ notl $a0@+ 2: dbra $d0,1b rts | extern void andc2_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(andc2_loop_up) C(andc2_loop_up:) | Input in a0,a1,d0.W, verändert d1 movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 bras 2f 1: movel $a1@+,$d1 notl $d1 andl $d1,$a0@+ 2: dbra $d0,1b rts | extern void orc2_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(orc2_loop_up) C(orc2_loop_up:) | Input in a0,a1,d0.W, verändert d1 movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 bras 2f 1: movel $a1@+,$d1 notl $d1 orl $d1,$a0@+ 2: dbra $d0,1b rts | extern void not_loop_up (uintD* xptr, uintC count); DECLARE_FUNCTION(not_loop_up) C(not_loop_up:) | Input in a0,d0.W movel $sp@(4),$a0 movew $sp@(8+2),$d0 bras 2f 1: notl $a0@+ 2: dbra $d0,1b rts | extern boolean and_test_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(and_test_loop_up) C(and_test_loop_up:) | Input in a0,a1,d0.W, verändert d1, Output in d0.W=d0.L movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 bras 2f 1: movel $a0@+,$d1 andl $a1@+,$d1 bnes 3f 2: dbra $d0,1b clrl $d0 rts 3: moveq #1,$d0 rts #endif | extern cl_signean compare_loop_up (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(compare_loop_up) C(compare_loop_up:) | Input in a0,a1,d0.W, Output in d0.W=d0.L movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 bras 2f 1: cmpml $a1@+,$a0@+ bnes 3f 2: dbra $d0,1b clrl $d0 rts 3: bcss 4f moveq #1,$d0 rts 4: moveq #-1,$d0 rts #if CL_DS_BIG_ENDIAN_P | extern uintD add_loop_down (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); DECLARE_FUNCTION(add_loop_down) C(add_loop_down:) | Input in a0,a1,a2,d0.W, verändert d1,d2, Output in d0 moveml $a2/$d2,$sp@- movel $sp@(8+4),$a0 movel $sp@(8+8),$a1 movel $sp@(8+12),$a2 movew $sp@(8+16+2),$d0 clrx | X-Bit löschen bras 2f 1: movel $a0@-,$d1 movel $a1@-,$d2 addxl $d2,$d1 movel $d1,$a2@- 2: dbra $d0,1b subxl $d0,$d0 | -1 falls X gesetzt, 0 falls X gelöscht moveml $sp@+,$a2/$d2 rts | extern uintD addto_loop_down (uintD* sourceptr, uintD* destptr, uintC count); DECLARE_FUNCTION(addto_loop_down) C(addto_loop_down:) | Input in a0,a1,d0.W, Output in d0 movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 clrx | X-Bit löschen bras 2f 1: addxl $a0@-,$a1@- 2: dbra $d0,1b subxl $d0,$d0 | -1 falls X gesetzt, 0 falls X gelöscht rts | extern uintD inc_loop_down (uintD* ptr, uintC count); DECLARE_FUNCTION(inc_loop_down) C(inc_loop_down:) | Input in a0,d0.W, Output in d0 movel $sp@(4),$a0 movew $sp@(8+2),$d0 dbra $d0,1f | simuliere gesetzten Carry moveq #-1,$d0 | d0.L=-1 für Übertrag rts 1: addql #1,$a0@- dbcc $d0,1b subxl $d0,$d0 | kein Carry -> d0.L=0, sonst d0.L=-1 für Übertrag rts | extern uintD sub_loop_down (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); DECLARE_FUNCTION(sub_loop_down) C(sub_loop_down:) | Input in a0,a1,a2,d0.W, verändert d1,d2, Output in d0 moveml $a2/$d2,$sp@- movel $sp@(8+4),$a0 movel $sp@(8+8),$a1 movel $sp@(8+12),$a2 movew $sp@(8+16+2),$d0 clrx | X-Bit löschen bras 2f 1: movel $a0@-,$d1 movel $a1@-,$d2 subxl $d2,$d1 movel $d1,$a2@- 2: dbra $d0,1b subxl $d0,$d0 | -1 falls X gesetzt, 0 falls X gelöscht moveml $sp@+,$a2/$d2 rts | extern uintD subx_loop_down (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count, uintD carry); DECLARE_FUNCTION(subx_loop_down) C(subx_loop_down:) | Input in a0,a1,a2,d0.W,d1, verändert d2, Output in d0 moveml $a2/$d2,$sp@- movel $sp@(8+4),$a0 movel $sp@(8+8),$a1 movel $sp@(8+12),$a2 movew $sp@(8+16+2),$d0 movel $sp@(8+20),$d1 roxrl #1,$d1 | X-Bit initialisieren bras 2f 1: movel $a0@-,$d1 movel $a1@-,$d2 subxl $d2,$d1 movel $d1,$a2@- 2: dbra $d0,1b subxl $d0,$d0 | -1 falls X gesetzt, 0 falls X gelöscht moveml $sp@+,$a2/$d2 rts | extern uintD subfrom_loop_down (uintD* sourceptr, uintD* destptr, uintC count); DECLARE_FUNCTION(subfrom_loop_down) C(subfrom_loop_down:) | Input in a0,a1,d0.W, Output in d0 movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 clrx | X-Bit löschen bras 2f 1: subxl $a0@-,$a1@- 2: dbra $d0,1b subxl $d0,$d0 | -1 falls X gesetzt, 0 falls X gelöscht rts | extern uintD dec_loop_down (uintD* ptr, uintC count); DECLARE_FUNCTION(dec_loop_down) C(dec_loop_down:) | Input in a0,d0.W, Output in d0 movel $sp@(4),$a0 movew $sp@(8+2),$d0 dbra $d0,1f | simuliere gesetzten Carry moveq #-1,$d0 | d0.L=-1 als Übertrag rts 1: subql #1,$a0@- dbcc $d0,1b | kein Carry -> Schleife abbrechen subxl $d0,$d0 | kein Carry -> d0.L=0, sonst d0.L=-1 als Übertrag rts | extern uintD neg_loop_down (uintD* ptr, uintC count); DECLARE_FUNCTION(neg_loop_down) C(neg_loop_down:) | Input in a0,d0.W, Output in d0 movel $sp@(4),$a0 movew $sp@(8+2),$d0 clrx | X-Bit löschen bras 2f 1: negxl $a0@- 2: dbra $d0,1b subxl $d0,$d0 | -1 falls X gesetzt, 0 falls X gelöscht rts | extern uintD shift1left_loop_down (uintD* ptr, uintC count); DECLARE_FUNCTION(shift1left_loop_down) C(shift1left_loop_down:) | Input in a0,d0.W, Output in d0.L movel $sp@(4),$a0 movew $sp@(8+2),$d0 clrx | X-Bit löschen bras 2f 1: roxlw $a0@- | Digit a0@- um 1 Bit links schieben, X-Bit als Buffer roxlw $a0@- 2: dbra $d0,1b subxl $d0,$d0 | -1 falls X gesetzt, 0 falls X gelöscht rts | extern uintD shiftleft_loop_down (uintD* ptr, uintC count, uintC i, uintD carry); DECLARE_FUNCTION(shiftleft_loop_down) C(shiftleft_loop_down:) | Input in a0,d0.W,d1.W,d2, Output in d0 #if 1 moveml $d2-$d5,$sp@- movel $sp@(16+4),$a0 movew $sp@(16+8+2),$d0 movew $sp@(16+12+2),$d1 movel $sp@(16+16),$d2 moveq #32,$d5 subw $d1,$d5 | a0 = ptr, d0.W = count, d1.W = i, d5.W = 32-i, | d2.L = Schiebe-Übertrag (i Bits), d3.L = Schiebe-Akku bras 2f 1: movel $a0@-,$d3 | d3.L = neues Digit movel $d3,$d4 lsll $d1,$d4 | um i Bits nach links schieben orl $d2,$d4 | mit vorigem Übertrag kombinieren movel $d4,$a0@ | 32 Bits ablegen movel $d3,$d2 lsrl $d5,$d2 | neuen Übertrag bilden 2: dbra $d0,1b | Schleife d0.W mal durchlaufen movel $d2,$d0 moveml $sp@+,$d2-$d5 rts #else moveml $d2-$d5,$sp@- movel $sp@(16+4),$a0 movew $sp@(16+8+2),$d0 movew $sp@(16+12+2),$d1 movel $sp@(16+16),$d2 moveq #1,$d5 lsll $d1,$d5 subql #1,$d5 | a0 = ptr, d0.W = count, d1.W = i, d5.L = 2^i-1 | d2.L = Schiebe-Übertrag (i Bits), d3.L = Schiebe-Akku bras 2f 1: movel $a0@-,$d3 | d3.L = neues Digit roll $d1,$d3 | um i Bits links rotieren movel $d3,$d4 andl $d5,$d3 | untere i Bits in d3 eorl $d3,$d4 | obere 32-i Bits in d4 orl $d2,$d4 | mit vorigem übertrag kombinieren movel $d4,$a0@ | 32 Bits ablegen movel $d3,$d2 | neuer Übertrag 2: dbra $d0,1b | Schleife d0.W mal durchlaufen movel $d2,$d0 moveml $sp@+,$d2-$d5 rts #endif | extern uintD shiftleftcopy_loop_down (uintD* sourceptr, uintD* destptr, uintC count, uintC i); DECLARE_FUNCTION(shiftleftcopy_loop_down) C(shiftleftcopy_loop_down:) | Input in a0,a1,d0.W,d1.W, Output in d0 #if 1 moveml $d2-$d5,$sp@- movel $sp@(16+4),$a0 movel $sp@(16+8),$a1 movew $sp@(16+12+2),$d0 movew $sp@(16+16+2),$d1 moveq #32,$d5 subw $d1,$d5 clrl $d2 | a0 = sourceptr, a1 = destptr, d0.W = count, d1.W = i, d5.W = 32-i, | d2.L = Schiebe-Übertrag (i Bits), d3.L = Schiebe-Akku bras 2f 1: movel $a0@-,$d3 | d3.L = neues Digit movel $d3,$d4 lsll $d1,$d4 | um i Bits nach links schieben orl $d2,$d4 | mit vorigem Übertrag kombinieren movel $d4,$a1@- | 32 Bits ablegen movel $d3,$d2 lsrl $d5,$d2 | neuen Übertrag bilden 2: dbra $d0,1b | Schleife d0.W mal durchlaufen movel $d2,$d0 moveml $sp@+,$d2-$d5 rts #else moveml $d2-$d5,$sp@- movel $sp@(16+4),$a0 movel $sp@(16+8),$a1 movew $sp@(16+12+2),$d0 movew $sp@(16+16+2),$d1 moveq #1,$d5 lsll $d1,$d5 subql #1,$d5 | a0 = sourceptr, a1 = destptr, d0.W = count, d1.W = i, d5.L = 2^i-1 | d2.L = Schiebe-Übertrag (i Bits), d3.L = Schiebe-Akku bras 2f 1: movel $a0@-,$d3 | d3.L = neues Digit roll $d1,$d3 | um i Bits links rotieren movel $d3,$d4 andl $d5,$d3 | untere i Bits in d3 eorl $d3,$d4 | obere 32-i Bits in d4 orl $d2,$d4 | mit vorigem übertrag kombinieren movel $d4,$a1@- | 32 Bits ablegen movel $d3,$d2 | neuer Übertrag 2: dbra $d0,1b | Schleife d0.W mal durchlaufen movel $d2,$d0 moveml $sp@+,$d2-$d5 rts #endif | extern uintD shift1right_loop_up (uintD* ptr, uintC count, uintD carry); DECLARE_FUNCTION(shift1right_loop_up) C(shift1right_loop_up:) | Input in a0,d0.W,d1, Output in d0 movel $sp@(4),$a0 movew $sp@(8+2),$d0 movel $sp@(12),$d1 roxrl #1,$d1 | X-Bit löschen oder setzen, je nach d1 bras 2f 1: roxrw $a0@+ | Digit a0@+ um 1 Bit rechts schieben, X-Bit als Buffer roxrw $a0@+ 2: dbra $d0,1b subxl $d0,$d0 | -1 falls X gesetzt, 0 falls X gelöscht rts | extern uintD shiftright_loop_up (uintD* ptr, uintC count, uintC i); DECLARE_FUNCTION(shiftright_loop_up) C(shiftright_loop_up:) | Input in a0,d0.W,d1.W, Output in d0 #if 1 moveml $d2-$d5,$sp@- movel $sp@(16+4),$a0 movew $sp@(16+8+2),$d0 movew $sp@(16+12+2),$d1 moveq #32,$d5 subw $d1,$d5 | a0 = ptr, d0.W = count, d1.W = i, d5.W = 32-i, | d2.L = Schiebe-Übertrag (i Bits), d3.L = Schiebe-Akku clrl $d2 bras 2f 1: | a0 = Aufwärtszähler Adresse, d0.W = Herabzähler, d1.W = i, d5.W = 32-i, | d2.L = Schiebe-Übertrag (obere i Bits, restliche 32-i Bits sind 0) | d3.L = Schiebe-Akku movel $a0@,$d3 | neue Daten movel $d3,$d4 lsrl $d1,$d3 | um i Bits rechts schieben orl $d2,$d3 | und mit vorigem Übertrag kombinieren movel $d3,$a0@+ | ablegen lsll $d5,$d4 | um (32-i) Bits links geschoben movel $d4,$d2 | liefert neuen Übertrag 2: dbra $d0,1b | Schleife d0.W mal durchlaufen movel $d2,$d0 moveml $sp@+,$d2-$d5 rts #else moveml $d2-$d5,$sp@- movel $sp@(16+4),$a0 movew $sp@(16+8+2),$d0 movew $sp@(16+12+2),$d1 moveq #-1,$d5 lsrl $d1,$d5 | a0 = ptr, d0.W = count, d1.W = i, d5.L = 2^(32-i)-1, | d2.L = Schiebe-Übertrag (i Bits), d3.L = Schiebe-Akku clrl $d2 bras 2f 1: | a0 = Aufwärtszähler Adresse, d0.W = Herabzähler, d1.W = i, d5.L = 2^(32-i)-1, | d2.L = Schiebe-Übertrag (obere i Bits, restliche 32-i Bits sind 0) | d3.L = Schiebe-Akku movel $a0@,$d3 | neue Daten rorl $d1,$d3 | um i Bits rechts rotieren movel $d3,$d4 andl $d5,$d3 | untere 32-i Bits eorl $d3,$d4 | obere i Bits orl $d2,$d3 | und mit vorigem Übertrag kombinieren movel $d4,$d2 | neuer Übertrag movel $d3,$a0@+ | ablegen 2: dbra $d0,1b | Schleife d0.W mal durchlaufen movel $d2,$d0 moveml $sp@+,$d2-$d5 rts #endif | extern uintD shiftrightsigned_loop_up (uintD* ptr, uintC count, uintC i); DECLARE_FUNCTION(shiftrightsigned_loop_up) C(shiftrightsigned_loop_up:) | Input in a0,d0.W,d1.W, Output in d0 #if 1 moveml $d2-$d5,$sp@- movel $sp@(16+4),$a0 movew $sp@(16+8+2),$d0 movew $sp@(16+12+2),$d1 moveq #32,$d5 subw $d1,$d5 | a0 = ptr, d0.W = count, d1.W = i, d5.W = 32-i, | d2.L = Schiebe-Übertrag (i Bits), d3.L = Schiebe-Akku subqw #1,$d0 movel $a0@,$d3 | erstes Digit movel $d3,$d4 asrl $d1,$d3 | um i Bits rechts schieben bras 2f 1: | a0 = Aufwärtszähler Adresse, d0.W = Herabzähler, d1.W = i, d5.W = 32-i, | d2.L = Schiebe-Übertrag (obere i Bits, restliche 32-i Bits sind 0) | d3.L = Schiebe-Akku movel $a0@,$d3 | neue Daten movel $d3,$d4 lsrl $d1,$d3 | um i Bits rechts schieben orl $d2,$d3 | und mit vorigem Übertrag kombinieren 2: movel $d3,$a0@+ | ablegen lsll $d5,$d4 | um (32-i) Bits links geschoben movel $d4,$d2 | liefert neuen Übertrag dbra $d0,1b | Schleife d0.W mal durchlaufen movel $d2,$d0 moveml $sp@+,$d2-$d5 rts #else moveml $d2-$d5,$sp@- movel $sp@(16+4),$a0 movew $sp@(16+8+2),$d0 movew $sp@(16+12+2),$d1 moveq #-1,$d5 lsrl $d1,$d5 | a0 = ptr, d0.W = count, d1.W = i, d5.L = 2^(32-i)-1, | d2.L = Schiebe-Übertrag (i Bits), d3.L = Schiebe-Akku subqw #1,$d0 movel $a0@,$d3 | erstes Digit movel $d3,$d4 rorl $d1,$d4 | um i Bits rechts rotieren movel $d5,$d2 notl $d2 andl $d4,$d2 | obere 32-i Bits asrl $d1,$d3 | erstes Digit um i Bits rechts shiften bras 2f 1: | a0 = Aufwärtszähler Adresse, d0.W = Herabzähler, d1.W = i, d5.L = 2^(32-i)-1, | d2.L = Schiebe-Übertrag (obere i Bits, restliche 32-i Bits sind 0) | d3.L = Schiebe-Akku movel $a0@,$d3 | neue Daten rorl $d1,$d3 | um i Bits rechts rotieren movel $d3,$d4 andl $d5,$d3 | untere 32-i Bits eorl $d3,$d4 | obere i Bits orl $d2,$d3 | und mit vorigem Übertrag kombinieren movel $d4,$d2 | neuer Übertrag 2: movel $d3,$a0@+ | ablegen dbra $d0,1b | Schleife d0.W mal durchlaufen movel $d2,$d0 moveml $sp@+,$d2-$d5 rts #endif | extern uintD shiftrightcopy_loop_up (uintD* sourceptr, uintD* destptr, uintC count, uintC i, uintD carry); DECLARE_FUNCTION(shiftrightcopy_loop_up) C(shiftrightcopy_loop_up:) | Input in a0,a1,d0.W,d1.W,d2, Output in d0 #if 1 moveml $d2-$d5,$sp@- movel $sp@(16+4),$a0 movel $sp@(16+8),$a1 movew $sp@(16+12+2),$d0 movew $sp@(16+16+2),$d1 movel $sp@(16+20),$d2 moveq #32,$d5 subw $d1,$d5 | a0 = ptr, d0.W = count, d1.W = i, d5.W = 32-i | d2.L = Schiebe-Übertrag (i Bits), d3.L = Schiebe-Akku bras 2f 1: | a0,a1 = Aufwärtszähler Adresse, d0.W = Herabzähler, d1.W = i, d5.W = 32-i | d2.L = Schiebe-Übertrag (obere i Bits, restliche 32-i Bits sind 0) | d3.L = Schiebe-Akku movel $a0@+,$d3 | neue Daten movel $d3,$d4 lsrl $d1,$d3 | um i Bits rechts schieben orl $d2,$d3 | und mit vorigem Übertrag kombinieren movel $d3,$a1@+ | ablegen movel $d4,$d2 2: lsll $d5,$d2 | um (32-i) Bits links geschoben, gibt neuen Übertrag dbra $d0,1b | Schleife d0.W mal durchlaufen movel $d2,$d0 moveml $sp@+,$d2-$d5 rts #else moveml $d2-$d5,$sp@- movel $sp@(16+4),$a0 movel $sp@(16+8),$a1 movew $sp@(16+12+2),$d0 movew $sp@(16+16+2),$d1 movel $sp@(16+20),$d2 moveq #-1,$d5 lsrl $d1,$d5 rorl $d1,$d2 | a0 = ptr, d0.W = count, d1.W = i, d5.L = 2^(32-i)-1 | d2.L = Schiebe-Übertrag (i Bits), d3.L = Schiebe-Akku bras 2f 1: | a0,a1 = Aufwärtszähler Adresse, d0.W = Herabzähler, d1.W = i, d5.L = 2^(32-i)-1 | d2.L = Schiebe-Übertrag (obere i Bits, restliche 32-i Bits sind 0) | d3.L = Schiebe-Akku movel $a0@+,$d3 | neue Daten rorl $d1,$d3 | um i Bits rechts rotieren movel $d3,$d4 andl $d5,$d3 | untere 32-i Bits eorl $d3,$d4 | obere i Bits orl $d2,$d3 | und mit vorigem Übertrag kombinieren movel $d4,$d2 | neuer Übertrag movel $d3,$a1@+ | ablegen 2: dbra $d0,1b | Schleife d0.W mal durchlaufen movel $d2,$d0 moveml $sp@+,$d2-$d5 rts #endif | extern uintD mulusmall_loop_down (uintD digit, uintD* ptr, uintC len, uintD newdigit); DECLARE_FUNCTION(mulusmall_loop_down) C(mulusmall_loop_down:) | Input in d0,a0,d1.W,d2, Output in d0 moveml $d2-$d4,$sp@- movel $sp@(12+4),$d0 movel $sp@(12+8),$a0 movew $sp@(12+12+2),$d1 movel $sp@(12+16),$d2 addw #0,$d1 | X-Bit löschen bras 2f 1: movel $a0@-,$d3 | nächstes Digit mulul $d0,$d4:$d3 | mit digit multiplizieren addxl $d2,$d3 | und bisherigen Carry und X-Bit addieren movel $d3,$a0@ | Low-Digit ablegen movel $d4,$d2 | High-Digit gibt neuen Carry 2: dbra $d1,1b clrl $d0 addxl $d2,$d0 | letzter Carry (incl. X-Bit) moveml $sp@+,$d2-$d4 rts | extern void mulu_loop_down (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); DECLARE_FUNCTION(mulu_loop_down) C(mulu_loop_down:) | Input in d0,a0,a1,d1.W #if 1 moveml $d2-$d4,$sp@- movel $sp@(12+4),$d0 movel $sp@(12+8),$a0 movel $sp@(12+12),$a1 movew $sp@(12+16+2),$d1 subl $d2,$d2 | carry := 0, X-Bit löschen bras 2f 1: movel $a0@-,$d3 | nächstes Digit mulul $d0,$d4:$d3 | mit digit multiplizieren addxl $d2,$d3 | und bisherigen Carry und X-Bit addieren movel $d3,$a1@- | Low-Digit ablegen movel $d4,$d2 | High-Digit gibt neuen Carry 2: dbra $d1,1b clrl $d3 addxl $d3,$d2 | letztes X-Bit verarbeiten movel $d2,$a1@- | letzten Carry ablegen moveml $sp@+,$d2-$d4 rts #else moveml $d2-$d5,$sp@- movel $sp@(16+4),$d0 movel $sp@(16+8),$a0 movel $sp@(16+12),$a1 movew $sp@(16+16+2),$d1 clrl $d5 | 0 clrl $d2 | carry bras 2f 1: movel $a0@-,$d3 | nächstes Digit mulul $d0,$d4:$d3 | mit digit multiplizieren addl $d2,$d3 | und bisherigen Carry addieren addxl $d5,$d4 movel $d3,$a1@- | Low-Digit ablegen movel $d4,$d2 | High-Digit gibt neuen Carry 2: dbra $d1,1b movel $d2,$a1@- | letzten Carry ablegen moveml $sp@+,$d2-$d5 rts #endif | extern uintD muluadd_loop_down (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); DECLARE_FUNCTION(muluadd_loop_down) C(muluadd_loop_down:) | Input in d0,a0,a1,d1.W, Output in d0 moveml $d2-$d5,$sp@- movel $sp@(16+4),$d0 movel $sp@(16+8),$a0 movel $sp@(16+12),$a1 movew $sp@(16+16+2),$d1 clrl $d5 | 0 subl $d2,$d2 | carry := 0, X-Bit löschen bras 2f 1: movel $a0@-,$d3 | nächstes Digit mulul $d0,$d4:$d3 | mit digit multiplizieren addxl $d2,$d3 | und bisherigen Carry und X-Bit addieren addxl $d5,$d4 addl $d3,$a1@- | Low-Digit zum dest-Digit addieren, X als Übertrag movel $d4,$d2 | High-Digit gibt neuen Carry 2: dbra $d1,1b addxl $d5,$d2 | letztes X-Bit addieren movel $d2,$d0 | letzten Carry als Ergebnis moveml $sp@+,$d2-$d5 rts | extern uintD mulusub_loop_down (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); DECLARE_FUNCTION(mulusub_loop_down) C(mulusub_loop_down:) | Input in d0,a0,a1,d1.W, Output in d0 moveml $d2-$d5,$sp@- movel $sp@(16+4),$d0 movel $sp@(16+8),$a0 movel $sp@(16+12),$a1 movew $sp@(16+16+2),$d1 clrl $d5 | 0 subl $d2,$d2 | carry := 0, X-Bit löschen bras 2f 1: movel $a0@-,$d3 | nächstes Digit mulul $d0,$d4:$d3 | mit digit multiplizieren addxl $d2,$d3 | und bisherigen Carry und X-Bit addieren addxl $d5,$d4 subl $d3,$a1@- | Low-Digit vom dest-Digit subtrahieren, X als Übertrag movel $d4,$d2 | High-Digit gibt neuen Carry 2: dbra $d1,1b clrl $d0 addxl $d2,$d0 | letzter Carry und letztes X-Bit moveml $sp@+,$d2-$d5 rts | extern uintD divu_loop_up (uintD digit, uintD* ptr, uintC len); DECLARE_FUNCTION(divu_loop_up) C(divu_loop_up:) | Input in d0,a0,d1.W, Output in d0 moveml $d2-$d3,$sp@- movel $sp@(8+4),$d0 movel $sp@(8+8),$a0 movew $sp@(8+12+2),$d1 clrl $d2 | Rest := 0 bras 2f 1: movel $a0@,$d3 | nächst-niedriges Digit divul $d0,$d2:$d3 | mit Rest kombinieren und durch digit dividieren movel $d3,$a0@+ | Quotient ablegen, Rest in d2 2: dbra $d1,1b movel $d2,$d0 | Rest moveml $sp@+,$d2-$d3 rts | extern uintD divucopy_loop_up (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); DECLARE_FUNCTION(divucopy_loop_up) C(divucopy_loop_up:) | Input in d0,a0,a1,d1.W, Output in d0 moveml $d2-$d3,$sp@- movel $sp@(8+4),$d0 movel $sp@(8+8),$a0 movel $sp@(8+12),$a1 movew $sp@(8+16+2),$d1 clrl $d2 | Rest := 0 bras 2f 1: movel $a0@+,$d3 | nächst-niedriges Digit divul $d0,$d2:$d3 | mit Rest kombinieren und durch digit dividieren movel $d3,$a1@+ | Quotient ablegen, Rest in d2 2: dbra $d1,1b movel $d2,$d0 | Rest moveml $sp@+,$d2-$d3 rts #endif #if !CL_DS_BIG_ENDIAN_P | extern void or_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(or_loop_down) C(or_loop_down:) | Input in a0,a1,d0.W, verändert d1 movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 bras 2f 1: movel $a1@-,$d1 orl $d1,$a0@- 2: dbra $d0,1b rts | extern void xor_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(xor_loop_down) C(xor_loop_down:) | Input in a0,a1,d0.W, verändert d1 movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 bras 2f 1: movel $a1@-,$d1 eorl $d1,$a0@- 2: dbra $d0,1b rts | extern void and_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(and_loop_down) C(and_loop_down:) | Input in a0,a1,d0.W, verändert d1 movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 bras 2f 1: movel $a1@-,$d1 andl $d1,$a0@- 2: dbra $d0,1b rts | extern void eqv_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(eqv_loop_down) C(eqv_loop_down:) | Input in a0,a1,d0.W, verändert d1 movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 bras 2f 1: movel $a1@-,$d1 eorl $d1,$a0@- notl $a0@ 2: dbra $d0,1b rts | extern void nand_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(nand_loop_down) C(nand_loop_down:) | Input in a0,a1,d0.W, verändert d1 movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 bras 2f 1: movel $a1@-,$d1 andl $d1,$a0@- notl $a0@ 2: dbra $d0,1b rts | extern void nor_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(nor_loop_down) C(nor_loop_down:) | Input in a0,a1,d0.W, verändert d1 movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 bras 2f 1: movel $a1@-,$d1 orl $d1,$a0@- notl $a0@ 2: dbra $d0,1b rts | extern void andc2_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(andc2_loop_down) C(andc2_loop_down:) | Input in a0,a1,d0.W, verändert d1 movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 bras 2f 1: movel $a1@-,$d1 notl $d1 andl $d1,$a0@- 2: dbra $d0,1b rts | extern void orc2_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(orc2_loop_down) C(orc2_loop_down:) | Input in a0,a1,d0.W, verändert d1 movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 bras 2f 1: movel $a1@-,$d1 notl $d1 orl $d1,$a0@- 2: dbra $d0,1b rts | extern void not_loop_down (uintD* xptr, uintC count); DECLARE_FUNCTION(not_loop_down) C(not_loop_down:) | Input in a0,d0.W movel $sp@(4),$a0 movew $sp@(8+2),$d0 bras 2f 1: notl $a0@- 2: dbra $d0,1b rts | extern boolean and_test_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(and_test_loop_down) C(and_test_loop_down:) | Input in a0,a1,d0.W, verändert d1, Output in d0.W=d0.L movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 bras 2f 1: movel $a0@-,$d1 andl $a1@-,$d1 bnes 3f 2: dbra $d0,1b clrl $d0 rts 3: moveq #1,$d0 rts | extern cl_signean compare_loop_down (uintD* xptr, uintD* yptr, uintC count); DECLARE_FUNCTION(compare_loop_down) C(compare_loop_down:) | Input in a0,a1,d0.W, verändert d1,d2, Output in d0.W=d0.L movel $d2,$sp@- movel $sp@(4+4),$a0 movel $sp@(4+8),$a1 movew $sp@(4+12+2),$d0 bras 2f 1: movel $a0@-,$d1 movel $a1@-,$d2 cmpl $d2,$d1 bnes 3f 2: dbra $d0,1b clrl $d0 movel $sp@+,$d2 rts 3: bcss 4f moveq #1,$d0 movel $sp@+,$d2 rts 4: moveq #-1,$d0 movel $sp@+,$d2 rts | extern uintD add_loop_up (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); DECLARE_FUNCTION(add_loop_up) C(add_loop_up:) | Input in a0,a1,a2,d0.W, verändert d1,d2, Output in d0 moveml $a2/$d2,$sp@- movel $sp@(8+4),$a0 movel $sp@(8+8),$a1 movel $sp@(8+12),$a2 movew $sp@(8+16+2),$d0 clrx | X-Bit löschen bras 2f 1: movel $a0@+,$d1 movel $a1@+,$d2 addxl $d2,$d1 movel $d1,$a2@+ 2: dbra $d0,1b subxl $d0,$d0 | -1 falls X gesetzt, 0 falls X gelöscht moveml $sp@+,$a2/$d2 rts | extern uintD addto_loop_up (uintD* sourceptr, uintD* destptr, uintC count); DECLARE_FUNCTION(addto_loop_up) C(addto_loop_up:) | Input in a0,a1,d0.W, verändert d1,d2, Output in d0 movel $d2,$sp@- movel $sp@(4+4),$a0 movel $sp@(4+8),$a1 movew $sp@(4+12+2),$d0 clrx | X-Bit löschen bras 2f 1: movel $a0@+,$d1 movel $a1@,$d2 addxl $d1,$d2 movel $d2,$a1@+ 2: dbra $d0,1b subxl $d0,$d0 | -1 falls X gesetzt, 0 falls X gelöscht movel $sp@+,$d2 rts | extern uintD inc_loop_up (uintD* ptr, uintC count); DECLARE_FUNCTION(inc_loop_up) C(inc_loop_up:) | Input in a0,d0.W, Output in d0 movel $sp@(4),$a0 movew $sp@(8+2),$d0 dbra $d0,1f | simuliere gesetzten Carry moveq #-1,$d0 | d0.L=-1 für Übertrag rts 1: addql #1,$a0@+ dbcc $d0,1b subxl $d0,$d0 | kein Carry -> d0.L=0, sonst d0.L=-1 für Übertrag rts | extern uintD sub_loop_up (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); DECLARE_FUNCTION(sub_loop_up) C(sub_loop_up:) | Input in a0,a1,a2,d0.W, verändert d1,d2, Output in d0 moveml $a2/$d2,$sp@- movel $sp@(8+4),$a0 movel $sp@(8+8),$a1 movel $sp@(8+12),$a2 movew $sp@(8+16+2),$d0 clrx | X-Bit löschen bras 2f 1: movel $a0@+,$d1 movel $a1@+,$d2 subxl $d2,$d1 movel $d1,$a2@+ 2: dbra $d0,1b subxl $d0,$d0 | -1 falls X gesetzt, 0 falls X gelöscht moveml $sp@+,$a2/$d2 rts | extern uintD subx_loop_up (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count, uintD carry); DECLARE_FUNCTION(subx_loop_up) C(subx_loop_up:) | Input in a0,a1,a2,d0.W,d1, verändert d2, Output in d0 moveml $a2/$d2,$sp@- movel $sp@(8+4),$a0 movel $sp@(8+8),$a1 movel $sp@(8+12),$a2 movew $sp@(8+16+2),$d0 movel $sp@(8+20),$d1 roxrl #1,$d1 | X-Bit initialisieren bras 2f 1: movel $a0@+,$d1 movel $a1@+,$d2 subxl $d2,$d1 movel $d1,$a2@+ 2: dbra $d0,1b subxl $d0,$d0 | -1 falls X gesetzt, 0 falls X gelöscht moveml $sp@+,$a2/$d2 rts | extern uintD subfrom_loop_up (uintD* sourceptr, uintD* destptr, uintC count); DECLARE_FUNCTION(subfrom_loop_up) C(subfrom_loop_up:) | Input in a0,a1,d0.W, Output in d0 movel $sp@(4),$a0 movel $sp@(8),$a1 movew $sp@(12+2),$d0 clrx | X-Bit löschen bras 2f 1: movel $a0@+,$d1 movel $a1@,$d2 subxl $d1,$d2 movel $d2,$a1@+ 2: dbra $d0,1b subxl $d0,$d0 | -1 falls X gesetzt, 0 falls X gelöscht rts | extern uintD dec_loop_up (uintD* ptr, uintC count); DECLARE_FUNCTION(dec_loop_up) C(dec_loop_up:) | Input in a0,d0.W, Output in d0 movel $sp@(4),$a0 movew $sp@(8+2),$d0 dbra $d0,1f | simuliere gesetzten Carry moveq #-1,$d0 | d0.L=-1 als Übertrag rts 1: subql #1,$a0@+ dbcc $d0,1b | kein Carry -> Schleife abbrechen subxl $d0,$d0 | kein Carry -> d0.L=0, sonst d0.L=-1 als Übertrag rts | extern uintD neg_loop_up (uintD* ptr, uintC count); DECLARE_FUNCTION(neg_loop_up) C(neg_loop_up:) | Input in a0,d0.W, Output in d0 movel $sp@(4),$a0 movew $sp@(8+2),$d0 clrx | X-Bit löschen bras 2f 1: negxl $a0@+ 2: dbra $d0,1b subxl $d0,$d0 | -1 falls X gesetzt, 0 falls X gelöscht rts | extern uintD shift1left_loop_up (uintD* ptr, uintC count); DECLARE_FUNCTION(shift1left_loop_up) C(shift1left_loop_up:) | Input in a0,d0.W, verändert d1, Output in d0.L movel $sp@(4),$a0 movew $sp@(8+2),$d0 clrx | X-Bit löschen bras 2f 1: movel $a0@,$d1 roxll #1,$d1 movel $d1,$a0@+ 2: dbra $d0,1b subxl $d0,$d0 | -1 falls X gesetzt, 0 falls X gelöscht rts | extern uintD shiftleft_loop_up (uintD* ptr, uintC count, uintC i, uintD carry); DECLARE_FUNCTION(shiftleft_loop_up) C(shiftleft_loop_up:) | Input in a0,d0.W,d1.W,d2, Output in d0 #if 1 moveml $d2-$d5,$sp@- movel $sp@(16+4),$a0 movew $sp@(16+8+2),$d0 movew $sp@(16+12+2),$d1 movel $sp@(16+16),$d2 moveq #32,$d5 subw $d1,$d5 | a0 = ptr, d0.W = count, d1.W = i, d5.W = 32-i, | d2.L = Schiebe-Übertrag (i Bits), d3.L = Schiebe-Akku bras 2f 1: movel $a0@,$d3 | d3.L = neues Digit movel $d3,$d4 lsll $d1,$d4 | um i Bits nach links schieben orl $d2,$d4 | mit vorigem Übertrag kombinieren movel $d4,$a0@+ | 32 Bits ablegen movel $d3,$d2 lsrl $d5,$d2 | neuen Übertrag bilden 2: dbra $d0,1b | Schleife d0.W mal durchlaufen movel $d2,$d0 moveml $sp@+,$d2-$d5 rts #else moveml $d2-$d5,$sp@- movel $sp@(16+4),$a0 movew $sp@(16+8+2),$d0 movew $sp@(16+12+2),$d1 movel $sp@(16+16),$d2 moveq #1,$d5 lsll $d1,$d5 subql #1,$d5 | a0 = ptr, d0.W = count, d1.W = i, d5.L = 2^i-1 | d2.L = Schiebe-Übertrag (i Bits), d3.L = Schiebe-Akku bras 2f 1: movel $a0@,$d3 | d3.L = neues Digit roll $d1,$d3 | um i Bits links rotieren movel $d3,$d4 andl $d5,$d3 | untere i Bits in d3 eorl $d3,$d4 | obere 32-i Bits in d4 orl $d2,$d4 | mit vorigem übertrag kombinieren movel $d4,$a0@+ | 32 Bits ablegen movel $d3,$d2 | neuer Übertrag 2: dbra $d0,1b | Schleife d0.W mal durchlaufen movel $d2,$d0 moveml $sp@+,$d2-$d5 rts #endif #endif | extern uintD shiftleftcopy_loop_up (uintD* sourceptr, uintD* destptr, uintC count, uintC i); DECLARE_FUNCTION(shiftleftcopy_loop_up) C(shiftleftcopy_loop_up:) | Input in a0,a1,d0.W,d1.W, Output in d0 #if 1 moveml $d2-$d5,$sp@- movel $sp@(16+4),$a0 movel $sp@(16+8),$a1 movew $sp@(16+12+2),$d0 movew $sp@(16+16+2),$d1 moveq #32,$d5 subw $d1,$d5 clrl $d2 | a0 = sourceptr, a1 = destptr, d0.W = count, d1.W = i, d5.W = 32-i, | d2.L = Schiebe-Übertrag (i Bits), d3.L = Schiebe-Akku bras 2f 1: movel $a0@+,$d3 | d3.L = neues Digit movel $d3,$d4 lsll $d1,$d4 | um i Bits nach links schieben orl $d2,$d4 | mit vorigem Übertrag kombinieren movel $d4,$a1@+ | 32 Bits ablegen movel $d3,$d2 lsrl $d5,$d2 | neuen Übertrag bilden 2: dbra $d0,1b | Schleife d0.W mal durchlaufen movel $d2,$d0 moveml $sp@+,$d2-$d5 rts #else moveml $d2-$d5,$sp@- movel $sp@(16+4),$a0 movel $sp@(16+8),$a1 movew $sp@(16+12+2),$d0 movew $sp@(16+16+2),$d1 moveq #1,$d5 lsll $d1,$d5 subql #1,$d5 | a0 = sourceptr, a1 = destptr, d0.W = count, d1.W = i, d5.L = 2^i-1 | d2.L = Schiebe-Übertrag (i Bits), d3.L = Schiebe-Akku bras 2f 1: movel $a0@+,$d3 | d3.L = neues Digit roll $d1,$d3 | um i Bits links rotieren movel $d3,$d4 andl $d5,$d3 | untere i Bits in d3 eorl $d3,$d4 | obere 32-i Bits in d4 orl $d2,$d4 | mit vorigem übertrag kombinieren movel $d4,$a1@+ | 32 Bits ablegen movel $d3,$d2 | neuer Übertrag 2: dbra $d0,1b | Schleife d0.W mal durchlaufen movel $d2,$d0 moveml $sp@+,$d2-$d5 rts #endif #if !CL_DS_BIG_ENDIAN_P | extern uintD shift1right_loop_down (uintD* ptr, uintC count, uintD carry); DECLARE_FUNCTION(shift1right_loop_down) C(shift1right_loop_down:) | Input in a0,d0.W,d1, Output in d0 movel $sp@(4),$a0 movew $sp@(8+2),$d0 movel $sp@(12),$d1 roxrl #1,$d1 | X-Bit löschen oder setzen, je nach d1 bras 2f 1: movel $a0@-,$d1 roxrl #1,$d1 movel $d1,$a0@ 2: dbra $d0,1b subxl $d0,$d0 | -1 falls X gesetzt, 0 falls X gelöscht rts | extern uintD shiftright_loop_down (uintD* ptr, uintC count, uintC i); DECLARE_FUNCTION(shiftright_loop_down) C(shiftright_loop_down:) | Input in a0,d0.W,d1.W, Output in d0 #if 1 moveml $d2-$d5,$sp@- movel $sp@(16+4),$a0 movew $sp@(16+8+2),$d0 movew $sp@(16+12+2),$d1 moveq #32,$d5 subw $d1,$d5 | a0 = ptr, d0.W = count, d1.W = i, d5.W = 32-i, | d2.L = Schiebe-Übertrag (i Bits), d3.L = Schiebe-Akku clrl $d2 bras 2f 1: | a0 = Aufwärtszähler Adresse, d0.W = Herabzähler, d1.W = i, d5.W = 32-i, | d2.L = Schiebe-Übertrag (obere i Bits, restliche 32-i Bits sind 0) | d3.L = Schiebe-Akku movel $a0@-,$d3 | neue Daten movel $d3,$d4 lsrl $d1,$d3 | um i Bits rechts schieben orl $d2,$d3 | und mit vorigem Übertrag kombinieren movel $d3,$a0@ | ablegen lsll $d5,$d4 | um (32-i) Bits links geschoben movel $d4,$d2 | liefert neuen Übertrag 2: dbra $d0,1b | Schleife d0.W mal durchlaufen movel $d2,$d0 moveml $sp@+,$d2-$d5 rts #else moveml $d2-$d5,$sp@- movel $sp@(16+4),$a0 movew $sp@(16+8+2),$d0 movew $sp@(16+12+2),$d1 moveq #-1,$d5 lsrl $d1,$d5 | a0 = ptr, d0.W = count, d1.W = i, d5.L = 2^(32-i)-1, | d2.L = Schiebe-Übertrag (i Bits), d3.L = Schiebe-Akku clrl $d2 bras 2f 1: | a0 = Aufwärtszähler Adresse, d0.W = Herabzähler, d1.W = i, d5.L = 2^(32-i)-1, | d2.L = Schiebe-Übertrag (obere i Bits, restliche 32-i Bits sind 0) | d3.L = Schiebe-Akku movel $a0@-,$d3 | neue Daten rorl $d1,$d3 | um i Bits rechts rotieren movel $d3,$d4 andl $d5,$d3 | untere 32-i Bits eorl $d3,$d4 | obere i Bits orl $d2,$d3 | und mit vorigem Übertrag kombinieren movel $d4,$d2 | neuer Übertrag movel $d3,$a0@ | ablegen 2: dbra $d0,1b | Schleife d0.W mal durchlaufen movel $d2,$d0 moveml $sp@+,$d2-$d5 rts #endif | extern uintD shiftrightsigned_loop_down (uintD* ptr, uintC count, uintC i); DECLARE_FUNCTION(shiftrightsigned_loop_down) C(shiftrightsigned_loop_down:) | Input in a0,d0.W,d1.W, Output in d0 #if 1 moveml $d2-$d5,$sp@- movel $sp@(16+4),$a0 movew $sp@(16+8+2),$d0 movew $sp@(16+12+2),$d1 moveq #32,$d5 subw $d1,$d5 | a0 = ptr, d0.W = count, d1.W = i, d5.W = 32-i, | d2.L = Schiebe-Übertrag (i Bits), d3.L = Schiebe-Akku subqw #1,$d0 movel $a0@-,$d3 | erstes Digit movel $d3,$d4 asrl $d1,$d3 | um i Bits rechts schieben bras 2f 1: | a0 = Aufwärtszähler Adresse, d0.W = Herabzähler, d1.W = i, d5.W = 32-i, | d2.L = Schiebe-Übertrag (obere i Bits, restliche 32-i Bits sind 0) | d3.L = Schiebe-Akku movel $a0@-,$d3 | neue Daten movel $d3,$d4 lsrl $d1,$d3 | um i Bits rechts schieben orl $d2,$d3 | und mit vorigem Übertrag kombinieren 2: movel $d3,$a0@ | ablegen lsll $d5,$d4 | um (32-i) Bits links geschoben movel $d4,$d2 | liefert neuen Übertrag dbra $d0,1b | Schleife d0.W mal durchlaufen movel $d2,$d0 moveml $sp@+,$d2-$d5 rts #else moveml $d2-$d5,$sp@- movel $sp@(16+4),$a0 movew $sp@(16+8+2),$d0 movew $sp@(16+12+2),$d1 moveq #-1,$d5 lsrl $d1,$d5 | a0 = ptr, d0.W = count, d1.W = i, d5.L = 2^(32-i)-1, | d2.L = Schiebe-Übertrag (i Bits), d3.L = Schiebe-Akku subqw #1,$d0 movel $a0@-,$d3 | erstes Digit movel $d3,$d4 rorl $d1,$d4 | um i Bits rechts rotieren movel $d5,$d2 notl $d2 andl $d4,$d2 | obere 32-i Bits asrl $d1,$d3 | erstes Digit um i Bits rechts shiften bras 2f 1: | a0 = Aufwärtszähler Adresse, d0.W = Herabzähler, d1.W = i, d5.L = 2^(32-i)-1, | d2.L = Schiebe-Übertrag (obere i Bits, restliche 32-i Bits sind 0) | d3.L = Schiebe-Akku movel $a0@-,$d3 | neue Daten rorl $d1,$d3 | um i Bits rechts rotieren movel $d3,$d4 andl $d5,$d3 | untere 32-i Bits eorl $d3,$d4 | obere i Bits orl $d2,$d3 | und mit vorigem Übertrag kombinieren movel $d4,$d2 | neuer Übertrag 2: movel $d3,$a0@ | ablegen dbra $d0,1b | Schleife d0.W mal durchlaufen movel $d2,$d0 moveml $sp@+,$d2-$d5 rts #endif | extern uintD shiftrightcopy_loop_down (uintD* sourceptr, uintD* destptr, uintC count, uintC i, uintD carry); DECLARE_FUNCTION(shiftrightcopy_loop_down) C(shiftrightcopy_loop_down:) | Input in a0,a1,d0.W,d1.W,d2, Output in d0 #if 1 moveml $d2-$d5,$sp@- movel $sp@(16+4),$a0 movel $sp@(16+8),$a1 movew $sp@(16+12+2),$d0 movew $sp@(16+16+2),$d1 movel $sp@(16+20),$d2 moveq #32,$d5 subw $d1,$d5 | a0 = ptr, d0.W = count, d1.W = i, d5.W = 32-i | d2.L = Schiebe-Übertrag (i Bits), d3.L = Schiebe-Akku bras 2f 1: | a0,a1 = Aufwärtszähler Adresse, d0.W = Herabzähler, d1.W = i, d5.W = 32-i | d2.L = Schiebe-Übertrag (obere i Bits, restliche 32-i Bits sind 0) | d3.L = Schiebe-Akku movel $a0@-,$d3 | neue Daten movel $d3,$d4 lsrl $d1,$d3 | um i Bits rechts schieben orl $d2,$d3 | und mit vorigem Übertrag kombinieren movel $d3,$a1@- | ablegen movel $d4,$d2 2: lsll $d5,$d2 | um (32-i) Bits links geschoben, gibt neuen Übertrag dbra $d0,1b | Schleife d0.W mal durchlaufen movel $d2,$d0 moveml $sp@+,$d2-$d5 rts #else moveml $d2-$d5,$sp@- movel $sp@(16+4),$a0 movel $sp@(16+8),$a1 movew $sp@(16+12+2),$d0 movew $sp@(16+16+2),$d1 movel $sp@(16+20),$d2 moveq #-1,$d5 lsrl $d1,$d5 rorl $d1,$d2 | a0 = ptr, d0.W = count, d1.W = i, d5.L = 2^(32-i)-1 | d2.L = Schiebe-Übertrag (i Bits), d3.L = Schiebe-Akku bras 2f 1: | a0,a1 = Aufwärtszähler Adresse, d0.W = Herabzähler, d1.W = i, d5.L = 2^(32-i)-1 | d2.L = Schiebe-Übertrag (obere i Bits, restliche 32-i Bits sind 0) | d3.L = Schiebe-Akku movel $a0@-,$d3 | neue Daten rorl $d1,$d3 | um i Bits rechts rotieren movel $d3,$d4 andl $d5,$d3 | untere 32-i Bits eorl $d3,$d4 | obere i Bits orl $d2,$d3 | und mit vorigem Übertrag kombinieren movel $d4,$d2 | neuer Übertrag movel $d3,$a1@- | ablegen 2: dbra $d0,1b | Schleife d0.W mal durchlaufen movel $d2,$d0 moveml $sp@+,$d2-$d5 rts #endif | extern uintD mulusmall_loop_up (uintD digit, uintD* ptr, uintC len, uintD newdigit); DECLARE_FUNCTION(mulusmall_loop_up) C(mulusmall_loop_up:) | Input in d0,a0,d1.W,d2, Output in d0 moveml $d2-$d4,$sp@- movel $sp@(12+4),$d0 movel $sp@(12+8),$a0 movew $sp@(12+12+2),$d1 movel $sp@(12+16),$d2 addw #0,$d1 | X-Bit löschen bras 2f 1: movel $a0@,$d3 | nächstes Digit mulul $d0,$d4:$d3 | mit digit multiplizieren addxl $d2,$d3 | und bisherigen Carry und X-Bit addieren movel $d3,$a0@+ | Low-Digit ablegen movel $d4,$d2 | High-Digit gibt neuen Carry 2: dbra $d1,1b clrl $d0 addxl $d2,$d0 | letzter Carry (incl. X-Bit) moveml $sp@+,$d2-$d4 rts | extern void mulu_loop_up (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); DECLARE_FUNCTION(mulu_loop_up) C(mulu_loop_up:) | Input in d0,a0,a1,d1.W #if 1 moveml $d2-$d4,$sp@- movel $sp@(12+4),$d0 movel $sp@(12+8),$a0 movel $sp@(12+12),$a1 movew $sp@(12+16+2),$d1 subl $d2,$d2 | carry := 0, X-Bit löschen bras 2f 1: movel $a0@+,$d3 | nächstes Digit mulul $d0,$d4:$d3 | mit digit multiplizieren addxl $d2,$d3 | und bisherigen Carry und X-Bit addieren movel $d3,$a1@+ | Low-Digit ablegen movel $d4,$d2 | High-Digit gibt neuen Carry 2: dbra $d1,1b clrl $d3 addxl $d3,$d2 | letztes X-Bit verarbeiten movel $d2,$a1@+ | letzten Carry ablegen moveml $sp@+,$d2-$d4 rts #else moveml $d2-$d5,$sp@- movel $sp@(16+4),$d0 movel $sp@(16+8),$a0 movel $sp@(16+12),$a1 movew $sp@(16+16+2),$d1 clrl $d5 | 0 clrl $d2 | carry bras 2f 1: movel $a0@+,$d3 | nächstes Digit mulul $d0,$d4:$d3 | mit digit multiplizieren addl $d2,$d3 | und bisherigen Carry addieren addxl $d5,$d4 movel $d3,$a1@+ | Low-Digit ablegen movel $d4,$d2 | High-Digit gibt neuen Carry 2: dbra $d1,1b movel $d2,$a1@+ | letzten Carry ablegen moveml $sp@+,$d2-$d5 rts #endif | extern uintD muluadd_loop_up (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); DECLARE_FUNCTION(muluadd_loop_up) C(muluadd_loop_up:) | Input in d0,a0,a1,d1.W, Output in d0 moveml $d2-$d5,$sp@- movel $sp@(16+4),$d0 movel $sp@(16+8),$a0 movel $sp@(16+12),$a1 movew $sp@(16+16+2),$d1 clrl $d5 | 0 subl $d2,$d2 | carry := 0, X-Bit löschen bras 2f 1: movel $a0@+,$d3 | nächstes Digit mulul $d0,$d4:$d3 | mit digit multiplizieren addxl $d2,$d3 | und bisherigen Carry und X-Bit addieren addxl $d5,$d4 addl $d3,$a1@+ | Low-Digit zum dest-Digit addieren, X als Übertrag movel $d4,$d2 | High-Digit gibt neuen Carry 2: dbra $d1,1b addxl $d5,$d2 | letztes X-Bit addieren movel $d2,$d0 | letzten Carry als Ergebnis moveml $sp@+,$d2-$d5 rts | extern uintD mulusub_loop_up (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); DECLARE_FUNCTION(mulusub_loop_up) C(mulusub_loop_up:) | Input in d0,a0,a1,d1.W, Output in d0 moveml $d2-$d5,$sp@- movel $sp@(16+4),$d0 movel $sp@(16+8),$a0 movel $sp@(16+12),$a1 movew $sp@(16+16+2),$d1 clrl $d5 | 0 subl $d2,$d2 | carry := 0, X-Bit löschen bras 2f 1: movel $a0@+,$d3 | nächstes Digit mulul $d0,$d4:$d3 | mit digit multiplizieren addxl $d2,$d3 | und bisherigen Carry und X-Bit addieren addxl $d5,$d4 subl $d3,$a1@+ | Low-Digit vom dest-Digit subtrahieren, X als Übertrag movel $d4,$d2 | High-Digit gibt neuen Carry 2: dbra $d1,1b clrl $d0 addxl $d2,$d0 | letzter Carry und letztes X-Bit moveml $sp@+,$d2-$d5 rts | extern uintD divu_loop_down (uintD digit, uintD* ptr, uintC len); DECLARE_FUNCTION(divu_loop_down) C(divu_loop_down:) | Input in d0,a0,d1.W, Output in d0 moveml $d2-$d3,$sp@- movel $sp@(8+4),$d0 movel $sp@(8+8),$a0 movew $sp@(8+12+2),$d1 clrl $d2 | Rest := 0 bras 2f 1: movel $a0@-,$d3 | nächst-niedriges Digit divul $d0,$d2:$d3 | mit Rest kombinieren und durch digit dividieren movel $d3,$a0@ | Quotient ablegen, Rest in d2 2: dbra $d1,1b movel $d2,$d0 | Rest moveml $sp@+,$d2-$d3 rts | extern uintD divucopy_loop_down (uintD digit, uintD* sourceptr, uintD* destptr, uintC len); DECLARE_FUNCTION(divucopy_loop_down) C(divucopy_loop_down:) | Input in d0,a0,a1,d1.W, Output in d0 moveml $d2-$d3,$sp@- movel $sp@(8+4),$d0 movel $sp@(8+8),$a0 movel $sp@(8+12),$a1 movew $sp@(8+16+2),$d1 clrl $d2 | Rest := 0 bras 2f 1: movel $a0@-,$d3 | nächst-niedriges Digit divul $d0,$d2:$d3 | mit Rest kombinieren und durch digit dividieren movel $d3,$a1@- | Quotient ablegen, Rest in d2 2: dbra $d1,1b movel $d2,$d0 | Rest moveml $sp@+,$d2-$d3 rts #endif | extern void shiftxor_loop_up (uintD* xptr, const uintD* yptr, uintC count, uintC i); DECLARE_FUNCTION(shiftxor_loop_up) C(shiftxor_loop_up:) | Input in a0,a1,d0.W,d1.W moveml $d2-$d5,$sp@- movel $sp@(16+4),$a0 movel $sp@(16+8),$a1 movew $sp@(16+12+2),$d0 movew $sp@(16+16+2),$d1 moveq #32,$d5 subw $d1,$d5 clrl $d2 | a0 = xptr, a1 = yptr, d0.W = count, d1.W = i, d5.W = 32-i, | d2.L = Schiebe-Übertrag (i Bits), d3.L = Schiebe-Akku bras 2f 1: movel $a1@+,$d3 | d3.L = neues Digit movel $d3,$d4 lsll $d1,$d4 | um i Bits nach links schieben orl $d2,$d4 | mit vorigem Übertrag kombinieren eorl $d4,$a0@+ | 32 Bits ablegen movel $d3,$d2 lsrl $d5,$d2 | neuen Übertrag bilden 2: dbra $d0,1b | Schleife d0.W mal durchlaufen eorl $d2,$a0@ moveml $sp@+,$d2-$d5 rts cln-1.3.3/src/base/digitseq/cl_DS_mul_fftp.h0000644000000000000000000007246112034113706015532 0ustar // Fast integer multiplication using FFT in a modular ring. // Bruno Haible 5.5.1996 // FFT in the complex domain has the drawback that it needs careful round-off // error analysis. So here we choose another field of characteristic 0: Q_p. // Since Q_p contains exactly the (p-1)th roots of unity, we choose // p == 1 mod N and have the Nth roots of unity (N = 2^n) in Q_p and // even in Z_p. Actually, we compute in Z/(p^m Z). // All operations the FFT algorithm needs is addition, subtraction, // multiplication, multiplication by the Nth root of unity and division // by N. Hence we can use the domain Z/(p^m Z) even if p is not a prime! // We want to compute the convolution of N 32-bit words. The resulting // words are < (2^32)^2 * N. If is safe to compute in Z/pZ with p = 2^94 + 1 // or p = 7*2^92 + 1. We choose p < 2^95 so that we can easily represent every // element of Z/pZ as three 32-bit words. #if !(intDsize==32) #error "fft mod p implemented only for intDsize==32" #endif #if 0 typedef union { #if CL_DS_BIG_ENDIAN_P struct { uint32 w2; uint32 w1; uint32 w0; }; #else struct { uint32 w0; uint32 w1; uint32 w2; }; #endif uintD _w[3]; } fftp_word; #else // typedef struct { uint32 w2; uint32 w1; uint32 w0; } fftp_word; // typedef struct { uint32 w0; uint32 w1; uint32 w2; } fftp_word; typedef struct { uintD _w[3]; } fftp_word; #endif #if CL_DS_BIG_ENDIAN_P #define w2 _w[0] #define w1 _w[1] #define w0 _w[2] #define W3(W2,W1,W0) { W2, W1, W0 } #else #define w0 _w[0] #define w1 _w[1] #define w2 _w[2] #define W3(W2,W1,W0) { W0, W1, W2 } #endif #if 0 // p = 19807040628566084398385987585 = 5 * 3761 * 7484047069 * 140737471578113 static const fftp_word p = W3( 1L<<30, 0, 1 ); // p = 2^94 + 1 #define FFT_P_94 static const fftp_word fftp_roots_of_1 [24+1] = // roots_of_1[n] is a (2^n)th root of unity in Z/pZ. // (Also roots_of_1[n-1] = roots_of_1[n]^2, but we don't need this.) // (To build this table, you need to compute roots of unity modulo the // factors of p and combine them using the Chinese Remainder Theorem. // Or ask me for "quadmod.lsp".) { W3( 0x00000000, 0x00000000, 0x00000001 ), // 1 W3( 0x0000003F, 0xFFFFFFFF, 0xFF800000 ), // 1180591620717402914816 W3( 0x20000040, 0x00004000, 0x00000001 ), // 9903521494874733285348474881 W3( 0x3688E9A7, 0xDD78E2A9, 0x1E75974D ), // 16877707849775746711303853901 W3( 0x286E6589, 0x5E86C1E0, 0x42710379 ), // 12512861726041464545960067961 W3( 0x00D79325, 0x1A884885, 0xEA46D6C5 ), // 260613923531515619478787781 W3( 0x1950B480, 0xC387CEE5, 0xA69C443F ), // 7834691712342412468047070271 W3( 0x19DC9D08, 0x11CADC6A, 0x5BA8B123 ), // 8003830486242687653832601891 W3( 0x21D6D905, 0xB8BAC7C3, 0xC3841613 ), // 10472740308573592285123712531 W3( 0x27D73986, 0x6AF6BD27, 0x7A6D7909 ), // 12330106088710388189231937801 W3( 0x20D4698B, 0x0039D457, 0xA092AECF ), // 10160311000635748689099534031 W3( 0x049BD1C4, 0xA94F001A, 0xFA76E358 ), // 1426314143682376031341568856 W3( 0x26DD7228, 0x09400257, 0x9BB49CB9 ), // 12028142067661291067236719801 W3( 0x12DAA9AD, 0xAF9435A9, 0xD50FF483 ), // 5835077289334326375656453251 W3( 0x0B7CDA03, 0x9418702E, 0x7CD934CA ), // 3555271451571910239441204426 W3( 0x2D272FCF, 0xB8644522, 0x68EAD40B ), // 13974199331913037576372147211 W3( 0x00EDA06E, 0x0114DA26, 0xE8D84BA9 ), // 287273027105701319912475561 W3( 0x2219C2C4, 0xFD3145C6, 0xDD019359 ), // 10553633252320053510122083161 W3( 0x1764F007, 0x4F5D5FD4, 0xDAB10AFC ), // 7240181310654329198595869436 W3( 0x01AA13EE, 0x2D1CD906, 0x11D5B1EB ), // 515096517694807745704079851 W3( 0x27038944, 0x5A37BAAD, 0x5CECA64C ), // 12074190385578921562318087756 W3( 0x2459CF22, 0xF625FD38, 0xADB48511 ), // 11250032926302238120667809041 W3( 0x25B6C6A8, 0xD684063F, 0x7ABAD1EF ), // 11671908005633729316324561391 W3( 0x1C1A2BC6, 0x12B253F1, 0x0D1BBCB7 ), // 8697219061868963805380983991 W3( 0x198F3FE2, 0x5EE9919F, 0x535E80D5 } // 7910303322630257758732976341 }; // Sadly, this p doesn't work because we don't find a (2^n)th root of unity w // such that w^(2^(n-1)) = -1 mod p. However, our algorithm below assumes // that w^(2^(n-1)) = -1... #else // p = 34662321099990647697175478273, a prime static const fftp_word p = W3( 7L<<28, 0, 1 ); // p = 7 * 2^92 + 1 #define FFT_P_92 static const fftp_word fftp_roots_of_1 [92+1] = // roots_of_1[n] is a (2^n)th root of unity in Z/pZ. // (Also roots_of_1[n-1] = roots_of_1[n]^2, but we don't need this.) { W3( 0x00000000, 0x00000000, 0x00000001 ), // 1 W3( 0x70000000, 0x00000000, 0x00000000 ), // 34662321099990647697175478272 W3( 0x064AF70F, 0x997E62CE, 0x77953100 ), // 1947537281862369253065568512 W3( 0x261B8E96, 0xC3AD4296, 0xDA1BFA93 ), // 11793744727492885369350519443 W3( 0x096EA949, 0x6EDCAF05, 0x47C92A4F ), // 2919146363086089454841571919 W3( 0x366A8C3F, 0x7BF1436D, 0x2333BE9E ), // 16840998969615256469762195102 W3( 0x27569FA8, 0xAE1775F1, 0xB21956A0 ), // 12174636971387721414084220576 W3( 0x16CABB8B, 0xBAA59813, 0x62FCBCD9 ), // 7053758891710792545762852057 W3( 0x1AE130A3, 0xF909B101, 0xB6BA30CF ), // 8318848263123793919933558991 W3( 0x32AE8FEE, 0x6B1A656B, 0xED02BF24 ), // 15685283280129931240441823012 W3( 0x2D1EE047, 0x5AEDC882, 0x8E96BCCC ), // 13964152342912072497719852236 W3( 0x222A18FD, 0x3BF40635, 0xBFDEA8AD ), // 10573383226491471052459124909 W3( 0x10534EE6, 0xED5A55D4, 0x06AE2155 ), // 5052473604609413010647032149 W3( 0x02F3BFA3, 0x2D816786, 0xE6C27B3C ), // 913643975905572976593107772 W3( 0x0B0CD0A5, 0x9A1FF4F7, 0x2624A5E1 ), // 3419827524917244902802499041 W3( 0x257A492F, 0x156C141C, 0xFC5D75F4 ), // 11598779914676604137587439092 W3( 0x061FB92A, 0xB1A1F41A, 0x7006920F ), // 1895261184698485907279745551 W3( 0x2A4E1471, 0xDDB96073, 0xD8DDBB71 ), // 13092763174215078887900953457 W3( 0x213B469E, 0xD72A84CA, 0xAAA477F2 ), // 10284665443205365583657072626 W3( 0x1D7EF67C, 0x3DC2DA37, 0x4C86E9DC ), // 9128553932091860654576036316 W3( 0x0CB7AA67, 0x2E087ED8, 0x2675D6E3 ), // 3935858248479385987820410595 W3( 0x00BD7B24, 0x68388052, 0x57FFFB10 ), // 229068502577238003716979472 W3( 0x1E1724A6, 0xBA587C3D, 0x0C12825B ), // 9312528669272006966417457755 W3( 0x20595EF0, 0xC89DA33B, 0x3CB5583B ), // 10011563056352601486430394427 W3( 0x15E730B2, 0x6D34E9EB, 0x71CCE555 ), // 6778677035560020292206912853 W3( 0x015EFDBB, 0xC0A80C3B, 0xE4B1E017 ), // 424322259008787317821399063 W3( 0x1B81FC63, 0x0C694944, 0x8EB481BF ), // 8513238559382277026756198847 W3( 0x1AF53421, 0x5DCAA1A4, 0xD0C15A03 ), // 8343043259718611508685527555 W3( 0x2F2B6B58, 0xBB60E464, 0x37A7DE2E ), // 14598286201875835624993840686 W3( 0x27B4AB13, 0x54617640, 0xE86E757A ), // 12288329911800070034603013498 W3( 0x041A31D2, 0xF0AC8E3C, 0x8AA4FD27 ), // 1269607397711669380834983207 W3( 0x1A52F484, 0x39AC5917, 0x34E3F1F7 ), // 8146896869111203814625767927 W3( 0x048FC120, 0x50F6ECBF, 0x268D86A8 ), // 1411728444351387120148776616 W3( 0x27A2C427, 0x001F1239, 0x93380047 ), // 12266687669072434694473646151 W3( 0x2E7E8DFB, 0x2411A754, 0xE12A9B1D ), // 14389305591459206001391737629 W3( 0x29F14702, 0x40B3E1E2, 0xF7D71A8D ), // 12980571854778363745245010573 W3( 0x3158DCE7, 0x8B8FEB32, 0x1DE35D24 ), // 15272194145252623177165790500 W3( 0x12484C07, 0x437ED373, 0x9E45F602 ), // 5658131869639928287764805122 W3( 0x1AEAE06E, 0xB905C908, 0x4389BF5F ), // 8330558749711089231534341983 W3( 0x27BC0045, 0x43024FEB, 0xEC880258 ), // 12297194714773858676269122136 W3( 0x2EFE1CBC, 0x0D2FAA94, 0xB4EA69A6 ), // 14543513305163560781242591654 W3( 0x0B0D3D8B, 0xD779F105, 0x920367FA ), // 3420341787669373425792804858 W3( 0x2D4D7BA9, 0x0970D8CF, 0x8CE6D7EC ), // 14020496699328277892009744364 W3( 0x00DC5971, 0x0209470E, 0x713F2B27 ), // 266386055561000736260041511 W3( 0x27E54E26, 0x53BA0137, 0xDD6740B3 ), // 12347128447319282384829366451 W3( 0x2143A889, 0x8F2B57F5, 0xFB8181C1 ), // 10294799249108063706647986625 W3( 0x1125419F, 0x5C4E0608, 0xE0AC0396 ), // 5306285315793562029414679446 W3( 0x15B61D90, 0x63A27BB0, 0x26402B32 ), // 6719349317556695539371748146 W3( 0x03B582FC, 0x419EF656, 0xB06BBC35 ), // 1147889163765050226454019125 W3( 0x08FF62E1, 0xA3BB1145, 0xDA998F77 ), // 2784623116803271439773437815 W3( 0x101978AF, 0xF93CBFA1, 0xB788B5A3 ), // 4982553232749484200897852835 W3( 0x061334DE, 0x8FE5C6E9, 0x2B2309D6 ), // 1880129318103954373583505878 W3( 0x343C6E7C, 0x8019BB43, 0xD954E744 ), // 16166277816826816936484857668 W3( 0x06506A03, 0x0E6DE333, 0xF8011494 ), // 1954124751724394051182597268 W3( 0x34892A42, 0x6502DAA3, 0x8FDA6971 ), // 16259042912153157504364865905 W3( 0x0EF2C4BD, 0xF42D9711, 0xC32CEA49 ), // 4626279273705729025744104009 W3( 0x24511305, 0x4F1EAE2C, 0x62FB10F4 ), // 11239473167855288013010178292 W3( 0x14E5A052, 0xF1748A9C, 0xDD536730 ), // 6467301317787608309692589872 W3( 0x0621D0A7, 0x0A5188AF, 0x7316C352 ), // 1897789944553576071437927250 W3( 0x234498F0, 0xDF078E95, 0x6FEED50B ), // 10914904542475816633386325259 W3( 0x029E4925, 0x948D6D57, 0xD4DF93A6 ), // 810325725128913871737688998 W3( 0x11BB3805, 0x0589D746, 0x852F3E2F ), // 5487578840386649632552205871 W3( 0x1D4370CA, 0xA4441B85, 0xC9606FE0 ), // 9056595957858187419376971744 W3( 0x1C536F7D, 0x77D44926, 0x8DDB8932 ), // 8766447615182890705620797746 W3( 0x3498CE71, 0xB726A4D3, 0xF4F3C813 ), // 16277952140466335672647796755 W3( 0x1E4A297E, 0xAC13196E, 0xFACD8102 ), // 9374206759006667727054930178 W3( 0x0E7C2CCC, 0xC940C98B, 0x0BC0CA49 ), // 4482908500893894680116251209 W3( 0x124CF912, 0xD84438FD, 0x9C03585F ), // 5663784755954194195257972831 W3( 0x06180FF8, 0xD447BEBE, 0xDB8821E7 ), // 1885999704184999223512015335 W3( 0x1ED2EB11, 0x0687EC7C, 0xBE3436C8 ), // 9539534786948152514714023624 W3( 0x30EBB35C, 0x59616A3C, 0x502CBB52 ), // 15140225046175435352009653074 W3( 0x33E24883, 0xEDA36D60, 0xA25C8E5F ), // 16057295180155395438855097951 W3( 0x0D879ED9, 0x076BAB06, 0x9BE12AA2 ), // 4187260250707927256570866338 W3( 0x1A1B6C9C, 0x0966383B, 0x54123A87 ), // 8079764146434082816365050503 W3( 0x31BD863A, 0xA2A6505C, 0xD759E6CF ), // 15393886339893077529104869071 W3( 0x3209AF0A, 0x5E5055A1, 0x480AF03F ), // 15485957428841754012708171839 W3( 0x1A4CC03C, 0xC8AA650B, 0x7F4DBCE9 ), // 8139396433274519652257348841 W3( 0x3596471F, 0xB99D2EA3, 0xA3433E0C ), // 16584380266717730797139475980 W3( 0x28E87642, 0x98E21FCE, 0xDE1B53EA ), // 12660429650750886812340409322 W3( 0x20161DB9, 0xCDC199E9, 0x0A6BEDF2 ), // 9930257058416521571476434418 W3( 0x1D0DC095, 0x2C40D22B, 0x088549BA ), // 8991690766592354745340742074 W3( 0x2FCC953C, 0xA8B62408, 0x50FC4C29 ), // 14793121080372138443684989993 W3( 0x0F854B39, 0xF659B4B5, 0xD2B0A6AC ), // 4803417528030967235217499820 W3( 0x30E087D4, 0x02F3BBAB, 0xBA503373 ), // 15126721285415891216108630899 W3( 0x0DAF660C, 0x26B99C42, 0x98B8BE05 ), // 4235349051642660841298902533 W3( 0x0ED6AE0E, 0xCD02982A, 0xD233F0D9 ), // 4592322227691334993146278105 W3( 0x3415EB9B, 0x4B61C19F, 0xB21F1255 ), // 16119720573722492095181034069 W3( 0x1015A729, 0x20A1FAA2, 0x0D094529 ), // 4977936993224010619482096937 W3( 0x1D2E3AD2, 0x7093579F, 0x1C93C97B ), // 9030953651705465548198627707 W3( 0x130EAA8F, 0x859C980F, 0xD9E7E8ED ), // 5897945597894388791627999469 W3( 0x2B7CA1C8, 0xFC34C5B5, 0x9C0B1C0C ), // 13458526232475976507763399692 W3( 0x22367055, 0xA53B526A, 0x7505EABE ), // 10588302813110450634719881918 W3( 0x344FEF55, 0x0B77067F, 0x38999E77 ) // 16189855864848287589134343799 }; #endif // Define this if you want the external loops instead of inline operations. #define FFTP_EXTERNAL_LOOPS // Define this for (cheap) consistency checks. //#define DEBUG_FFTP // Define this for extensive consistency checks. //#define DEBUG_FFTP_OPERATIONS // Define the algorithm of the backward FFT: // Either FORWARD (a normal FFT followed by a permutation) // or RECIPROOT (an FFT with reciprocal root of unity) // or CLEVER (an FFT with reciprocal root of unity but clever computation // of the reciprocals). // Drawback of FORWARD: the permutation pass. // Drawback of RECIPROOT: need all the powers of the root, not only half of them. #define FORWARD 42 #define RECIPROOT 43 #define CLEVER 44 #define FFTP_BACKWARD CLEVER // r := a + b static inline void add (const fftp_word& a, const fftp_word& b, fftp_word& r) { #ifdef FFTP_EXTERNAL_LOOPS add_loop_lsp(arrayLSDptr(a._w,3),arrayLSDptr(b._w,3),arrayLSDptr(r._w,3),3); #else var uint32 tmp; tmp = a.w0 + b.w0; if (tmp >= a.w0) { // no carry r.w0 = tmp; tmp = a.w1 + b.w1; if (tmp >= a.w1) goto no_carry_1; else goto carry_1; } else { // carry r.w0 = tmp; tmp = a.w1 + b.w1 + 1; if (tmp > a.w1) goto no_carry_1; else goto carry_1; } if (1) { no_carry_1: // no carry r.w1 = tmp; tmp = a.w2 + b.w2; } else { carry_1: // carry r.w1 = tmp; tmp = a.w2 + b.w2 + 1; } r.w2 = tmp; #endif } // r := a - b static inline void sub (const fftp_word& a, const fftp_word& b, fftp_word& r) { #ifdef FFTP_EXTERNAL_LOOPS sub_loop_lsp(arrayLSDptr(a._w,3),arrayLSDptr(b._w,3),arrayLSDptr(r._w,3),3); #else var uint32 tmp; tmp = a.w0 - b.w0; if (tmp <= a.w0) { // no carry r.w0 = tmp; tmp = a.w1 - b.w1; if (tmp <= a.w1) goto no_carry_1; else goto carry_1; } else { // carry r.w0 = tmp; tmp = a.w1 - b.w1 - 1; if (tmp < a.w1) goto no_carry_1; else goto carry_1; } if (1) { no_carry_1: // no carry r.w1 = tmp; tmp = a.w2 - b.w2; } else { carry_1: // carry r.w1 = tmp; tmp = a.w2 - b.w2 - 1; } r.w2 = tmp; #endif } // b := a >> 1 static inline void shift (const fftp_word& a, fftp_word& b) { #ifdef FFTP_EXTERNAL_LOOPS #ifdef DEBUG_FFTP if (shiftrightcopy_loop_msp(arrayMSDptr(a._w,3),arrayMSDptr(b._w,3),3,1,0)) throw runtime_exception(); #else shiftrightcopy_loop_msp(arrayMSDptr(a._w,3),arrayMSDptr(b._w,3),3,1,0); #endif #else var uint32 tmp, carry; tmp = a.w2; b.w2 = a.w2 >> 1; carry = tmp << 31; tmp = a.w1; b.w1 = (tmp >> 1) | carry; carry = tmp << 31; tmp = a.w0; b.w0 = (tmp >> 1) | carry; #ifdef DEBUG_FFTP carry = tmp << 31; if (carry) throw runtime_exception(); #endif #endif } #ifdef DEBUG_FFTP_OPERATIONS #define check_fftp_word(x) if (compare_loop_msp(arrayMSDptr((x)._w,3),arrayMSDptr(p._w,3),3) >= 0) throw runtime_exception() #else #define check_fftp_word(x) #endif // r := (a + b) mod p static inline void addp (const fftp_word& a, const fftp_word& b, fftp_word& r) { check_fftp_word(a); check_fftp_word(b); #ifdef FFTP_EXTERNAL_LOOPS add(a,b, r); if (compare_loop_msp(arrayMSDptr(r._w,3),arrayMSDptr(p._w,3),3) >= 0) sub(r,p, r); #else add(a,b, r); if ((r.w2 > p.w2) || ((r.w2 == p.w2) && ((r.w1 > p.w1) || ((r.w1 == p.w1) && (r.w0 >= p.w0))))) sub(r,p, r); #endif check_fftp_word(r); } // r := (a - b) mod p static inline void subp (const fftp_word& a, const fftp_word& b, fftp_word& r) { check_fftp_word(a); check_fftp_word(b); sub(a,b, r); if ((sint32)r.w2 < 0) add(r,p, r); check_fftp_word(r); } // r := (a * b) mod p static void mulp (const fftp_word& a, const fftp_word& b, fftp_word& r) { check_fftp_word(a); check_fftp_word(b); #if defined(FFT_P_94) var uintD c[6]; var uintD* const cLSDptr = arrayLSDptr(c,6); // Multiply the two words, using the standard method. mulu_2loop(arrayLSDptr(a._w,3),3, arrayLSDptr(b._w,3),3, cLSDptr); // c[0..5] now contains the product. // Divide by p. // To divide c (0 <= c < p^2) by p = 2^n+1, // we set q := floor(c/2^n) and r := c - q*p = (c mod 2^n) - q. // If this becomes negative, set r := r + p (at most twice). // (This works because floor(c/p) <= q <= floor(c/p)+2.) // (Actually, here, 0 <= c <= (p-1)^2, hence // floor(c/p) <= q <= floor(c/p)+1, so we have // to set r := r + p at most once!) // n = 94 = 3*32-2 = 2*32+30. shiftleft_loop_lsp(cLSDptr lspop 3,3,2,lspref(cLSDptr,2)>>30); lspref(cLSDptr,2) &= bit(30)-1; // c[0..2] now contains q, c[3..5] contains (c mod 2^n). #if 0 if (compare_loop_msp(cLSDptr lspop 6,arrayMSDptr(p._w,3),3) >= 0) // q >= p ? subfrom_loop_lsp(arrayLSDptr(p._w,3),cLSDptr lspop 3,3); // q -= p; #endif if (subfrom_loop_lsp(cLSDptr lspop 3,cLSDptr,3)) // (c mod 2^n) - q addto_loop_lsp(arrayLSDptr(p._w,3),cLSDptr,3); r.w2 = lspref(cLSDptr,2); r.w1 = lspref(cLSDptr,1); r.w0 = lspref(cLSDptr,0); #elif defined(FFT_P_92) var uintD c[7]; var uintD* const cLSDptr = arrayLSDptr(c,7); // Multiply the two words, using the standard method. mulu_2loop(arrayLSDptr(a._w,3),3, arrayLSDptr(b._w,3),3, cLSDptr); // c[1..6] now contains the product. // Divide by p. // To divide c (0 <= c < p^2) by p = 7*2^n+1, // we set q := floor(floor(c/2^n)/7) and // r := c - q*p = (floor(c/2^n) mod 7)*2^n + (c mod 2^n) - q. // If this becomes negative, set r := r + p. // (As above, since 0 <= c <= (p-1)^2, we have // floor(c/p) <= q <= floor(c/p)+1, so we have // to set r := r + p at most once!) // n = 92 = 3*32-4 = 2*32+28. lspref(cLSDptr,6) = shiftleft_loop_lsp(cLSDptr lspop 3,3,4,lspref(cLSDptr,2)>>28); lspref(cLSDptr,2) &= bit(28)-1; // c[0..3] now contains floor(c/2^n), c[4..6] contains (c mod 2^n). var uintD remainder = divu_loop_msp(7,cLSDptr lspop 7,4); lspref(cLSDptr,2) |= remainder << 28; // c[0..3] now contains q, c[4..6] contains (c mod 7*2^n). #ifdef DEBUG_FFTP if (lspref(cLSDptr,6) > 0) throw runtime_exception(); #endif #if 0 if (compare_loop_msp(cLSDptr lspop 6,arrayMSDptr(p._w,3),3) >= 0) // q >= p ? subfrom_loop_lsp(arrayLSDptr(p._w,3),cLSDptr lspop 3,3); // q -= p; #endif if (subfrom_loop_lsp(cLSDptr lspop 3,cLSDptr,3)) // (c mod 2^n) - q addto_loop_lsp(arrayLSDptr(p._w,3),cLSDptr,3); r.w2 = lspref(cLSDptr,2); r.w1 = lspref(cLSDptr,1); r.w0 = lspref(cLSDptr,0); #else #error "mulp not implemented for this prime" #endif if ((sint32)r.w2 < 0) throw runtime_exception(); check_fftp_word(r); } #ifdef DEBUG_FFTP_OPERATIONS static void mulp_doublecheck (const fftp_word& a, const fftp_word& b, fftp_word& r) { fftp_word zero, ma, mb, or; subp(a,a, zero); subp(zero,a, ma); subp(zero,b, mb); mulp(ma,mb, or); mulp(a,b, r); if (compare_loop_msp(arrayMSDptr(r._w,3),arrayMSDptr(or._w,3),3)) throw runtime_exception(); } #define mulp mulp_doublecheck #endif /* DEBUG_FFTP_OPERATIONS */ // b := (a / 2) mod p static inline void shiftp (const fftp_word& a, fftp_word& b) { check_fftp_word(a); if (a.w0 & 1) { var fftp_word a_even; add(a,p, a_even); shift(a_even, b); } else shift(a, b); check_fftp_word(b); } #ifndef _BIT_REVERSE #define _BIT_REVERSE // Reverse an n-bit number x. n>0. static uintC bit_reverse (uintL n, uintC x) { var uintC y = 0; do { y <<= 1; y |= (x & 1); x >>= 1; } while (!(--n == 0)); return y; } #endif // Compute an convolution mod p using FFT: z[0..N-1] := x[0..N-1] * y[0..N-1]. static void fftp_convolution (const uintL n, const uintC N, // N = 2^n fftp_word * x, // N words fftp_word * y, // N words fftp_word * z // N words result ) { CL_ALLOCA_STACK; #if (FFTP_BACKWARD == RECIPROOT) || defined(DEBUG_FFTP) var fftp_word* const w = cl_alloc_array(fftp_word,N); #else var fftp_word* const w = cl_alloc_array(fftp_word,(N>>1)+1); #endif var uintC i; // Initialize w[i] to w^i, w a primitive N-th root of unity. w[0] = fftp_roots_of_1[0]; w[1] = fftp_roots_of_1[n]; #if (FFTP_BACKWARD == RECIPROOT) || defined(DEBUG_FFTP) for (i = 2; i < N; i++) mulp(w[i-1],fftp_roots_of_1[n], w[i]); #else // need only half of the roots for (i = 2; i < N>>1; i++) mulp(w[i-1],fftp_roots_of_1[n], w[i]); #endif #ifdef DEBUG_FFTP // Check that w is really a primitive N-th root of unity. { var fftp_word w_N; mulp(w[N-1],fftp_roots_of_1[n], w_N); if (!(w_N.w2 == 0 && w_N.w1 == 0 && w_N.w0 == 1)) throw runtime_exception(); w_N = w[N>>1]; if (!(w_N.w2 == p.w2 && w_N.w1 == p.w1 && w_N.w0 == p.w0 - 1)) throw runtime_exception(); } #endif var bool squaring = (x == y); // Do an FFT of length N on x. { var sintL l; /* l = n-1 */ { var const uintC tmax = N>>1; // tmax = 2^(n-1) for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // Butterfly: replace (x(i1),x(i2)) by // (x(i1) + x(i2), x(i1) - x(i2)). var fftp_word tmp; tmp = x[i2]; subp(x[i1],tmp, x[i2]); addp(x[i1],tmp, x[i1]); } } for (l = n-2; l>=0; l--) { var const uintC smax = (uintC)1 << (n-1-l); var const uintC tmax = (uintC)1 << l; for (var uintC s = 0; s < smax; s++) { var uintC exp = bit_reverse(n-1-l,s) << l; for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Butterfly: replace (x(i1),x(i2)) by // (x(i1) + w^exp*x(i2), x(i1) - w^exp*x(i2)). var fftp_word tmp; mulp(x[i2],w[exp], tmp); subp(x[i1],tmp, x[i2]); addp(x[i1],tmp, x[i1]); } } } } // Do an FFT of length N on y. if (!squaring) { var sintL l; /* l = n-1 */ { var uintC const tmax = N>>1; // tmax = 2^(n-1) for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // Butterfly: replace (y(i1),y(i2)) by // (y(i1) + y(i2), y(i1) - y(i2)). var fftp_word tmp; tmp = y[i2]; subp(y[i1],tmp, y[i2]); addp(y[i1],tmp, y[i1]); } } for (l = n-2; l>=0; l--) { var const uintC smax = (uintC)1 << (n-1-l); var const uintC tmax = (uintC)1 << l; for (var uintC s = 0; s < smax; s++) { var uintC exp = bit_reverse(n-1-l,s) << l; for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Butterfly: replace (y(i1),y(i2)) by // (y(i1) + w^exp*y(i2), y(i1) - w^exp*y(i2)). var fftp_word tmp; mulp(y[i2],w[exp], tmp); subp(y[i1],tmp, y[i2]); addp(y[i1],tmp, y[i1]); } } } } // Multiply the transformed vectors into z. for (i = 0; i < N; i++) mulp(x[i],y[i], z[i]); // Undo an FFT of length N on z. { var uintL l; for (l = 0; l < n-1; l++) { var const uintC smax = (uintC)1 << (n-1-l); var const uintC tmax = (uintC)1 << l; #if FFTP_BACKWARD != CLEVER for (var uintC s = 0; s < smax; s++) { var uintC exp = bit_reverse(n-1-l,s) << l; #if FFTP_BACKWARD == RECIPROOT if (exp > 0) exp = N - exp; // negate exp (use w^-1 instead of w) #endif for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Inverse Butterfly: replace (z(i1),z(i2)) by // ((z(i1)+z(i2))/2, (z(i1)-z(i2))/(2*w^exp)). var fftp_word sum; var fftp_word diff; addp(z[i1],z[i2], sum); subp(z[i1],z[i2], diff); shiftp(sum, z[i1]); mulp(diff,w[exp], diff); shiftp(diff, z[i2]); } } #else // FFTP_BACKWARD == CLEVER: clever handling of negative exponents /* s = 0, exp = 0 */ { for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // Inverse Butterfly: replace (z(i1),z(i2)) by // ((z(i1)+z(i2))/2, (z(i1)-z(i2))/(2*w^exp)), // with exp <-- 0. var fftp_word sum; var fftp_word diff; addp(z[i1],z[i2], sum); subp(z[i1],z[i2], diff); shiftp(sum, z[i1]); shiftp(diff, z[i2]); } } for (var uintC s = 1; s < smax; s++) { var uintC exp = bit_reverse(n-1-l,s) << l; exp = (N>>1) - exp; // negate exp (use w^-1 instead of w) for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Inverse Butterfly: replace (z(i1),z(i2)) by // ((z(i1)+z(i2))/2, (z(i1)-z(i2))/(2*w^exp)), // with exp <-- (N/2 - exp). var fftp_word sum; var fftp_word diff; addp(z[i1],z[i2], sum); subp(z[i2],z[i1], diff); // note that w^(N/2) = -1 shiftp(sum, z[i1]); mulp(diff,w[exp], diff); shiftp(diff, z[i2]); } } #endif } /* l = n-1 */ { var const uintC tmax = N>>1; // tmax = 2^(n-1) for (var uintC t = 0; t < tmax; t++) { var uintC i1 = t; var uintC i2 = i1 + tmax; // Inverse Butterfly: replace (z(i1),z(i2)) by // ((z(i1)+z(i2))/2, (z(i1)-z(i2))/2). var fftp_word sum; var fftp_word diff; addp(z[i1],z[i2], sum); subp(z[i1],z[i2], diff); shiftp(sum, z[i1]); shiftp(diff, z[i2]); } } } #if FFTP_BACKWARD == FORWARD // Swap z[i] and z[N-i] for 0 < i < N/2. for (i = (N>>1)-1; i > 0; i--) { var fftp_word tmp = z[i]; z[i] = z[N-i]; z[N-i] = tmp; } #endif } static void mulu_fft_modp (const uintD* sourceptr1, uintC len1, const uintD* sourceptr2, uintC len2, uintD* destptr) // Es ist 2 <= len1 <= len2. { // Methode: // source1 ist ein Stück der Länge N1, source2 ein oder mehrere Stücke // der Länge N2, mit N1+N2 <= N, wobei N Zweierpotenz ist. // sum(i=0..N-1, x_i b^i) * sum(i=0..N-1, y_i b^i) wird errechnet, // indem man die beiden Polynome // sum(i=0..N-1, x_i T^i), sum(i=0..N-1, y_i T^i) // multipliziert, und zwar durch Fourier-Transformation (s.o.). var uint32 n; integerlengthC(len1-1, n=); // 2^(n-1) < len1 <= 2^n var uintC len = (uintC)1 << n; // kleinste Zweierpotenz >= len1 // Wählt man N = len, so hat man ceiling(len2/(len-len1+1)) * FFT(len). // Wählt man N = 2*len, so hat man ceiling(len2/(2*len-len1+1)) * FFT(2*len). // Wir wählen das billigere von beiden: // Bei ceiling(len2/(len-len1+1)) <= 2 * ceiling(len2/(2*len-len1+1)) // nimmt man N = len, bei ....... > ........ dagegen N = 2*len. // (Wahl von N = 4*len oder mehr bringt nur in Extremfällen etwas.) if (len2 > 2 * (len-len1+1) * (len2 <= (2*len-len1+1) ? 1 : ceiling(len2,(2*len-len1+1)))) { n = n+1; len = len << 1; } var const uintC N = len; // N = 2^n CL_ALLOCA_STACK; var fftp_word* const x = cl_alloc_array(fftp_word,N); var fftp_word* const y = cl_alloc_array(fftp_word,N); #ifdef DEBUG_FFTP var fftp_word* const z = cl_alloc_array(fftp_word,N); #else var fftp_word* const z = x; // put z in place of x - saves memory #endif var uintD* const tmpprod = cl_alloc_array(uintD,len1+1); var uintP i; var uintC destlen = len1+len2; clear_loop_lsp(destptr,destlen); do { var uintC len2p; // length of a piece of source2 len2p = N - len1 + 1; if (len2p > len2) len2p = len2; // len2p = min(N-len1+1,len2). if (len2p == 1) { // cheap case var uintD* tmpptr = arrayLSDptr(tmpprod,len1+1); mulu_loop_lsp(lspref(sourceptr2,0),sourceptr1,tmpptr,len1); if (addto_loop_lsp(tmpptr,destptr,len1+1)) if (inc_loop_lsp(destptr lspop (len1+1),destlen-(len1+1))) throw runtime_exception(); } else { var uintC destlenp = len1 + len2p - 1; // destlenp = min(N,destlen-1). var bool squaring = ((sourceptr1 == sourceptr2) && (len1 == len2p)); // Fill factor x. { for (i = 0; i < len1; i++) { x[i].w0 = lspref(sourceptr1,i); x[i].w1 = 0; x[i].w2 = 0; } for (i = len1; i < N; i++) { x[i].w0 = 0; x[i].w1 = 0; x[i].w2 = 0; } } // Fill factor y. if (!squaring) { for (i = 0; i < len2p; i++) { y[i].w0 = lspref(sourceptr2,i); y[i].w1 = 0; y[i].w2 = 0; } for (i = len2p; i < N; i++) { y[i].w0 = 0; y[i].w1 = 0; y[i].w2 = 0; } } // Multiply. if (!squaring) fftp_convolution(n,N, &x[0], &y[0], &z[0]); else fftp_convolution(n,N, &x[0], &x[0], &z[0]); #ifdef DEBUG_FFTP // Check result. for (i = 0; i < N; i++) if (!(z[i].w2 < N)) throw runtime_exception(); #endif // Add result to destptr[-destlen..-1]: { var uintD* ptr = destptr; // ac2|ac1|ac0 are an accumulator. var uint32 ac0 = 0; var uint32 ac1 = 0; var uint32 ac2 = 0; var uint32 tmp; for (i = 0; i < destlenp; i++) { // Add z[i] to the accumulator. tmp = z[i].w0; if ((ac0 += tmp) < tmp) { if (++ac1 == 0) ++ac2; } tmp = z[i].w1; if ((ac1 += tmp) < tmp) ++ac2; tmp = z[i].w2; ac2 += tmp; // Add the accumulator's least significant word to destptr: tmp = lspref(ptr,0); if ((ac0 += tmp) < tmp) { if (++ac1 == 0) ++ac2; } lspref(ptr,0) = ac0; lsshrink(ptr); ac0 = ac1; ac1 = ac2; ac2 = 0; } // ac2 = 0. if (ac1 > 0) { if (!((i += 2) <= destlen)) throw runtime_exception(); tmp = lspref(ptr,0); if ((ac0 += tmp) < tmp) ++ac1; lspref(ptr,0) = ac0; lsshrink(ptr); tmp = lspref(ptr,0); ac1 += tmp; lspref(ptr,0) = ac1; lsshrink(ptr); if (ac1 < tmp) if (inc_loop_lsp(ptr,destlen-i)) throw runtime_exception(); } else if (ac0 > 0) { if (!((i += 1) <= destlen)) throw runtime_exception(); tmp = lspref(ptr,0); ac0 += tmp; lspref(ptr,0) = ac0; lsshrink(ptr); if (ac0 < tmp) if (inc_loop_lsp(ptr,destlen-i)) throw runtime_exception(); } } #ifdef DEBUG_FFTP // If destlenp < N, check that the remaining z[i] are 0. for (i = destlenp; i < N; i++) if (z[i].w2 > 0 || z[i].w1 > 0 || z[i].w0 > 0) throw runtime_exception(); #endif } // Decrement len2. destptr = destptr lspop len2p; destlen -= len2p; sourceptr2 = sourceptr2 lspop len2p; len2 -= len2p; } while (len2 > 0); } #undef FFT_P_94 #undef FFT_P_92 #undef w0 #undef w1 #undef w2 #undef W3 cln-1.3.3/src/base/digitseq/cl_asm_sparc.h0000644000000000000000000000032611201634736015275 0ustar // List the contents of cl_asm_sparc.cc. #define COPY_LOOPS #define FILL_LOOPS #define CLEAR_LOOPS #define LOG_LOOPS #define TEST_LOOPS #define ADDSUB_LOOPS #define SHIFT_LOOPS #define MUL_LOOPS #define DIV_LOOPS cln-1.3.3/src/base/digitseq/cl_DS_mul_nuss.h0000644000000000000000000011113211201634736015556 0ustar // Fast integer multiplication using Nussbaumer's FFT based algorithm. // [Donald Ervin Knuth: The Art of Computer Programming, Vol. II: // Seminumerical Algorithms, second edition. // Section 4.6.4, exercise 59, p. 503, 652-654.] // [Henri Jean Nussbaumer, IEEE Trans. ASSP-28 (1980), 205-215.] // Bruno Haible 4.-5.5.1996 // This algorithm has the benefit of working on entire words, not single bits, // and involving no non-integer numbers. (The root of unity is chosen in // an appropriate polynomial ring.) // If at the beginning all words x_i, y_i are >= 0 and < M, then // the intermediate X_{i,j}, Y_{i,j} are < M * N in absolute value // (where N = number of words), hence the |Z_{i,j}| < M^2 * N^2. // We therefore reserve 2 32-bit words for every X_{i,j} and 4 32-bit words // for every Z_{i,j}. #if !(intDsize==32) #error "nussbaumer implemented only for intDsize==32" #endif // Define this if you want the external loops instead of inline operations. //#define NUSS_IN_EXTERNAL_LOOPS #define NUSS_OUT_EXTERNAL_LOOPS // Define this if you want inline operations which access the stack directly. // This looks like better code, but is in effect 3% slower. No idea why. //#define NUSS_ASM_DIRECT // Define this for (cheap) consistency checks. //#define DEBUG_NUSS // Define this for extensive consistency checks. //#define DEBUG_NUSS_OPERATIONS #if (intDsize==32) //typedef struct { sint32 iw1; uint32 iw0; } nuss_inword; //typedef struct { uint32 iw0; sint32 iw1; } nuss_inword; typedef struct { uintD _iw[2]; } nuss_inword; #if CL_DS_BIG_ENDIAN_P #define iw1 _iw[0] #define iw0 _iw[1] #else #define iw0 _iw[0] #define iw1 _iw[1] #endif //typedef struct { sint32 ow3; uint32 ow2; uint32 ow1; uint32 ow0; } nuss_outword; //typedef struct { uint32 ow0; uint32 ow1; uint32 ow2; sint32 ow3; } nuss_outword; typedef struct { uintD _ow[4]; } nuss_outword; #if CL_DS_BIG_ENDIAN_P #define ow3 _ow[0] #define ow2 _ow[1] #define ow1 _ow[2] #define ow0 _ow[3] #else #define ow0 _ow[0] #define ow1 _ow[1] #define ow2 _ow[2] #define ow3 _ow[3] #endif // r := a + b static inline void add (const nuss_inword& a, const nuss_inword& b, nuss_inword& r) { #if defined(__GNUC__) && defined(__i386__) var uintD dummy; #ifdef NUSS_ASM_DIRECT __asm__ __volatile__ ( "movl %1,%0" "\n\t" "addl %2,%0" "\n\t" "movl %0,%3" : "=&q" (dummy) : "m" (a.iw0), "m" (b.iw0), "m" (r.iw0) : "cc" ); __asm__ __volatile__ ( "movl %1,%0" "\n\t" "adcl %2,%0" "\n\t" "movl %0,%3" : "=&q" (dummy) : "m" (a.iw1), "m" (b.iw1), "m" (r.iw1) : "cc" ); #else #if CL_DS_BIG_ENDIAN_P __asm__ __volatile__ ( "movl 4(%1),%0" "\n\t" "addl 4(%2),%0" "\n\t" "movl %0,4(%3)" "\n\t" "movl (%1),%0" "\n\t" "adcl (%2),%0" "\n\t" "movl %0,(%3)" : "=&q" (dummy) : "r" (&a), "r" (&b), "r" (&r) : "cc" ); #else __asm__ __volatile__ ( "movl (%1),%0" "\n\t" "addl (%2),%0" "\n\t" "movl %0,(%3)" "\n\t" "movl 4(%1),%0" "\n\t" "adcl 4(%2),%0" "\n\t" "movl %0,4(%3)" : "=&q" (dummy) : "r" (&a), "r" (&b), "r" (&r) : "cc" ); #endif #endif #elif defined(NUSS_IN_EXTERNAL_LOOPS) add_loop_lsp(arrayLSDptr(a._iw,2),arrayLSDptr(b._iw,2),arrayLSDptr(r._iw,2),2); #else var uint32 tmp; tmp = a.iw0 + b.iw0; if (tmp >= a.iw0) { // no carry r.iw0 = tmp; r.iw1 = a.iw1 + b.iw1; } else { // carry r.iw0 = tmp; r.iw1 = a.iw1 + b.iw1 + 1; } #endif } // r := a - b static inline void sub (const nuss_inword& a, const nuss_inword& b, nuss_inword& r) { #if defined(__GNUC__) && defined(__i386__) var uintD dummy; #ifdef NUSS_ASM_DIRECT __asm__ __volatile__ ( "movl %1,%0" "\n\t" "subl %2,%0" "\n\t" "movl %0,%3" : "=&q" (dummy) : "m" (a.iw0), "m" (b.iw0), "m" (r.iw0) : "cc" ); __asm__ __volatile__ ( "movl %1,%0" "\n\t" "sbbl %2,%0" "\n\t" "movl %0,%3" : "=&q" (dummy) : "m" (a.iw1), "m" (b.iw1), "m" (r.iw1) : "cc" ); #else #if CL_DS_BIG_ENDIAN_P __asm__ __volatile__ ( "movl 4(%1),%0" "\n\t" "subl 4(%2),%0" "\n\t" "movl %0,4(%3)" "\n\t" "movl (%1),%0" "\n\t" "sbbl (%2),%0" "\n\t" "movl %0,(%3)" : "=&q" (dummy) : "r" (&a), "r" (&b), "r" (&r) : "cc" ); #else __asm__ __volatile__ ( "movl (%1),%0" "\n\t" "subl (%2),%0" "\n\t" "movl %0,(%3)" "\n\t" "movl 4(%1),%0" "\n\t" "sbbl 4(%2),%0" "\n\t" "movl %0,4(%3)" : "=&q" (dummy) : "r" (&a), "r" (&b), "r" (&r) : "cc" ); #endif #endif #elif defined(NUSS_IN_EXTERNAL_LOOPS) sub_loop_lsp(arrayLSDptr(a._iw,2),arrayLSDptr(b._iw,2),arrayLSDptr(r._iw,2),2); #else var uint32 tmp; tmp = a.iw0 - b.iw0; if (tmp <= a.iw0) { // no carry r.iw0 = tmp; r.iw1 = a.iw1 - b.iw1; } else { // carry r.iw0 = tmp; r.iw1 = a.iw1 - b.iw1 - 1; } #endif } // r := a * b static void mul (const nuss_inword& a, const nuss_inword& b, nuss_outword& r) { #ifdef NUSS_IN_EXTERNAL_LOOPS mulu_2loop(arrayLSDptr(a._iw,2),2, arrayLSDptr(b._iw,2),2, arrayLSDptr(r._ow,4)); if ((sintD)mspref(arrayMSDptr(a._iw,2),0) < 0) subfrom_loop_lsp(arrayLSDptr(b._iw,2),arrayLSDptr(r._ow,4) lspop 2,2); if ((sintD)mspref(arrayMSDptr(b._iw,2),0) < 0) subfrom_loop_lsp(arrayLSDptr(a._iw,2),arrayLSDptr(r._ow,4) lspop 2,2); #else if (a.iw1 == 0) { // a small positive if (b.iw1 == 0) { // a, b small positive mulu32(a.iw0, b.iw0, r.ow1 =, r.ow0 =); r.ow3 = 0; r.ow2 = 0; return; } else if (b.iw1 == -(uint32)1 && b.iw0 != 0) { // b small negative var uint32 hi, lo; mulu32(a.iw0, -b.iw0, hi=, lo=); r.ow0 = -lo; if (lo) { r.ow1 = ~hi; } else if (hi) { r.ow1 = -hi; } else /* a.iw0 == 0 */ { r.ow3 = 0; r.ow2 = 0; r.ow1 = 0; return; } r.ow3 = -(uint32)1; r.ow2 = -(uint32)1; return; } var uint32 hi1, lo1, hi0; mulu32(a.iw0, b.iw0, hi0 =, r.ow0 =); mulu32(a.iw0, b.iw1, hi1 =, lo1 =); if ((lo1 += hi0) < hi0) hi1++; // hi1|lo1|r.ow0 = a.iw0 * b(unsigned). r.ow1 = lo1; if ((sint32)b.iw1 >= 0) { r.ow2 = hi1; r.ow3 = 0; } else { // b was negative -> subtract a * 2^64 if (a.iw0) { r.ow2 = hi1 - a.iw0; r.ow3 = -(uint32)1; } else /* a.iw0 == 0 */ { r.ow3 = 0; r.ow2 = 0; } } return; } else if (a.iw1 == -(uint32)1 && a.iw0 != 0) { // a small negative if (b.iw1 == 0) { // b small positive var uint32 hi, lo; mulu32(-a.iw0, b.iw0, hi=, lo=); r.ow0 = -lo; if (lo) { r.ow1 = ~hi; } else if (hi) { r.ow1 = -hi; } else /* b.iw0 == 0 */ { r.ow3 = 0; r.ow2 = 0; r.ow1 = 0; return; } r.ow3 = -(uint32)1; r.ow2 = -(uint32)1; return; } else if (b.iw1 == -(uint32)1 && b.iw0 != 0) { // a, b small negative mulu32(-a.iw0, -b.iw0, r.ow1 =, r.ow0 =); r.ow3 = 0; r.ow2 = 0; return; } var uint32 hi1, lo1, hi0, lo0; mulu32(-a.iw0, b.iw0, hi0 =, lo0 =); mulu32(-a.iw0, b.iw1, hi1 =, lo1 =); if ((lo1 += hi0) < hi0) hi1++; // hi1|lo1|lo0 = -a * b(unsigned). if (lo0) { lo0 = -lo0; lo1 = ~lo1; hi1 = ~hi1; } else if (lo1) { lo1 = -lo1; hi1 = ~hi1; } else hi1 = -hi1; // hi1|lo1|lo0 = a * b(unsigned). r.ow0 = lo0; r.ow1 = lo1; if ((sint32)b.iw1 >= 0) { r.ow2 = hi1; r.ow3 = -(uint32)1; } else { // b was negative -> subtract a * 2^64 r.ow2 = hi1 - a.iw0; r.ow3 = 0; } return; } else if (b.iw1 == 0) { // b small positive var uint32 hi1, lo1, hi0; mulu32(b.iw0, a.iw0, hi0 =, r.ow0 =); mulu32(b.iw0, a.iw1, hi1 =, lo1 =); if ((lo1 += hi0) < hi0) hi1++; // hi1|lo1|r.ow0 = a(unsigned) * b.iw0. r.ow1 = lo1; if ((sint32)a.iw1 >= 0) { r.ow2 = hi1; r.ow3 = 0; } else { // a was negative -> subtract b * 2^64 if (b.iw0) { r.ow2 = hi1 - b.iw0; r.ow3 = -(uint32)1; } else /* b.iw0 == 0 */ { r.ow3 = 0; r.ow2 = 0; } } return; } else if (b.iw1 == -(uint32)1 && b.iw0 != 0) { // b small negative var uint32 hi1, lo1, hi0, lo0; mulu32(-b.iw0, a.iw0, hi0 =, lo0 =); mulu32(-b.iw0, a.iw1, hi1 =, lo1 =); if ((lo1 += hi0) < hi0) hi1++; // hi1|lo1|lo0 = a(unsigned) * -b. if (lo0) { lo0 = -lo0; lo1 = ~lo1; hi1 = ~hi1; } else if (lo1) { lo1 = -lo1; hi1 = ~hi1; } else hi1 = -hi1; // hi1|lo1|lo0 = a(unsigned) * b. r.ow0 = lo0; r.ow1 = lo1; if ((sint32)a.iw1 >= 0) { r.ow2 = hi1; r.ow3 = -(uint32)1; } else { // a was negative -> subtract b * 2^64 r.ow2 = hi1 - b.iw0; r.ow3 = 0; } return; } // This is the main and most frequent case (65% to 80%). var uint32 w3, w2, w1, hi, lo; mulu32(a.iw0, b.iw0, w1=, r.ow0=); mulu32(a.iw1, b.iw1, w3=, w2=); mulu32(a.iw0, b.iw1, hi=, lo=); if ((w1 += lo) < lo) hi++; if ((w2 += hi) < hi) w3++; mulu32(a.iw1, b.iw0, hi=, lo=); if ((w1 += lo) < lo) hi++; if ((w2 += hi) < hi) w3++; // w3|w2|w1|r.ow0 = a(unsigned) * b(unsigned). r.ow1 = w1; if ((sint32)a.iw1 < 0) { // a was negative -> subtract b * 2^64 if (w2 >= b.iw0) { w2 -= b.iw0; w3 -= b.iw1; } else { // carry w2 -= b.iw0; w3 = w3 - b.iw1 - 1; } } if ((sint32)b.iw1 < 0) { // b was negative -> subtract a * 2^64 if (w2 >= a.iw0) { w2 -= a.iw0; w3 -= a.iw1; } else { // carry w2 -= a.iw0; w3 = w3 - a.iw1 - 1; } } r.ow2 = w2; r.ow3 = w3; return; #endif } #ifdef DEBUG_NUSS_OPERATIONS static void mul_doublecheck (const nuss_inword& a, const nuss_inword& b, nuss_outword& r) { nuss_outword or; mulu_2loop(arrayLSDptr(a._iw,2),2, arrayLSDptr(b._iw,2),2, arrayLSDptr(or._ow,4)); if ((sintD)mspref(arrayMSDptr(a._iw,2),0) < 0) subfrom_loop_lsp(arrayLSDptr(b._iw,2),arrayLSDptr(or._ow,4) lspop 2,2); if ((sintD)mspref(arrayMSDptr(b._iw,2),0) < 0) subfrom_loop_lsp(arrayLSDptr(a._iw,2),arrayLSDptr(or._ow,4) lspop 2,2); mul(a,b, r); if (compare_loop_msp(arrayMSDptr(r._ow,4),arrayMSDptr(or._ow,4),4)) throw runtime_exception(); } #define mul mul_doublecheck #endif // r := 0 static inline void zero (nuss_outword& r) { r.ow0 = 0; r.ow1 = 0; r.ow2 = 0; r.ow3 = 0; } // r := a + b static inline void add (const nuss_outword& a, const nuss_outword& b, nuss_outword& r) { #if defined(__GNUC__) && defined(__i386__) var uintD dummy; #ifdef NUSS_ASM_DIRECT __asm__ __volatile__ ( "movl %1,%0" "\n\t" "addl %2,%0" "\n\t" "movl %0,%3" : "=&q" (dummy) : "m" (a.ow0), "m" (b.ow0), "m" (r.ow0) : "cc" ); __asm__ __volatile__ ( "movl %1,%0" "\n\t" "adcl %2,%0" "\n\t" "movl %0,%3" : "=&q" (dummy) : "m" (a.ow1), "m" (b.ow1), "m" (r.ow1) : "cc" ); __asm__ __volatile__ ( "movl %1,%0" "\n\t" "adcl %2,%0" "\n\t" "movl %0,%3" : "=&q" (dummy) : "m" (a.ow2), "m" (b.ow2), "m" (r.ow2) : "cc" ); __asm__ __volatile__ ( "movl %1,%0" "\n\t" "adcl %2,%0" "\n\t" "movl %0,%3" : "=&q" (dummy) : "m" (a.ow3), "m" (b.ow3), "m" (r.ow3) : "cc" ); #else #if CL_DS_BIG_ENDIAN_P __asm__ __volatile__ ( "movl 12(%1),%0" "\n\t" "addl 12(%2),%0" "\n\t" "movl %0,12(%3)" "\n\t" "movl 8(%1),%0" "\n\t" "adcl 8(%2),%0" "\n\t" "movl %0,8(%3)" "\n\t" "movl 4(%1),%0" "\n\t" "adcl 4(%2),%0" "\n\t" "movl %0,4(%3)" "\n\t" "movl (%1),%0" "\n\t" "adcl (%2),%0" "\n\t" "movl %0,(%3)" : "=&q" (dummy) : "r" (&a), "r" (&b), "r" (&r) : "cc" ); #else __asm__ __volatile__ ( "movl (%1),%0" "\n\t" "addl (%2),%0" "\n\t" "movl %0,(%3)" "\n\t" "movl 4(%1),%0" "\n\t" "adcl 4(%2),%0" "\n\t" "movl %0,4(%3)" "\n\t" "movl 8(%1),%0" "\n\t" "adcl 8(%2),%0" "\n\t" "movl %0,8(%3)" "\n\t" "movl 12(%1),%0" "\n\t" "adcl 12(%2),%0" "\n\t" "movl %0,12(%3)" : "=&q" (dummy) : "r" (&a), "r" (&b), "r" (&r) : "cc" ); #endif #endif #elif defined(NUSS_OUT_EXTERNAL_LOOPS) add_loop_lsp(arrayLSDptr(a._ow,4),arrayLSDptr(b._ow,4),arrayLSDptr(r._ow,4),4); #else var uint32 tmp; tmp = a.ow0 + b.ow0; if (tmp >= a.ow0) { // no carry r.ow0 = tmp; tmp = a.ow1 + b.ow1; if (tmp >= a.ow1) goto no_carry_1; else goto carry_1; } else { // carry r.ow0 = tmp; tmp = a.ow1 + b.ow1 + 1; if (tmp > a.ow1) goto no_carry_1; else goto carry_1; } if (1) { no_carry_1: // no carry r.ow1 = tmp; tmp = a.ow2 + b.ow2; if (tmp >= a.ow2) goto no_carry_2; else goto carry_2; } else { carry_1: // carry r.ow1 = tmp; tmp = a.ow2 + b.ow2 + 1; if (tmp > a.ow2) goto no_carry_2; else goto carry_2; } if (1) { no_carry_2: // no carry r.ow2 = tmp; tmp = a.ow3 + b.ow3; } else { carry_2: // carry r.ow2 = tmp; tmp = a.ow3 + b.ow3 + 1; } r.ow3 = tmp; #endif } // r := a - b static inline void sub (const nuss_outword& a, const nuss_outword& b, nuss_outword& r) { #if defined(__GNUC__) && defined(__i386__) var uintD dummy; #ifdef NUSS_ASM_DIRECT __asm__ __volatile__ ( "movl %1,%0" "\n\t" "subl %2,%0" "\n\t" "movl %0,%3" : "=&q" (dummy) : "m" (a.ow0), "m" (b.ow0), "m" (r.ow0) : "cc" ); __asm__ __volatile__ ( "movl %1,%0" "\n\t" "sbbl %2,%0" "\n\t" "movl %0,%3" : "=&q" (dummy) : "m" (a.ow1), "m" (b.ow1), "m" (r.ow1) : "cc" ); __asm__ __volatile__ ( "movl %1,%0" "\n\t" "sbbl %2,%0" "\n\t" "movl %0,%3" : "=&q" (dummy) : "m" (a.ow2), "m" (b.ow2), "m" (r.ow2) : "cc" ); __asm__ __volatile__ ( "movl %1,%0" "\n\t" "sbbl %2,%0" "\n\t" "movl %0,%3" : "=&q" (dummy) : "m" (a.ow3), "m" (b.ow3), "m" (r.ow3) : "cc" ); #else #if CL_DS_BIG_ENDIAN_P __asm__ __volatile__ ( "movl 12(%1),%0" "\n\t" "subl 12(%2),%0" "\n\t" "movl %0,12(%3)" "\n\t" "movl 8(%1),%0" "\n\t" "sbbl 8(%2),%0" "\n\t" "movl %0,8(%3)" "\n\t" "movl 4(%1),%0" "\n\t" "sbbl 4(%2),%0" "\n\t" "movl %0,4(%3)" "\n\t" "movl (%1),%0" "\n\t" "sbbl (%2),%0" "\n\t" "movl %0,(%3)" : "=&q" (dummy) : "r" (&a), "r" (&b), "r" (&r) : "cc" ); #else __asm__ __volatile__ ( "movl (%1),%0" "\n\t" "subl (%2),%0" "\n\t" "movl %0,(%3)" "\n\t" "movl 4(%1),%0" "\n\t" "sbbl 4(%2),%0" "\n\t" "movl %0,4(%3)" "\n\t" "movl 8(%1),%0" "\n\t" "sbbl 8(%2),%0" "\n\t" "movl %0,8(%3)" "\n\t" "movl 12(%1),%0" "\n\t" "sbbl 12(%2),%0" "\n\t" "movl %0,12(%3)" : "=&q" (dummy) : "r" (&a), "r" (&b), "r" (&r) : "cc" ); #endif #endif #elif defined(NUSS_OUT_EXTERNAL_LOOPS) sub_loop_lsp(arrayLSDptr(a._ow,4),arrayLSDptr(b._ow,4),arrayLSDptr(r._ow,4),4); #else var uint32 tmp; tmp = a.ow0 - b.ow0; if (tmp <= a.ow0) { // no carry r.ow0 = tmp; tmp = a.ow1 - b.ow1; if (tmp <= a.ow1) goto no_carry_1; else goto carry_1; } else { // carry r.ow0 = tmp; tmp = a.ow1 - b.ow1 - 1; if (tmp < a.ow1) goto no_carry_1; else goto carry_1; } if (1) { no_carry_1: // no carry r.ow1 = tmp; tmp = a.ow2 - b.ow2; if (tmp <= a.ow2) goto no_carry_2; else goto carry_2; } else { carry_1: // carry r.ow1 = tmp; tmp = a.ow2 - b.ow2 - 1; if (tmp < a.ow2) goto no_carry_2; else goto carry_2; } if (1) { no_carry_2: // no carry r.ow2 = tmp; tmp = a.ow3 - b.ow3; } else { carry_2: // carry r.ow2 = tmp; tmp = a.ow3 - b.ow3 - 1; } r.ow3 = tmp; #endif } // b := a >> 1 static inline void shift (const nuss_outword& a, nuss_outword& b) { #if defined(__GNUC__) && defined(__i386__) && !defined(DEBUG_NUSS) var uintD dummy; #ifdef NUSS_ASM_DIRECT __asm__ __volatile__ ( "movl %1,%0" "\n\t" "sarl $1,%0" "\n\t" "movl %0,%2" : "=&q" (dummy) : "m" (a.ow3), "m" (b.ow3) : "cc" ); __asm__ __volatile__ ( "movl %1,%0" "\n\t" "rcrl $1,%0" "\n\t" "movl %0,%2" : "=&q" (dummy) : "m" (a.ow2), "m" (b.ow2) : "cc" ); __asm__ __volatile__ ( "movl %1,%0" "\n\t" "rcrl $1,%0" "\n\t" "movl %0,%2" : "=&q" (dummy) : "m" (a.ow1), "m" (b.ow1) : "cc" ); __asm__ __volatile__ ( "movl %1,%0" "\n\t" "rcrl $1,%0" "\n\t" "movl %0,%2" : "=&q" (dummy) : "m" (a.ow0), "m" (b.ow0) : "cc" ); #else #if CL_DS_BIG_ENDIAN_P __asm__ __volatile__ ( "movl (%1),%0" "\n\t" "sarl $1,%0" "\n\t" "movl %0,(%2)" "\n\t" "movl 4(%1),%0" "\n\t" "rcrl $1,%0" "\n\t" "movl %0,4(%2)" "\n\t" "movl 8(%1),%0" "\n\t" "rcrl $1,%0" "\n\t" "movl %0,8(%2)" "\n\t" "movl 12(%1),%0" "\n\t" "rcrl $1,%0" "\n\t" "movl %0,12(%2)" : "=&q" (dummy) : "r" (&a), "r" (&b) : "cc" ); #else __asm__ __volatile__ ( "movl 12(%1),%0" "\n\t" "sarl $1,%0" "\n\t" "movl %0,12(%2)" "\n\t" "movl 8(%1),%0" "\n\t" "rcrl $1,%0" "\n\t" "movl %0,8(%2)" "\n\t" "movl 4(%1),%0" "\n\t" "rcrl $1,%0" "\n\t" "movl %0,4(%2)" "\n\t" "movl (%1),%0" "\n\t" "rcrl $1,%0" "\n\t" "movl %0,(%2)" : "=&q" (dummy) : "r" (&a), "r" (&b) : "cc" ); #endif #endif #elif defined(NUSS_OUT_EXTERNAL_LOOPS) #ifdef DEBUG_NUSS if (shiftrightcopy_loop_msp(arrayMSDptr(a._ow,4),arrayMSDptr(b._ow,4),4,1,mspref(arrayMSDptr(a._ow,4),0)>>31)) throw runtime_exception(); #else shiftrightcopy_loop_msp(arrayMSDptr(a._ow,4),arrayMSDptr(b._ow,4),4,1,mspref(arrayMSDptr(a._ow,4),0)>>31); #endif #else var uint32 tmp, carry; tmp = a.ow3; b.ow3 = (sint32)tmp >> 1; carry = tmp << 31; tmp = a.ow2; b.ow2 = (tmp >> 1) | carry; carry = tmp << 31; tmp = a.ow1; b.ow1 = (tmp >> 1) | carry; carry = tmp << 31; tmp = a.ow0; b.ow0 = (tmp >> 1) | carry; #ifdef DEBUG_NUSS carry = tmp << 31; if (carry) throw runtime_exception(); #endif #endif } #endif // (intDsize==32) #if (intDsize==64) //typedef struct { sint64 iw1; uint64 iw0; } nuss_inword; //typedef struct { uint64 iw0; sint64 iw1; } nuss_inword; typedef struct { uintD _iw[2]; } nuss_inword; #if CL_DS_BIG_ENDIAN_P #define iw1 _iw[0] #define iw0 _iw[1] #else #define iw0 _iw[0] #define iw1 _iw[1] #endif //typedef struct { sint64 ow2; uint64 ow1; uint64 ow0; } nuss_outword; //typedef struct { uint64 ow0; uint64 ow1; sint64 ow2; } nuss_outword; typedef struct { uintD _ow[3]; } nuss_outword; #if CL_DS_BIG_ENDIAN_P #define ow2 _ow[0] #define ow1 _ow[1] #define ow0 _ow[2] #else #define ow0 _ow[0] #define ow1 _ow[1] #define ow2 _ow[2] #endif // r := a + b static inline void add (const nuss_inword& a, const nuss_inword& b, nuss_inword& r) { #ifdef NUSS_IN_EXTERNAL_LOOPS add_loop_lsp(arrayLSDptr(a._iw,2),arrayLSDptr(b._iw,2),arrayLSDptr(r._iw,2),2); #else var uint64 tmp; tmp = a.iw0 + b.iw0; if (tmp >= a.iw0) { // no carry r.iw0 = tmp; r.iw1 = a.iw1 + b.iw1; } else { // carry r.iw0 = tmp; r.iw1 = a.iw1 + b.iw1 + 1; } #endif } // r := a - b static inline void sub (const nuss_inword& a, const nuss_inword& b, nuss_inword& r) { #ifdef NUSS_IN_EXTERNAL_LOOPS sub_loop_lsp(arrayLSDptr(a._iw,2),arrayLSDptr(b._iw,2),arrayLSDptr(r._iw,2),2); #else var uint64 tmp; tmp = a.iw0 - b.iw0; if (tmp <= a.iw0) { // no carry r.iw0 = tmp; r.iw1 = a.iw1 - b.iw1; } else { // carry r.iw0 = tmp; r.iw1 = a.iw1 - b.iw1 - 1; } #endif } // r := 0 static inline void zero (nuss_outword& r) { r.ow0 = 0; r.ow1 = 0; r.ow2 = 0; } // r := a + b static inline void add (const nuss_outword& a, const nuss_outword& b, nuss_outword& r) { #ifdef NUSS_OUT_EXTERNAL_LOOPS add_loop_lsp(arrayLSDptr(a._ow,3),arrayLSDptr(b._ow,3),arrayLSDptr(r._ow,3),3); #else var uint64 tmp; tmp = a.ow0 + b.ow0; if (tmp >= a.ow0) { // no carry r.ow0 = tmp; tmp = a.ow1 + b.ow1; if (tmp >= a.ow1) goto no_carry_1; else goto carry_1; } else { // carry r.ow0 = tmp; tmp = a.ow1 + b.ow1 + 1; if (tmp > a.ow1) goto no_carry_1; else goto carry_1; } if (1) { no_carry_1: // no carry r.ow1 = tmp; tmp = a.ow2 + b.ow2; } else { carry_1: // carry r.ow1 = tmp; tmp = a.ow2 + b.ow2 + 1; } r.ow2 = tmp; #endif } // r := a - b static inline void sub (const nuss_outword& a, const nuss_outword& b, nuss_outword& r) { #ifdef NUSS_OUT_EXTERNAL_LOOPS sub_loop_lsp(arrayLSDptr(a._ow,3),arrayLSDptr(b._ow,3),arrayLSDptr(r._ow,3),3); #else var uint64 tmp; tmp = a.ow0 - b.ow0; if (tmp <= a.ow0) { // no carry r.ow0 = tmp; tmp = a.ow1 - b.ow1; if (tmp <= a.ow1) goto no_carry_1; else goto carry_1; } else { // carry r.ow0 = tmp; tmp = a.ow1 - b.ow1 - 1; if (tmp < a.ow1) goto no_carry_1; else goto carry_1; } if (1) { no_carry_1: // no carry r.ow1 = tmp; tmp = a.ow2 - b.ow2; } else { carry_1: // carry r.ow1 = tmp; tmp = a.ow2 - b.ow2 - 1; } r.ow2 = tmp; #endif } // b := a >> 1 static inline void shift (const nuss_outword& a, nuss_outword& b) { #ifdef NUSS_OUT_EXTERNAL_LOOPS #ifdef DEBUG_NUSS if (shiftrightcopy_loop_msp(arrayMSDptr(a._ow,3),arrayMSDptr(b._ow,3),3,1,mspref(arrayMSDptr(a._ow,3),0)>>63)) throw runtime_exception(); #else shiftrightcopy_loop_msp(arrayMSDptr(a._ow,3),arrayMSDptr(b._ow,3),3,1,mspref(arrayMSDptr(a._ow,3),0)>>63); #endif #else var uint64 tmp, carry; tmp = a.ow2; b.ow2 = (sint64)tmp >> 1; carry = tmp << 63; tmp = a.ow1; b.ow1 = (tmp >> 1) | carry; carry = tmp << 63; tmp = a.ow0; b.ow0 = (tmp >> 1) | carry; #ifdef DEBUG_NUSS carry = tmp << 63; if (carry) throw runtime_exception(); #endif #endif } #endif // (intDsize==64) // This is a recursive implementation. // TODO: Write a non-recursive one. #ifndef _BIT_REVERSE #define _BIT_REVERSE // Reverse an n-bit number x. n>0. static uintC bit_reverse (uintL n, uintC x) { var uintC y = 0; do { y <<= 1; y |= (x & 1); x >>= 1; } while (!(--n == 0)); return y; } #endif // Threshold for recursion base in mulu_nuss_negacyclic(). // Time of a multiplication with len1=len2=10000 on Linux i486: // normal asm-optimized // threshold1 = 1: 40.1 sec 25.5 sec // threshold1 = 2: 28.6 sec 18.3 sec // threshold1 = 3: 25.6 sec 16.6 sec // threshold1 = 4: 25.7 sec 17.6 sec // threshold1 = 5: 26.1 sec 18.0 sec const uintC cl_nuss_threshold1 = 3; // Threshold for recursion base in mulu_nuss_cyclic(). const uintC cl_nuss_threshold2 = 1; // Computes z[k] := sum(i+j==k mod N, x[i]*y[j]*(-1)^((i+j-k)/N)) // for all k=0..N-1. static void mulu_nuss_negacyclic (const uintL n, const uintC N, // N = 2^n const nuss_inword * x, // N words const nuss_inword * y, // N words nuss_outword * z // N words result ) { #if 0 // always n > 0 if (n == 0) { // z[0] := x0 y0 mul(x[0],y[0], z[0]); return; } #endif if (n <= cl_nuss_threshold1) { if (n == 1) { // z[0] := x0 (y0 + y1) - (x0 + x1) y1 // z[1] := x0 (y0 + y1) + (x1 - x0) y0 var nuss_inword x_sum; var nuss_inword y_sum; var nuss_outword first, second; add(x[0],x[1], x_sum); add(y[0],y[1], y_sum); mul(x[0],y_sum, first); mul(x_sum,y[1], second); sub(first,second, z[0]); sub(x[1],x[0], x_sum); mul(x_sum,y[0], second); add(first,second, z[1]); return; } // 1 < n <= cl_nuss_threshold1. #if 0 // straightforward, but slow var uintC k; for (k = 0; k < N; k++) { var uintC i; var nuss_outword accu; mul(x[0],y[k], accu); for (i = 1; i <= k; i++) { var nuss_outword temp; mul(x[i],y[k-i], temp); add(accu,temp, accu); } for (i = k+1; i < N; i++) { var nuss_outword temp; mul(x[i],y[N-i+k], temp); sub(accu,temp, accu); } z[k] = accu; } #else var const uintC M = (uintC)1 << (n-1); // M = N/2 var uintC i, j, k; for (k = 0; k < N; k++) zero(z[k]); for (i = 0; i < M; i++) { var uintC iM = i+M; for (j = 0; j < M-i; j++) { var uintC jM = j+M; // z[i+j] += x[i] (y[j] + y[j+M]) - (x[i] + x[i+M]) y[j+M] // z[i+j+M] += x[i] (y[j] + y[j+M]) + (x[i+M] - x[i]) y[j] var nuss_inword x_sum; var nuss_inword y_sum; var nuss_outword first, second, temp; add(x[i],x[iM], x_sum); add(y[j],y[jM], y_sum); mul(x[i],y_sum, first); mul(x_sum,y[jM], second); sub(first,second, temp); add(z[i+j],temp, z[i+j]); sub(x[iM],x[i], x_sum); mul(x_sum,y[j], second); add(first,second, temp); add(z[i+j+M],temp, z[i+j+M]); } for (j = M-i; j < M; j++) { var uintC jM = j+M; // z[i+j] += x[i] (y[j] + y[j+M]) - (x[i] + x[i+M]) y[j+M] // z[i+j-M] -= x[i] (y[j] + y[j+M]) + (x[i+M] - x[i]) y[j] var nuss_inword x_sum; var nuss_inword y_sum; var nuss_outword first, second, temp; add(x[i],x[iM], x_sum); add(y[j],y[jM], y_sum); mul(x[i],y_sum, first); mul(x_sum,y[jM], second); sub(first,second, temp); add(z[i+j],temp, z[i+j]); sub(x[iM],x[i], x_sum); mul(x_sum,y[j], second); add(first,second, temp); sub(z[i+j-M],temp, z[i+j-M]); } } #endif return; } // Recursive FFT. var const uintL m = n >> 1; // floor(n/2) var const uintL r = n - m; // ceiling(n/2) var const uintC M = (uintC)1 << m; // M = 2^m var const uintC R = (uintC)1 << r; // R = 2^r CL_ALLOCA_STACK; var nuss_inword* const auX = cl_alloc_array(nuss_inword,2*N); var nuss_inword* const auY = cl_alloc_array(nuss_inword,2*N); var nuss_outword* const auZ = cl_alloc_array(nuss_outword,2*N); #define X(i,j) auX[((i)<=0; l--) { var const uintC smax = (uintC)1 << (m-l); var const uintC tmax = (uintC)1 << l; for (var uintC s = 0; s < smax; s++) { var uintC exp = bit_reverse(m-l,s) << (l + r-m); for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Butterfly: replace (X(i1),X(i2)) by // (X(i1) + w^exp*X(i2), X(i1) - w^exp*X(i2)). for (j = 0; j < exp; j++) { // note that w^R = -1 sub(X(i1,j),X(i2,j-exp+R), tmp1[j]); add(X(i1,j),X(i2,j-exp+R), tmp2[j]); } for (j = exp; j < R; j++) { add(X(i1,j),X(i2,j-exp), tmp1[j]); sub(X(i1,j),X(i2,j-exp), tmp2[j]); } for (j = 0; j < R; j++) { X(i1,j) = tmp1[j]; X(i2,j) = tmp2[j]; } } } } } // Do an FFT of length 2*M on Y. if (!squaring) { var sintL l; // Level l = m: for (i = 0; i < M; i++) for (j = 0; j < R; j++) Y(i+M,j) = Y(i,j); // Level l = m-1..0: for (l = m-1; l>=0; l--) { var const uintC smax = (uintC)1 << (m-l); var const uintC tmax = (uintC)1 << l; for (var uintC s = 0; s < smax; s++) { var uintC exp = bit_reverse(m-l,s) << (l + r-m); for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Butterfly: replace (Y(i1),Y(i2)) by // (Y(i1) + w^exp*Y(i2), Y(i1) - w^exp*Y(i2)). for (j = 0; j < exp; j++) { // note that w^R = -1 sub(Y(i1,j),Y(i2,j-exp+R), tmp1[j]); add(Y(i1,j),Y(i2,j-exp+R), tmp2[j]); } for (j = exp; j < R; j++) { add(Y(i1,j),Y(i2,j-exp), tmp1[j]); sub(Y(i1,j),Y(i2,j-exp), tmp2[j]); } for (j = 0; j < R; j++) { Y(i1,j) = tmp1[j]; Y(i2,j) = tmp2[j]; } } } } } // Recursively compute the negacyclic product X(i)*Y(i) for all i. if (!squaring) { for (i = 0; i < 2*M; i++) mulu_nuss_negacyclic(r,R, &X(i,0), &Y(i,0), &Z(i,0)); } else { for (i = 0; i < 2*M; i++) mulu_nuss_negacyclic(r,R, &X(i,0), &X(i,0), &Z(i,0)); } // Undo an FFT of length 2*M on Z. { var uintL l; // Level l = 0..m-1: for (l = 0; l < m; l++) { var const uintC smax = (uintC)1 << (m-l); var const uintC tmax = (uintC)1 << l; for (var uintC s = 0; s < smax; s++) { var uintC exp = bit_reverse(m-l,s) << (l + r-m); for (var uintC t = 0; t < tmax; t++) { var uintC i1 = (s << (l+1)) + t; var uintC i2 = i1 + tmax; // Inverse Butterfly: replace (Z(i1),Z(i2)) by // ((Z(i1)+Z(i2))/2, (Z(i1)-Z(i2))/(2*w^exp)). for (j = 0; j < exp; j++) // note that w^R = -1 sub(Z(i2,j),Z(i1,j), tmpZ[j-exp+R]); for (j = exp; j < R; j++) sub(Z(i1,j),Z(i2,j), tmpZ[j-exp]); for (j = 0; j < R; j++) { var nuss_outword sum; add(Z(i1,j),Z(i2,j), sum); shift(sum, Z(i1,j)); shift(tmpZ[j], Z(i2,j)); } } } } // Level l=m: for (i = 0; i < M; i++) { var uintC i1 = i; var uintC i2 = i1 + M; // Inverse Butterfly: replace (Z(i1),Z(i2)) by // ((Z(i1)+Z(i2))/2, (Z(i1)-Z(i2))/2). for (j = 0; j < R; j++) { var nuss_outword sum; var nuss_outword diff; add(Z(i1,j),Z(i2,j), sum); sub(Z(i1,j),Z(i2,j), diff); shift(sum, Z(i1,j)); shift(diff, Z(i2,j)); } } } // Reduce to length M. for (i = 0; i < M; i++) { sub(Z(i,0),Z(i+M,R-1), z[i]); for (j = 1; j < R; j++) add(Z(i,j),Z(i+M,j-1), z[(j< 0 if (n == 0) { // z[0] := x0 y0 mul(x[0],y[0], z[0]); return; } #endif if (n == 1) { // z[0] := ((x0 + x1) (y0 + y1) + (x0 - x1) (y0 - y1)) / 2 // z[1] := ((x0 + x1) (y0 + y1) - (x0 - x1) (y0 - y1)) / 2 var nuss_inword x_sum; var nuss_inword y_sum; var nuss_inword x_diff; var nuss_inword y_diff; var nuss_outword first, second; add(x[0],x[1], x_sum); add(y[0],y[1], y_sum); sub(x[0],x[1], x_diff); sub(y[0],y[1], y_diff); mul(x_sum,y_sum, first); mul(x_diff,y_diff, second); add(first,second, z[0]); shift(z[0], z[0]); sub(first,second, z[1]); shift(z[1], z[1]); return; } #if 0 // useless code because cl_nuss_threshold2 == 1 if (n <= cl_nuss_threshold2) { #if 0 // straightforward, but slow var uintC k; for (k = 0; k < N; k++) { var uintC i; var nuss_outword accu; mul(x[0],y[k], accu); for (i = 1; i <= k; i++) { var nuss_outword temp; mul(x[i],y[k-i], temp); add(accu,temp, accu); } for (i = k+1; i < N; i++) { var nuss_outword temp; mul(x[i],y[N-i+k], temp); add(accu,temp, accu); } z[k] = accu; } #else var const uintC M = (uintC)1 << (n-1); // M = N/2 var uintC i, j, k; for (k = 0; k < N; k++) zero(z[k]); for (i = 0; i < M; i++) { var uintC iM = i+M; for (j = 0; j < M; j++) { var uintC jM = j+M; // z[i+j] += ((x[i] + x[i+M]) (y[j] + y[j+M]) + (x[i] - x[i+M]) (y[j] - y[j+M])) / 2 // z[i+j+M] += ((x[i] + x[i+M]) (y[j] + y[j+M]) - (x[i] - x[i+M]) (y[j] - y[j+M])) / 2 var nuss_inword x_sum; var nuss_inword y_sum; var nuss_inword x_diff; var nuss_inword y_diff; var nuss_outword first, second, temp; add(x[i],x[iM], x_sum); add(y[j],y[jM], y_sum); sub(x[i],x[iM], x_diff); sub(y[j],y[jM], y_diff); mul(x_sum,y_sum, first); mul(x_diff,y_diff, second); add(first,second, temp); add(z[i+j],temp, z[i+j]); var uintC ijM = (i+j+M) & (N-1); sub(first,second, temp); add(z[ijM],temp, z[ijM]); } } for (k = 0; k < N; k++) shift(z[k], z[k]); #endif return; } #endif var const uintL m = n-1; var const uintC M = (uintC)1 << m; // M = 2^m = N/2 var uintC i; // Chinese remainder theorem: u^N-1 = (u^M-1)*(u^M+1) for (i = 0; i < M; i++) { // Butterfly: replace (x(i),x(i+M)) // by (x(i)+x(i+M),x(i)-x(i+M)). var nuss_inword tmp; sub(x[i],x[i+M], tmp); add(x[i],x[i+M], x[i]); x[i+M] = tmp; } if (!(x == y)) // squaring? for (i = 0; i < M; i++) { // Butterfly: replace (y(i),y(i+M)) // by (y(i)+y(i+M),y(i)-y(i+M)). var nuss_inword tmp; sub(y[i],y[i+M], tmp); add(y[i],y[i+M], y[i]); y[i+M] = tmp; } // Recurse. mulu_nuss_cyclic(m,M, &x[0], &y[0], &z[0]); mulu_nuss_negacyclic(m,M, &x[M], &y[M], &z[M]); for (i = 0; i < M; i++) { // Inverse Butterfly: replace (z(i),z(i+M)) // by ((z(i)+z(i+M))/2,(z(i)-z(i+M))/2). var nuss_outword sum; var nuss_outword diff; add(z[i],z[i+M], sum); sub(z[i],z[i+M], diff); shift(sum, z[i]); shift(diff, z[i+M]); } } static void mulu_nussbaumer (const uintD* sourceptr1, uintC len1, const uintD* sourceptr2, uintC len2, uintD* destptr) // Es ist 2 <= len1 <= len2. { // Methode: // source1 ist ein Stück der Länge N1, source2 ein oder mehrere Stücke // der Länge N2, mit N1+N2 <= N, wobei N Zweierpotenz ist. // sum(i=0..N-1, x_i b^i) * sum(i=0..N-1, y_i b^i) wird errechnet, // indem man die beiden Polynome // sum(i=0..N-1, x_i T^i), sum(i=0..N-1, y_i T^i) // multipliziert, und zwar durch Fourier-Transformation (s.o.). var uint32 n; integerlengthC(len1-1, n=); // 2^(n-1) < len1 <= 2^n var uintC len = (uintC)1 << n; // kleinste Zweierpotenz >= len1 // Wählt man N = len, so hat man ceiling(len2/(len-len1+1)) * FFT(len). // Wählt man N = 2*len, so hat man ceiling(len2/(2*len-len1+1)) * FFT(2*len). // Wir wählen das billigere von beiden: // Bei ceiling(len2/(len-len1+1)) <= 2 * ceiling(len2/(2*len-len1+1)) // nimmt man N = len, bei ....... > ........ dagegen N = 2*len. // (Wahl von N = 4*len oder mehr bringt nur in Extremfällen etwas.) if (len2 > 2 * (len-len1+1) * (len2 <= (2*len-len1+1) ? 1 : ceiling(len2,(2*len-len1+1)))) { n = n+1; len = len << 1; } var const uintC N = len; // N = 2^n CL_ALLOCA_STACK; var nuss_inword* const x = cl_alloc_array(nuss_inword,N); var nuss_inword* const y = cl_alloc_array(nuss_inword,N); var nuss_outword* const z = cl_alloc_array(nuss_outword,N); var uintD* const tmpprod = cl_alloc_array(uintD,len1+1); var uintP i; var uintC destlen = len1+len2; clear_loop_lsp(destptr,destlen); do { var uintC len2p; // length of a piece of source2 len2p = N - len1 + 1; if (len2p > len2) len2p = len2; // len2p = min(N-len1+1,len2). if (len2p == 1) { // cheap case var uintD* tmpptr = arrayLSDptr(tmpprod,len1+1); mulu_loop_lsp(lspref(sourceptr2,0),sourceptr1,tmpptr,len1); if (addto_loop_lsp(tmpptr,destptr,len1+1)) if (inc_loop_lsp(destptr lspop (len1+1),destlen-(len1+1))) throw runtime_exception(); } else { var uintC destlenp = len1 + len2p - 1; // destlenp = min(N,destlen-1). var bool squaring = ((sourceptr1 == sourceptr2) && (len1 == len2p)); // Fill factor x. { for (i = 0; i < len1; i++) { x[i].iw0 = lspref(sourceptr1,i); x[i].iw1 = 0; } for (i = len1; i < N; i++) { x[i].iw0 = 0; x[i].iw1 = 0; } } // Fill factor y. if (!squaring) { for (i = 0; i < len2p; i++) { y[i].iw0 = lspref(sourceptr2,i); y[i].iw1 = 0; } for (i = len2p; i < N; i++) { y[i].iw0 = 0; y[i].iw1 = 0; } } // Multiply. if (!squaring) mulu_nuss_cyclic(n,N, &x[0], &y[0], &z[0]); else mulu_nuss_cyclic(n,N, &x[0], &x[0], &z[0]); #ifdef DEBUG_NUSS // Check result. for (i = 0; i < N; i++) if (!(z[i].ow3 == 0)) throw runtime_exception(); #endif // Add result to destptr[-destlen..-1]: { var uintD* ptr = destptr; // ac2|ac1|ac0 are an accumulator. var uint32 ac0 = 0; var uint32 ac1 = 0; var uint32 ac2 = 0; var uint32 tmp; for (i = 0; i < destlenp; i++) { // Add z[i] to the accumulator. tmp = z[i].ow0; if ((ac0 += tmp) < tmp) { if (++ac1 == 0) ++ac2; } tmp = z[i].ow1; if ((ac1 += tmp) < tmp) ++ac2; tmp = z[i].ow2; ac2 += tmp; // Add the accumulator's least significant word to destptr: tmp = lspref(ptr,0); if ((ac0 += tmp) < tmp) { if (++ac1 == 0) ++ac2; } lspref(ptr,0) = ac0; lsshrink(ptr); ac0 = ac1; ac1 = ac2; ac2 = 0; } // ac2 = 0. if (ac1 > 0) { if (!((i += 2) <= destlen)) throw runtime_exception(); tmp = lspref(ptr,0); if ((ac0 += tmp) < tmp) ++ac1; lspref(ptr,0) = ac0; lsshrink(ptr); tmp = lspref(ptr,0); ac1 += tmp; lspref(ptr,0) = ac1; lsshrink(ptr); if (ac1 < tmp) if (inc_loop_lsp(ptr,destlen-i)) throw runtime_exception(); } else if (ac0 > 0) { if (!((i += 1) <= destlen)) throw runtime_exception(); tmp = lspref(ptr,0); ac0 += tmp; lspref(ptr,0) = ac0; lsshrink(ptr); if (ac0 < tmp) if (inc_loop_lsp(ptr,destlen-i)) throw runtime_exception(); } } #ifdef DEBUG_NUSS // If destlenp < N, check that the remaining z[i] are 0. for (i = destlenp; i < N; i++) if (z[i].ow2 > 0 || z[i].ow1 > 0 || z[i].ow0 > 0) throw runtime_exception(); #endif } // Decrement len2. destptr = destptr lspop len2p; destlen -= len2p; sourceptr2 = sourceptr2 lspop len2p; len2 -= len2p; } while (len2 > 0); } #undef iw0 #undef iw1 #undef ow0 #undef ow1 #undef ow2 #undef ow3 cln-1.3.3/src/base/digitseq/cl_DS.h0000644000000000000000000027573611201634736013656 0ustar // Digit sequence arithmetic #ifndef _CL_DS_H #define _CL_DS_H #include "cln/types.h" #include "base/cl_gmpconfig.h" #include "base/digit/cl_D.h" #include "base/digitseq/cl_DS_endian.h" #include "base/cl_alloca.h" namespace cln { // Digit Sequence (DS) // a memory range with n digits (n an uintC), // between two pointers MSDptr and LSDptr. #if CL_DS_BIG_ENDIAN_P // MSDptr LSDptr = MSDptr+n // | MSD ............. LSD | // [short: MSDptr/n/LSDptr ] // In C: uintD* MSDptr, uintC len, MSDptr[0] ... MSDptr[len-1] are the digits. #else // LSDptr MSDptr = LSDptr+n // | LSD ............. MSD | // In C: uintD* LSDptr, uintC len, LSDptr[0] ... LSDptr[len-1] are the digits. #endif // If n = 0, this represents the number 0. // If n > 0, the most significant bit (i.e. bit (intDsize-1) of // MSDptr[CL_DS_BIG_ENDIAN_P?0:-1]) is the sign bit. If the sign // bit were repeated infinitely often, one would get an // "infinite bit sequence". // // A Normalised Digit Sequence (NDS) is one for which the MSD is necessary, // i.e. n = 0 or (n > 0 and the most significant intDsize+1 bits are not // all the same). // Unsigned Digit Sequence (UDS) // like DS, but without sign. // // Normalized Unsigned Digit Sequence (NUDS): // an UDS for which the MSD is necessary, i.e. n = 0 or // (n > 0 and the most significant intDsize bits are not all zero). // For the construction of constant DS, using "digit_header": #define D1(byte0) (uintD)(byte0) #define D2(byte0,byte1) (((uintD)(byte0)<<8)|(uintD)(byte1)) #define D4(byte0,byte1,byte2,byte3) (((uintD)(byte0)<<24)|((uintD)(byte1)<<16)|((uintD)(byte2)<<8)|((uintD)(byte3))) #define D8(byte0,byte1,byte2,byte3,byte4,byte5,byte6,byte7) (((uintD)(byte0)<<56)|((uintD)(byte1)<<48)|((uintD)(byte2)<<40)|((uintD)(byte3)<<32)|((uintD)(byte4)<<24)|((uintD)(byte5)<<16)|((uintD)(byte6)<<8)|((uintD)(byte7))) // i386-pc-solaris #defines DS. // Grr... #undef DS struct DS { uintD* MSDptr; uintC len; uintD* LSDptr; }; // Endianness independent access of digit sequences: // mspref(MSDptr,i) access a most significant digit // lspref(LSDptr,i) access a least significant digit // msshrink(MSDptr) shrinks the DS by throwing away the MSD // msprefnext(MSDptr) combines mspref(MSDptr,0) and msshrink(MSDptr) // lsshrink(LSDptr) shrinks the DS by throwing away the LSD // lsprefnext(LSDptr) combines lspref(LSDptr,0) and lsshrink(LSDptr) // mspop pointer operator corresponding to msshrink, arg is widened to an uintP // lspop pointer operator corresponding to lsshrink, arg is widened to an uintP #if CL_DS_BIG_ENDIAN_P #define mspref(p,i) (p)[i] #define lspref(p,i) (p)[-(uintP)(i)-1] #define msshrink(p) (p)++ #define msprefnext(p) (*(p)++) #define lsshrink(p) (p)-- #define lsprefnext(p) (*--(p)) #define mspop + #define lspop - #else #define mspref(p,i) (p)[-(uintP)(i)-1] #define lspref(p,i) (p)[i] #define msshrink(p) (p)-- #define msprefnext(p) (*--(p)) #define lsshrink(p) (p)++ #define lsprefnext(p) (*(p)++) #define mspop - #define lspop + #endif // Endianness independent macros for turning an array into a digit sequence. // arrayMSDptr(array,length) returns the MSDptr of array[0..length-1] // arrayLSDptr(array,length) returns the LSDptr of array[0..length-1] #if CL_DS_BIG_ENDIAN_P #define arrayMSDptr(array,length) &(array)[0] #define arrayLSDptr(array,length) &(array)[length] #else #define arrayMSDptr(array,length) &(array)[length] #define arrayLSDptr(array,length) &(array)[0] #endif #define arrayLSref(array,length,i) lspref(arrayLSDptr(array,length),i) // These functions on digit sequences are either inline C++ functions // or external assembler functions (see files cl_asm_*). // See which functions are defined as external functions. #include "base/digitseq/cl_asm.h" // Declare the external functions. extern "C" { #ifdef COPY_LOOPS extern uintD* copy_loop_up (const uintD* sourceptr, uintD* destptr, uintC count); extern uintD* copy_loop_down (const uintD* sourceptr, uintD* destptr, uintC count); #endif #ifdef FILL_LOOPS extern uintD* fill_loop_up (uintD* destptr, uintC count, uintD filler); extern uintD* fill_loop_down (uintD* destptr, uintC count, uintD filler); #endif #ifdef CLEAR_LOOPS extern uintD* clear_loop_up (uintD* destptr, uintC count); extern uintD* clear_loop_down (uintD* destptr, uintC count); #endif #ifdef TEST_LOOPS extern bool test_loop_up (const uintD* ptr, uintC count); extern bool test_loop_down (const uintD* ptr, uintC count); #endif #if CL_DS_BIG_ENDIAN_P #ifdef LOG_LOOPS extern void or_loop_up (uintD* xptr, const uintD* yptr, uintC count); extern void xor_loop_up (uintD* xptr, const uintD* yptr, uintC count); extern void and_loop_up (uintD* xptr, const uintD* yptr, uintC count); extern void eqv_loop_up (uintD* xptr, const uintD* yptr, uintC count); extern void nand_loop_up (uintD* xptr, const uintD* yptr, uintC count); extern void nor_loop_up (uintD* xptr, const uintD* yptr, uintC count); extern void andc2_loop_up (uintD* xptr, const uintD* yptr, uintC count); extern void orc2_loop_up (uintD* xptr, const uintD* yptr, uintC count); extern void not_loop_up (uintD* xptr, uintC count); #endif #ifdef TEST_LOOPS extern bool and_test_loop_up (const uintD* xptr, const uintD* yptr, uintC count); extern cl_signean compare_loop_up (const uintD* xptr, const uintD* yptr, uintC count); #endif #ifdef ADDSUB_LOOPS extern uintD add_loop_down (const uintD* sourceptr1, const uintD* sourceptr2, uintD* destptr, uintC count); extern uintD addto_loop_down (const uintD* sourceptr, uintD* destptr, uintC count); extern uintD inc_loop_down (uintD* ptr, uintC count); extern uintD sub_loop_down (const uintD* sourceptr1, const uintD* sourceptr2, uintD* destptr, uintC count); extern uintD subx_loop_down (const uintD* sourceptr1, const uintD* sourceptr2, uintD* destptr, uintC count, uintD carry); extern uintD subfrom_loop_down (const uintD* sourceptr, uintD* destptr, uintC count); extern uintD dec_loop_down (uintD* ptr, uintC count); extern uintD neg_loop_down (uintD* ptr, uintC count); #endif #ifdef SHIFT_LOOPS extern uintD shift1left_loop_down (uintD* ptr, uintC count); extern uintD shiftleft_loop_down (uintD* ptr, uintC count, uintC i, uintD carry); extern uintD shiftleftcopy_loop_down (const uintD* sourceptr, uintD* destptr, uintC count, uintC i); extern uintD shift1right_loop_up (uintD* ptr, uintC count, uintD carry); extern uintD shiftright_loop_up (uintD* ptr, uintC count, uintC i); extern uintD shiftrightsigned_loop_up (uintD* ptr, uintC count, uintC i); extern uintD shiftrightcopy_loop_up (const uintD* sourceptr, uintD* destptr, uintC count, uintC i, uintD carry); #endif #ifdef MUL_LOOPS extern uintD mulusmall_loop_down (uintD digit, uintD* ptr, uintC len, uintD newdigit); extern void mulu_loop_down (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len); extern uintD muluadd_loop_down (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len); extern uintD mulusub_loop_down (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len); #endif #ifdef DIV_LOOPS extern uintD divu_loop_up (uintD digit, uintD* ptr, uintC len); extern uintD divucopy_loop_up (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len); #endif #else // !CL_DS_BIG_ENDIAN_P #ifdef LOG_LOOPS extern void or_loop_down (uintD* xptr, const uintD* yptr, uintC count); extern void xor_loop_down (uintD* xptr, const uintD* yptr, uintC count); extern void and_loop_down (uintD* xptr, const uintD* yptr, uintC count); extern void eqv_loop_down (uintD* xptr, const uintD* yptr, uintC count); extern void nand_loop_down (uintD* xptr, const uintD* yptr, uintC count); extern void nor_loop_down (uintD* xptr, const uintD* yptr, uintC count); extern void andc2_loop_down (uintD* xptr, const uintD* yptr, uintC count); extern void orc2_loop_down (uintD* xptr, const uintD* yptr, uintC count); extern void not_loop_down (uintD* xptr, uintC count); #endif #ifdef TEST_LOOPS extern bool and_test_loop_down (const uintD* xptr, const uintD* yptr, uintC count); extern cl_signean compare_loop_down (const uintD* xptr, const uintD* yptr, uintC count); #endif #ifdef ADDSUB_LOOPS extern uintD add_loop_up (const uintD* sourceptr1, const uintD* sourceptr2, uintD* destptr, uintC count); extern uintD addto_loop_up (const uintD* sourceptr, uintD* destptr, uintC count); extern uintD inc_loop_up (uintD* ptr, uintC count); extern uintD sub_loop_up (const uintD* sourceptr1, const uintD* sourceptr2, uintD* destptr, uintC count); extern uintD subx_loop_up (const uintD* sourceptr1, const uintD* sourceptr2, uintD* destptr, uintC count, uintD carry); extern uintD subfrom_loop_up (const uintD* sourceptr, uintD* destptr, uintC count); extern uintD dec_loop_up (uintD* ptr, uintC count); extern uintD neg_loop_up (uintD* ptr, uintC count); #endif #ifdef SHIFT_LOOPS extern uintD shift1left_loop_up (uintD* ptr, uintC count); extern uintD shiftleft_loop_up (uintD* ptr, uintC count, uintC i, uintD carry); extern uintD shiftleftcopy_loop_up (const uintD* sourceptr, uintD* destptr, uintC count, uintC i); extern uintD shift1right_loop_down (uintD* ptr, uintC count, uintD carry); extern uintD shiftright_loop_down (uintD* ptr, uintC count, uintC i); extern uintD shiftrightsigned_loop_down (uintD* ptr, uintC count, uintC i); extern uintD shiftrightcopy_loop_down (const uintD* sourceptr, uintD* destptr, uintC count, uintC i, uintD carry); #endif #ifdef MUL_LOOPS extern uintD mulusmall_loop_up (uintD digit, uintD* ptr, uintC len, uintD newdigit); extern void mulu_loop_up (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len); extern uintD muluadd_loop_up (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len); extern uintD mulusub_loop_up (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len); #endif #ifdef DIV_LOOPS extern uintD divu_loop_down (uintD digit, uintD* ptr, uintC len); extern uintD divucopy_loop_down (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len); #endif #endif // !CL_DS_BIG_ENDIAN_P // Independently of CL_DS_BIG_ENDIAN_P: #ifdef TEST_LOOPS extern cl_signean compare_loop_up (const uintD* xptr, const uintD* yptr, uintC count); #endif #ifdef LOG_LOOPS extern void xor_loop_up (uintD* xptr, const uintD* yptr, uintC count); #endif #ifdef SHIFT_LOOPS extern uintD shiftleftcopy_loop_up (const uintD* sourceptr, uintD* destptr, uintC count, uintC i); extern void shiftxor_loop_up (uintD* xptr, const uintD* yptr, uintC count, uintC i); #endif } // "C" extern. #if defined(CL_USE_GMP) // Supersede the functions by wrappers around calls to gmp mpn, // for those functions where gmp is believed to be faster. } // namespace cln #include // Argh, gmp.h includes which erases the definition of offsetof // that we have provided in cl_offsetof.h. Restore it. #include "base/cl_offsetof.h" namespace cln { #if 0 // not worth it, since gmp's mpn_cmp is not optimized inline cl_signean compare_loop_down (const uintD* xptr, const uintD* yptr, uintC count) { return mpn_cmp(xptr-count,yptr-count,count); } #endif inline uintD add_loop_up (const uintD* sourceptr1, const uintD* sourceptr2, uintD* destptr, uintC count) { if (count == 0) return 0; return mpn_add_n(destptr,sourceptr1,sourceptr2,count); } inline uintD addto_loop_up (const uintD* sourceptr, uintD* destptr, uintC count) { if (count == 0) return 0; return mpn_add_n(destptr,destptr,sourceptr,count); } inline uintD inc_loop_up (uintD* ptr, uintC count) { if (count == 0) return 1; return mpn_add_1(ptr,ptr,count,1); } inline uintD sub_loop_up (const uintD* sourceptr1, const uintD* sourceptr2, uintD* destptr, uintC count) { if (count == 0) return 0; return mpn_sub_n(destptr,sourceptr1,sourceptr2,count); } inline uintD subx_loop_up (const uintD* sourceptr1, const uintD* sourceptr2, uintD* destptr, uintC count, uintD carry) { if (count == 0) return carry; var uintD res_carry = mpn_sub_n(destptr,sourceptr1,sourceptr2,count); if (carry) res_carry |= mpn_sub_1(destptr,destptr,count,1); return res_carry; } inline uintD subfrom_loop_up (const uintD* sourceptr, uintD* destptr, uintC count) { if (count == 0) return 0; return mpn_sub_n(destptr,destptr,sourceptr,count); } inline uintD dec_loop_up (uintD* ptr, uintC count) { if (count == 0) return (uintD)(-1); return -mpn_sub_1(ptr,ptr,count,1); } #if !defined(ADDSUB_LOOPS) // No equivalent for this in gmp. But we need this function, so write it in C. inline uintD neg_loop_up (uintD* ptr, uintC count) { // erstes Digit /=0 suchen: until (count==0) { if (!(*ptr == 0)) goto L1; ptr++; count--; } return 0; L1: // erstes Digit /=0 gefunden, ab jetzt gibt's Carrys *ptr = - *ptr; count--; // 1 Digit negieren dotimesC(count,count, { ptr++; *ptr = ~ *ptr; } ); // alle anderen Digits invertieren return (uintD)(-1); } #endif #define ADDSUB_LOOPS inline uintD shift1left_loop_up (uintD* ptr, uintC count) { if (count == 0) return 0; return mpn_lshift(ptr,ptr,count,1); } inline uintD shiftleft_loop_up (uintD* ptr, uintC count, uintC i, uintD carry) { if (count == 0) return carry; var uintD res_carry = mpn_lshift(ptr,ptr,count,i); ptr[0] |= carry; return res_carry; } inline uintD shiftleftcopy_loop_up (const uintD* sourceptr, uintD* destptr, uintC count, uintC i) { if (count == 0) return 0; return mpn_lshift(destptr,sourceptr,count,i); } inline uintD shift1right_loop_down (uintD* ptr, uintC count, uintD carry) { if (count == 0) return carry; var uintD res_carry = mpn_rshift(ptr-count,ptr-count,count,1); if (carry) ptr[-1] |= bit(intDsize-1); return res_carry; } inline uintD shiftright_loop_down (uintD* ptr, uintC count, uintC i) { if (count == 0) return 0; return mpn_rshift(ptr-count,ptr-count,count,i); } inline uintD shiftrightsigned_loop_down (uintD* ptr, uintC count, uintC i) { var uintD carry = ((sintD)ptr[-1] >> (intDsize-1)) << (intDsize-i); var uintD res_carry = mpn_rshift(ptr-count,ptr-count,count,i); ptr[-1] |= carry; return res_carry; } inline uintD shiftrightcopy_loop_down (const uintD* sourceptr, uintD* destptr, uintC count, uintC i, uintD carry) { carry = carry << (intDsize-i); if (count == 0) return carry; var uintD res_carry = mpn_rshift(destptr-count,sourceptr-count,count,i); destptr[-1] |= carry; return res_carry; } #define SHIFT_LOOPS inline uintD mulusmall_loop_up (uintD digit, uintD* ptr, uintC len, uintD newdigit) { if (len == 0) return newdigit; var uintD res_carry = mpn_mul_1(ptr,ptr,len,digit); res_carry += mpn_add_1(ptr,ptr,len,newdigit); return res_carry; } inline void mulu_loop_up (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len) { destptr[len] = (len==0 ? 0 : mpn_mul_1(destptr,sourceptr,len,digit)); } inline uintD muluadd_loop_up (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len) { if (len == 0) return 0; return mpn_addmul_1(destptr,sourceptr,len,digit); } inline uintD mulusub_loop_up (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len) { if (len == 0) return 0; return mpn_submul_1(destptr,sourceptr,len,digit); } #define MUL_LOOPS inline uintD divu_loop_up (uintD digit, uintD* ptr, uintC len) { return mpn_divrem_1(ptr,0,ptr,len,digit); } inline uintD divu_loop_down (uintD digit, uintD* ptr, uintC len) { return mpn_divrem_1(ptr-len,0,ptr-len,len,digit); } inline uintD divucopy_loop_up (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len) { return mpn_divrem_1(destptr,0,sourceptr,len,digit); } inline uintD divucopy_loop_down (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len) { return mpn_divrem_1(destptr-len,0,sourceptr-len,len,digit); } #define DIV_LOOPS #endif // defined(CL_USE_GMP) // Define the missing functions as inline functions. #ifndef COPY_LOOPS // Kopierschleife: // destptr = copy_loop_up(sourceptr,destptr,count); // kopiert count (uintC>=0) Digits aufwärts von sourceptr nach destptr // und liefert das neue destptr. inline uintD* copy_loop_up (const uintD* sourceptr, uintD* destptr, uintC count) { dotimesC(count,count, { *destptr++ = *sourceptr++; } ); return destptr; } // Kopierschleife: // destptr = copy_loop_down(sourceptr,destptr,count); // kopiert count (uintC>=0) Digits abwärts von sourceptr nach destptr // und liefert das neue destptr. inline uintD* copy_loop_down (const uintD* sourceptr, uintD* destptr, uintC count) { dotimesC(count,count, { *--destptr = *--sourceptr; } ); return destptr; } #endif #ifndef FILL_LOOPS // Füllschleife: // destptr = fill_loop_up(destptr,count,filler); // kopiert count (uintC>=0) mal das Digit filler aufwärts nach destptr // und liefert das neue destptr. inline uintD* fill_loop_up (uintD* destptr, uintC count, uintD filler) { dotimesC(count,count, { *destptr++ = filler; } ); return destptr; } // Füllschleife: // destptr = fill_loop_down(destptr,count,filler); // kopiert count (uintC>=0) mal das Digit filler abwärts nach destptr // und liefert das neue destptr. inline uintD* fill_loop_down (uintD* destptr, uintC count, uintD filler) { dotimesC(count,count, { *--destptr = filler; } ); return destptr; } #endif #ifndef CLEAR_LOOPS // Lösch-Schleife: // destptr = clear_loop_up(destptr,count); // löscht count (uintC>=0) Digits aufwärts ab destptr // und liefert das neue destptr. inline uintD* clear_loop_up (uintD* destptr, uintC count) { dotimesC(count,count, { *destptr++ = 0; } ); return destptr; } // Lösch-Schleife: // destptr = clear_loop_down(destptr,count); // löscht count (uintC>=0) Digits abwärts ab destptr // und liefert das neue destptr. inline uintD* clear_loop_down (uintD* destptr, uintC count) { dotimesC(count,count, { *--destptr = 0; } ); return destptr; } #endif #ifndef TEST_LOOPS // Test-Schleife: // test_loop_up(ptr,count) // testet count (uintC>=0) Digits aufwärts ab ptr, ob darunter eines /=0 ist. // Ergebnis /=0, falls ja. inline bool test_loop_up (const uintD* ptr, uintC count) { dotimesC(count,count, { if (*ptr++) return true; } ); return false; } // Test-Schleife: // test_loop_down(ptr,count) // testet count (uintC>=0) Digits abwärts ab ptr, ob darunter eines /=0 ist. // Ergebnis /=0, falls ja. inline bool test_loop_down (const uintD* ptr, uintC count) { dotimesC(count,count, { if (*--ptr) return true; } ); return false; } #endif #if CL_DS_BIG_ENDIAN_P #ifndef LOG_LOOPS // OR-Schleife: // or_loop_up(xptr,yptr,count); // verknüpft count (uintC>=0) Digits aufwärts ab xptr und ab yptr // mit Ziel ab xptr durch OR. inline void or_loop_up (uintD* xptr, const uintD* yptr, uintC count) { dotimesC(count,count, { *xptr++ |= *yptr++; } ); } // XOR-Schleife: // xor_loop_up(xptr,yptr,count); // verknüpft count (uintC>=0) Digits aufwärts ab xptr und ab yptr // mit Ziel ab xptr durch XOR. inline void xor_loop_up (uintD* xptr, const uintD* yptr, uintC count) { dotimesC(count,count, { *xptr++ ^= *yptr++; } ); } // AND-Schleife: // and_loop_up(xptr,yptr,count); // verknüpft count (uintC>=0) Digits aufwärts ab xptr und ab yptr // mit Ziel ab xptr durch AND. inline void and_loop_up (uintD* xptr, const uintD* yptr, uintC count) { dotimesC(count,count, { *xptr++ &= *yptr++; } ); } // EQV-Schleife: // eqv_loop_up(xptr,yptr,count); // verknüpft count (uintC>=0) Digits aufwärts ab xptr und ab yptr // mit Ziel ab xptr durch EQV (NOT XOR). inline void eqv_loop_up (uintD* xptr, const uintD* yptr, uintC count) { dotimesC(count,count, {var uintD temp = ~ (*xptr ^ *yptr++); *xptr++ = temp; } ); } // NAND-Schleife: // nand_loop_up(xptr,yptr,count); // verknüpft count (uintC>=0) Digits aufwärts ab xptr und ab yptr // mit Ziel ab xptr durch NAND (NOT AND). inline void nand_loop_up (uintD* xptr, const uintD* yptr, uintC count) { dotimesC(count,count, {var uintD temp = ~ (*xptr & *yptr++); *xptr++ = temp; } ); } // NOR-Schleife: // nor_loop_up(xptr,yptr,count); // verknüpft count (uintC>=0) Digits aufwärts ab xptr und ab yptr // mit Ziel ab xptr durch NOR (NOT OR). inline void nor_loop_up (uintD* xptr, const uintD* yptr, uintC count) { dotimesC(count,count, {var uintD temp = ~ (*xptr | *yptr++); *xptr++ = temp; } ); } // ANDC2-Schleife: // andc2_loop_up(xptr,yptr,count); // verknüpft count (uintC>=0) Digits aufwärts ab xptr und ab yptr // mit Ziel ab xptr durch ANDC2 (AND NOT). inline void andc2_loop_up (uintD* xptr, const uintD* yptr, uintC count) { dotimesC(count,count, { *xptr++ &= ~(*yptr++); } ); } // ORC2-Schleife: // orc2_loop_up(xptr,yptr,count); // verknüpft count (uintC>=0) Digits aufwärts ab xptr und ab yptr // mit Ziel ab xptr durch ORC2 (OR NOT). inline void orc2_loop_up (uintD* xptr, const uintD* yptr, uintC count) { dotimesC(count,count, { *xptr++ |= ~(*yptr++); } ); } // NOT-Schleife: // not_loop_up(xptr,count); // verknüpft count (uintC>0) Digits aufwärts ab xptr mit Ziel ab xptr // durch NOT. inline void not_loop_up (uintD* xptr, uintC count) { dotimespC(count,count, {var uintD temp = ~ (*xptr); *xptr++ = temp; } ); } #endif #ifndef TEST_LOOPS // AND-Test-Schleife: // and_test_loop_up(xptr,yptr,count); // verknüpft count (uintC>=0) Digits aufwärts ab xptr und ab yptr durch AND // und testet, ob sich dabei ein Digit /=0 ergibt. Ergebnis true, falls ja. inline bool and_test_loop_up (const uintD* xptr, const uintD* yptr, uintC count) { dotimesC(count,count, { if (*xptr++ & *yptr++) return true; } ); return false; } // Vergleichsschleife: // result = compare_loop_up(xptr,yptr,count); // vergleicht nacheinander xptr[0] mit yptr[0], xptr[1] mit yptr[1], usw., // insgesamt count Digits, und liefert 0 falls alle gleich sind, // +1 falls zuerst ein xptr[i]>yptr[i] ist, // -1 falls zuerst ein xptr[i] *--yptr ? signean_plus : signean_minus); }); return signean_null; // alle Digits gleich } #endif #ifndef ADDSUB_LOOPS // Additionsschleife: // übertrag = add_loop_down(sourceptr1,sourceptr2,destptr,count); // addiert count (uintC>=0) Digits abwärts von sourceptr1, von sourceptr2 // abwärts nach destptr und liefert den Übertrag (0 oder /=0, was 1 bedeutet). inline uintD add_loop_down (const uintD* sourceptr1, const uintD* sourceptr2, uintD* destptr, uintC count) { var uintD source1; var uintD source2; if (!(count==0)) do { source1 = *--sourceptr1; source2 = *--sourceptr2; *--destptr = source1 + source2; if (source1 > (uintD)(~source2)) goto carry_1; carry_0: count--; } until (count==0); return 0; do { source1 = *--sourceptr1; source2 = *--sourceptr2; *--destptr = source1 + source2 + 1; if (source1 < (uintD)(~source2)) goto carry_0; carry_1: count--; } until (count==0); return 1; } // Additionsschleife: // übertrag = addto_loop_down(sourceptr,destptr,count); // addiert count (uintC>=0) Digits abwärts von sourceptr, von destptr // abwärts nach destptr und liefert den Übertrag (0 oder /=0, was 1 bedeutet). inline uintD addto_loop_down (const uintD* sourceptr, uintD* destptr, uintC count) { var uintD source1; var uintD source2; if (!(count==0)) do { source1 = *--sourceptr; source2 = *--destptr; *destptr = source1 + source2; if (source1 > (uintD)(~source2)) goto carry_1; carry_0: count--; } until (count==0); return 0; do { source1 = *--sourceptr; source2 = *--destptr; *destptr = source1 + source2 + 1; if (source1 < (uintD)(~source2)) goto carry_0; carry_1: count--; } until (count==0); return 1; } // Incrementierschleife: // übertrag = inc_loop_down(ptr,count); // incrementiert count (uintC>=0) Digits abwärts von ptr, so lange bis kein // Übertrag mehr auftritt und liefert den Übertrag (0 oder /=0, was 1 bedeutet). inline uintD inc_loop_down (uintD* ptr, uintC count) { dotimesC(count,count, { if (!( ++(*--ptr) == 0 )) return 0; } // kein weiterer Übertrag ); return 1; // weiterer Übertrag } // Subtraktionsschleife: // übertrag = sub_loop_down(sourceptr1,sourceptr2,destptr,count); // subtrahiert count (uintC>=0) Digits abwärts von sourceptr1, von sourceptr2 // abwärts nach destptr und liefert den Übertrag (0 oder /=0, was -1 bedeutet). inline uintD sub_loop_down (const uintD* sourceptr1, const uintD* sourceptr2, uintD* destptr, uintC count) { var uintD source1; var uintD source2; if (!(count==0)) do { source1 = *--sourceptr1; source2 = *--sourceptr2; *--destptr = source1 - source2; if (source1 < source2) goto carry_1; carry_0: count--; } until (count==0); return 0; do { source1 = *--sourceptr1; source2 = *--sourceptr2; *--destptr = source1 - source2 - 1; if (source1 > source2) goto carry_0; carry_1: count--; } until (count==0); return (uintD)(-1); } // Subtraktionsschleife: // übertrag = subx_loop_down(sourceptr1,sourceptr2,destptr,count,carry); // subtrahiert count (uintC>=0) Digits abwärts von sourceptr1 und addiert // einen Carry (0 oder -1), von sourceptr2 abwärts nach destptr und // liefert den Übertrag (0 oder /=0, was -1 bedeutet). inline uintD subx_loop_down (const uintD* sourceptr1, const uintD* sourceptr2, uintD* destptr, uintC count, uintD carry) { var uintD source1; var uintD source2; if (carry==0) { if (!(count==0)) do { source1 = *--sourceptr1; source2 = *--sourceptr2; *--destptr = source1 - source2; if (source1 < source2) goto carry_1; carry_0: count--; } until (count==0); return 0; } else { if (!(count==0)) do { source1 = *--sourceptr1; source2 = *--sourceptr2; *--destptr = source1 - source2 - 1; if (source1 > source2) goto carry_0; carry_1: count--; } until (count==0); return (uintD)(-1); } } // Subtraktionsschleife: // übertrag = subfrom_loop_down(sourceptr,destptr,count); // subtrahiert count (uintC>=0) Digits abwärts von sourceptr, von destptr // abwärts nach destptr (dest := dest - source) // und liefert den Übertrag (0 oder /=0, was -1 bedeutet). inline uintD subfrom_loop_down (const uintD* sourceptr, uintD* destptr, uintC count) { var uintD source1; var uintD source2; if (!(count==0)) do { source1 = *--destptr; source2 = *--sourceptr; *destptr = source1 - source2; if (source1 < source2) goto carry_1; carry_0: count--; } until (count==0); return 0; do { source1 = *--destptr; source2 = *--sourceptr; *destptr = source1 - source2 - 1; if (source1 > source2) goto carry_0; carry_1: count--; } until (count==0); return (uintD)(-1); } // Decrementierschleife: // übertrag = dec_loop_down(ptr,count); // decrementiert count (uintC>=0) Digits abwärts von ptr, so lange bis kein // Übertrag mehr auftritt und liefert den Übertrag (0 oder -1). inline uintD dec_loop_down (uintD* ptr, uintC count) { dotimesC(count,count, { if (!( (*--ptr)-- == 0 )) return 0; } // kein weiterer Übertrag ); return (uintD)(-1); // weiterer Übertrag } // Negierschleife: // übertrag = neg_loop_down(ptr,count); // negiert count (uintC>=0) Digits abwärts von ptr, // und liefert den Übertrag (0 oder -1). inline uintD neg_loop_down (uintD* ptr, uintC count) { // erstes Digit /=0 suchen: until (count==0) { if (!(*--ptr == 0)) goto L1; count--; } return 0; L1: // erstes Digit /=0 gefunden, ab jetzt gibt's Carrys *ptr = - *ptr; count--; // 1 Digit negieren dotimesC(count,count, { --ptr; *ptr = ~ *ptr; } ); // alle anderen Digits invertieren return (uintD)(-1); } #endif #ifndef SHIFT_LOOPS // Schiebeschleife um 1 Bit nach links: // übertrag = shift1left_loop_down(ptr,count); // schiebt count (uintC>=0) Digits abwärts von ptr um 1 Bit nach links, // und liefert den Übertrag (0 oder /=0, was 1 bedeutet). #if HAVE_DD inline uintD shift1left_loop_down (uintD* ptr, uintC count) { var uintDD accu = 0; dotimesC(count,count, { accu = ((uintDD)(*--ptr)<<1)+accu; *ptr = lowD(accu); accu = (uintDD)(highD(accu)); }); return (uintD)accu; } #else inline uintD shift1left_loop_down (uintD* ptr, uintC count) { var uintD carry = 0; dotimesC(count,count, { var uintD accu = *--ptr; *ptr = (accu<<1) | carry; carry = accu>>(intDsize-1); }); return carry; } #endif // Schiebeschleife um i Bits nach links: // übertrag = shiftleft_loop_down(ptr,count,i,übertrag_init); // schiebt count (uintC>=0) Digits abwärts von ptr um i Bits (0=0, <2^i). #if HAVE_DD inline uintD shiftleft_loop_down (uintD* ptr, uintC count, uintC i, uintD carry) { var uintDD accu = (uintDD)carry; dotimesC(count,count, { accu = ((uintDD)(*--ptr)<>j; }); return carry; } #endif // Schiebe- und Kopierschleife um i Bits nach links: // übertrag = shiftleftcopy_loop_down(sourceptr,destptr,count,i); // kopiert count (uintC>=0) Digits abwärts von sourceptr nach destptr // und schiebt sie dabei um i Bits (0=0, <2^i). #if HAVE_DD inline uintD shiftleftcopy_loop_down (const uintD* sourceptr, uintD* destptr, uintC count, uintC i) { var uintDD accu = 0; dotimesC(count,count, { accu = ((uintDD)(*--sourceptr)<>j; }); return carry; } #endif // Schiebeschleife um 1 Bit nach rechts: // übertrag = shift1right_loop_up(ptr,count,übertrag_init); // schiebt count (uintC>=0) Digits aufwärts von ptr um 1 Bit nach rechts, // wobei links das Bit übertrag_init (sollte =0 oder =-1 sein) hineingeschoben // wird, und liefert den Übertrag (0 oder /=0, was 1 bedeutet). #if HAVE_DD inline uintD shift1right_loop_up (uintD* ptr, uintC count, uintD carry) { var uintDD accu = (sintDD)(sintD)carry & ((uintDD)1 << (2*intDsize-1)); // 0 oder bit(2*intDsize-1) dotimesC(count,count, { accu = (highlowDD_0(*ptr)>>1)+accu; *ptr++ = highD(accu); accu = highlowDD_0(lowD(accu)); }); return highD(accu); } #else inline uintD shift1right_loop_up (uintD* ptr, uintC count, uintD carry) { carry = carry << (intDsize-1); // carry zu einem einzigen Bit machen dotimesC(count,count, { var uintD accu = *ptr; *ptr++ = (accu >> 1) | carry; carry = accu << (intDsize-1); }); return carry; } #endif // Schiebeschleife um i Bits nach rechts: // übertrag = shiftright_loop_up(ptr,count,i); // schiebt count (uintC>=0) Digits aufwärts von ptr um i Bits (0>i)+accu; *ptr++ = highD(accu); }); return lowD(accu); } #else inline uintD shiftright_loop_up (uintD* ptr, uintC count, uintC i) { var uintC j = intDsize-i; var uintD carry = 0; dotimesC(count,count, { var uintD accu = *ptr; *ptr++ = (accu >> i) | carry; carry = accu << j; }); return carry; } #endif // Schiebeschleife um i Bits nach rechts: // übertrag = shiftrightsigned_loop_up(ptr,count,i); // schiebt count (uintC>0) Digits aufwärts von ptr um i Bits (0>i; dotimespC(count,count, { // Die oberen i Bits von (uintD)accu bilden hier den Übertrag. accu = highlowDD_0(lowD(accu)); // Die oberen i Bits von (uintDD)accu bilden hier den Übertrag. accu = (highlowDD_0(*ptr)>>i)+accu; *ptr++ = highD(accu); }); return lowD(accu); } #else inline uintD shiftrightsigned_loop_up (uintD* ptr, uintC count, uintC i) { var uintC j = intDsize-i; var uintD carry; { var uintD accu = *ptr; *ptr++ = (sintD)accu >> i; carry = accu << j; count--; } dotimesC(count,count, { var uintD accu = *ptr; *ptr++ = (accu >> i) | carry; carry = accu << j; }); return carry; } #endif // Schiebe- und Kopier-Schleife um i Bits nach rechts: // übertrag = shiftrightcopy_loop_up(sourceptr,destptr,count,i,carry); // kopiert count (uintC>=0) Digits aufwärts von sourceptr nach destptr // und schiebt sie dabei um i Bits (0>i; dotimesC(count,count, { // Die oberen i Bits von (uintD)accu bilden hier den Übertrag. accu = highlowDD_0(lowD(accu)); // Die oberen i Bits von (uintDD)accu bilden hier den Übertrag. accu = (highlowDD_0(*sourceptr++)>>i)+accu; *destptr++ = highD(accu); }); return lowD(accu); } #else inline uintD shiftrightcopy_loop_up (const uintD* sourceptr, uintD* destptr, uintC count, uintC i, uintD carry) { var uintC j = intDsize-i; carry = carry << j; dotimesC(count,count, { var uintD accu = *sourceptr++; *destptr++ = (accu >> i) | carry; carry = accu << j; }); return carry; } #endif #endif #ifndef MUL_LOOPS // Multiplikations-Einfachschleife: // Multipliziert eine UDS mit einem kleinen Digit und addiert ein kleines Digit. // mulusmall_loop_down(digit,ptr,len,newdigit) // multipliziert die UDS ptr[-len..-1] mit digit (>=2, <=36), // addiert dabei newdigit (>=0, =0, 0) // mit dem einzelnen digit // und legt das Ergebnis in der UDS destptr[-len-1..-1] ab. #if HAVE_DD inline void mulu_loop_down (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len) { var uintDD carry = 0; dotimespC(len,len, { // Hier ist carry=digit=0 oder 0 <= carry < digit. carry = carry + muluD(digit,*--sourceptr); // Hier ist carry=digit=0 oder 0 <= carry < 2^intDsize*digit. *--destptr = lowD(carry); carry = (uintDD)highD(carry); // carry := floor(carry/2^intDsize) < digit }); *--destptr = lowD(carry); } #else inline void mulu_loop_down (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len) { var uintD carry = 0; dotimespC(len,len, { // Hier ist carry=digit=0 oder 0 <= carry < digit. var uintD hi; var uintD lo; muluD(digit,*--sourceptr,hi=,lo=); // Hier ist 0 <= 2^intDsize*hi + lo + carry < 2^intDsize*digit oder hi=lo=carry=digit=0. lo += carry; if (lo < carry) { hi += 1; } *--destptr = lo; carry = hi; }); *--destptr = carry; } #endif // Multiplikations-Einfachschleife mit Akkumulation: // Multipliziert eine UDS mit einem Digit und addiert das Ergebnis zu einer // zweiten UDS auf. // muluadd_loop_down(digit,sourceptr,destptr,len); // multipliziert die UDS sourceptr[-len..-1] (len>0) // mit dem einzelnen digit, legt das Ergebnis in der UDS destptr[-len..-1] // ab und liefert den weiteren Übertrag. #if HAVE_DD inline uintD muluadd_loop_down (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len) { var uintDD carry = 0; if (!(digit==0)) { dotimespC(len,len, { // Hier ist 0 <= carry <= digit. carry = carry + muluD(digit,*--sourceptr) + (uintDD)*--destptr; // Hier ist 0 <= carry <= 2^intDsize*digit + 2^intDsize-1. *destptr = lowD(carry); carry = (uintDD)highD(carry); // carry := floor(carry/2^intDsize) <= digit }); } return lowD(carry); } #else inline uintD muluadd_loop_down (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len) { var uintD carry = 0; if (!(digit==0)) { dotimespC(len,len, { // Hier ist 0 <= carry <= digit. var uintD hi; var uintD lo; muluD(digit,*--sourceptr,hi=,lo=); // Hier ist 0 <= 2^intDsize*hi + lo + carry + *--destptr <= 2^intDsize*digit+2^intDsize-1. lo += carry; if (lo < carry) { hi += 1; } carry = *--destptr; lo += carry; if (lo < carry) { hi += 1; } *destptr = lo; carry = hi; }); } return carry; } #endif // Multiplikations-Einfachschleife mit Diminution: // Multipliziert eine UDS mit einem Digit und subtrahiert das Ergebnis von // einer zweiten UDS. // mulusub_loop_down(digit,sourceptr,destptr,len); // multipliziert die UDS sourceptr[-len..-1] (len>0) mit dem einzelnen // digit, subtrahiert das Ergebnis von der UDS destptr[-len..-1] und liefert // den weiteren Übertrag (>=0, evtl. von destptr[-len-1] zu subtrahieren). #if HAVE_DD inline uintD mulusub_loop_down (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len) { var uintDD carry = 0; if (!(digit==0)) { dotimespC(len,len, { // Hier ist 0 <= carry <= digit. carry = carry + muluD(digit,*--sourceptr) + (uintD)(~(*--destptr)); // Hier ist 0 <= carry <= 2^intDsize*digit + 2^intDsize-1. *destptr = ~lowD(carry); carry = (uintDD)highD(carry); // carry := floor(carry/2^intDsize) <= digit // Hier ist 0 <= carry <= digit. }); return lowD(carry); } else return 0; // nichts zu subtrahieren -> kein Übertrag } #else inline uintD mulusub_loop_down (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len) { var uintD carry = 0; if (!(digit==0)) { dotimespC(len,len, { // Hier ist 0 <= carry <= digit. var uintD hi; var uintD lo; muluD(digit,*--sourceptr,hi=,lo=); // Hier ist 0 <= 2^intDsize*hi + lo + carry + ~(*--destptr) <= 2^intDsize*digit+2^intDsize-1. lo += carry; if (lo < carry) { hi += 1; } carry = *--destptr; *destptr = carry - lo; if (carry < lo) { hi += 1; } carry = hi; }); return carry; } else return 0; // nichts zu subtrahieren -> kein Übertrag } #endif #endif #ifndef DIV_LOOPS // Divisions-Einfachschleife: // Dividiert eine UDS durch ein Digit. // divu_loop_up(digit,ptr,len) // dividiert die UDS ptr[0..len-1] durch digit, // legt das Ergebnis in derselben UDS ab, und liefert den Rest (>=0, =0, =0) Digits abwärts ab xptr und ab yptr // mit Ziel ab xptr durch OR. inline void or_loop_down (uintD* xptr, const uintD* yptr, uintC count) { dotimesC(count,count, { *--xptr |= *--yptr; } ); } // XOR-Schleife: // xor_loop_down(xptr,yptr,count); // verknüpft count (uintC>=0) Digits abwärts ab xptr und ab yptr // mit Ziel ab xptr durch XOR. inline void xor_loop_down (uintD* xptr, const uintD* yptr, uintC count) { dotimesC(count,count, { *--xptr ^= *--yptr; } ); } // AND-Schleife: // and_loop_down(xptr,yptr,count); // verknüpft count (uintC>=0) Digits abwärts ab xptr und ab yptr // mit Ziel ab xptr durch AND. inline void and_loop_down (uintD* xptr, const uintD* yptr, uintC count) { dotimesC(count,count, { *--xptr &= *--yptr; } ); } // EQV-Schleife: // eqv_loop_down(xptr,yptr,count); // verknüpft count (uintC>=0) Digits abwärts ab xptr und ab yptr // mit Ziel ab xptr durch EQV (NOT XOR). inline void eqv_loop_down (uintD* xptr, const uintD* yptr, uintC count) { dotimesC(count,count, {var uintD temp = ~ (*--xptr ^ *--yptr); *xptr = temp; } ); } // NAND-Schleife: // nand_loop_down(xptr,yptr,count); // verknüpft count (uintC>=0) Digits abwärts ab xptr und ab yptr // mit Ziel ab xptr durch NAND (NOT AND). inline void nand_loop_down (uintD* xptr, const uintD* yptr, uintC count) { dotimesC(count,count, {var uintD temp = ~ (*--xptr & *--yptr); *xptr = temp; } ); } // NOR-Schleife: // nor_loop_down(xptr,yptr,count); // verknüpft count (uintC>=0) Digits abwärts ab xptr und ab yptr // mit Ziel ab xptr durch NOR (NOT OR). inline void nor_loop_down (uintD* xptr, const uintD* yptr, uintC count) { dotimesC(count,count, {var uintD temp = ~ (*--xptr | *--yptr); *xptr = temp; } ); } // ANDC2-Schleife: // andc2_loop_down(xptr,yptr,count); // verknüpft count (uintC>=0) Digits abwärts ab xptr und ab yptr // mit Ziel ab xptr durch ANDC2 (AND NOT). inline void andc2_loop_down (uintD* xptr, const uintD* yptr, uintC count) { dotimesC(count,count, { *--xptr &= ~(*--yptr); } ); } // ORC2-Schleife: // orc2_loop_down(xptr,yptr,count); // verknüpft count (uintC>=0) Digits abwärts ab xptr und ab yptr // mit Ziel ab xptr durch ORC2 (OR NOT). inline void orc2_loop_down (uintD* xptr, const uintD* yptr, uintC count) { dotimesC(count,count, { *--xptr |= ~(*--yptr); } ); } // NOT-Schleife: // not_loop_down(xptr,count); // verknüpft count (uintC>0) Digits abwärts ab xptr mit Ziel ab xptr // durch NOT. inline void not_loop_down (uintD* xptr, uintC count) { dotimespC(count,count, {var uintD temp = ~ (*--xptr); *xptr = temp; } ); } #endif #ifndef TEST_LOOPS // AND-Test-Schleife: // and_test_loop_down(xptr,yptr,count); // verknüpft count (uintC>=0) Digits abwärts ab xptr und ab yptr durch AND // und testet, ob sich dabei ein Digit /=0 ergibt. Ergebnis true, falls ja. inline bool and_test_loop_down (const uintD* xptr, const uintD* yptr, uintC count) { dotimesC(count,count, { if (*--xptr & *--yptr) return true; } ); return false; } // Vergleichsschleife: // result = compare_loop_down(xptr,yptr,count); // vergleicht nacheinander xptr[-1] mit yptr[-1], xptr[-2] mit yptr[-2], usw., // insgesamt count Digits, und liefert 0 falls alle gleich sind, // +1 falls zuerst ein xptr[i]>yptr[i] ist, // -1 falls zuerst ein xptr[i] *yptr ? signean_plus : signean_minus); }); return signean_null; // alle Digits gleich } #endif #ifndef ADDSUB_LOOPS // Additionsschleife: // übertrag = add_loop_up(sourceptr1,sourceptr2,destptr,count); // addiert count (uintC>=0) Digits aufwärts von sourceptr1, von sourceptr2 // aufwärts nach destptr und liefert den Übertrag (0 oder /=0, was 1 bedeutet). inline uintD add_loop_up (const uintD* sourceptr1, const uintD* sourceptr2, uintD* destptr, uintC count) { var uintD source1; var uintD source2; if (!(count==0)) do { source1 = *sourceptr1++; source2 = *sourceptr2++; *destptr++ = source1 + source2; if (source1 > (uintD)(~source2)) goto carry_1; carry_0: count--; } until (count==0); return 0; do { source1 = *sourceptr1++; source2 = *sourceptr2++; *destptr++ = source1 + source2 + 1; if (source1 < (uintD)(~source2)) goto carry_0; carry_1: count--; } until (count==0); return 1; } // Additionsschleife: // übertrag = addto_loop_up(sourceptr,destptr,count); // addiert count (uintC>=0) Digits aufwärts von sourceptr, von destptr // aufwärts nach destptr und liefert den Übertrag (0 oder /=0, was 1 bedeutet). inline uintD addto_loop_up (const uintD* sourceptr, uintD* destptr, uintC count) { var uintD source1; var uintD source2; if (!(count==0)) do { source1 = *sourceptr++; source2 = *destptr; *destptr++ = source1 + source2; if (source1 > (uintD)(~source2)) goto carry_1; carry_0: count--; } until (count==0); return 0; do { source1 = *sourceptr++; source2 = *destptr; *destptr++ = source1 + source2 + 1; if (source1 < (uintD)(~source2)) goto carry_0; carry_1: count--; } until (count==0); return 1; } // Incrementierschleife: // übertrag = inc_loop_up(ptr,count); // incrementiert count (uintC>=0) Digits aufwärts von ptr, so lange bis kein // Übertrag mehr auftritt und liefert den Übertrag (0 oder /=0, was 1 bedeutet). inline uintD inc_loop_up (uintD* ptr, uintC count) { dotimesC(count,count, { if (!( ++(*ptr++) == 0 )) return 0; } // kein weiterer Übertrag ); return 1; // weiterer Übertrag } // Subtraktionsschleife: // übertrag = sub_loop_up(sourceptr1,sourceptr2,destptr,count); // subtrahiert count (uintC>=0) Digits aufwärts von sourceptr1, von sourceptr2 // aufwärts nach destptr und liefert den Übertrag (0 oder /=0, was -1 bedeutet). inline uintD sub_loop_up (const uintD* sourceptr1, const uintD* sourceptr2, uintD* destptr, uintC count) { var uintD source1; var uintD source2; if (!(count==0)) do { source1 = *sourceptr1++; source2 = *sourceptr2++; *destptr++ = source1 - source2; if (source1 < source2) goto carry_1; carry_0: count--; } until (count==0); return 0; do { source1 = *sourceptr1++; source2 = *sourceptr2++; *destptr++ = source1 - source2 - 1; if (source1 > source2) goto carry_0; carry_1: count--; } until (count==0); return (uintD)(-1); } // Subtraktionsschleife: // übertrag = subx_loop_up(sourceptr1,sourceptr2,destptr,count,carry); // subtrahiert count (uintC>=0) Digits aufwärts von sourceptr1 und addiert // einen Carry (0 oder -1), von sourceptr2 aufwärts nach destptr und // liefert den Übertrag (0 oder /=0, was -1 bedeutet). inline uintD subx_loop_up (const uintD* sourceptr1, const uintD* sourceptr2, uintD* destptr, uintC count, uintD carry) { var uintD source1; var uintD source2; if (carry==0) { if (!(count==0)) do { source1 = *sourceptr1++; source2 = *sourceptr2++; *destptr++ = source1 - source2; if (source1 < source2) goto carry_1; carry_0: count--; } until (count==0); return 0; } else { if (!(count==0)) do { source1 = *sourceptr1++; source2 = *sourceptr2++; *destptr++ = source1 - source2 - 1; if (source1 > source2) goto carry_0; carry_1: count--; } until (count==0); return (uintD)(-1); } } // Subtraktionsschleife: // übertrag = subfrom_loop_up(sourceptr,destptr,count); // subtrahiert count (uintC>=0) Digits aufwärts von sourceptr, von destptr // aufwärts nach destptr (dest := dest - source) // und liefert den Übertrag (0 oder /=0, was -1 bedeutet). inline uintD subfrom_loop_up (const uintD* sourceptr, uintD* destptr, uintC count) { var uintD source1; var uintD source2; if (!(count==0)) do { source1 = *destptr; source2 = *sourceptr++; *destptr++ = source1 - source2; if (source1 < source2) goto carry_1; carry_0: count--; } until (count==0); return 0; do { source1 = *destptr; source2 = *sourceptr++; *destptr++ = source1 - source2 - 1; if (source1 > source2) goto carry_0; carry_1: count--; } until (count==0); return (uintD)(-1); } // Decrementierschleife: // übertrag = dec_loop_up(ptr,count); // decrementiert count (uintC>=0) Digits aufwärts von ptr, so lange bis kein // Übertrag mehr auftritt und liefert den Übertrag (0 oder -1). inline uintD dec_loop_up (uintD* ptr, uintC count) { dotimesC(count,count, { if (!( (*ptr++)-- == 0 )) return 0; } // kein weiterer Übertrag ); return (uintD)(-1); // weiterer Übertrag } // Negierschleife: // übertrag = neg_loop_up(ptr,count); // negiert count (uintC>=0) Digits aufwärts von ptr, // und liefert den Übertrag (0 oder -1). inline uintD neg_loop_up (uintD* ptr, uintC count) { // erstes Digit /=0 suchen: until (count==0) { if (!(*ptr == 0)) goto L1; ptr++; count--; } return 0; L1: // erstes Digit /=0 gefunden, ab jetzt gibt's Carrys *ptr = - *ptr; count--; // 1 Digit negieren dotimesC(count,count, { ptr++; *ptr = ~ *ptr; } ); // alle anderen Digits invertieren return (uintD)(-1); } #endif #ifndef SHIFT_LOOPS // Schiebeschleife um 1 Bit nach links: // übertrag = shift1left_loop_up(ptr,count); // schiebt count (uintC>=0) Digits aufwärts von ptr um 1 Bit nach links, // und liefert den Übertrag (0 oder /=0, was 1 bedeutet). #if HAVE_DD inline uintD shift1left_loop_up (uintD* ptr, uintC count) { var uintDD accu = 0; dotimesC(count,count, { accu = ((uintDD)(*ptr)<<1)+accu; *ptr++ = lowD(accu); accu = (uintDD)(highD(accu)); }); return (uintD)accu; } #else inline uintD shift1left_loop_up (uintD* ptr, uintC count) { var uintD carry = 0; dotimesC(count,count, { var uintD accu = *ptr; *ptr++ = (accu<<1) | carry; carry = accu>>(intDsize-1); }); return carry; } #endif // Schiebeschleife um i Bits nach links: // übertrag = shiftleft_loop_up(ptr,count,i,übertrag_init); // schiebt count (uintC>=0) Digits aufwärts von ptr um i Bits (0=0, <2^i). #if HAVE_DD inline uintD shiftleft_loop_up (uintD* ptr, uintC count, uintC i, uintD carry) { var uintDD accu = (uintDD)carry; dotimesC(count,count, { accu = ((uintDD)(*ptr)<>j; }); return carry; } #endif // Schiebe- und Kopierschleife um i Bits nach links: // übertrag = shiftleftcopy_loop_up(sourceptr,destptr,count,i); // kopiert count (uintC>=0) Digits aufwärts von sourceptr nach destptr // und schiebt sie dabei um i Bits (0=0, <2^i). #if HAVE_DD inline uintD shiftleftcopy_loop_up (const uintD* sourceptr, uintD* destptr, uintC count, uintC i) { var uintDD accu = 0; dotimesC(count,count, { accu = ((uintDD)(*sourceptr++)<>j; }); return carry; } #endif // Schiebeschleife um 1 Bit nach rechts: // übertrag = shift1right_loop_down(ptr,count,übertrag_init); // schiebt count (uintC>=0) Digits abwärts von ptr um 1 Bit nach rechts, // wobei links das Bit übertrag_init (sollte =0 oder =-1 sein) hineingeschoben // wird, und liefert den Übertrag (0 oder /=0, was 1 bedeutet). #if HAVE_DD inline uintD shift1right_loop_down (uintD* ptr, uintC count, uintD carry) { var uintDD accu = (sintDD)(sintD)carry & ((uintDD)1 << (2*intDsize-1)); // 0 oder bit(2*intDsize-1) dotimesC(count,count, { accu = (highlowDD_0(*--ptr)>>1)+accu; *ptr = highD(accu); accu = highlowDD_0(lowD(accu)); }); return highD(accu); } #else inline uintD shift1right_loop_down (uintD* ptr, uintC count, uintD carry) { carry = carry << (intDsize-1); // carry zu einem einzigen Bit machen dotimesC(count,count, { var uintD accu = *--ptr; *ptr = (accu >> 1) | carry; carry = accu << (intDsize-1); }); return carry; } #endif // Schiebeschleife um i Bits nach rechts: // übertrag = shiftright_loop_down(ptr,count,i); // schiebt count (uintC>=0) Digits abwärts von ptr um i Bits (0>i)+accu; *ptr = highD(accu); }); return lowD(accu); } #else inline uintD shiftright_loop_down (uintD* ptr, uintC count, uintC i) { var uintC j = intDsize-i; var uintD carry = 0; dotimesC(count,count, { var uintD accu = *--ptr; *ptr = (accu >> i) | carry; carry = accu << j; }); return carry; } #endif // Schiebeschleife um i Bits nach rechts: // übertrag = shiftrightsigned_loop_down(ptr,count,i); // schiebt count (uintC>0) Digits abwärts von ptr um i Bits (0>i; dotimespC(count,count, { // Die oberen i Bits von (uintD)accu bilden hier den Übertrag. accu = highlowDD_0(lowD(accu)); // Die oberen i Bits von (uintDD)accu bilden hier den Übertrag. accu = (highlowDD_0(*--ptr)>>i)+accu; *ptr = highD(accu); }); return lowD(accu); } #else inline uintD shiftrightsigned_loop_down (uintD* ptr, uintC count, uintC i) { var uintC j = intDsize-i; var uintD carry; { var uintD accu = *--ptr; *ptr = (sintD)accu >> i; carry = accu << j; count--; } dotimesC(count,count, { var uintD accu = *--ptr; *ptr = (accu >> i) | carry; carry = accu << j; }); return carry; } #endif // Schiebe- und Kopier-Schleife um i Bits nach rechts: // übertrag = shiftrightcopy_loop_down(sourceptr,destptr,count,i,carry); // kopiert count (uintC>=0) Digits abwärts von sourceptr nach destptr // und schiebt sie dabei um i Bits (0>i; dotimesC(count,count, { // Die oberen i Bits von (uintD)accu bilden hier den Übertrag. accu = highlowDD_0(lowD(accu)); // Die oberen i Bits von (uintDD)accu bilden hier den Übertrag. accu = (highlowDD_0(*--sourceptr)>>i)+accu; *--destptr = highD(accu); }); return lowD(accu); } #else inline uintD shiftrightcopy_loop_down (const uintD* sourceptr, uintD* destptr, uintC count, uintC i, uintD carry) { var uintC j = intDsize-i; carry = carry << j; dotimesC(count,count, { var uintD accu = *--sourceptr; *--destptr = (accu >> i) | carry; carry = accu << j; }); return carry; } #endif #endif #ifndef MUL_LOOPS // Multiplikations-Einfachschleife: // Multipliziert eine UDS mit einem kleinen Digit und addiert ein kleines Digit. // mulusmall_loop_up(digit,ptr,len,newdigit) // multipliziert die UDS ptr[0..len-1] mit digit (>=2, <=36), // addiert dabei newdigit (>=0, =0, 0) // mit dem einzelnen digit // und legt das Ergebnis in der UDS destptr[0..len] ab. #if HAVE_DD inline void mulu_loop_up (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len) { var uintDD carry = 0; dotimespC(len,len, { // Hier ist carry=digit=0 oder 0 <= carry < digit. carry = carry + muluD(digit,*sourceptr++); // Hier ist carry=digit=0 oder 0 <= carry < 2^intDsize*digit. *destptr++ = lowD(carry); carry = (uintDD)highD(carry); // carry := floor(carry/2^intDsize) < digit }); *destptr++ = lowD(carry); } #else inline void mulu_loop_up (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len) { var uintD carry = 0; dotimespC(len,len, { // Hier ist carry=digit=0 oder 0 <= carry < digit. var uintD hi; var uintD lo; muluD(digit,*sourceptr++,hi=,lo=); // Hier ist 0 <= 2^intDsize*hi + lo + carry < 2^intDsize*digit oder hi=lo=carry=digit=0. lo += carry; if (lo < carry) { hi += 1; } *destptr++ = lo; carry = hi; }); *destptr++ = carry; } #endif // Multiplikations-Einfachschleife mit Akkumulation: // Multipliziert eine UDS mit einem Digit und addiert das Ergebnis zu einer // zweiten UDS auf. // muluadd_loop_up(digit,sourceptr,destptr,len); // multipliziert die UDS sourceptr[0..len-1] (len>0) // mit dem einzelnen digit, legt das Ergebnis in der UDS destptr[0..len-1] // ab und liefert den weiteren Übertrag. #if HAVE_DD inline uintD muluadd_loop_up (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len) { var uintDD carry = 0; if (!(digit==0)) { dotimespC(len,len, { // Hier ist 0 <= carry <= digit. carry = carry + muluD(digit,*sourceptr++) + (uintDD)*destptr; // Hier ist 0 <= carry <= 2^intDsize*digit + 2^intDsize-1. *destptr++ = lowD(carry); carry = (uintDD)highD(carry); // carry := floor(carry/2^intDsize) <= digit }); } return lowD(carry); } #else inline uintD muluadd_loop_up (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len) { var uintD carry = 0; if (!(digit==0)) { dotimespC(len,len, { // Hier ist 0 <= carry <= digit. var uintD hi; var uintD lo; muluD(digit,*sourceptr++,hi=,lo=); // Hier ist 0 <= 2^intDsize*hi + lo + carry + *destptr <= 2^intDsize*digit+2^intDsize-1. lo += carry; if (lo < carry) { hi += 1; } carry = *destptr; lo += carry; if (lo < carry) { hi += 1; } *destptr++ = lo; carry = hi; }); } return carry; } #endif // Multiplikations-Einfachschleife mit Diminution: // Multipliziert eine UDS mit einem Digit und subtrahiert das Ergebnis von // einer zweiten UDS. // mulusub_loop_up(digit,sourceptr,destptr,len); // multipliziert die UDS sourceptr[0..len-1] (len>0) mit dem einzelnen // digit, subtrahiert das Ergebnis von der UDS destptr[0..len-1] und liefert // den weiteren Übertrag (>=0, evtl. von destptr[len] zu subtrahieren). #if HAVE_DD inline uintD mulusub_loop_up (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len) { var uintDD carry = 0; if (!(digit==0)) { dotimespC(len,len, { // Hier ist 0 <= carry <= digit. carry = carry + muluD(digit,*sourceptr++) + (uintD)(~(*destptr)); // Hier ist 0 <= carry <= 2^intDsize*digit + 2^intDsize-1. *destptr++ = ~lowD(carry); carry = (uintDD)highD(carry); // carry := floor(carry/2^intDsize) <= digit // Hier ist 0 <= carry <= digit. }); return lowD(carry); } else return 0; // nichts zu subtrahieren -> kein Übertrag } #else inline uintD mulusub_loop_up (uintD digit, const uintD* sourceptr, uintD* destptr, uintC len) { var uintD carry = 0; if (!(digit==0)) { dotimespC(len,len, { // Hier ist 0 <= carry <= digit. var uintD hi; var uintD lo; muluD(digit,*sourceptr++,hi=,lo=); // Hier ist 0 <= 2^intDsize*hi + lo + carry + ~(*destptr) <= 2^intDsize*digit+2^intDsize-1. lo += carry; if (lo < carry) { hi += 1; } carry = *destptr; *destptr++ = carry - lo; if (carry < lo) { hi += 1; } carry = hi; }); return carry; } else return 0; // nichts zu subtrahieren -> kein Übertrag } #endif #endif #ifndef DIV_LOOPS // Divisions-Einfachschleife: // Dividiert eine UDS durch ein Digit. // divu_loop_down(digit,ptr,len) // dividiert die UDS ptr[-len..-1] durch digit, // legt das Ergebnis in derselben UDS ab, und liefert den Rest (>=0, =0, yptr[i] ist, // -1 falls zuerst ein xptr[i] *--yptr ? signean_plus : signean_minus); }); return signean_null; // alle Digits gleich } #endif #if !defined(LOG_LOOPS) && !CL_DS_BIG_ENDIAN_P // XOR-Schleife: // xor_loop_up(xptr,yptr,count); // verknüpft count (uintC>=0) Digits aufwärts ab xptr und ab yptr // mit Ziel ab xptr durch XOR. inline void xor_loop_up (uintD* xptr, const uintD* yptr, uintC count) { dotimesC(count,count, { *xptr++ ^= *yptr++; } ); } #endif #if !defined(SHIFT_LOOPS) && CL_DS_BIG_ENDIAN_P // Schiebe- und Kopierschleife um i Bits nach links: // übertrag = shiftleftcopy_loop_up(sourceptr,destptr,count,i); // kopiert count (uintC>=0) Digits aufwärts von sourceptr nach destptr // und schiebt sie dabei um i Bits (0=0, <2^i). #if HAVE_DD inline uintD shiftleftcopy_loop_up (const uintD* sourceptr, uintD* destptr, uintC count, uintC i) { var uintDD accu = 0; dotimesC(count,count, { accu = ((uintDD)(*sourceptr++)<>j; }); return carry; } #endif #endif #if !defined(SHIFT_LOOPS) // Schiebe- und XOR-Schleife: // shiftxor_loop_up(xptr,yptr,count,i); // verknüpft count+1 Digits aufwärts ab xptr mit count Digits aufwärts ab yptr, // um i Bits verschoben, durch XOR. (count uintC>=0, 0 0) { var uintD carry = xptr[0]; dotimespC(count,count, { var uintDD accu = highlowDD(xptr[1],carry); accu = ((uintDD)(*yptr++)< 0) { var uintC j = intDsize-i; var uintD carry = *xptr; dotimespC(count,count, { var uintD accu = *yptr++; *xptr++ = (accu<>j) ^ *xptr; }); *xptr = carry; } } #endif #endif // Endianness independent names for these functions. #if CL_DS_BIG_ENDIAN_P #define copy_loop_msp copy_loop_up #define copy_loop_lsp copy_loop_down #define fill_loop_msp fill_loop_up #define fill_loop_lsp fill_loop_down #define clear_loop_msp clear_loop_up #define clear_loop_lsp clear_loop_down #define test_loop_msp test_loop_up #define or_loop_msp or_loop_up #define xor_loop_msp xor_loop_up #define and_loop_msp and_loop_up #define eqv_loop_msp eqv_loop_up #define nand_loop_msp nand_loop_up #define nor_loop_msp nor_loop_up #define andc2_loop_msp andc2_loop_up #define orc2_loop_msp orc2_loop_up #define not_loop_msp not_loop_up #define and_test_loop_msp and_test_loop_up #define compare_loop_msp compare_loop_up #define add_loop_lsp add_loop_down #define addto_loop_lsp addto_loop_down #define inc_loop_lsp inc_loop_down #define sub_loop_lsp sub_loop_down #define subx_loop_lsp subx_loop_down #define subfrom_loop_lsp subfrom_loop_down #define dec_loop_lsp dec_loop_down #define neg_loop_lsp neg_loop_down #define shift1left_loop_lsp shift1left_loop_down #define shiftleft_loop_lsp shiftleft_loop_down #define shiftleftcopy_loop_lsp shiftleftcopy_loop_down #define shift1right_loop_msp shift1right_loop_up #define shiftright_loop_msp shiftright_loop_up #define shiftrightsigned_loop_msp shiftrightsigned_loop_up #define shiftrightcopy_loop_msp shiftrightcopy_loop_up #define mulusmall_loop_lsp mulusmall_loop_down #define mulu_loop_lsp mulu_loop_down #define muluadd_loop_lsp muluadd_loop_down #define mulusub_loop_lsp mulusub_loop_down #define divu_loop_msp divu_loop_up #define divucopy_loop_msp divucopy_loop_up #else #define copy_loop_msp copy_loop_down #define copy_loop_lsp copy_loop_up #define fill_loop_msp fill_loop_down #define fill_loop_lsp fill_loop_up #define clear_loop_msp clear_loop_down #define clear_loop_lsp clear_loop_up #define test_loop_msp test_loop_down #define or_loop_msp or_loop_down #define xor_loop_msp xor_loop_down #define and_loop_msp and_loop_down #define eqv_loop_msp eqv_loop_down #define nand_loop_msp nand_loop_down #define nor_loop_msp nor_loop_down #define andc2_loop_msp andc2_loop_down #define orc2_loop_msp orc2_loop_down #define not_loop_msp not_loop_down #define and_test_loop_msp and_test_loop_down #define compare_loop_msp compare_loop_down #define add_loop_lsp add_loop_up #define addto_loop_lsp addto_loop_up #define inc_loop_lsp inc_loop_up #define sub_loop_lsp sub_loop_up #define subx_loop_lsp subx_loop_up #define subfrom_loop_lsp subfrom_loop_up #define dec_loop_lsp dec_loop_up #define neg_loop_lsp neg_loop_up #define shift1left_loop_lsp shift1left_loop_up #define shiftleft_loop_lsp shiftleft_loop_up #define shiftleftcopy_loop_lsp shiftleftcopy_loop_up #define shift1right_loop_msp shift1right_loop_down #define shiftright_loop_msp shiftright_loop_down #define shiftrightsigned_loop_msp shiftrightsigned_loop_down #define shiftrightcopy_loop_msp shiftrightcopy_loop_down #define mulusmall_loop_lsp mulusmall_loop_up #define mulu_loop_lsp mulu_loop_up #define muluadd_loop_lsp muluadd_loop_up #define mulusub_loop_lsp mulusub_loop_up #define divu_loop_msp divu_loop_down #define divucopy_loop_msp divucopy_loop_down #endif // Endianness independent loops where the direction doesn't matter. #if CL_DS_BIG_ENDIAN_P #define DS_clear_loop(MSDptr,len,LSDptr) (void)clear_loop_up(MSDptr,len) #define DS_test_loop(MSDptr,len,LSDptr) test_loop_up(MSDptr,len) #else #define DS_clear_loop(MSDptr,len,LSDptr) (void)clear_loop_up(LSDptr,len) #define DS_test_loop(MSDptr,len,LSDptr) test_loop_up(LSDptr,len) #endif // Umwandlungsroutinen Digit-Sequence-Teil <--> Longword: // get_32_Dptr(ptr) // holt die nächsten 32 Bits aus den 32/intDsize Digits ab ptr. // set_32_Dptr(ptr,wert); // speichert den Wert wert (32 Bits) in die 32/intDsize Digits ab ptr. // get_max32_Dptr(count,ptr) // holt die nächsten count Bits aus den ceiling(count/intDsize) Digits ab ptr. // set_max32_Dptr(count,ptr,wert) // speichert wert (count Bits) in die ceiling(count/intDsize) Digits ab ptr. // Jeweils ptr eine Variable vom Typ uintD*, // wert eine Variable vom Typ uint32, // count eine Variable oder constant-expression mit Wert >=0, <=32. #if (intDsize==32) inline uint32 get_32_Dptr (const uintD* ptr) { return mspref(ptr,0); } inline void set_32_Dptr (uintD* ptr, uint32 wert) { mspref(ptr,0) = wert; } inline uint32 get_max32_Dptr (uintC count, const uintD* ptr) { return count==0 ? 0 : mspref(ptr,0); } inline void set_max32_Dptr (uintC count, uintD* ptr, uint32 wert) { if (count==0) return; mspref(ptr,0) = wert; return; } #endif #if (intDsize==16) inline uint32 get_32_Dptr (const uintD* ptr) { return ((uint32)mspref(ptr,0)<<16) | (uint32)mspref(ptr,1); } inline void set_32_Dptr (uintD* ptr, uint32 wert) { mspref(ptr,0) = (uintD)(wert>>16); mspref(ptr,1) = (uintD)wert; } inline uint32 get_max32_Dptr (uintC count, const uintD* ptr) { return count==0 ? 0 : count<=16 ? mspref(ptr,0) : ((uint32)mspref(ptr,0)<<16) | (uint32)mspref(ptr,1); } inline void set_max32_Dptr (uintC count, uintD* ptr, uint32 wert) { if (count==0) return; if (count<=16) { mspref(ptr,0) = (uintD)wert; return; } mspref(ptr,0) = (uintD)(wert>>16); mspref(ptr,1) = (uintD)wert; return; } #endif #if (intDsize==8) inline uint32 get_32_Dptr (const uintD* ptr) { return ((((((uint32)mspref(ptr,0) <<8) | (uint32)mspref(ptr,1)) <<8) | (uint32)mspref(ptr,2)) <<8) | (uint32)mspref(ptr,3); } inline void set_32_Dptr (uintD* ptr, uint32 wert) { mspref(ptr,0) = (uintD)(wert>>24); mspref(ptr,1) = (uintD)(wert>>16); mspref(ptr,2) = (uintD)(wert>>8); mspref(ptr,3) = (uintD)wert; } inline uint32 get_max32_Dptr (uintC count, const uintD* ptr) { return count==0 ? 0 : count<=8 ? mspref(ptr,0) : count<=16 ? ((uint32)mspref(ptr,0)<<8) | (uint32)mspref(ptr,1) : count<=24 ? ((((uint32)mspref(ptr,0)<<8) | (uint32)mspref(ptr,1))<<8) | (uint32)mspref(ptr,2) : ((((((uint32)mspref(ptr,0)<<8) | (uint32)mspref(ptr,1))<<8) | (uint32)mspref(ptr,2))<<8) | (uint32)mspref(ptr,3); } inline void set_max32_Dptr (uintC count, uintD* ptr, uint32 wert) { if (count==0) return; if (count<=8) { mspref(ptr,0) = (uintD)wert; return; } if (count<=16) { mspref(ptr,0) = (uintD)(wert>>8); mspref(ptr,1) = (uintD)wert; return; } if (count<=24) { mspref(ptr,0) = (uintD)(wert>>16); mspref(ptr,1) = (uintD)(wert>>8); mspref(ptr,2) = (uintD)wert; return; } mspref(ptr,0) = (uintD)(wert>>24); mspref(ptr,1) = (uintD)(wert>>16); mspref(ptr,2) = (uintD)(wert>>8); mspref(ptr,3) = (uintD)wert; return; } #endif #if (cl_word_size==64) // get_64_Dptr(ptr) // holt die nächsten 64 Bits aus den 64/intDsize Digits ab ptr. // set_64_Dptr(ptr,wert); // speichert den Wert wert (64 Bits) in die 64/intDsize Digits ab ptr. // get_max64_Dptr(count,ptr) // holt die nächsten count Bits aus den ceiling(count/intDsize) Digits ab ptr. // set_max64_Dptr(count,ptr,wert) // speichert wert (count Bits) in die ceiling(count/intDsize) Digits ab ptr. // Jeweils ptr eine Variable vom Typ uintD*, // wert eine Variable vom Typ uint64, // count eine Variable oder constant-expression mit Wert >=0, <=64. #if (intDsize==64) inline uint64 get_64_Dptr (const uintD* ptr) { return mspref(ptr,0); } inline void set_64_Dptr (uintD* ptr, uint64 wert) { mspref(ptr,0) = wert; } inline uint64 get_max64_Dptr (uintC count, const uintD* ptr) { return count==0 ? 0 : mspref(ptr,0); } inline void set_max64_Dptr (uintC count, uintD* ptr, uint64 wert) { if (count==0) return; mspref(ptr,0) = wert; return; } #else // (intDsize<=32) inline uint64 get_64_Dptr (const uintD* ptr) { return ((uint64)get_32_Dptr(ptr) << 32) | (uint64)get_32_Dptr(ptr mspop 32/intDsize); } inline void set_64_Dptr (uintD* ptr, uint64 wert) { set_32_Dptr(ptr,(uint32)(wert>>32)); set_32_Dptr(ptr mspop 32/intDsize,(uint32)wert); } inline uint64 get_max64_Dptr (uintC count, const uintD* ptr) { return count==0 ? 0 : count<=32 ? (uint64)get_max32_Dptr(count,ptr) : ((uint64)get_max32_Dptr(count-32,ptr) << 32) | (uint64)get_32_Dptr(ptr mspop ceiling(count-32,intDsize)); } inline void set_max64_Dptr (uintC count, uintD* ptr, uint64 wert) { if (count==0) return; if (count<=32) { set_max32_Dptr(count,ptr,(uint32)wert); return; } set_max32_Dptr(count-32,ptr,(uint32)(wert>>32)); set_32_Dptr(ptr mspop ceiling(count-32,intDsize),(uint32)wert); return; } #endif #endif // get_uint1D_Dptr(ptr) holt 1 Digit (unsigned) ab ptr // get_uint2D_Dptr(ptr) holt 2 Digits (unsigned) ab ptr // get_uint3D_Dptr(ptr) holt 3 Digits (unsigned) ab ptr // get_uint4D_Dptr(ptr) holt 4 Digits (unsigned) ab ptr // get_sint1D_Dptr(ptr) holt 1 Digit (signed) ab ptr // get_sint2D_Dptr(ptr) holt 2 Digits (signed) ab ptr // get_sint3D_Dptr(ptr) holt 3 Digits (signed) ab ptr // get_sint4D_Dptr(ptr) holt 4 Digits (signed) ab ptr // Jeweils ptr eine Variable vom Typ uintD*. // NB: Bei intDsize==64 sind diese Funktionen nur sehr bedingt tauglich. inline uint32 get_uint1D_Dptr (const uintD* ptr) { return lspref(ptr,0); } inline sint32 get_sint1D_Dptr (const uintD* ptr) { return (sint32)(sintD)lspref(ptr,0); } #if (intDsize < 32) inline uint32 get_uint2D_Dptr (const uintD* ptr) { return ((uint32)lspref(ptr,1) << intDsize) | (uint32)lspref(ptr,0); } inline sint32 get_sint2D_Dptr (const uintD* ptr) { return ((uint32)(sint32)(sintD)lspref(ptr,1) << intDsize) | (uint32)lspref(ptr,0); } #else #define get_uint2D_Dptr(ptr) get_uint1D_Dptr(ptr) #define get_sint2D_Dptr(ptr) (sint32)get_uint2D_Dptr(ptr) #endif #if (intDsize < 16) inline uint32 get_uint3D_Dptr (const uintD* ptr) { return ((((uint32)lspref(ptr,2) << intDsize) | (uint32)lspref(ptr,1)) << intDsize) | (uint32)lspref(ptr,0); } inline sint32 get_sint3D_Dptr (const uintD* ptr) { return ((((uint32)(sint32)(sintD)lspref(ptr,2) << intDsize) | (uint32)lspref(ptr,1)) << intDsize) | (uint32)lspref(ptr,0); } inline uint32 get_uint4D_Dptr (const uintD* ptr) { return ((((((uint32)lspref(ptr,3) << intDsize) | (uint32)lspref(ptr,2)) << intDsize) | (uint32)lspref(ptr,1)) << intDsize) | (uint32)lspref(ptr,0); } inline sint32 get_sint4D_Dptr (const uintD* ptr) { return ((((((uint32)(sint32)(sintD)lspref(ptr,3) << intDsize) | (uint32)lspref(ptr,2)) << intDsize) | (uint32)lspref(ptr,1)) << intDsize) | (uint32)lspref(ptr,0); } #else #define get_uint3D_Dptr(ptr) get_uint2D_Dptr(ptr) #define get_sint3D_Dptr(ptr) (sint32)get_uint3D_Dptr(ptr) #define get_uint4D_Dptr(ptr) get_uint2D_Dptr(ptr) #define get_sint4D_Dptr(ptr) (sint32)get_uint4D_Dptr(ptr) #endif // NUM_STACK ist eine Art Zahlen-Stack-Pointer. // Verwendung: // {CL_ALLOCA_STACK; // ... // num_stack_alloc(...); // ... // num_stack_array(...); // ... // } // CL_ALLOCA_STACK rettet den aktuellen Wert von NUM_STACK. // Dann darf beliebig oft mit num_stack_alloc/num_stack_array Platz auf dem // Zahlen-Stack belegt werden. // Beim Ende des Blocks wird NUM_STACK wieder auf den vorigen Wert gesetzt, // und der Platz gilt als wieder freigegeben. // In jeder C-Funktion sollte CL_ALLOCA_STACK nur einmal aufgerufen werden. // Wegen eines GCC-Bugs sollten Funktionen, die diese Macros benutzen, // nicht inline deklariert sein. // num_stack_array(need, low_addr = , high_addr = ); // num_stack_small_array(need, low_addr = , high_addr = ); // belegt need Digits auf dem Zahlen-Stack und legt die untere Grenze des // allozierten Bereichs in low_addr und die obere Grenze in high_addr ab. // Jedes von beiden ist optional. // num_stack_alloc(need, MSDptr = , LSDptr = ); // num_stack_small_alloc(need, MSDptr = , LSDptr = ); // belegt need Digits auf dem Zahlen-Stack und legt den MSDptr und den // LSDptr ab. Jedes von beiden ist optional. // num_stack_alloc_1(need, MSDptr = , LSDptr = ); // num_stack_small_alloc_1(need, MSDptr = , LSDptr = ); // wie num_stack_alloc, nur daß unterhalb von MSDptr noch ein Digit Platz // zusätzlich belegt wird. #define num_stack_array(need,low_zuweisung,high_zuweisung) \ {var uintC __need = (uintC)(need); \ var uintD* __array = cl_alloc_array(uintD,__need); \ unused (low_zuweisung &__array[0]); unused (high_zuweisung &__array[__need]); \ } #define num_stack_small_array(need,low_zuweisung,high_zuweisung) \ {var uintC __need = (uintC)(need); \ var uintD* __array = cl_small_alloc_array(uintD,__need); \ unused (low_zuweisung &__array[0]); unused (high_zuweisung &__array[__need]); \ } #if CL_DS_BIG_ENDIAN_P #define num_stack_alloc(need,MSDptr_zuweisung,LSDptr_zuweisung) \ num_stack_array(need,MSDptr_zuweisung,LSDptr_zuweisung) #define num_stack_small_alloc(need,MSDptr_zuweisung,LSDptr_zuweisung) \ num_stack_small_array(need,MSDptr_zuweisung,LSDptr_zuweisung) #define num_stack_alloc_1(need,MSDptr_zuweisung,LSDptr_zuweisung) \ num_stack_array((uintC)(need)+1,MSDptr_zuweisung 1 + ,LSDptr_zuweisung) #define num_stack_small_alloc_1(need,MSDptr_zuweisung,LSDptr_zuweisung) \ num_stack_small_array((uintC)(need)+1,MSDptr_zuweisung 1 + ,LSDptr_zuweisung) #else #define num_stack_alloc(need,MSDptr_zuweisung,LSDptr_zuweisung) \ num_stack_array(need,LSDptr_zuweisung,MSDptr_zuweisung) #define num_stack_small_alloc(need,MSDptr_zuweisung,LSDptr_zuweisung) \ num_stack_small_array(need,LSDptr_zuweisung,MSDptr_zuweisung) #define num_stack_alloc_1(need,MSDptr_zuweisung,LSDptr_zuweisung) \ num_stack_array((uintC)(need)+1,LSDptr_zuweisung,MSDptr_zuweisung -1 + ) #define num_stack_small_alloc_1(need,MSDptr_zuweisung,LSDptr_zuweisung) \ num_stack_small_array((uintC)(need)+1,LSDptr_zuweisung,MSDptr_zuweisung -1 + ) #endif // Macro: In der DS MSDptr/len/LSDptr wird eine 1 unterhalb des Pointers ptr // addiert. Unterhalb von MSDptr muß 1 Digit Platz sein. // Dabei ist ptr - MSDptr = count und 0 < count <= len . // Eventuell wird MSDptr erniedrigt und len erhöht. #define DS_1_plus(ptr,count) \ {var uintD* ptr_from_DS_1_plus = (ptr); \ var uintC count_from_DS_1_plus = (count); \ loop { if (--count_from_DS_1_plus==0) /* Zähler erniedrigen */\ { /* Beim Most Significant Digit angelangt */\ lsprefnext(ptr_from_DS_1_plus) += 1; \ /* jetzt ist ptr_from_DS_1_plus = MSDptr */\ if (mspref(ptr_from_DS_1_plus,0) == (uintD)bit(intDsize-1)) \ { /* 7FFF + 1 muß zu 00008000 werden: */\ lsprefnext(MSDptr) = 0; \ len++; \ } \ break; \ } \ if (!((lsprefnext(ptr_from_DS_1_plus) += 1) == 0)) /* weiterincrementieren */\ break; /* kein weiterer Übertrag -> Schleife abbrechen */\ } } // Macro: In der DS MSDptr/len/LSDptr wird eine 1 unterhalb des Pointers ptr // subtrahiert. Unterhalb von MSDptr muß 1 Digit Platz sein. // Dabei ist ptr - MSDptr = count und 0 < count <= len . // Eventuell wird MSDptr erniedrigt und len erhöht. #define DS_minus1_plus(ptr,count) \ {var uintD* ptr_from_DS_minus1_plus = (ptr); \ var uintC count_from_DS_minus1_plus = (count); \ loop { if (--count_from_DS_minus1_plus==0) /* Zähler erniedrigen */\ { /* Beim Most Significant Digit angelangt */\ lsprefnext(ptr_from_DS_minus1_plus) -= 1; \ /* jetzt ist ptr_from_DS_minus1_plus = MSDptr */\ if (mspref(ptr_from_DS_minus1_plus,0) == (uintD)bit(intDsize-1)-1) \ { /* 8000 - 1 muß zu FFFF7FFF werden: */\ lsprefnext(MSDptr) = (uintD)(-1); \ len++; \ } \ break; \ } \ if (!((sintD)(lsprefnext(ptr_from_DS_minus1_plus) -= 1) == -1)) /* weiterdecrementieren */\ break; /* kein weiterer Übertrag -> Schleife abbrechen */\ } } // Multiplikations-Doppelschleife: // Multipliziert zwei UDS und legt das Ergebnis in einer dritten UDS ab. // cl_UDS_mul(sourceptr1,len1,sourceptr2,len2,destptr); // multipliziert die UDS sourceptr1[-len1..-1] (len1>0) // mit der UDS sourceptr2[-len1..-1] (len2>0) // und legt das Ergebnis in der UDS destptr[-len..-1] (len=len1+len2) ab. // Unterhalb von destptr werden len Digits Platz benötigt. extern void cl_UDS_mul (const uintD* sourceptr1, uintC len1, const uintD* sourceptr2, uintC len2, uintD* destptr); // Spezialfall sourceptr1 == sourceptr2 && len1 == len2. extern void cl_UDS_mul_square (const uintD* sourceptr, uintC len, uintD* destptr); // Multipliziert zwei Unsigned-Digit-sequences. // UDS_UDS_mul_UDS(len1,LSDptr1, len2,LSDptr2, MSDptr=,len=,LSDptr=); // multipliziert die UDS ../len1/LSDptr1 und ../len2/LSDptr2. // Dabei sollte len1>0 und len2>0 sein. // Ergebnis ist die UDS MSDptr/len/LSDptr, mit len=len1+len2, im Stack. // Dabei wird num_stack erniedrigt. #define UDS_UDS_mul_UDS(len1,LSDptr1,len2,LSDptr2, MSDptr_zuweisung,len_zuweisung,LSDptr_zuweisung) \ var uintC CONCAT(len_from_UDSmul_,__LINE__) = (uintC)(len1) + (uintC)(len2); \ var uintD* CONCAT(LSDptr_from_UDSmul_,__LINE__); \ unused (len_zuweisung CONCAT(len_from_UDSmul_,__LINE__)); \ num_stack_alloc(CONCAT(len_from_UDSmul_,__LINE__),MSDptr_zuweisung,LSDptr_zuweisung CONCAT(LSDptr_from_UDSmul_,__LINE__) =); \ cl_UDS_mul((LSDptr1),(len1),(LSDptr2),(len2),CONCAT(LSDptr_from_UDSmul_,__LINE__)); // Multipliziert zwei Digit-sequences. // DS_DS_mul_DS(MSDptr1,len1,LSDptr1, MSDptr2,len2,LSDptr2, MSDptr=,len=,LSDptr=); // multipliziert die DS MSDptr1/len1/LSDptr1 und MSDptr2/len2/LSDptr2. // Dabei sollte len1>0 und len2>0 sein, und beide DS sollten /= 0 sein. // Alles sollten Variablen sein! // Ergebnis ist die DS MSDptr/len/LSDptr, mit len=len1+len2, im Stack. // Dabei wird num_stack erniedrigt. // Methode: // Erst unsigned multiplizieren. Dann bis zu zwei Subtraktionen. // Sei b=2^intDsize, k=len1, l=len2, n=DS1, m=DS2. // Gesucht ist n * m. // Wir errechnen erst das unsigned-product p (mod b^(k+l)). // n>0, m>0: p = n*m, n*m = p // n<0, m>0: p = (n+b^k)*m, n*m + b^(k+l) = p - b^k * m (mod b^(k+l)). // n>0, m<0: p = n*(m+b^l), n*m + b^(k+l) = p - b^l * n (mod b^(k+l)). // n<0, m<0: p = (n+b^k)*(m+b^l), // n*m = p - b^k * (m+b^l) - b^l * (n+b^k) (mod b^(k+l)). #define DS_DS_mul_DS(MSDptr1,len1,LSDptr1,MSDptr2,len2,LSDptr2, MSDptr_zuweisung,len_zuweisung,LSDptr_zuweisung) \ var uintD* MSDptr0; \ var uintD* LSDptr0; \ var uintC len_from_DSmal = (uintC)(len1) + (uintC)(len2); \ unused (len_zuweisung len_from_DSmal); \ num_stack_alloc(len_from_DSmal,MSDptr_zuweisung MSDptr0 =,LSDptr_zuweisung LSDptr0 =); \ var uintD MSD1_from_DSmal = mspref(MSDptr1,0); \ var uintD MSD2_from_DSmal = mspref(MSDptr2,0); \ var uintC len1_from_DSmal = (len1); \ var uintC len2_from_DSmal = (len2); \ if (MSD1_from_DSmal==0) { msprefnext(MSDptr0) = 0; len1_from_DSmal--; } \ if (MSD2_from_DSmal==0) { msprefnext(MSDptr0) = 0; len2_from_DSmal--; } \ cl_UDS_mul((LSDptr1),len1_from_DSmal,(LSDptr2),len2_from_DSmal,LSDptr0); \ if ((sintD)MSD1_from_DSmal < 0) /* n<0 ? */\ /* muß m bzw. m+b^l subtrahieren, um k Digits verschoben: */\ { subfrom_loop_lsp(LSDptr2,LSDptr0 lspop len1,len2); } \ if ((sintD)MSD2_from_DSmal < 0) /* m<0 ? */\ /* muß n bzw. n+b^k subtrahieren, um l Digits verschoben: */\ { subfrom_loop_lsp(LSDptr1,LSDptr0 lspop len2,len1); } // Dividiert zwei Unsigned Digit sequences durcheinander. // UDS_divide(a_MSDptr,a_len,a_LSDptr, b_MSDptr,b_len,b_LSDptr, &q,&r); // Die UDS a = a_MSDptr/a_len/a_LSDptr (a>=0) wird durch // die UDS b = b_MSDptr/b_len/b_LSDptr (b>=0) dividiert: // a = q * b + r mit 0 <= r < b. Bei b=0 Error. // q der Quotient, r der Rest. // q = q_MSDptr/q_len/q_LSDptr, r = r_MSDptr/r_len/r_LSDptr beides // Normalized Unsigned Digit sequences. // Vorsicht: q_LSDptr <= r_MSDptr, // Vorzeichenerweiterung von r kann q zerstören! // Vorzeichenerweiterung von q ist erlaubt. // a und b werden nicht modifiziert. // num_stack wird erniedrigt. #define UDS_divide(a_MSDptr,a_len,a_LSDptr,b_MSDptr,b_len,b_LSDptr,q_,r_) \ /* Platz fürs Ergebnis machen. Brauche maximal a_len+1 Digits. */\ var uintC _a_len = (a_len); \ var uintD* roomptr; num_stack_alloc_1(_a_len+1,roomptr=,); \ cl_UDS_divide(a_MSDptr,_a_len,a_LSDptr,b_MSDptr,b_len,b_LSDptr,roomptr,q_,r_); extern void cl_UDS_divide (const uintD* a_MSDptr, uintC a_len, const uintD* a_LSDptr, const uintD* b_MSDptr, uintC b_len, const uintD* b_LSDptr, uintD* roomptr, DS* q_, DS* r_); // Bildet zu einer Unsigned Digit sequence a die Wurzel // (genauer: Gaußklammer aus Wurzel aus a). // UDS_sqrt(a_MSDptr,a_len,a_LSDptr, &b, squarep=) // > a_MSDptr/a_len/a_LSDptr: eine UDS // < NUDS b: Gaußklammer der Wurzel aus a // < squarep: true falls a = b^2, false falls b^2 < a < (b+1)^2. // a wird nicht modifiziert. // Vorzeichenerweiterung von b ist erlaubt. // num_stack wird erniedrigt. #define UDS_sqrt(a_MSDptr,a_len,a_LSDptr,b_,squarep_zuweisung) \ { /* ceiling(a_len,2) Digits Platz fürs Ergebnis machen: */\ var uintC _a_len = (a_len); \ num_stack_alloc_1(ceiling(_a_len,2),(b_)->MSDptr=,); \ squarep_zuweisung cl_UDS_sqrt(a_MSDptr,_a_len,a_LSDptr,b_); \ } extern bool cl_UDS_sqrt (const uintD* a_MSDptr, uintC a_len, const uintD* a_LSDptr, DS* b_); // Auxiliary function for approximately computing 1/x // using Newton iteration. extern void cl_UDS_recip (const uintD* a_MSDptr, uintC a_len, uintD* b_MSDptr, uintC b_len); // Auxiliary function for approximately computing 1/sqrt(x) // using Newton iteration. extern void cl_UDS_recipsqrt (const uintD* a_MSDptr, uintC a_len, uintD* b_MSDptr, uintC b_len); } // namespace cln #endif /* _CL_DS_H */ cln-1.3.3/src/base/digitseq/cl_asm_i386.h0000644000000000000000000000032511201634736014655 0ustar // List the contents of cl_asm_i386.cc. #define COPY_LOOPS #define FILL_LOOPS #define CLEAR_LOOPS #define LOG_LOOPS #define TEST_LOOPS #define ADDSUB_LOOPS #define SHIFT_LOOPS #define MUL_LOOPS #define DIV_LOOPS cln-1.3.3/src/base/digitseq/cl_asm_m68k.h0000644000000000000000000000032511201634736014751 0ustar // List the contents of cl_asm_m68k.cc. #define COPY_LOOPS #define FILL_LOOPS #define CLEAR_LOOPS #define LOG_LOOPS #define TEST_LOOPS #define ADDSUB_LOOPS #define SHIFT_LOOPS #define MUL_LOOPS #define DIV_LOOPS cln-1.3.3/src/base/digitseq/cl_DS_endian.h0000644000000000000000000000117211201634736015151 0ustar // Digit sequence endianness #ifndef _CL_DS_ENDIAN_H #define _CL_DS_ENDIAN_H #include "base/cl_gmpconfig.h" // Set this to 1 for big-endian digit ordering in memory, // set this to 0 for little-endian digit ordering in memory. // We now support both. #ifdef CL_USE_GMP // Use of gmp requires CL_DS_BIG_ENDIAN_P = 0. #define CL_DS_BIG_ENDIAN_P 0 #else // In general, the digit ordering has nearly no effect on speed. // We have used the big-endian ordering for a long time, so let's use // the little-endian ordering now for at least the same time :-) #define CL_DS_BIG_ENDIAN_P 0 #endif #endif /* _CL_DS_ENDIAN_H */ cln-1.3.3/src/base/digitseq/cl_asm_mips_.cc0000644000000000000000000013277411547674463015465 0ustar // Externe Routinen zu ARILEV1.D // Prozessor: MIPS // Endianness: irrelevant // Compiler: GNU-C oder ... // Parameter-Übergabe: // o32: in Registern $4,$5,$6,$7, und auf dem Stack 16($sp),... // n32: in Registern $4,$5,$6,$7,$8,$9,$10,$11, und auf dem Stack 4($sp),... // Rückgabewert: in Register $2 // Einstellungen: intCsize=32, intDsize=32. // Besonderheiten: Nach jedem Ladebefehl ein Wartetakt nötig, bevor der // geholte Wert benutzt werden darf. // Strictly speaking, the MIPS ABI (-32 or -n32) is independent from the CPU // identification (-mips[12] or -mips[34]). But -n32 is commonly used together // with -mips3, and it's easier to test the CPU identification. #if __mips >= 3 #define ABI_N32 1 #else #define ABI_O32 1 #endif // When this file is compiled into a shared library, ELF linkers need to // know which symbols are functions. #if defined(__GNU__) || defined(__NetBSD__) #define DECLARE_FUNCTION(name) .type name,@function #else #define DECLARE_FUNCTION(name) #endif .text .globl copy_loop_up .globl copy_loop_down .globl fill_loop_up .globl fill_loop_down .globl clear_loop_up .globl clear_loop_down .globl test_loop_up .globl test_loop_down .globl xor_loop_up .globl compare_loop_up #if CL_DS_BIG_ENDIAN_P .globl or_loop_up .globl and_loop_up .globl eqv_loop_up .globl nand_loop_up .globl nor_loop_up .globl andc2_loop_up .globl orc2_loop_up .globl not_loop_up .globl and_test_loop_up .globl add_loop_down .globl addto_loop_down .globl inc_loop_down .globl sub_loop_down .globl subx_loop_down .globl subfrom_loop_down .globl dec_loop_down .globl neg_loop_down #else .globl or_loop_down .globl xor_loop_down .globl and_loop_down .globl eqv_loop_down .globl nand_loop_down .globl nor_loop_down .globl andc2_loop_down .globl orc2_loop_down .globl not_loop_down .globl and_test_loop_down .globl compare_loop_down .globl add_loop_up .globl addto_loop_up .globl inc_loop_up .globl sub_loop_up .globl subx_loop_up .globl subfrom_loop_up .globl dec_loop_up .globl neg_loop_up #endif #ifndef __GNUC__ /* mit GNU-C machen wir mulu32() als Macro, der inline multipliziert */ // extern struct { uint32 lo; uint32 hi; } mulu32_ (uint32 arg1, uint32 arg2); // 2^32*hi+lo := arg1*arg2. .globl mulu32_ .align 2 DECLARE_FUNCTION(mulu32_) .ent mulu32_ // Input in $4,$5, Output in $2,mulu32_high mulu32_: multu $5,$4 // arg1 * arg2 mfhi $6 // hi mflo $2 // lo sw $6,mulu32_high // hi abspeichern // Adressierung?? Deklaration?? j $31 // return .end mulu32_ #endif // extern uintD* copy_loop_up (uintD* sourceptr, uintD* destptr, uintC count); .align 2 DECLARE_FUNCTION(copy_loop_up) .ent copy_loop_up // Input in $4,$5,$6, Output in $2 colu1: lw $12,($4) // d = *sourceptr addu $4,4 // sourceptr++ sw $12,($5) // *destptr = d addu $5,4 // destptr++ subu $6,1 // count-- copy_loop_up: bnez $6,colu1 // until (count==0) move $2,$5 // destptr j $31 // return .end copy_loop_up // extern uintD* copy_loop_down (uintD* sourceptr, uintD* destptr, uintC count); .align 2 DECLARE_FUNCTION(copy_loop_down) .ent copy_loop_down // Input in $4,$5,$6, Output in $2 cold1: subu $4,4 // sourceptr-- lw $12,($4) // d = *sourceptr subu $5,4 // destptr-- sw $12,($5) // *destptr = d subu $6,1 // count-- copy_loop_down: bnez $6,cold1 // until (count==0) move $2,$5 // destptr j $31 // return .end copy_loop_down // extern uintD* fill_loop_up (uintD* destptr, uintC count, uintD filler); .align 2 DECLARE_FUNCTION(fill_loop_up) .ent fill_loop_up // Input in $4,$5,$6, Output in $2 flu1: sw $6,($4) // *destptr = filler addu $4,4 // destptr++ subu $5,1 // count-- fill_loop_up: bnez $5,flu1 // until (count==0) move $2,$4 // destptr j $31 // return .end fill_loop_up // extern uintD* fill_loop_down (uintD* destptr, uintC count, uintD filler); .align 2 DECLARE_FUNCTION(fill_loop_down) .ent fill_loop_down // Input in $4,$5,$6, Output in $2 fld1: subu $4,4 // destptr-- sw $6,($4) // *destptr = filler subu $5,1 // count-- fill_loop_down: bnez $5,fld1 // until (count==0) move $2,$4 // destptr j $31 // return .end fill_loop_down // extern uintD* clear_loop_up (uintD* destptr, uintC count); .align 2 DECLARE_FUNCTION(clear_loop_up) .ent clear_loop_up // Input in $4,$5, Output in $2 cllu1: sw $0,($4) // *destptr = 0 addu $4,4 // destptr++ subu $5,1 // count-- clear_loop_up: bnez $5,cllu1 // until (count==0) move $2,$4 // destptr j $31 // return .end clear_loop_up // extern uintD* clear_loop_down (uintD* destptr, uintC count); .align 2 DECLARE_FUNCTION(clear_loop_down) .ent clear_loop_down // Input in $4,$5, Output in $2 clld1: subu $4,4 // destptr-- sw $0,($4) // *destptr = 0 subu $5,1 // count-- clear_loop_down: bnez $5,clld1 // until (count==0) move $2,$4 // destptr j $31 // return .end clear_loop_down // extern boolean test_loop_up (uintD* ptr, uintC count); .align 2 DECLARE_FUNCTION(test_loop_up) .ent test_loop_up // Input in $4,$5 tlu1: lw $12,($4) // x = *ptr addu $4,4 // ptr++ bnez $12,tlu3 subu $5,1 // count-- test_loop_up: bnez $5,tlu1 // until (count==0) move $2,$0 // 0 j $31 // return tlu3: li $2,1 // 1 j $31 // return .end test_loop_up // extern boolean test_loop_down (uintD* ptr, uintC count); .align 2 DECLARE_FUNCTION(test_loop_down) .ent test_loop_down // Input in $4,$5 tld1: subu $4,4 // ptr-- lw $12,($4) // x = *ptr subu $5,1 // count-- bnez $12,tld3 test_loop_down: bnez $5,tld1 // until (count==0) move $2,$0 // 0 j $31 // return tld3: li $2,1 // 1 j $31 // return .end test_loop_down #if CL_DS_BIG_ENDIAN_P // extern void or_loop_up (uintD* xptr, uintD* yptr, uintC count); .align 2 DECLARE_FUNCTION(or_loop_up) .ent or_loop_up // Input in $4,$5,$6 olu1: lw $12,($4) // x = *xptr lw $13,($5) // y = *yptr addu $5,4 // yptr++ or $12,$13 // x |= y sw $12,($4) // *xptr = x addu $4,4 // xptr++ subu $6,1 // count-- or_loop_up: bnez $6,olu1 // until (count==0) j $31 // return .end or_loop_up #endif // extern void xor_loop_up (uintD* xptr, uintD* yptr, uintC count); .align 2 DECLARE_FUNCTION(xor_loop_up) .ent xor_loop_up // Input in $4,$5,$6 xlu1: lw $12,($4) // x = *xptr lw $13,($5) // y = *yptr addu $5,4 // yptr++ xor $12,$13 // x ^= y sw $12,($4) // *xptr = x addu $4,4 // xptr++ subu $6,1 // count-- xor_loop_up: bnez $6,xlu1 // until (count==0) j $31 // return .end xor_loop_up #if CL_DS_BIG_ENDIAN_P // extern void and_loop_up (uintD* xptr, uintD* yptr, uintC count); .align 2 DECLARE_FUNCTION(and_loop_up) .ent and_loop_up // Input in $4,$5,$6 alu1: lw $12,($4) // x = *xptr lw $13,($5) // y = *yptr addu $5,4 // yptr++ and $12,$13 // x &= y sw $12,($4) // *xptr = x addu $4,4 // xptr++ subu $6,1 // count-- and_loop_up: bnez $6,alu1 // until (count==0) j $31 // return .end and_loop_up // extern void eqv_loop_up (uintD* xptr, uintD* yptr, uintC count); .align 2 DECLARE_FUNCTION(eqv_loop_up) .ent eqv_loop_up // Input in $4,$5,$6 nxlu1: lw $12,($4) // x = *xptr lw $13,($5) // y = *yptr addu $5,4 // yptr++ xor $12,$13 // x ^= y nor $12,$0 // x = ~x sw $12,($4) // *xptr = x addu $4,4 // xptr++ subu $6,1 // count-- eqv_loop_up: bnez $6,nxlu1 // until (count==0) j $31 // return .end eqv_loop_up // extern void nand_loop_up (uintD* xptr, uintD* yptr, uintC count); .align 2 DECLARE_FUNCTION(nand_loop_up) .ent nand_loop_up // Input in $4,$5,$6 nalu1: lw $12,($4) // x = *xptr lw $13,($5) // y = *yptr addu $5,4 // yptr++ and $12,$13 // x &= y // Gibt es 'nand $12,$13' ?? nor $12,$0 // x = ~x sw $12,($4) // *xptr = x addu $4,4 // xptr++ subu $6,1 // count-- nand_loop_up: bnez $6,nalu1 // until (count==0) j $31 // return .end nand_loop_up // extern void nor_loop_up (uintD* xptr, uintD* yptr, uintC count); .align 2 DECLARE_FUNCTION(nor_loop_up) .ent nor_loop_up // Input in $4,$5,$6 nolu1: lw $12,($4) // x = *xptr lw $13,($5) // y = *yptr addu $5,4 // yptr++ nor $12,$13 // x = ~(x|y) sw $12,($4) // *xptr = x addu $4,4 // xptr++ subu $6,1 // count-- nor_loop_up: bnez $6,nolu1 // until (count==0) j $31 // return .end nor_loop_up // extern void andc2_loop_up (uintD* xptr, uintD* yptr, uintC count); .align 2 DECLARE_FUNCTION(andc2_loop_up) .ent andc2_loop_up // Input in $4,$5,$6 aclu1: lw $12,($4) // x = *xptr lw $13,($5) // y = *yptr addu $5,4 // yptr++ nor $13,$0 // y = ~y and $12,$13 // x &= y sw $12,($4) // *xptr = x addu $4,4 // xptr++ subu $6,1 // count-- andc2_loop_up: bnez $6,aclu1 // until (count==0) j $31 // return .end andc2_loop_up // extern void orc2_loop_up (uintD* xptr, uintD* yptr, uintC count); .align 2 DECLARE_FUNCTION(orc2_loop_up) .ent orc2_loop_up // Input in $4,$5,$6 oclu1: lw $12,($4) // x = *xptr lw $13,($5) // y = *yptr addu $5,4 // yptr++ nor $13,$0 // y = ~y or $12,$13 // x |= y sw $12,($4) // *xptr = x addu $4,4 // xptr++ subu $6,1 // count-- orc2_loop_up: bnez $6,oclu1 // until (count==0) j $31 // return .end orc2_loop_up // extern void not_loop_up (uintD* xptr, uintC count); .align 2 DECLARE_FUNCTION(not_loop_up) .ent not_loop_up // Input in $4,$5 nlu1: lw $12,($4) // x = *xptr subu $5,1 // count-- nor $12,$0 // x = ~x sw $12,($4) // *xptr = x addu $4,4 // xptr++ not_loop_up: bnez $5,nlu1 // until (count==0) j $31 // return .end not_loop_up // extern boolean and_test_loop_up (uintD* xptr, uintD* yptr, uintC count); .align 2 DECLARE_FUNCTION(and_test_loop_up) .ent and_test_loop_up // Input in $4,$5,$6 atlu1: lw $12,($4) // x = *xptr lw $13,($5) // y = *yptr addu $5,4 // yptr++ and $12,$13 // x &= y bnez $12,atlu3 // if (x) ... addu $4,4 // xptr++ subu $6,1 // count-- and_test_loop_up: bnez $6,atlu1 // until (count==0) move $2,$0 // 0 j $31 // return atlu3: li $2,1 // 1 j $31 // return .end and_test_loop_up #endif // extern cl_signean compare_loop_up (uintD* xptr, uintD* yptr, uintC count); .align 2 DECLARE_FUNCTION(compare_loop_up) .ent compare_loop_up // Input in $4,$5,$6 cmlu1: lw $12,($4) // x = *xptr lw $13,($5) // y = *yptr addu $5,4 // yptr++ bne $12,$13,cmlu3 // if (!(x==y)) ... addu $4,4 // xptr++ subu $6,1 // count-- compare_loop_up: bnez $6,cmlu1 // until (count==0) move $2,$0 // 0 j $31 // return cmlu3: bltu $12,$13,cmlu4 // if (x source2) [also kein Carry] ... ald4: subu $7,1 // count-- bnez $7,ald3 // until (count==0) li $2,1 // 1 j $31 // return .end add_loop_down // extern uintD addto_loop_down (uintD* sourceptr, uintD* destptr, uintC count); .align 2 DECLARE_FUNCTION(addto_loop_down) .ent addto_loop_down // Input in $4,$5,$6, Output in $2 atld1: // kein Carry subu $4,4 // sourceptr-- subu $5,4 // destptr-- lw $12,($4) // source1 = *sourceptr lw $13,($5) // source2 = *destptr subu $6,1 // count-- addu $12,$13 // dest = source1 + source2 sw $12,($5) // *destptr = dest bltu $12,$13,atld4 // if (dest < source2) [also Carry] ... addto_loop_down: atld2: bnez $6,atld1 // until (count==0) move $2,$0 // 0 j $31 // return atld3: // Hier Carry subu $4,4 // sourceptr-- subu $5,4 // destptr-- lw $12,($4) // source1 = *sourceptr lw $13,($5) // source2 = *destptr subu $6,1 // count-- addu $12,$13 // dest = source1 + source2 addu $12,1 // + 1 sw $12,($5) // *destptr = dest bgtu $12,$13,atld2 // if (dest > source2) [also kein Carry] ... atld4: bnez $6,atld3 // until (count==0) li $2,1 // 1 j $31 // return .end addto_loop_down // extern uintD inc_loop_down (uintD* ptr, uintC count); .align 2 DECLARE_FUNCTION(inc_loop_down) .ent inc_loop_down // Input in $4,$5, Output in $2 ild1: subu $4,4 // ptr-- lw $12,($4) // x = *ptr subu $5,1 // count-- addu $12,1 // x++; sw $12,($4) // *ptr = x bnez $12,ild3 // if (!(x==0)) ... inc_loop_down: bnez $5,ild1 // until (count==0) li $2,1 // 1 j $31 // return ild3: move $2,$0 // 0 j $31 // return .end inc_loop_down // extern uintD sub_loop_down (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); .align 2 DECLARE_FUNCTION(sub_loop_down) .ent sub_loop_down // Input in $4,$5,$6,$7, Output in $2 sld1: // kein Carry subu $4,4 // sourceptr1-- subu $5,4 // sourceptr2-- lw $12,($4) // source1 = *sourceptr1 lw $13,($5) // source2 = *sourceptr2 subu $6,4 // destptr-- bltu $12,$13,sld2 // if (source1 < source2) [also Carry] ... subu $12,$13 // dest = source1 - source2 sw $12,($6) // *destptr = dest subu $7,1 // count-- sub_loop_down: bnez $7,sld1 // until (count==0) move $2,$0 // 0 j $31 // return sld2: subu $12,$13 // dest = source1 - source2 sw $12,($6) // *destptr = dest subu $7,1 // count-- bnez $7,sld3 // until (count==0) li $2,-1 // -1 j $31 // return sld3: // Hier Carry subu $4,4 // sourceptr1-- subu $5,4 // sourceptr2-- lw $12,($4) // source1 = *sourceptr1 lw $13,($5) // source2 = *sourceptr2 subu $6,4 // destptr-- bgtu $12,$13,sld4 // if (source1 > source2) [also kein Carry] ... subu $12,$13 // dest = source1 - source2 subu $12,1 // - 1 sw $12,($6) // *destptr = dest subu $7,1 // count-- bnez $7,sld3 // until (count==0) li $2,-1 // -1 j $31 // return sld4: subu $12,$13 // dest = source1 - source2 subu $12,1 // - 1 sw $12,($6) // *destptr = dest subu $7,1 // count-- bnez $7,sld1 // until (count==0) move $2,$0 // 0 j $31 // return .end sub_loop_down // extern uintD subx_loop_down (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count, uintD carry); .align 2 DECLARE_FUNCTION(subx_loop_down) .ent subx_loop_down // Input in $4,$5,$6,$7,$8 Output in $2 subx_loop_down: #if ABI_N32 move $12,$8 // carry #else lw $12,16($sp) // carry #endif bnez $12,sxld5 // !(carry==0) ? b sxld2 sxld1: // kein Carry subu $4,4 // sourceptr1-- subu $5,4 // sourceptr2-- lw $12,($4) // source1 = *sourceptr1 lw $13,($5) // source2 = *sourceptr2 subu $6,4 // destptr-- bltu $12,$13,sxld3 // if (source1 < source2) [also Carry] ... subu $12,$13 // dest = source1 - source2 sw $12,($6) // *destptr = dest subu $7,1 // count-- sxld2: bnez $7,sxld1 // until (count==0) move $2,$0 // 0 j $31 // return sxld3: subu $12,$13 // dest = source1 - source2 sw $12,($6) // *destptr = dest subu $7,1 // count-- bnez $7,sxld4 // until (count==0) li $2,-1 // -1 j $31 // return sxld4: // Hier Carry subu $4,4 // sourceptr1-- subu $5,4 // sourceptr2-- lw $12,($4) // source1 = *sourceptr1 lw $13,($5) // source2 = *sourceptr2 subu $6,4 // destptr-- bgtu $12,$13,sxld6 // if (source1 > source2) [also kein Carry] ... subu $12,$13 // dest = source1 - source2 subu $12,1 // - 1 sw $12,($6) // *destptr = dest subu $7,1 // count-- sxld5: bnez $7,sxld4 // until (count==0) li $2,-1 // -1 j $31 // return sxld6: subu $12,$13 // dest = source1 - source2 subu $12,1 // - 1 sw $12,($6) // *destptr = dest subu $7,1 // count-- bnez $7,sxld1 // until (count==0) move $2,$0 // 0 j $31 // return .end subx_loop_down // extern uintD subfrom_loop_down (uintD* sourceptr, uintD* destptr, uintC count); .align 2 DECLARE_FUNCTION(subfrom_loop_down) .ent subfrom_loop_down // Input in $4,$5,$6,$7, Output in $2 sfld1: // kein Carry subu $4,4 // sourceptr-- subu $5,4 // destptr-- lw $12,($5) // source1 = *destptr lw $13,($4) // source2 = *sourceptr subu $6,1 // count-- bltu $12,$13,sfld2 // if (source1 < source2) [also Carry] ... subu $12,$13 // dest = source1 - source2 sw $12,($5) // *destptr = dest subfrom_loop_down: bnez $6,sfld1 // until (count==0) move $2,$0 // 0 j $31 // return sfld2: subu $12,$13 // dest = source1 - source2 sw $12,($5) // *destptr = dest bnez $6,sfld3 // until (count==0) li $2,-1 // -1 j $31 // return sfld3: // Hier Carry subu $4,4 // sourceptr-- subu $5,4 // destptr-- lw $12,($5) // source1 = *destptr lw $13,($4) // source2 = *sourceptr subu $6,1 // count-- bgtu $12,$13,sfld4 // if (source1 > source2) [also kein Carry] ... subu $12,$13 // dest = source1 - source2 subu $12,1 // - 1 sw $12,($5) // *destptr = dest bnez $6,sfld3 // until (count==0) li $2,-1 // -1 j $31 // return sfld4: subu $12,$13 // dest = source1 - source2 subu $12,1 // - 1 sw $12,($5) // *destptr = dest bnez $6,sfld1 // until (count==0) move $2,$0 // 0 j $31 // return .end subfrom_loop_down // extern uintD dec_loop_down (uintD* ptr, uintC count); .align 2 DECLARE_FUNCTION(dec_loop_down) .ent dec_loop_down // Input in $4,$5, Output in $2 dld1: subu $4,4 // ptr-- lw $12,($4) // x = *ptr subu $5,1 // count-- bnez $12,dld3 // if (!(x==0)) ... subu $12,1 // x--; sw $12,($4) // *ptr = x dec_loop_down: bnez $5,dld1 // until (count==0) li $2,-1 // -1 j $31 // return dld3: subu $12,1 // x--; sw $12,($4) // *ptr = x move $2,$0 // 0 j $31 // return .end dec_loop_down // extern uintD neg_loop_down (uintD* ptr, uintC count); .align 2 DECLARE_FUNCTION(neg_loop_down) .ent neg_loop_down // Input in $4,$5, Output in $2 // erstes Digit /=0 suchen: nld1: subu $4,4 // ptr-- lw $12,($4) // x = *ptr subu $5,1 // count-- bnez $12,nld3 // if (!(x==0)) ... neg_loop_down: bnez $5,nld1 // until (count==0) move $2,$0 // 0 j $31 // return nld3: // erstes Digit /=0 gefunden, ab jetzt gibt's Carrys // 1 Digit negieren: subu $12,$0,$12 // x = -x sw $12,($4) // *ptr = x // alle anderen Digits invertieren: b nld5 nld4: subu $4,4 // xptr-- lw $12,($4) // x = *xptr subu $5,1 // count-- nor $12,$0 // x = ~x sw $12,($4) // *xptr = x nld5: bnez $5,nld4 // until (count==0) li $2,-1 // -1 j $31 // return .end neg_loop_down #endif #if !CL_DS_BIG_ENDIAN_P // extern void or_loop_down (uintD* xptr, uintD* yptr, uintC count); .align 2 DECLARE_FUNCTION(or_loop_down) .ent or_loop_down // Input in $4,$5,$6 old1: subu $4,4 // xptr-- subu $5,4 // yptr-- lw $12,($4) // x = *xptr lw $13,($5) // y = *yptr subu $6,1 // count-- or $12,$13 // x |= y sw $12,($4) // *xptr = x or_loop_down: bnez $6,old1 // until (count==0) j $31 // return .end or_loop_down // extern void xor_loop_down (uintD* xptr, uintD* yptr, uintC count); .align 2 DECLARE_FUNCTION(xor_loop_down) .ent xor_loop_down // Input in $4,$5,$6 xld1: subu $4,4 // xptr-- subu $5,4 // yptr-- lw $12,($4) // x = *xptr lw $13,($5) // y = *yptr subu $6,1 // count-- xor $12,$13 // x ^= y sw $12,($4) // *xptr = x xor_loop_down: bnez $6,xld1 // until (count==0) j $31 // return .end xor_loop_down // extern void and_loop_down (uintD* xptr, uintD* yptr, uintC count); .align 2 DECLARE_FUNCTION(and_loop_down) .ent and_loop_down // Input in $4,$5,$6 ald1: subu $4,4 // xptr-- subu $5,4 // yptr-- lw $12,($4) // x = *xptr lw $13,($5) // y = *yptr subu $6,1 // count-- and $12,$13 // x &= y sw $12,($4) // *xptr = x and_loop_down: bnez $6,ald1 // until (count==0) j $31 // return .end and_loop_down // extern void eqv_loop_down (uintD* xptr, uintD* yptr, uintC count); .align 2 DECLARE_FUNCTION(eqv_loop_down) .ent eqv_loop_down // Input in $4,$5,$6 nxld1: subu $4,4 // xptr-- subu $5,4 // yptr-- lw $12,($4) // x = *xptr lw $13,($5) // y = *yptr subu $6,1 // count-- xor $12,$13 // x ^= y nor $12,$0 // x = ~x sw $12,($4) // *xptr = x eqv_loop_down: bnez $6,nxld1 // until (count==0) j $31 // return .end eqv_loop_down // extern void nand_loop_down (uintD* xptr, uintD* yptr, uintC count); .align 2 DECLARE_FUNCTION(nand_loop_down) .ent nand_loop_down // Input in $4,$5,$6 nald1: subu $4,4 // xptr-- subu $5,4 // yptr-- lw $12,($4) // x = *xptr lw $13,($5) // y = *yptr subu $6,1 // count-- and $12,$13 // x &= y // Gibt es 'nand $12,$13' ?? nor $12,$0 // x = ~x sw $12,($4) // *xptr = x nand_loop_down: bnez $6,nald1 // until (count==0) j $31 // return .end nand_loop_down // extern void nor_loop_down (uintD* xptr, uintD* yptr, uintC count); .align 2 DECLARE_FUNCTION(nor_loop_down) .ent nor_loop_down // Input in $4,$5,$6 nold1: subu $4,4 // xptr-- subu $5,4 // yptr-- lw $12,($4) // x = *xptr lw $13,($5) // y = *yptr subu $6,1 // count-- nor $12,$13 // x = ~(x|y) sw $12,($4) // *xptr = x nor_loop_down: bnez $6,nold1 // until (count==0) j $31 // return .end nor_loop_down // extern void andc2_loop_down (uintD* xptr, uintD* yptr, uintC count); .align 2 DECLARE_FUNCTION(andc2_loop_down) .ent andc2_loop_down // Input in $4,$5,$6 acld1: subu $4,4 // xptr-- subu $5,4 // yptr-- lw $12,($4) // x = *xptr lw $13,($5) // y = *yptr subu $6,1 // count-- nor $13,$0 // y = ~y and $12,$13 // x &= y sw $12,($4) // *xptr = x andc2_loop_down: bnez $6,acld1 // until (count==0) j $31 // return .end andc2_loop_down // extern void orc2_loop_down (uintD* xptr, uintD* yptr, uintC count); .align 2 DECLARE_FUNCTION(orc2_loop_down) .ent orc2_loop_down // Input in $4,$5,$6 ocld1: subu $4,4 // xptr-- subu $5,4 // yptr-- lw $12,($4) // x = *xptr lw $13,($5) // y = *yptr subu $6,1 // count-- nor $13,$0 // y = ~y or $12,$13 // x |= y sw $12,($4) // *xptr = x orc2_loop_down: bnez $6,ocld1 // until (count==0) j $31 // return .end orc2_loop_down // extern void not_loop_down (uintD* xptr, uintC count); .align 2 DECLARE_FUNCTION(not_loop_down) .ent not_loop_down // Input in $4,$5 nld1: subu $4,4 // xptr-- lw $12,($4) // x = *xptr subu $5,1 // count-- nor $12,$0 // x = ~x sw $12,($4) // *xptr = x not_loop_down: bnez $5,nld1 // until (count==0) j $31 // return .end not_loop_down // extern boolean and_test_loop_down (uintD* xptr, uintD* yptr, uintC count); .align 2 DECLARE_FUNCTION(and_test_loop_down) .ent and_test_loop_down // Input in $4,$5,$6 atld1: subu $4,4 // xptr-- subu $5,4 // yptr-- lw $12,($4) // x = *xptr lw $13,($5) // y = *yptr and $12,$13 // x &= y bnez $12,atld3 // if (x) ... subu $6,1 // count-- and_test_loop_down: bnez $6,atld1 // until (count==0) move $2,$0 // 0 j $31 // return atld3: li $2,1 // 1 j $31 // return .end and_test_loop_down // extern cl_signean compare_loop_down (uintD* xptr, uintD* yptr, uintC count); .align 2 DECLARE_FUNCTION(compare_loop_down) .ent compare_loop_down // Input in $4,$5,$6 cmld1: subu $4,4 // xptr-- subu $5,4 // yptr-- lw $12,($4) // x = *xptr lw $13,($5) // y = *yptr subu $6,1 // count-- bne $12,$13,cmld3 // if (!(x==y)) ... compare_loop_down: bnez $6,cmld1 // until (count==0) move $2,$0 // 0 j $31 // return cmld3: bltu $12,$13,cmld4 // if (x source2) [also kein Carry] ... alu4: subu $7,1 // count-- bnez $7,alu3 // until (count==0) li $2,1 // 1 j $31 // return .end add_loop_up // extern uintD addto_loop_up (uintD* sourceptr, uintD* destptr, uintC count); .align 2 DECLARE_FUNCTION(addto_loop_up) .ent addto_loop_up // Input in $4,$5,$6, Output in $2 atlu1: // kein Carry lw $12,($4) // source1 = *sourceptr lw $13,($5) // source2 = *destptr addu $4,4 // sourceptr++ subu $6,1 // count-- addu $12,$13 // dest = source1 + source2 sw $12,($5) // *destptr = dest addu $5,4 // destptr++ bltu $12,$13,atlu4 // if (dest < source2) [also Carry] ... addto_loop_up: atlu2: bnez $6,atlu1 // until (count==0) move $2,$0 // 0 j $31 // return atlu3: // Hier Carry lw $12,($4) // source1 = *sourceptr lw $13,($5) // source2 = *destptr addu $4,4 // sourceptr++ subu $6,1 // count-- addu $12,$13 // dest = source1 + source2 addu $12,1 // + 1 sw $12,($5) // *destptr = dest addu $5,4 // destptr++ bgtu $12,$13,atlu2 // if (dest > source2) [also kein Carry] ... atlu4: bnez $6,atlu3 // until (count==0) li $2,1 // 1 j $31 // return .end addto_loop_up // extern uintD inc_loop_up (uintD* ptr, uintC count); .align 2 DECLARE_FUNCTION(inc_loop_up) .ent inc_loop_up // Input in $4,$5, Output in $2 ilu1: lw $12,($4) // x = *ptr subu $5,1 // count-- addu $12,1 // x++; sw $12,($4) // *ptr = x addu $4,4 // ptr++ bnez $12,ilu3 // if (!(x==0)) ... inc_loop_up: bnez $5,ilu1 // until (count==0) li $2,1 // 1 j $31 // return ilu3: move $2,$0 // 0 j $31 // return .end inc_loop_up // extern uintD sub_loop_up (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count); .align 2 DECLARE_FUNCTION(sub_loop_up) .ent sub_loop_up // Input in $4,$5,$6,$7, Output in $2 slu1: // kein Carry lw $12,($4) // source1 = *sourceptr1 lw $13,($5) // source2 = *sourceptr2 addu $4,4 // sourceptr1++ addu $5,4 // sourceptr2++ subu $7,1 // count-- bltu $12,$13,slu2 // if (source1 < source2) [also Carry] ... subu $12,$13 // dest = source1 - source2 sw $12,($6) // *destptr = dest addu $6,4 // destptr++ sub_loop_up: bnez $7,slu1 // until (count==0) move $2,$0 // 0 j $31 // return slu2: subu $12,$13 // dest = source1 - source2 sw $12,($6) // *destptr = dest addu $6,4 // destptr++ bnez $7,slu3 // until (count==0) li $2,-1 // -1 j $31 // return slu3: // Hier Carry lw $12,($4) // source1 = *sourceptr1 lw $13,($5) // source2 = *sourceptr2 addu $4,4 // sourceptr1++ addu $5,4 // sourceptr2++ subu $7,1 // count-- bgtu $12,$13,slu4 // if (source1 > source2) [also kein Carry] ... subu $12,$13 // dest = source1 - source2 subu $12,1 // - 1 sw $12,($6) // *destptr = dest addu $6,4 // destptr++ bnez $7,slu3 // until (count==0) li $2,-1 // -1 j $31 // return slu4: subu $12,$13 // dest = source1 - source2 subu $12,1 // - 1 sw $12,($6) // *destptr = dest addu $6,4 // destptr++ bnez $7,slu1 // until (count==0) move $2,$0 // 0 j $31 // return .end sub_loop_up // extern uintD subx_loop_up (uintD* sourceptr1, uintD* sourceptr2, uintD* destptr, uintC count, uintD carry); .align 2 DECLARE_FUNCTION(subx_loop_up) .ent subx_loop_up // Input in $4,$5,$6,$7,$8, Output in $2 subx_loop_up: #if ABI_N32 move $12,$8 // carry #else lw $12,16($sp) // carry #endif bnez $12,sxlu5 // !(carry==0) ? b sxlu2 sxlu1: // kein Carry lw $12,($4) // source1 = *sourceptr1 lw $13,($5) // source2 = *sourceptr2 addu $4,4 // sourceptr1++ addu $5,4 // sourceptr2++ subu $7,1 // count-- bltu $12,$13,sxlu3 // if (source1 < source2) [also Carry] ... subu $12,$13 // dest = source1 - source2 sw $12,($6) // *destptr = dest addu $6,4 // destptr++ sxlu2: bnez $7,sxlu1 // until (count==0) move $2,$0 // 0 j $31 // return sxlu3: subu $12,$13 // dest = source1 - source2 sw $12,($6) // *destptr = dest addu $6,4 // destptr++ bnez $7,sxlu4 // until (count==0) li $2,-1 // -1 j $31 // return sxlu4: // Hier Carry lw $12,($4) // source1 = *sourceptr1 lw $13,($5) // source2 = *sourceptr2 addu $4,4 // sourceptr1++ addu $5,4 // sourceptr2++ subu $7,1 // count-- bgtu $12,$13,sxlu6 // if (source1 > source2) [also kein Carry] ... subu $12,$13 // dest = source1 - source2 subu $12,1 // - 1 sw $12,($6) // *destptr = dest addu $6,4 // destptr++ sxlu5: bnez $7,sxlu4 // until (count==0) li $2,-1 // -1 j $31 // return sxlu6: subu $12,$13 // dest = source1 - source2 subu $12,1 // - 1 sw $12,($6) // *destptr = dest addu $6,4 // destptr++ bnez $7,sxlu1 // until (count==0) move $2,$0 // 0 j $31 // return .end subx_loop_up // extern uintD subfrom_loop_up (uintD* sourceptr, uintD* destptr, uintC count); .align 2 DECLARE_FUNCTION(subfrom_loop_up) .ent subfrom_loop_up // Input in $4,$5,$6,$7, Output in $2 sflu1: // kein Carry lw $12,($5) // source1 = *destptr lw $13,($4) // source2 = *sourceptr addu $4,4 // sourceptr++ subu $6,1 // count-- bltu $12,$13,sflu2 // if (source1 < source2) [also Carry] ... subu $12,$13 // dest = source1 - source2 sw $12,($5) // *destptr = dest addu $5,4 // destptr++ subfrom_loop_up: bnez $6,sflu1 // until (count==0) move $2,$0 // 0 j $31 // return sflu2: subu $12,$13 // dest = source1 - source2 sw $12,($5) // *destptr = dest addu $5,4 // destptr++ bnez $6,sflu3 // until (count==0) li $2,-1 // -1 j $31 // return sflu3: // Hier Carry lw $12,($5) // source1 = *destptr lw $13,($4) // source2 = *sourceptr addu $4,4 // sourceptr++ subu $6,1 // count-- bgtu $12,$13,sflu4 // if (source1 > source2) [also kein Carry] ... subu $12,$13 // dest = source1 - source2 subu $12,1 // - 1 sw $12,($5) // *destptr = dest addu $5,4 // destptr++ bnez $6,sflu3 // until (count==0) li $2,-1 // -1 j $31 // return sflu4: subu $12,$13 // dest = source1 - source2 subu $12,1 // - 1 sw $12,($5) // *destptr = dest addu $5,4 // destptr++ bnez $6,sflu1 // until (count==0) move $2,$0 // 0 j $31 // return .end subfrom_loop_up // extern uintD dec_loop_up (uintD* ptr, uintC count); .align 2 DECLARE_FUNCTION(dec_loop_up) .ent dec_loop_up // Input in $4,$5, Output in $2 dlu1: lw $12,($4) // x = *ptr subu $5,1 // count-- bnez $12,dlu3 // if (!(x==0)) ... subu $12,1 // x--; sw $12,($4) // *ptr = x addu $4,4 // ptr++ dec_loop_up: bnez $5,dlu1 // until (count==0) li $2,-1 // -1 j $31 // return dlu3: subu $12,1 // x--; sw $12,($4) // *ptr = x move $2,$0 // 0 j $31 // return .end dec_loop_up // extern uintD neg_loop_up (uintD* ptr, uintC count); .align 2 DECLARE_FUNCTION(neg_loop_up) .ent neg_loop_up // Input in $4,$5, Output in $2 // erstes Digit /=0 suchen: nlu1: lw $12,($4) // x = *ptr subu $5,1 // count-- bnez $12,nlu3 // if (!(x==0)) ... addu $4,4 // ptr++ neg_loop_up: bnez $5,nlu1 // until (count==0) move $2,$0 // 0 j $31 // return nlu3: // erstes Digit /=0 gefunden, ab jetzt gibt's Carrys // 1 Digit negieren: subu $12,$0,$12 // x = -x sw $12,($4) // *ptr = x // alle anderen Digits invertieren: b nlu5 nlu4: lw $12,($4) // x = *xptr subu $5,1 // count-- nor $12,$0 // x = ~x sw $12,($4) // *xptr = x nlu5: addu $4,4 // xptr++ bnez $5,nlu4 // until (count==0) li $2,-1 // -1 j $31 // return .end neg_loop_up #endif cln-1.3.3/src/base/digitseq/cl_asm_hppa.h0000644000000000000000000000005111201634736015110 0ustar // List the contents of cl_asm_hppa.cc. cln-1.3.3/src/base/digitseq/cl_2DS.h0000644000000000000000000000262111201634736013715 0ustar // Digit sequence 2-adic arithmetic #ifndef _CL_2DS_H #define _CL_2DS_H namespace cln { // div2adic(a_len,a_LSDptr,b_len,b_LSDptr,dest_LSDptr); // dividiert die UDS a_LSDptr[-a_len..-1] mod 2^(intDsize*b_len) // durch die ungerade UDS b_LSDptr[-b_len..-1] mod 2^(intDsize*b_len) // (a_len >= b_len > 0) und liefert // den Quotienten q als UDS dest_LSDptr[-b_len..-1] mod 2^(intDsize*b_len) und // den "Rest" (a-b*q)/2^(intDsize*b_len) als UDS dest_LSDptr[-a_len..-b_len-1]. // Falls a_len > b_len, wird b implizit als durch Nullen fortgesetzt angenommen. extern void div2adic (uintC a_len, const uintD* a_LSDptr, uintC b_len, const uintD* b_LSDptr, uintD* dest_LSDptr); // div2adic(len,a_LSDptr,b_LSDptr,dest_LSDptr); // dividiert die UDS a_LSDptr[-len..-1] mod 2^(intDsize*len) // durch die ungerade UDS b_LSDptr[-len..-1] mod 2^(intDsize*len) (len>0) und // liefert den Quotienten als UDS dest_LSDptr[-len..-1] mod 2^(intDsize*len). inline void div2adic (uintC len, const uintD* a_LSDptr, const uintD* b_LSDptr, uintD* dest_LSDptr) { div2adic(len,a_LSDptr,len,b_LSDptr,dest_LSDptr); } // recip2adic(len,a_LSDptr,dest_LSDptr); // bildet den Kehrwert der ungeraden UDS a_LSDptr[-len..-1] mod 2^(intDsize*len) // (len>0) und liefert sie als UDS dest_LSDptr[-len..-1] mod 2^(intDsize*len). extern void recip2adic (uintC len, const uintD* a_LSDptr, uintD* dest_LSDptr); } // namespace cln #endif /* _CL_2DS_H */ cln-1.3.3/src/base/digitseq/cl_DS_recip.cc0000644000000000000000000001475011201634736015161 0ustar // cl_UDS_recip(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/digitseq/cl_DS.h" // Implementation. namespace cln { // Compute the reciprocal value of a digit sequence. // Input: UDS a_MSDptr/a_len/.. of length a_len, // with 1/2*beta^a_len <= a < beta^a_len. // Output: UDS b_MSDptr/b_len+2/.. of length b_len+1 (b_len>1), plus 1 more bit // in the last limb, such that // beta^b_len <= b <= 2*beta^b_len and // | beta^(a_len+b_len)/a - b | < 1. // If a_len > b_len, only the most significant b_len limbs + 3 bits of a // are used. extern void cl_UDS_recip (const uintD* a_MSDptr, uintC a_len, uintD* b_MSDptr, uintC b_len); // Method: // Using Newton/Heron iteration. // Write x = a/beta^a_len and y = b/beta^b_len. // So we start out with 1/2 <= x < 1 and search an y with 1 <= y <= 2 // and | 1/x - y | < beta^(-b_len). // For n = 1,2,...,b_len we compute approximations y with 1 <= yn <= 2 // and | 1/x - yn | < beta^(-n). The first n limbs of x, plus the // next 3 bits (of the (n+1)st limb) enter the computation of yn. Apart // from that, yn remains valid for any x which shares the same n+1 // most significant limbs. // Step n = 1: // Write x = x1/beta + x2/beta^2 + xr with 0 <= xr < 1/(8*beta). // Divide (beta^2-beta*x1-x2) by x1, gives beta^2-x1*beta-x2 = q*x1+r. // If this division overflows, i.e. q >= beta, then x1 = beta/2, x2 = 0, // and we just return y1 = 2. // Else set qd := ceiling(max(q*x2/beta - r, 0) / (x1+1)) and return // y1 = (beta+q-qd)/beta. // Rationale: Obviously 0 <= qd <= q and 0 <= qd <= 2. We have // beta^2 - beta*(beta+q-qd)*x // <= beta^2 - (beta+q-qd)*(x1 + x2/beta) // = beta^2 - beta*x1 - x2 - q*(x1 + x2/beta) + qd*(x1 + x2/beta) // = q*x1 + r - q*(x1 + x2/beta) + qd*(x1 + x2/beta) // = r - q*x2/beta + qd*(x1 + x2/beta) // if qd=0: <= r <= x1-1 < x1 // if qd>0: < r - q*x2/beta + qd*(x1+1) <= x1 // hence always < x1 <= beta*x, hence // 1 - x*y1 <= x/beta, hence 1/x - y1 <= 1/beta. // And on the other hand // beta^2 - beta*(beta+q-qd)*x // = beta^2 - (beta+q-qd)*(x1 + x2/beta) - beta*(beta+q-qd)*xr // where the third term is // <= 2*beta^2*xr < beta/4 <= x1/2 <= beta*x/2. // Hence // beta^2 - beta*(beta+q-qd)*x > // > beta^2 - (beta+q-qd)*(x1 + x2/beta) - beta*x/2 // = r - q*x2/beta + qd*(x1 + x2/beta) - beta*x/2 // >= - qd - beta*x/2 > - beta*x, hence // 1 - x*y1 >= -x/beta, hence 1/x - y1 >= -1/beta. // Step n -> m with n < m <= 2*n: // Write x = xm + xr with 0 <= xr < 1/(8*beta^m). // Set ym' = 2*yn - xm*yn*yn, // ym = ym' rounded up to be a multiple of 1/(2*beta^m). // Rationale: // 1/x - ym <= 1/x - ym' = 1/x - 2*yn + (x-xr)*yn*yn // <= 1/x - 2*yn + x*yn*yn = x * (1/x - yn)^2 < x*beta^(-2n) // < beta^(-2n) <= beta^(-m), and // 1/x - ym' = 1/x - 2*yn + (x-xr)*yn*yn // > 1/x - 2*yn + x*yn*yn - 1/(2*beta^m) // = x * (1/x - yn)^2 - 1/(2*beta^m) >= - 1/(2*beta^m), hence // 1/x - ym > 1/x - ym' - 1/(2*beta^m) >= -1/beta^m. // Since it is needed to compute ym as a multiple of 1/(2*beta^m), // not only as a multiple of 1/beta^m, we compute with zn = 2*yn. // The iteration now reads zm = round_up(2*zn - xm*zn*zn/2). // Choice of n: // So that the computation is minimal, e.g. in the case b_len=10: // 1 -> 2 -> 3 -> 5 -> 10 and not 1 -> 2 -> 4 -> 8 -> 10. void cl_UDS_recip (const uintD* a_MSDptr, uintC a_len, uintD* b_MSDptr, uintC b_len) { var uintC y_len = b_len+1; var uintC x_len = (a_len <= b_len ? a_len+1 : y_len); var uintD* x_MSDptr; var uintD* y_MSDptr; var uintD* y2_MSDptr; var uintD* y3_MSDptr; CL_ALLOCA_STACK; num_stack_alloc(x_len,x_MSDptr=,); num_stack_alloc(y_len,y_MSDptr=,); num_stack_alloc(2*y_len,y2_MSDptr=,); num_stack_alloc(x_len+2*y_len,y3_MSDptr=,); // Prepare x/2 at x_MSDptr by shifting a right by 1 bit. if (a_len <= b_len) { mspref(x_MSDptr,a_len) = shiftrightcopy_loop_msp(a_MSDptr,x_MSDptr,a_len,1,0); } else { mspref(x_MSDptr,b_len) = shiftrightcopy_loop_msp(a_MSDptr,x_MSDptr,b_len,1,0) | ((mspref(a_MSDptr,b_len) & -bit(intDsize-3)) >> 1); } // Step n = 1. { var uintD x1 = mspref(a_MSDptr,0); var uintD x2 = (a_len > 1 ? (mspref(a_MSDptr,1) & -bit(intDsize-3)) : 0); if ((x1 == (uintD)bit(intDsize-1)) && (x2 == 0)) { mspref(y_MSDptr,0) = 4; mspref(y_MSDptr,1) = 0; } else { var uintD q; var uintD r; var uintD chi; var uintD clo; #if HAVE_DD divuD((uintDD)(-highlowDD(x1,x2)),x1, q=,r=); var uintDD c = muluD(q,x2); chi = highD(c); clo = lowD(c); #else divuD((uintD)(-x1 - (x2>0 ? 1 : 0)),(uintD)(-x2),x1, q=,r=); muluD(q,x2,chi=,clo=); #endif if (clo > 0) chi++; // qd := ceiling(max(chi-r,0)/(x1+1)) if (chi > r) { chi -= r; if (chi > x1) { q--; } q--; } mspref(y_MSDptr,0) = 2 + (q>>(intDsize-1)); mspref(y_MSDptr,1) = q<<1; } } // Other steps. var int k; integerlengthC(b_len-1,k=); // 2^(k-1) < b_len <= 2^k, so we need k steps. var uintC n = 1; for (; k>0; k--) { // n = ceiling(b_len/2^k) limbs of y have already been computed. var uintC m = ((b_len-1)>>(k-1))+1; // = ceiling(b_len/2^(k-1)) // Compute zm := 2*zn - round_down(xm/2*zn*zn). cl_UDS_mul_square(y_MSDptr mspop (n+1),n+1,y2_MSDptr mspop 2*(n+1)); var uintC xm_len = (m < x_len ? m+1 : x_len); cl_UDS_mul(x_MSDptr mspop xm_len,xm_len, y2_MSDptr mspop 2*(n+1),2*n+1, y3_MSDptr mspop (xm_len+2*n+1)); // Round down by just taking the first m+1 limbs at y3_MSDptr. shift1left_loop_lsp(y_MSDptr mspop (n+1),n+1); clear_loop_msp(y_MSDptr mspop (n+1),m-n); subfrom_loop_lsp(y3_MSDptr mspop (m+1),y_MSDptr mspop (m+1),m+1); n = m; } // All n = b_len limbs of y have been computed. Divide by 2. mspref(b_MSDptr,b_len+1) = shiftrightcopy_loop_msp(y_MSDptr,b_MSDptr,b_len+1,1,0); } // Bit complexity (N := b_len): O(M(N)). } // namespace cln cln-1.3.3/src/base/cl_immclasses.cc0000644000000000000000000000040511201634736014010 0ustar // cl_immediate_classes. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/object.h" // Implementation. namespace cln { const struct cl_class * cl_immediate_classes [1<refcount = 1; str->type = &cl_class_string; str->length = len; { var const char* ptr1 = ptr; var char* ptr2 = &str->data[0]; var uintL count; for (count = len; count > 0; count--) *ptr2++ = *ptr1++; *ptr2++ = '\0'; } return str; } } // namespace cln cln-1.3.3/src/base/string/cl_st_make0.h0000644000000000000000000000031211201634736014520 0ustar #ifndef _CL_ST_MAKE0_H #define _CL_ST_MAKE0_H #include "cln/string.h" namespace cln { extern cl_heap_string* cl_make_heap_string (unsigned long len); } // namespace cln #endif /* _CL_ST_MAKE0_H */ cln-1.3.3/src/base/string/misc/0000755000000000000000000000000012173046176013131 5ustar cln-1.3.3/src/base/string/misc/cl_st_class.cc0000644000000000000000000000035411201634736015727 0ustar // cl_class_string. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/string.h" // Implementation. namespace cln { cl_class cl_class_string = { NULL, // empty destructor 0 }; } // namespace cln cln-1.3.3/src/base/string/cl_spushstring.h0000644000000000000000000000255411201634736015420 0ustar // Extendable strings. #ifndef _CL_SPUSHSTRING_H #define _CL_SPUSHSTRING_H #include "cln/object.h" #include "cln/malloc.h" #include "base/string/cl_sstring.h" #include "cln/exception.h" namespace cln { class cl_spushstring { protected: char * buffer; uintL alloc; // allocated size of buffer uintL index; // index into buffer, 0 <= index <= alloc public: // Constructor. When constructed, the string is empty. cl_spushstring (); // Destructor. ~cl_spushstring (); // Forget the contents. void reset (); // Add a character at the end. void push (char); // Adds several characters at the end at once. void append (const char * ptr, uintL len); // Get the contents as a string. Free it using free_hook() when done. char* contents (); // Look at the contents. uintL size() const; char operator[] (uintL i) const; }; inline cl_spushstring::cl_spushstring () { alloc = 20; // Must be > 0. buffer = (char *) malloc_hook(alloc); index = 0; } inline cl_spushstring::~cl_spushstring () { free_hook(buffer); } inline void cl_spushstring::reset () { index = 0; } inline char* cl_spushstring::contents () { return cl_sstring(buffer,index); } inline uintL cl_spushstring::size() const { return index; } inline char cl_spushstring::operator[] (uintL i) const { if (!(i < index)) throw runtime_exception(); return buffer[i]; } } // namespace cln #endif /* _CL_SPUSHSTRING_H */ cln-1.3.3/src/base/string/cl_st_make0.cc0000644000000000000000000000102311201634736014656 0ustar // cl_make_heap_string(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/string.h" // Implementation. #include "cln/malloc.h" #include "base/cl_offsetof.h" namespace cln { cl_heap_string* cl_make_heap_string (unsigned long len) { var cl_heap_string* str = (cl_heap_string*) malloc_hook(offsetofa(cl_heap_string,data)+sizeof(char)*(len+1)); str->refcount = 1; str->type = &cl_class_string; str->length = len; return str; /* Have to fill data[0..len] yourself. */ } } // namespace cln cln-1.3.3/src/base/string/cl_st_hashcode.cc0000644000000000000000000000133112034113706015433 0ustar // cln/string.hashcode(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/string.h" // Implementation. namespace cln { unsigned long hashcode (const cl_string& str) { var unsigned long code = 0x61284AF3; // We walk through all characters. It may take some time for very // long strings, but it's better than completely ignoring some characters. var long len = str.size(); var const char * ptr = str.asciz(); for (; len > 0; len--) { var unsigned char c = *ptr++; code = (code << 5) | (code >> 27); // rotate left 5 bits code += (long)c << 16; code ^= (long)c; code &= 0xFFFFFFFF; } return code; } } // namespace cln cln-1.3.3/src/base/string/cl_spushstring_append.cc0000644000000000000000000000123411201634736017077 0ustar // class cl_spushstring. // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/string/cl_spushstring.h" // Implementation. #include // declares memcpy() namespace cln { void cl_spushstring::append (const char * ptr, uintL len) { if (index + len > alloc) { var uintL newalloc = index+2*len; if (newalloc < 2*alloc) { newalloc = 2*alloc; } var char* newbuffer = (char *) malloc_hook(newalloc); memcpy(newbuffer,buffer,alloc); free_hook(buffer); buffer = newbuffer; alloc = newalloc; } // Now index+len <= alloc. for (uintL count = len; count > 0; count--) buffer[index++] = *ptr++; } } // namespace cln cln-1.3.3/src/base/string/cl_st_concat1.cc0000644000000000000000000000145211201634736015217 0ustar // cl_string concatenation. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/string.h" // Implementation. #include "base/string/cl_st_make0.h" namespace cln { const cl_string operator+ (const cl_string& str1, const cl_string& str2) { unsigned long len1 = strlen(str1); unsigned long len2 = strlen(str2); var cl_heap_string* str = cl_make_heap_string(len1+len2); var char * ptr = &str->data[0]; { var const char * ptr1 = asciz(str1); for (var unsigned long count = len1; count > 0; count--) *ptr++ = *ptr1++; } { var const char * ptr2 = asciz(str2); for (var unsigned long count = len2; count > 0; count--) *ptr++ = *ptr2++; } *ptr++ = '\0'; return str; } } // namespace cln cln-1.3.3/src/base/string/cl_sstring.h0000644000000000000000000000042111201634736014507 0ustar // Simple strings. #ifndef _CL_SSTRING_H #define _CL_SSTRING_H namespace cln { // Liefert einen String. // Mit malloc_hook() alloziert, mit free_hook() freizugeben. extern char * cl_sstring (const char * ptr, uintC len); } // namespace cln #endif /* _CL_SSTRING_H */ cln-1.3.3/src/base/string/cl_spushstring_push.cc0000644000000000000000000000102211201634736016602 0ustar // class cl_spushstring. // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/string/cl_spushstring.h" // Implementation. #include // declares memcpy() namespace cln { void cl_spushstring::push (char c) { if (index >= alloc) { var uintL newalloc = 2*alloc; var char* newbuffer = (char *) malloc_hook(newalloc); memcpy(newbuffer,buffer,alloc); free_hook(buffer); buffer = newbuffer; alloc = newalloc; } // Now index < alloc. buffer[index++] = c; } } // namespace cln cln-1.3.3/src/base/string/cl_st_debug.cc0000644000000000000000000000254011201634736014754 0ustar // cl_string debugging support. // General includes. #include "base/cl_sysdep.h" // Specification. // Implementation. #include "cln/string.h" #include "cln/io.h" #include namespace cln { static void dprint (cl_heap* pointer) { var const cl_string& obj = *(const cl_string*)&pointer; fprint(cl_debugout, "(cl_string) \""); var unsigned long l = obj.size(); for (var unsigned long i = 0; i < l; i++) { var unsigned char c = obj[i]; if (c >= 0x20) { if (c == '"' || c == '\\') fprintchar(cl_debugout, '\\'); fprintchar(cl_debugout, c); } else switch (c) { case '\n': fprint(cl_debugout, "\\n"); break; case '\t': fprint(cl_debugout, "\\t"); break; case '\b': fprint(cl_debugout, "\\b"); break; case '\r': fprint(cl_debugout, "\\r"); break; case '\f': fprint(cl_debugout, "\\f"); break; case '\v': fprint(cl_debugout, "\\v"); break; default: static const char hexdigits[] = "0123456789abcdef"; fprintchar(cl_debugout, '\\'); fprintchar(cl_debugout, 'x'); fprintchar(cl_debugout, hexdigits[(c>>4)&0x0f]); fprintchar(cl_debugout, hexdigits[c&0x0f]); break; } } fprint(cl_debugout, "\""); } AT_INITIALIZATION(dprint_string) { cl_register_type_printer(cl_class_string,dprint); } // This dummy links in this module when requires it. int cl_string_debug_module; } // namespace cln cln-1.3.3/src/base/string/cl_sstring.cc0000644000000000000000000000074711201634736014660 0ustar // cl_sstring(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "base/string/cl_sstring.h" // Implementation. #include "cln/malloc.h" namespace cln { char * cl_sstring (const char * ptr, uintC len) { var char * string = (char *) malloc_hook(len+1); { var const char* ptr1 = ptr; var char* ptr2 = string; var uintC count; for (count = len; count > 0; count--) *ptr2++ = *ptr1++; *ptr2++ = '\0'; } return string; } } // namespace cln cln-1.3.3/src/base/string/cl_st_concat3.cc0000644000000000000000000000144711201634736015225 0ustar // cl_string concatenation. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/string.h" // Implementation. #include "base/string/cl_st_make0.h" namespace cln { const cl_string operator+ (const cl_string& str1, const char* str2) { unsigned long len1 = strlen(str1); unsigned long len2 = ::strlen(str2); var cl_heap_string* str = cl_make_heap_string(len1+len2); var char * ptr = &str->data[0]; { var const char * ptr1 = asciz(str1); for (var unsigned long count = len1; count > 0; count--) *ptr++ = *ptr1++; } { var const char * ptr2 = asciz(str2); for (var unsigned long count = len2; count > 0; count--) *ptr++ = *ptr2++; } *ptr++ = '\0'; return str; } } // namespace cln cln-1.3.3/src/base/string/cl_st_c2.cc0000644000000000000000000000057711201634736014202 0ustar // constructor cl_string (const char * s). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/string.h" // Implementation. namespace cln { extern cl_heap_string* cl_make_heap_string (const char * ptr, unsigned long len); cl_string::cl_string (const char * ptr, unsigned long len) { pointer = cl_make_heap_string(ptr,len); } } // namespace cln cln-1.3.3/src/base/string/cl_st_make1.cc0000644000000000000000000000126311201634736014665 0ustar // cl_make_heap_string(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/string.h" // Implementation. #include "cln/malloc.h" #include "base/cl_offsetof.h" namespace cln { cl_heap_string* cl_make_heap_string (const char * s) { var unsigned long len = ::strlen(s); var cl_heap_string* str = (cl_heap_string*) malloc_hook(offsetofa(cl_heap_string,data)+sizeof(char)*(len+1)); str->refcount = 1; str->type = &cl_class_string; str->length = len; { var const char* ptr1 = s; var char* ptr2 = &str->data[0]; var uintL count; for (count = len; count > 0; count--) *ptr2++ = *ptr1++; *ptr2++ = '\0'; } return str; } } // namespace cln cln-1.3.3/src/base/string/output/0000755000000000000000000000000012173046176013536 5ustar cln-1.3.3/src/base/string/output/cl_st_print.cc0000644000000000000000000000043711201634736016365 0ustar // fprint(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/string.h" // Implementation. #include "cln/io.h" namespace cln { void fprint (std::ostream& stream, const cl_string& str) { stream.write(str.asciz(),str.size()); } } // namespace cln cln-1.3.3/src/base/string/cl_st_concat2.cc0000644000000000000000000000144711201634736015224 0ustar // cl_string concatenation. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/string.h" // Implementation. #include "base/string/cl_st_make0.h" namespace cln { const cl_string operator+ (const char* str1, const cl_string& str2) { unsigned long len1 = ::strlen(str1); unsigned long len2 = strlen(str2); var cl_heap_string* str = cl_make_heap_string(len1+len2); var char * ptr = &str->data[0]; { var const char * ptr1 = asciz(str1); for (var unsigned long count = len1; count > 0; count--) *ptr++ = *ptr1++; } { var const char * ptr2 = asciz(str2); for (var unsigned long count = len2; count > 0; count--) *ptr++ = *ptr2++; } *ptr++ = '\0'; return str; } } // namespace cln cln-1.3.3/src/base/string/input/0000755000000000000000000000000012173046176013335 5ustar cln-1.3.3/src/base/string/input/cl_st_gettoken.cc0000644000000000000000000000204411201634736016644 0ustar // operator>>. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/string.h" // Implementation. #include "cln/io.h" #include "base/string/cl_spushstring.h" #include namespace cln { std::istream& operator>> (std::istream& stream, cl_string& str) { var cl_spushstring buffer; var int n = stream.width(); // Handling of eofp is tricky: EOF is reached when (!stream.good()) || (stream.eof()). int c; // Skip whitespace. while (stream.good()) { c = stream.get(); if (stream.eof()) break; if (!isspace(c)) { if (--n == 0) { // stream.width()==1, means no characters. stream.unget(); break; } // If stream.width()==0, n gets negative and never 0. goto nonws; } } goto done; // Read non-whitespace. while (stream.good()) { c = stream.get(); if (stream.eof()) break; if (isspace(c)) { stream.unget(); break; } nonws: buffer.push(c); if (--n == 0) break; } done: str = buffer.contents(); stream.width(0); return stream; } } // namespace cln cln-1.3.3/src/base/string/input/cl_st_getline1.cc0000644000000000000000000000107411201634736016536 0ustar // cl_fgetline(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/string.h" // Implementation. #include "cln/io.h" #include "base/string/cl_spushstring.h" namespace cln { const cl_string cl_fgetline (std::istream& stream, char delim) { var cl_spushstring buffer; // Handling of eofp is tricky: EOF is reached when (!stream.good()) || (stream.eof()). while (stream.good()) { var int c = stream.get(); if (stream.eof()) break; if (c==delim) break; buffer.push(c); } return buffer.contents(); } } // namespace cln cln-1.3.3/src/base/string/input/cl_st_get2.cc0000644000000000000000000000125611201634736015671 0ustar // cl_fget(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/string.h" // Implementation. #include "cln/io.h" #include "base/string/cl_spushstring.h" namespace cln { const cl_string cl_fget (std::istream& stream, int n, char delim) { var cl_spushstring buffer; // Handling of eofp is tricky: EOF is reached when (!stream.good()) || (stream.eof()). while (stream.good()) { var int c = stream.get(); if (stream.eof()) break; if (c==delim) { stream.unget(); break; } if (--n <= 0) { stream.unget(); stream.setstate(std::ios::failbit); break; } buffer.push(c); } return buffer.contents(); } } // namespace cln cln-1.3.3/src/base/string/input/cl_st_getline2.cc0000644000000000000000000000123511201634736016536 0ustar // cl_fgetline(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/string.h" // Implementation. #include "cln/io.h" #include "base/string/cl_spushstring.h" namespace cln { const cl_string cl_fgetline (std::istream& stream, int n, char delim) { var cl_spushstring buffer; // Handling of eofp is tricky: EOF is reached when (!stream.good()) || (stream.eof()). while (stream.good()) { var int c = stream.get(); if (stream.eof()) break; if (c==delim) break; if (--n <= 0) { stream.unget(); stream.setstate(std::ios::failbit); break; } buffer.push(c); } return buffer.contents(); } } // namespace cln cln-1.3.3/src/base/string/input/cl_st_get1.cc0000644000000000000000000000111511201634736015662 0ustar // cl_fget(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/string.h" // Implementation. #include "cln/io.h" #include "base/string/cl_spushstring.h" namespace cln { const cl_string cl_fget (std::istream& stream, char delim) { var cl_spushstring buffer; // Handling of eofp is tricky: EOF is reached when (!stream.good()) || (stream.eof()). while (stream.good()) { var int c = stream.get(); if (stream.eof()) break; if (c==delim) { stream.unget(); break; } buffer.push(c); } return buffer.contents(); } } // namespace cln cln-1.3.3/src/base/output/0000755000000000000000000000000012173046176012230 5ustar cln-1.3.3/src/base/output/cl_output_dec.cc0000644000000000000000000000147612034113706015366 0ustar // fprintdecimal(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/io.h" // Implementation. namespace cln { // We don't use `stream << x' or `stream << dec << x', because an ostream // carries so many attributes, and we don't want to modifies these attributes. void fprintdecimal (std::ostream& stream, unsigned long x) { #define bufsize 20 var char buf[bufsize+1]; var char* bufptr = &buf[bufsize]; *bufptr = '\0'; do { unsigned long q = x / 10; unsigned long r = x % 10; *--bufptr = '0'+r; x = q; } while (x > 0); fprint(stream,bufptr); #undef bufsize } void fprintdecimal (std::ostream& stream, long x) { if (x >= 0) fprintdecimal(stream,(unsigned long)x); else { fprintchar(stream,'-'); fprintdecimal(stream,(unsigned long)(-1-x)+1); } } } // namespace cln cln-1.3.3/src/base/output/cl_prin_globals.cc0000644000000000000000000000170211201634736015664 0ustar // Global variables in CLN // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/output.h" // Implementation. namespace cln { cl_print_flags default_print_flags; int cl_prin_globals_init_helper::count = 0; cl_prin_globals_init_helper::cl_prin_globals_init_helper() { if (count++ == 0) new ((void *)&default_print_flags) cl_print_flags(); } cl_prin_globals_init_helper::~cl_prin_globals_init_helper() { if (--count == 0) { // Nothing to clean up. } } #if 0 // The default constructors already do this. AT_INITIALIZATION(default_print_flags) { default_print_flags.rational_base = 10; default_print_flags.rational_readably = false; default_print_flags.float_readably = false; default_print_flags.default_float_format = float_format_ffloat; default_print_flags.complex_readably = false; default_print_flags.vector_syntax = vsyntax_pretty; default_print_flags.univpoly_varname = "x"; } #endif } // namespace cln cln-1.3.3/src/base/output/cl_output_hex.cc0000644000000000000000000000130412034113706015405 0ustar // fprinthexadecimal(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/io.h" // Implementation. namespace cln { void fprinthexadecimal (std::ostream& stream, unsigned long x) { #define bufsize 16 var char buf[bufsize+1]; var char* bufptr = &buf[bufsize]; *bufptr = '\0'; do { unsigned long q = x / 16; unsigned long r = x % 16; *--bufptr = (r<10 ? '0'+r : 'A'-10+r); x = q; } while (x > 0); fprint(stream,bufptr); #undef bufsize } void fprinthexadecimal (std::ostream& stream, long x) { if (x >= 0) fprintdecimal(stream,(unsigned long)x); else { fprintchar(stream,'-'); fprintdecimal(stream,(unsigned long)(-1-x)+1); } } } // namespace cln cln-1.3.3/src/base/input/0000755000000000000000000000000012173046176012027 5ustar cln-1.3.3/src/base/input/cl_read_bad_syntax_exception.cc0000644000000000000000000000133711201634736020221 0ustar // read_number_bad_syntax_exception(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/number_io.h" // Implementation. #include #include "cln/io.h" namespace cln { static inline const std::string read_number_bad_syntax_msg (const char * string, const char * string_limit) { std::ostringstream buf; fprint(buf, "Illegal number syntax: \""); for (const char * ptr = string; ptr != string_limit; ptr++) fprintchar(buf, *ptr); fprint(buf, "\""); return buf.str(); } read_number_bad_syntax_exception::read_number_bad_syntax_exception (const char * string, const char * string_limit) : read_number_exception(read_number_bad_syntax_msg(string, string_limit)) {} } // namespace cln cln-1.3.3/src/base/input/cl_read_junk_exception.cc0000644000000000000000000000156411201634736017036 0ustar // read_number_junk_exception(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/number_io.h" // Implementation. #include #include "cln/io.h" namespace cln { static inline const std::string read_number_junk_msg (const char * string_rest, const char * string, const char * string_limit) { std::ostringstream buf; fprint(buf, "Junk after number: "); { for (const char * ptr = string; ptr != string_rest; ptr++) fprintchar(buf, *ptr); } fprint(buf, "\""); { for (const char * ptr = string_rest; ptr != string_limit; ptr++) fprintchar(buf, *ptr); } fprint(buf, "\""); return buf.str(); } read_number_junk_exception::read_number_junk_exception (const char * string_rest, const char * string, const char * string_limit) : read_number_exception(read_number_junk_msg(string_rest, string, string_limit)) {} } // namespace cln cln-1.3.3/src/base/input/cl_read_eof_exception.cc0000644000000000000000000000051711201634736016635 0ustar // read_number_eof_exception(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/number_io.h" // Implementation. #include "cln/io.h" namespace cln { read_number_eof_exception::read_number_eof_exception () : read_number_exception("read_number: end of stream encountered") {} } // namespace cln cln-1.3.3/src/base/cl_malloc.cc0000644000000000000000000000121511201634736013117 0ustar // malloc_hook, free_hook. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/malloc.h" // Implementation. #include #include "cln/io.h" #include "cln/exception.h" #ifndef malloc extern "C" void* malloc (size_t size); #endif #ifndef free extern "C" void free (void* ptr); #endif namespace cln { // Just like malloc() but never return NULL pointers. static void* xmalloc (size_t size) { void* ptr = malloc(size); if (ptr) return ptr; throw runtime_exception("Out of virtual memory."); } void* (*malloc_hook) (size_t size) = xmalloc; void (*free_hook) (void* ptr) = free; } // namespace cln cln-1.3.3/src/base/cl_alloca.h0000644000000000000000000000630612034113706012745 0ustar // cl_alloca(). #ifndef _CL_ALLOCA_H #define _CL_ALLOCA_H #include "base/cl_macros.h" #include namespace cln { // Allocating temporary data of arbitrary size. // We prefer to allocate it on the stack instead of via malloc(), because // that's fully inlinable and causes less cache misses. But the global stack // size of applications is limited (typically 8 MB on Unix, 1 MB on Windows), // and we don't want users of CLN to need to change these limits. Therefore // we use stack allocation only for amounts < 64KB, and malloc() for larger // blocks. // Usage: // {CL_ALLOCA_STACK; // ... // ... = cl_alloca(...); // ... // ... = cl_small_alloca(...); // ... // ... = cl_alloca(...); // ... // } // CL_ALLOCA_STACK declares that use of cl_alloca() and cl_small_alloca() is // possible. Then cl_alloca() and cl_small_alloca() can be used an arbitrary // number of times to get room. // The allocated room's extent ends at the end of the { ... } block. // In every C function CL_ALLOCA_STACK should only called once. // Because of a gcc bug, functions using these macros shouldn't be declared // inline. // cl_alloca(size) fetches a block of size bytes. // cl_small_alloca(size) fetches a block of size bytes, with size < 65536. // CL_SMALL_ALLOCA_STACK is similar to CL_ALLOCA_STACK, but allows only // the use of cl_small_alloca(), not cl_alloca(). // CL_ALLOCA_STACK creates a variable containing a linked list of pointers // to be freed when the block is exited. struct cl_alloca_header { cl_alloca_header* next; long usable_memory[1]; // "long" guarantees alignment }; extern cl_alloca_header* cl_alloc_alloca_header (size_t size); extern void cl_free_alloca_header (cl_alloca_header* pointer); class cl_alloca_stack { cl_alloca_header* pointer; public: cl_alloca_stack () { pointer = NULL; } ~cl_alloca_stack () { if (pointer) cl_free_alloca_header(pointer); } void* push (cl_alloca_header* p) { p->next = pointer; pointer = p; return &p->usable_memory; } }; #define CL_ALLOCA_STACK \ cl_alloca_stack _alloca_stack #define CL_ALLOCA_MAX 65536 #if defined(__GNUC__) && !defined(__riscos) && !defined(__convex__) #define cl_alloca(size) ((size) >= CL_ALLOCA_MAX ? _alloca_stack.push(cl_alloc_alloca_header(size)) : __builtin_alloca(size)) #define cl_small_alloca(size) __builtin_alloca(size) #define CL_SMALL_ALLOCA_STACK #elif !defined(NO_ALLOCA) && !defined(__sparc__) && !defined(__sparc64__) #define cl_alloca(size) ((size) >= CL_ALLOCA_MAX ? _alloca_stack.push(cl_alloc_alloca_header(size)) : alloca(size)) #define cl_small_alloca(size) alloca(size) #define CL_SMALL_ALLOCA_STACK #else #define cl_alloca(size) _alloca_stack.push(cl_alloc_alloca_header(size)) #define cl_small_alloca(size) _alloca_stack.push(cl_alloc_alloca_header(size)) #define CL_SMALL_ALLOCA_STACK CL_ALLOCA_STACK #endif // cl_alloc_array(type,size) // cl_small_alloc_array(type,size) // allocate an array with dynamic extent. #define cl_alloc_array(arrayeltype,arraysize) \ (arrayeltype*)cl_alloca((arraysize)*sizeof(arrayeltype)) #define cl_small_alloc_array(arrayeltype,arraysize) \ (arrayeltype*)cl_small_alloca((arraysize)*sizeof(arrayeltype)) } // namespace cln #endif /* _CL_ALLOCA_H */ cln-1.3.3/src/vector/0000755000000000000000000000000012173046202011246 5ustar cln-1.3.3/src/vector/cl_GV_I_copy.cc0000644000000000000000000000055111201634740014053 0ustar // copy(). // General includes. #include "base/cl_sysdep.h" // Specification. #define CL_GV_NO_RANGECHECKS #include "cln/GV_integer.h" // Implementation. namespace cln { const cl_GV_I copy (const cl_GV_I& v) { std::size_t len = v.size(); cl_GV_I w = cl_GV_I(len, v.maxbits()); cl_GV_I::copy_elements(v, 0, w, 0, len); return w; } } // namespace cln cln-1.3.3/src/vector/cl_SV_copy.cc0000644000000000000000000000110712034113706013614 0ustar // copy(). // General includes. #include "base/cl_sysdep.h" // Specification. #define CL_SV_NO_RANGECHECKS #include "cln/SV.h" // Implementation. #include "cln/malloc.h" namespace cln { const cl_SV_any copy (const cl_SV_any& src) { std::size_t len = src.size(); cl_heap_SV_any* hv = (cl_heap_SV_any*) malloc_hook(sizeof(cl_heap_SV_any)+sizeof(cl_gcobject)*len); hv->refcount = 1; hv->type = src.pointer_type(); new (&hv->v) cl_SV_inner (len); for (std::size_t i = 0; i < len; i++) init1(cl_gcobject, hv->v[i]) (src[i]); return hv; } } // namespace cln cln-1.3.3/src/vector/cl_SV_io.h0000644000000000000000000000105011201634740013111 0ustar // I/O of vectors. #ifndef _CL_SV_IO_H #define _CL_SV_IO_H #include "cln/number_io.h" #include "cln/SV.h" #include "cln/SV_number.h" namespace cln { // Gibt einen Vektor aus. // print_vector(stream,flags,fun,z); // > stream: Stream // > flags: Flags // > fun: Ausgabefunktion für die einzelnen Elemente // > vector: Vektor extern void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* fun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_SV_number& vector); } // namespace cln #endif /* _CL_SV_IO_H */ cln-1.3.3/src/vector/cl_SV_number_debug.cc0000644000000000000000000000162611201634740015307 0ustar // cl_SV_number debugging support. // General includes. #include "base/cl_sysdep.h" // Specification. // Implementation. #include "cln/output.h" #include "cln/SV_number.h" #include "cln/io.h" #include "vector/cl_SV_io.h" namespace cln { static void print_for_debug (std::ostream& stream, const cl_print_flags& flags, const cl_number& z) { unused stream; // must be cl_debugout unused flags; // must be default_print_flags z.debug_print(); } static void dprint (cl_heap* pointer) { var const cl_SV_number& obj = *(const cl_SV_number*)&pointer; fprint(cl_debugout, "(cl_SV_number) "); print_vector(cl_debugout,default_print_flags,&print_for_debug,obj); } AT_INITIALIZATION(dprint_SV_number) { extern cl_class& cl_class_svector_number(); cl_class_svector_number().dprint = dprint; } // This dummy links in this module when requires it. int cl_SV_number_debug_module; } // namespace cln cln-1.3.3/src/vector/cl_GV_number_copy.cc0000644000000000000000000000056411201634740015157 0ustar // copy(). // General includes. #include "base/cl_sysdep.h" // Specification. #define CL_GV_NO_RANGECHECKS #include "cln/GV_number.h" // Implementation. namespace cln { const cl_GV_number copy (const cl_GV_number& v) { std::size_t len = v.size(); cl_GV_number w = cl_GV_number(len); cl_GV_number::copy_elements(v, 0, w, 0, len); return w; } } // namespace cln cln-1.3.3/src/vector/cl_GV_I_debug.cc0000644000000000000000000000111511201634740014164 0ustar // cl_GV_I debugging support. // General includes. #include "base/cl_sysdep.h" // Specification. // Implementation. #include "cln/GV_integer.h" #include "cln/io.h" namespace cln { static void dprint (cl_heap* pointer) { var const cl_GV_I& obj = *(const cl_GV_I*)&pointer; fprint(cl_debugout, "(cl_GV_I) "); fprint(cl_debugout, obj); } AT_INITIALIZATION(dprint_GV_I) { extern cl_class& cl_class_gvector_integer(); cl_class_gvector_integer().dprint = dprint; } // This dummy links in this module when requires it. int cl_GV_I_debug_module; } // namespace cln cln-1.3.3/src/vector/cl_GV_I.cc0000644000000000000000000003734511201634740013034 0ustar // cl_make_heap_GV_I(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/GV_integer.h" // Implementation. #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "cln/exception.h" #include "base/cl_offsetof.h" namespace cln { // Memory-efficient integer vectors: If all entries are known in advance to // be >= 0 and < 2^m, we reserve only m bits for each entry. (m=1,2,4,8,16,32). // Thus we end up with 6 kinds of bit/byte vectors, and the general integer // vectors. // For enquiring purposes, we store m in the vectorops table. Because of this, // treating a cl_GV_RA as cl_GV_I is wrong. In particular, we cannot use the // cl_null_GV_N to initialize a cl_GV_I; need a special cl_null_GV_I. static void cl_gvector_integer_destructor (cl_heap* pointer) { #if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug (*(cl_heap_GV_I*)pointer).~cl_heap_GV(); #else (*(cl_heap_GV_I*)pointer).~cl_heap_GV_I(); #endif } // XXX: Ugh, this needs to be non-const (and non-static) for overriding // the printing function (see cl_GV_I_debug.cc) cl_class& cl_class_gvector_integer() { static cl_class instance = { cl_gvector_integer_destructor, 0 }; return instance; } static inline cl_heap_GV_I * outcast (cl_GV_inner* vec) { return (cl_heap_GV_I *)((char *) vec - offsetof(cl_heap_GV_I,v)); } static inline const cl_heap_GV_I * outcast (const cl_GV_inner* vec) { return (const cl_heap_GV_I *)((const char *) vec - offsetof(cl_heap_GV_I,v)); } // Add more info to the vectorops tables. struct cl_GV_I_vectorops { cl_GV_vectorops ops; sintC m; // for maxbits }; static inline cl_GV_I_vectorops* outcast (cl_GV_vectorops* vectorops) { return (cl_GV_I_vectorops*)((char *) vectorops - offsetof(cl_GV_I_vectorops,ops)); } // Vectors of general integers. struct cl_heap_GV_I_general : public cl_heap_GV_I { cl_I data[1]; // Standard allocation disabled. void* operator new (size_t size) { unused size; throw runtime_exception(); } // Standard deallocation disabled. void operator delete (void* ptr) { unused ptr; throw runtime_exception(); } // No default constructor. cl_heap_GV_I_general (); }; static const cl_I general_element (const cl_GV_inner* vec, std::size_t index) { return ((const cl_heap_GV_I_general *) outcast(vec))->data[index]; } static void general_set_element (cl_GV_inner* vec, std::size_t index, const cl_I& x) { ((cl_heap_GV_I_general *) outcast(vec))->data[index] = x; } static void general_do_delete (cl_GV_inner* vec) { cl_heap_GV_I_general* hv = (cl_heap_GV_I_general *) outcast(vec); std::size_t len = hv->v.size(); for (std::size_t i = 0; i < len; i++) hv->data[i].~cl_I(); } static void general_copy_elements (const cl_GV_inner* srcvec, std::size_t srcindex, cl_GV_inner* destvec, std::size_t destindex, std::size_t count) { if (count > 0) { const cl_heap_GV_I_general* srcv = (const cl_heap_GV_I_general *) outcast(srcvec); cl_heap_GV_I_general* destv = (cl_heap_GV_I_general *) outcast(destvec); std::size_t srclen = srcv->v.size(); std::size_t destlen = destv->v.size(); if (!(srcindex <= srcindex+count && srcindex+count <= srclen)) throw runtime_exception(); if (!(destindex <= destindex+count && destindex+count <= destlen)) throw runtime_exception(); do { destv->data[destindex++] = srcv->data[srcindex++]; } while (--count > 0); } } static cl_GV_I_vectorops general_vectorops = {{ general_element, general_set_element, general_do_delete, general_copy_elements }, -1 }; cl_heap_GV_I* cl_make_heap_GV_I (std::size_t len) { cl_heap_GV_I_general* hv = (cl_heap_GV_I_general*) malloc_hook(offsetofa(cl_heap_GV_I_general,data)+sizeof(cl_I)*len); hv->refcount = 1; hv->type = &cl_class_gvector_integer(); new (&hv->v) cl_GV_inner (len,&general_vectorops.ops); for (std::size_t i = 0; i < len; i++) init1(cl_I, hv->data[i]) (); return hv; } // Vectors of integers requiring only few bits. #define DEFINE_cl_heap_GV_I_bits(m,uint_t) \ struct cl_heap_GV_I_bits##m : public cl_heap_GV_I { \ uint_t data[1]; \ /* Standard allocation disabled. */ \ void* operator new (size_t size) { unused size; throw runtime_exception(); } \ /* Standard deallocation disabled. */ \ void operator delete (void* ptr) { unused ptr; throw runtime_exception(); } \ /* No default constructor. */ \ cl_heap_GV_I_bits##m (); \ }; \ static const cl_I bits##m##_element (const cl_GV_inner* vec, std::size_t index); \ static void bits##m##_set_element (cl_GV_inner* vec, std::size_t index, const cl_I& x); \ static void bits##m##_copy_elements (const cl_GV_inner* srcvec, std::size_t srcindex, cl_GV_inner* destvec, std::size_t destindex, std::size_t count) \ { \ if (count > 0) { \ const cl_heap_GV_I_bits##m * srcv = \ (const cl_heap_GV_I_bits##m *) outcast(srcvec); \ cl_heap_GV_I_bits##m * destv = \ (cl_heap_GV_I_bits##m *) outcast(destvec); \ std::size_t srclen = srcv->v.size(); \ std::size_t destlen = destv->v.size(); \ if (!(srcindex <= srcindex+count && srcindex+count <= srclen)) \ throw runtime_exception(); \ if (!(destindex <= destindex+count && destindex+count <= destlen)) \ throw runtime_exception(); \ if (m == intDsize) { \ const uintD* srcptr = &srcv->data[srcindex]; \ uintD* destptr = &destv->data[destindex]; \ do { \ *destptr++ = *srcptr++; \ } while (--count > 0); \ } else \ bits_copy(srcv->data,m*srcindex,destv->data,m*destindex,m*count); \ } \ } \ static cl_GV_I_vectorops bits##m##_vectorops = {{ \ bits##m##_element, \ bits##m##_set_element, \ bits_do_delete, \ bits##m##_copy_elements }, \ m \ }; static void bits_do_delete (cl_GV_inner* vec) { unused vec; } // Copy bits srcptr.bits[srcindex..srcindex+count-1] into destptr.bits[destindex..destindex+count-1]. // Assumes that all range checks have already been performed. static void bits_copy (const uintD* srcptr, std::size_t srcindex, uintD* destptr, std::size_t destindex, std::size_t count) { srcptr += floor(srcindex,intDsize); destptr += floor(destindex,intDsize); srcindex = srcindex%intDsize; destindex = destindex%intDsize; // Now 0 <= srcindex < intDsize and 0 <= destindex < intDsize. if (srcindex == destindex) { // src and dest are aligned with respect to each other. if (srcindex > 0) { if (count <= intDsize-srcindex) { *destptr ^= (*destptr ^ *srcptr) & ((uintD)(bit(count)-1) << srcindex); return; } *destptr ^= (*destptr ^ *srcptr) & (uintD)minus_bit(srcindex); srcptr++; destptr++; count -= intDsize-srcindex; } // Now srcindex and destindex can be assumed to be 0. std::size_t count1 = count%intDsize; count = floor(count,intDsize); if (count > 0) { do { *destptr++ = *srcptr++; } while (--count > 0); } if (count1 > 0) { *destptr ^= (*destptr ^ *srcptr) & (uintD)(bit(count1)-1); } } else { std::size_t i = destindex - srcindex; uintD tmp; if (destindex >= srcindex) { // i > 0 if (count <= intDsize-destindex) { *destptr ^= (*destptr ^ (*srcptr << i)) & ((uintD)(bit(count)-1) << destindex); return; } *destptr ^= (*destptr ^ (*srcptr << i)) & (uintD)minus_bit(destindex); destptr++; tmp = *srcptr >> (intDsize-i); count -= intDsize-destindex; } else { // i < 0 if (count <= intDsize-srcindex) { *destptr ^= (*destptr ^ (*srcptr >> -i)) & ((uintD)(bit(count)-1) << destindex); return; } tmp = (*destptr & (uintD)(bit(destindex)-1)) | ((*srcptr >> srcindex) << destindex); count += destindex; i += intDsize; } srcptr++; // tmp now contains the low i bits to be put into *destptr. std::size_t count1 = count%intDsize; count = floor(count,intDsize); uintD lastdest; if (count == 0) lastdest = tmp; else { lastdest = shiftleftcopy_loop_up(srcptr,destptr,count,i); *destptr |= tmp; } // lastdest now contains the i bits shifted out of the top of the source. if (count1 > 0) { destptr += count; if (count1 > i) lastdest |= *(srcptr += count) << i; *destptr ^= (*destptr ^ lastdest) & (uintD)(bit(count1)-1); } } } // It would be most natural to use the following type for uint_t: // m = 1: uint_t = uint8 // m = 2: uint_t = uint8 // m = 4: uint_t = uint8 // m = 8: uint_t = uint8 // m = 16: uint_t = uint16 // m = 32: uint_t = uint32 // But we want to have a fast copy_elements routine. And for m=1, // we also want to use the fast shiftxor_loop_up() function for addition. // Hence we use the uint_t = uintD in all cases. (NB: intDsize>=32.) // The last ceiling(len*m/intDsize)*intDsize-len*m unused bits in the last word // are always 0. This provides some simplification for routines which work on // entire words: They don't need to special-case the last word. DEFINE_cl_heap_GV_I_bits(1,uintD) static const cl_I bits1_element (const cl_GV_inner* vec, std::size_t index) { return (unsigned int)((((const cl_heap_GV_I_bits1 *) outcast(vec))->data[index/intDsize] >> (index%intDsize)) & 0x1); } static void bits1_set_element (cl_GV_inner* vec, std::size_t index, const cl_I& x) { uintV xval; if (fixnump(x)) { xval = FN_to_UV(x); if (xval <= 0x1) { uintD* ptr = &((cl_heap_GV_I_bits1 *) outcast(vec))->data[index/intDsize]; index = index%intDsize; *ptr = *ptr ^ ((*ptr ^ ((uintD)xval << index)) & ((uintD)0x1 << index)); return; } } throw runtime_exception(); } DEFINE_cl_heap_GV_I_bits(2,uintD) static const cl_I bits2_element (const cl_GV_inner* vec, std::size_t index) { return (unsigned int)((((const cl_heap_GV_I_bits2 *) outcast(vec))->data[index/(intDsize/2)] >> (2*(index%(intDsize/2)))) & 0x3); } static void bits2_set_element (cl_GV_inner* vec, std::size_t index, const cl_I& x) { uintV xval; if (fixnump(x)) { xval = FN_to_UV(x); if (xval <= 0x3) { uintD* ptr = &((cl_heap_GV_I_bits2 *) outcast(vec))->data[index/(intDsize/2)]; index = 2*(index%(intDsize/2)); *ptr = *ptr ^ ((*ptr ^ ((uintD)xval << index)) & ((uintD)0x3 << index)); return; } } throw runtime_exception(); } DEFINE_cl_heap_GV_I_bits(4,uintD) static const cl_I bits4_element (const cl_GV_inner* vec, std::size_t index) { return (unsigned int)((((const cl_heap_GV_I_bits4 *) outcast(vec))->data[index/(intDsize/4)] >> (4*(index%(intDsize/4)))) & 0xF); } static void bits4_set_element (cl_GV_inner* vec, std::size_t index, const cl_I& x) { uintV xval; if (fixnump(x)) { xval = FN_to_UV(x); if (xval <= 0xF) { uintD* ptr = &((cl_heap_GV_I_bits4 *) outcast(vec))->data[index/(intDsize/4)]; index = 4*(index%(intDsize/4)); *ptr = *ptr ^ ((*ptr ^ ((uintD)xval << index)) & ((uintD)0xF << index)); return; } } throw runtime_exception(); } DEFINE_cl_heap_GV_I_bits(8,uintD) static const cl_I bits8_element (const cl_GV_inner* vec, std::size_t index) { #if CL_CPU_BIG_ENDIAN_P return (unsigned int)((((const cl_heap_GV_I_bits8 *) outcast(vec))->data[index/(intDsize/8)] >> (8*(index%(intDsize/8)))) & 0xFF); #else // Optimization which assumes little-endian storage of uint8 in an uintD return (unsigned int)(((uint8*)(((const cl_heap_GV_I_bits8 *) outcast(vec))->data))[index]); #endif } static void bits8_set_element (cl_GV_inner* vec, std::size_t index, const cl_I& x) { uintV xval; if (fixnump(x)) { xval = FN_to_UV(x); if (xval <= 0xFF) { #if CL_CPU_BIG_ENDIAN_P uintD* ptr = &((cl_heap_GV_I_bits8 *) outcast(vec))->data[index/(intDsize/8)]; index = 8*(index%(intDsize/8)); *ptr = *ptr ^ ((*ptr ^ ((uintD)xval << index)) & ((uintD)0xFF << index)); #else // Optimization which assumes little-endian storage of uint8 in an uintD ((uint8*)(((cl_heap_GV_I_bits8 *) outcast(vec))->data))[index] = xval; #endif return; } } throw runtime_exception(); } DEFINE_cl_heap_GV_I_bits(16,uintD) static const cl_I bits16_element (const cl_GV_inner* vec, std::size_t index) { #if CL_CPU_BIG_ENDIAN_P return (unsigned int)((((const cl_heap_GV_I_bits16 *) outcast(vec))->data[index/(intDsize/16)] >> (16*(index%(intDsize/16)))) & 0xFFFF); #else // Optimization which assumes little-endian storage of uint16 in an uintD return (unsigned int)(((uint16*)(((const cl_heap_GV_I_bits16 *) outcast(vec))->data))[index]); #endif } static void bits16_set_element (cl_GV_inner* vec, std::size_t index, const cl_I& x) { uintV xval; if (fixnump(x)) { xval = FN_to_UV(x); if (xval <= 0xFFFF) { #if CL_CPU_BIG_ENDIAN_P uintD* ptr = &((cl_heap_GV_I_bits16 *) outcast(vec))->data[index/(intDsize/16)]; index = 16*(index%(intDsize/16)); *ptr = *ptr ^ ((*ptr ^ ((uintD)xval << index)) & ((uintD)0xFFFF << index)); #else // Optimization which assumes little-endian storage of uint16 in an uintD ((uint16*)(((cl_heap_GV_I_bits16 *) outcast(vec))->data))[index] = xval; #endif return; } } throw runtime_exception(); } DEFINE_cl_heap_GV_I_bits(32,uintD) static const cl_I bits32_element (const cl_GV_inner* vec, std::size_t index) { #if (intDsize==32) return (unsigned long)(((const cl_heap_GV_I_bits32 *) outcast(vec))->data[index]); #elif CL_CPU_BIG_ENDIAN_P return (unsigned long)((((const cl_heap_GV_I_bits32 *) outcast(vec))->data[index/(intDsize/32)] >> (32*(index%(intDsize/32)))) & 0xFFFFFFFF); #else // Optimization which assumes little-endian storage of uint32 in an uintD return (unsigned long)(((uint32*)(((const cl_heap_GV_I_bits32 *) outcast(vec))->data))[index]); #endif } static void bits32_set_element (cl_GV_inner* vec, std::size_t index, const cl_I& x) { uint32 xval = cl_I_to_UL(x); #if (intDsize==32) ((cl_heap_GV_I_bits32 *) outcast(vec))->data[index] = xval; #elif CL_CPU_BIG_ENDIAN_P uintD* ptr = &((cl_heap_GV_I_bits32 *) outcast(vec))->data[index/(intDsize/32)]; index = 32*(index%(intDsize/32)); *ptr = *ptr ^ ((*ptr ^ ((uintD)xval << index)) & ((uintD)0xFFFFFFFF << index)); #else // Optimization which assumes little-endian storage of uint32 in an uintD ((uint32*)(((cl_heap_GV_I_bits32 *) outcast(vec))->data))[index] = xval; #endif } static cl_GV_I_vectorops* bits_vectorops[6] = { &bits1_vectorops, &bits2_vectorops, &bits4_vectorops, &bits8_vectorops, &bits16_vectorops, &bits32_vectorops }; cl_heap_GV_I* cl_make_heap_GV_I (std::size_t len, sintC m) { // Determine log2(bits). uintL log2_bits; switch (m) { case 0: case 1: log2_bits = 0; break; case 2: log2_bits = 1; break; case 3: case 4: log2_bits = 2; break; case 5: case 6: case 7: case 8: log2_bits = 3; break; case 9: case 10: case 11: case 12: case 13: case 14: case 15: case 16: log2_bits = 4; break; case 17: case 18: case 19: case 20: case 21: case 22: case 23: case 24: case 25: case 26: case 27: case 28: case 29: case 30: case 31: case 32: log2_bits = 5; break; default: return cl_make_heap_GV_I(len); } // For room allocation purposes, be pessimistic: assume the uintD case (since intDsize>=32). std::size_t words = // ceiling(len*2^log2_bits,intDsize) (((sintC)len-1)>>(log2_intDsize-log2_bits))+1; cl_heap_GV_I_bits32* hv = (cl_heap_GV_I_bits32*) malloc_hook(offsetofa(cl_heap_GV_I_bits32,data)+sizeof(uintD)*words); hv->refcount = 1; hv->type = &cl_class_gvector_integer(); new (&hv->v) cl_GV_inner (len,&bits_vectorops[log2_bits]->ops); uintD* ptr = (uintD*)(hv->data); for (std::size_t i = 0; i < words; i++) ptr[i] = 0; return (cl_heap_GV_I*) hv; } sintC cl_heap_GV_I::maxbits () const { return outcast(v.vectorops)->m; } // An empty vector. const cl_GV_I cl_null_GV_I = cl_null_GV_I; int cl_GV_I_init_helper::count = 0; cl_GV_I_init_helper::cl_GV_I_init_helper() { if (count++ == 0) new ((void *)&cl_null_GV_I) cl_GV_I((std::size_t)0); } cl_GV_I_init_helper::~cl_GV_I_init_helper() { if (--count == 0) { // Nothing to clean up } }; } // namespace cln cln-1.3.3/src/vector/cl_SV_ringelt.cc0000644000000000000000000000350512034113706014312 0ustar // cl_make_heap_SV_ringelt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/SV_ringelt.h" // Implementation. namespace cln { static void cl_svector_ringelt_destructor (cl_heap* pointer) { #if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug (*(cl_heap_SV_ringelt*)pointer).~cl_heap_SV(); #else (*(cl_heap_SV_ringelt*)pointer).~cl_heap_SV_ringelt(); #endif } // XXX: this ought to be static const, but it would be impossible to // set the printing function (see cl_SV_ringelt_debug.cc) cl_class& cl_class_svector_ringelt() { static cl_class instance = { cl_svector_ringelt_destructor, 0 }; return instance; } cl_heap_SV_ringelt* cl_make_heap_SV_ringelt_uninit (std::size_t len) { cl_heap_SV_ringelt* hv = (cl_heap_SV_ringelt*) malloc_hook(sizeof(cl_heap_SV_ringelt)+sizeof(_cl_ring_element)*len); hv->refcount = 1; hv->type = &cl_class_svector_ringelt(); new (&hv->v) cl_SV_inner<_cl_ring_element> (len); // Have to fill hv->v[i] (0 <= i < len) yourself. return hv; } cl_heap_SV_ringelt* cl_make_heap_SV_ringelt (std::size_t len) { cl_heap_SV_ringelt* hv = (cl_heap_SV_ringelt*) malloc_hook(sizeof(cl_heap_SV_ringelt)+sizeof(_cl_ring_element)*len); hv->refcount = 1; hv->type = &cl_class_svector_ringelt(); new (&hv->v) cl_SV_inner<_cl_ring_element> (len); for (std::size_t i = 0; i < len; i++) init1(_cl_ring_element, hv->v[i]) (); return hv; } // An empty vector. const cl_SV_ringelt cl_null_SV_ringelt = cl_null_SV_ringelt; int cl_SV_ringelt_init_helper::count = 0; cl_SV_ringelt_init_helper::cl_SV_ringelt_init_helper() { if (count++ == 0) new ((void *)&cl_null_SV_ringelt) cl_SV_ringelt((std::size_t)0); } cl_SV_ringelt_init_helper::~cl_SV_ringelt_init_helper() { if (--count == 0) { // Nothing to clean up here } } } // namespace cln cln-1.3.3/src/vector/cl_SV_ringelt_debug.cc0000644000000000000000000000124711201634740015462 0ustar // cl_SV_ringelt debugging support. // General includes. #include "base/cl_sysdep.h" // Specification. // Implementation. #include "cln/SV_ringelt.h" #include "cln/io.h" namespace cln { extern void cl_dprint_unknown (cl_heap* pointer); static void dprint (cl_heap* pointer) { // var const cl_SV_ringelt& obj = *(const cl_SV_ringelt*)&pointer; fprint(cl_debugout, "(cl_SV_ringelt) "); cl_dprint_unknown(pointer); } AT_INITIALIZATION(dprint_SV_ringelt) { extern cl_class& cl_class_svector_ringelt(); cl_class_svector_ringelt().dprint = dprint; } // This dummy links in this module when requires it. int cl_SV_ringelt_debug_module; } // namespace cln cln-1.3.3/src/vector/cl_SV_number.cc0000644000000000000000000000340612034113706014136 0ustar // cl_make_heap_SV_number(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/SV_number.h" // Implementation. namespace cln { static void cl_svector_number_destructor (cl_heap* pointer) { #if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug (*(cl_heap_SV_number*)pointer).~cl_heap_SV(); #else (*(cl_heap_SV_number*)pointer).~cl_heap_SV_number(); #endif } // XXX: ugh, this needs to be non-static (and non-const) so redefining // debugging function is possible (see cl_SV_number_debug.cc) cl_class& cl_class_svector_number() { static cl_class instance = { cl_svector_number_destructor, 0 }; return instance; } cl_heap_SV_number* cl_make_heap_SV_number_uninit (std::size_t len) { cl_heap_SV_number* hv = (cl_heap_SV_number*) malloc_hook(sizeof(cl_heap_SV_number)+sizeof(cl_number)*len); hv->refcount = 1; hv->type = &cl_class_svector_number(); new (&hv->v) cl_SV_inner (len); // Have to fill hv->v[i] (0 <= i < len) yourself. return hv; } cl_heap_SV_number* cl_make_heap_SV_number (std::size_t len) { cl_heap_SV_number* hv = (cl_heap_SV_number*) malloc_hook(sizeof(cl_heap_SV_number)+sizeof(cl_number)*len); hv->refcount = 1; hv->type = &cl_class_svector_number(); new (&hv->v) cl_SV_inner (len); for (std::size_t i = 0; i < len; i++) init1(cl_number, hv->v[i]) (0); return hv; } // An empty vector. const cl_SV_number cl_null_SV_number = cl_null_SV_number; int cl_SV_number_init_helper::count = 0; cl_SV_number_init_helper::cl_SV_number_init_helper() { if (count++ == 0) new ((void *)&cl_null_SV_number) cl_SV_number((std::size_t)0); } cl_SV_number_init_helper::~cl_SV_number_init_helper() { if (--count == 0) { // Nothing to clean up } } } // namespace cln cln-1.3.3/src/vector/cl_GV_number.cc0000644000000000000000000000725511201634740014131 0ustar // cl_make_heap_GV_number(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/GV_number.h" // Implementation. #include "cln/exception.h" #include "base/cl_offsetof.h" namespace cln { static void cl_gvector_number_destructor (cl_heap* pointer) { #if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug (*(cl_heap_GV_number*)pointer).~cl_heap_GV(); #else (*(cl_heap_GV_number*)pointer).~cl_heap_GV_number(); #endif } // XXX: this ought to be const, but it would be impossible to register // the printing function (in cl_GV_number_debug.cc) cl_class& cl_class_gvector_number() { static cl_class instance = { cl_gvector_number_destructor, 0 }; return instance; } static inline cl_heap_GV_number * outcast (cl_GV_inner* vec) { return (cl_heap_GV_number *)((char *) vec - offsetof(cl_heap_GV_number,v)); } static inline const cl_heap_GV_number * outcast (const cl_GV_inner* vec) { return (const cl_heap_GV_number *)((const char *) vec - offsetof(cl_heap_GV_number,v)); } // Vectors of numbers. struct cl_heap_GV_number_general : public cl_heap_GV_number { cl_number data[1]; // Standard allocation disabled. void* operator new (size_t size) { unused size; throw runtime_exception(); } // Standard deallocation disabled. void operator delete (void* ptr) { unused ptr; throw runtime_exception(); } // No default constructor. cl_heap_GV_number_general (); }; static const cl_number general_element (const cl_GV_inner* vec, std::size_t index) { return ((const cl_heap_GV_number_general *) outcast(vec))->data[index]; } static void general_set_element (cl_GV_inner* vec, std::size_t index, const cl_number& x) { ((cl_heap_GV_number_general *) outcast(vec))->data[index] = x; } static void general_do_delete (cl_GV_inner* vec) { cl_heap_GV_number_general* hv = (cl_heap_GV_number_general *) outcast(vec); std::size_t len = hv->v.size(); for (std::size_t i = 0; i < len; i++) hv->data[i].~cl_number(); } static void general_copy_elements (const cl_GV_inner* srcvec, std::size_t srcindex, cl_GV_inner* destvec, std::size_t destindex, std::size_t count) { if (count > 0) { const cl_heap_GV_number_general* srcv = (const cl_heap_GV_number_general *) outcast(srcvec); cl_heap_GV_number_general* destv = (cl_heap_GV_number_general *) outcast(destvec); std::size_t srclen = srcv->v.size(); std::size_t destlen = destv->v.size(); if (!(srcindex <= srcindex+count && srcindex+count <= srclen)) throw runtime_exception(); if (!(destindex <= destindex+count && destindex+count <= destlen)) throw runtime_exception(); do { destv->data[destindex++] = srcv->data[srcindex++]; } while (--count > 0); } } cl_heap_GV_number* cl_make_heap_GV_number (std::size_t len) { static cl_GV_vectorops general_vectorops = { general_element, general_set_element, general_do_delete, general_copy_elements }; cl_heap_GV_number_general* hv = (cl_heap_GV_number_general*) malloc_hook(offsetofa(cl_heap_GV_number_general,data)+sizeof(cl_number)*len); hv->refcount = 1; hv->type = &cl_class_gvector_number(); new (&hv->v) cl_GV_inner (len,&general_vectorops); for (std::size_t i = 0; i < len; i++) init1(cl_number, hv->data[i]) (); return hv; } // An empty vector. const cl_GV_number cl_null_GV_number = cl_null_GV_number; int cl_GV_number_init_helper::count = 0; cl_GV_number_init_helper::cl_GV_number_init_helper() { if (count++ == 0) new ((void *)&cl_null_GV_number) cl_GV_number((std::size_t)0); } cl_GV_number_init_helper::~cl_GV_number_init_helper() { if (--count == 0) { // Nothing to clean up } } } // namespace cln cln-1.3.3/src/vector/cl_GV_number_debug.cc0000644000000000000000000000176311201634740015275 0ustar // cl_GV_number debugging support. // General includes. #include "base/cl_sysdep.h" // Specification. // Implementation. #include "cln/output.h" #include "cln/GV_number.h" #include "cln/io.h" #include "vector/cl_GV_io.h" namespace cln { static void print_for_debug (std::ostream& stream, const cl_print_flags& flags, const cl_number& z) { unused stream; // must be cl_debugout unused flags; // must be default_print_flags z.debug_print(); } static void dprint (cl_heap* pointer) { var const cl_GV_number& obj = *(const cl_GV_number*)&pointer; fprint(cl_debugout, "(cl_GV_number) "); print_vector(cl_debugout,default_print_flags,&print_for_debug,obj); } AT_INITIALIZATION(dprint_GV_number) { extern cl_class& cl_class_gvector_number(); cl_class_gvector_number().dprint = dprint; } // This dummy links in this module when requires it. int cl_GV_number_debug_module; extern int cl_GV_I_debug_module; static void* dummy[] = { &dummy, &cl_GV_I_debug_module }; } // namespace cln cln-1.3.3/src/vector/cl_GV_io.h0000644000000000000000000000105111201634740013076 0ustar // I/O of vectors. #ifndef _CL_GV_IO_H #define _CL_GV_IO_H #include "cln/number_io.h" #include "cln/GV.h" #include "cln/GV_complex.h" namespace cln { // Gibt einen Vektor aus. // print_vector(stream,flags,fun,z); // > stream: Stream // > flags: Flags // > fun: Ausgabefunktion für die einzelnen Elemente // > vector: Vektor extern void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* fun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_GV_number& vector); } // namespace cln #endif /* _CL_GV_IO_H */ cln-1.3.3/src/vector/output/0000755000000000000000000000000012173046202012606 5ustar cln-1.3.3/src/vector/output/cl_SV_number_aprint.cc0000644000000000000000000000171112034113706017050 0ustar // print_vector(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/SV_complex.h" #include "cln/SV_real.h" #include "cln/SV_rational.h" #include "cln/SV_integer.h" #include "vector/cl_SV_io.h" // Implementation. #include "cln/output.h" namespace cln { void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* printfun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_SV_number& vector) { std::size_t len = vector.size(); if (flags.vector_syntax == vsyntax_commonlisp) { fprintchar(stream,'#'); fprintchar(stream,'('); } else fprintchar(stream,'['); for (std::size_t i = 0; i < len; i++) { if (i > 0) { if (flags.vector_syntax == vsyntax_algebraic) fprintchar(stream,','); fprintchar(stream,' '); } printfun(stream,flags,vector[i]); } if (flags.vector_syntax == vsyntax_commonlisp) fprintchar(stream,')'); else fprintchar(stream,']'); } } // namespace cln cln-1.3.3/src/vector/output/cl_GV_number_aprint.cc0000644000000000000000000000202112034113706017027 0ustar // print_vector(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/GV_complex.h" #include "cln/GV_real.h" #include "cln/GV_rational.h" #include "cln/GV_integer.h" #include "vector/cl_GV_io.h" // Implementation. #include "cln/output.h" namespace cln { void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* printfun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_GV_number& vector) { std::size_t len = vector.size(); if (flags.vector_syntax == vsyntax_commonlisp) { fprintchar(stream,'#'); fprintchar(stream,'('); } else fprintchar(stream,'['); for (std::size_t i = 0; i < len; i++) { if (i > 0) { if (flags.vector_syntax == vsyntax_algebraic) fprintchar(stream,','); fprintchar(stream,' '); } // The conversion to cl_number below is needed for SGI CC. printfun(stream,flags,(cl_number)vector[i]); } if (flags.vector_syntax == vsyntax_commonlisp) fprintchar(stream,')'); else fprintchar(stream,']'); } } // namespace cln cln-1.3.3/src/vector/output/cl_SV_aprint.cc0000644000000000000000000000147212034113706015504 0ustar // fprint() for cl_SV_ringelt. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/SV_ringelt.h" // Implementation. #include "cln/output.h" namespace cln { void fprint (std::ostream& stream, const cl_ring& R, const cl_SV_ringelt& vector) { const cl_print_flags& flags = default_print_flags; std::size_t len = vector.size(); if (flags.vector_syntax == vsyntax_commonlisp) { fprintchar(stream,'#'); fprintchar(stream,'('); } else fprintchar(stream,'['); for (std::size_t i = 0; i < len; i++) { if (i > 0) { if (flags.vector_syntax == vsyntax_algebraic) fprintchar(stream,','); fprintchar(stream,' '); } R->_fprint(stream,vector[i]); } if (flags.vector_syntax == vsyntax_commonlisp) fprintchar(stream,')'); else fprintchar(stream,']'); } } // namespace cln cln-1.3.3/src/polynomial/0000755000000000000000000000000012173046201012126 5ustar cln-1.3.3/src/polynomial/misc/0000755000000000000000000000000012173046201013061 5ustar cln-1.3.3/src/polynomial/misc/cl_UP_I_laguerre.cc0000644000000000000000000000235711201634740016541 0ustar // laguerre(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/univpoly_integer.h" // Implementation. #include "cln/integer.h" namespace cln { const cl_UP_I laguerre (sintL n) { // The Laguerre polynomials L_n(x) are defined as // // ( d ) n // L_n(x) = exp(x) (----) (x^n exp(-x)) // ( dx ) // // They satisfy the recurrence relation // // L_0(x) = 1 // L_{n+1}(x) = (2n+1-x) L_n(x) - n^2 L_{n-1}(x) for n >= 0. // // Theorem: // L_n(x) satisfies the differential equation // x*L_n''(x) + (1-x)*L_n'(x) + n*L_n(x) = 0. // // Proof: See elsewhere. // // Corollary: // The coefficients c_{n,k} of L_n(x) = sum(k=0..n, c_{n,k} x^k) // satisfy: // c_{n,n} = (-1)^n, // c_{n,k} = (k+1)^2/(k-n)*c_{n,k+1} // // It follows that for n>=0 // // L_n(x) = sum(j=0..n, (-1)^(n-j) n!^2/j!(n-j)!^2 x^(n-j)) // var cl_univpoly_integer_ring R = find_univpoly_ring(cl_I_ring); var cl_UP_I l = R->create(n); var sintL k = n; var cl_I c_k = (evenp(n) ? 1 : -1); for (;;) { l.set_coeff(k,c_k); k = k-1; if (k < 0) break; c_k = exquo((cl_I)(k+1) * (cl_I)(k+1) * c_k, (cl_I)(k-n)); } l.finalize(); return l; } } // namespace cln cln-1.3.3/src/polynomial/misc/cl_UP_I_tchebychev.cc0000644000000000000000000000240511201634740017051 0ustar // tschebychev(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/univpoly_integer.h" // Implementation. #include "cln/integer.h" namespace cln { const cl_UP_I tschebychev (sintL n) { // The Tschebychev polynomials (of the 1st kind) T_n(x) are defined // through the recurrence relation // // T_0(x) = 1 // T_1(x) = x // T_{n+2}(x) = 2x T_{n+1}(x) - T_n(x) for n >= 0. // // Theorem: // T_n(x) satisfies the differential equation // (x^2-1)*T_n''(x) + x*T_n'(x) - n^2*T_n(x) = 0. // // Proof: See elsewhere. // // Corollary: // The coefficients c_{n,k} of T_n(x) = sum(k=0..n, c_{n,k} x^k) // satisfy: // c_{n,n} = 2^(n-1) for n>=1, 1 for n=0, // c_{n,n-1} = 0, // c_{n,k} = (k+1)(k+2)/(k^2-n^2)*c_{n,k+2} // // It follows that for n>0 // // T_n(x) = sum(j=0..floor(n/2), (-1)^j (n-j-1)!n/j!(n-2j)! 2^(n-2j-1) x^(n-2j)) // var cl_univpoly_integer_ring R = find_univpoly_ring(cl_I_ring); if (n == 0) return R->one(); var cl_UP_I t = R->create(n); var sintL k = n; var cl_I c_k = ash(1,n-1); for (;;) { t.set_coeff(k,c_k); k = k-2; if (k < 0) break; c_k = exquo((cl_I)(k+1) * (cl_I)(k+2) * c_k, (cl_I)(k-n) * (cl_I)(k+n)); } t.finalize(); return t; } } // namespace cln cln-1.3.3/src/polynomial/misc/cl_UP_deriv.cc0000644000000000000000000000110411201634740015561 0ustar // deriv(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/univpoly.h" // Implementation. #include "cln/integer.h" namespace cln { const cl_UP deriv (const cl_UP& x) { // Method: // Write x = a0 T^0 + ... + an T^n. // Then deriv(x) = 1*a1 T^0 + ... + n*an T^(n-1) (= 0 if n <= 0). var cl_univpoly_ring UPR = x.ring(); var sintL n = degree(x); if (n <= 0) return UPR->zero(); else { var cl_UP y = UPR->create(n-1); for ( ; n > 0; n--) y.set_coeff(n-1, n * coeff(x,n)); y.finalize(); return y; } } } // namespace cln cln-1.3.3/src/polynomial/misc/cl_UP_RA_legendre.cc0000644000000000000000000000261711201634740016631 0ustar // legendre(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/univpoly_rational.h" // Implementation. #include "cln/integer.h" #include "cln/rational.h" namespace cln { const cl_UP_RA legendre (sintL n) { // The Legendre polynomials P_n(x) are defined as // // 1 ( d ) n n // P_n(x) = ------ (----) (x^2 - 1) // 2^n n! ( dx ) // // They satisfy the recurrence relation // // P_0(x) = 1 // P_{n+1}(x) = 1/(n+1) * ((2n+1)x P_n(x) - n P_{n-1}(x)) for n >= 0. // // Theorem: // P_n(x) satisfies the differential equation // (1-x^2)*P_n''(x) - 2x*P_n'(x) + (n^2+n)*P_n(x) = 0. // // Proof: See elsewhere. // // Corollary: // The coefficients c_{n,k} of P_n(x) = sum(k=0..n, c_{n,k} x^k) // satisfy: // c_{n,n} = (2n)!/(n!^2 2^n), // c_{n,n-1} = 0, // c_{n,k} = (k+1)(k+2)/(k-n)(k+n+1)*c_{n,k+2} // // It follows that for n>=0 // // P_n(x) = sum(j=0..floor(n/2), (-1)^j (2n-2j)!/j!(n-2j)!(n-j)! 2^-n x^(n-2j)) // var cl_univpoly_rational_ring R = find_univpoly_ring(cl_RA_ring); var cl_UP_RA p = R->create(n); var cl_I denom = ash(1,n); var sintL k = n; var cl_I c_k = binomial(2*n,n); for (;;) { p.set_coeff(k,c_k/denom); k = k-2; if (k < 0) break; c_k = exquo((cl_I)(k+1) * (cl_I)(k+2) * c_k, (cl_I)(k-n) * (cl_I)(k+n+1)); } p.finalize(); return p; } } // namespace cln cln-1.3.3/src/polynomial/misc/cl_UP_I_hermite.cc0000644000000000000000000000242211201634740016361 0ustar // hermite(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/univpoly_integer.h" // Implementation. #include "cln/integer.h" namespace cln { const cl_UP_I hermite (sintL n) { // The Hermite polynomials H_n(x) are defined as // // ( d ) n // H_n(x) = (-1)^n exp(x^2) (----) exp(- x^2) // ( dx ) // // They satisfy the recurrence relation // // H_0(x) = 1 // H_{n+1}(x) = 2x H_n(x) - 2n H_{n-1}(x) for n >= 0. // // Theorem: // H_n(x) satisfies the differential equation // H_n''(x) - 2x*H_n'(x) + 2n*H_n(x) = 0. // // Proof: See elsewhere. // // Corollary: // The coefficients c_{n,k} of H_n(x) = sum(k=0..n, c_{n,k} x^k) // satisfy: // c_{n,n} = 2^n, // c_{n,n-1} = 0, // c_{n,k} = (k+1)(k+2)/2(k-n)*c_{n,k+2} // // It follows that for n>=0 // // H_n(x) = sum(j=0..floor(n/2), (-1)^j n!/j!(n-2j)! 2^(n-2j) x^(n-2j)) // var cl_univpoly_integer_ring R = find_univpoly_ring(cl_I_ring); var cl_UP_I h = R->create(n); var sintL k = n; var cl_I c_k = ash(1,n); for (;;) { h.set_coeff(k,c_k); k = k-2; if (k < 0) break; c_k = exquo((cl_I)(k+1) * (cl_I)(k+2) * c_k, 2*(cl_I)(k-n)); } h.finalize(); return h; } } // namespace cln cln-1.3.3/src/polynomial/misc/cl_UP_debug.cc0000644000000000000000000000140411201634740015541 0ustar // cl_univpoly_ring debugging support. // General includes. #include "base/cl_sysdep.h" // Specification. // Implementation. #include "cln/univpoly.h" #include "polynomial/cl_UP.h" #include "cln/io.h" namespace cln { static void dprint (cl_heap* pointer) { // var const cl_univpoly_ring& obj = *(const cl_univpoly_ring*)&pointer; fprint(cl_debugout, "(cl_univpoly_ring) ring"); fprint(cl_debugout, get_varname((cl_heap_univpoly_ring*)pointer)); } AT_INITIALIZATION(dprint_univpoly_ring) { cl_register_type_printer(cl_class_univpoly_ring,dprint); } void cl_UP::debug_print () const { fprint(cl_debugout, *this); fprint(cl_debugout, "\n"); } // This dummy links in this module when requires it. int cl_UP_debug_module; } // namespace cln cln-1.3.3/src/polynomial/cl_UP.h0000644000000000000000000000146511201634740013311 0ustar // Internals of Univariate polynomials. #ifndef _CL_UP_H #define _CL_UP_H #include "cln/univpoly.h" #include "cln/output.h" namespace cln { extern cl_heap_univpoly_ring* cl_make_univpoly_ring (const cl_ring& r); struct cl_varname_property : public cl_property { SUBCLASS_cl_property(); public: cl_symbol varname; // Constructor. cl_varname_property (const cl_symbol& k, const cl_symbol& v) : cl_property (k), varname (v) {} }; // The property list key used to look up the varname. extern cl_symbol cl_univpoly_varname_key; static inline const cl_string get_varname (cl_heap_univpoly_ring* UPR) { cl_property* p = UPR->get_property(cl_univpoly_varname_key); if (p) return ((cl_varname_property*)p)->varname; else return default_print_flags.univpoly_varname; } } // namespace cln #endif /* _CL_UP_H */ cln-1.3.3/src/polynomial/elem/0000755000000000000000000000000012173046202013051 5ustar cln-1.3.3/src/polynomial/elem/cl_UP_gen.h0000644000000000000000000003334311201634740015064 0ustar // Univariate Polynomials over a general ring. #include "cln/SV_ringelt.h" #include "cln/integer.h" #include "cln/exception.h" namespace cln { // Assume a ring is a ring. inline cl_heap_ring* TheRing (const cl_ring& R) { return (cl_heap_ring*) R.heappointer; } // Normalize a vector: remove leading zero coefficients. // The result vector is known to have length len > 0. static inline void gen_normalize (cl_heap_ring* R, cl_SV_ringelt& result, uintL len) { if (R->_zerop(result[len-1])) { len--; while (len > 0) { if (!R->_zerop(result[len-1])) break; len--; } var cl_SV_ringelt newresult = cl_SV_ringelt(cl_make_heap_SV_ringelt_uninit(len)); for (var sintL i = len-1; i >= 0; i--) init1(_cl_ring_element, newresult[i]) (result[i]); result = newresult; } } static void gen_fprint (cl_heap_univpoly_ring* UPR, std::ostream& stream, const _cl_UP& x) {{ DeclarePoly(cl_SV_ringelt,x); var cl_heap_ring* R = TheRing(UPR->basering()); var sintL xlen = x.size(); if (xlen == 0) fprint(stream, "0"); else { var cl_string varname = get_varname(UPR); for (var sintL i = xlen-1; i >= 0; i--) if (!R->_zerop(x[i])) { if (i < xlen-1) fprint(stream, " + "); fprint(stream, "("); R->_fprint(stream, x[i]); fprint(stream, ")"); if (i > 0) { fprint(stream, "*"); fprint(stream, varname); if (i != 1) { fprint(stream, "^"); fprintdecimal(stream, i); } } } } }} static bool gen_equal (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const _cl_UP& y) {{ DeclarePoly(cl_SV_ringelt,x); DeclarePoly(cl_SV_ringelt,y); var cl_heap_ring* R = TheRing(UPR->basering()); var sintL xlen = x.size(); var sintL ylen = y.size(); if (!(xlen == ylen)) return false; for (var sintL i = xlen-1; i >= 0; i--) if (!R->_equal(x[i],y[i])) return false; return true; }} static const _cl_UP gen_zero (cl_heap_univpoly_ring* UPR) { return _cl_UP(UPR, cl_null_SV_ringelt); } static bool gen_zerop (cl_heap_univpoly_ring* UPR, const _cl_UP& x) { unused UPR; { DeclarePoly(cl_SV_ringelt,x); var sintL xlen = x.size(); if (xlen == 0) return true; else return false; }} static const _cl_UP gen_plus (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const _cl_UP& y) {{ DeclarePoly(cl_SV_ringelt,x); DeclarePoly(cl_SV_ringelt,y); var cl_heap_ring* R = TheRing(UPR->basering()); var sintL xlen = x.size(); var sintL ylen = y.size(); if (xlen == 0) return _cl_UP(UPR, y); if (ylen == 0) return _cl_UP(UPR, x); // Now xlen > 0, ylen > 0. if (xlen > ylen) { var cl_SV_ringelt result = cl_SV_ringelt(cl_make_heap_SV_ringelt_uninit(xlen)); var sintL i; for (i = xlen-1; i >= ylen; i--) init1(_cl_ring_element, result[i]) (x[i]); for (i = ylen-1; i >= 0; i--) init1(_cl_ring_element, result[i]) (R->_plus(x[i],y[i])); return _cl_UP(UPR, result); } if (xlen < ylen) { var cl_SV_ringelt result = cl_SV_ringelt(cl_make_heap_SV_ringelt_uninit(ylen)); var sintL i; for (i = ylen-1; i >= xlen; i--) init1(_cl_ring_element, result[i]) (y[i]); for (i = xlen-1; i >= 0; i--) init1(_cl_ring_element, result[i]) (R->_plus(x[i],y[i])); return _cl_UP(UPR, result); } // Now xlen = ylen > 0. Add and normalize simultaneously. for (var sintL i = xlen-1; i >= 0; i--) { var _cl_ring_element hicoeff = R->_plus(x[i],y[i]); if (!R->_zerop(hicoeff)) { var cl_SV_ringelt result = cl_SV_ringelt(cl_make_heap_SV_ringelt_uninit(i+1)); init1(_cl_ring_element, result[i]) (hicoeff); for (i-- ; i >= 0; i--) init1(_cl_ring_element, result[i]) (R->_plus(x[i],y[i])); return _cl_UP(UPR, result); } } return _cl_UP(UPR, cl_null_SV_ringelt); }} static const _cl_UP gen_uminus (cl_heap_univpoly_ring* UPR, const _cl_UP& x) {{ DeclarePoly(cl_SV_ringelt,x); var cl_heap_ring* R = TheRing(UPR->basering()); var sintL xlen = x.size(); if (xlen == 0) return _cl_UP(UPR, x); // Now xlen > 0. // Negate. No normalization necessary, since the degree doesn't change. var sintL i = xlen-1; var _cl_ring_element hicoeff = R->_uminus(x[i]); if (R->_zerop(hicoeff)) throw runtime_exception(); var cl_SV_ringelt result = cl_SV_ringelt(cl_make_heap_SV_ringelt_uninit(xlen)); init1(_cl_ring_element, result[i]) (hicoeff); for (i-- ; i >= 0; i--) init1(_cl_ring_element, result[i]) (R->_uminus(x[i])); return _cl_UP(UPR, result); }} static const _cl_UP gen_minus (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const _cl_UP& y) {{ DeclarePoly(cl_SV_ringelt,x); DeclarePoly(cl_SV_ringelt,y); var cl_heap_ring* R = TheRing(UPR->basering()); var sintL xlen = x.size(); var sintL ylen = y.size(); if (ylen == 0) return _cl_UP(UPR, x); if (xlen == 0) return gen_uminus(UPR,_cl_UP(UPR, y)); // Now xlen > 0, ylen > 0. if (xlen > ylen) { var cl_SV_ringelt result = cl_SV_ringelt(cl_make_heap_SV_ringelt_uninit(xlen)); var sintL i; for (i = xlen-1; i >= ylen; i--) init1(_cl_ring_element, result[i]) (x[i]); for (i = ylen-1; i >= 0; i--) init1(_cl_ring_element, result[i]) (R->_minus(x[i],y[i])); return _cl_UP(UPR, result); } if (xlen < ylen) { var cl_SV_ringelt result = cl_SV_ringelt(cl_make_heap_SV_ringelt_uninit(ylen)); var sintL i; for (i = ylen-1; i >= xlen; i--) init1(_cl_ring_element, result[i]) (R->_uminus(y[i])); for (i = xlen-1; i >= 0; i--) init1(_cl_ring_element, result[i]) (R->_minus(x[i],y[i])); return _cl_UP(UPR, result); } // Now xlen = ylen > 0. Add and normalize simultaneously. for (var sintL i = xlen-1; i >= 0; i--) { var _cl_ring_element hicoeff = R->_minus(x[i],y[i]); if (!R->_zerop(hicoeff)) { var cl_SV_ringelt result = cl_SV_ringelt(cl_make_heap_SV_ringelt_uninit(i+1)); init1(_cl_ring_element, result[i]) (hicoeff); for (i-- ; i >= 0; i--) init1(_cl_ring_element, result[i]) (R->_minus(x[i],y[i])); return _cl_UP(UPR, result); } } return _cl_UP(UPR, cl_null_SV_ringelt); }} static const _cl_UP gen_one (cl_heap_univpoly_ring* UPR) { var cl_heap_ring* R = TheRing(UPR->basering()); var cl_SV_ringelt result = cl_SV_ringelt(cl_make_heap_SV_ringelt_uninit(1)); init1(_cl_ring_element, result[0]) (R->_one()); return _cl_UP(UPR, result); } static const _cl_UP gen_canonhom (cl_heap_univpoly_ring* UPR, const cl_I& x) { var cl_heap_ring* R = TheRing(UPR->basering()); var cl_SV_ringelt result = cl_SV_ringelt(cl_make_heap_SV_ringelt_uninit(1)); init1(_cl_ring_element, result[0]) (R->_canonhom(x)); return _cl_UP(UPR, result); } static const _cl_UP gen_mul (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const _cl_UP& y) {{ DeclarePoly(cl_SV_ringelt,x); DeclarePoly(cl_SV_ringelt,y); var cl_heap_ring* R = TheRing(UPR->basering()); var sintL xlen = x.size(); var sintL ylen = y.size(); if (xlen == 0) return _cl_UP(UPR, x); if (ylen == 0) return _cl_UP(UPR, y); // Multiply. var sintL len = xlen + ylen - 1; var cl_SV_ringelt result = cl_SV_ringelt(cl_make_heap_SV_ringelt_uninit(len)); if (xlen < ylen) { { var sintL i = xlen-1; var _cl_ring_element xi = x[i]; for (sintL j = ylen-1; j >= 0; j--) init1(_cl_ring_element, result[i+j]) (R->_mul(xi,y[j])); } for (sintL i = xlen-2; i >= 0; i--) { var _cl_ring_element xi = x[i]; for (sintL j = ylen-1; j > 0; j--) result[i+j] = R->_plus(result[i+j],R->_mul(xi,y[j])); /* j=0 */ init1(_cl_ring_element, result[i]) (R->_mul(xi,y[0])); } } else { { var sintL j = ylen-1; var _cl_ring_element yj = y[j]; for (sintL i = xlen-1; i >= 0; i--) init1(_cl_ring_element, result[i+j]) (R->_mul(x[i],yj)); } for (sintL j = ylen-2; j >= 0; j--) { var _cl_ring_element yj = y[j]; for (sintL i = xlen-1; i > 0; i--) result[i+j] = R->_plus(result[i+j],R->_mul(x[i],yj)); /* i=0 */ init1(_cl_ring_element, result[j]) (R->_mul(x[0],yj)); } } // Normalize (not necessary in integral domains). //gen_normalize(R,result,len); if (R->_zerop(result[len-1])) throw runtime_exception(); return _cl_UP(UPR, result); }} static const _cl_UP gen_square (cl_heap_univpoly_ring* UPR, const _cl_UP& x) {{ DeclarePoly(cl_SV_ringelt,x); var cl_heap_ring* R = TheRing(UPR->basering()); var sintL xlen = x.size(); if (xlen == 0) return cl_UP(UPR, x); var sintL len = 2*xlen-1; var cl_SV_ringelt result = cl_SV_ringelt(cl_make_heap_SV_ringelt_uninit(len)); if (xlen > 1) { // Loop through all 0 <= j < i <= xlen-1. { var sintL i = xlen-1; var _cl_ring_element xi = x[i]; for (sintL j = i-1; j >= 0; j--) init1(_cl_ring_element, result[i+j]) (R->_mul(xi,x[j])); } {for (sintL i = xlen-2; i >= 1; i--) { var _cl_ring_element xi = x[i]; for (sintL j = i-1; j >= 1; j--) result[i+j] = R->_plus(result[i+j],R->_mul(xi,x[j])); /* j=0 */ init1(_cl_ring_element, result[i]) (R->_mul(xi,x[0])); }} // Double. {for (sintL i = len-2; i >= 1; i--) result[i] = R->_plus(result[i],result[i]); } // Add squares. init1(_cl_ring_element, result[2*(xlen-1)]) (R->_square(x[xlen-1])); for (sintL i = xlen-2; i >= 1; i--) result[2*i] = R->_plus(result[2*i],R->_square(x[i])); } init1(_cl_ring_element, result[0]) (R->_square(x[0])); // Normalize (not necessary in integral domains). //gen_normalize(R,result,len); if (R->_zerop(result[len-1])) throw runtime_exception(); return _cl_UP(UPR, result); }} static const _cl_UP gen_exptpos (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const cl_I& y) { var _cl_UP a = x; var cl_I b = y; while (!oddp(b)) { a = UPR->_square(a); b = b >> 1; } var _cl_UP c = a; until (b == 1) { b = b >> 1; a = UPR->_square(a); if (oddp(b)) { c = UPR->_mul(a,c); } } return c; } static const _cl_UP gen_scalmul (cl_heap_univpoly_ring* UPR, const cl_ring_element& x, const _cl_UP& y) { if (!(UPR->basering() == x.ring())) throw runtime_exception(); { DeclarePoly(cl_SV_ringelt,y); var cl_heap_ring* R = TheRing(UPR->basering()); var sintL ylen = y.size(); if (ylen == 0) return _cl_UP(UPR, y); if (R->zerop(x)) return _cl_UP(UPR, cl_null_SV_ringelt); var cl_SV_ringelt result = cl_SV_ringelt(cl_make_heap_SV_ringelt_uninit(ylen)); for (sintL i = ylen-1; i >= 0; i--) init1(_cl_ring_element, result[i]) (R->_mul(x,y[i])); // Normalize (not necessary in integral domains). //gen_normalize(R,result,ylen); if (R->_zerop(result[ylen-1])) throw runtime_exception(); return _cl_UP(UPR, result); }} static sintL gen_degree (cl_heap_univpoly_ring* UPR, const _cl_UP& x) { unused UPR; { DeclarePoly(cl_SV_ringelt,x); return (sintL) x.size() - 1; }} static sintL gen_ldegree (cl_heap_univpoly_ring* UPR, const _cl_UP& x) {{ DeclarePoly(cl_SV_ringelt,x); var cl_heap_ring* R = TheRing(UPR->basering()); var sintL xlen = x.size(); for (sintL i = 0; i < xlen; i++) { if (!R->_zerop(x[i])) return i; } return -1; }} static const _cl_UP gen_monomial (cl_heap_univpoly_ring* UPR, const cl_ring_element& x, uintL e) { if (!(UPR->basering() == x.ring())) throw runtime_exception(); var cl_heap_ring* R = TheRing(UPR->basering()); if (R->_zerop(x)) return _cl_UP(UPR, cl_null_SV_ringelt); else { var sintL len = e+1; var cl_SV_ringelt result = cl_SV_ringelt(len); result[e] = x; return _cl_UP(UPR, result); } } static const cl_ring_element gen_coeff (cl_heap_univpoly_ring* UPR, const _cl_UP& x, uintL index) {{ DeclarePoly(cl_SV_ringelt,x); var cl_heap_ring* R = TheRing(UPR->basering()); if (index < x.size()) return cl_ring_element(R, x[index]); else return R->zero(); }} static const _cl_UP gen_create (cl_heap_univpoly_ring* UPR, sintL deg) { if (deg < 0) return _cl_UP(UPR, cl_null_SV_ringelt); else { var sintL len = deg+1; return _cl_UP(UPR, cl_SV_ringelt(len)); } } static void gen_set_coeff (cl_heap_univpoly_ring* UPR, _cl_UP& x, uintL index, const cl_ring_element& y) {{ DeclareMutablePoly(cl_SV_ringelt,x); if (!(UPR->basering() == y.ring())) throw runtime_exception(); if (!(index < x.size())) throw runtime_exception(); x[index] = y; }} static void gen_finalize (cl_heap_univpoly_ring* UPR, _cl_UP& x) {{ DeclareMutablePoly(cl_SV_ringelt,x); // NB: x is modified by reference! var cl_heap_ring* R = TheRing(UPR->basering()); var uintL len = x.size(); if (len > 0) gen_normalize(R,x,len); }} static const cl_ring_element gen_eval (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const cl_ring_element& y) {{ // Method: // If x = 0, return 0. // If y = 0, return x[0]. // Else compute (...(x[len-1]*y+x[len-2])*y ...)*y + x[0]. DeclarePoly(cl_SV_ringelt,x); var cl_heap_ring* R = TheRing(UPR->basering()); if (!(y.ring() == R)) throw runtime_exception(); var uintL len = x.size(); if (len==0) return R->zero(); if (R->_zerop(y)) return cl_ring_element(R, x[0]); var sintL i = len-1; var _cl_ring_element z = x[i]; for ( ; --i >= 0; ) z = R->_plus(R->_mul(z,y),x[i]); return cl_ring_element(R, z); }} static cl_univpoly_setops gen_setops = { gen_fprint, gen_equal }; static cl_univpoly_addops gen_addops = { gen_zero, gen_zerop, gen_plus, gen_minus, gen_uminus }; static cl_univpoly_mulops gen_mulops = { gen_one, gen_canonhom, gen_mul, gen_square, gen_exptpos }; static cl_univpoly_modulops gen_modulops = { gen_scalmul }; static cl_univpoly_polyops gen_polyops = { gen_degree, gen_ldegree, gen_monomial, gen_coeff, gen_create, gen_set_coeff, gen_finalize, gen_eval }; class cl_heap_gen_univpoly_ring : public cl_heap_univpoly_ring { SUBCLASS_cl_heap_univpoly_ring() public: // Constructor. cl_heap_gen_univpoly_ring (const cl_ring& r); // Destructor ~cl_heap_gen_univpoly_ring () {} }; static void cl_heap_gen_univpoly_ring_destructor (cl_heap* pointer) { (*(cl_heap_gen_univpoly_ring*)pointer).~cl_heap_gen_univpoly_ring(); } cl_class cl_class_gen_univpoly_ring = { cl_heap_gen_univpoly_ring_destructor, cl_class_flags_univpoly_ring }; // Constructor. inline cl_heap_gen_univpoly_ring::cl_heap_gen_univpoly_ring (const cl_ring& r) : cl_heap_univpoly_ring (r, &gen_setops, &gen_addops, &gen_mulops, &gen_modulops, &gen_polyops) { type = &cl_class_gen_univpoly_ring; } } // namespace cln cln-1.3.3/src/polynomial/elem/cl_asm_sparc_GF2.cc0000644000000000000000000003710611215252132016450 0ustar // Externe Routinen // Prozessor: SPARC // Compiler: GNU-C oder SUN-C // Parameter-Übergabe: in Registern %o0-%o5. // Einstellungen: intCsize=32, intDsize=32. #ifdef ASM_UNDERSCORE /* SunOS 4 */ #if defined(__STDC__) || defined (__cplusplus) #define C(entrypoint) _##entrypoint #else #define C(entrypoint) _/**/entrypoint #endif #else /* SunOS 5 = Solaris 2 */ #define C(entrypoint) entrypoint #endif // When this file is compiled into a shared library, ELF linkers need to // know which symbols are functions. #if defined(__NetBSD__) || defined(__OpenBSD__) #define DECLARE_FUNCTION(name) .type C(name),@function #elif defined(__svr4__) || defined(__ELF__) #define DECLARE_FUNCTION(name) .type C(name),#function #else #define DECLARE_FUNCTION(name) #endif // Indikatoren für Anweisungen (Instruktionen) in Delay-Slots // (diese werden VOR der vorigen Instruktion ausgeführt): #define _ // Instruktion, die stets ausgeführt wird #define __ // Instruktion, die nur im Sprung-Fall ausgeführt wird // Abkürzungen für Anweisungen: #define ret jmp %i7+8 // return from subroutine #define retl jmp %o7+8 // return from leaf subroutine (no save/restore) .seg "text" .global C(gf2_mul16),C(gf2_mul32) // extern uint32 gf2_mul16 (uint16 x, uint16 y); DECLARE_FUNCTION(gf2_mul16) C(gf2_mul16:) // Input in %o0,%o1, Output in %o0 sll %o0,16,%o0 sll %o1,16,%o1 srl %o1,16,%o1 // 16-bit multiply of x and y // input %o1 = factor1, %o0 = 2^16*factor2, output %o0 addcc %o0,%o0,%o0 bcs Lb01 _ addcc %o0,%o0,%o0 La01: bcs Lb02 _ addcc %o0,%o0,%o0 La02: bcs Lb03 _ addcc %o0,%o0,%o0 La03: bcs Lb04 _ addcc %o0,%o0,%o0 La04: bcs Lb05 _ addcc %o0,%o0,%o0 La05: bcs Lb06 _ addcc %o0,%o0,%o0 La06: bcs Lb07 _ addcc %o0,%o0,%o0 La07: bcs Lb08 _ addcc %o0,%o0,%o0 La08: bcs Lb09 _ addcc %o0,%o0,%o0 La09: bcs Lb10 _ addcc %o0,%o0,%o0 La10: bcs Lb11 _ addcc %o0,%o0,%o0 La11: bcs Lb12 _ addcc %o0,%o0,%o0 La12: bcs Lb13 _ addcc %o0,%o0,%o0 La13: bcs Lb14 _ addcc %o0,%o0,%o0 La14: bcs Lb15 _ addcc %o0,%o0,%o0 La15: bcs Lb16 _ add %o0,%o0,%o0 La16: retl _ nop Lb01: xor %o0,%o1,%o0 bcc La02 _ addcc %o0,%o0,%o0 Lb02: xor %o0,%o1,%o0 bcc La03 _ addcc %o0,%o0,%o0 Lb03: xor %o0,%o1,%o0 bcc La04 _ addcc %o0,%o0,%o0 Lb04: xor %o0,%o1,%o0 bcc La05 _ addcc %o0,%o0,%o0 Lb05: xor %o0,%o1,%o0 bcc La06 _ addcc %o0,%o0,%o0 Lb06: xor %o0,%o1,%o0 bcc La07 _ addcc %o0,%o0,%o0 Lb07: xor %o0,%o1,%o0 bcc La08 _ addcc %o0,%o0,%o0 Lb08: xor %o0,%o1,%o0 bcc La09 _ addcc %o0,%o0,%o0 Lb09: xor %o0,%o1,%o0 bcc La10 _ addcc %o0,%o0,%o0 Lb10: xor %o0,%o1,%o0 bcc La11 _ addcc %o0,%o0,%o0 Lb11: xor %o0,%o1,%o0 bcc La12 _ addcc %o0,%o0,%o0 Lb12: xor %o0,%o1,%o0 bcc La13 _ addcc %o0,%o0,%o0 Lb13: xor %o0,%o1,%o0 bcc La14 _ addcc %o0,%o0,%o0 Lb14: xor %o0,%o1,%o0 bcc La15 _ addcc %o0,%o0,%o0 Lb15: xor %o0,%o1,%o0 bcc La16 _ add %o0,%o0,%o0 Lb16: retl _ xor %o0,%o1,%o0 // extern uint32 gf2_mul32 (uint32 x, uint32 y, uint32* plo); DECLARE_FUNCTION(gf2_mul32) C(gf2_mul32:) // Input in %o0,%o1,%o2, Output in [%o2],%o0 #if 0 sll %o0,16,%o4 srl %o4,16,%o4 // %o4 = low16(x) sll %o1,16,%o5 // %o5 = 2^16*low16(y) srl %o0,16,%o0 // %o0 = high16(x) srl %o1,16,%o1 sll %o1,16,%o1 // %o1 = 2^16*high16(y) xor %o1,%o5,%o3 // %o3 = 2^16*(high16(y)+low16(y)) // 16-bit multiply of low16(x) and low16(y) // input %o4 = factor1, %o5 = 2^16*factor2, output %o5 addcc %o5,%o5,%o5 bcs Ld01 _ addcc %o5,%o5,%o5 Lc01: bcs Ld02 _ addcc %o5,%o5,%o5 Lc02: bcs Ld03 _ addcc %o5,%o5,%o5 Lc03: bcs Ld04 _ addcc %o5,%o5,%o5 Lc04: bcs Ld05 _ addcc %o5,%o5,%o5 Lc05: bcs Ld06 _ addcc %o5,%o5,%o5 Lc06: bcs Ld07 _ addcc %o5,%o5,%o5 Lc07: bcs Ld08 _ addcc %o5,%o5,%o5 Lc08: bcs Ld09 _ addcc %o5,%o5,%o5 Lc09: bcs Ld10 _ addcc %o5,%o5,%o5 Lc10: bcs Ld11 _ addcc %o5,%o5,%o5 Lc11: bcs Ld12 _ addcc %o5,%o5,%o5 Lc12: bcs Ld13 _ addcc %o5,%o5,%o5 Lc13: bcs Ld14 _ addcc %o5,%o5,%o5 Lc14: bcs Ld15 _ addcc %o5,%o5,%o5 Lc15: bcs Ld16 _ add %o5,%o5,%o5 Lc16: b Ld17 _ nop Ld01: xor %o5,%o4,%o5 bcc Lc02 _ addcc %o5,%o5,%o5 Ld02: xor %o5,%o4,%o5 bcc Lc03 _ addcc %o5,%o5,%o5 Ld03: xor %o5,%o4,%o5 bcc Lc04 _ addcc %o5,%o5,%o5 Ld04: xor %o5,%o4,%o5 bcc Lc05 _ addcc %o5,%o5,%o5 Ld05: xor %o5,%o4,%o5 bcc Lc06 _ addcc %o5,%o5,%o5 Ld06: xor %o5,%o4,%o5 bcc Lc07 _ addcc %o5,%o5,%o5 Ld07: xor %o5,%o4,%o5 bcc Lc08 _ addcc %o5,%o5,%o5 Ld08: xor %o5,%o4,%o5 bcc Lc09 _ addcc %o5,%o5,%o5 Ld09: xor %o5,%o4,%o5 bcc Lc10 _ addcc %o5,%o5,%o5 Ld10: xor %o5,%o4,%o5 bcc Lc11 _ addcc %o5,%o5,%o5 Ld11: xor %o5,%o4,%o5 bcc Lc12 _ addcc %o5,%o5,%o5 Ld12: xor %o5,%o4,%o5 bcc Lc13 _ addcc %o5,%o5,%o5 Ld13: xor %o5,%o4,%o5 bcc Lc14 _ addcc %o5,%o5,%o5 Ld14: xor %o5,%o4,%o5 bcc Lc15 _ addcc %o5,%o5,%o5 Ld15: xor %o5,%o4,%o5 bcc Ld17 _ add %o5,%o5,%o5 Ld16: xor %o5,%o4,%o5 Ld17: // %o5 = low16(x)*low16(y) // 16-bit multiply of high16(x) and high16(y) // input %o0 = factor1, %o1 = 2^16*factor2, output %o1 addcc %o1,%o1,%o1 bcs Lf01 _ addcc %o1,%o1,%o1 Le01: bcs Lf02 _ addcc %o1,%o1,%o1 Le02: bcs Lf03 _ addcc %o1,%o1,%o1 Le03: bcs Lf04 _ addcc %o1,%o1,%o1 Le04: bcs Lf05 _ addcc %o1,%o1,%o1 Le05: bcs Lf06 _ addcc %o1,%o1,%o1 Le06: bcs Lf07 _ addcc %o1,%o1,%o1 Le07: bcs Lf08 _ addcc %o1,%o1,%o1 Le08: bcs Lf09 _ addcc %o1,%o1,%o1 Le09: bcs Lf10 _ addcc %o1,%o1,%o1 Le10: bcs Lf11 _ addcc %o1,%o1,%o1 Le11: bcs Lf12 _ addcc %o1,%o1,%o1 Le12: bcs Lf13 _ addcc %o1,%o1,%o1 Le13: bcs Lf14 _ addcc %o1,%o1,%o1 Le14: bcs Lf15 _ addcc %o1,%o1,%o1 Le15: bcs Lf16 _ add %o1,%o1,%o1 Le16: b Lf17 _ nop Lf01: xor %o1,%o0,%o1 bcc Le02 _ addcc %o1,%o1,%o1 Lf02: xor %o1,%o0,%o1 bcc Le03 _ addcc %o1,%o1,%o1 Lf03: xor %o1,%o0,%o1 bcc Le04 _ addcc %o1,%o1,%o1 Lf04: xor %o1,%o0,%o1 bcc Le05 _ addcc %o1,%o1,%o1 Lf05: xor %o1,%o0,%o1 bcc Le06 _ addcc %o1,%o1,%o1 Lf06: xor %o1,%o0,%o1 bcc Le07 _ addcc %o1,%o1,%o1 Lf07: xor %o1,%o0,%o1 bcc Le08 _ addcc %o1,%o1,%o1 Lf08: xor %o1,%o0,%o1 bcc Le09 _ addcc %o1,%o1,%o1 Lf09: xor %o1,%o0,%o1 bcc Le10 _ addcc %o1,%o1,%o1 Lf10: xor %o1,%o0,%o1 bcc Le11 _ addcc %o1,%o1,%o1 Lf11: xor %o1,%o0,%o1 bcc Le12 _ addcc %o1,%o1,%o1 Lf12: xor %o1,%o0,%o1 bcc Le13 _ addcc %o1,%o1,%o1 Lf13: xor %o1,%o0,%o1 bcc Le14 _ addcc %o1,%o1,%o1 Lf14: xor %o1,%o0,%o1 bcc Le15 _ addcc %o1,%o1,%o1 Lf15: xor %o1,%o0,%o1 bcc Lf17 _ add %o1,%o1,%o1 Lf16: xor %o1,%o0,%o1 Lf17: // %o1 = high16(x)*high16(y) xor %o0,%o4,%o4 // %o4 = high16(x)+low16(x) // 16-bit multiply of high16(x)+low16(x) and high16(y)+low16(y) // input %o4 = factor1, %o3 = 2^16*factor2, output %o3 addcc %o3,%o3,%o3 bcs Lh01 _ addcc %o3,%o3,%o3 Lg01: bcs Lh02 _ addcc %o3,%o3,%o3 Lg02: bcs Lh03 _ addcc %o3,%o3,%o3 Lg03: bcs Lh04 _ addcc %o3,%o3,%o3 Lg04: bcs Lh05 _ addcc %o3,%o3,%o3 Lg05: bcs Lh06 _ addcc %o3,%o3,%o3 Lg06: bcs Lh07 _ addcc %o3,%o3,%o3 Lg07: bcs Lh08 _ addcc %o3,%o3,%o3 Lg08: bcs Lh09 _ addcc %o3,%o3,%o3 Lg09: bcs Lh10 _ addcc %o3,%o3,%o3 Lg10: bcs Lh11 _ addcc %o3,%o3,%o3 Lg11: bcs Lh12 _ addcc %o3,%o3,%o3 Lg12: bcs Lh13 _ addcc %o3,%o3,%o3 Lg13: bcs Lh14 _ addcc %o3,%o3,%o3 Lg14: bcs Lh15 _ addcc %o3,%o3,%o3 Lg15: bcs Lh16 _ add %o3,%o3,%o3 Lg16: b Lh17 _ nop Lh01: xor %o3,%o4,%o3 bcc Lg02 _ addcc %o3,%o3,%o3 Lh02: xor %o3,%o4,%o3 bcc Lg03 _ addcc %o3,%o3,%o3 Lh03: xor %o3,%o4,%o3 bcc Lg04 _ addcc %o3,%o3,%o3 Lh04: xor %o3,%o4,%o3 bcc Lg05 _ addcc %o3,%o3,%o3 Lh05: xor %o3,%o4,%o3 bcc Lg06 _ addcc %o3,%o3,%o3 Lh06: xor %o3,%o4,%o3 bcc Lg07 _ addcc %o3,%o3,%o3 Lh07: xor %o3,%o4,%o3 bcc Lg08 _ addcc %o3,%o3,%o3 Lh08: xor %o3,%o4,%o3 bcc Lg09 _ addcc %o3,%o3,%o3 Lh09: xor %o3,%o4,%o3 bcc Lg10 _ addcc %o3,%o3,%o3 Lh10: xor %o3,%o4,%o3 bcc Lg11 _ addcc %o3,%o3,%o3 Lh11: xor %o3,%o4,%o3 bcc Lg12 _ addcc %o3,%o3,%o3 Lh12: xor %o3,%o4,%o3 bcc Lg13 _ addcc %o3,%o3,%o3 Lh13: xor %o3,%o4,%o3 bcc Lg14 _ addcc %o3,%o3,%o3 Lh14: xor %o3,%o4,%o3 bcc Lg15 _ addcc %o3,%o3,%o3 Lh15: xor %o3,%o4,%o3 bcc Lh17 _ add %o3,%o3,%o3 Lh16: xor %o3,%o4,%o3 Lh17: // %o3 = (high16(x)+low16(x))*(high16(y)+low16(y)) // Now %o5 = low16(x)*low16(y) // %o1 = high16(x)*high16(y) // %o3 = (high16(x)+low16(x))*(high16(y)+low16(y)) // The result is x*y = 2^32*%o1 + 2^16*(%o3+%o1+%o5) + %o5 xor %o3,%o1,%o3 xor %o3,%o5,%o3 // The result is x*y = 2^32*%o1 + 2^16*%o3 + %o5 srl %o3,16,%o0 xor %o0,%o1,%o0 // high 32 bits in %o0 sll %o3,16,%o1 xor %o1,%o5,%o1 // low 32 bits in %o1 retl _ st %o1,[%o2] #else mov 0,%o3 // 32-bit multiply of x and y // input %o1 = factor1, %o0|%o3 = 2^32*factor2, output %o0|%o3 addcc %o0,%o0,%o0 bcs Ld01 _ addcc %o3,%o3,%o3 Lc01: addxcc %o0,%o0,%o0 bcs Ld02 _ addcc %o3,%o3,%o3 Lc02: addxcc %o0,%o0,%o0 bcs Ld03 _ addcc %o3,%o3,%o3 Lc03: addxcc %o0,%o0,%o0 bcs Ld04 _ addcc %o3,%o3,%o3 Lc04: addxcc %o0,%o0,%o0 bcs Ld05 _ addcc %o3,%o3,%o3 Lc05: addxcc %o0,%o0,%o0 bcs Ld06 _ addcc %o3,%o3,%o3 Lc06: addxcc %o0,%o0,%o0 bcs Ld07 _ addcc %o3,%o3,%o3 Lc07: addxcc %o0,%o0,%o0 bcs Ld08 _ addcc %o3,%o3,%o3 Lc08: addxcc %o0,%o0,%o0 bcs Ld09 _ addcc %o3,%o3,%o3 Lc09: addxcc %o0,%o0,%o0 bcs Ld10 _ addcc %o3,%o3,%o3 Lc10: addxcc %o0,%o0,%o0 bcs Ld11 _ addcc %o3,%o3,%o3 Lc11: addxcc %o0,%o0,%o0 bcs Ld12 _ addcc %o3,%o3,%o3 Lc12: addxcc %o0,%o0,%o0 bcs Ld13 _ addcc %o3,%o3,%o3 Lc13: addxcc %o0,%o0,%o0 bcs Ld14 _ addcc %o3,%o3,%o3 Lc14: addxcc %o0,%o0,%o0 bcs Ld15 _ addcc %o3,%o3,%o3 Lc15: addxcc %o0,%o0,%o0 bcs Ld16 _ addcc %o3,%o3,%o3 Lc16: addxcc %o0,%o0,%o0 bcs Ld17 _ addcc %o3,%o3,%o3 Lc17: addxcc %o0,%o0,%o0 bcs Ld18 _ addcc %o3,%o3,%o3 Lc18: addxcc %o0,%o0,%o0 bcs Ld19 _ addcc %o3,%o3,%o3 Lc19: addxcc %o0,%o0,%o0 bcs Ld20 _ addcc %o3,%o3,%o3 Lc20: addxcc %o0,%o0,%o0 bcs Ld21 _ addcc %o3,%o3,%o3 Lc21: addxcc %o0,%o0,%o0 bcs Ld22 _ addcc %o3,%o3,%o3 Lc22: addxcc %o0,%o0,%o0 bcs Ld23 _ addcc %o3,%o3,%o3 Lc23: addxcc %o0,%o0,%o0 bcs Ld24 _ addcc %o3,%o3,%o3 Lc24: addxcc %o0,%o0,%o0 bcs Ld25 _ addcc %o3,%o3,%o3 Lc25: addxcc %o0,%o0,%o0 bcs Ld26 _ addcc %o3,%o3,%o3 Lc26: addxcc %o0,%o0,%o0 bcs Ld27 _ addcc %o3,%o3,%o3 Lc27: addxcc %o0,%o0,%o0 bcs Ld28 _ addcc %o3,%o3,%o3 Lc28: addxcc %o0,%o0,%o0 bcs Ld29 _ addcc %o3,%o3,%o3 Lc29: addxcc %o0,%o0,%o0 bcs Ld30 _ addcc %o3,%o3,%o3 Lc30: addxcc %o0,%o0,%o0 bcs Ld31 _ addcc %o3,%o3,%o3 Lc31: addxcc %o0,%o0,%o0 bcs Ld32 _ addcc %o3,%o3,%o3 Lc32: b Ld34 _ addx %o0,%o0,%o0 Ld01: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc02 _ addcc %o3,%o3,%o3 Ld02: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc03 _ addcc %o3,%o3,%o3 Ld03: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc04 _ addcc %o3,%o3,%o3 Ld04: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc05 _ addcc %o3,%o3,%o3 Ld05: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc06 _ addcc %o3,%o3,%o3 Ld06: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc07 _ addcc %o3,%o3,%o3 Ld07: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc08 _ addcc %o3,%o3,%o3 Ld08: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc09 _ addcc %o3,%o3,%o3 Ld09: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc10 _ addcc %o3,%o3,%o3 Ld10: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc11 _ addcc %o3,%o3,%o3 Ld11: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc12 _ addcc %o3,%o3,%o3 Ld12: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc13 _ addcc %o3,%o3,%o3 Ld13: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc14 _ addcc %o3,%o3,%o3 Ld14: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc15 _ addcc %o3,%o3,%o3 Ld15: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc16 _ addcc %o3,%o3,%o3 Ld16: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc17 _ addcc %o3,%o3,%o3 Ld17: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc18 _ addcc %o3,%o3,%o3 Ld18: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc19 _ addcc %o3,%o3,%o3 Ld19: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc20 _ addcc %o3,%o3,%o3 Ld20: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc21 _ addcc %o3,%o3,%o3 Ld21: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc22 _ addcc %o3,%o3,%o3 Ld22: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc23 _ addcc %o3,%o3,%o3 Ld23: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc24 _ addcc %o3,%o3,%o3 Ld24: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc25 _ addcc %o3,%o3,%o3 Ld25: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc26 _ addcc %o3,%o3,%o3 Ld26: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc27 _ addcc %o3,%o3,%o3 Ld27: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc28 _ addcc %o3,%o3,%o3 Ld28: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc29 _ addcc %o3,%o3,%o3 Ld29: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc30 _ addcc %o3,%o3,%o3 Ld30: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Lc31 _ addcc %o3,%o3,%o3 Ld31: addxcc %o0,%o0,%o0 xor %o3,%o1,%o3 bcc Ld33 _ addcc %o3,%o3,%o3 Ld32: xor %o3,%o1,%o3 Ld33: addx %o0,%o0,%o0 Ld34: // Now x*y = 2^32*%o0+%o3 retl _ st %o3,[%o2] #endif cln-1.3.3/src/polynomial/elem/cl_UP_GF2.h0000644000000000000000000014315711201634740014676 0ustar // Univariate Polynomials over the ring GF(2) = Z/2Z. #include "cln/GV_modinteger.h" #include "cln/modinteger.h" #include "cln/GV_integer.h" #include "base/digitseq/cl_DS.h" #include "cln/exception.h" namespace cln { // This is actually defined in cl_GV_I.cc (*ugh*). struct cl_heap_GV_I_bits1 : public cl_heap_GV_I { uintD data[1]; }; static bool gf2_equal (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const _cl_UP& y) {{ DeclarePoly(cl_GV_MI,x); DeclarePoly(cl_GV_MI,y); unused UPR; var const cl_heap_GV_I_bits1 * xv = (const cl_heap_GV_I_bits1 *) x.heappointer; var const cl_heap_GV_I_bits1 * yv = (const cl_heap_GV_I_bits1 *) y.heappointer; var uintL xlen = xv->v.size(); var uintL ylen = yv->v.size(); if (!(xlen == ylen)) return false; // We can compare full words since unused bits in the last word are 0. var uintL count = ceiling(xlen,intDsize); if (compare_loop_up(xv->data,yv->data,count) != 0) return false; return true; }} static const _cl_UP gf2_plus (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const _cl_UP& y) {{ DeclarePoly(cl_GV_MI,x); DeclarePoly(cl_GV_MI,y); var const cl_heap_GV_I_bits1 * xv = (const cl_heap_GV_I_bits1 *) x.heappointer; var const cl_heap_GV_I_bits1 * yv = (const cl_heap_GV_I_bits1 *) y.heappointer; var uintL xlen = xv->v.size(); var uintL ylen = yv->v.size(); if (xlen == 0) return _cl_UP(UPR, y); if (ylen == 0) return _cl_UP(UPR, x); // Now xlen > 0, ylen > 0. var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); if (xlen > ylen) { var cl_GV_MI result = cl_GV_MI(xlen,R); var cl_heap_GV_I_bits1 * rv = (cl_heap_GV_I_bits1 *) result.heappointer; // Copy xv into rv. copy_loop_up(xv->data,rv->data,ceiling(xlen,intDsize)); // Add yv to rv. xor_loop_up(rv->data,yv->data,ceiling(ylen,intDsize)); return _cl_UP(UPR, result); } if (xlen < ylen) { var cl_GV_MI result = cl_GV_MI(ylen,R); var cl_heap_GV_I_bits1 * rv = (cl_heap_GV_I_bits1 *) result.heappointer; // Copy yv into rv. copy_loop_up(yv->data,rv->data,ceiling(ylen,intDsize)); // Add xv to rv. xor_loop_up(rv->data,xv->data,ceiling(xlen,intDsize)); return _cl_UP(UPR, result); } // Now xlen = ylen > 0. Add and normalize simultaneously. for (;;) { var uintL index = floor(xlen-1,intDsize); var uintD rword = xv->data[index] ^ yv->data[index]; if (rword == 0) { xlen = index*intDsize; if (xlen == 0) return _cl_UP(UPR, cl_null_GV_I); } else { xlen = index*intDsize; integerlengthD(rword, xlen += ); // Build result. var cl_GV_MI result = cl_GV_MI(xlen,R); var cl_heap_GV_I_bits1 * rv = (cl_heap_GV_I_bits1 *) result.heappointer; copy_loop_up(xv->data,rv->data,index); xor_loop_up(rv->data,yv->data,index); rv->data[index] = rword; return _cl_UP(UPR, result); } } }} // In characteristic 2, x-y = x+y. #define gf2_minus gf2_plus // In characteristic 2, -x = x. static const _cl_UP gf2_uminus (cl_heap_univpoly_ring* UPR, const _cl_UP& x) { unused UPR; return x; } #if !defined(__sparc__) || defined(__sparc64__) // Multiplication of polynomials over GF(2) can unfortunately not profit // from hardware multiply instructions. Use a table instead. // This is a 2^8 x 2^4 table. Maybe a 2^6 x 2^6 table would be better? // (LiDIA uses a 2^8 x 2^8 table, which is way too large.) static uint16 gf2_mul_table[0x100][0x10] = { { 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000 }, { 0x000, 0x001, 0x002, 0x003, 0x004, 0x005, 0x006, 0x007, 0x008, 0x009, 0x00A, 0x00B, 0x00C, 0x00D, 0x00E, 0x00F }, { 0x000, 0x002, 0x004, 0x006, 0x008, 0x00A, 0x00C, 0x00E, 0x010, 0x012, 0x014, 0x016, 0x018, 0x01A, 0x01C, 0x01E }, { 0x000, 0x003, 0x006, 0x005, 0x00C, 0x00F, 0x00A, 0x009, 0x018, 0x01B, 0x01E, 0x01D, 0x014, 0x017, 0x012, 0x011 }, { 0x000, 0x004, 0x008, 0x00C, 0x010, 0x014, 0x018, 0x01C, 0x020, 0x024, 0x028, 0x02C, 0x030, 0x034, 0x038, 0x03C }, { 0x000, 0x005, 0x00A, 0x00F, 0x014, 0x011, 0x01E, 0x01B, 0x028, 0x02D, 0x022, 0x027, 0x03C, 0x039, 0x036, 0x033 }, { 0x000, 0x006, 0x00C, 0x00A, 0x018, 0x01E, 0x014, 0x012, 0x030, 0x036, 0x03C, 0x03A, 0x028, 0x02E, 0x024, 0x022 }, { 0x000, 0x007, 0x00E, 0x009, 0x01C, 0x01B, 0x012, 0x015, 0x038, 0x03F, 0x036, 0x031, 0x024, 0x023, 0x02A, 0x02D }, { 0x000, 0x008, 0x010, 0x018, 0x020, 0x028, 0x030, 0x038, 0x040, 0x048, 0x050, 0x058, 0x060, 0x068, 0x070, 0x078 }, { 0x000, 0x009, 0x012, 0x01B, 0x024, 0x02D, 0x036, 0x03F, 0x048, 0x041, 0x05A, 0x053, 0x06C, 0x065, 0x07E, 0x077 }, { 0x000, 0x00A, 0x014, 0x01E, 0x028, 0x022, 0x03C, 0x036, 0x050, 0x05A, 0x044, 0x04E, 0x078, 0x072, 0x06C, 0x066 }, { 0x000, 0x00B, 0x016, 0x01D, 0x02C, 0x027, 0x03A, 0x031, 0x058, 0x053, 0x04E, 0x045, 0x074, 0x07F, 0x062, 0x069 }, { 0x000, 0x00C, 0x018, 0x014, 0x030, 0x03C, 0x028, 0x024, 0x060, 0x06C, 0x078, 0x074, 0x050, 0x05C, 0x048, 0x044 }, { 0x000, 0x00D, 0x01A, 0x017, 0x034, 0x039, 0x02E, 0x023, 0x068, 0x065, 0x072, 0x07F, 0x05C, 0x051, 0x046, 0x04B }, { 0x000, 0x00E, 0x01C, 0x012, 0x038, 0x036, 0x024, 0x02A, 0x070, 0x07E, 0x06C, 0x062, 0x048, 0x046, 0x054, 0x05A }, { 0x000, 0x00F, 0x01E, 0x011, 0x03C, 0x033, 0x022, 0x02D, 0x078, 0x077, 0x066, 0x069, 0x044, 0x04B, 0x05A, 0x055 }, { 0x000, 0x010, 0x020, 0x030, 0x040, 0x050, 0x060, 0x070, 0x080, 0x090, 0x0A0, 0x0B0, 0x0C0, 0x0D0, 0x0E0, 0x0F0 }, { 0x000, 0x011, 0x022, 0x033, 0x044, 0x055, 0x066, 0x077, 0x088, 0x099, 0x0AA, 0x0BB, 0x0CC, 0x0DD, 0x0EE, 0x0FF }, { 0x000, 0x012, 0x024, 0x036, 0x048, 0x05A, 0x06C, 0x07E, 0x090, 0x082, 0x0B4, 0x0A6, 0x0D8, 0x0CA, 0x0FC, 0x0EE }, { 0x000, 0x013, 0x026, 0x035, 0x04C, 0x05F, 0x06A, 0x079, 0x098, 0x08B, 0x0BE, 0x0AD, 0x0D4, 0x0C7, 0x0F2, 0x0E1 }, { 0x000, 0x014, 0x028, 0x03C, 0x050, 0x044, 0x078, 0x06C, 0x0A0, 0x0B4, 0x088, 0x09C, 0x0F0, 0x0E4, 0x0D8, 0x0CC }, { 0x000, 0x015, 0x02A, 0x03F, 0x054, 0x041, 0x07E, 0x06B, 0x0A8, 0x0BD, 0x082, 0x097, 0x0FC, 0x0E9, 0x0D6, 0x0C3 }, { 0x000, 0x016, 0x02C, 0x03A, 0x058, 0x04E, 0x074, 0x062, 0x0B0, 0x0A6, 0x09C, 0x08A, 0x0E8, 0x0FE, 0x0C4, 0x0D2 }, { 0x000, 0x017, 0x02E, 0x039, 0x05C, 0x04B, 0x072, 0x065, 0x0B8, 0x0AF, 0x096, 0x081, 0x0E4, 0x0F3, 0x0CA, 0x0DD }, { 0x000, 0x018, 0x030, 0x028, 0x060, 0x078, 0x050, 0x048, 0x0C0, 0x0D8, 0x0F0, 0x0E8, 0x0A0, 0x0B8, 0x090, 0x088 }, { 0x000, 0x019, 0x032, 0x02B, 0x064, 0x07D, 0x056, 0x04F, 0x0C8, 0x0D1, 0x0FA, 0x0E3, 0x0AC, 0x0B5, 0x09E, 0x087 }, { 0x000, 0x01A, 0x034, 0x02E, 0x068, 0x072, 0x05C, 0x046, 0x0D0, 0x0CA, 0x0E4, 0x0FE, 0x0B8, 0x0A2, 0x08C, 0x096 }, { 0x000, 0x01B, 0x036, 0x02D, 0x06C, 0x077, 0x05A, 0x041, 0x0D8, 0x0C3, 0x0EE, 0x0F5, 0x0B4, 0x0AF, 0x082, 0x099 }, { 0x000, 0x01C, 0x038, 0x024, 0x070, 0x06C, 0x048, 0x054, 0x0E0, 0x0FC, 0x0D8, 0x0C4, 0x090, 0x08C, 0x0A8, 0x0B4 }, { 0x000, 0x01D, 0x03A, 0x027, 0x074, 0x069, 0x04E, 0x053, 0x0E8, 0x0F5, 0x0D2, 0x0CF, 0x09C, 0x081, 0x0A6, 0x0BB }, { 0x000, 0x01E, 0x03C, 0x022, 0x078, 0x066, 0x044, 0x05A, 0x0F0, 0x0EE, 0x0CC, 0x0D2, 0x088, 0x096, 0x0B4, 0x0AA }, { 0x000, 0x01F, 0x03E, 0x021, 0x07C, 0x063, 0x042, 0x05D, 0x0F8, 0x0E7, 0x0C6, 0x0D9, 0x084, 0x09B, 0x0BA, 0x0A5 }, { 0x000, 0x020, 0x040, 0x060, 0x080, 0x0A0, 0x0C0, 0x0E0, 0x100, 0x120, 0x140, 0x160, 0x180, 0x1A0, 0x1C0, 0x1E0 }, { 0x000, 0x021, 0x042, 0x063, 0x084, 0x0A5, 0x0C6, 0x0E7, 0x108, 0x129, 0x14A, 0x16B, 0x18C, 0x1AD, 0x1CE, 0x1EF }, { 0x000, 0x022, 0x044, 0x066, 0x088, 0x0AA, 0x0CC, 0x0EE, 0x110, 0x132, 0x154, 0x176, 0x198, 0x1BA, 0x1DC, 0x1FE }, { 0x000, 0x023, 0x046, 0x065, 0x08C, 0x0AF, 0x0CA, 0x0E9, 0x118, 0x13B, 0x15E, 0x17D, 0x194, 0x1B7, 0x1D2, 0x1F1 }, { 0x000, 0x024, 0x048, 0x06C, 0x090, 0x0B4, 0x0D8, 0x0FC, 0x120, 0x104, 0x168, 0x14C, 0x1B0, 0x194, 0x1F8, 0x1DC }, { 0x000, 0x025, 0x04A, 0x06F, 0x094, 0x0B1, 0x0DE, 0x0FB, 0x128, 0x10D, 0x162, 0x147, 0x1BC, 0x199, 0x1F6, 0x1D3 }, { 0x000, 0x026, 0x04C, 0x06A, 0x098, 0x0BE, 0x0D4, 0x0F2, 0x130, 0x116, 0x17C, 0x15A, 0x1A8, 0x18E, 0x1E4, 0x1C2 }, { 0x000, 0x027, 0x04E, 0x069, 0x09C, 0x0BB, 0x0D2, 0x0F5, 0x138, 0x11F, 0x176, 0x151, 0x1A4, 0x183, 0x1EA, 0x1CD }, { 0x000, 0x028, 0x050, 0x078, 0x0A0, 0x088, 0x0F0, 0x0D8, 0x140, 0x168, 0x110, 0x138, 0x1E0, 0x1C8, 0x1B0, 0x198 }, { 0x000, 0x029, 0x052, 0x07B, 0x0A4, 0x08D, 0x0F6, 0x0DF, 0x148, 0x161, 0x11A, 0x133, 0x1EC, 0x1C5, 0x1BE, 0x197 }, { 0x000, 0x02A, 0x054, 0x07E, 0x0A8, 0x082, 0x0FC, 0x0D6, 0x150, 0x17A, 0x104, 0x12E, 0x1F8, 0x1D2, 0x1AC, 0x186 }, { 0x000, 0x02B, 0x056, 0x07D, 0x0AC, 0x087, 0x0FA, 0x0D1, 0x158, 0x173, 0x10E, 0x125, 0x1F4, 0x1DF, 0x1A2, 0x189 }, { 0x000, 0x02C, 0x058, 0x074, 0x0B0, 0x09C, 0x0E8, 0x0C4, 0x160, 0x14C, 0x138, 0x114, 0x1D0, 0x1FC, 0x188, 0x1A4 }, { 0x000, 0x02D, 0x05A, 0x077, 0x0B4, 0x099, 0x0EE, 0x0C3, 0x168, 0x145, 0x132, 0x11F, 0x1DC, 0x1F1, 0x186, 0x1AB }, { 0x000, 0x02E, 0x05C, 0x072, 0x0B8, 0x096, 0x0E4, 0x0CA, 0x170, 0x15E, 0x12C, 0x102, 0x1C8, 0x1E6, 0x194, 0x1BA }, { 0x000, 0x02F, 0x05E, 0x071, 0x0BC, 0x093, 0x0E2, 0x0CD, 0x178, 0x157, 0x126, 0x109, 0x1C4, 0x1EB, 0x19A, 0x1B5 }, { 0x000, 0x030, 0x060, 0x050, 0x0C0, 0x0F0, 0x0A0, 0x090, 0x180, 0x1B0, 0x1E0, 0x1D0, 0x140, 0x170, 0x120, 0x110 }, { 0x000, 0x031, 0x062, 0x053, 0x0C4, 0x0F5, 0x0A6, 0x097, 0x188, 0x1B9, 0x1EA, 0x1DB, 0x14C, 0x17D, 0x12E, 0x11F }, { 0x000, 0x032, 0x064, 0x056, 0x0C8, 0x0FA, 0x0AC, 0x09E, 0x190, 0x1A2, 0x1F4, 0x1C6, 0x158, 0x16A, 0x13C, 0x10E }, { 0x000, 0x033, 0x066, 0x055, 0x0CC, 0x0FF, 0x0AA, 0x099, 0x198, 0x1AB, 0x1FE, 0x1CD, 0x154, 0x167, 0x132, 0x101 }, { 0x000, 0x034, 0x068, 0x05C, 0x0D0, 0x0E4, 0x0B8, 0x08C, 0x1A0, 0x194, 0x1C8, 0x1FC, 0x170, 0x144, 0x118, 0x12C }, { 0x000, 0x035, 0x06A, 0x05F, 0x0D4, 0x0E1, 0x0BE, 0x08B, 0x1A8, 0x19D, 0x1C2, 0x1F7, 0x17C, 0x149, 0x116, 0x123 }, { 0x000, 0x036, 0x06C, 0x05A, 0x0D8, 0x0EE, 0x0B4, 0x082, 0x1B0, 0x186, 0x1DC, 0x1EA, 0x168, 0x15E, 0x104, 0x132 }, { 0x000, 0x037, 0x06E, 0x059, 0x0DC, 0x0EB, 0x0B2, 0x085, 0x1B8, 0x18F, 0x1D6, 0x1E1, 0x164, 0x153, 0x10A, 0x13D }, { 0x000, 0x038, 0x070, 0x048, 0x0E0, 0x0D8, 0x090, 0x0A8, 0x1C0, 0x1F8, 0x1B0, 0x188, 0x120, 0x118, 0x150, 0x168 }, { 0x000, 0x039, 0x072, 0x04B, 0x0E4, 0x0DD, 0x096, 0x0AF, 0x1C8, 0x1F1, 0x1BA, 0x183, 0x12C, 0x115, 0x15E, 0x167 }, { 0x000, 0x03A, 0x074, 0x04E, 0x0E8, 0x0D2, 0x09C, 0x0A6, 0x1D0, 0x1EA, 0x1A4, 0x19E, 0x138, 0x102, 0x14C, 0x176 }, { 0x000, 0x03B, 0x076, 0x04D, 0x0EC, 0x0D7, 0x09A, 0x0A1, 0x1D8, 0x1E3, 0x1AE, 0x195, 0x134, 0x10F, 0x142, 0x179 }, { 0x000, 0x03C, 0x078, 0x044, 0x0F0, 0x0CC, 0x088, 0x0B4, 0x1E0, 0x1DC, 0x198, 0x1A4, 0x110, 0x12C, 0x168, 0x154 }, { 0x000, 0x03D, 0x07A, 0x047, 0x0F4, 0x0C9, 0x08E, 0x0B3, 0x1E8, 0x1D5, 0x192, 0x1AF, 0x11C, 0x121, 0x166, 0x15B }, { 0x000, 0x03E, 0x07C, 0x042, 0x0F8, 0x0C6, 0x084, 0x0BA, 0x1F0, 0x1CE, 0x18C, 0x1B2, 0x108, 0x136, 0x174, 0x14A }, { 0x000, 0x03F, 0x07E, 0x041, 0x0FC, 0x0C3, 0x082, 0x0BD, 0x1F8, 0x1C7, 0x186, 0x1B9, 0x104, 0x13B, 0x17A, 0x145 }, { 0x000, 0x040, 0x080, 0x0C0, 0x100, 0x140, 0x180, 0x1C0, 0x200, 0x240, 0x280, 0x2C0, 0x300, 0x340, 0x380, 0x3C0 }, { 0x000, 0x041, 0x082, 0x0C3, 0x104, 0x145, 0x186, 0x1C7, 0x208, 0x249, 0x28A, 0x2CB, 0x30C, 0x34D, 0x38E, 0x3CF }, { 0x000, 0x042, 0x084, 0x0C6, 0x108, 0x14A, 0x18C, 0x1CE, 0x210, 0x252, 0x294, 0x2D6, 0x318, 0x35A, 0x39C, 0x3DE }, { 0x000, 0x043, 0x086, 0x0C5, 0x10C, 0x14F, 0x18A, 0x1C9, 0x218, 0x25B, 0x29E, 0x2DD, 0x314, 0x357, 0x392, 0x3D1 }, { 0x000, 0x044, 0x088, 0x0CC, 0x110, 0x154, 0x198, 0x1DC, 0x220, 0x264, 0x2A8, 0x2EC, 0x330, 0x374, 0x3B8, 0x3FC }, { 0x000, 0x045, 0x08A, 0x0CF, 0x114, 0x151, 0x19E, 0x1DB, 0x228, 0x26D, 0x2A2, 0x2E7, 0x33C, 0x379, 0x3B6, 0x3F3 }, { 0x000, 0x046, 0x08C, 0x0CA, 0x118, 0x15E, 0x194, 0x1D2, 0x230, 0x276, 0x2BC, 0x2FA, 0x328, 0x36E, 0x3A4, 0x3E2 }, { 0x000, 0x047, 0x08E, 0x0C9, 0x11C, 0x15B, 0x192, 0x1D5, 0x238, 0x27F, 0x2B6, 0x2F1, 0x324, 0x363, 0x3AA, 0x3ED }, { 0x000, 0x048, 0x090, 0x0D8, 0x120, 0x168, 0x1B0, 0x1F8, 0x240, 0x208, 0x2D0, 0x298, 0x360, 0x328, 0x3F0, 0x3B8 }, { 0x000, 0x049, 0x092, 0x0DB, 0x124, 0x16D, 0x1B6, 0x1FF, 0x248, 0x201, 0x2DA, 0x293, 0x36C, 0x325, 0x3FE, 0x3B7 }, { 0x000, 0x04A, 0x094, 0x0DE, 0x128, 0x162, 0x1BC, 0x1F6, 0x250, 0x21A, 0x2C4, 0x28E, 0x378, 0x332, 0x3EC, 0x3A6 }, { 0x000, 0x04B, 0x096, 0x0DD, 0x12C, 0x167, 0x1BA, 0x1F1, 0x258, 0x213, 0x2CE, 0x285, 0x374, 0x33F, 0x3E2, 0x3A9 }, { 0x000, 0x04C, 0x098, 0x0D4, 0x130, 0x17C, 0x1A8, 0x1E4, 0x260, 0x22C, 0x2F8, 0x2B4, 0x350, 0x31C, 0x3C8, 0x384 }, { 0x000, 0x04D, 0x09A, 0x0D7, 0x134, 0x179, 0x1AE, 0x1E3, 0x268, 0x225, 0x2F2, 0x2BF, 0x35C, 0x311, 0x3C6, 0x38B }, { 0x000, 0x04E, 0x09C, 0x0D2, 0x138, 0x176, 0x1A4, 0x1EA, 0x270, 0x23E, 0x2EC, 0x2A2, 0x348, 0x306, 0x3D4, 0x39A }, { 0x000, 0x04F, 0x09E, 0x0D1, 0x13C, 0x173, 0x1A2, 0x1ED, 0x278, 0x237, 0x2E6, 0x2A9, 0x344, 0x30B, 0x3DA, 0x395 }, { 0x000, 0x050, 0x0A0, 0x0F0, 0x140, 0x110, 0x1E0, 0x1B0, 0x280, 0x2D0, 0x220, 0x270, 0x3C0, 0x390, 0x360, 0x330 }, { 0x000, 0x051, 0x0A2, 0x0F3, 0x144, 0x115, 0x1E6, 0x1B7, 0x288, 0x2D9, 0x22A, 0x27B, 0x3CC, 0x39D, 0x36E, 0x33F }, { 0x000, 0x052, 0x0A4, 0x0F6, 0x148, 0x11A, 0x1EC, 0x1BE, 0x290, 0x2C2, 0x234, 0x266, 0x3D8, 0x38A, 0x37C, 0x32E }, { 0x000, 0x053, 0x0A6, 0x0F5, 0x14C, 0x11F, 0x1EA, 0x1B9, 0x298, 0x2CB, 0x23E, 0x26D, 0x3D4, 0x387, 0x372, 0x321 }, { 0x000, 0x054, 0x0A8, 0x0FC, 0x150, 0x104, 0x1F8, 0x1AC, 0x2A0, 0x2F4, 0x208, 0x25C, 0x3F0, 0x3A4, 0x358, 0x30C }, { 0x000, 0x055, 0x0AA, 0x0FF, 0x154, 0x101, 0x1FE, 0x1AB, 0x2A8, 0x2FD, 0x202, 0x257, 0x3FC, 0x3A9, 0x356, 0x303 }, { 0x000, 0x056, 0x0AC, 0x0FA, 0x158, 0x10E, 0x1F4, 0x1A2, 0x2B0, 0x2E6, 0x21C, 0x24A, 0x3E8, 0x3BE, 0x344, 0x312 }, { 0x000, 0x057, 0x0AE, 0x0F9, 0x15C, 0x10B, 0x1F2, 0x1A5, 0x2B8, 0x2EF, 0x216, 0x241, 0x3E4, 0x3B3, 0x34A, 0x31D }, { 0x000, 0x058, 0x0B0, 0x0E8, 0x160, 0x138, 0x1D0, 0x188, 0x2C0, 0x298, 0x270, 0x228, 0x3A0, 0x3F8, 0x310, 0x348 }, { 0x000, 0x059, 0x0B2, 0x0EB, 0x164, 0x13D, 0x1D6, 0x18F, 0x2C8, 0x291, 0x27A, 0x223, 0x3AC, 0x3F5, 0x31E, 0x347 }, { 0x000, 0x05A, 0x0B4, 0x0EE, 0x168, 0x132, 0x1DC, 0x186, 0x2D0, 0x28A, 0x264, 0x23E, 0x3B8, 0x3E2, 0x30C, 0x356 }, { 0x000, 0x05B, 0x0B6, 0x0ED, 0x16C, 0x137, 0x1DA, 0x181, 0x2D8, 0x283, 0x26E, 0x235, 0x3B4, 0x3EF, 0x302, 0x359 }, { 0x000, 0x05C, 0x0B8, 0x0E4, 0x170, 0x12C, 0x1C8, 0x194, 0x2E0, 0x2BC, 0x258, 0x204, 0x390, 0x3CC, 0x328, 0x374 }, { 0x000, 0x05D, 0x0BA, 0x0E7, 0x174, 0x129, 0x1CE, 0x193, 0x2E8, 0x2B5, 0x252, 0x20F, 0x39C, 0x3C1, 0x326, 0x37B }, { 0x000, 0x05E, 0x0BC, 0x0E2, 0x178, 0x126, 0x1C4, 0x19A, 0x2F0, 0x2AE, 0x24C, 0x212, 0x388, 0x3D6, 0x334, 0x36A }, { 0x000, 0x05F, 0x0BE, 0x0E1, 0x17C, 0x123, 0x1C2, 0x19D, 0x2F8, 0x2A7, 0x246, 0x219, 0x384, 0x3DB, 0x33A, 0x365 }, { 0x000, 0x060, 0x0C0, 0x0A0, 0x180, 0x1E0, 0x140, 0x120, 0x300, 0x360, 0x3C0, 0x3A0, 0x280, 0x2E0, 0x240, 0x220 }, { 0x000, 0x061, 0x0C2, 0x0A3, 0x184, 0x1E5, 0x146, 0x127, 0x308, 0x369, 0x3CA, 0x3AB, 0x28C, 0x2ED, 0x24E, 0x22F }, { 0x000, 0x062, 0x0C4, 0x0A6, 0x188, 0x1EA, 0x14C, 0x12E, 0x310, 0x372, 0x3D4, 0x3B6, 0x298, 0x2FA, 0x25C, 0x23E }, { 0x000, 0x063, 0x0C6, 0x0A5, 0x18C, 0x1EF, 0x14A, 0x129, 0x318, 0x37B, 0x3DE, 0x3BD, 0x294, 0x2F7, 0x252, 0x231 }, { 0x000, 0x064, 0x0C8, 0x0AC, 0x190, 0x1F4, 0x158, 0x13C, 0x320, 0x344, 0x3E8, 0x38C, 0x2B0, 0x2D4, 0x278, 0x21C }, { 0x000, 0x065, 0x0CA, 0x0AF, 0x194, 0x1F1, 0x15E, 0x13B, 0x328, 0x34D, 0x3E2, 0x387, 0x2BC, 0x2D9, 0x276, 0x213 }, { 0x000, 0x066, 0x0CC, 0x0AA, 0x198, 0x1FE, 0x154, 0x132, 0x330, 0x356, 0x3FC, 0x39A, 0x2A8, 0x2CE, 0x264, 0x202 }, { 0x000, 0x067, 0x0CE, 0x0A9, 0x19C, 0x1FB, 0x152, 0x135, 0x338, 0x35F, 0x3F6, 0x391, 0x2A4, 0x2C3, 0x26A, 0x20D }, { 0x000, 0x068, 0x0D0, 0x0B8, 0x1A0, 0x1C8, 0x170, 0x118, 0x340, 0x328, 0x390, 0x3F8, 0x2E0, 0x288, 0x230, 0x258 }, { 0x000, 0x069, 0x0D2, 0x0BB, 0x1A4, 0x1CD, 0x176, 0x11F, 0x348, 0x321, 0x39A, 0x3F3, 0x2EC, 0x285, 0x23E, 0x257 }, { 0x000, 0x06A, 0x0D4, 0x0BE, 0x1A8, 0x1C2, 0x17C, 0x116, 0x350, 0x33A, 0x384, 0x3EE, 0x2F8, 0x292, 0x22C, 0x246 }, { 0x000, 0x06B, 0x0D6, 0x0BD, 0x1AC, 0x1C7, 0x17A, 0x111, 0x358, 0x333, 0x38E, 0x3E5, 0x2F4, 0x29F, 0x222, 0x249 }, { 0x000, 0x06C, 0x0D8, 0x0B4, 0x1B0, 0x1DC, 0x168, 0x104, 0x360, 0x30C, 0x3B8, 0x3D4, 0x2D0, 0x2BC, 0x208, 0x264 }, { 0x000, 0x06D, 0x0DA, 0x0B7, 0x1B4, 0x1D9, 0x16E, 0x103, 0x368, 0x305, 0x3B2, 0x3DF, 0x2DC, 0x2B1, 0x206, 0x26B }, { 0x000, 0x06E, 0x0DC, 0x0B2, 0x1B8, 0x1D6, 0x164, 0x10A, 0x370, 0x31E, 0x3AC, 0x3C2, 0x2C8, 0x2A6, 0x214, 0x27A }, { 0x000, 0x06F, 0x0DE, 0x0B1, 0x1BC, 0x1D3, 0x162, 0x10D, 0x378, 0x317, 0x3A6, 0x3C9, 0x2C4, 0x2AB, 0x21A, 0x275 }, { 0x000, 0x070, 0x0E0, 0x090, 0x1C0, 0x1B0, 0x120, 0x150, 0x380, 0x3F0, 0x360, 0x310, 0x240, 0x230, 0x2A0, 0x2D0 }, { 0x000, 0x071, 0x0E2, 0x093, 0x1C4, 0x1B5, 0x126, 0x157, 0x388, 0x3F9, 0x36A, 0x31B, 0x24C, 0x23D, 0x2AE, 0x2DF }, { 0x000, 0x072, 0x0E4, 0x096, 0x1C8, 0x1BA, 0x12C, 0x15E, 0x390, 0x3E2, 0x374, 0x306, 0x258, 0x22A, 0x2BC, 0x2CE }, { 0x000, 0x073, 0x0E6, 0x095, 0x1CC, 0x1BF, 0x12A, 0x159, 0x398, 0x3EB, 0x37E, 0x30D, 0x254, 0x227, 0x2B2, 0x2C1 }, { 0x000, 0x074, 0x0E8, 0x09C, 0x1D0, 0x1A4, 0x138, 0x14C, 0x3A0, 0x3D4, 0x348, 0x33C, 0x270, 0x204, 0x298, 0x2EC }, { 0x000, 0x075, 0x0EA, 0x09F, 0x1D4, 0x1A1, 0x13E, 0x14B, 0x3A8, 0x3DD, 0x342, 0x337, 0x27C, 0x209, 0x296, 0x2E3 }, { 0x000, 0x076, 0x0EC, 0x09A, 0x1D8, 0x1AE, 0x134, 0x142, 0x3B0, 0x3C6, 0x35C, 0x32A, 0x268, 0x21E, 0x284, 0x2F2 }, { 0x000, 0x077, 0x0EE, 0x099, 0x1DC, 0x1AB, 0x132, 0x145, 0x3B8, 0x3CF, 0x356, 0x321, 0x264, 0x213, 0x28A, 0x2FD }, { 0x000, 0x078, 0x0F0, 0x088, 0x1E0, 0x198, 0x110, 0x168, 0x3C0, 0x3B8, 0x330, 0x348, 0x220, 0x258, 0x2D0, 0x2A8 }, { 0x000, 0x079, 0x0F2, 0x08B, 0x1E4, 0x19D, 0x116, 0x16F, 0x3C8, 0x3B1, 0x33A, 0x343, 0x22C, 0x255, 0x2DE, 0x2A7 }, { 0x000, 0x07A, 0x0F4, 0x08E, 0x1E8, 0x192, 0x11C, 0x166, 0x3D0, 0x3AA, 0x324, 0x35E, 0x238, 0x242, 0x2CC, 0x2B6 }, { 0x000, 0x07B, 0x0F6, 0x08D, 0x1EC, 0x197, 0x11A, 0x161, 0x3D8, 0x3A3, 0x32E, 0x355, 0x234, 0x24F, 0x2C2, 0x2B9 }, { 0x000, 0x07C, 0x0F8, 0x084, 0x1F0, 0x18C, 0x108, 0x174, 0x3E0, 0x39C, 0x318, 0x364, 0x210, 0x26C, 0x2E8, 0x294 }, { 0x000, 0x07D, 0x0FA, 0x087, 0x1F4, 0x189, 0x10E, 0x173, 0x3E8, 0x395, 0x312, 0x36F, 0x21C, 0x261, 0x2E6, 0x29B }, { 0x000, 0x07E, 0x0FC, 0x082, 0x1F8, 0x186, 0x104, 0x17A, 0x3F0, 0x38E, 0x30C, 0x372, 0x208, 0x276, 0x2F4, 0x28A }, { 0x000, 0x07F, 0x0FE, 0x081, 0x1FC, 0x183, 0x102, 0x17D, 0x3F8, 0x387, 0x306, 0x379, 0x204, 0x27B, 0x2FA, 0x285 }, { 0x000, 0x080, 0x100, 0x180, 0x200, 0x280, 0x300, 0x380, 0x400, 0x480, 0x500, 0x580, 0x600, 0x680, 0x700, 0x780 }, { 0x000, 0x081, 0x102, 0x183, 0x204, 0x285, 0x306, 0x387, 0x408, 0x489, 0x50A, 0x58B, 0x60C, 0x68D, 0x70E, 0x78F }, { 0x000, 0x082, 0x104, 0x186, 0x208, 0x28A, 0x30C, 0x38E, 0x410, 0x492, 0x514, 0x596, 0x618, 0x69A, 0x71C, 0x79E }, { 0x000, 0x083, 0x106, 0x185, 0x20C, 0x28F, 0x30A, 0x389, 0x418, 0x49B, 0x51E, 0x59D, 0x614, 0x697, 0x712, 0x791 }, { 0x000, 0x084, 0x108, 0x18C, 0x210, 0x294, 0x318, 0x39C, 0x420, 0x4A4, 0x528, 0x5AC, 0x630, 0x6B4, 0x738, 0x7BC }, { 0x000, 0x085, 0x10A, 0x18F, 0x214, 0x291, 0x31E, 0x39B, 0x428, 0x4AD, 0x522, 0x5A7, 0x63C, 0x6B9, 0x736, 0x7B3 }, { 0x000, 0x086, 0x10C, 0x18A, 0x218, 0x29E, 0x314, 0x392, 0x430, 0x4B6, 0x53C, 0x5BA, 0x628, 0x6AE, 0x724, 0x7A2 }, { 0x000, 0x087, 0x10E, 0x189, 0x21C, 0x29B, 0x312, 0x395, 0x438, 0x4BF, 0x536, 0x5B1, 0x624, 0x6A3, 0x72A, 0x7AD }, { 0x000, 0x088, 0x110, 0x198, 0x220, 0x2A8, 0x330, 0x3B8, 0x440, 0x4C8, 0x550, 0x5D8, 0x660, 0x6E8, 0x770, 0x7F8 }, { 0x000, 0x089, 0x112, 0x19B, 0x224, 0x2AD, 0x336, 0x3BF, 0x448, 0x4C1, 0x55A, 0x5D3, 0x66C, 0x6E5, 0x77E, 0x7F7 }, { 0x000, 0x08A, 0x114, 0x19E, 0x228, 0x2A2, 0x33C, 0x3B6, 0x450, 0x4DA, 0x544, 0x5CE, 0x678, 0x6F2, 0x76C, 0x7E6 }, { 0x000, 0x08B, 0x116, 0x19D, 0x22C, 0x2A7, 0x33A, 0x3B1, 0x458, 0x4D3, 0x54E, 0x5C5, 0x674, 0x6FF, 0x762, 0x7E9 }, { 0x000, 0x08C, 0x118, 0x194, 0x230, 0x2BC, 0x328, 0x3A4, 0x460, 0x4EC, 0x578, 0x5F4, 0x650, 0x6DC, 0x748, 0x7C4 }, { 0x000, 0x08D, 0x11A, 0x197, 0x234, 0x2B9, 0x32E, 0x3A3, 0x468, 0x4E5, 0x572, 0x5FF, 0x65C, 0x6D1, 0x746, 0x7CB }, { 0x000, 0x08E, 0x11C, 0x192, 0x238, 0x2B6, 0x324, 0x3AA, 0x470, 0x4FE, 0x56C, 0x5E2, 0x648, 0x6C6, 0x754, 0x7DA }, { 0x000, 0x08F, 0x11E, 0x191, 0x23C, 0x2B3, 0x322, 0x3AD, 0x478, 0x4F7, 0x566, 0x5E9, 0x644, 0x6CB, 0x75A, 0x7D5 }, { 0x000, 0x090, 0x120, 0x1B0, 0x240, 0x2D0, 0x360, 0x3F0, 0x480, 0x410, 0x5A0, 0x530, 0x6C0, 0x650, 0x7E0, 0x770 }, { 0x000, 0x091, 0x122, 0x1B3, 0x244, 0x2D5, 0x366, 0x3F7, 0x488, 0x419, 0x5AA, 0x53B, 0x6CC, 0x65D, 0x7EE, 0x77F }, { 0x000, 0x092, 0x124, 0x1B6, 0x248, 0x2DA, 0x36C, 0x3FE, 0x490, 0x402, 0x5B4, 0x526, 0x6D8, 0x64A, 0x7FC, 0x76E }, { 0x000, 0x093, 0x126, 0x1B5, 0x24C, 0x2DF, 0x36A, 0x3F9, 0x498, 0x40B, 0x5BE, 0x52D, 0x6D4, 0x647, 0x7F2, 0x761 }, { 0x000, 0x094, 0x128, 0x1BC, 0x250, 0x2C4, 0x378, 0x3EC, 0x4A0, 0x434, 0x588, 0x51C, 0x6F0, 0x664, 0x7D8, 0x74C }, { 0x000, 0x095, 0x12A, 0x1BF, 0x254, 0x2C1, 0x37E, 0x3EB, 0x4A8, 0x43D, 0x582, 0x517, 0x6FC, 0x669, 0x7D6, 0x743 }, { 0x000, 0x096, 0x12C, 0x1BA, 0x258, 0x2CE, 0x374, 0x3E2, 0x4B0, 0x426, 0x59C, 0x50A, 0x6E8, 0x67E, 0x7C4, 0x752 }, { 0x000, 0x097, 0x12E, 0x1B9, 0x25C, 0x2CB, 0x372, 0x3E5, 0x4B8, 0x42F, 0x596, 0x501, 0x6E4, 0x673, 0x7CA, 0x75D }, { 0x000, 0x098, 0x130, 0x1A8, 0x260, 0x2F8, 0x350, 0x3C8, 0x4C0, 0x458, 0x5F0, 0x568, 0x6A0, 0x638, 0x790, 0x708 }, { 0x000, 0x099, 0x132, 0x1AB, 0x264, 0x2FD, 0x356, 0x3CF, 0x4C8, 0x451, 0x5FA, 0x563, 0x6AC, 0x635, 0x79E, 0x707 }, { 0x000, 0x09A, 0x134, 0x1AE, 0x268, 0x2F2, 0x35C, 0x3C6, 0x4D0, 0x44A, 0x5E4, 0x57E, 0x6B8, 0x622, 0x78C, 0x716 }, { 0x000, 0x09B, 0x136, 0x1AD, 0x26C, 0x2F7, 0x35A, 0x3C1, 0x4D8, 0x443, 0x5EE, 0x575, 0x6B4, 0x62F, 0x782, 0x719 }, { 0x000, 0x09C, 0x138, 0x1A4, 0x270, 0x2EC, 0x348, 0x3D4, 0x4E0, 0x47C, 0x5D8, 0x544, 0x690, 0x60C, 0x7A8, 0x734 }, { 0x000, 0x09D, 0x13A, 0x1A7, 0x274, 0x2E9, 0x34E, 0x3D3, 0x4E8, 0x475, 0x5D2, 0x54F, 0x69C, 0x601, 0x7A6, 0x73B }, { 0x000, 0x09E, 0x13C, 0x1A2, 0x278, 0x2E6, 0x344, 0x3DA, 0x4F0, 0x46E, 0x5CC, 0x552, 0x688, 0x616, 0x7B4, 0x72A }, { 0x000, 0x09F, 0x13E, 0x1A1, 0x27C, 0x2E3, 0x342, 0x3DD, 0x4F8, 0x467, 0x5C6, 0x559, 0x684, 0x61B, 0x7BA, 0x725 }, { 0x000, 0x0A0, 0x140, 0x1E0, 0x280, 0x220, 0x3C0, 0x360, 0x500, 0x5A0, 0x440, 0x4E0, 0x780, 0x720, 0x6C0, 0x660 }, { 0x000, 0x0A1, 0x142, 0x1E3, 0x284, 0x225, 0x3C6, 0x367, 0x508, 0x5A9, 0x44A, 0x4EB, 0x78C, 0x72D, 0x6CE, 0x66F }, { 0x000, 0x0A2, 0x144, 0x1E6, 0x288, 0x22A, 0x3CC, 0x36E, 0x510, 0x5B2, 0x454, 0x4F6, 0x798, 0x73A, 0x6DC, 0x67E }, { 0x000, 0x0A3, 0x146, 0x1E5, 0x28C, 0x22F, 0x3CA, 0x369, 0x518, 0x5BB, 0x45E, 0x4FD, 0x794, 0x737, 0x6D2, 0x671 }, { 0x000, 0x0A4, 0x148, 0x1EC, 0x290, 0x234, 0x3D8, 0x37C, 0x520, 0x584, 0x468, 0x4CC, 0x7B0, 0x714, 0x6F8, 0x65C }, { 0x000, 0x0A5, 0x14A, 0x1EF, 0x294, 0x231, 0x3DE, 0x37B, 0x528, 0x58D, 0x462, 0x4C7, 0x7BC, 0x719, 0x6F6, 0x653 }, { 0x000, 0x0A6, 0x14C, 0x1EA, 0x298, 0x23E, 0x3D4, 0x372, 0x530, 0x596, 0x47C, 0x4DA, 0x7A8, 0x70E, 0x6E4, 0x642 }, { 0x000, 0x0A7, 0x14E, 0x1E9, 0x29C, 0x23B, 0x3D2, 0x375, 0x538, 0x59F, 0x476, 0x4D1, 0x7A4, 0x703, 0x6EA, 0x64D }, { 0x000, 0x0A8, 0x150, 0x1F8, 0x2A0, 0x208, 0x3F0, 0x358, 0x540, 0x5E8, 0x410, 0x4B8, 0x7E0, 0x748, 0x6B0, 0x618 }, { 0x000, 0x0A9, 0x152, 0x1FB, 0x2A4, 0x20D, 0x3F6, 0x35F, 0x548, 0x5E1, 0x41A, 0x4B3, 0x7EC, 0x745, 0x6BE, 0x617 }, { 0x000, 0x0AA, 0x154, 0x1FE, 0x2A8, 0x202, 0x3FC, 0x356, 0x550, 0x5FA, 0x404, 0x4AE, 0x7F8, 0x752, 0x6AC, 0x606 }, { 0x000, 0x0AB, 0x156, 0x1FD, 0x2AC, 0x207, 0x3FA, 0x351, 0x558, 0x5F3, 0x40E, 0x4A5, 0x7F4, 0x75F, 0x6A2, 0x609 }, { 0x000, 0x0AC, 0x158, 0x1F4, 0x2B0, 0x21C, 0x3E8, 0x344, 0x560, 0x5CC, 0x438, 0x494, 0x7D0, 0x77C, 0x688, 0x624 }, { 0x000, 0x0AD, 0x15A, 0x1F7, 0x2B4, 0x219, 0x3EE, 0x343, 0x568, 0x5C5, 0x432, 0x49F, 0x7DC, 0x771, 0x686, 0x62B }, { 0x000, 0x0AE, 0x15C, 0x1F2, 0x2B8, 0x216, 0x3E4, 0x34A, 0x570, 0x5DE, 0x42C, 0x482, 0x7C8, 0x766, 0x694, 0x63A }, { 0x000, 0x0AF, 0x15E, 0x1F1, 0x2BC, 0x213, 0x3E2, 0x34D, 0x578, 0x5D7, 0x426, 0x489, 0x7C4, 0x76B, 0x69A, 0x635 }, { 0x000, 0x0B0, 0x160, 0x1D0, 0x2C0, 0x270, 0x3A0, 0x310, 0x580, 0x530, 0x4E0, 0x450, 0x740, 0x7F0, 0x620, 0x690 }, { 0x000, 0x0B1, 0x162, 0x1D3, 0x2C4, 0x275, 0x3A6, 0x317, 0x588, 0x539, 0x4EA, 0x45B, 0x74C, 0x7FD, 0x62E, 0x69F }, { 0x000, 0x0B2, 0x164, 0x1D6, 0x2C8, 0x27A, 0x3AC, 0x31E, 0x590, 0x522, 0x4F4, 0x446, 0x758, 0x7EA, 0x63C, 0x68E }, { 0x000, 0x0B3, 0x166, 0x1D5, 0x2CC, 0x27F, 0x3AA, 0x319, 0x598, 0x52B, 0x4FE, 0x44D, 0x754, 0x7E7, 0x632, 0x681 }, { 0x000, 0x0B4, 0x168, 0x1DC, 0x2D0, 0x264, 0x3B8, 0x30C, 0x5A0, 0x514, 0x4C8, 0x47C, 0x770, 0x7C4, 0x618, 0x6AC }, { 0x000, 0x0B5, 0x16A, 0x1DF, 0x2D4, 0x261, 0x3BE, 0x30B, 0x5A8, 0x51D, 0x4C2, 0x477, 0x77C, 0x7C9, 0x616, 0x6A3 }, { 0x000, 0x0B6, 0x16C, 0x1DA, 0x2D8, 0x26E, 0x3B4, 0x302, 0x5B0, 0x506, 0x4DC, 0x46A, 0x768, 0x7DE, 0x604, 0x6B2 }, { 0x000, 0x0B7, 0x16E, 0x1D9, 0x2DC, 0x26B, 0x3B2, 0x305, 0x5B8, 0x50F, 0x4D6, 0x461, 0x764, 0x7D3, 0x60A, 0x6BD }, { 0x000, 0x0B8, 0x170, 0x1C8, 0x2E0, 0x258, 0x390, 0x328, 0x5C0, 0x578, 0x4B0, 0x408, 0x720, 0x798, 0x650, 0x6E8 }, { 0x000, 0x0B9, 0x172, 0x1CB, 0x2E4, 0x25D, 0x396, 0x32F, 0x5C8, 0x571, 0x4BA, 0x403, 0x72C, 0x795, 0x65E, 0x6E7 }, { 0x000, 0x0BA, 0x174, 0x1CE, 0x2E8, 0x252, 0x39C, 0x326, 0x5D0, 0x56A, 0x4A4, 0x41E, 0x738, 0x782, 0x64C, 0x6F6 }, { 0x000, 0x0BB, 0x176, 0x1CD, 0x2EC, 0x257, 0x39A, 0x321, 0x5D8, 0x563, 0x4AE, 0x415, 0x734, 0x78F, 0x642, 0x6F9 }, { 0x000, 0x0BC, 0x178, 0x1C4, 0x2F0, 0x24C, 0x388, 0x334, 0x5E0, 0x55C, 0x498, 0x424, 0x710, 0x7AC, 0x668, 0x6D4 }, { 0x000, 0x0BD, 0x17A, 0x1C7, 0x2F4, 0x249, 0x38E, 0x333, 0x5E8, 0x555, 0x492, 0x42F, 0x71C, 0x7A1, 0x666, 0x6DB }, { 0x000, 0x0BE, 0x17C, 0x1C2, 0x2F8, 0x246, 0x384, 0x33A, 0x5F0, 0x54E, 0x48C, 0x432, 0x708, 0x7B6, 0x674, 0x6CA }, { 0x000, 0x0BF, 0x17E, 0x1C1, 0x2FC, 0x243, 0x382, 0x33D, 0x5F8, 0x547, 0x486, 0x439, 0x704, 0x7BB, 0x67A, 0x6C5 }, { 0x000, 0x0C0, 0x180, 0x140, 0x300, 0x3C0, 0x280, 0x240, 0x600, 0x6C0, 0x780, 0x740, 0x500, 0x5C0, 0x480, 0x440 }, { 0x000, 0x0C1, 0x182, 0x143, 0x304, 0x3C5, 0x286, 0x247, 0x608, 0x6C9, 0x78A, 0x74B, 0x50C, 0x5CD, 0x48E, 0x44F }, { 0x000, 0x0C2, 0x184, 0x146, 0x308, 0x3CA, 0x28C, 0x24E, 0x610, 0x6D2, 0x794, 0x756, 0x518, 0x5DA, 0x49C, 0x45E }, { 0x000, 0x0C3, 0x186, 0x145, 0x30C, 0x3CF, 0x28A, 0x249, 0x618, 0x6DB, 0x79E, 0x75D, 0x514, 0x5D7, 0x492, 0x451 }, { 0x000, 0x0C4, 0x188, 0x14C, 0x310, 0x3D4, 0x298, 0x25C, 0x620, 0x6E4, 0x7A8, 0x76C, 0x530, 0x5F4, 0x4B8, 0x47C }, { 0x000, 0x0C5, 0x18A, 0x14F, 0x314, 0x3D1, 0x29E, 0x25B, 0x628, 0x6ED, 0x7A2, 0x767, 0x53C, 0x5F9, 0x4B6, 0x473 }, { 0x000, 0x0C6, 0x18C, 0x14A, 0x318, 0x3DE, 0x294, 0x252, 0x630, 0x6F6, 0x7BC, 0x77A, 0x528, 0x5EE, 0x4A4, 0x462 }, { 0x000, 0x0C7, 0x18E, 0x149, 0x31C, 0x3DB, 0x292, 0x255, 0x638, 0x6FF, 0x7B6, 0x771, 0x524, 0x5E3, 0x4AA, 0x46D }, { 0x000, 0x0C8, 0x190, 0x158, 0x320, 0x3E8, 0x2B0, 0x278, 0x640, 0x688, 0x7D0, 0x718, 0x560, 0x5A8, 0x4F0, 0x438 }, { 0x000, 0x0C9, 0x192, 0x15B, 0x324, 0x3ED, 0x2B6, 0x27F, 0x648, 0x681, 0x7DA, 0x713, 0x56C, 0x5A5, 0x4FE, 0x437 }, { 0x000, 0x0CA, 0x194, 0x15E, 0x328, 0x3E2, 0x2BC, 0x276, 0x650, 0x69A, 0x7C4, 0x70E, 0x578, 0x5B2, 0x4EC, 0x426 }, { 0x000, 0x0CB, 0x196, 0x15D, 0x32C, 0x3E7, 0x2BA, 0x271, 0x658, 0x693, 0x7CE, 0x705, 0x574, 0x5BF, 0x4E2, 0x429 }, { 0x000, 0x0CC, 0x198, 0x154, 0x330, 0x3FC, 0x2A8, 0x264, 0x660, 0x6AC, 0x7F8, 0x734, 0x550, 0x59C, 0x4C8, 0x404 }, { 0x000, 0x0CD, 0x19A, 0x157, 0x334, 0x3F9, 0x2AE, 0x263, 0x668, 0x6A5, 0x7F2, 0x73F, 0x55C, 0x591, 0x4C6, 0x40B }, { 0x000, 0x0CE, 0x19C, 0x152, 0x338, 0x3F6, 0x2A4, 0x26A, 0x670, 0x6BE, 0x7EC, 0x722, 0x548, 0x586, 0x4D4, 0x41A }, { 0x000, 0x0CF, 0x19E, 0x151, 0x33C, 0x3F3, 0x2A2, 0x26D, 0x678, 0x6B7, 0x7E6, 0x729, 0x544, 0x58B, 0x4DA, 0x415 }, { 0x000, 0x0D0, 0x1A0, 0x170, 0x340, 0x390, 0x2E0, 0x230, 0x680, 0x650, 0x720, 0x7F0, 0x5C0, 0x510, 0x460, 0x4B0 }, { 0x000, 0x0D1, 0x1A2, 0x173, 0x344, 0x395, 0x2E6, 0x237, 0x688, 0x659, 0x72A, 0x7FB, 0x5CC, 0x51D, 0x46E, 0x4BF }, { 0x000, 0x0D2, 0x1A4, 0x176, 0x348, 0x39A, 0x2EC, 0x23E, 0x690, 0x642, 0x734, 0x7E6, 0x5D8, 0x50A, 0x47C, 0x4AE }, { 0x000, 0x0D3, 0x1A6, 0x175, 0x34C, 0x39F, 0x2EA, 0x239, 0x698, 0x64B, 0x73E, 0x7ED, 0x5D4, 0x507, 0x472, 0x4A1 }, { 0x000, 0x0D4, 0x1A8, 0x17C, 0x350, 0x384, 0x2F8, 0x22C, 0x6A0, 0x674, 0x708, 0x7DC, 0x5F0, 0x524, 0x458, 0x48C }, { 0x000, 0x0D5, 0x1AA, 0x17F, 0x354, 0x381, 0x2FE, 0x22B, 0x6A8, 0x67D, 0x702, 0x7D7, 0x5FC, 0x529, 0x456, 0x483 }, { 0x000, 0x0D6, 0x1AC, 0x17A, 0x358, 0x38E, 0x2F4, 0x222, 0x6B0, 0x666, 0x71C, 0x7CA, 0x5E8, 0x53E, 0x444, 0x492 }, { 0x000, 0x0D7, 0x1AE, 0x179, 0x35C, 0x38B, 0x2F2, 0x225, 0x6B8, 0x66F, 0x716, 0x7C1, 0x5E4, 0x533, 0x44A, 0x49D }, { 0x000, 0x0D8, 0x1B0, 0x168, 0x360, 0x3B8, 0x2D0, 0x208, 0x6C0, 0x618, 0x770, 0x7A8, 0x5A0, 0x578, 0x410, 0x4C8 }, { 0x000, 0x0D9, 0x1B2, 0x16B, 0x364, 0x3BD, 0x2D6, 0x20F, 0x6C8, 0x611, 0x77A, 0x7A3, 0x5AC, 0x575, 0x41E, 0x4C7 }, { 0x000, 0x0DA, 0x1B4, 0x16E, 0x368, 0x3B2, 0x2DC, 0x206, 0x6D0, 0x60A, 0x764, 0x7BE, 0x5B8, 0x562, 0x40C, 0x4D6 }, { 0x000, 0x0DB, 0x1B6, 0x16D, 0x36C, 0x3B7, 0x2DA, 0x201, 0x6D8, 0x603, 0x76E, 0x7B5, 0x5B4, 0x56F, 0x402, 0x4D9 }, { 0x000, 0x0DC, 0x1B8, 0x164, 0x370, 0x3AC, 0x2C8, 0x214, 0x6E0, 0x63C, 0x758, 0x784, 0x590, 0x54C, 0x428, 0x4F4 }, { 0x000, 0x0DD, 0x1BA, 0x167, 0x374, 0x3A9, 0x2CE, 0x213, 0x6E8, 0x635, 0x752, 0x78F, 0x59C, 0x541, 0x426, 0x4FB }, { 0x000, 0x0DE, 0x1BC, 0x162, 0x378, 0x3A6, 0x2C4, 0x21A, 0x6F0, 0x62E, 0x74C, 0x792, 0x588, 0x556, 0x434, 0x4EA }, { 0x000, 0x0DF, 0x1BE, 0x161, 0x37C, 0x3A3, 0x2C2, 0x21D, 0x6F8, 0x627, 0x746, 0x799, 0x584, 0x55B, 0x43A, 0x4E5 }, { 0x000, 0x0E0, 0x1C0, 0x120, 0x380, 0x360, 0x240, 0x2A0, 0x700, 0x7E0, 0x6C0, 0x620, 0x480, 0x460, 0x540, 0x5A0 }, { 0x000, 0x0E1, 0x1C2, 0x123, 0x384, 0x365, 0x246, 0x2A7, 0x708, 0x7E9, 0x6CA, 0x62B, 0x48C, 0x46D, 0x54E, 0x5AF }, { 0x000, 0x0E2, 0x1C4, 0x126, 0x388, 0x36A, 0x24C, 0x2AE, 0x710, 0x7F2, 0x6D4, 0x636, 0x498, 0x47A, 0x55C, 0x5BE }, { 0x000, 0x0E3, 0x1C6, 0x125, 0x38C, 0x36F, 0x24A, 0x2A9, 0x718, 0x7FB, 0x6DE, 0x63D, 0x494, 0x477, 0x552, 0x5B1 }, { 0x000, 0x0E4, 0x1C8, 0x12C, 0x390, 0x374, 0x258, 0x2BC, 0x720, 0x7C4, 0x6E8, 0x60C, 0x4B0, 0x454, 0x578, 0x59C }, { 0x000, 0x0E5, 0x1CA, 0x12F, 0x394, 0x371, 0x25E, 0x2BB, 0x728, 0x7CD, 0x6E2, 0x607, 0x4BC, 0x459, 0x576, 0x593 }, { 0x000, 0x0E6, 0x1CC, 0x12A, 0x398, 0x37E, 0x254, 0x2B2, 0x730, 0x7D6, 0x6FC, 0x61A, 0x4A8, 0x44E, 0x564, 0x582 }, { 0x000, 0x0E7, 0x1CE, 0x129, 0x39C, 0x37B, 0x252, 0x2B5, 0x738, 0x7DF, 0x6F6, 0x611, 0x4A4, 0x443, 0x56A, 0x58D }, { 0x000, 0x0E8, 0x1D0, 0x138, 0x3A0, 0x348, 0x270, 0x298, 0x740, 0x7A8, 0x690, 0x678, 0x4E0, 0x408, 0x530, 0x5D8 }, { 0x000, 0x0E9, 0x1D2, 0x13B, 0x3A4, 0x34D, 0x276, 0x29F, 0x748, 0x7A1, 0x69A, 0x673, 0x4EC, 0x405, 0x53E, 0x5D7 }, { 0x000, 0x0EA, 0x1D4, 0x13E, 0x3A8, 0x342, 0x27C, 0x296, 0x750, 0x7BA, 0x684, 0x66E, 0x4F8, 0x412, 0x52C, 0x5C6 }, { 0x000, 0x0EB, 0x1D6, 0x13D, 0x3AC, 0x347, 0x27A, 0x291, 0x758, 0x7B3, 0x68E, 0x665, 0x4F4, 0x41F, 0x522, 0x5C9 }, { 0x000, 0x0EC, 0x1D8, 0x134, 0x3B0, 0x35C, 0x268, 0x284, 0x760, 0x78C, 0x6B8, 0x654, 0x4D0, 0x43C, 0x508, 0x5E4 }, { 0x000, 0x0ED, 0x1DA, 0x137, 0x3B4, 0x359, 0x26E, 0x283, 0x768, 0x785, 0x6B2, 0x65F, 0x4DC, 0x431, 0x506, 0x5EB }, { 0x000, 0x0EE, 0x1DC, 0x132, 0x3B8, 0x356, 0x264, 0x28A, 0x770, 0x79E, 0x6AC, 0x642, 0x4C8, 0x426, 0x514, 0x5FA }, { 0x000, 0x0EF, 0x1DE, 0x131, 0x3BC, 0x353, 0x262, 0x28D, 0x778, 0x797, 0x6A6, 0x649, 0x4C4, 0x42B, 0x51A, 0x5F5 }, { 0x000, 0x0F0, 0x1E0, 0x110, 0x3C0, 0x330, 0x220, 0x2D0, 0x780, 0x770, 0x660, 0x690, 0x440, 0x4B0, 0x5A0, 0x550 }, { 0x000, 0x0F1, 0x1E2, 0x113, 0x3C4, 0x335, 0x226, 0x2D7, 0x788, 0x779, 0x66A, 0x69B, 0x44C, 0x4BD, 0x5AE, 0x55F }, { 0x000, 0x0F2, 0x1E4, 0x116, 0x3C8, 0x33A, 0x22C, 0x2DE, 0x790, 0x762, 0x674, 0x686, 0x458, 0x4AA, 0x5BC, 0x54E }, { 0x000, 0x0F3, 0x1E6, 0x115, 0x3CC, 0x33F, 0x22A, 0x2D9, 0x798, 0x76B, 0x67E, 0x68D, 0x454, 0x4A7, 0x5B2, 0x541 }, { 0x000, 0x0F4, 0x1E8, 0x11C, 0x3D0, 0x324, 0x238, 0x2CC, 0x7A0, 0x754, 0x648, 0x6BC, 0x470, 0x484, 0x598, 0x56C }, { 0x000, 0x0F5, 0x1EA, 0x11F, 0x3D4, 0x321, 0x23E, 0x2CB, 0x7A8, 0x75D, 0x642, 0x6B7, 0x47C, 0x489, 0x596, 0x563 }, { 0x000, 0x0F6, 0x1EC, 0x11A, 0x3D8, 0x32E, 0x234, 0x2C2, 0x7B0, 0x746, 0x65C, 0x6AA, 0x468, 0x49E, 0x584, 0x572 }, { 0x000, 0x0F7, 0x1EE, 0x119, 0x3DC, 0x32B, 0x232, 0x2C5, 0x7B8, 0x74F, 0x656, 0x6A1, 0x464, 0x493, 0x58A, 0x57D }, { 0x000, 0x0F8, 0x1F0, 0x108, 0x3E0, 0x318, 0x210, 0x2E8, 0x7C0, 0x738, 0x630, 0x6C8, 0x420, 0x4D8, 0x5D0, 0x528 }, { 0x000, 0x0F9, 0x1F2, 0x10B, 0x3E4, 0x31D, 0x216, 0x2EF, 0x7C8, 0x731, 0x63A, 0x6C3, 0x42C, 0x4D5, 0x5DE, 0x527 }, { 0x000, 0x0FA, 0x1F4, 0x10E, 0x3E8, 0x312, 0x21C, 0x2E6, 0x7D0, 0x72A, 0x624, 0x6DE, 0x438, 0x4C2, 0x5CC, 0x536 }, { 0x000, 0x0FB, 0x1F6, 0x10D, 0x3EC, 0x317, 0x21A, 0x2E1, 0x7D8, 0x723, 0x62E, 0x6D5, 0x434, 0x4CF, 0x5C2, 0x539 }, { 0x000, 0x0FC, 0x1F8, 0x104, 0x3F0, 0x30C, 0x208, 0x2F4, 0x7E0, 0x71C, 0x618, 0x6E4, 0x410, 0x4EC, 0x5E8, 0x514 }, { 0x000, 0x0FD, 0x1FA, 0x107, 0x3F4, 0x309, 0x20E, 0x2F3, 0x7E8, 0x715, 0x612, 0x6EF, 0x41C, 0x4E1, 0x5E6, 0x51B }, { 0x000, 0x0FE, 0x1FC, 0x102, 0x3F8, 0x306, 0x204, 0x2FA, 0x7F0, 0x70E, 0x60C, 0x6F2, 0x408, 0x4F6, 0x5F4, 0x50A }, { 0x000, 0x0FF, 0x1FE, 0x101, 0x3FC, 0x303, 0x202, 0x2FD, 0x7F8, 0x707, 0x606, 0x6F9, 0x404, 0x4FB, 0x5FA, 0x505 } }; // Generated in CLISP: // (dotimes (x 256) // (dotimes (y 16) // (let ((z 0)) // (dotimes (b 4) (when (logbitp b y) (setq z (logxor z (ash x b))))) // (when (zerop (mod y 8)) (format t "~% ")) // (format t " 0x~3,'0X," z)))) #endif // Multiply two GF2-polynomials of degree < 16. #if defined(__sparc__) || defined(__sparc64__) extern "C" uint32 gf2_mul16 (uint16 x, uint16 y); #else uint32 gf2_mul16 (uint16 x, uint16 y) { var uint16 *ptr; // uint16 ptr[0x10]; var uint32 res = 0; // 8 table accesses. ptr = gf2_mul_table[x & 0xFF]; res ^= (uint32)ptr[y & 0xF]; res ^= (uint32)ptr[(y >> 4) & 0xF] << 4; res ^= (uint32)ptr[(y >> 8) & 0xF] << 8; res ^= (uint32)ptr[(y >> 12) & 0xF] << 12; ptr = gf2_mul_table[(x >> 8) & 0xFF]; res ^= (uint32)ptr[y & 0xF] << 8; res ^= (uint32)ptr[(y >> 4) & 0xF] << 12; res ^= (uint32)ptr[(y >> 8) & 0xF] << 16; res ^= (uint32)ptr[(y >> 12) & 0xF] << 20; return res; } #endif // Multiply two GF2-polynomials of degree < 32. // Stores the low part, returns the high part. #if defined(__sparc__) || defined(__sparc64__) extern "C" uint32 gf2_mul32 (uint32 x, uint32 y, uint32* plo); #else uint32 gf2_mul32 (uint32 x, uint32 y, uint32* plo) { var uint16 *ptr; // uint16 ptr[0x10]; var uint32 hi = 0; var uint32 lo = 0; var uint32 mid = 0; // Result will be (hi << 32) ^ (mid << 16) ^ (lo << 0). #if 0 // Standard multiplication, 32 table accesses. ptr = gf2_mul_table[x & 0xFF]; lo ^= (uint32)ptr[y & 0xF]; lo ^= (uint32)ptr[(y >> 4) & 0xF] << 4; lo ^= (uint32)ptr[(y >> 8) & 0xF] << 8; lo ^= (uint32)ptr[(y >> 12) & 0xF] << 12; mid ^= (uint32)ptr[(y >> 16) & 0xF]; mid ^= (uint32)ptr[(y >> 20) & 0xF] << 4; mid ^= (uint32)ptr[(y >> 24) & 0xF] << 8; mid ^= (uint32)ptr[(y >> 28) & 0xF] << 12; ptr = gf2_mul_table[(x >> 8) & 0xFF]; lo ^= (uint32)ptr[y & 0xF] << 8; lo ^= (uint32)ptr[(y >> 4) & 0xF] << 12; mid ^= (uint32)ptr[(y >> 8) & 0xF]; mid ^= (uint32)ptr[(y >> 12) & 0xF] << 4; mid ^= (uint32)ptr[(y >> 16) & 0xF] << 8; mid ^= (uint32)ptr[(y >> 20) & 0xF] << 12; hi ^= (uint32)ptr[(y >> 24) & 0xF]; hi ^= (uint32)ptr[(y >> 28) & 0xF] << 4; ptr = gf2_mul_table[(x >> 16) & 0xFF]; mid ^= (uint32)ptr[y & 0xF]; mid ^= (uint32)ptr[(y >> 4) & 0xF] << 4; mid ^= (uint32)ptr[(y >> 8) & 0xF] << 8; mid ^= (uint32)ptr[(y >> 12) & 0xF] << 12; hi ^= (uint32)ptr[(y >> 16) & 0xF]; hi ^= (uint32)ptr[(y >> 20) & 0xF] << 4; hi ^= (uint32)ptr[(y >> 24) & 0xF] << 8; hi ^= (uint32)ptr[(y >> 28) & 0xF] << 12; ptr = gf2_mul_table[(x >> 24) & 0xFF]; mid ^= (uint32)ptr[y & 0xF] << 8; mid ^= (uint32)ptr[(y >> 4) & 0xF] << 12; hi ^= (uint32)ptr[(y >> 8) & 0xF]; hi ^= (uint32)ptr[(y >> 12) & 0xF] << 4; hi ^= (uint32)ptr[(y >> 16) & 0xF] << 8; hi ^= (uint32)ptr[(y >> 20) & 0xF] << 12; hi ^= (uint32)ptr[(y >> 24) & 0xF] << 16; hi ^= (uint32)ptr[(y >> 28) & 0xF] << 20; #else // Apply Karatsuba: // lo := low16(x)*low16(y) // hi := high16(x)*high16(y) // mid := (high16(x)+low16(x))*(high16(y)+low16(y)) // mid := mid + lo + hi // 24 table accesses. ptr = gf2_mul_table[x & 0xFF]; lo ^= (uint32)ptr[y & 0xF]; lo ^= (uint32)ptr[(y >> 4) & 0xF] << 4; lo ^= (uint32)ptr[(y >> 8) & 0xF] << 8; lo ^= (uint32)ptr[(y >> 12) & 0xF] << 12; ptr = gf2_mul_table[(x >> 8) & 0xFF]; lo ^= (uint32)ptr[y & 0xF] << 8; lo ^= (uint32)ptr[(y >> 4) & 0xF] << 12; lo ^= (uint32)ptr[(y >> 8) & 0xF] << 16; lo ^= (uint32)ptr[(y >> 12) & 0xF] << 20; ptr = gf2_mul_table[(x >> 16) & 0xFF]; hi ^= (uint32)ptr[(y >> 16) & 0xF]; hi ^= (uint32)ptr[(y >> 20) & 0xF] << 4; hi ^= (uint32)ptr[(y >> 24) & 0xF] << 8; hi ^= (uint32)ptr[(y >> 28) & 0xF] << 12; ptr = gf2_mul_table[(x >> 24) & 0xFF]; hi ^= (uint32)ptr[(y >> 16) & 0xF] << 8; hi ^= (uint32)ptr[(y >> 20) & 0xF] << 12; hi ^= (uint32)ptr[(y >> 24) & 0xF] << 16; hi ^= (uint32)ptr[(y >> 28) & 0xF] << 20; x ^= x >> 16; y ^= y >> 16; ptr = gf2_mul_table[x & 0xFF]; mid ^= (uint32)ptr[y & 0xF]; mid ^= (uint32)ptr[(y >> 4) & 0xF] << 4; mid ^= (uint32)ptr[(y >> 8) & 0xF] << 8; mid ^= (uint32)ptr[(y >> 12) & 0xF] << 12; ptr = gf2_mul_table[(x >> 8) & 0xFF]; mid ^= (uint32)ptr[y & 0xF] << 8; mid ^= (uint32)ptr[(y >> 4) & 0xF] << 12; mid ^= (uint32)ptr[(y >> 8) & 0xF] << 16; mid ^= (uint32)ptr[(y >> 12) & 0xF] << 20; mid ^= lo; mid ^= hi; #endif *plo = lo ^ (mid << 16); return hi ^ (mid >> 16); } #endif // Multiply two GF2-polynomials of degree < intDsize. // Stores the low part, returns the high part. #if (intDsize==32) #define gf2_mul_uintD gf2_mul32 #endif #if (intDsize==64) inline uint64 gf2_mul32_ (uint32 x, uint32 y) { var uint16 *ptr; // uint16 ptr[0x10]; var uint32 hi = 0; var uint32 lo = 0; var uint32 mid = 0; // Result will be (hi << 32) ^ (mid << 16) ^ (lo << 0). // Apply Karatsuba: // lo := low16(x)*low16(y) // hi := high16(x)*high16(y) // mid := (high16(x)+low16(x))*(high16(y)+low16(y)) // mid := mid + lo + hi // 24 table accesses. ptr = gf2_mul_table[x & 0xFF]; lo ^= (uint32)ptr[y & 0xF]; lo ^= (uint32)ptr[(y >> 4) & 0xF] << 4; lo ^= (uint32)ptr[(y >> 8) & 0xF] << 8; lo ^= (uint32)ptr[(y >> 12) & 0xF] << 12; ptr = gf2_mul_table[(x >> 8) & 0xFF]; lo ^= (uint32)ptr[y & 0xF] << 8; lo ^= (uint32)ptr[(y >> 4) & 0xF] << 12; lo ^= (uint32)ptr[(y >> 8) & 0xF] << 16; lo ^= (uint32)ptr[(y >> 12) & 0xF] << 20; ptr = gf2_mul_table[(x >> 16) & 0xFF]; hi ^= (uint32)ptr[(y >> 16) & 0xF]; hi ^= (uint32)ptr[(y >> 20) & 0xF] << 4; hi ^= (uint32)ptr[(y >> 24) & 0xF] << 8; hi ^= (uint32)ptr[(y >> 28) & 0xF] << 12; ptr = gf2_mul_table[(x >> 24) & 0xFF]; hi ^= (uint32)ptr[(y >> 16) & 0xF] << 8; hi ^= (uint32)ptr[(y >> 20) & 0xF] << 12; hi ^= (uint32)ptr[(y >> 24) & 0xF] << 16; hi ^= (uint32)ptr[(y >> 28) & 0xF] << 20; x ^= x >> 16; y ^= y >> 16; ptr = gf2_mul_table[x & 0xFF]; mid ^= (uint32)ptr[y & 0xF]; mid ^= (uint32)ptr[(y >> 4) & 0xF] << 4; mid ^= (uint32)ptr[(y >> 8) & 0xF] << 8; mid ^= (uint32)ptr[(y >> 12) & 0xF] << 12; ptr = gf2_mul_table[(x >> 8) & 0xFF]; mid ^= (uint32)ptr[y & 0xF] << 8; mid ^= (uint32)ptr[(y >> 4) & 0xF] << 12; mid ^= (uint32)ptr[(y >> 8) & 0xF] << 16; mid ^= (uint32)ptr[(y >> 12) & 0xF] << 20; mid ^= lo; mid ^= hi; return (((uint64)hi << 32) | ((uint64)lo)) ^ ((uint64)mid << 16); } static uintD gf2_mul_uintD (uintD x, uintD y, uintD* plo) { // Apply Karatsuba: // lo := low32(x)*low32(y) // hi := high32(x)*high32(y) // mid := (high32(x)+low32(x))*(high32(y)+low32(y)) // mid := mid + lo + hi // 72 table accesses. var uint64 lo = gf2_mul32_(x,y); var uint64 hi = gf2_mul32_(x>>32,y>>32); var uint64 mid = gf2_mul32_(x^(x>>32),y^(y>>32)); // Result will be (hi << 64) ^ (mid << 32) ^ (lo << 0). *plo = lo ^ (mid << 32); return hi ^ (mid >> 32); } #endif static const _cl_UP gf2_mul (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const _cl_UP& y) {{ DeclarePoly(cl_GV_MI,x); DeclarePoly(cl_GV_MI,y); var const cl_heap_GV_I_bits1 * xv = (const cl_heap_GV_I_bits1 *) x.heappointer; var const cl_heap_GV_I_bits1 * yv = (const cl_heap_GV_I_bits1 *) y.heappointer; var uintL xlen = xv->v.size(); var uintL ylen = yv->v.size(); if (xlen == 0) return _cl_UP(UPR, x); if (ylen == 0) return _cl_UP(UPR, y); var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); var uintL len = xlen+ylen-1; var cl_GV_MI result = cl_GV_MI(len,R); var cl_heap_GV_I_bits1 * rv = (cl_heap_GV_I_bits1 *) result.heappointer; xlen = ceiling(xlen,intDsize); ylen = ceiling(ylen,intDsize); if (xlen < ylen) { var uintL xlen1 = ceiling(len,intDsize)-ylen; // = xlen-{0,1} for (uintL i = 0; i < xlen; i++) { var uintD xw = xv->data[i]; var uintD* rvptr = &rv->data[i]; var uintD carry = 0; for (uintL j = 0; j < ylen; j++) { var uintD rwlo; var uintD rwhi = gf2_mul_uintD(xw,yv->data[j],&rwlo); *rvptr++ ^= carry ^ rwlo; carry = rwhi; } if (i < xlen1) *rvptr ^= carry; } } else { var uintL ylen1 = ceiling(len,intDsize)-xlen; // = ylen-{0,1} for (uintL j = 0; j < ylen; j++) { var uintD yw = yv->data[j]; var uintD* rvptr = &rv->data[j]; var uintD carry = 0; for (uintL i = 0; i < xlen; i++) { var uintD rwlo; var uintD rwhi = gf2_mul_uintD(xv->data[i],yw,&rwlo); *rvptr++ ^= carry ^ rwlo; carry = rwhi; } if (j < ylen1) *rvptr ^= carry; } } return _cl_UP(UPR, result); }} // In characteristic 2, we square a polynomial by doubling the exponents: // (sum(a_i T^i))^2 = sum(a_i^2 T^2i) = sum(a_i T^2i). static uint16 gf2_square_table[0x100] = { 0x0000, 0x0001, 0x0004, 0x0005, 0x0010, 0x0011, 0x0014, 0x0015, 0x0040, 0x0041, 0x0044, 0x0045, 0x0050, 0x0051, 0x0054, 0x0055, 0x0100, 0x0101, 0x0104, 0x0105, 0x0110, 0x0111, 0x0114, 0x0115, 0x0140, 0x0141, 0x0144, 0x0145, 0x0150, 0x0151, 0x0154, 0x0155, 0x0400, 0x0401, 0x0404, 0x0405, 0x0410, 0x0411, 0x0414, 0x0415, 0x0440, 0x0441, 0x0444, 0x0445, 0x0450, 0x0451, 0x0454, 0x0455, 0x0500, 0x0501, 0x0504, 0x0505, 0x0510, 0x0511, 0x0514, 0x0515, 0x0540, 0x0541, 0x0544, 0x0545, 0x0550, 0x0551, 0x0554, 0x0555, 0x1000, 0x1001, 0x1004, 0x1005, 0x1010, 0x1011, 0x1014, 0x1015, 0x1040, 0x1041, 0x1044, 0x1045, 0x1050, 0x1051, 0x1054, 0x1055, 0x1100, 0x1101, 0x1104, 0x1105, 0x1110, 0x1111, 0x1114, 0x1115, 0x1140, 0x1141, 0x1144, 0x1145, 0x1150, 0x1151, 0x1154, 0x1155, 0x1400, 0x1401, 0x1404, 0x1405, 0x1410, 0x1411, 0x1414, 0x1415, 0x1440, 0x1441, 0x1444, 0x1445, 0x1450, 0x1451, 0x1454, 0x1455, 0x1500, 0x1501, 0x1504, 0x1505, 0x1510, 0x1511, 0x1514, 0x1515, 0x1540, 0x1541, 0x1544, 0x1545, 0x1550, 0x1551, 0x1554, 0x1555, 0x4000, 0x4001, 0x4004, 0x4005, 0x4010, 0x4011, 0x4014, 0x4015, 0x4040, 0x4041, 0x4044, 0x4045, 0x4050, 0x4051, 0x4054, 0x4055, 0x4100, 0x4101, 0x4104, 0x4105, 0x4110, 0x4111, 0x4114, 0x4115, 0x4140, 0x4141, 0x4144, 0x4145, 0x4150, 0x4151, 0x4154, 0x4155, 0x4400, 0x4401, 0x4404, 0x4405, 0x4410, 0x4411, 0x4414, 0x4415, 0x4440, 0x4441, 0x4444, 0x4445, 0x4450, 0x4451, 0x4454, 0x4455, 0x4500, 0x4501, 0x4504, 0x4505, 0x4510, 0x4511, 0x4514, 0x4515, 0x4540, 0x4541, 0x4544, 0x4545, 0x4550, 0x4551, 0x4554, 0x4555, 0x5000, 0x5001, 0x5004, 0x5005, 0x5010, 0x5011, 0x5014, 0x5015, 0x5040, 0x5041, 0x5044, 0x5045, 0x5050, 0x5051, 0x5054, 0x5055, 0x5100, 0x5101, 0x5104, 0x5105, 0x5110, 0x5111, 0x5114, 0x5115, 0x5140, 0x5141, 0x5144, 0x5145, 0x5150, 0x5151, 0x5154, 0x5155, 0x5400, 0x5401, 0x5404, 0x5405, 0x5410, 0x5411, 0x5414, 0x5415, 0x5440, 0x5441, 0x5444, 0x5445, 0x5450, 0x5451, 0x5454, 0x5455, 0x5500, 0x5501, 0x5504, 0x5505, 0x5510, 0x5511, 0x5514, 0x5515, 0x5540, 0x5541, 0x5544, 0x5545, 0x5550, 0x5551, 0x5554, 0x5555 }; // Generated in CLISP: // (dotimes (i 256) // (let ((j 0)) // (dotimes (b 8) (when (logbitp b i) (setq j (logior j (ash 1 (+ b b)))))) // (when (zerop (mod i 8)) (format t "~% ")) // (format t " 0x~4,'0X," j))) // Square a GF2-polynomial of degree < intDsize. // Stores the low part, returns the high part. static uintD gf2_square_uintD (uintD x, uintD* lo) { #if (intDsize==32) *lo = ((uintD)gf2_square_table[(x>>8) & 0xFF] << 16) | (uintD)gf2_square_table[x & 0xFF]; x = x>>16; return ((uintD)gf2_square_table[(x>>8) & 0xFF] << 16) | (uintD)gf2_square_table[x & 0xFF]; #endif #if (intDsize==64) *lo = ((uintD)gf2_square_table[(x>>24) & 0xFF] << 48) | ((uintD)gf2_square_table[(x>>16) & 0xFF] << 32) | ((uintD)gf2_square_table[(x>>8) & 0xFF] << 16) | (uintD)gf2_square_table[x & 0xFF]; x = x>>32; return ((uintD)gf2_square_table[(x>>24) & 0xFF] << 48) | ((uintD)gf2_square_table[(x>>16) & 0xFF] << 32) | ((uintD)gf2_square_table[(x>>8) & 0xFF] << 16) | (uintD)gf2_square_table[x & 0xFF]; #endif } static const _cl_UP gf2_square (cl_heap_univpoly_ring* UPR, const _cl_UP& x) {{ DeclarePoly(cl_GV_MI,x); var const cl_heap_GV_I_bits1 * xv = (const cl_heap_GV_I_bits1 *) x.heappointer; var uintL xlen = xv->v.size(); if (xlen == 0) return _cl_UP(UPR, x); var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); var uintL len = 2*xlen-1; var cl_GV_MI result = cl_GV_MI(len,R); var cl_heap_GV_I_bits1 * rv = (cl_heap_GV_I_bits1 *) result.heappointer; var uintL count = floor(xlen,intDsize); for (uintL i = 0; i < count; i++) rv->data[2*i+1] = gf2_square_uintD(xv->data[i],&rv->data[2*i]); xlen = xlen%intDsize; if (xlen > 0) { var uintD hiword = xv->data[count]; // xlen bits hiword = gf2_square_uintD(hiword,&rv->data[2*count]); if (xlen > intDsize/2) rv->data[2*count+1] = hiword; } return _cl_UP(UPR, result); }} // Scalar multiplication of GF(2)-polynomials is trivial: 0*y = 0, 1*y = y. static const _cl_UP gf2_scalmul (cl_heap_univpoly_ring* UPR, const cl_ring_element& x, const _cl_UP& y) { if (!(UPR->basering() == x.ring())) throw runtime_exception(); { DeclarePoly(_cl_MI,x); var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); if (R->_zerop(x)) return _cl_UP(UPR, cl_null_GV_I); return y; }} // Evaluation of GF(2)-polynomials is trivial: // At 0, it's the coefficient 0. At 1, it's the sum of all coefficients, // i.e. the parity of the number of nonzero coefficients. static const cl_ring_element gf2_eval (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const cl_ring_element& y) {{ DeclarePoly(cl_GV_MI,x); if (!(UPR->basering() == y.ring())) throw runtime_exception(); { DeclarePoly(_cl_MI,y); var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); var const cl_heap_GV_I_bits1 * xv = (const cl_heap_GV_I_bits1 *) x.heappointer; var uintL len = xv->v.size(); if (len==0) return R->zero(); if (R->_zerop(y)) return cl_MI(R, x[0]); else { var uintL count = ceiling(len,intDsize); var uintC bitcount = 0; do { count--; bitcount += logcountD(xv->data[count]); } while (count > 0); return R->canonhom(bitcount%2); } }}} static cl_univpoly_setops gf2_setops = { modint_fprint, gf2_equal }; static cl_univpoly_addops gf2_addops = { modint_zero, modint_zerop, gf2_plus, gf2_minus, gf2_uminus }; static cl_univpoly_mulops gf2_mulops = { modint_one, modint_canonhom, gf2_mul, gf2_square, modint_exptpos }; static cl_univpoly_modulops gf2_modulops = { gf2_scalmul }; static cl_univpoly_polyops gf2_polyops = { modint_degree, modint_ldegree, modint_monomial, modint_coeff, modint_create, modint_set_coeff, modint_finalize, gf2_eval }; class cl_heap_gf2_univpoly_ring : public cl_heap_univpoly_ring { SUBCLASS_cl_heap_univpoly_ring() public: // Constructor. cl_heap_gf2_univpoly_ring (const cl_ring& r); // Destructor. ~cl_heap_gf2_univpoly_ring () {} }; static void cl_heap_gf2_univpoly_ring_destructor (cl_heap* pointer) { (*(cl_heap_gf2_univpoly_ring*)pointer).~cl_heap_gf2_univpoly_ring(); } cl_class cl_class_gf2_univpoly_ring = { cl_heap_gf2_univpoly_ring_destructor, cl_class_flags_univpoly_ring }; // Constructor. inline cl_heap_gf2_univpoly_ring::cl_heap_gf2_univpoly_ring (const cl_ring& r) : cl_heap_univpoly_ring (r, &gf2_setops, &gf2_addops, &gf2_mulops, &gf2_modulops, &gf2_polyops) { type = &cl_class_gf2_univpoly_ring; } } // namespace cln cln-1.3.3/src/polynomial/elem/cl_UP_named.cc0000644000000000000000000000547311201634740015540 0ustar // find_univpoly_ring(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/univpoly.h" // Implementation. #include "polynomial/cl_UP.h" namespace cln { // Create a new univariate polynomial ring with a named variable. static inline cl_heap_univpoly_ring* cl_make_univpoly_ring (const cl_ring& r, const cl_symbol& varname) { cl_heap_univpoly_ring* UPR = cl_make_univpoly_ring(r); UPR->add_property(new cl_varname_property(cl_univpoly_varname_key,varname)); return UPR; } } // namespace cln // The table of univariate polynomial rings with named variable. // A weak hash table (cl_ring,cl_symbol) -> cl_univpoly_ring. #include "base/hash/cl_rcpointer2_hashweak_rcpointer.h" namespace cln { // An entry can be collected when the value (the ring) isn't referenced any more // except from the hash table, and when the keys (the base ring and the name) // are't referenced any more except from the hash table and the ring. Note that // the ring contains exactly one reference to the base ring and exactly one // reference to the name (on the property list). static bool maygc_htentry (const cl_htentry_from_rcpointer2_to_rcpointer& entry) { if (!entry.key1.pointer_p() || (entry.key1.heappointer->refcount == 2)) if (!entry.key2.pointer_p() || (entry.key2.heappointer->refcount == 2)) if (!entry.val.pointer_p() || (entry.val.heappointer->refcount == 1)) return true; return false; } class named_univpoly_ring_cache { static cl_wht_from_rcpointer2_to_rcpointer* univpoly_ring_table; static int count; public: named_univpoly_ring_cache(); ~named_univpoly_ring_cache(); inline cl_univpoly_ring* get_univpoly_ring(const cl_ring& r, const cl_symbol& v) { return (cl_univpoly_ring*) univpoly_ring_table->get(r,v); } inline void store_univpoly_ring(const cl_univpoly_ring& R) { univpoly_ring_table->put(R->basering(), ((cl_varname_property*)(R->get_property(cl_univpoly_varname_key)))->varname, R); } }; cl_wht_from_rcpointer2_to_rcpointer* named_univpoly_ring_cache::univpoly_ring_table = 0; int named_univpoly_ring_cache::count = 0; named_univpoly_ring_cache::named_univpoly_ring_cache() { if (count++ == 0) univpoly_ring_table = new cl_wht_from_rcpointer2_to_rcpointer(maygc_htentry); } named_univpoly_ring_cache::~named_univpoly_ring_cache() { if (--count == 0) delete univpoly_ring_table; } const cl_univpoly_ring find_univpoly_ring (const cl_ring& r, const cl_symbol& varname) { static named_univpoly_ring_cache cache; var cl_univpoly_ring* ring_in_table = cache.get_univpoly_ring(r,varname); if (!ring_in_table) { var cl_univpoly_ring R = cl_make_univpoly_ring(r,varname); cache.store_univpoly_ring(R); ring_in_table = cache.get_univpoly_ring(r,varname); if (!ring_in_table) throw runtime_exception(); } return *ring_in_table; } } // namespace cln cln-1.3.3/src/polynomial/elem/cl_UP_unnamed.cc0000644000000000000000000000420411201634740016072 0ustar // find_univpoly_ring(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/univpoly.h" // Implementation. #include "polynomial/cl_UP.h" // The table of univariate polynomial rings without named variable. // A weak hash table cl_ring -> cl_univpoly_ring. // (It could also be a weak hashuniq table cl_ring -> cl_univpoly_ring.) #include "base/hash/cl_rcpointer_hashweak_rcpointer.h" namespace cln { // An entry can be collected when the value (the ring) isn't referenced any more // except from the hash table, and when the key (the base ring) isn't referenced // any more except from the hash table and the ring. Note that the ring contains // exactly one reference to the base ring. static bool maygc_htentry (const cl_htentry_from_rcpointer_to_rcpointer& entry) { if (!entry.key.pointer_p() || (entry.key.heappointer->refcount == 2)) if (!entry.val.pointer_p() || (entry.val.heappointer->refcount == 1)) return true; return false; } class univpoly_ring_cache { static cl_wht_from_rcpointer_to_rcpointer* univpoly_ring_table; static int count; public: inline cl_univpoly_ring* get_univpoly_ring(const cl_ring& r) { return (cl_univpoly_ring*) univpoly_ring_table->get(r); } inline void store_univpoly_ring(const cl_univpoly_ring& R) { univpoly_ring_table->put(R->basering(), R); } univpoly_ring_cache(); ~univpoly_ring_cache(); }; cl_wht_from_rcpointer_to_rcpointer* univpoly_ring_cache::univpoly_ring_table = 0; int univpoly_ring_cache::count = 0; univpoly_ring_cache::univpoly_ring_cache() { if (count++ == 0) univpoly_ring_table = new cl_wht_from_rcpointer_to_rcpointer(maygc_htentry); } univpoly_ring_cache::~univpoly_ring_cache() { if (--count == 0) delete univpoly_ring_table; } const cl_univpoly_ring find_univpoly_ring (const cl_ring& r) { static univpoly_ring_cache cache; var cl_univpoly_ring* ring_in_table = cache.get_univpoly_ring(r); if (!ring_in_table) { var cl_univpoly_ring R = cl_make_univpoly_ring(r); cache.store_univpoly_ring(R); ring_in_table = cache.get_univpoly_ring(r); if (!ring_in_table) throw runtime_exception(); } return *ring_in_table; } } // namespace cln cln-1.3.3/src/polynomial/elem/cl_UP_number.h0000644000000000000000000003357111201634740015606 0ustar // Univariate Polynomials over some subring of the numbers. #include "cln/SV_number.h" #include "cln/number.h" #include "cln/integer.h" #include "cln/exception.h" namespace cln { // Assume a ring is a number ring. inline cl_heap_number_ring* TheNumberRing (const cl_ring& R) { return (cl_heap_number_ring*) R.heappointer; } // Normalize a vector: remove leading zero coefficients. // The result vector is known to have length len > 0. static inline void num_normalize (cl_number_ring_ops& ops, cl_SV_number& result, uintL len) { if (ops.zerop(result[len-1])) { len--; while (len > 0) { if (!ops.zerop(result[len-1])) break; len--; } var cl_SV_number newresult = cl_SV_number(cl_make_heap_SV_number_uninit(len)); for (var sintL i = len-1; i >= 0; i--) init1(cl_number, newresult[i]) (result[i]); result = newresult; } } static void num_fprint (cl_heap_univpoly_ring* UPR, std::ostream& stream, const _cl_UP& x) {{ DeclarePoly(cl_SV_number,x); var cl_number_ring_ops& ops = *TheNumberRing(UPR->basering())->ops; var sintL xlen = x.size(); if (xlen == 0) fprint(stream, "0"); else { var const cl_ring& R = UPR->basering(); var cl_string varname = get_varname(UPR); for (var sintL i = xlen-1; i >= 0; i--) if (!ops.zerop(x[i])) { if (i < xlen-1) fprint(stream, " + "); fprint(stream, cl_ring_element(R,x[i])); if (i > 0) { fprint(stream, "*"); fprint(stream, varname); if (i != 1) { fprint(stream, "^"); fprintdecimal(stream, i); } } } } }} static bool num_equal (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const _cl_UP& y) {{ DeclarePoly(cl_SV_number,x); DeclarePoly(cl_SV_number,y); var cl_number_ring_ops& ops = *TheNumberRing(UPR->basering())->ops; var sintL xlen = x.size(); var sintL ylen = y.size(); if (!(xlen == ylen)) return false; for (var sintL i = xlen-1; i >= 0; i--) if (!ops.equal(x[i],y[i])) return false; return true; }} static const _cl_UP num_zero (cl_heap_univpoly_ring* UPR) { return _cl_UP(UPR, cl_null_SV_number); } static bool num_zerop (cl_heap_univpoly_ring* UPR, const _cl_UP& x) { unused UPR; { DeclarePoly(cl_SV_number,x); var sintL xlen = x.size(); if (xlen == 0) return true; else return false; }} static const _cl_UP num_plus (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const _cl_UP& y) {{ DeclarePoly(cl_SV_number,x); DeclarePoly(cl_SV_number,y); var cl_number_ring_ops& ops = *TheNumberRing(UPR->basering())->ops; var sintL xlen = x.size(); var sintL ylen = y.size(); if (xlen == 0) return _cl_UP(UPR, y); if (ylen == 0) return _cl_UP(UPR, x); // Now xlen > 0, ylen > 0. if (xlen > ylen) { var cl_SV_number result = cl_SV_number(cl_make_heap_SV_number_uninit(xlen)); var sintL i; for (i = xlen-1; i >= ylen; i--) init1(cl_number, result[i]) (x[i]); for (i = ylen-1; i >= 0; i--) init1(cl_number, result[i]) (ops.plus(x[i],y[i])); return _cl_UP(UPR, result); } if (xlen < ylen) { var cl_SV_number result = cl_SV_number(cl_make_heap_SV_number_uninit(ylen)); var sintL i; for (i = ylen-1; i >= xlen; i--) init1(cl_number, result[i]) (y[i]); for (i = xlen-1; i >= 0; i--) init1(cl_number, result[i]) (ops.plus(x[i],y[i])); return _cl_UP(UPR, result); } // Now xlen = ylen > 0. Add and normalize simultaneously. for (var sintL i = xlen-1; i >= 0; i--) { var cl_number hicoeff = ops.plus(x[i],y[i]); if (!ops.zerop(hicoeff)) { var cl_SV_number result = cl_SV_number(cl_make_heap_SV_number_uninit(i+1)); init1(cl_number, result[i]) (hicoeff); for (i-- ; i >= 0; i--) init1(cl_number, result[i]) (ops.plus(x[i],y[i])); return _cl_UP(UPR, result); } } return _cl_UP(UPR, cl_null_SV_number); }} static const _cl_UP num_uminus (cl_heap_univpoly_ring* UPR, const _cl_UP& x) {{ DeclarePoly(cl_SV_number,x); var cl_number_ring_ops& ops = *TheNumberRing(UPR->basering())->ops; var sintL xlen = x.size(); if (xlen == 0) return _cl_UP(UPR, x); // Now xlen > 0. // Negate. No normalization necessary, since the degree doesn't change. var sintL i = xlen-1; var cl_number hicoeff = ops.uminus(x[i]); if (ops.zerop(hicoeff)) throw runtime_exception(); var cl_SV_number result = cl_SV_number(cl_make_heap_SV_number_uninit(xlen)); init1(cl_number, result[i]) (hicoeff); for (i-- ; i >= 0; i--) init1(cl_number, result[i]) (ops.uminus(x[i])); return _cl_UP(UPR, result); }} static const _cl_UP num_minus (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const _cl_UP& y) {{ DeclarePoly(cl_SV_number,x); DeclarePoly(cl_SV_number,y); var cl_number_ring_ops& ops = *TheNumberRing(UPR->basering())->ops; var sintL xlen = x.size(); var sintL ylen = y.size(); if (ylen == 0) return _cl_UP(UPR, x); if (xlen == 0) return num_uminus(UPR, _cl_UP(UPR, y)); // Now xlen > 0, ylen > 0. if (xlen > ylen) { var cl_SV_number result = cl_SV_number(cl_make_heap_SV_number_uninit(xlen)); var sintL i; for (i = xlen-1; i >= ylen; i--) init1(cl_number, result[i]) (x[i]); for (i = ylen-1; i >= 0; i--) init1(cl_number, result[i]) (ops.minus(x[i],y[i])); return _cl_UP(UPR, result); } if (xlen < ylen) { var cl_SV_number result = cl_SV_number(cl_make_heap_SV_number_uninit(ylen)); var sintL i; for (i = ylen-1; i >= xlen; i--) init1(cl_number, result[i]) (ops.uminus(y[i])); for (i = xlen-1; i >= 0; i--) init1(cl_number, result[i]) (ops.minus(x[i],y[i])); return _cl_UP(UPR, result); } // Now xlen = ylen > 0. Add and normalize simultaneously. for (var sintL i = xlen-1; i >= 0; i--) { var cl_number hicoeff = ops.minus(x[i],y[i]); if (!ops.zerop(hicoeff)) { var cl_SV_number result = cl_SV_number(cl_make_heap_SV_number_uninit(i+1)); init1(cl_number, result[i]) (hicoeff); for (i-- ; i >= 0; i--) init1(cl_number, result[i]) (ops.minus(x[i],y[i])); return _cl_UP(UPR, result); } } return _cl_UP(UPR, cl_null_SV_number); }} static const _cl_UP num_one (cl_heap_univpoly_ring* UPR) { var cl_SV_number result = cl_SV_number(cl_make_heap_SV_number_uninit(1)); init1(cl_number, result[0]) (1); return _cl_UP(UPR, result); } static const _cl_UP num_canonhom (cl_heap_univpoly_ring* UPR, const cl_I& x) { var cl_SV_number result = cl_SV_number(cl_make_heap_SV_number_uninit(1)); init1(cl_number, result[0]) (x); return _cl_UP(UPR, result); } static const _cl_UP num_mul (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const _cl_UP& y) {{ DeclarePoly(cl_SV_number,x); DeclarePoly(cl_SV_number,y); var cl_number_ring_ops& ops = *TheNumberRing(UPR->basering())->ops; var sintL xlen = x.size(); var sintL ylen = y.size(); if (xlen == 0) return _cl_UP(UPR, x); if (ylen == 0) return _cl_UP(UPR, y); // Multiply. var sintL len = xlen + ylen - 1; var cl_SV_number result = cl_SV_number(cl_make_heap_SV_number_uninit(len)); if (xlen < ylen) { { var sintL i = xlen-1; var cl_number xi = x[i]; for (sintL j = ylen-1; j >= 0; j--) init1(cl_number, result[i+j]) (ops.mul(xi,y[j])); } for (sintL i = xlen-2; i >= 0; i--) { var cl_number xi = x[i]; for (sintL j = ylen-1; j > 0; j--) result[i+j] = ops.plus(result[i+j],ops.mul(xi,y[j])); /* j=0 */ init1(cl_number, result[i]) (ops.mul(xi,y[0])); } } else { { var sintL j = ylen-1; var cl_number yj = y[j]; for (sintL i = xlen-1; i >= 0; i--) init1(cl_number, result[i+j]) (ops.mul(x[i],yj)); } for (sintL j = ylen-2; j >= 0; j--) { var cl_number yj = y[j]; for (sintL i = xlen-1; i > 0; i--) result[i+j] = ops.plus(result[i+j],ops.mul(x[i],yj)); /* i=0 */ init1(cl_number, result[j]) (ops.mul(x[0],yj)); } } // Normalize (not necessary in integral domains). //num_normalize(ops,result,len); if (ops.zerop(result[len-1])) throw runtime_exception(); return _cl_UP(UPR, result); }} static const _cl_UP num_square (cl_heap_univpoly_ring* UPR, const _cl_UP& x) {{ DeclarePoly(cl_SV_number,x); var cl_number_ring_ops& ops = *TheNumberRing(UPR->basering())->ops; var sintL xlen = x.size(); if (xlen == 0) return cl_UP(UPR, x); var sintL len = 2*xlen-1; var cl_SV_number result = cl_SV_number(cl_make_heap_SV_number_uninit(len)); if (xlen > 1) { // Loop through all 0 <= j < i <= xlen-1. { var sintL i = xlen-1; var cl_number xi = x[i]; for (sintL j = i-1; j >= 0; j--) init1(cl_number, result[i+j]) (ops.mul(xi,x[j])); } {for (sintL i = xlen-2; i >= 1; i--) { var cl_number xi = x[i]; for (sintL j = i-1; j >= 1; j--) result[i+j] = ops.plus(result[i+j],ops.mul(xi,x[j])); /* j=0 */ init1(cl_number, result[i]) (ops.mul(xi,x[0])); }} // Double. {for (sintL i = len-2; i >= 1; i--) result[i] = ops.plus(result[i],result[i]); } // Add squares. init1(cl_number, result[2*(xlen-1)]) (ops.square(x[xlen-1])); for (sintL i = xlen-2; i >= 1; i--) result[2*i] = ops.plus(result[2*i],ops.square(x[i])); } init1(cl_number, result[0]) (ops.square(x[0])); // Normalize (not necessary in integral domains). //num_normalize(ops,result,len); if (ops.zerop(result[len-1])) throw runtime_exception(); return _cl_UP(UPR, result); }} static const _cl_UP num_exptpos (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const cl_I& y) { var _cl_UP a = x; var cl_I b = y; while (!oddp(b)) { a = UPR->_square(a); b = b >> 1; } var _cl_UP c = a; until (b == 1) { b = b >> 1; a = UPR->_square(a); if (oddp(b)) { c = UPR->_mul(a,c); } } return c; } static const _cl_UP num_scalmul (cl_heap_univpoly_ring* UPR, const cl_ring_element& x, const _cl_UP& y) { if (!(UPR->basering() == x.ring())) throw runtime_exception(); { DeclarePoly(cl_number,x); DeclarePoly(cl_SV_number,y); var cl_number_ring_ops& ops = *TheNumberRing(UPR->basering())->ops; var sintL ylen = y.size(); if (ylen == 0) return _cl_UP(UPR, y); if (ops.zerop(x)) return _cl_UP(UPR, cl_null_SV_number); // Now ylen > 0. // No normalization necessary, since the degree doesn't change. var cl_SV_number result = cl_SV_number(cl_make_heap_SV_number_uninit(ylen)); for (sintL i = ylen-1; i >= 0; i--) init1(cl_number, result[i]) (ops.mul(x,y[i])); return _cl_UP(UPR, result); }} static sintL num_degree (cl_heap_univpoly_ring* UPR, const _cl_UP& x) { unused UPR; { DeclarePoly(cl_SV_number,x); return (sintL) x.size() - 1; }} static sintL num_ldegree (cl_heap_univpoly_ring* UPR, const _cl_UP& x) {{ DeclarePoly(cl_SV_number,x); var cl_number_ring_ops& ops = *TheNumberRing(UPR->basering())->ops; var sintL xlen = x.size(); for (sintL i = 0; i < xlen; i++) { if (!ops.zerop(x[i])) return i; } return -1; }} static const _cl_UP num_monomial (cl_heap_univpoly_ring* UPR, const cl_ring_element& x, uintL e) { if (!(UPR->basering() == x.ring())) throw runtime_exception(); { DeclarePoly(cl_number,x); var cl_number_ring_ops& ops = *TheNumberRing(UPR->basering())->ops; if (ops.zerop(x)) return _cl_UP(UPR, cl_null_SV_number); else { var sintL len = e+1; var cl_SV_number result = cl_SV_number(len); result[e] = x; return _cl_UP(UPR, result); } }} static const cl_ring_element num_coeff (cl_heap_univpoly_ring* UPR, const _cl_UP& x, uintL index) {{ DeclarePoly(cl_SV_number,x); var cl_heap_number_ring* R = TheNumberRing(UPR->basering()); if (index < x.size()) return cl_ring_element(R, x[index]); else return R->zero(); }} static const _cl_UP num_create (cl_heap_univpoly_ring* UPR, sintL deg) { if (deg < 0) return _cl_UP(UPR, cl_null_SV_number); else { var sintL len = deg+1; return _cl_UP(UPR, cl_SV_number(len)); } } static void num_set_coeff (cl_heap_univpoly_ring* UPR, _cl_UP& x, uintL index, const cl_ring_element& y) {{ DeclareMutablePoly(cl_SV_number,x); if (!(UPR->basering() == y.ring())) throw runtime_exception(); { DeclarePoly(cl_number,y); if (!(index < x.size())) throw runtime_exception(); x[index] = y; }}} static void num_finalize (cl_heap_univpoly_ring* UPR, _cl_UP& x) {{ DeclareMutablePoly(cl_SV_number,x); // NB: x is modified by reference! var cl_number_ring_ops& ops = *TheNumberRing(UPR->basering())->ops; var uintL len = x.size(); if (len > 0) num_normalize(ops,x,len); }} static const cl_ring_element num_eval (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const cl_ring_element& y) {{ // Method: // If x = 0, return 0. // If y = 0, return x[0]. // Else compute (...(x[len-1]*y+x[len-2])*y ...)*y + x[0]. DeclarePoly(cl_SV_number,x); if (!(UPR->basering() == y.ring())) throw runtime_exception(); { DeclarePoly(cl_number,y); var cl_heap_number_ring* R = TheNumberRing(UPR->basering()); var cl_number_ring_ops& ops = *R->ops; var uintL len = x.size(); if (len==0) return R->zero(); if (ops.zerop(y)) return cl_ring_element(R, x[0]); var sintL i = len-1; var cl_number z = x[i]; for ( ; --i >= 0; ) z = ops.plus(ops.mul(z,y),x[i]); return cl_ring_element(R, z); }}} static cl_univpoly_setops num_setops = { num_fprint, num_equal }; static cl_univpoly_addops num_addops = { num_zero, num_zerop, num_plus, num_minus, num_uminus }; static cl_univpoly_mulops num_mulops = { num_one, num_canonhom, num_mul, num_square, num_exptpos }; static cl_univpoly_modulops num_modulops = { num_scalmul }; static cl_univpoly_polyops num_polyops = { num_degree, num_ldegree, num_monomial, num_coeff, num_create, num_set_coeff, num_finalize, num_eval }; class cl_heap_num_univpoly_ring : public cl_heap_univpoly_ring { SUBCLASS_cl_heap_univpoly_ring() public: // Constructor. cl_heap_num_univpoly_ring (const cl_ring& r); // Destructor. ~cl_heap_num_univpoly_ring () {} }; static void cl_heap_num_univpoly_ring_destructor (cl_heap* pointer) { (*(cl_heap_num_univpoly_ring*)pointer).~cl_heap_num_univpoly_ring(); } cl_class cl_class_num_univpoly_ring = { cl_heap_num_univpoly_ring_destructor, cl_class_flags_univpoly_ring }; // Constructor. inline cl_heap_num_univpoly_ring::cl_heap_num_univpoly_ring (const cl_ring& r) : cl_heap_univpoly_ring (r, &num_setops, &num_addops, &num_mulops, &num_modulops, &num_polyops) { type = &cl_class_num_univpoly_ring; } } // namespace cln cln-1.3.3/src/polynomial/elem/cl_UP.cc0000644000000000000000000000463211201634740014370 0ustar // Univariate Polynomial operations. // General includes. #include "base/cl_sysdep.h" // Specification. #define CL_GV_NO_RANGECHECKS #define CL_SV_NO_RANGECHECKS #include "cln/univpoly.h" #include "polynomial/cl_UP.h" // Implementation. #include "cln/output.h" namespace cln { cl_symbol cl_univpoly_varname_key = (cl_symbol)(cl_string)"variable name"; // Prepare for looking into a polynomial. #define DeclarePoly(type,x) \ const type& __tmp_##x = *(const type*) &(x).rep; \ const type& x = __tmp_##x; #define DeclareMutablePoly(type,x) \ type& __tmp_##x = *(type*) &(x).rep; \ type& x = __tmp_##x; } // namespace cln // Four different implementations of the polynomial operations, for efficiency: #include "cl_UP_number.h" // polynomials over number rings #include "cl_UP_MI.h" // polynomials over modular integer rings #include "cl_UP_GF2.h" // polynomials over the modular integer ring GF(2) #include "cl_UP_gen.h" // polynomials over all other rings namespace cln { static void cl_univpoly_ring_destructor (cl_heap* pointer) { (*(cl_heap_univpoly_ring*)pointer).~cl_heap_univpoly_ring(); } cl_class cl_class_univpoly_ring; int cl_UP_init_helper::count = 0; cl_UP_init_helper::cl_UP_init_helper() { if (count++ == 0) { cl_class_univpoly_ring.destruct = cl_univpoly_ring_destructor; cl_class_univpoly_ring.flags = cl_class_flags_univpoly_ring; } } cl_UP_init_helper::~cl_UP_init_helper() { if (--count == 0) { // nothing to clean up } } cl_heap_univpoly_ring::cl_heap_univpoly_ring (const cl_ring& r, cl_univpoly_setops* setopv, cl_univpoly_addops* addopv, cl_univpoly_mulops* mulopv, cl_univpoly_modulops* modulopv, cl_univpoly_polyops* polyopv) : setops (setopv), addops (addopv), mulops (mulopv), modulops (modulopv), polyops (polyopv), _basering (r) { refcount = 0; // will be incremented by the `cl_univpoly_ring' constructor type = &cl_class_univpoly_ring; } // Create a new univariate polynomial ring. cl_heap_univpoly_ring* cl_make_univpoly_ring (const cl_ring& r) { if (r.pointer_type()->flags & cl_class_flags_number_ring) return new cl_heap_num_univpoly_ring(r); else if (r.pointer_type()->flags & cl_class_flags_modint_ring) { if (((cl_heap_modint_ring*)r.heappointer)->modulus == 2) return new cl_heap_gf2_univpoly_ring(r); else return new cl_heap_modint_univpoly_ring(r); } else return new cl_heap_gen_univpoly_ring(r); } } // namespace cln cln-1.3.3/src/polynomial/elem/cl_asm_GF2.cc0000644000000000000000000000026011201634740015253 0ustar // Includes the CPU specific cl_asm_*.cc file. #include "cl_config.h" #if defined(__sparc__) || defined(__sparc64__) #include "polynomial/elem/cl_asm_sparc_GF2.cc" #endif cln-1.3.3/src/polynomial/elem/cl_UP_MI.h0000644000000000000000000003230311201634740014613 0ustar // Univariate Polynomials over a ring of modular integers. #include "cln/GV_modinteger.h" #include "cln/modinteger.h" #include "cln/exception.h" namespace cln { // Assume a ring is a modint ring. inline cl_heap_modint_ring* TheModintRing (const cl_ring& R) { return (cl_heap_modint_ring*) R.heappointer; } // Normalize a vector: remove leading zero coefficients. // The result vector is known to have length len > 0. static inline void modint_normalize (cl_heap_modint_ring* R, cl_GV_MI& result, uintL len) { if (R->_zerop(result[len-1])) { len--; while (len > 0) { if (!R->_zerop(result[len-1])) break; len--; } var cl_GV_MI newresult = cl_GV_MI(len,R); #if 0 for (var sintL i = len-1; i >= 0; i--) newresult[i] = result[i]; #else cl_GV_MI::copy_elements(result,0,newresult,0,len); #endif result = newresult; } } static void modint_fprint (cl_heap_univpoly_ring* UPR, std::ostream& stream, const _cl_UP& x) {{ DeclarePoly(cl_GV_MI,x); var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); var sintL xlen = x.size(); if (xlen == 0) fprint(stream, "0"); else { var cl_string varname = get_varname(UPR); for (var sintL i = xlen-1; i >= 0; i--) if (!R->_zerop(x[i])) { if (i < xlen-1) fprint(stream, " + "); fprint(stream, "("); R->_fprint(stream, x[i]); fprint(stream, ")"); if (i > 0) { fprint(stream, "*"); fprint(stream, varname); if (i != 1) { fprint(stream, "^"); fprintdecimal(stream, i); } } } } }} static bool modint_equal (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const _cl_UP& y) {{ DeclarePoly(cl_GV_MI,x); DeclarePoly(cl_GV_MI,y); var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); var sintL xlen = x.size(); var sintL ylen = y.size(); if (!(xlen == ylen)) return false; for (var sintL i = xlen-1; i >= 0; i--) if (!R->_equal(x[i],y[i])) return false; return true; }} static const _cl_UP modint_zero (cl_heap_univpoly_ring* UPR) { return _cl_UP(UPR, cl_null_GV_I); } static bool modint_zerop (cl_heap_univpoly_ring* UPR, const _cl_UP& x) { unused UPR; { DeclarePoly(cl_GV_MI,x); var sintL xlen = x.size(); if (xlen == 0) return true; else return false; }} static const _cl_UP modint_plus (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const _cl_UP& y) {{ DeclarePoly(cl_GV_MI,x); DeclarePoly(cl_GV_MI,y); var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); var sintL xlen = x.size(); var sintL ylen = y.size(); if (xlen == 0) return _cl_UP(UPR, y); if (ylen == 0) return _cl_UP(UPR, x); // Now xlen > 0, ylen > 0. if (xlen > ylen) { var cl_GV_MI result = cl_GV_MI(xlen,R); var sintL i; #if 0 for (i = xlen-1; i >= ylen; i--) result[i] = x[i]; #else cl_GV_MI::copy_elements(x,ylen,result,ylen,xlen-ylen); #endif for (i = ylen-1; i >= 0; i--) result[i] = R->_plus(x[i],y[i]); return _cl_UP(UPR, result); } if (xlen < ylen) { var cl_GV_MI result = cl_GV_MI(ylen,R); var sintL i; #if 0 for (i = ylen-1; i >= xlen; i--) result[i] = y[i]; #else cl_GV_MI::copy_elements(y,xlen,result,xlen,ylen-xlen); #endif for (i = xlen-1; i >= 0; i--) result[i] = R->_plus(x[i],y[i]); return _cl_UP(UPR, result); } // Now xlen = ylen > 0. Add and normalize simultaneously. for (var sintL i = xlen-1; i >= 0; i--) { var _cl_MI hicoeff = R->_plus(x[i],y[i]); if (!R->_zerop(hicoeff)) { var cl_GV_MI result = cl_GV_MI(i+1,R); result[i] = hicoeff; for (i-- ; i >= 0; i--) result[i] = R->_plus(x[i],y[i]); return _cl_UP(UPR, result); } } return _cl_UP(UPR, cl_null_GV_I); }} static const _cl_UP modint_uminus (cl_heap_univpoly_ring* UPR, const _cl_UP& x) {{ DeclarePoly(cl_GV_MI,x); var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); var sintL xlen = x.size(); if (xlen == 0) return _cl_UP(UPR, x); // Now xlen > 0. // Negate. No normalization necessary, since the degree doesn't change. var sintL i = xlen-1; var _cl_MI hicoeff = R->_uminus(x[i]); if (R->_zerop(hicoeff)) throw runtime_exception(); var cl_GV_MI result = cl_GV_MI(xlen,R); result[i] = hicoeff; for (i-- ; i >= 0; i--) result[i] = R->_uminus(x[i]); return _cl_UP(UPR, result); }} static const _cl_UP modint_minus (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const _cl_UP& y) {{ DeclarePoly(cl_GV_MI,x); DeclarePoly(cl_GV_MI,y); var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); var sintL xlen = x.size(); var sintL ylen = y.size(); if (ylen == 0) return _cl_UP(UPR, x); if (xlen == 0) return modint_uminus(UPR, _cl_UP(UPR, y)); // Now xlen > 0, ylen > 0. if (xlen > ylen) { var cl_GV_MI result = cl_GV_MI(xlen,R); var sintL i; #if 0 for (i = xlen-1; i >= ylen; i--) result[i] = x[i]; #else cl_GV_MI::copy_elements(x,ylen,result,ylen,xlen-ylen); #endif for (i = ylen-1; i >= 0; i--) result[i] = R->_minus(x[i],y[i]); return _cl_UP(UPR, result); } if (xlen < ylen) { var cl_GV_MI result = cl_GV_MI(ylen,R); var sintL i; for (i = ylen-1; i >= xlen; i--) result[i] = R->_uminus(y[i]); for (i = xlen-1; i >= 0; i--) result[i] = R->_minus(x[i],y[i]); return _cl_UP(UPR, result); } // Now xlen = ylen > 0. Add and normalize simultaneously. for (var sintL i = xlen-1; i >= 0; i--) { var _cl_MI hicoeff = R->_minus(x[i],y[i]); if (!R->_zerop(hicoeff)) { var cl_GV_MI result = cl_GV_MI(i+1,R); result[i] = hicoeff; for (i-- ; i >= 0; i--) result[i] = R->_minus(x[i],y[i]); return _cl_UP(UPR, result); } } return _cl_UP(UPR, cl_null_GV_I); }} static const _cl_UP modint_one (cl_heap_univpoly_ring* UPR) { var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); var cl_GV_MI result = cl_GV_MI(1,R); result[0] = R->_one(); return _cl_UP(UPR, result); } static const _cl_UP modint_canonhom (cl_heap_univpoly_ring* UPR, const cl_I& x) { var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); var cl_GV_MI result = cl_GV_MI(1,R); result[0] = R->_canonhom(x); return _cl_UP(UPR, result); } static const _cl_UP modint_mul (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const _cl_UP& y) {{ DeclarePoly(cl_GV_MI,x); DeclarePoly(cl_GV_MI,y); var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); var sintL xlen = x.size(); var sintL ylen = y.size(); if (xlen == 0) return _cl_UP(UPR, x); if (ylen == 0) return _cl_UP(UPR, y); // Multiply. var sintL len = xlen + ylen - 1; var cl_GV_MI result = cl_GV_MI(len,R); if (xlen < ylen) { { var sintL i = xlen-1; var _cl_MI xi = x[i]; for (sintL j = ylen-1; j >= 0; j--) result[i+j] = R->_mul(xi,y[j]); } for (sintL i = xlen-2; i >= 0; i--) { var _cl_MI xi = x[i]; for (sintL j = ylen-1; j > 0; j--) result[i+j] = R->_plus(result[i+j],R->_mul(xi,y[j])); /* j=0 */ result[i] = R->_mul(xi,y[0]); } } else { { var sintL j = ylen-1; var _cl_MI yj = y[j]; for (sintL i = xlen-1; i >= 0; i--) result[i+j] = R->_mul(x[i],yj); } for (sintL j = ylen-2; j >= 0; j--) { var _cl_MI yj = y[j]; for (sintL i = xlen-1; i > 0; i--) result[i+j] = R->_plus(result[i+j],R->_mul(x[i],yj)); /* i=0 */ result[j] = R->_mul(x[0],yj); } } // Normalize (not necessary in integral domains). //modint_normalize(R,result,len); if (R->_zerop(result[len-1])) throw runtime_exception(); return _cl_UP(UPR, result); }} static const _cl_UP modint_square (cl_heap_univpoly_ring* UPR, const _cl_UP& x) {{ DeclarePoly(cl_GV_MI,x); var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); var sintL xlen = x.size(); if (xlen == 0) return cl_UP(UPR, x); var sintL len = 2*xlen-1; var cl_GV_MI result = cl_GV_MI(len,R); if (xlen > 1) { // Loop through all 0 <= j < i <= xlen-1. { var sintL i = xlen-1; var _cl_MI xi = x[i]; for (sintL j = i-1; j >= 0; j--) result[i+j] = R->_mul(xi,x[j]); } {for (sintL i = xlen-2; i >= 1; i--) { var _cl_MI xi = x[i]; for (sintL j = i-1; j >= 1; j--) result[i+j] = R->_plus(result[i+j],R->_mul(xi,x[j])); /* j=0 */ result[i] = R->_mul(xi,x[0]); }} // Double. {for (sintL i = len-2; i >= 1; i--) result[i] = R->_plus(result[i],result[i]); } // Add squares. result[2*(xlen-1)] = R->_square(x[xlen-1]); for (sintL i = xlen-2; i >= 1; i--) result[2*i] = R->_plus(result[2*i],R->_square(x[i])); } result[0] = R->_square(x[0]); // Normalize (not necessary in integral domains). //modint_normalize(R,result,len); if (R->_zerop(result[len-1])) throw runtime_exception(); return _cl_UP(UPR, result); }} static const _cl_UP modint_exptpos (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const cl_I& y) { var _cl_UP a = x; var cl_I b = y; while (!oddp(b)) { a = UPR->_square(a); b = b >> 1; } var _cl_UP c = a; until (b == 1) { b = b >> 1; a = UPR->_square(a); if (oddp(b)) { c = UPR->_mul(a,c); } } return c; } static const _cl_UP modint_scalmul (cl_heap_univpoly_ring* UPR, const cl_ring_element& x, const _cl_UP& y) { if (!(UPR->basering() == x.ring())) throw runtime_exception(); { DeclarePoly(_cl_MI,x); DeclarePoly(cl_GV_MI,y); var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); var sintL ylen = y.size(); if (ylen == 0) return _cl_UP(UPR, y); if (R->_zerop(x)) return _cl_UP(UPR, cl_null_GV_I); // Now ylen > 0. // No normalization necessary, since the degree doesn't change. var cl_GV_MI result = cl_GV_MI(ylen,R); for (sintL i = ylen-1; i >= 0; i--) result[i] = R->_mul(x,y[i]); return _cl_UP(UPR, result); }} static sintL modint_degree (cl_heap_univpoly_ring* UPR, const _cl_UP& x) { unused UPR; { DeclarePoly(cl_GV_MI,x); return (sintL) x.size() - 1; }} static sintL modint_ldegree (cl_heap_univpoly_ring* UPR, const _cl_UP& x) {{ DeclarePoly(cl_GV_MI,x); var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); var sintL xlen = x.size(); for (sintL i = 0; i < xlen; i++) { if (!R->_zerop(x[i])) return i; } return -1; }} static const _cl_UP modint_monomial (cl_heap_univpoly_ring* UPR, const cl_ring_element& x, uintL e) { if (!(UPR->basering() == x.ring())) throw runtime_exception(); { DeclarePoly(_cl_MI,x); var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); if (R->_zerop(x)) return _cl_UP(UPR, cl_null_GV_I); else { var sintL len = e+1; var cl_GV_MI result = cl_GV_MI(len,R); result[e] = x; return _cl_UP(UPR, result); } }} static const cl_ring_element modint_coeff (cl_heap_univpoly_ring* UPR, const _cl_UP& x, uintL index) {{ DeclarePoly(cl_GV_MI,x); var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); if (index < x.size()) return cl_MI(R, x[index]); else return R->zero(); }} static const _cl_UP modint_create (cl_heap_univpoly_ring* UPR, sintL deg) { if (deg < 0) return _cl_UP(UPR, cl_null_GV_I); else { var sintL len = deg+1; var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); return _cl_UP(UPR, cl_GV_MI(len,R)); } } static void modint_set_coeff (cl_heap_univpoly_ring* UPR, _cl_UP& x, uintL index, const cl_ring_element& y) {{ DeclareMutablePoly(cl_GV_MI,x); if (!(UPR->basering() == y.ring())) throw runtime_exception(); { DeclarePoly(_cl_MI,y); if (!(index < x.size())) throw runtime_exception(); x[index] = y; }}} static void modint_finalize (cl_heap_univpoly_ring* UPR, _cl_UP& x) {{ DeclareMutablePoly(cl_GV_MI,x); // NB: x is modified by reference! var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); var uintL len = x.size(); if (len > 0) modint_normalize(R,x,len); }} static const cl_ring_element modint_eval (cl_heap_univpoly_ring* UPR, const _cl_UP& x, const cl_ring_element& y) {{ // Method: // If x = 0, return 0. // If y = 0, return x[0]. // Else compute (...(x[len-1]*y+x[len-2])*y ...)*y + x[0]. DeclarePoly(cl_GV_MI,x); if (!(UPR->basering() == y.ring())) throw runtime_exception(); { DeclarePoly(_cl_MI,y); var cl_heap_modint_ring* R = TheModintRing(UPR->basering()); var uintL len = x.size(); if (len==0) return R->zero(); if (R->_zerop(y)) return cl_MI(R, x[0]); var sintL i = len-1; var _cl_MI z = x[i]; for ( ; --i >= 0; ) z = R->_plus(R->_mul(z,y),x[i]); return cl_MI(R, z); }}} static cl_univpoly_setops modint_setops = { modint_fprint, modint_equal }; static cl_univpoly_addops modint_addops = { modint_zero, modint_zerop, modint_plus, modint_minus, modint_uminus }; static cl_univpoly_mulops modint_mulops = { modint_one, modint_canonhom, modint_mul, modint_square, modint_exptpos }; static cl_univpoly_modulops modint_modulops = { modint_scalmul }; static cl_univpoly_polyops modint_polyops = { modint_degree, modint_ldegree, modint_monomial, modint_coeff, modint_create, modint_set_coeff, modint_finalize, modint_eval }; class cl_heap_modint_univpoly_ring : public cl_heap_univpoly_ring { SUBCLASS_cl_heap_univpoly_ring() public: // Constructor. cl_heap_modint_univpoly_ring (const cl_ring& r); // Destructor. ~cl_heap_modint_univpoly_ring () {} }; static void cl_heap_modint_univpoly_ring_destructor (cl_heap* pointer) { (*(cl_heap_modint_univpoly_ring*)pointer).~cl_heap_modint_univpoly_ring(); } cl_class cl_class_modint_univpoly_ring = { cl_heap_modint_univpoly_ring_destructor, cl_class_flags_univpoly_ring }; // Constructor. inline cl_heap_modint_univpoly_ring::cl_heap_modint_univpoly_ring (const cl_ring& r) : cl_heap_univpoly_ring (r, &modint_setops, &modint_addops, &modint_mulops, &modint_modulops, &modint_polyops) { type = &cl_class_modint_univpoly_ring; } } // namespace cln cln-1.3.3/src/polynomial/elem/cl_UP_no_ring.cc0000644000000000000000000001077111201634740016104 0ustar // Dummy ring. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/univpoly.h" // Implementation. #include "cln/io.h" namespace cln { static const _cl_UP dummy_op0 (cl_heap_univpoly_ring* R) { unused R; throw uninitialized_ring_exception(); } static const _cl_UP dummy_op1 (cl_heap_univpoly_ring* R, const _cl_UP& x) { unused R; throw uninitialized_exception(x); } static const _cl_UP dummy_op2 (cl_heap_univpoly_ring* R, const _cl_UP& x, const _cl_UP& y) { unused R; throw uninitialized_exception(x, y); } static void dummy_fprint (cl_heap_univpoly_ring* R, std::ostream& stream, const _cl_UP& x) { unused R; unused stream; throw uninitialized_exception(x); } static bool dummy_equal (cl_heap_univpoly_ring* R, const _cl_UP& x, const _cl_UP& y) { unused R; throw uninitialized_exception(x, y); } #define dummy_zero dummy_op0 static bool dummy_zerop (cl_heap_univpoly_ring* R, const _cl_UP& x) { unused R; throw uninitialized_exception(x); } #define dummy_plus dummy_op2 #define dummy_minus dummy_op2 #define dummy_uminus dummy_op1 #define dummy_one dummy_op0 static const _cl_UP dummy_canonhom (cl_heap_univpoly_ring* R, const cl_I& x) { unused R; (void)&x; // unused x; throw uninitialized_ring_exception(); } #define dummy_mul dummy_op2 #define dummy_square dummy_op1 static const _cl_UP dummy_expt_pos (cl_heap_univpoly_ring* R, const _cl_UP& x, const cl_I& y) { unused R; (void)&y; // unused y; throw uninitialized_exception(x); } static const _cl_UP dummy_scalmul (cl_heap_univpoly_ring* R, const cl_ring_element& x, const _cl_UP& y) { unused R; unused x; throw uninitialized_exception(y); } static sintL dummy_degree (cl_heap_univpoly_ring* R, const _cl_UP& x) { unused R; throw uninitialized_exception(x); } static sintL dummy_ldegree (cl_heap_univpoly_ring* R, const _cl_UP& x) { unused R; throw uninitialized_exception(x); } static const _cl_UP dummy_monomial (cl_heap_univpoly_ring* R, const cl_ring_element& x, uintL e) { unused R; unused x; unused e; throw uninitialized_ring_exception(); } static const cl_ring_element dummy_coeff (cl_heap_univpoly_ring* R, const _cl_UP& x, uintL index) { unused R; unused index; throw uninitialized_exception(x); } static const _cl_UP dummy_create (cl_heap_univpoly_ring* R, sintL deg) { unused R; unused deg; throw uninitialized_ring_exception(); } static void dummy_set_coeff (cl_heap_univpoly_ring* R, _cl_UP& x, uintL index, const cl_ring_element& y) { unused R; unused index; unused y; throw uninitialized_exception(x); } static void dummy_finalize (cl_heap_univpoly_ring* R, _cl_UP& x) { unused R; throw uninitialized_exception(x); } static const cl_ring_element dummy_eval (cl_heap_univpoly_ring* R, const _cl_UP& x, const cl_ring_element& y) { unused R; unused y; throw uninitialized_exception(x); } static cl_univpoly_setops dummy_setops = { dummy_fprint, dummy_equal }; static cl_univpoly_addops dummy_addops = { dummy_zero, dummy_zerop, dummy_plus, dummy_minus, dummy_uminus }; static cl_univpoly_mulops dummy_mulops = { dummy_one, dummy_canonhom, dummy_mul, dummy_square, dummy_expt_pos }; static cl_univpoly_modulops dummy_modulops = { dummy_scalmul }; static cl_univpoly_polyops dummy_polyops = { dummy_degree, dummy_ldegree, dummy_monomial, dummy_coeff, dummy_create, dummy_set_coeff, dummy_finalize, dummy_eval }; class cl_heap_no_univpoly_ring : public cl_heap_univpoly_ring { SUBCLASS_cl_heap_univpoly_ring() public: // Constructor. cl_heap_no_univpoly_ring () : cl_heap_univpoly_ring (cl_no_ring,&dummy_setops,&dummy_addops,&dummy_mulops,&dummy_modulops,&dummy_polyops) { type = &cl_class_no_univpoly_ring; } // Destructor. ~cl_heap_no_univpoly_ring () {} }; static void cl_no_univpoly_ring_destructor (cl_heap* pointer) { (*(cl_heap_no_univpoly_ring*)pointer).~cl_heap_no_univpoly_ring(); } cl_class cl_class_no_univpoly_ring; static cl_heap_no_univpoly_ring* cl_heap_no_univpoly_ring_instance; const cl_univpoly_ring cl_no_univpoly_ring = cl_no_univpoly_ring; int cl_UP_no_ring_init_helper::count = 0; cl_UP_no_ring_init_helper::cl_UP_no_ring_init_helper() { if (count++ == 0) { cl_class_no_univpoly_ring.destruct = cl_no_univpoly_ring_destructor; cl_class_no_univpoly_ring.flags = 0; cl_heap_no_univpoly_ring_instance = new cl_heap_no_univpoly_ring(); new ((void *)&cl_no_univpoly_ring) cl_univpoly_ring(cl_heap_no_univpoly_ring_instance); } } cl_UP_no_ring_init_helper::~cl_UP_no_ring_init_helper() { if (--count == 0) { delete cl_heap_no_univpoly_ring_instance; } } } // namespace cln cln-1.3.3/src/numtheory/0000755000000000000000000000000012173046201011775 5ustar cln-1.3.3/src/numtheory/cl_nt_cornacchia4.cc0000644000000000000000000000603311201634740015645 0ustar // cornacchia4(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/numtheory.h" // Implementation. #include "integer/cl_I.h" namespace cln { // [Cohen], section 1.5.2, algorithm 1.5.3. // For proofs refer to [F. Morain, J.-L. Nicolas: On Cornacchia's algorithm // for solving the diophantine equation u^2+v*d^2=m]. const cornacchia_t cornacchia4 (const cl_I& d, const cl_I& p) { // Method: // Goal: Solve x^2+d*y^2 = 4*p. // If p=2: {0,1,4,...} + d*{0,1,4,...} = 8. // d=1: (x,y) = (2,2). // d=2: (x,y) = (0,2). // d=4: (x,y) = (2,1). // d=7: (x,y) = (1,1). // Else no solution. // If p>2: // If d == 0 mod 4: // x must be even. Solve u^2 + (d/4)*y^2 = p, return (2*u,y). // If d == 2 mod 4: // x must be even, then y must be even. Solve u^2 + d*v^2 = p, // return (2*u,2*v). // If d == 1,5,7 mod 8: // x^2+d*y^2 == 4 mod 8, x^2 and y^2 can only be == 0,1,4 mod 8. // x and y must be even. Solve u^2 + d*v^2 = p, return (2*u,2*v). // If d == 3 mod 8: // Compute x with x^2+d == 0 mod 4*p. // Euclidean algorithm on a = 2*p, b = x, stop when a remainder // <= 2*sqrt(p) has been reached. var cl_I p4 = p<<2; if (d >= p4) { if (d == p4) // (x,y) = (0,1) return cornacchia_t(1, 0,1); else // d > 4*p -> no solution return cornacchia_t(0); } // Now 0 < d < 4*p. if (p == 2) { if (d==1) return cornacchia_t(1, 2,2); if (d==2) return cornacchia_t(1, 0,2); if (d==4) return cornacchia_t(1, 2,1); if (d==7) return cornacchia_t(1, 1,1); return cornacchia_t(0); } switch (FN_to_V(logand(d,7))) { case 0: case 4: { // d == 0 mod 4 var cornacchia_t s = cornacchia1(d>>2,p); if (!s.condition) if (s.solutions != 0) s.solution_x = s.solution_x<<1; return s; } case 1: case 2: case 5: case 6: case 7: { var cornacchia_t s = cornacchia1(d,p); if (!s.condition) if (s.solutions != 0) { s.solution_x = s.solution_x<<1; s.solution_y = s.solution_y<<1; } return s; } case 3: break; } switch (jacobi(-d,p)) { case -1: // no solution return cornacchia_t(0); case 0: // gcd(d,p) > 1 return new cl_composite_condition(p,gcd(d,p)); case 1: break; } // Compute x with x^2+d == 0 mod p. var cl_modint_ring R = find_modint_ring(p); var sqrt_mod_p_t init = sqrt_mod_p(R,R->canonhom(-d)); if (init.condition) return init.condition; if (init.solutions != 2) throw runtime_exception(); // Compute x with x^2+d == 0 mod 4*p. var cl_I x0 = R->retract(init.solution[0]); if (evenp(x0)) { x0 = p-x0; } // Enforce x0^2+d == 0 mod 4. // Euclidean algorithm. var cl_I a = p<<1; var cl_I b = x0; var cl_I limit = isqrt(p4); while (b > limit) { var cl_I r = mod(a,b); a = b; b = r; } // b is the first euclidean remainder <= 2*sqrt(p). var cl_I& x = b; var cl_I_div_t div = floor2(p4-square(b),d); if (!zerop(div.remainder)) return cornacchia_t(0); var cl_I& c = div.quotient; var cl_I y; if (!sqrtp(c,&y)) return cornacchia_t(0); return cornacchia_t(1, x,y); } } // namespace cln cln-1.3.3/src/numtheory/cl_IF_trialdiv2.cc0000644000000000000000000000130311201634740015237 0ustar // cl_trialdivision(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "numtheory/cl_IF.h" // Implementation. #include "base/cl_low.h" namespace cln { uint32 cl_trialdivision (uint32 nhi, uint32 nlo, uint32 d1, uint32 d2) { var uintL i = cl_small_prime_table_search(d1); var const uint16 * ptr = &cl_small_prime_table[i]; var const uint16 * ptr_limit = &cl_small_prime_table[cl_small_prime_table_search(d2+1)]; for ( ; ptr < ptr_limit; ptr++) { var uint32 prime = *ptr; var uint32 hi; var uint32 r; hi = nhi % prime; // or: divu_3232_3232(nhi,prime,,hi=); divu_6432_3232(hi,nlo,prime,,r=); if (r == 0) return prime; } return 0; } } // namespace cln cln-1.3.3/src/numtheory/cl_nt_nextprobprime.cc0000644000000000000000000000070711201634740016367 0ustar // nextprobprime(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/numtheory.h" // Implementation. #include "cln/real.h" namespace cln { const cl_I nextprobprime (const cl_R& x) { if (minusp(x)) return 2; // Now x >= 0. var cl_I n = ceiling1(x); if (n <= 2) return 2; // Now n>=3. if (evenp(n)) n = n+1; // Now n>=3 odd. loop { if (isprobprime(n)) return n; n = n+2; } } } // namespace cln cln-1.3.3/src/numtheory/cl_IF_trialdiv1.cc0000644000000000000000000000117211201634740015242 0ustar // cl_trialdivision(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "numtheory/cl_IF.h" // Implementation. #include "base/cl_low.h" namespace cln { uint32 cl_trialdivision (uint32 n, uint32 d1, uint32 d2) { var uintL i = cl_small_prime_table_search(d1); var const uint16 * ptr = &cl_small_prime_table[i]; var const uint16 * ptr_limit = &cl_small_prime_table[cl_small_prime_table_search(d2+1)]; for ( ; ptr < ptr_limit; ptr++) { var uint32 prime = *ptr; var uint32 r; r = n % prime; // or: divu_3232_3232(n,prime,,r=); if (r == 0) return prime; } return 0; } } // namespace cln cln-1.3.3/src/numtheory/cl_nt_jacobi.cc0000644000000000000000000000274611201634740014725 0ustar // jacobi(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/numtheory.h" // Implementation. #include "cln/integer.h" #include "integer/cl_I.h" #include "cln/exception.h" #include "base/cl_xmacros.h" namespace cln { int jacobi (const cl_I& a, const cl_I& b) { // Check b > 0, b odd. if (!(b > 0)) throw runtime_exception(); if (!oddp(b)) throw runtime_exception(); { Mutable(cl_I,a); Mutable(cl_I,b); // Ensure 0 <= a < b. a = mod(a,b); // If a and b are fixnums, choose faster routine. if (fixnump(b)) return jacobi(FN_to_V(a),FN_to_V(b)); var int v = 1; for (;;) { // (a/b) * v is invariant. if (b == 1) // b=1 implies (a/b) = 1. return v; if (a == 0) // b>1 and a=0 imply (a/b) = 0. return 0; if (a > (b >> 1)) { // a > b/2, so (a/b) = (-1/b) * ((b-a)/b), // and (-1/b) = -1 if b==3 mod 4. a = b-a; if (FN_to_V(logand(b,3)) == 3) v = -v; continue; } if ((a & 1) == 0) { // b>1 and a=2a', so (a/b) = (2/b) * (a'/b), // and (2/b) = -1 if b==3,5 mod 8. a = a>>1; switch (FN_to_V(logand(b,7))) { case 3: case 5: v = -v; break; } continue; } // a and b odd, 0 < a < b/2 < b, so apply quadratic reciprocity // law (a/b) = (-1)^((a-1)/2)((b-1)/2) * (b/a). if (FN_to_V(logand(logand(a,b),3)) == 3) v = -v; swap(cl_I, a,b); // Now a > 2*b, set a := a mod b. if ((a >> 3) >= b) a = mod(a,b); else { a = a-b; do { a = a-b; } while (a >= b); } } }} } // namespace cln cln-1.3.3/src/numtheory/cl_IF_millerrabin.cc0000644000000000000000000000273111201634740015645 0ustar // cl_miller_rabin_test(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "numtheory/cl_IF.h" // Implementation. #include "cln/modinteger.h" namespace cln { bool cl_miller_rabin_test (const cl_I& n, int count, cl_I* factor) { // [Cohen], section 8.2, algorithm 8.2.2. var cl_modint_ring R = find_modint_ring(n); // Z/nZ var cl_I m = n-1; var uintC e = ord2(m); m = m>>e; // n-1 = 2^e*m var cl_MI one = R->one(); var cl_MI minusone = R->uminus(one); for (int i = 0; i < count; i++) { // Choosing aa small makes the expt_pos faster. var cl_I aa = (i == 0 ? (cl_I) 2 : i <= cl_small_prime_table_size ? (cl_I) (unsigned int) cl_small_prime_table[i-1] // small prime : 2+random_I(n-2)); // or random >=2, = n) break; // Now 1 < aa < n. var cl_MI a = R->canonhom(aa); var cl_MI b = R->expt_pos(a,m); // b = a^m if (b == one) goto passed; for (uintC s = e; s > 0; s--) { if (b == minusone) goto passed; var cl_MI new_b = R->square(b); if (new_b == one) { // (b-1)*(b+1) == 0 mod n, hence n not prime. if (factor) *factor = gcd(R->retract(b)-1,n); return false; } b = new_b; } // b = a^(2^e*m) = a^(n-1), but b != -1 mod n, hence n not prime. if (factor) { var cl_I g = gcd(aa,n); if (g > 1) *factor = g; else *factor = 0; } return false; passed: ; } return true; } } // namespace cln cln-1.3.3/src/numtheory/cl_nt_jacobi_low.cc0000644000000000000000000000303011201634740015571 0ustar // jacobi(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/numtheory.h" // Implementation. #include "cln/exception.h" #include "base/cl_xmacros.h" namespace cln { // Assume 0 <= a < b. inline int jacobi_aux (uintV a, uintV b) { var int v = 1; for (;;) { // (a/b) * v is invariant. if (b == 1) // b=1 implies (a/b) = 1. return v; if (a == 0) // b>1 and a=0 imply (a/b) = 0. return 0; if (a > (b >> 1)) { // a > b/2, so (a/b) = (-1/b) * ((b-a)/b), // and (-1/b) = -1 if b==3 mod 4. a = b-a; switch (b % 4) { case 1: break; case 3: v = -v; break; default: throw runtime_exception(); } continue; } if ((a & 1) == 0) { // b>1 and a=2a', so (a/b) = (2/b) * (a'/b), // and (2/b) = -1 if b==3,5 mod 8. a = a>>1; switch (b % 8) { case 1: case 7: break; case 3: case 5: v = -v; break; default: throw runtime_exception(); } continue; } // a and b odd, 0 < a < b/2 < b, so apply quadratic reciprocity // law (a/b) = (-1)^((a-1)/2)((b-1)/2) * (b/a). if ((a & b & 3) == 3) v = -v; swap(uintV, a,b); // Now a > 2*b, set a := a mod b. if ((a >> 3) >= b) a = a % b; else { a = a-b; do { a = a-b; } while (a >= b); } } } int jacobi (sintV a, sintV b) { // Check b > 0, b odd. if (!(b > 0)) throw runtime_exception(); if ((b & 1) == 0) throw runtime_exception(); // Ensure 0 <= a < b. if (a >= 0) a = (uintV)a % (uintV)b; else a = b-1-((uintV)(~a) % (uintV)b); return jacobi_aux(a,b); } } // namespace cln cln-1.3.3/src/numtheory/cl_nt_cornacchia1.cc0000644000000000000000000000716611201634740015652 0ustar // cornacchia1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/numtheory.h" // Implementation. #include "base/cl_xmacros.h" namespace cln { // [Cohen], section 1.5.2, algorithm 1.5.2. // For proofs refer to [F. Morain, J.-L. Nicolas: On Cornacchia's algorithm // for solving the diophantine equation u^2+v*d^2=m]. // Quick remark about the uniqueness of the solutions: // If (x,y) is a solution with x>=0, y>=0, then it is the only one, // except for d=1 where (x,y) and (y,x) are the only solutions. // Proof: // If d > 4: // Obviously 0 <= x <= sqrt(p), 0 <= y <= sqrt(p)/sqrt(d). // Assume two solutions (x1,y1) and (x2,y2). // Then (x1*y2-x2*y1)*(x1*y2+x2*y1) = x1^2*y2^2 - x2^2*y1^2 // = (x1^2+d*y1^2)*y2^2 - (x2^2+d*y2^2)*y1^2 = p*y2^2 - p*y1^2 // is divisible by p. But 0 < x1*y2+x2*y1 <= 2*p/sqrt(d) < p and // -p < -p/sqrt(d) <= x1*y2-x2*y1 <= p/sqrt(d) < p, hence x1*y2-x2*y1 = 0. // This means that (x1,y1) and (x2,y2) are linearly dependent over Q, hence // they must be equal. // If d <= 4: // The equation is equivalent to (x+sqrt(-d)*y)*(x-sqrt(-d)*y) = p, i.e. // a factorization of p in Q(sqrt(-d)). It is known that (for d=1 and d=4) // Q(sqrt(-1)) = Quot(Z[i]) has class number 1, and (for d=2) Q(sqrt(-2)) // has class number 1, and (for d=3) Q(sqrt(-3)) has class number 1. // Hence the prime factors of p in this number field are uniquely determined // up to units. // In the case d=2, the only units are {1,-1}, hence there are 4 solutions // in ZxZ, hence with the restrictions x>=0, y>=0, (x,y) is unique. // In the case d=1, the only units are {1,-1,i,-i}, hence there are 8 // solutions [4 if x=y], hence with the restrictions x>=0, y>=0, // (x,y) and (y,x) are the only nonnegative solutions. // The case d=4 is basically the same as d=1, with the restriction that y be // even. But since x and y cannot be both even in x^2+y^2=p, this forbids // swapping of x and y. Hence (x,y) is unique. // In the case d=3, the units are generated by e = (1+sqrt(-3))/2, hence // multiplication of x+sqrt(-3)*y or x-sqrt(-3)*y with e^k (k=0..5) gives // rise to 12 solutions. But since x and y have different parity and // e*(x+sqrt(-3)*y) = (x-3*y)/2 + sqrt(-3)*(x+y)/2, the values k=1,2,4,5 // give non-integral (x,y). Only 4 solutions remain in ZxZ, hence with the // restrictions x>=0, y>=0, (x,y) is unique. const cornacchia_t cornacchia1 (const cl_I& d, const cl_I& p) { if (d >= p) { if (d == p) // (x,y) = (0,1) return cornacchia_t(1, 0,1); else // d > p -> no solution return cornacchia_t(0); } // Now 0 < d < p. if (p == 2) // (x,y) = (1,1) return cornacchia_t(1, 1,1); switch (jacobi(-d,p)) { case -1: // no solution return cornacchia_t(0); case 0: // gcd(d,p) > 1 return new cl_composite_condition(p,gcd(d,p)); case 1: break; } // Compute x with x^2+d == 0 mod p. var cl_modint_ring R = find_modint_ring(p); var sqrt_mod_p_t init = sqrt_mod_p(R,R->canonhom(-d)); if (init.condition) return init.condition; if (init.solutions != 2) throw runtime_exception(); // Euclidean algorithm. var cl_I a = p; var cl_I b = R->retract(init.solution[0]); if (b <= (p>>1)) { b = p-b; } // Enforce p/2 < b < p var cl_I limit = isqrt(p); while (b > limit) { var cl_I r = mod(a,b); a = b; b = r; } // b is the first euclidean remainder <= sqrt(p). var cl_I& x = b; var cl_I_div_t div = floor2(p-square(b),d); if (!zerop(div.remainder)) return cornacchia_t(0); var cl_I& c = div.quotient; var cl_I y; if (!sqrtp(c,&y)) return cornacchia_t(0); return cornacchia_t(1, x,y); } } // namespace cln cln-1.3.3/src/numtheory/cl_IF.h0000644000000000000000000000331211201634740013123 0ustar // Integer factorization and primality testing. #ifndef _CL_IF_H #define _CL_IF_H #include "cln/number.h" #include "cln/integer.h" namespace cln { // Table of primes > 2, < 2^16 const uint32 cl_small_prime_table_limit = 65536; const int cl_small_prime_table_size = 6541; extern uint16 cl_small_prime_table[cl_small_prime_table_size]; // Given 0 < d <= cl_small_prime_table_limit, return the smallest index i // such that cl_small_prime_table[i] >= d. (Or i = cl_small_prime_table_size // if none exists.) inline uintL cl_small_prime_table_search (uint32 d) { var uintL i1 = 0; var uintL i2 = cl_small_prime_table_size; if (cl_small_prime_table[i1] >= d) return i1; loop { // Here i1 < i2 and // cl_small_prime_table[i1] < d <= cl_small_prime_table[i2]. var uintL i3 = floor(i1+i2,2); if (i3 == i1) // (i2-i1 == 1) ? return i2; if (cl_small_prime_table[i3] >= d) i2 = i3; else i1 = i3; } } // Trial division. // Divides n > 0 by the primes in the range d1 <= d <= d2 // (0 < d1 <= d2 <= min(isqrt(n),cl_small_prime_table_limit)) // and returns the divisor d if found, or 0 if no divisor found. extern uint32 cl_trialdivision (uint32 n, uint32 d1, uint32 d2); extern uint32 cl_trialdivision (uint32 nhi, uint32 nlo, uint32 d1, uint32 d2); extern uint32 cl_trialdivision (const cl_I& n, uint32 d1, uint32 d2); // Miller-Rabin compositeness test. // Performs count times the Miller-Rabin test on n > 1 odd. // Returns true if n looks like a prime (with error probability < 4^-count). // Returns false if n is definitely composite, and then sets factor = some // nontrivial factor or 0. extern bool cl_miller_rabin_test (const cl_I& n, int count, cl_I* factor); } // namespace cln #endif /* _CL_IF_H */ cln-1.3.3/src/numtheory/cl_IF_trialdiv.cc0000644000000000000000000000175711201634740015172 0ustar // cl_trialdivision(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "numtheory/cl_IF.h" // Implementation. #include "integer/cl_I.h" #if !(intDsize >= 16) #error "intDsize too small for trialdivision!" #endif namespace cln { uint32 cl_trialdivision (const cl_I& n, uint32 d1, uint32 d2) { var uintL i = cl_small_prime_table_search(d1); var const uint16 * ptr = &cl_small_prime_table[i]; var const uint16 * ptr_limit = &cl_small_prime_table[cl_small_prime_table_search(d2+1)]; // Unpack n. CL_ALLOCA_STACK; var const uintD* n_MSDptr; var uintC n_len; I_to_NDS_nocopy(n, n_MSDptr=,n_len=,,false,); if (mspref(n_MSDptr,0)==0) { msshrink(n_MSDptr); n_len--; } // Make room for a quotient. var uintD* q_MSDptr; num_stack_alloc(n_len,q_MSDptr=,); // Division loop. for ( ; ptr < ptr_limit; ptr++) { var uint32 prime = *ptr; var uintD r = divucopy_loop_msp(prime,n_MSDptr,q_MSDptr,n_len); if (r == 0) return prime; } return 0; } } // namespace cln cln-1.3.3/src/numtheory/cl_nt_sqrtmodp.cc0000644000000000000000000002325311522356752015355 0ustar // sqrt_mod_p(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/numtheory.h" // Implementation. #include "integer/cl_I.h" #include "cln/exception.h" #undef floor #include #define floor cln_floor // MacOS X does "#define _R 0x00040000L". Grr... #undef _R namespace cln { // Algorithm 1 (for very small p only): // Try different values. // Assume p is prime and a nonzero square in Z/pZ. static uint32 search_sqrt (uint32 p, uint32 a) { var uint32 x = 1; var uint32 x2 = 1; loop { // 0 < x <= p/2, x2 = x^2 mod p. if (x2 == a) return x; x2 += x; x++; x2 += x; if (x2 >= p) x2 -= p; } } // Algorithm 2 (for p > 2 only): // Cantor-Zassenhaus. // [Beth et al.: Computer Algebra, 1988, Kapitel 5.3.3.] // [Cohen, A Course in Computational Algebraic Number Theory, // Section 3.4.4., Algorithm 3.4.6.] // Input: R = Z/pZ with p>2, and a (nonzero square in R). static const sqrt_mod_p_t cantor_zassenhaus_sqrt (const cl_modint_ring& R, const cl_MI& a); // Compute in the polynomial ring R[X]/(X^2-a). struct pol2 { // A polynomial c0+c1*X mod (X^2-a) cl_MI c0; cl_MI c1; // Constructor. pol2 (const cl_MI& _c0, const cl_MI& _c1) : c0 (_c0), c1 (_c1) {} }; struct pol2ring { const cl_modint_ring& R; const cl_MI& a; const pol2 zero () { return pol2(R->zero(),R->zero()); } const pol2 one () { return pol2(R->one(),R->zero()); } const pol2 plus (const pol2& u, const pol2& v) { return pol2(u.c0+v.c0, u.c1+v.c1); } const pol2 minus (const pol2& u, const pol2& v) { return pol2(u.c0-v.c0, u.c1-v.c1); } const pol2 mul (const pol2& u, const pol2& v) { return pol2(u.c0*v.c0+u.c1*v.c1*a, u.c0*v.c1+u.c1*v.c0); } const pol2 square (const pol2& u) { return pol2(cln::square(u.c0) + cln::square(u.c1)*a, (u.c0*u.c1)<<1); } const pol2 expt_pos (const pol2& x, const cl_I& y) { // Right-Left Binary, [Cohen, Algorithm 1.2.1.] var pol2 a = x; var cl_I b = y; while (!oddp(b)) { a = square(a); b = b = b >> 1; } // a^b = x^y var pol2 c = a; until (eq(b,1)) { b = b >> 1; a = square(a); // a^b*c = x^y if (oddp(b)) c = mul(a,c); } return c; } const pol2 random () { return pol2(R->random(),R->random()); } // Computes the degree of gcd(u(X),X^2-a) and, if it is 1, // also the zero if this polynomial of degree 1. struct gcd_result { cl_composite_condition* condition; int gcd_degree; cl_MI solution; // Constructors. gcd_result (cl_composite_condition* c) : condition (c) {} gcd_result (int deg) : condition (NULL), gcd_degree (deg) {} gcd_result (int deg, const cl_MI& sol) : condition (NULL), gcd_degree (deg), solution (sol) {} }; const gcd_result gcd (const pol2& u) { if (zerop(u.c1)) // constant polynomial u(X) if (zerop(u.c0)) return gcd_result(2); else return gcd_result(0); // u(X) = c0 + c1*X has zero -c0/c1. var cl_MI_x c1inv = R->recip(u.c1); if (c1inv.condition) return c1inv.condition; var cl_MI z = -u.c0*c1inv; if (cln::square(z) == a) return gcd_result(1,z); else return gcd_result(0); } // Constructor. pol2ring (const cl_modint_ring& _R, const cl_MI& _a) : R (_R), a (_a) {} }; static const sqrt_mod_p_t cantor_zassenhaus_sqrt (const cl_modint_ring& R, const cl_MI& a) { var pol2ring PR = pol2ring(R,a); var cl_I& p = R->modulus; // Assuming p is a prime, then R[X]/(X^2-a) is the direct product of // two rings R[X]/(X-sqrt(a)), each being isomorphic to R. Thus taking // a (p-1)/2-th power in this ring will return one of (0,+1,-1) in // each ring, with independent probabilities (1/p, (p-1)/2p, (p-1)/2p). // For any polynomial u(X), setting v(X) := u(X)^((p-1)/2) yields // gcd(u(X),X^2-a) * gcd(v(X)-1,X^2-a) * gcd(v(X)+1,X^2-a) = X^2-a. // If p is not prime, all of these gcd's are likely to be 1. var cl_I e = (p-1) >> 1; loop { // Choose a random polynomial u(X) in the ring. var pol2 u = PR.random(); // Compute v(X) = u(X)^((p-1)/2). var pol2 v = PR.expt_pos(u,e); // Compute the three gcds. var pol2ring::gcd_result g1 = PR.gcd(PR.minus(v,PR.one())); if (g1.condition) return g1.condition; if (g1.gcd_degree == 1) return sqrt_mod_p_t(2,g1.solution,-g1.solution); if (g1.gcd_degree == 2) continue; var pol2ring::gcd_result g2 = PR.gcd(PR.plus(v,PR.one())); if (g2.condition) return g2.condition; if (g2.gcd_degree == 1) return sqrt_mod_p_t(2,g2.solution,-g2.solution); if (g2.gcd_degree == 2) continue; var pol2ring::gcd_result g3 = PR.gcd(u); if (g3.condition) return g3.condition; if (g3.gcd_degree == 1) return sqrt_mod_p_t(2,g3.solution,-g3.solution); if (g1.gcd_degree + g2.gcd_degree + g3.gcd_degree < 2) // If the sum of the degrees of the gcd is != 2, // p cannot be prime. return new cl_composite_condition(p); } } #if defined(__GNUC__) && defined(__s390__) && (__GNUC__ == 2) // Workaround GCC-bug (see below) struct cl_sylow2gen_property : public cl_property { SUBCLASS_cl_property(); public: cl_I h_rep; // Constructor. cl_sylow2gen_property (const cl_symbol& k, const cl_MI& h) : cl_property (k), h_rep (h.rep) {} }; #endif // Algorithm 3 (for p > 2 only): // Tonelli-Shanks. // [Cohen, A Course in Computational Algebraic Number Theory, // Section 1.5.1., Algorithm 1.5.1.] static const sqrt_mod_p_t tonelli_shanks_sqrt (const cl_modint_ring& R, const cl_MI& a) { // Idea: // Write p-1 = 2^e*m, m odd. G = (Z/pZ)^* (cyclic of order p-1) has // subgroups G_0 < G_1 < ... < G_e, G_j of order 2^j. (G_e is called // the "2-Sylow subgroup" of G.) More precisely // G_j = { x in (Z/pZ)^* : x^(2^j) = 1 }, // G/G_j = { x^(2^j) : x in (Z/pZ)^* }. // We compute the square root of a first in G/G_e, then lift it to // G/G_(e-1), etc., up to G/G_0. // Start with b = a^((m+1)/2), then (a^-1*b^2)^(2^e) = 1, i.e. // a = b^2 in G/G_e. // Lifting from G/G_j to G/G_(j-1) is easy: Assume a = b^2 in G/G_j. // If a = b^2 in G/G_(j-1), then nothing needs to be done. Else // a^-1*b^2 is in G_j \ G_(j-1). If j=e, a^-1*b^2 is a non-square // mod p, hence a is a non-square as well, contradiction. If jmodulus; var uintC e = ord2(p-1); var cl_I m = (p-1) >> e; // p-1 = 2^e*m, m odd. // We will have the invariant c = a^-1*b^2 in G/G_j. var uintC j = e; // Initialize b = a^((m+1)/2), c = a^m, but avoid to divide by a. var cl_MI c = R->expt_pos(a,(m-1)>>1); var cl_MI b = R->mul(a,c); c = R->mul(b,c); // Find h in G_e \ G_(e-1): h = h'^m, where h' is any non-square. var cl_MI h; if (e==1) h = - R->one(); else { // Since this computation is a bit costly, we cache its result // on the ring's property list. static const cl_symbol key = (cl_symbol)(cl_string)"generator of 2-Sylow subgroup of (Z/pZ)^*"; #if !(defined(__GNUC__) && defined(__s390__) && (__GNUC__ == 2)) // Workaround GCC-bug (see above) struct cl_sylow2gen_property : public cl_property { SUBCLASS_cl_property(); public: cl_I h_rep; // Constructor. cl_sylow2gen_property (const cl_symbol& k, const cl_MI& h) : cl_property (k), h_rep (h.rep) {} }; #endif var cl_sylow2gen_property* prop = (cl_sylow2gen_property*) R->get_property(key); if (prop) h = cl_MI(R,prop->h_rep); else { do { h = R->random(); } until (jacobi(R->retract(h),p) == -1); h = R->expt_pos(h,m); R->add_property(new cl_sylow2gen_property(key,h)); } } do { // Now c = a^-1*b^2 in G_j, h in G_j \ G_(j-1). // Determine the smallest i such that c in G_i. var uintC i = 0; var cl_MI ci = c; // c_i = c^(2^i) for ( ; i < j; i++, ci = R->square(ci)) if (ci == R->one()) break; if (i==j) // Some problem: if j=e, a non-square, if j 0; count--) h = R->square(h); // Now h in G_(i+1) \ G_i. b = R->mul(b,h); h = R->square(h); c = R->mul(c,h); // Now c = a^-1*b^2 in G_(i-1), h in G_i \ G_(i-1). j = i; } while (j > 0); if (R->square(b) != a) // Problem again. return new cl_composite_condition(p); return sqrt_mod_p_t(2,b,-b); } // Break-Even-Points (on a i486 with 33 MHz): // Algorithm 1 fastest for p < 1500..2000 // Algorithm 3 generally fastest for p > 2000. // But the running time of algorithm 3 is proportional to e^2. // For large e, algorithm 2 becomes faster. // l=50 bits: for e >= 40 // l=100 bits: for e >= 55 // l=200 bits: for e >= 80 // l=400 bits: for e >= 130 // in general something like e > l/(log(l)/(2*log(2))-1). const sqrt_mod_p_t sqrt_mod_p (const cl_modint_ring& R, const cl_MI& a) { if (!(a.ring() == R)) throw runtime_exception(); var cl_I& p = R->modulus; var cl_I aa = R->retract(a); switch (jacobi(aa,p)) { case -1: // no solution return sqrt_mod_p_t(0); case 0: // gcd(aa,p) > 1 if (zerop(a)) // one solution return sqrt_mod_p_t(1,a); else // found factor of p return new cl_composite_condition(p,gcd(aa,p)); case 1: // two solutions break; } if (p < 2000) { // Algorithm 1. var cl_I x1 = search_sqrt(cl_I_to_UL(p),cl_I_to_UL(aa)); var cl_I x2 = p-x1; if (x1==x2) // can only happen when p = 2 return sqrt_mod_p_t(1,R->canonhom(x1)); else return sqrt_mod_p_t(2,R->canonhom(x1),R->canonhom(x2)); } var uintC l = integer_length(p); var uintC e = ord2(p-1); //if (e > 30 && e > l/(::log((double)l)*0.72-1)) if (e > 30 && e > l/(::log((double)l)*0.92-2.41)) // Algorithm 2. return cantor_zassenhaus_sqrt(R,a); else // Algorithm 3. return tonelli_shanks_sqrt(R,a); } } // namespace cln cln-1.3.3/src/numtheory/cl_nt_isprobprime.cc0000644000000000000000000000331411201634740016021 0ustar // isprobprime(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/numtheory.h" // Implementation. #include "numtheory/cl_IF.h" #include "cln/integer_io.h" #include "cln/exception.h" #include namespace cln { bool isprobprime (const cl_I& n) { if (!(n > 0)) { std::ostringstream buf; fprint(buf, n); fprint(buf, " is not a positive integer."); throw runtime_exception(buf.str()); } // With a Miller-Rabin count = 50 the final error probability is // 4^-50 < 10^-30. var int count = 50; // Step 1: Trial division (rules out 87% of all numbers quickly). const uint32 trialdivide_limit = 70; var uintC l = integer_length(n); if (l <= 32) { var uint32 nn = cl_I_to_UL(n); if (nn <= cl_small_prime_table_limit) { // Table lookup. var uintL i = cl_small_prime_table_search(nn); if (i < cl_small_prime_table_size && ((unsigned int) cl_small_prime_table[i] == nn || nn == 2)) return true; else return false; } if ((nn % 2) == 0 || cl_trialdivision(nn,1,trialdivide_limit)) return false; // For small n, only few Miller-Rabin tests are needed. if (nn < 2000U) count = 1; // {2} else if (nn < 1300000U) count = 2; // {2,3} else if (nn < 25000000U) count = 3; // {2,3,5} else if (nn < 3200000000U) count = 4; // {2,3,5,7} } else if (l <= 64) { var uint32 nhi = cl_I_to_UL(ldb(n,cl_byte(32,32))); var uint32 nlo = cl_I_to_UL(ldb(n,cl_byte(32,0))); if ((nlo % 2) == 0 || cl_trialdivision(nhi,nlo,1,trialdivide_limit)) return false; } else { if (evenp(n) || cl_trialdivision(n,1,trialdivide_limit)) return false; } // Step 2: Miller-Rabin test. return cl_miller_rabin_test(n,count,NULL); } } // namespace cln cln-1.3.3/src/numtheory/cl_IF_smallprimes.cc0000644000000000000000000013435611201634740015706 0ustar // cl_small_prime_table. // General includes. #include "base/cl_sysdep.h" // Specification. #include "numtheory/cl_IF.h" // Implementation. namespace cln { uint16 cl_small_prime_table[cl_small_prime_table_size] = { 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, 10009, 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, 10103, 10111, 10133, 10139, 10141, 10151, 10159, 10163, 10169, 10177, 10181, 10193, 10211, 10223, 10243, 10247, 10253, 10259, 10267, 10271, 10273, 10289, 10301, 10303, 10313, 10321, 10331, 10333, 10337, 10343, 10357, 10369, 10391, 10399, 10427, 10429, 10433, 10453, 10457, 10459, 10463, 10477, 10487, 10499, 10501, 10513, 10529, 10531, 10559, 10567, 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, 10651, 10657, 10663, 10667, 10687, 10691, 10709, 10711, 10723, 10729, 10733, 10739, 10753, 10771, 10781, 10789, 10799, 10831, 10837, 10847, 10853, 10859, 10861, 10867, 10883, 10889, 10891, 10903, 10909, 10937, 10939, 10949, 10957, 10973, 10979, 10987, 10993, 11003, 11027, 11047, 11057, 11059, 11069, 11071, 11083, 11087, 11093, 11113, 11117, 11119, 11131, 11149, 11159, 11161, 11171, 11173, 11177, 11197, 11213, 11239, 11243, 11251, 11257, 11261, 11273, 11279, 11287, 11299, 11311, 11317, 11321, 11329, 11351, 11353, 11369, 11383, 11393, 11399, 11411, 11423, 11437, 11443, 11447, 11467, 11471, 11483, 11489, 11491, 11497, 11503, 11519, 11527, 11549, 11551, 11579, 11587, 11593, 11597, 11617, 11621, 11633, 11657, 11677, 11681, 11689, 11699, 11701, 11717, 11719, 11731, 11743, 11777, 11779, 11783, 11789, 11801, 11807, 11813, 11821, 11827, 11831, 11833, 11839, 11863, 11867, 11887, 11897, 11903, 11909, 11923, 11927, 11933, 11939, 11941, 11953, 11959, 11969, 11971, 11981, 11987, 12007, 12011, 12037, 12041, 12043, 12049, 12071, 12073, 12097, 12101, 12107, 12109, 12113, 12119, 12143, 12149, 12157, 12161, 12163, 12197, 12203, 12211, 12227, 12239, 12241, 12251, 12253, 12263, 12269, 12277, 12281, 12289, 12301, 12323, 12329, 12343, 12347, 12373, 12377, 12379, 12391, 12401, 12409, 12413, 12421, 12433, 12437, 12451, 12457, 12473, 12479, 12487, 12491, 12497, 12503, 12511, 12517, 12527, 12539, 12541, 12547, 12553, 12569, 12577, 12583, 12589, 12601, 12611, 12613, 12619, 12637, 12641, 12647, 12653, 12659, 12671, 12689, 12697, 12703, 12713, 12721, 12739, 12743, 12757, 12763, 12781, 12791, 12799, 12809, 12821, 12823, 12829, 12841, 12853, 12889, 12893, 12899, 12907, 12911, 12917, 12919, 12923, 12941, 12953, 12959, 12967, 12973, 12979, 12983, 13001, 13003, 13007, 13009, 13033, 13037, 13043, 13049, 13063, 13093, 13099, 13103, 13109, 13121, 13127, 13147, 13151, 13159, 13163, 13171, 13177, 13183, 13187, 13217, 13219, 13229, 13241, 13249, 13259, 13267, 13291, 13297, 13309, 13313, 13327, 13331, 13337, 13339, 13367, 13381, 13397, 13399, 13411, 13417, 13421, 13441, 13451, 13457, 13463, 13469, 13477, 13487, 13499, 13513, 13523, 13537, 13553, 13567, 13577, 13591, 13597, 13613, 13619, 13627, 13633, 13649, 13669, 13679, 13681, 13687, 13691, 13693, 13697, 13709, 13711, 13721, 13723, 13729, 13751, 13757, 13759, 13763, 13781, 13789, 13799, 13807, 13829, 13831, 13841, 13859, 13873, 13877, 13879, 13883, 13901, 13903, 13907, 13913, 13921, 13931, 13933, 13963, 13967, 13997, 13999, 14009, 14011, 14029, 14033, 14051, 14057, 14071, 14081, 14083, 14087, 14107, 14143, 14149, 14153, 14159, 14173, 14177, 14197, 14207, 14221, 14243, 14249, 14251, 14281, 14293, 14303, 14321, 14323, 14327, 14341, 14347, 14369, 14387, 14389, 14401, 14407, 14411, 14419, 14423, 14431, 14437, 14447, 14449, 14461, 14479, 14489, 14503, 14519, 14533, 14537, 14543, 14549, 14551, 14557, 14561, 14563, 14591, 14593, 14621, 14627, 14629, 14633, 14639, 14653, 14657, 14669, 14683, 14699, 14713, 14717, 14723, 14731, 14737, 14741, 14747, 14753, 14759, 14767, 14771, 14779, 14783, 14797, 14813, 14821, 14827, 14831, 14843, 14851, 14867, 14869, 14879, 14887, 14891, 14897, 14923, 14929, 14939, 14947, 14951, 14957, 14969, 14983, 15013, 15017, 15031, 15053, 15061, 15073, 15077, 15083, 15091, 15101, 15107, 15121, 15131, 15137, 15139, 15149, 15161, 15173, 15187, 15193, 15199, 15217, 15227, 15233, 15241, 15259, 15263, 15269, 15271, 15277, 15287, 15289, 15299, 15307, 15313, 15319, 15329, 15331, 15349, 15359, 15361, 15373, 15377, 15383, 15391, 15401, 15413, 15427, 15439, 15443, 15451, 15461, 15467, 15473, 15493, 15497, 15511, 15527, 15541, 15551, 15559, 15569, 15581, 15583, 15601, 15607, 15619, 15629, 15641, 15643, 15647, 15649, 15661, 15667, 15671, 15679, 15683, 15727, 15731, 15733, 15737, 15739, 15749, 15761, 15767, 15773, 15787, 15791, 15797, 15803, 15809, 15817, 15823, 15859, 15877, 15881, 15887, 15889, 15901, 15907, 15913, 15919, 15923, 15937, 15959, 15971, 15973, 15991, 16001, 16007, 16033, 16057, 16061, 16063, 16067, 16069, 16073, 16087, 16091, 16097, 16103, 16111, 16127, 16139, 16141, 16183, 16187, 16189, 16193, 16217, 16223, 16229, 16231, 16249, 16253, 16267, 16273, 16301, 16319, 16333, 16339, 16349, 16361, 16363, 16369, 16381, 16411, 16417, 16421, 16427, 16433, 16447, 16451, 16453, 16477, 16481, 16487, 16493, 16519, 16529, 16547, 16553, 16561, 16567, 16573, 16603, 16607, 16619, 16631, 16633, 16649, 16651, 16657, 16661, 16673, 16691, 16693, 16699, 16703, 16729, 16741, 16747, 16759, 16763, 16787, 16811, 16823, 16829, 16831, 16843, 16871, 16879, 16883, 16889, 16901, 16903, 16921, 16927, 16931, 16937, 16943, 16963, 16979, 16981, 16987, 16993, 17011, 17021, 17027, 17029, 17033, 17041, 17047, 17053, 17077, 17093, 17099, 17107, 17117, 17123, 17137, 17159, 17167, 17183, 17189, 17191, 17203, 17207, 17209, 17231, 17239, 17257, 17291, 17293, 17299, 17317, 17321, 17327, 17333, 17341, 17351, 17359, 17377, 17383, 17387, 17389, 17393, 17401, 17417, 17419, 17431, 17443, 17449, 17467, 17471, 17477, 17483, 17489, 17491, 17497, 17509, 17519, 17539, 17551, 17569, 17573, 17579, 17581, 17597, 17599, 17609, 17623, 17627, 17657, 17659, 17669, 17681, 17683, 17707, 17713, 17729, 17737, 17747, 17749, 17761, 17783, 17789, 17791, 17807, 17827, 17837, 17839, 17851, 17863, 17881, 17891, 17903, 17909, 17911, 17921, 17923, 17929, 17939, 17957, 17959, 17971, 17977, 17981, 17987, 17989, 18013, 18041, 18043, 18047, 18049, 18059, 18061, 18077, 18089, 18097, 18119, 18121, 18127, 18131, 18133, 18143, 18149, 18169, 18181, 18191, 18199, 18211, 18217, 18223, 18229, 18233, 18251, 18253, 18257, 18269, 18287, 18289, 18301, 18307, 18311, 18313, 18329, 18341, 18353, 18367, 18371, 18379, 18397, 18401, 18413, 18427, 18433, 18439, 18443, 18451, 18457, 18461, 18481, 18493, 18503, 18517, 18521, 18523, 18539, 18541, 18553, 18583, 18587, 18593, 18617, 18637, 18661, 18671, 18679, 18691, 18701, 18713, 18719, 18731, 18743, 18749, 18757, 18773, 18787, 18793, 18797, 18803, 18839, 18859, 18869, 18899, 18911, 18913, 18917, 18919, 18947, 18959, 18973, 18979, 19001, 19009, 19013, 19031, 19037, 19051, 19069, 19073, 19079, 19081, 19087, 19121, 19139, 19141, 19157, 19163, 19181, 19183, 19207, 19211, 19213, 19219, 19231, 19237, 19249, 19259, 19267, 19273, 19289, 19301, 19309, 19319, 19333, 19373, 19379, 19381, 19387, 19391, 19403, 19417, 19421, 19423, 19427, 19429, 19433, 19441, 19447, 19457, 19463, 19469, 19471, 19477, 19483, 19489, 19501, 19507, 19531, 19541, 19543, 19553, 19559, 19571, 19577, 19583, 19597, 19603, 19609, 19661, 19681, 19687, 19697, 19699, 19709, 19717, 19727, 19739, 19751, 19753, 19759, 19763, 19777, 19793, 19801, 19813, 19819, 19841, 19843, 19853, 19861, 19867, 19889, 19891, 19913, 19919, 19927, 19937, 19949, 19961, 19963, 19973, 19979, 19991, 19993, 19997, 20011, 20021, 20023, 20029, 20047, 20051, 20063, 20071, 20089, 20101, 20107, 20113, 20117, 20123, 20129, 20143, 20147, 20149, 20161, 20173, 20177, 20183, 20201, 20219, 20231, 20233, 20249, 20261, 20269, 20287, 20297, 20323, 20327, 20333, 20341, 20347, 20353, 20357, 20359, 20369, 20389, 20393, 20399, 20407, 20411, 20431, 20441, 20443, 20477, 20479, 20483, 20507, 20509, 20521, 20533, 20543, 20549, 20551, 20563, 20593, 20599, 20611, 20627, 20639, 20641, 20663, 20681, 20693, 20707, 20717, 20719, 20731, 20743, 20747, 20749, 20753, 20759, 20771, 20773, 20789, 20807, 20809, 20849, 20857, 20873, 20879, 20887, 20897, 20899, 20903, 20921, 20929, 20939, 20947, 20959, 20963, 20981, 20983, 21001, 21011, 21013, 21017, 21019, 21023, 21031, 21059, 21061, 21067, 21089, 21101, 21107, 21121, 21139, 21143, 21149, 21157, 21163, 21169, 21179, 21187, 21191, 21193, 21211, 21221, 21227, 21247, 21269, 21277, 21283, 21313, 21317, 21319, 21323, 21341, 21347, 21377, 21379, 21383, 21391, 21397, 21401, 21407, 21419, 21433, 21467, 21481, 21487, 21491, 21493, 21499, 21503, 21517, 21521, 21523, 21529, 21557, 21559, 21563, 21569, 21577, 21587, 21589, 21599, 21601, 21611, 21613, 21617, 21647, 21649, 21661, 21673, 21683, 21701, 21713, 21727, 21737, 21739, 21751, 21757, 21767, 21773, 21787, 21799, 21803, 21817, 21821, 21839, 21841, 21851, 21859, 21863, 21871, 21881, 21893, 21911, 21929, 21937, 21943, 21961, 21977, 21991, 21997, 22003, 22013, 22027, 22031, 22037, 22039, 22051, 22063, 22067, 22073, 22079, 22091, 22093, 22109, 22111, 22123, 22129, 22133, 22147, 22153, 22157, 22159, 22171, 22189, 22193, 22229, 22247, 22259, 22271, 22273, 22277, 22279, 22283, 22291, 22303, 22307, 22343, 22349, 22367, 22369, 22381, 22391, 22397, 22409, 22433, 22441, 22447, 22453, 22469, 22481, 22483, 22501, 22511, 22531, 22541, 22543, 22549, 22567, 22571, 22573, 22613, 22619, 22621, 22637, 22639, 22643, 22651, 22669, 22679, 22691, 22697, 22699, 22709, 22717, 22721, 22727, 22739, 22741, 22751, 22769, 22777, 22783, 22787, 22807, 22811, 22817, 22853, 22859, 22861, 22871, 22877, 22901, 22907, 22921, 22937, 22943, 22961, 22963, 22973, 22993, 23003, 23011, 23017, 23021, 23027, 23029, 23039, 23041, 23053, 23057, 23059, 23063, 23071, 23081, 23087, 23099, 23117, 23131, 23143, 23159, 23167, 23173, 23189, 23197, 23201, 23203, 23209, 23227, 23251, 23269, 23279, 23291, 23293, 23297, 23311, 23321, 23327, 23333, 23339, 23357, 23369, 23371, 23399, 23417, 23431, 23447, 23459, 23473, 23497, 23509, 23531, 23537, 23539, 23549, 23557, 23561, 23563, 23567, 23581, 23593, 23599, 23603, 23609, 23623, 23627, 23629, 23633, 23663, 23669, 23671, 23677, 23687, 23689, 23719, 23741, 23743, 23747, 23753, 23761, 23767, 23773, 23789, 23801, 23813, 23819, 23827, 23831, 23833, 23857, 23869, 23873, 23879, 23887, 23893, 23899, 23909, 23911, 23917, 23929, 23957, 23971, 23977, 23981, 23993, 24001, 24007, 24019, 24023, 24029, 24043, 24049, 24061, 24071, 24077, 24083, 24091, 24097, 24103, 24107, 24109, 24113, 24121, 24133, 24137, 24151, 24169, 24179, 24181, 24197, 24203, 24223, 24229, 24239, 24247, 24251, 24281, 24317, 24329, 24337, 24359, 24371, 24373, 24379, 24391, 24407, 24413, 24419, 24421, 24439, 24443, 24469, 24473, 24481, 24499, 24509, 24517, 24527, 24533, 24547, 24551, 24571, 24593, 24611, 24623, 24631, 24659, 24671, 24677, 24683, 24691, 24697, 24709, 24733, 24749, 24763, 24767, 24781, 24793, 24799, 24809, 24821, 24841, 24847, 24851, 24859, 24877, 24889, 24907, 24917, 24919, 24923, 24943, 24953, 24967, 24971, 24977, 24979, 24989, 25013, 25031, 25033, 25037, 25057, 25073, 25087, 25097, 25111, 25117, 25121, 25127, 25147, 25153, 25163, 25169, 25171, 25183, 25189, 25219, 25229, 25237, 25243, 25247, 25253, 25261, 25301, 25303, 25307, 25309, 25321, 25339, 25343, 25349, 25357, 25367, 25373, 25391, 25409, 25411, 25423, 25439, 25447, 25453, 25457, 25463, 25469, 25471, 25523, 25537, 25541, 25561, 25577, 25579, 25583, 25589, 25601, 25603, 25609, 25621, 25633, 25639, 25643, 25657, 25667, 25673, 25679, 25693, 25703, 25717, 25733, 25741, 25747, 25759, 25763, 25771, 25793, 25799, 25801, 25819, 25841, 25847, 25849, 25867, 25873, 25889, 25903, 25913, 25919, 25931, 25933, 25939, 25943, 25951, 25969, 25981, 25997, 25999, 26003, 26017, 26021, 26029, 26041, 26053, 26083, 26099, 26107, 26111, 26113, 26119, 26141, 26153, 26161, 26171, 26177, 26183, 26189, 26203, 26209, 26227, 26237, 26249, 26251, 26261, 26263, 26267, 26293, 26297, 26309, 26317, 26321, 26339, 26347, 26357, 26371, 26387, 26393, 26399, 26407, 26417, 26423, 26431, 26437, 26449, 26459, 26479, 26489, 26497, 26501, 26513, 26539, 26557, 26561, 26573, 26591, 26597, 26627, 26633, 26641, 26647, 26669, 26681, 26683, 26687, 26693, 26699, 26701, 26711, 26713, 26717, 26723, 26729, 26731, 26737, 26759, 26777, 26783, 26801, 26813, 26821, 26833, 26839, 26849, 26861, 26863, 26879, 26881, 26891, 26893, 26903, 26921, 26927, 26947, 26951, 26953, 26959, 26981, 26987, 26993, 27011, 27017, 27031, 27043, 27059, 27061, 27067, 27073, 27077, 27091, 27103, 27107, 27109, 27127, 27143, 27179, 27191, 27197, 27211, 27239, 27241, 27253, 27259, 27271, 27277, 27281, 27283, 27299, 27329, 27337, 27361, 27367, 27397, 27407, 27409, 27427, 27431, 27437, 27449, 27457, 27479, 27481, 27487, 27509, 27527, 27529, 27539, 27541, 27551, 27581, 27583, 27611, 27617, 27631, 27647, 27653, 27673, 27689, 27691, 27697, 27701, 27733, 27737, 27739, 27743, 27749, 27751, 27763, 27767, 27773, 27779, 27791, 27793, 27799, 27803, 27809, 27817, 27823, 27827, 27847, 27851, 27883, 27893, 27901, 27917, 27919, 27941, 27943, 27947, 27953, 27961, 27967, 27983, 27997, 28001, 28019, 28027, 28031, 28051, 28057, 28069, 28081, 28087, 28097, 28099, 28109, 28111, 28123, 28151, 28163, 28181, 28183, 28201, 28211, 28219, 28229, 28277, 28279, 28283, 28289, 28297, 28307, 28309, 28319, 28349, 28351, 28387, 28393, 28403, 28409, 28411, 28429, 28433, 28439, 28447, 28463, 28477, 28493, 28499, 28513, 28517, 28537, 28541, 28547, 28549, 28559, 28571, 28573, 28579, 28591, 28597, 28603, 28607, 28619, 28621, 28627, 28631, 28643, 28649, 28657, 28661, 28663, 28669, 28687, 28697, 28703, 28711, 28723, 28729, 28751, 28753, 28759, 28771, 28789, 28793, 28807, 28813, 28817, 28837, 28843, 28859, 28867, 28871, 28879, 28901, 28909, 28921, 28927, 28933, 28949, 28961, 28979, 29009, 29017, 29021, 29023, 29027, 29033, 29059, 29063, 29077, 29101, 29123, 29129, 29131, 29137, 29147, 29153, 29167, 29173, 29179, 29191, 29201, 29207, 29209, 29221, 29231, 29243, 29251, 29269, 29287, 29297, 29303, 29311, 29327, 29333, 29339, 29347, 29363, 29383, 29387, 29389, 29399, 29401, 29411, 29423, 29429, 29437, 29443, 29453, 29473, 29483, 29501, 29527, 29531, 29537, 29567, 29569, 29573, 29581, 29587, 29599, 29611, 29629, 29633, 29641, 29663, 29669, 29671, 29683, 29717, 29723, 29741, 29753, 29759, 29761, 29789, 29803, 29819, 29833, 29837, 29851, 29863, 29867, 29873, 29879, 29881, 29917, 29921, 29927, 29947, 29959, 29983, 29989, 30011, 30013, 30029, 30047, 30059, 30071, 30089, 30091, 30097, 30103, 30109, 30113, 30119, 30133, 30137, 30139, 30161, 30169, 30181, 30187, 30197, 30203, 30211, 30223, 30241, 30253, 30259, 30269, 30271, 30293, 30307, 30313, 30319, 30323, 30341, 30347, 30367, 30389, 30391, 30403, 30427, 30431, 30449, 30467, 30469, 30491, 30493, 30497, 30509, 30517, 30529, 30539, 30553, 30557, 30559, 30577, 30593, 30631, 30637, 30643, 30649, 30661, 30671, 30677, 30689, 30697, 30703, 30707, 30713, 30727, 30757, 30763, 30773, 30781, 30803, 30809, 30817, 30829, 30839, 30841, 30851, 30853, 30859, 30869, 30871, 30881, 30893, 30911, 30931, 30937, 30941, 30949, 30971, 30977, 30983, 31013, 31019, 31033, 31039, 31051, 31063, 31069, 31079, 31081, 31091, 31121, 31123, 31139, 31147, 31151, 31153, 31159, 31177, 31181, 31183, 31189, 31193, 31219, 31223, 31231, 31237, 31247, 31249, 31253, 31259, 31267, 31271, 31277, 31307, 31319, 31321, 31327, 31333, 31337, 31357, 31379, 31387, 31391, 31393, 31397, 31469, 31477, 31481, 31489, 31511, 31513, 31517, 31531, 31541, 31543, 31547, 31567, 31573, 31583, 31601, 31607, 31627, 31643, 31649, 31657, 31663, 31667, 31687, 31699, 31721, 31723, 31727, 31729, 31741, 31751, 31769, 31771, 31793, 31799, 31817, 31847, 31849, 31859, 31873, 31883, 31891, 31907, 31957, 31963, 31973, 31981, 31991, 32003, 32009, 32027, 32029, 32051, 32057, 32059, 32063, 32069, 32077, 32083, 32089, 32099, 32117, 32119, 32141, 32143, 32159, 32173, 32183, 32189, 32191, 32203, 32213, 32233, 32237, 32251, 32257, 32261, 32297, 32299, 32303, 32309, 32321, 32323, 32327, 32341, 32353, 32359, 32363, 32369, 32371, 32377, 32381, 32401, 32411, 32413, 32423, 32429, 32441, 32443, 32467, 32479, 32491, 32497, 32503, 32507, 32531, 32533, 32537, 32561, 32563, 32569, 32573, 32579, 32587, 32603, 32609, 32611, 32621, 32633, 32647, 32653, 32687, 32693, 32707, 32713, 32717, 32719, 32749, 32771, 32779, 32783, 32789, 32797, 32801, 32803, 32831, 32833, 32839, 32843, 32869, 32887, 32909, 32911, 32917, 32933, 32939, 32941, 32957, 32969, 32971, 32983, 32987, 32993, 32999, 33013, 33023, 33029, 33037, 33049, 33053, 33071, 33073, 33083, 33091, 33107, 33113, 33119, 33149, 33151, 33161, 33179, 33181, 33191, 33199, 33203, 33211, 33223, 33247, 33287, 33289, 33301, 33311, 33317, 33329, 33331, 33343, 33347, 33349, 33353, 33359, 33377, 33391, 33403, 33409, 33413, 33427, 33457, 33461, 33469, 33479, 33487, 33493, 33503, 33521, 33529, 33533, 33547, 33563, 33569, 33577, 33581, 33587, 33589, 33599, 33601, 33613, 33617, 33619, 33623, 33629, 33637, 33641, 33647, 33679, 33703, 33713, 33721, 33739, 33749, 33751, 33757, 33767, 33769, 33773, 33791, 33797, 33809, 33811, 33827, 33829, 33851, 33857, 33863, 33871, 33889, 33893, 33911, 33923, 33931, 33937, 33941, 33961, 33967, 33997, 34019, 34031, 34033, 34039, 34057, 34061, 34123, 34127, 34129, 34141, 34147, 34157, 34159, 34171, 34183, 34211, 34213, 34217, 34231, 34253, 34259, 34261, 34267, 34273, 34283, 34297, 34301, 34303, 34313, 34319, 34327, 34337, 34351, 34361, 34367, 34369, 34381, 34403, 34421, 34429, 34439, 34457, 34469, 34471, 34483, 34487, 34499, 34501, 34511, 34513, 34519, 34537, 34543, 34549, 34583, 34589, 34591, 34603, 34607, 34613, 34631, 34649, 34651, 34667, 34673, 34679, 34687, 34693, 34703, 34721, 34729, 34739, 34747, 34757, 34759, 34763, 34781, 34807, 34819, 34841, 34843, 34847, 34849, 34871, 34877, 34883, 34897, 34913, 34919, 34939, 34949, 34961, 34963, 34981, 35023, 35027, 35051, 35053, 35059, 35069, 35081, 35083, 35089, 35099, 35107, 35111, 35117, 35129, 35141, 35149, 35153, 35159, 35171, 35201, 35221, 35227, 35251, 35257, 35267, 35279, 35281, 35291, 35311, 35317, 35323, 35327, 35339, 35353, 35363, 35381, 35393, 35401, 35407, 35419, 35423, 35437, 35447, 35449, 35461, 35491, 35507, 35509, 35521, 35527, 35531, 35533, 35537, 35543, 35569, 35573, 35591, 35593, 35597, 35603, 35617, 35671, 35677, 35729, 35731, 35747, 35753, 35759, 35771, 35797, 35801, 35803, 35809, 35831, 35837, 35839, 35851, 35863, 35869, 35879, 35897, 35899, 35911, 35923, 35933, 35951, 35963, 35969, 35977, 35983, 35993, 35999, 36007, 36011, 36013, 36017, 36037, 36061, 36067, 36073, 36083, 36097, 36107, 36109, 36131, 36137, 36151, 36161, 36187, 36191, 36209, 36217, 36229, 36241, 36251, 36263, 36269, 36277, 36293, 36299, 36307, 36313, 36319, 36341, 36343, 36353, 36373, 36383, 36389, 36433, 36451, 36457, 36467, 36469, 36473, 36479, 36493, 36497, 36523, 36527, 36529, 36541, 36551, 36559, 36563, 36571, 36583, 36587, 36599, 36607, 36629, 36637, 36643, 36653, 36671, 36677, 36683, 36691, 36697, 36709, 36713, 36721, 36739, 36749, 36761, 36767, 36779, 36781, 36787, 36791, 36793, 36809, 36821, 36833, 36847, 36857, 36871, 36877, 36887, 36899, 36901, 36913, 36919, 36923, 36929, 36931, 36943, 36947, 36973, 36979, 36997, 37003, 37013, 37019, 37021, 37039, 37049, 37057, 37061, 37087, 37097, 37117, 37123, 37139, 37159, 37171, 37181, 37189, 37199, 37201, 37217, 37223, 37243, 37253, 37273, 37277, 37307, 37309, 37313, 37321, 37337, 37339, 37357, 37361, 37363, 37369, 37379, 37397, 37409, 37423, 37441, 37447, 37463, 37483, 37489, 37493, 37501, 37507, 37511, 37517, 37529, 37537, 37547, 37549, 37561, 37567, 37571, 37573, 37579, 37589, 37591, 37607, 37619, 37633, 37643, 37649, 37657, 37663, 37691, 37693, 37699, 37717, 37747, 37781, 37783, 37799, 37811, 37813, 37831, 37847, 37853, 37861, 37871, 37879, 37889, 37897, 37907, 37951, 37957, 37963, 37967, 37987, 37991, 37993, 37997, 38011, 38039, 38047, 38053, 38069, 38083, 38113, 38119, 38149, 38153, 38167, 38177, 38183, 38189, 38197, 38201, 38219, 38231, 38237, 38239, 38261, 38273, 38281, 38287, 38299, 38303, 38317, 38321, 38327, 38329, 38333, 38351, 38371, 38377, 38393, 38431, 38447, 38449, 38453, 38459, 38461, 38501, 38543, 38557, 38561, 38567, 38569, 38593, 38603, 38609, 38611, 38629, 38639, 38651, 38653, 38669, 38671, 38677, 38693, 38699, 38707, 38711, 38713, 38723, 38729, 38737, 38747, 38749, 38767, 38783, 38791, 38803, 38821, 38833, 38839, 38851, 38861, 38867, 38873, 38891, 38903, 38917, 38921, 38923, 38933, 38953, 38959, 38971, 38977, 38993, 39019, 39023, 39041, 39043, 39047, 39079, 39089, 39097, 39103, 39107, 39113, 39119, 39133, 39139, 39157, 39161, 39163, 39181, 39191, 39199, 39209, 39217, 39227, 39229, 39233, 39239, 39241, 39251, 39293, 39301, 39313, 39317, 39323, 39341, 39343, 39359, 39367, 39371, 39373, 39383, 39397, 39409, 39419, 39439, 39443, 39451, 39461, 39499, 39503, 39509, 39511, 39521, 39541, 39551, 39563, 39569, 39581, 39607, 39619, 39623, 39631, 39659, 39667, 39671, 39679, 39703, 39709, 39719, 39727, 39733, 39749, 39761, 39769, 39779, 39791, 39799, 39821, 39827, 39829, 39839, 39841, 39847, 39857, 39863, 39869, 39877, 39883, 39887, 39901, 39929, 39937, 39953, 39971, 39979, 39983, 39989, 40009, 40013, 40031, 40037, 40039, 40063, 40087, 40093, 40099, 40111, 40123, 40127, 40129, 40151, 40153, 40163, 40169, 40177, 40189, 40193, 40213, 40231, 40237, 40241, 40253, 40277, 40283, 40289, 40343, 40351, 40357, 40361, 40387, 40423, 40427, 40429, 40433, 40459, 40471, 40483, 40487, 40493, 40499, 40507, 40519, 40529, 40531, 40543, 40559, 40577, 40583, 40591, 40597, 40609, 40627, 40637, 40639, 40693, 40697, 40699, 40709, 40739, 40751, 40759, 40763, 40771, 40787, 40801, 40813, 40819, 40823, 40829, 40841, 40847, 40849, 40853, 40867, 40879, 40883, 40897, 40903, 40927, 40933, 40939, 40949, 40961, 40973, 40993, 41011, 41017, 41023, 41039, 41047, 41051, 41057, 41077, 41081, 41113, 41117, 41131, 41141, 41143, 41149, 41161, 41177, 41179, 41183, 41189, 41201, 41203, 41213, 41221, 41227, 41231, 41233, 41243, 41257, 41263, 41269, 41281, 41299, 41333, 41341, 41351, 41357, 41381, 41387, 41389, 41399, 41411, 41413, 41443, 41453, 41467, 41479, 41491, 41507, 41513, 41519, 41521, 41539, 41543, 41549, 41579, 41593, 41597, 41603, 41609, 41611, 41617, 41621, 41627, 41641, 41647, 41651, 41659, 41669, 41681, 41687, 41719, 41729, 41737, 41759, 41761, 41771, 41777, 41801, 41809, 41813, 41843, 41849, 41851, 41863, 41879, 41887, 41893, 41897, 41903, 41911, 41927, 41941, 41947, 41953, 41957, 41959, 41969, 41981, 41983, 41999, 42013, 42017, 42019, 42023, 42043, 42061, 42071, 42073, 42083, 42089, 42101, 42131, 42139, 42157, 42169, 42179, 42181, 42187, 42193, 42197, 42209, 42221, 42223, 42227, 42239, 42257, 42281, 42283, 42293, 42299, 42307, 42323, 42331, 42337, 42349, 42359, 42373, 42379, 42391, 42397, 42403, 42407, 42409, 42433, 42437, 42443, 42451, 42457, 42461, 42463, 42467, 42473, 42487, 42491, 42499, 42509, 42533, 42557, 42569, 42571, 42577, 42589, 42611, 42641, 42643, 42649, 42667, 42677, 42683, 42689, 42697, 42701, 42703, 42709, 42719, 42727, 42737, 42743, 42751, 42767, 42773, 42787, 42793, 42797, 42821, 42829, 42839, 42841, 42853, 42859, 42863, 42899, 42901, 42923, 42929, 42937, 42943, 42953, 42961, 42967, 42979, 42989, 43003, 43013, 43019, 43037, 43049, 43051, 43063, 43067, 43093, 43103, 43117, 43133, 43151, 43159, 43177, 43189, 43201, 43207, 43223, 43237, 43261, 43271, 43283, 43291, 43313, 43319, 43321, 43331, 43391, 43397, 43399, 43403, 43411, 43427, 43441, 43451, 43457, 43481, 43487, 43499, 43517, 43541, 43543, 43573, 43577, 43579, 43591, 43597, 43607, 43609, 43613, 43627, 43633, 43649, 43651, 43661, 43669, 43691, 43711, 43717, 43721, 43753, 43759, 43777, 43781, 43783, 43787, 43789, 43793, 43801, 43853, 43867, 43889, 43891, 43913, 43933, 43943, 43951, 43961, 43963, 43969, 43973, 43987, 43991, 43997, 44017, 44021, 44027, 44029, 44041, 44053, 44059, 44071, 44087, 44089, 44101, 44111, 44119, 44123, 44129, 44131, 44159, 44171, 44179, 44189, 44201, 44203, 44207, 44221, 44249, 44257, 44263, 44267, 44269, 44273, 44279, 44281, 44293, 44351, 44357, 44371, 44381, 44383, 44389, 44417, 44449, 44453, 44483, 44491, 44497, 44501, 44507, 44519, 44531, 44533, 44537, 44543, 44549, 44563, 44579, 44587, 44617, 44621, 44623, 44633, 44641, 44647, 44651, 44657, 44683, 44687, 44699, 44701, 44711, 44729, 44741, 44753, 44771, 44773, 44777, 44789, 44797, 44809, 44819, 44839, 44843, 44851, 44867, 44879, 44887, 44893, 44909, 44917, 44927, 44939, 44953, 44959, 44963, 44971, 44983, 44987, 45007, 45013, 45053, 45061, 45077, 45083, 45119, 45121, 45127, 45131, 45137, 45139, 45161, 45179, 45181, 45191, 45197, 45233, 45247, 45259, 45263, 45281, 45289, 45293, 45307, 45317, 45319, 45329, 45337, 45341, 45343, 45361, 45377, 45389, 45403, 45413, 45427, 45433, 45439, 45481, 45491, 45497, 45503, 45523, 45533, 45541, 45553, 45557, 45569, 45587, 45589, 45599, 45613, 45631, 45641, 45659, 45667, 45673, 45677, 45691, 45697, 45707, 45737, 45751, 45757, 45763, 45767, 45779, 45817, 45821, 45823, 45827, 45833, 45841, 45853, 45863, 45869, 45887, 45893, 45943, 45949, 45953, 45959, 45971, 45979, 45989, 46021, 46027, 46049, 46051, 46061, 46073, 46091, 46093, 46099, 46103, 46133, 46141, 46147, 46153, 46171, 46181, 46183, 46187, 46199, 46219, 46229, 46237, 46261, 46271, 46273, 46279, 46301, 46307, 46309, 46327, 46337, 46349, 46351, 46381, 46399, 46411, 46439, 46441, 46447, 46451, 46457, 46471, 46477, 46489, 46499, 46507, 46511, 46523, 46549, 46559, 46567, 46573, 46589, 46591, 46601, 46619, 46633, 46639, 46643, 46649, 46663, 46679, 46681, 46687, 46691, 46703, 46723, 46727, 46747, 46751, 46757, 46769, 46771, 46807, 46811, 46817, 46819, 46829, 46831, 46853, 46861, 46867, 46877, 46889, 46901, 46919, 46933, 46957, 46993, 46997, 47017, 47041, 47051, 47057, 47059, 47087, 47093, 47111, 47119, 47123, 47129, 47137, 47143, 47147, 47149, 47161, 47189, 47207, 47221, 47237, 47251, 47269, 47279, 47287, 47293, 47297, 47303, 47309, 47317, 47339, 47351, 47353, 47363, 47381, 47387, 47389, 47407, 47417, 47419, 47431, 47441, 47459, 47491, 47497, 47501, 47507, 47513, 47521, 47527, 47533, 47543, 47563, 47569, 47581, 47591, 47599, 47609, 47623, 47629, 47639, 47653, 47657, 47659, 47681, 47699, 47701, 47711, 47713, 47717, 47737, 47741, 47743, 47777, 47779, 47791, 47797, 47807, 47809, 47819, 47837, 47843, 47857, 47869, 47881, 47903, 47911, 47917, 47933, 47939, 47947, 47951, 47963, 47969, 47977, 47981, 48017, 48023, 48029, 48049, 48073, 48079, 48091, 48109, 48119, 48121, 48131, 48157, 48163, 48179, 48187, 48193, 48197, 48221, 48239, 48247, 48259, 48271, 48281, 48299, 48311, 48313, 48337, 48341, 48353, 48371, 48383, 48397, 48407, 48409, 48413, 48437, 48449, 48463, 48473, 48479, 48481, 48487, 48491, 48497, 48523, 48527, 48533, 48539, 48541, 48563, 48571, 48589, 48593, 48611, 48619, 48623, 48647, 48649, 48661, 48673, 48677, 48679, 48731, 48733, 48751, 48757, 48761, 48767, 48779, 48781, 48787, 48799, 48809, 48817, 48821, 48823, 48847, 48857, 48859, 48869, 48871, 48883, 48889, 48907, 48947, 48953, 48973, 48989, 48991, 49003, 49009, 49019, 49031, 49033, 49037, 49043, 49057, 49069, 49081, 49103, 49109, 49117, 49121, 49123, 49139, 49157, 49169, 49171, 49177, 49193, 49199, 49201, 49207, 49211, 49223, 49253, 49261, 49277, 49279, 49297, 49307, 49331, 49333, 49339, 49363, 49367, 49369, 49391, 49393, 49409, 49411, 49417, 49429, 49433, 49451, 49459, 49463, 49477, 49481, 49499, 49523, 49529, 49531, 49537, 49547, 49549, 49559, 49597, 49603, 49613, 49627, 49633, 49639, 49663, 49667, 49669, 49681, 49697, 49711, 49727, 49739, 49741, 49747, 49757, 49783, 49787, 49789, 49801, 49807, 49811, 49823, 49831, 49843, 49853, 49871, 49877, 49891, 49919, 49921, 49927, 49937, 49939, 49943, 49957, 49991, 49993, 49999, 50021, 50023, 50033, 50047, 50051, 50053, 50069, 50077, 50087, 50093, 50101, 50111, 50119, 50123, 50129, 50131, 50147, 50153, 50159, 50177, 50207, 50221, 50227, 50231, 50261, 50263, 50273, 50287, 50291, 50311, 50321, 50329, 50333, 50341, 50359, 50363, 50377, 50383, 50387, 50411, 50417, 50423, 50441, 50459, 50461, 50497, 50503, 50513, 50527, 50539, 50543, 50549, 50551, 50581, 50587, 50591, 50593, 50599, 50627, 50647, 50651, 50671, 50683, 50707, 50723, 50741, 50753, 50767, 50773, 50777, 50789, 50821, 50833, 50839, 50849, 50857, 50867, 50873, 50891, 50893, 50909, 50923, 50929, 50951, 50957, 50969, 50971, 50989, 50993, 51001, 51031, 51043, 51047, 51059, 51061, 51071, 51109, 51131, 51133, 51137, 51151, 51157, 51169, 51193, 51197, 51199, 51203, 51217, 51229, 51239, 51241, 51257, 51263, 51283, 51287, 51307, 51329, 51341, 51343, 51347, 51349, 51361, 51383, 51407, 51413, 51419, 51421, 51427, 51431, 51437, 51439, 51449, 51461, 51473, 51479, 51481, 51487, 51503, 51511, 51517, 51521, 51539, 51551, 51563, 51577, 51581, 51593, 51599, 51607, 51613, 51631, 51637, 51647, 51659, 51673, 51679, 51683, 51691, 51713, 51719, 51721, 51749, 51767, 51769, 51787, 51797, 51803, 51817, 51827, 51829, 51839, 51853, 51859, 51869, 51871, 51893, 51899, 51907, 51913, 51929, 51941, 51949, 51971, 51973, 51977, 51991, 52009, 52021, 52027, 52051, 52057, 52067, 52069, 52081, 52103, 52121, 52127, 52147, 52153, 52163, 52177, 52181, 52183, 52189, 52201, 52223, 52237, 52249, 52253, 52259, 52267, 52289, 52291, 52301, 52313, 52321, 52361, 52363, 52369, 52379, 52387, 52391, 52433, 52453, 52457, 52489, 52501, 52511, 52517, 52529, 52541, 52543, 52553, 52561, 52567, 52571, 52579, 52583, 52609, 52627, 52631, 52639, 52667, 52673, 52691, 52697, 52709, 52711, 52721, 52727, 52733, 52747, 52757, 52769, 52783, 52807, 52813, 52817, 52837, 52859, 52861, 52879, 52883, 52889, 52901, 52903, 52919, 52937, 52951, 52957, 52963, 52967, 52973, 52981, 52999, 53003, 53017, 53047, 53051, 53069, 53077, 53087, 53089, 53093, 53101, 53113, 53117, 53129, 53147, 53149, 53161, 53171, 53173, 53189, 53197, 53201, 53231, 53233, 53239, 53267, 53269, 53279, 53281, 53299, 53309, 53323, 53327, 53353, 53359, 53377, 53381, 53401, 53407, 53411, 53419, 53437, 53441, 53453, 53479, 53503, 53507, 53527, 53549, 53551, 53569, 53591, 53593, 53597, 53609, 53611, 53617, 53623, 53629, 53633, 53639, 53653, 53657, 53681, 53693, 53699, 53717, 53719, 53731, 53759, 53773, 53777, 53783, 53791, 53813, 53819, 53831, 53849, 53857, 53861, 53881, 53887, 53891, 53897, 53899, 53917, 53923, 53927, 53939, 53951, 53959, 53987, 53993, 54001, 54011, 54013, 54037, 54049, 54059, 54083, 54091, 54101, 54121, 54133, 54139, 54151, 54163, 54167, 54181, 54193, 54217, 54251, 54269, 54277, 54287, 54293, 54311, 54319, 54323, 54331, 54347, 54361, 54367, 54371, 54377, 54401, 54403, 54409, 54413, 54419, 54421, 54437, 54443, 54449, 54469, 54493, 54497, 54499, 54503, 54517, 54521, 54539, 54541, 54547, 54559, 54563, 54577, 54581, 54583, 54601, 54617, 54623, 54629, 54631, 54647, 54667, 54673, 54679, 54709, 54713, 54721, 54727, 54751, 54767, 54773, 54779, 54787, 54799, 54829, 54833, 54851, 54869, 54877, 54881, 54907, 54917, 54919, 54941, 54949, 54959, 54973, 54979, 54983, 55001, 55009, 55021, 55049, 55051, 55057, 55061, 55073, 55079, 55103, 55109, 55117, 55127, 55147, 55163, 55171, 55201, 55207, 55213, 55217, 55219, 55229, 55243, 55249, 55259, 55291, 55313, 55331, 55333, 55337, 55339, 55343, 55351, 55373, 55381, 55399, 55411, 55439, 55441, 55457, 55469, 55487, 55501, 55511, 55529, 55541, 55547, 55579, 55589, 55603, 55609, 55619, 55621, 55631, 55633, 55639, 55661, 55663, 55667, 55673, 55681, 55691, 55697, 55711, 55717, 55721, 55733, 55763, 55787, 55793, 55799, 55807, 55813, 55817, 55819, 55823, 55829, 55837, 55843, 55849, 55871, 55889, 55897, 55901, 55903, 55921, 55927, 55931, 55933, 55949, 55967, 55987, 55997, 56003, 56009, 56039, 56041, 56053, 56081, 56087, 56093, 56099, 56101, 56113, 56123, 56131, 56149, 56167, 56171, 56179, 56197, 56207, 56209, 56237, 56239, 56249, 56263, 56267, 56269, 56299, 56311, 56333, 56359, 56369, 56377, 56383, 56393, 56401, 56417, 56431, 56437, 56443, 56453, 56467, 56473, 56477, 56479, 56489, 56501, 56503, 56509, 56519, 56527, 56531, 56533, 56543, 56569, 56591, 56597, 56599, 56611, 56629, 56633, 56659, 56663, 56671, 56681, 56687, 56701, 56711, 56713, 56731, 56737, 56747, 56767, 56773, 56779, 56783, 56807, 56809, 56813, 56821, 56827, 56843, 56857, 56873, 56891, 56893, 56897, 56909, 56911, 56921, 56923, 56929, 56941, 56951, 56957, 56963, 56983, 56989, 56993, 56999, 57037, 57041, 57047, 57059, 57073, 57077, 57089, 57097, 57107, 57119, 57131, 57139, 57143, 57149, 57163, 57173, 57179, 57191, 57193, 57203, 57221, 57223, 57241, 57251, 57259, 57269, 57271, 57283, 57287, 57301, 57329, 57331, 57347, 57349, 57367, 57373, 57383, 57389, 57397, 57413, 57427, 57457, 57467, 57487, 57493, 57503, 57527, 57529, 57557, 57559, 57571, 57587, 57593, 57601, 57637, 57641, 57649, 57653, 57667, 57679, 57689, 57697, 57709, 57713, 57719, 57727, 57731, 57737, 57751, 57773, 57781, 57787, 57791, 57793, 57803, 57809, 57829, 57839, 57847, 57853, 57859, 57881, 57899, 57901, 57917, 57923, 57943, 57947, 57973, 57977, 57991, 58013, 58027, 58031, 58043, 58049, 58057, 58061, 58067, 58073, 58099, 58109, 58111, 58129, 58147, 58151, 58153, 58169, 58171, 58189, 58193, 58199, 58207, 58211, 58217, 58229, 58231, 58237, 58243, 58271, 58309, 58313, 58321, 58337, 58363, 58367, 58369, 58379, 58391, 58393, 58403, 58411, 58417, 58427, 58439, 58441, 58451, 58453, 58477, 58481, 58511, 58537, 58543, 58549, 58567, 58573, 58579, 58601, 58603, 58613, 58631, 58657, 58661, 58679, 58687, 58693, 58699, 58711, 58727, 58733, 58741, 58757, 58763, 58771, 58787, 58789, 58831, 58889, 58897, 58901, 58907, 58909, 58913, 58921, 58937, 58943, 58963, 58967, 58979, 58991, 58997, 59009, 59011, 59021, 59023, 59029, 59051, 59053, 59063, 59069, 59077, 59083, 59093, 59107, 59113, 59119, 59123, 59141, 59149, 59159, 59167, 59183, 59197, 59207, 59209, 59219, 59221, 59233, 59239, 59243, 59263, 59273, 59281, 59333, 59341, 59351, 59357, 59359, 59369, 59377, 59387, 59393, 59399, 59407, 59417, 59419, 59441, 59443, 59447, 59453, 59467, 59471, 59473, 59497, 59509, 59513, 59539, 59557, 59561, 59567, 59581, 59611, 59617, 59621, 59627, 59629, 59651, 59659, 59663, 59669, 59671, 59693, 59699, 59707, 59723, 59729, 59743, 59747, 59753, 59771, 59779, 59791, 59797, 59809, 59833, 59863, 59879, 59887, 59921, 59929, 59951, 59957, 59971, 59981, 59999, 60013, 60017, 60029, 60037, 60041, 60077, 60083, 60089, 60091, 60101, 60103, 60107, 60127, 60133, 60139, 60149, 60161, 60167, 60169, 60209, 60217, 60223, 60251, 60257, 60259, 60271, 60289, 60293, 60317, 60331, 60337, 60343, 60353, 60373, 60383, 60397, 60413, 60427, 60443, 60449, 60457, 60493, 60497, 60509, 60521, 60527, 60539, 60589, 60601, 60607, 60611, 60617, 60623, 60631, 60637, 60647, 60649, 60659, 60661, 60679, 60689, 60703, 60719, 60727, 60733, 60737, 60757, 60761, 60763, 60773, 60779, 60793, 60811, 60821, 60859, 60869, 60887, 60889, 60899, 60901, 60913, 60917, 60919, 60923, 60937, 60943, 60953, 60961, 61001, 61007, 61027, 61031, 61043, 61051, 61057, 61091, 61099, 61121, 61129, 61141, 61151, 61153, 61169, 61211, 61223, 61231, 61253, 61261, 61283, 61291, 61297, 61331, 61333, 61339, 61343, 61357, 61363, 61379, 61381, 61403, 61409, 61417, 61441, 61463, 61469, 61471, 61483, 61487, 61493, 61507, 61511, 61519, 61543, 61547, 61553, 61559, 61561, 61583, 61603, 61609, 61613, 61627, 61631, 61637, 61643, 61651, 61657, 61667, 61673, 61681, 61687, 61703, 61717, 61723, 61729, 61751, 61757, 61781, 61813, 61819, 61837, 61843, 61861, 61871, 61879, 61909, 61927, 61933, 61949, 61961, 61967, 61979, 61981, 61987, 61991, 62003, 62011, 62017, 62039, 62047, 62053, 62057, 62071, 62081, 62099, 62119, 62129, 62131, 62137, 62141, 62143, 62171, 62189, 62191, 62201, 62207, 62213, 62219, 62233, 62273, 62297, 62299, 62303, 62311, 62323, 62327, 62347, 62351, 62383, 62401, 62417, 62423, 62459, 62467, 62473, 62477, 62483, 62497, 62501, 62507, 62533, 62539, 62549, 62563, 62581, 62591, 62597, 62603, 62617, 62627, 62633, 62639, 62653, 62659, 62683, 62687, 62701, 62723, 62731, 62743, 62753, 62761, 62773, 62791, 62801, 62819, 62827, 62851, 62861, 62869, 62873, 62897, 62903, 62921, 62927, 62929, 62939, 62969, 62971, 62981, 62983, 62987, 62989, 63029, 63031, 63059, 63067, 63073, 63079, 63097, 63103, 63113, 63127, 63131, 63149, 63179, 63197, 63199, 63211, 63241, 63247, 63277, 63281, 63299, 63311, 63313, 63317, 63331, 63337, 63347, 63353, 63361, 63367, 63377, 63389, 63391, 63397, 63409, 63419, 63421, 63439, 63443, 63463, 63467, 63473, 63487, 63493, 63499, 63521, 63527, 63533, 63541, 63559, 63577, 63587, 63589, 63599, 63601, 63607, 63611, 63617, 63629, 63647, 63649, 63659, 63667, 63671, 63689, 63691, 63697, 63703, 63709, 63719, 63727, 63737, 63743, 63761, 63773, 63781, 63793, 63799, 63803, 63809, 63823, 63839, 63841, 63853, 63857, 63863, 63901, 63907, 63913, 63929, 63949, 63977, 63997, 64007, 64013, 64019, 64033, 64037, 64063, 64067, 64081, 64091, 64109, 64123, 64151, 64153, 64157, 64171, 64187, 64189, 64217, 64223, 64231, 64237, 64271, 64279, 64283, 64301, 64303, 64319, 64327, 64333, 64373, 64381, 64399, 64403, 64433, 64439, 64451, 64453, 64483, 64489, 64499, 64513, 64553, 64567, 64577, 64579, 64591, 64601, 64609, 64613, 64621, 64627, 64633, 64661, 64663, 64667, 64679, 64693, 64709, 64717, 64747, 64763, 64781, 64783, 64793, 64811, 64817, 64849, 64853, 64871, 64877, 64879, 64891, 64901, 64919, 64921, 64927, 64937, 64951, 64969, 64997, 65003, 65011, 65027, 65029, 65033, 65053, 65063, 65071, 65089, 65099, 65101, 65111, 65119, 65123, 65129, 65141, 65147, 65167, 65171, 65173, 65179, 65183, 65203, 65213, 65239, 65257, 65267, 65269, 65287, 65293, 65309, 65323, 65327, 65353, 65357, 65371, 65381, 65393, 65407, 65413, 65419, 65423, 65437, 65447, 65449, 65479, 65497, 65519, 65521, }; } // namespace cln cln-1.3.3/src/rational/0000755000000000000000000000000012173046201011554 5ustar cln-1.3.3/src/rational/algebraic/0000755000000000000000000000000012173046201013465 5ustar cln-1.3.3/src/rational/algebraic/cl_RA_sqrtp.cc0000644000000000000000000000152111201634740016206 0ustar // sqrtp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { bool sqrtp (const cl_RA& x, cl_RA* w) { // Methode: // Bei Integers: klar. // Bei Brüchen a/b : muß a=c^2 und b=d^2 sein. Dann ist die Wurzel = c/d // (mit ggT(c,d)=1 und d>1). if (integerp(x)) { DeclareType(cl_I,x); return sqrtp(x,(cl_I*)w); } else { // x ist Ratio DeclareType(cl_RT,x); var const cl_I& b = denominator(x); var cl_I d; if (!sqrtp(b,&d)) // Nenner auf Quadratzahl testen return false; var const cl_I& a = numerator(x); var cl_I c; if (!sqrtp(a,&c)) // Zähler auf Quadratzahl testen return false; // beides Quadratzahlen -> Quotient der Wurzeln bilden *w = I_I_to_RT(c,d); return true; }} } // namespace cln cln-1.3.3/src/rational/algebraic/cl_RA_rootp_I.cc0000644000000000000000000000154611201634740016457 0ustar // rootp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { bool rootp (const cl_RA& x, const cl_I& n, cl_RA* w) { // Methode: // Bei Integers: klar. // Bei Brüchen a/b : muß a=c^n und b=d^n sein. Dann ist die Wurzel = c/d // (mit ggT(c,d)=1 und d>1). if (integerp(x)) { DeclareType(cl_I,x); return rootp(x,n,(cl_I*)w); } else { // x ist Ratio DeclareType(cl_RT,x); var const cl_I& b = denominator(x); var cl_I d; if (!rootp(b,n,&d)) // Nenner auf n-te Potenz testen return false; var const cl_I& a = numerator(x); var cl_I c; if (!rootp(a,n,&c)) // Zähler auf n-te Potenz testen return false; // beides n-te Potenzen -> Quotient der Wurzeln bilden *w = I_I_to_RT(c,d); return true; }} } // namespace cln cln-1.3.3/src/rational/algebraic/cl_RA_rootp.cc0000644000000000000000000000154011201634740016201 0ustar // rootp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { bool rootp (const cl_RA& x, uintL n, cl_RA* w) { // Methode: // Bei Integers: klar. // Bei Brüchen a/b : muß a=c^n und b=d^n sein. Dann ist die Wurzel = c/d // (mit ggT(c,d)=1 und d>1). if (integerp(x)) { DeclareType(cl_I,x); return rootp(x,n,(cl_I*)w); } else { // x ist Ratio DeclareType(cl_RT,x); var const cl_I& b = denominator(x); var cl_I d; if (!rootp(b,n,&d)) // Nenner auf n-te Potenz testen return false; var const cl_I& a = numerator(x); var cl_I c; if (!rootp(a,n,&c)) // Zähler auf n-te Potenz testen return false; // beides n-te Potenzen -> Quotient der Wurzeln bilden *w = I_I_to_RT(c,d); return true; }} } // namespace cln cln-1.3.3/src/rational/ring/0000755000000000000000000000000012173046201012513 5ustar cln-1.3.3/src/rational/ring/cl_RA_ring.cc0000644000000000000000000000765111201634740015034 0ustar // Ring of rational numbers. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational_ring.h" // Implementation. #include "cln/rational.h" #include "cln/rational_io.h" #define zerop zerop_inline #include "rational/cl_RA.h" #undef zerop namespace cln { static void RA_fprint (cl_heap_ring* R, std::ostream& stream, const _cl_ring_element& x) { unused R; fprint(stream,The(cl_RA)(x)); } static bool RA_equal (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { unused R; return equal(The(cl_RA)(x),The(cl_RA)(y)); } static const _cl_ring_element RA_zero (cl_heap_ring* R) { return _cl_ring_element(R, (cl_RA)0); } static bool CL_FLATTEN RA_zerop (cl_heap_ring* R, const _cl_ring_element& x) { unused R; return zerop_inline(The(cl_RA)(x)); } static const _cl_ring_element RA_plus (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { return _cl_ring_element(R, The(cl_RA)(x) + The(cl_RA)(y)); } static const _cl_ring_element RA_minus (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { return _cl_ring_element(R, The(cl_RA)(x) - The(cl_RA)(y)); } static const _cl_ring_element RA_uminus (cl_heap_ring* R, const _cl_ring_element& x) { return _cl_ring_element(R, - The(cl_RA)(x)); } static const _cl_ring_element RA_one (cl_heap_ring* R) { return _cl_ring_element(R, (cl_RA)1); } static const _cl_ring_element RA_canonhom (cl_heap_ring* R, const cl_I& x) { return _cl_ring_element(R, (cl_RA)x); } static const _cl_ring_element RA_mul (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { return _cl_ring_element(R, The(cl_RA)(x) * The(cl_RA)(y)); } static const _cl_ring_element RA_square (cl_heap_ring* R, const _cl_ring_element& x) { return _cl_ring_element(R, square(The(cl_RA)(x))); } static const _cl_ring_element RA_expt_pos (cl_heap_ring* R, const _cl_ring_element& x, const cl_I& y) { return _cl_ring_element(R, expt_pos(The(cl_RA)(x),y)); } static bool cl_RA_p (const cl_number& x) { return (!x.pointer_p() ? x.nonpointer_tag() == cl_FN_tag : (x.pointer_type()->flags & cl_class_flags_subclass_rational) != 0); } static cl_ring_setops RA_setops = { RA_fprint, RA_equal }; static cl_ring_addops RA_addops = { RA_zero, RA_zerop, RA_plus, RA_minus, RA_uminus }; static cl_ring_mulops RA_mulops = { RA_one, RA_canonhom, RA_mul, RA_square, RA_expt_pos }; static cl_number_ring_ops RA_ops = { cl_RA_p, equal, zerop, operator+, operator-, operator-, operator*, square, expt_pos }; class cl_heap_rational_ring : public cl_heap_number_ring { SUBCLASS_cl_heap_ring() public: // Constructor. cl_heap_rational_ring () : cl_heap_number_ring (&RA_setops,&RA_addops,&RA_mulops, (cl_number_ring_ops*) &RA_ops) { type = &cl_class_rational_ring; } // Destructor. ~cl_heap_rational_ring () {} }; static void cl_rational_ring_destructor (cl_heap* pointer) { (*(cl_heap_rational_ring*)pointer).~cl_heap_rational_ring(); } static void cl_rational_ring_dprint (cl_heap* pointer) { unused pointer; fprint(cl_debugout, "(cl_rational_ring) cl_RA_ring"); } cl_class cl_class_rational_ring; static cl_heap_rational_ring* cl_heap_rational_ring_instance; // Constructor. template <> inline cl_rational_ring::cl_specialized_number_ring () : cl_number_ring(cl_heap_rational_ring_instance) { } const cl_rational_ring cl_RA_ring = cl_RA_ring; int cl_RA_ring_init_helper::count = 0; cl_RA_ring_init_helper::cl_RA_ring_init_helper() { if (count++ == 0) { cl_class_rational_ring.destruct = cl_rational_ring_destructor; cl_class_rational_ring.flags = cl_class_flags_number_ring; cl_class_rational_ring.dprint = cl_rational_ring_dprint; cl_heap_rational_ring_instance = new cl_heap_rational_ring(); new ((void *)&cl_RA_ring) cl_rational_ring(); } } cl_RA_ring_init_helper::~cl_RA_ring_init_helper() { if (--count == 0) { delete cl_heap_rational_ring_instance; } } } // namespace cln cln-1.3.3/src/rational/transcendental/0000755000000000000000000000000012173046201014561 5ustar cln-1.3.3/src/rational/transcendental/cl_RA_logp.cc0000644000000000000000000000447511201634740017105 0ustar // logp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "integer/cl_I.h" #include "rational/cl_RA.h" namespace cln { bool logp (const cl_RA& a, const cl_RA& b, cl_RA* pl) { // Methode: // a=1 -> Ergebnis 0 // b Integer: // a Integer: log(a,b) rational errechenbar -> liefern // a Ratio: a=a1/a2 mit a1>0, a2>1. // a1=1 und log(a2,b) rational errechenbar -> -log(a2,b) liefern // b Ratio: a=a1/a2, b=b1/b2 mit a1>0, a2>0, b1>0, b2>1. // log(a2,b2) rational errechenbar -> // b1=1 -> bei a1=1 liefern, sonst nicht. // b1>1 -> log(a1,b1) rational errechenbar und // log(a1,b1)=log(a2,b2) -> liefern, sonst nicht. // sonst a1,a2 vertauschen: // log(a2/a1,b1/b2) versuchen (wie oben) -> // -log(a2/a1,b1/b2) liefern if (eq(a,1)) { // a=1 -> Ergebnis 0 *pl = 0; return true; } if (integerp(b)) { // b Integer DeclareType(cl_I,b); if (integerp(a)) { // a,b beide Integers DeclareType(cl_I,a); return logp(a,b,pl); } else { // a Ratio, b Integer DeclareType(cl_RT,a); var const cl_I& a1 = numerator(a); var const cl_I& a2 = denominator(a); if (!eq(a1,1)) return false; // a1=1 var cl_RA l; if (logp(a2,b,&l)) { *pl = -l; return true; } else return false; } } else { // a rational, b Ratio DeclareType(cl_RT,b); var cl_I a1; var cl_I a2; RA_numden_I_I(a, a1 =, a2 =); var const cl_I& b1 = numerator(b); var const cl_I& b2 = denominator(b); { var cl_RA l2; // rationalen log(a2,b2) versuchen if (logp(a2,b2,&l2)) { if (eq(b1,1)) { if (eq(a1,1)) { *pl = l2; return true; } else return false; } else { var cl_RA l1; // rationalen log(a1,b1) versuchen if (logp(a1,b1,&l1)) if (l1 == l2) { *pl = l2; return true; } return false; } } } { var cl_RA l2; // rationalen log(a1,b2) versuchen if (logp(a1,b2,&l2)) { if (eq(b1,1)) { if (eq(a2,1)) { *pl = -l2; return true; } else return false; } else { var cl_RA l1; // rationalen log(a2,b1) versuchen if (logp(a2,b1,&l1)) if (l1 == l2) { *pl = -l2; return true; } } } } return false; } } } // namespace cln cln-1.3.3/src/rational/transcendental/cl_I_logp.cc0000644000000000000000000000460611201634740016767 0ustar // logp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "integer/cl_I.h" #include "rational/cl_RA.h" #include "base/cl_xmacros.h" namespace cln { bool logp (const cl_I& a, const cl_I& b, cl_RA* l) { // Methode: // log(a,b) soll Bruch c/d mit teilerfremdem c>=0,d>0 ergeben. // a=1 -> c=0, d=1. // a>=b -> Dividiere a durch b. Rest da -> geht nicht. // Sonst log(a,b) = 1+log(a/b,b). // Berechne also c/d := log(a/b,b) und setze c:=c+d. // 1 log(a,b) = 1/log(b,a). // Berechne also c/d := log(b,a) und vertausche c und d. // Man konstruiert hierbei eigentlich die Kettenbruchentwicklung von c/d. // Wegen a>=2^c, b>=2^d sind c,d < (integer-length a,b) < intDsize*2^intCsize. // In Matrizenschreibweise: // Wenn eine Folge von Divisionsschritten D und Vertauschungsschritten V // ausgeführt werden muß, z.B. (a,b) V D D = (1,*), so ist // ( c ) ( 0 ) ( 1 1 ) ( 0 1 ) // ( d ) = V D D ( 1 ) wobei D = ( 0 1 ) und V = ( 1 0 ). // Man baut diese Matrizen nun von links nach rechts auf, zum Schluß von // ( 0 ) // rechts mit ( 1 ) multiplizieren. // Entrekursiviert: // Wir werden (a,b) und damit auch c/d = log(a/b) verändern. // Invariante: Statt (c,d) wollen wir (uc*c+ud*d,vc*c+vd*d) zurückliefern. // ( uc ud ) // D.h. die bisherige Matrix von links ist ( vc vd ). // uc:=1, ud:=0, vc:=0, vd:=1. // Solange a>1, // a>=b -> Dividiere a durch b. Rest da -> geht nicht. // Sonst a:=a/b, und (für später c:=c+d) ud:=uc+ud, vd:=vc+vd. // 1 vertausche a und b, uc und ud, vc und vd. // Liefere (ud,vd), der Bruch ud/vd ist gekürzt. { Mutable(cl_I,a); Mutable(cl_I,b); var uintL uc = 1; var uintL ud = 0; var uintL vc = 0; var uintL vd = 1; loop { if (eq(a,1)) // a=1 -> Rekursion zu Ende break; if (a >= b) { var cl_I_div_t div = cl_divide(a,b); // a durch b dividieren if (!eq(div.remainder,0)) // Rest /=0 ? return false; // -> fertig a = div.quotient; // a := a/b ud = uc + ud; vd = vc + vd; } else { // 1 a und b vertauschen swap(cl_I, a, b); swap(uintL, uc, ud); swap(uintL, vc, vd); } } // a=1 -> c=0,d=1 -> Ergebnis ud/vd *l = I_I_to_RA(UL_to_I(ud),UL_to_I(vd)); return true; }} } // namespace cln cln-1.3.3/src/rational/misc/0000755000000000000000000000000012173046201012507 5ustar cln-1.3.3/src/rational/misc/cl_RA_exptpos_I.cc0000644000000000000000000000114011201634740016026 0ustar // expt_pos(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_RA expt_pos (const cl_RA& x, const cl_I& y) { // Methode: // x Integer -> klar // x Ratio a/b -> x^y = (a^y)/(b^y), gekürzt, mit b^y>=b>1. if (integerp(x)) { DeclareType(cl_I,x); return expt_pos(x,y); } else { DeclareType(cl_RT,x); var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); return I_I_to_RT(expt_pos(a,y),expt_pos(b,y)); } } } // namespace cln cln-1.3.3/src/rational/misc/cl_RA_abs.cc0000644000000000000000000000053111201634740014624 0ustar // abs(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_RA abs (const cl_RA& r) { // Methode: // Bei r<0: (- r), sonst r. if (minusp(r)) return -r; else return r; } } // namespace cln cln-1.3.3/src/rational/misc/cl_RA_eqhashcode.cc0000644000000000000000000000144311201634740016166 0ustar // cl_RA equal_hashcode(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "base/cl_N.h" #include "rational/cl_RA.h" #include "base/cl_inline.h" #include "integer/misc/cl_I_eqhashcode.cc" namespace cln { CL_INLINE2 uint32 CL_INLINE2_DECL(equal_hashcode) (const cl_RA& r) { if (integerp(r)) { DeclareType(cl_I,r); return equal_hashcode_inline(r); } else { // Making sure that a float and its rational equivalent have // the same hash code is tricky. This code depends on the fact // that the equal_hashcode_low macro is linear in `exp'. DeclareType(cl_RT,r); return equal_hashcode_inline(numerator(r)) - equal_hashcode_inline(denominator(r)) + equal_hashcode_one; } } } // namespace cln cln-1.3.3/src/rational/misc/cl_RA_min.cc0000644000000000000000000000036411201634740014646 0ustar // min(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. namespace cln { const cl_RA min (const cl_RA& x, const cl_RA& y) { return (x <= y ? x : y); } } // namespace cln cln-1.3.3/src/rational/misc/cl_RA_class.cc0000644000000000000000000000070311201634740015165 0ustar // cl_class_ratio. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" namespace cln { static void ratio_destructor (cl_heap* pointer) { (*(cl_heap_ratio*)pointer).~cl_heap_ratio(); } cl_class cl_class_ratio = { ratio_destructor, cl_class_flags_subclass_complex | cl_class_flags_subclass_real | cl_class_flags_subclass_rational }; } // namespace cln cln-1.3.3/src/rational/misc/cl_RA_as.cc0000644000000000000000000000144711201634740014471 0ustar // cl_RA_As(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "base/cl_N.h" namespace cln { // Cf. cl_RA_p in cl_RA_ring.cc. // But here, for better inlining in g++, it is preferrable to finish every // alternative with either "return true;" or "return false;". inline bool cl_RA_p (const cl_number& x) { if (!x.pointer_p()) switch (x.nonpointer_tag()) { case cl_FN_tag: return true; } else if (x.pointer_type()->flags & cl_class_flags_subclass_rational) return true; return false; } const cl_RA& cl_RA_As (const cl_number& x, const char * filename, int line) { if (cl_RA_p(x)) { DeclareType(cl_RA,x); return x; } else throw as_exception(x,"a rational number",filename,line); } } // namespace cln cln-1.3.3/src/rational/misc/cl_RA_expt_I.cc0000644000000000000000000000073411201634740015314 0ustar // expt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "cln/integer.h" #include "integer/cl_I.h" namespace cln { const cl_RA expt (const cl_RA& x, const cl_I& y) { // Methode: // Für y>0: klar. // Für y=0: Ergebnis 1. // Für y<0: (/ (expt x (- y))). if (minusp(y)) return recip(expt_pos(x,-y)); elif (zerop(y)) return 1; else // y > 0 return expt_pos(x,y); } } // namespace cln cln-1.3.3/src/rational/misc/cl_RA_signum.cc0000644000000000000000000000063211201634740015363 0ustar // signum(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "integer/cl_I.h" namespace cln { CL_INLINE const cl_RA CL_INLINE_DECL(signum) (const cl_RA& x) { if (minusp(x)) { return -1; } // x<0 -> -1 elif (zerop(x)) { return 0; } // x=0 -> 0 else { return 1; } // x>0 -> +1 } } // namespace cln cln-1.3.3/src/rational/misc/cl_RA_debug.cc0000644000000000000000000000121111201634740015141 0ustar // cl_RA debugging support. // General includes. #include "base/cl_sysdep.h" // Specification. // Implementation. #include "cln/rational.h" #include "cln/io.h" #include "cln/rational_io.h" namespace cln { static void dprint (cl_heap* pointer) { var const cl_RA& obj = *(const cl_RA*)&pointer; fprint(cl_debugout, "(cl_RA) "); fprint(cl_debugout, obj); } AT_INITIALIZATION(dprint_RA) { cl_register_type_printer(cl_class_ratio,dprint); } // This dummy links in this module when requires it. int cl_RA_debug_module; extern int cl_I_debug_module; static void* dummy[] = { &dummy, &cl_I_debug_module }; } // namespace cln cln-1.3.3/src/rational/misc/cl_RA_max.cc0000644000000000000000000000036411201634740014650 0ustar // max(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. namespace cln { const cl_RA max (const cl_RA& x, const cl_RA& y) { return (x >= y ? x : y); } } // namespace cln cln-1.3.3/src/rational/misc/cl_RA_expt.cc0000644000000000000000000000065411201634740015045 0ustar // expt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. namespace cln { const cl_RA expt (const cl_RA& x, sintL y) { // Methode: // Für y>0: klar. // Für y=0: Ergebnis 1. // Für y<0: (/ (expt x (- y))). if (y > 0) return expt_pos(x,(uintL)y); elif (y == 0) return 1; else // y < 0 return recip(expt_pos(x,(uintL)(-y))); } } // namespace cln cln-1.3.3/src/rational/misc/cl_RA_exptpos.cc0000644000000000000000000000113211201634740015557 0ustar // expt_pos(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_RA expt_pos (const cl_RA& x, uintL y) { // Methode: // x Integer -> klar // x Ratio a/b -> x^y = (a^y)/(b^y), gekürzt, mit b^y>=b>1. if (integerp(x)) { DeclareType(cl_I,x); return expt_pos(x,y); } else { DeclareType(cl_RT,x); var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); return I_I_to_RT(expt_pos(a,y),expt_pos(b,y)); } } } // namespace cln cln-1.3.3/src/rational/elem/0000755000000000000000000000000012173046201012476 5ustar cln-1.3.3/src/rational/elem/cl_RA_numerator.cc0000644000000000000000000000050311201634740016061 0ustar // numerator(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #define numerator inline_numerator #include "rational/cl_RA.h" #undef numerator namespace cln { const cl_I numerator (const cl_RA& r) { return inline_numerator(r); } } // namespace cln cln-1.3.3/src/rational/elem/cl_RA_from_I_posI_div.cc0000644000000000000000000000100111201634740017106 0ustar // I_posI_div_RA(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "rational/cl_RA.h" // Implementation. #include "cln/integer.h" #include "integer/cl_I.h" namespace cln { const cl_RA I_posI_div_RA (const cl_I& a, const cl_I& b) { // Methode: // d:=ggT(a,b). // Falls d=1: I_I_to_RA anwenden, // sonst: I_I_to_RA auf a/d und b/d anwenden. var cl_I d = gcd(a,b); if (eq(d,1)) return I_I_to_RA(a,b); else return I_I_to_RA(exquo(a,d),exquopos(b,d)); } } // namespace cln cln-1.3.3/src/rational/elem/cl_RA_plusp.cc0000644000000000000000000000071311201634740015213 0ustar // plusp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #define minusp inline_minusp #define zerop inline_zerop #include "rational/cl_RA.h" #undef zerop #undef minusp namespace cln { bool plusp (const cl_RA& x) { if (inline_minusp(x)) return false; // x<0 -> nein elif (inline_zerop(x)) return false; // x=0 -> nein else return true; // sonst ist x>0. } } // namespace cln cln-1.3.3/src/rational/elem/cl_RA_minus.cc0000644000000000000000000000634411201634740015211 0ustar // binary operator - // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" #include "integer/cl_I.h" namespace cln { const cl_RA operator- (const cl_RA& r, const cl_RA& s) { #if 0 // Methode: // (+ r (- s)) return r + (- s); #else // Methode (vgl. [Buchberger, Collins, Loos: Computer Algebra, S.200-201]) // r,s beide Integers -> klar. // r=a/b, s=c -> Ergebnis (a-b*c)/b // (mit b>1 und ggT(a-b*c,b) = ggT(a,b) = 1) // Bei c=0 direkt r als Ergebnis. // r=a, s=c/d -> Ergebnis (a*d-c)/d // (mit d>1 und ggT(a*d-c,d) = ggT(-c,d) = ggT(c,d) = 1) // Bei a=0 direkt -s = (-c)/d als Ergebnis. // r=a/b, s=c/d: // g:=ggT(b,d)>0. // Falls g=1: // Ergebnis (a*d-b*c)/(b*d), // (mit b*d>1 wegen b>1, d>1, und // ggT(a*d-b*c,b*d) = 1 // wegen ggT(a*d-b*c,b) = ggT(a*d,b) = 1 (wegen ggT(a,b)=1 und ggT(d,b)=1) // und ggT(a*d-b*c,d) = ggT(b*c,d) = 1 (wegen ggT(b,d)=1 und ggT(c,d)=1) // ) // Sonst b' := b/g, d' := d/g. e := a*d'-b'*c, f:= b'*d = b*d'. // Es ist g = ggT(g*b',g*d') = g*ggT(b',d'), also ggT(b',d')=1. // Es ist r-s = (a*d-b*c)/(b*d) = (nach Kürzen mit g) e/f. // Außerdem: // ggT(a,b') teilt ggT(a,b)=1, also ggT(a,b')=1. Mit ggT(d',b')=1 folgt // 1 = ggT(a*d',b') = ggT(a*d'-b'*c,b') = ggT(e,b'). // ggT(c,d') teilt ggT(c,d)=1, also ggT(c,d')=1. Mit ggT(b',d')=1 folgt // 1 = ggT(b'*c,d') = ggT(a*d'-b'*c,d') = ggT(e,d'). // Daher ist ggT(e,f) = ggT(e,b'*d'*g) = ggT(e,g). // Errechne daher h=ggT(e,g). // Bei h=1 ist e/f das Ergebnis (mit f>1, da d>1, und ggT(e,f)=1), // sonst ist (e/h)/(f/h) das Ergebnis. if (integerp(s)) { // s ist Integer DeclareType(cl_I,s); if (eq(s,0)) { return r; } // s=0 -> r als Ergebnis if (integerp(r)) { // beides Integers DeclareType(cl_I,r); return r-s; } else { DeclareType(cl_RT,r); var const cl_I& a = numerator(r); var const cl_I& b = denominator(r); var const cl_I& c = s; // r = a/b, s = c. return I_I_to_RT(a-b*c,b); } } else { // s ist Ratio DeclareType(cl_RT,s); if (integerp(r)) { // r ist Integer DeclareType(cl_I,r); if (eq(r,0)) { // r=0 -> -s als Ergebnis var const cl_I& c = numerator(s); var const cl_I& d = denominator(s); return I_I_to_RT(-c,d); } var const cl_I& a = r; var const cl_I& c = numerator(s); var const cl_I& d = denominator(s); // r = a, s = c/d. return I_I_to_RT(a*d-c,d); } else { // r,s beide Ratios DeclareType(cl_RT,r); var const cl_I& a = numerator(r); var const cl_I& b = denominator(r); var const cl_I& c = numerator(s); var const cl_I& d = denominator(s); var cl_I g = gcd(b,d); // g = ggT(b,d) >0 bilden if (eq(g,1)) // g=1 -> Ergebnis (a*d-b*c)/(b*d) return I_I_to_RT(a*d-b*c,b*d); // g>1 var cl_I bp = exquopos(b,g); // b' := b/g (b,g>0) var cl_I dp = exquopos(d,g); // d' := d/g (d,g>0) var cl_I e = a*dp-bp*c; // e := a*d'-b'*c var cl_I f = bp*d; // f := b'*d var cl_I h = gcd(e,g); // h := ggT(e,g) if (eq(h,1)) // h=1 return I_I_to_RT(e,f); // h>1 return I_I_to_RA(exquo(e,h),exquopos(f,h)); // (e/h)/(f/h) als Ergebnis } } #endif } } // namespace cln cln-1.3.3/src/rational/elem/cl_RA_plus1.cc0000644000000000000000000000111411201634740015110 0ustar // plus1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_RA plus1 (const cl_RA& r) { // Methode: // Falls r ein Integer ist: I_1_plus_I anwenden // Falls r = a/b: (a+b)/b, wobei b>1 und ggT(a+b,b)=ggT(a,b)=1 ist. if (integerp(r)) { DeclareType(cl_I,r); return plus1(r); } else { DeclareType(cl_RT,r); var const cl_I& a = numerator(r); var const cl_I& b = denominator(r); return I_I_to_RT(a+b,b); } } } // namespace cln cln-1.3.3/src/rational/elem/cl_RA_minusp.cc0000644000000000000000000000046611201634740015370 0ustar // minusp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #define minusp minusp_inline #include "rational/cl_RA.h" #undef minusp namespace cln { bool CL_FLATTEN minusp (const cl_RA& x) { return minusp_inline(x); } } // namespace cln cln-1.3.3/src/rational/elem/cl_RA_square.cc0000644000000000000000000000112611201634740015347 0ustar // square(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_RA square (const cl_RA& r) { // Methode: // r Integer -> klar. // r = a/b -> Ergebnis a^2/b^2 if (integerp(r)) { DeclareType(cl_I,r); return square(r); } else { DeclareType(cl_RT,r); var const cl_I& a = numerator(r); var const cl_I& b = denominator(r); // Immer noch b^2>1 und ggT(a^2,b^2) = ggT(a,b)^2 = 1 return I_I_to_RT(square(a),square(b)); } } } // namespace cln cln-1.3.3/src/rational/elem/cl_RA_equal.cc0000644000000000000000000000161411201634740015160 0ustar // equal(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { bool equal (const cl_RA& r, const cl_RA& s) { // Methode: // r,s Integer -> klar // r Integer, s Ratio: verschieden. // r Ratio, s Integer: verschieden. // r,s Ratios: r=a/b, s=c/d. Vergleiche a mit c und b mit d. if (integerp(r)) if (integerp(s)) { // r,s beide Integer DeclareType(cl_I,r); DeclareType(cl_I,s); return equal(r,s); } else // r Integer, s Ratio return false; else if (integerp(s)) // r Ratio, s Integer return false; else { DeclareType(cl_RT,r); DeclareType(cl_RT,s); // r,s Ratios if (!equal(numerator(r),numerator(s))) return false; if (!equal(denominator(r),denominator(s))) return false; return true; } } } // namespace cln cln-1.3.3/src/rational/elem/cl_RA_mul.cc0000644000000000000000000000461711201634740014654 0ustar // binary operator * // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" #include "integer/cl_I.h" namespace cln { const cl_RA operator* (const cl_RA& r, const cl_RA& s) { // Methode (vgl. [Buchberger, Collins, Loos: Computer Algebra, S.201]) // r,s beide Integers -> klar. // r=a/b, s=c -> // Bei c=0 Ergebnis 0. // g:=ggT(b,c). // Falls g=1: Ergebnis (a*c)/b (mit b>1, ggT(a*c,b)=1). // Sonst: b':=b/g, c':=c/g, Ergebnis (a*c')/b' (mit ggT(a*c',b')=1). // r=a, s=c/d analog. // r=a/b, s=c/d -> // g:=ggT(a,d), h:=ggT(b,c). // a':=a/g, d':=d/g (nur bei g>1 bedeutet das Rechnung). // b':=b/h, c':=c/h (nur bei h>1 bedeutet das Rechnung). // Ergebnis ist = (a'*c')/(b'*d'). if (integerp(s)) { // s Integer DeclareType(cl_I,s); if (integerp(r)) { // beides Integer DeclareType(cl_I,r); return r*s; } else { DeclareType(cl_RT,r); var const cl_I& a = numerator(r); var const cl_I& b = denominator(r); var const cl_I& c = s; // r=a/b, s=c, bilde a/b * c. if (zerop(c)) { return 0; } // c=0 -> Ergebnis 0 var cl_I g = gcd(b,c); if (eq(g,1)) // g=1 return I_I_to_RT(a*c,b); // (a*c)/b else // g>1 return I_I_to_RA(a*exquo(c,g),exquopos(b,g)); // (a*(c/g))/(b/g) } } else { // s ist Ratio DeclareType(cl_RT,s); if (integerp(r)) { // r Integer DeclareType(cl_I,r); var const cl_I& a = r; var const cl_I& b = numerator(s); var const cl_I& c = denominator(s); // r=a, s=b/c, bilde a * b/c. if (zerop(a)) { return 0; } // a=0 -> Ergebnis 0 var cl_I g = gcd(a,c); if (eq(g,1)) // g=1 return I_I_to_RT(a*b,c); // (a*b)/c else // g>1 return I_I_to_RA(exquo(a,g)*b,exquopos(c,g)); // ((a/g)*b)/(c/g) } else { // r,s beide Ratios DeclareType(cl_RT,r); var const cl_I& a = numerator(r); var const cl_I& b = denominator(r); var const cl_I& c = numerator(s); var const cl_I& d = denominator(s); var cl_I ap, dp; { var cl_I g = gcd(a,d); if (eq(g,1)) { ap = a; dp = d; } else { ap = exquo(a,g); dp = exquopos(d,g); } } var cl_I cp, bp; { var cl_I h = gcd(b,c); if (eq(h,1)) { cp = c; bp = b; } else { cp = exquo(c,h); bp = exquopos(b,h); } } return I_I_to_RA(ap*cp,bp*dp); // (a'*c')/(b'*d') } } } } // namespace cln cln-1.3.3/src/rational/elem/cl_RA_from_I_posI.cc0000644000000000000000000000060411201634740016254 0ustar // I_I_to_RA(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "rational/cl_RA.h" // Implementation. #include "integer/cl_I.h" namespace cln { const cl_RA I_I_to_RA (const cl_I& a, const cl_I& b) { // Methode: // falls b=1, a als Ergebnis, sonst der echte Bruch a/b. if (eq(b,1)) return a; else return allocate_ratio(a,b); } } // namespace cln cln-1.3.3/src/rational/elem/cl_RA_div.cc0000644000000000000000000000075311201634740014636 0ustar // binary operator / // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_RA operator/ (const cl_RA& r, const cl_RA& s) { // Methode: // (* r (/ s)) if (integerp(r) && integerp(s)) { DeclareType(cl_I,r); DeclareType(cl_I,s); // r und s Integers -> schnell abhandeln return I_I_div_RA(r,s); } return r * recip(s); } } // namespace cln cln-1.3.3/src/rational/elem/cl_RA_recip.cc0000644000000000000000000000120111201634740015143 0ustar // recip(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "cln/exception.h" #include "rational/cl_RA.h" #include "integer/cl_I.h" namespace cln { const cl_RA recip (const cl_RA& r) { // Methode: // r=0 -> Error. // a:=(numerator r), b:=(denominator r). // a>0 -> Ergebnis b/a (mit ggT(b,a)=1). // a<0 -> Ergebnis (- b)/(- a) (mit ggT(-b,-a)=1). if (zerop(r)) throw division_by_0_exception(); var cl_I a; var cl_I b; RA_numden_I_I(r, a = , b = ); if (!minusp(a)) return I_I_to_RA(b,a); else // a<0 return I_I_to_RA(-b,-a); } } // namespace cln cln-1.3.3/src/rational/elem/cl_RA_compare.cc0000644000000000000000000000353411201634740015502 0ustar // compare(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { cl_signean compare (const cl_RA& r, const cl_RA& s) { // Methode: // r,s Integer -> klar // r<0, s>=0 -> r=0, s<0 -> r>s. // r Integer, s Ratio: r=a, s=b/c. Vergleiche a*c und b. // r Ratio, s Integer: r=a/b, s=c. Vergleiche a und b*c. // r,s Ratios: r=a/b, s=c/d. Vergleiche a*d und b*c. // 1. Schritt: Test, ob beides Integers: if (integerp(r) && integerp(s)) { DeclareType(cl_I,r); DeclareType(cl_I,s); return compare(r,s); } // r,s nicht beide Integers. // 2. Schritt: Test, ob die Vorzeichen bereits das Ergebnis hergeben: if (minusp(r)) { if (!minusp(s)) return signean_minus; // r<0, s>=0 -> r=0, s<0 -> r>s } // r,s haben gleiches Vorzeichen. // 3. Schritt: Fallunterscheidung nach Typen if (integerp(r)) { DeclareType(cl_I,r); DeclareType(cl_RT,s); // r Integer, s Ratio: r=a, s=b/c. Vergleiche a*c und b. var const cl_I& a = r; var const cl_I& b = numerator(s); var const cl_I& c = denominator(s); return compare(a*c,b); } elif (integerp(s)) { DeclareType(cl_I,s); DeclareType(cl_RT,r); // r Ratio, s Integer: r=a/b, s=c. Vergleiche a und b*c. var const cl_I& a = numerator(r); var const cl_I& b = denominator(r); var const cl_I& c = s; return compare(a,b*c); } else { DeclareType(cl_RT,r); DeclareType(cl_RT,s); // r,s Ratios: r=a/b, s=c/d. Vergleiche a*d und b*c. var const cl_I& a = numerator(r); var const cl_I& b = denominator(r); var const cl_I& c = numerator(s); var const cl_I& d = denominator(s); return compare(a*d,b*c); } } // Beschleunigung durch Konversion zu Short-Floats diese zuerst vergleichen?? } // namespace cln cln-1.3.3/src/rational/elem/cl_RA_uminus.cc0000644000000000000000000000110311201634740015362 0ustar // unary operator - // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_RA operator- (const cl_RA& r) { // Methode: // r Integer -> klar. // r = a/b -> Ergebnis (- a)/b if (integerp(r)) { DeclareType(cl_I,r); return -r; } else { DeclareType(cl_RT,r); var const cl_I& a = numerator(r); var const cl_I& b = denominator(r); // Immer noch b>1 und ggT(-a,b) = ggT(a,b) = 1 return I_I_to_RT(-a,b); } } } // namespace cln cln-1.3.3/src/rational/elem/cl_RA_plus.cc0000644000000000000000000000604511201634740015037 0ustar // binary operator + // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" #include "integer/cl_I.h" namespace cln { const cl_RA operator+ (const cl_RA& r, const cl_RA& s) { // Methode (vgl. [Buchberger, Collins, Loos: Computer Algebra, S.200-201]) // r,s beide Integers -> klar. // r=a/b, s=c -> Ergebnis (a+b*c)/b // (mit b>1 und ggT(a+b*c,b) = ggT(a,b) = 1) // Bei c=0 direkt r als Ergebnis. // r=a, s=c/d -> Ergebnis (a*d+c)/d // (mit d>1 und ggT(a*d+c,d) = ggT(c,d) = 1) // Bei a=0 direkt s als Ergebnis. // r=a/b, s=c/d: // g:=ggT(b,d)>0. // Falls g=1: // Ergebnis (a*d+b*c)/(b*d), // (mit b*d>1 wegen b>1, d>1, und // ggT(a*d+b*c,b*d) = 1 // wegen ggT(a*d+b*c,b) = ggT(a*d,b) = 1 (wegen ggT(a,b)=1 und ggT(d,b)=1) // und ggT(a*d+b*c,d) = ggT(b*c,d) = 1 (wegen ggT(b,d)=1 und ggT(c,d)=1) // ) // Sonst b' := b/g, d' := d/g. e := a*d'+b'*c, f:= b'*d = b*d'. // Es ist g = ggT(g*b',g*d') = g*ggT(b',d'), also ggT(b',d')=1. // Es ist r+s = (a*d+b*c)/(b*d) = (nach Kürzen mit g) e/f. // Außerdem: // ggT(a,b') teilt ggT(a,b)=1, also ggT(a,b')=1. Mit ggT(d',b')=1 folgt // 1 = ggT(a*d',b') = ggT(a*d'+b'*c,b') = ggT(e,b'). // ggT(c,d') teilt ggT(c,d)=1, also ggT(c,d')=1. Mit ggT(b',d')=1 folgt // 1 = ggT(b'*c,d') = ggT(a*d'+b'*c,d') = ggT(e,d'). // Daher ist ggT(e,f) = ggT(e,b'*d'*g) = ggT(e,g). // Errechne daher h=ggT(e,g). // Bei h=1 ist e/f das Ergebnis (mit f>1, da d>1, und ggT(e,f)=1), // sonst ist (e/h)/(f/h) das Ergebnis. if (integerp(s)) { // s ist Integer DeclareType(cl_I,s); if (eq(s,0)) { return r; } // s=0 -> r als Ergebnis if (integerp(r)) { // beides Integers DeclareType(cl_I,r); return r+s; } else { DeclareType(cl_RT,r); var const cl_I& a = numerator(r); var const cl_I& b = denominator(r); var const cl_I& c = s; // r = a/b, s = c. return I_I_to_RT(a+b*c,b); } } else { // s ist Ratio DeclareType(cl_RT,s); if (integerp(r)) { // r ist Integer DeclareType(cl_I,r); if (eq(r,0)) { return s; } // r=0 -> s als Ergebnis var const cl_I& a = r; var const cl_I& c = numerator(s); var const cl_I& d = denominator(s); // r = a, s = c/d. return I_I_to_RT(a*d+c,d); } else { // r,s beide Ratios DeclareType(cl_RT,r); var const cl_I& a = numerator(r); var const cl_I& b = denominator(r); var const cl_I& c = numerator(s); var const cl_I& d = denominator(s); var cl_I g = gcd(b,d); // g = ggT(b,d) >0 bilden if (eq(g,1)) // g=1 -> Ergebnis (a*d+b*c)/(b*d) return I_I_to_RT(a*d+b*c,b*d); // g>1 var cl_I bp = exquopos(b,g); // b' := b/g (b,g>0) var cl_I dp = exquopos(d,g); // d' := d/g (d,g>0) var cl_I e = a*dp+bp*c; // e := a*d'+b'*c var cl_I f = bp*d; // f := b'*d var cl_I h = gcd(e,g); // h := ggT(e,g) if (eq(h,1)) // h=1 return I_I_to_RT(e,f); // h>1 return I_I_to_RA(exquo(e,h),exquopos(f,h)); // (e/h)/(f/h) als Ergebnis } } } } // namespace cln cln-1.3.3/src/rational/elem/cl_RA_zerop.cc0000644000000000000000000000044511201634740015211 0ustar // zerop(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #define zerop inline_zerop #include "rational/cl_RA.h" #undef zerop namespace cln { bool zerop (const cl_RA& x) { return inline_zerop(x); } } // namespace cln cln-1.3.3/src/rational/elem/cl_RA_from_I_posI1.cc0000644000000000000000000000040311201634740016332 0ustar // I_I_to_RT(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "rational/cl_RA.h" // Implementation. namespace cln { const cl_RA I_I_to_RT (const cl_I& a, const cl_I& b) { return allocate_ratio(a,b); } } // namespace cln cln-1.3.3/src/rational/elem/cl_RA_minus1.cc0000644000000000000000000000112411201634740015261 0ustar // minus1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_RA minus1 (const cl_RA& r) { // Methode: // Falls r ein Integer ist: I_minus1_plus_I anwenden // Falls r = a/b: (a-b)/b, wobei b>1 und ggT(a-b,b)=ggT(a,b)=1 ist. if (integerp(r)) { DeclareType(cl_I,r); return minus1(r); } else { DeclareType(cl_RT,r); var const cl_I& a = numerator(r); var const cl_I& b = denominator(r); return I_I_to_RT(a-b,b); } } } // namespace cln cln-1.3.3/src/rational/elem/cl_RA_denominator.cc0000644000000000000000000000051711201634740016371 0ustar // denominator(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #define denominator inline_denominator #include "rational/cl_RA.h" #undef denominator namespace cln { const cl_I denominator (const cl_RA& r) { return inline_denominator(r); } } // namespace cln cln-1.3.3/src/rational/elem/cl_RA_from_I_I_div.cc0000644000000000000000000000104211201634740016371 0ustar // I_I_div_RA(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "rational/cl_RA.h" // Implementation. #include "cln/exception.h" #include "integer/cl_I.h" namespace cln { const cl_RA I_I_div_RA (const cl_I& a, const cl_I& b) { // Methode: // Falls b=0: Error. // Falls b>0: I_posI_div_RA anwenden. // Falls b<0: I_posI_div_RA auf (- a) und (- b) anwenden. if (eq(b,0)) throw division_by_0_exception(); if (minusp(b)) return I_posI_div_RA(-a,-b); else return I_posI_div_RA(a,b); } } // namespace cln cln-1.3.3/src/rational/output/0000755000000000000000000000000012173046201013114 5ustar cln-1.3.3/src/rational/output/cl_RA_dprint.cc0000644000000000000000000000261311201634740015767 0ustar // print_rational(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational_io.h" // Implementation. #include "cln/output.h" #include "cln/integer_io.h" #include "cln/rational.h" #include "rational/cl_RA.h" namespace cln { void print_rational (std::ostream& stream, const cl_print_rational_flags& flags, const cl_RA& z) { var unsigned int base = flags.rational_base; if (flags.rational_readably) // Radix-Specifier ausgeben: switch (base) { case 2: fprintchar(stream,'#'); fprintchar(stream,'b'); break; case 8: fprintchar(stream,'#'); fprintchar(stream,'o'); break; case 16: fprintchar(stream,'#'); fprintchar(stream,'x'); break; case 10: if (integerp(z)) { DeclareType(cl_I,z); // Basis 10 bei Integers durch // nachgestellten Punkt kennzeichnen: print_integer(stream,base,z); fprintchar(stream,'.'); return; } default: // Basis in #nR-Schreibweise ausgeben: fprintchar(stream,'#'); print_integer(stream,10,base); fprintchar(stream,'r'); break; } if (integerp(z)) { DeclareType(cl_I,z); // Integer in Basis base ausgeben: print_integer(stream,base,z); } else { DeclareType(cl_RT,z); // Ratio in Basis base ausgeben; Zähler / Nenner print_integer(stream,base,numerator(z)); fprintchar(stream,'/'); print_integer(stream,base,denominator(z)); } } } // namespace cln cln-1.3.3/src/rational/output/cl_RA_aprint.cc0000644000000000000000000000054711201634740015770 0ustar // print_rational(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational_io.h" // Implementation. #include "cln/output.h" namespace cln { void print_rational (std::ostream& stream, const cl_print_flags& flags, const cl_RA& z) { print_rational(stream,(const cl_print_number_flags&)flags,z); } } // namespace cln cln-1.3.3/src/rational/output/cl_RA_bprint.cc0000644000000000000000000000055411201634740015767 0ustar // print_rational(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational_io.h" // Implementation. #include "cln/output.h" namespace cln { void print_rational (std::ostream& stream, const cl_print_number_flags& flags, const cl_RA& z) { print_rational(stream,(const cl_print_real_flags&)flags,z); } } // namespace cln cln-1.3.3/src/rational/output/cl_RA_cprint.cc0000644000000000000000000000055611201634740015772 0ustar // print_rational(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational_io.h" // Implementation. #include "cln/output.h" namespace cln { void print_rational (std::ostream& stream, const cl_print_real_flags& flags, const cl_RA& z) { print_rational(stream,(const cl_print_rational_flags&)flags,z); } } // namespace cln cln-1.3.3/src/rational/output/cl_RA_print.cc0000644000000000000000000000130311201634740015616 0ustar // print_rational(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational_io.h" // Implementation. #include "cln/integer_io.h" #include "cln/rational.h" #include "rational/cl_RA.h" namespace cln { void print_rational (std::ostream& stream, unsigned int base, const cl_RA& z) { if (integerp(z)) { DeclareType(cl_I,z); print_integer(stream,base,z); } else { DeclareType(cl_RT,z); var const cl_I& num = numerator(z); var const cl_I& den = denominator(z); // Der Zähler trägt das Vorzeichen. print_integer(stream,base,num); // Zähler ausgeben fprintchar(stream,'/'); print_integer(stream,base,den); // Nenner ausgeben } } } // namespace cln cln-1.3.3/src/rational/input/0000755000000000000000000000000012173046201012713 5ustar cln-1.3.3/src/rational/input/cl_RA_from_string.cc0000644000000000000000000000077311201634740016624 0ustar // cl_RA (const char *) constructor. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational_class.h" // Implementation. #include "cln/input.h" #include "cln/rational_io.h" namespace cln { cl_read_flags cl_RA_read_flags = { syntax_rational, lsyntax_all, 10, { float_format_ffloat, float_format_lfloat_min, true } }; cl_RA::cl_RA (const char * string) { pointer = as_cl_private_thing( read_rational(cl_RA_read_flags,string,NULL,NULL)); } } // namespace cln cln-1.3.3/src/rational/input/cl_RA_read.cc0000644000000000000000000001222111201634740015175 0ustar // read_rational(). // This file contains a slimmed down version of read_real(). // It does not pull in all the floating-point, complex and transcendental // function code. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational_io.h" // Implementation. #include #include #include "cln/input.h" #include "cln/integer.h" #include "cln/integer_io.h" #include "integer/cl_I.h" #include "cln/exception.h" namespace cln { // Step forward over all digits, to the end of string or to the next non-digit. static const char * skip_digits (const char * ptr, const char * string_limit, unsigned int base) { for ( ; ptr != string_limit; ptr++) { var char ch = *ptr; if ((ch >= '0') && (ch <= '9')) if (ch < '0' + (int)base) continue; else break; else { if (base <= 10) break; if (((ch >= 'A') && (ch < 'A'-10+(int)base)) || ((ch >= 'a') && (ch < 'a'-10+(int)base)) ) continue; else break; } } return ptr; } #define at_end_of_parse(ptr) \ if (end_of_parse) \ { *end_of_parse = (ptr); } \ else \ { if ((ptr) != string_limit) { throw read_number_junk_exception((ptr),string,string_limit); } } const cl_RA read_rational (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse) { ASSERT((flags.syntax & ~(syntax_rational|syntax_maybe_bad)) == 0); // If no string_limit is given, it defaults to the end of the string. if (!string_limit) string_limit = string + ::strlen(string); if (flags.syntax & syntax_rational) { // Check for rational number syntax. var unsigned int rational_base = flags.rational_base; var const char * ptr = string; if (flags.lsyntax & lsyntax_commonlisp) { if (ptr == string_limit) goto not_rational_syntax; if (*ptr == '#') { // Check for #b, #o, #x, #nR syntax. ptr++; if (ptr == string_limit) goto not_rational_syntax; switch (*ptr) { case 'b': case 'B': rational_base = 2; break; case 'o': case 'O': rational_base = 8; break; case 'x': case 'X': rational_base = 16; break; default: var const char * base_end_ptr = skip_digits(ptr,string_limit,10); if (base_end_ptr == ptr) goto not_rational_syntax; if (base_end_ptr == string_limit) goto not_rational_syntax; if (!((*base_end_ptr == 'r') || (*base_end_ptr == 'R'))) goto not_rational_syntax; var cl_I base = read_integer(10,0,ptr,0,base_end_ptr-ptr); if (!((base >= 2) && (base <= 36))) { std::ostringstream buf; fprint(buf, "Base must be an integer in the range from 2 to 36, not "); fprint(buf, base); throw runtime_exception(buf.str()); } rational_base = FN_to_UV(base); ptr = base_end_ptr; break; } ptr++; } } var const char * ptr_after_prefix = ptr; var cl_signean sign = 0; if (ptr == string_limit) goto not_rational_syntax; switch (*ptr) { case '-': sign = ~sign; case '+': ptr++; default: break; } var const char * ptr_after_sign = ptr; if (flags.syntax & syntax_integer) { // Check for integer syntax: {'+'|'-'|} {digit}+ {'.'|} // Allow final dot only in Common Lisp syntax if there was no # prefix. if ((flags.lsyntax & lsyntax_commonlisp) && (ptr_after_prefix == string)) { ptr = skip_digits(ptr_after_sign,string_limit,10); if (ptr != ptr_after_sign) if (ptr != string_limit) if (*ptr == '.') { ptr++; if ((ptr == string_limit) || !(((*ptr >= '0') && (*ptr <= '9')) || ((*ptr >= 'A') && (*ptr <= 'Z') && (*ptr != 'I')) || ((*ptr >= 'a') && (*ptr <= 'z') && (*ptr != 'i')) || (*ptr == '.') || (*ptr == '_') || (*ptr == '/'))) { at_end_of_parse(ptr); return read_integer(10,sign,ptr_after_sign,0,ptr-ptr_after_sign); } } } ptr = skip_digits(ptr_after_sign,string_limit,rational_base); if ((ptr == string_limit) || !(((*ptr >= '0') && (*ptr <= '9')) || ((*ptr >= 'A') && (*ptr <= 'Z') && (*ptr != 'I')) || ((*ptr >= 'a') && (*ptr <= 'z') && (*ptr != 'i')) || (*ptr == '.') || (*ptr == '_') || (*ptr == '/'))) { at_end_of_parse(ptr); return read_integer(rational_base,sign,ptr_after_sign,0,ptr-ptr_after_sign); } } if (flags.syntax & syntax_ratio) { // Check for ratio syntax: {'+'|'-'|} {digit}+ '/' {digit}+ ptr = skip_digits(ptr_after_sign,string_limit,rational_base); if (ptr != ptr_after_sign) if (ptr != string_limit) if (*ptr == '/') { var const char * ptr_at_slash = ptr; ptr = skip_digits(ptr_at_slash+1,string_limit,rational_base); if (ptr != ptr_at_slash+1) if ((ptr == string_limit) || !(((*ptr >= '0') && (*ptr <= '9')) || ((*ptr >= 'A') && (*ptr <= 'Z') && (*ptr != 'I')) || ((*ptr >= 'a') && (*ptr <= 'z') && (*ptr != 'i')) || (*ptr == '.') || (*ptr == '_') || (*ptr == '/'))) { at_end_of_parse(ptr); return read_rational(rational_base,sign,ptr_after_sign,0,ptr_at_slash-ptr_after_sign,ptr-ptr_after_sign); } } } } not_rational_syntax: if (flags.syntax & syntax_maybe_bad) { ASSERT(end_of_parse); *end_of_parse = string; return 0; // dummy return } throw read_number_bad_syntax_exception(string,string_limit); } } // namespace cln cln-1.3.3/src/rational/input/cl_RA_readparsed.cc0000644000000000000000000000143411201634740016400 0ustar // read_rational(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational_io.h" // Implementation. #include "rational/cl_RA.h" #include "integer/cl_I.h" #include "base/cl_N.h" namespace cln { const cl_RA read_rational (unsigned int base, cl_signean sign, const char * string, uintC index1, uintC index3, uintC index2) { var uintC index3_1 = index3+1; // Index der ersten Nennerziffer var cl_I den = // Nenner digits_to_I(&string[index3_1],index2-index3_1,(uintD)base); if (zerop(den)) // Division durch 0 abfangen { throw division_by_0_exception(); } var cl_I num = // Zähler digits_to_I(&string[index1],index3-index1,(uintD)base); if (!(sign == 0)) num = -num; // incl. Vorzeichen return I_posI_div_RA(num,den); } } // namespace cln cln-1.3.3/src/rational/input/cl_RA_read_stream.cc0000644000000000000000000000501511731472024016556 0ustar // read_rational(). // This file contains a slimmed down version of read_real(). // It does not pull in all the floating-point, complex and transcendental // function code. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational_io.h" // Implementation. #include "cln/input.h" #include "cln/io.h" #include "base/string/cl_spushstring.h" namespace cln { // We read an entire token (or even more, if it begins with #C) into a // buffer and then call read_rational() on the buffer. class pushstring_hack : public cl_spushstring { public: char* start_pointer (void) { return buffer; } char* end_pointer (void) { return buffer+index; } }; static bool number_char_p (char c) { if ((c >= '0') && (c <= '9')) return true; if (((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z'))) return true; switch (c) { case '+': case '-': case '.': case '_': case '/': return true; default: return false; } } const cl_RA read_rational (std::istream& stream, const cl_read_flags& flags) { // One pre-allocated buffer. This reduces the allocation/free cost. static pushstring_hack buffer; var int c; // Skip whitespace at the beginning. loop { c = stream.get(); if (stream.eof() || stream.fail()) goto eof; if ((c == ' ') || (c == '\t') || (c == '\n')) continue; else break; } // Found first non-whitespace character. // Numbers cannot cross lines. We can treat EOF and '\n' the same way. buffer.reset(); if (c == '#') { if (!(flags.lsyntax & lsyntax_commonlisp)) goto syntax1; buffer.push(c); // Read some digits, then a letter, then a token. loop { c = stream.get(); if (stream.eof() || stream.fail()) goto eof; buffer.push(c); if ((c >= '0') && (c <= '9')) continue; else break; } if (!(((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z')))) goto syntax1; c = stream.get(); if (stream.eof() || stream.fail()) goto eof; } // Read a number token. if (!number_char_p(c)) goto syntax1; loop { buffer.push(c); c = stream.peek(); // Avoid fail state on EOF. if (stream.eof() || stream.fail() || !number_char_p(c)) break; c = stream.get(); } // Parse the number. return read_rational(flags, buffer.start_pointer(), buffer.end_pointer(), NULL ); // Handle syntax error. syntax1: buffer.push(c); throw read_number_bad_syntax_exception(buffer.start_pointer(),buffer.end_pointer()); // Handle premature EOF. eof: throw read_number_eof_exception(); } } // namespace cln cln-1.3.3/src/rational/division/0000755000000000000000000000000012173046201013400 5ustar cln-1.3.3/src/rational/division/cl_RA_round2.cc0000644000000000000000000000140411201634740016161 0ustar // round2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_RA_div_t round2 (const cl_RA& x) { // Methode: // x Integer -> (q,r) := (x,0) // x Ratio a/b -> // (round a b) liefert q und r. // Liefere q und r/b (mit b>1 und ggT(r,b)=ggT(r+q*b,b)=ggT(a,b)=1). if (integerp(x)) { DeclareType(cl_I,x); // (q,r) := (x,0) return cl_RA_div_t(x,0); } else { DeclareType(cl_RT,x); var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); var cl_I_div_t q_r = round2(a,b); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_RA_div_t(q,I_I_to_RT(r,b)); } } } // namespace cln cln-1.3.3/src/rational/division/cl_RA_floor22.cc0000644000000000000000000000335211201634740016241 0ustar // floor2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_RA_div_t floor2 (const cl_RA& x, const cl_RA& y) { #if 1 // Ist das wirklich schneller?? // Methode: // x = a/b, y = c/d -> // (floor (* a d) (* b c)) liefert q und r. // Liefere q und r/(b*d). // x Integer -> dito mit b=1. // y Integer -> dito mit d=1. // x und y Integer -> bekannt. if (integerp(x)) { DeclareType(cl_I,x); if (integerp(y)) { DeclareType(cl_I,y); var cl_I_div_t q_r = floor2(x,y); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_RA_div_t(q,r); } else { DeclareType(cl_RT,y); var const cl_I& c = numerator(y); var const cl_I& d = denominator(y); var cl_I_div_t q_r = floor2(x*d,c); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_RA_div_t(q,I_posI_div_RA(r,d)); } } else { DeclareType(cl_RT,x); var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); if (integerp(y)) { DeclareType(cl_I,y); var cl_I_div_t q_r = floor2(a,b*y); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_RA_div_t(q,I_posI_div_RA(r,b)); } else { DeclareType(cl_RT,y); var const cl_I& c = numerator(y); var const cl_I& d = denominator(y); var cl_I_div_t q_r = floor2(a*d,b*c); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_RA_div_t(q,I_posI_div_RA(r,b*d)); } } #else // Methode: // floor2(x/y) -> (q,r). Liefere q und x-y*q=y*r. var cl_RA_div_t q_r = floor2(x/y); var cl_I& q = q_r.quotient; var cl_RA& r = q_r.remainder; return cl_RA_div_t(q,y*r); #endif } } // namespace cln cln-1.3.3/src/rational/division/cl_RA_trunc12.cc0000644000000000000000000000201111201634740016241 0ustar // truncate1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_I truncate1 (const cl_RA& x, const cl_RA& y) { // Methode: // x = a/b, y = c/d -> liefere (truncate (* a d) (* b c)). // x Integer -> dito mit b=1. // y Integer -> dito mit d=1. // x und y Integer -> bekannt. if (integerp(x)) { DeclareType(cl_I,x); if (integerp(y)) { DeclareType(cl_I,y); return truncate1(x,y); } else { DeclareType(cl_RT,y); var const cl_I& c = numerator(y); var const cl_I& d = denominator(y); return truncate1(x*d,c); } } else { DeclareType(cl_RT,x); var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); if (integerp(y)) { DeclareType(cl_I,y); return truncate1(a,b*y); } else { DeclareType(cl_RT,y); var const cl_I& c = numerator(y); var const cl_I& d = denominator(y); return truncate1(a*d,b*c); } } } } // namespace cln cln-1.3.3/src/rational/division/cl_RA_floor1.cc0000644000000000000000000000100211201634740016144 0ustar // floor1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_I floor1 (const cl_RA& x) { // Methode: // x Integer -> q := x // x Ratio a/b -> (floor a b) if (integerp(x)) { DeclareType(cl_I,x); return x; } else { DeclareType(cl_RT,x); var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); return floor1(a,b); } } } // namespace cln cln-1.3.3/src/rational/division/cl_RA_ceil22.cc0000644000000000000000000000337411201634740016040 0ustar // ceiling2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_RA_div_t ceiling2 (const cl_RA& x, const cl_RA& y) { #if 1 // Ist das wirklich schneller?? // Methode: // x = a/b, y = c/d -> // (ceiling (* a d) (* b c)) liefert q und r. // Liefere q und r/(b*d). // x Integer -> dito mit b=1. // y Integer -> dito mit d=1. // x und y Integer -> bekannt. if (integerp(x)) { DeclareType(cl_I,x); if (integerp(y)) { DeclareType(cl_I,y); var cl_I_div_t q_r = ceiling2(x,y); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_RA_div_t(q,r); } else { DeclareType(cl_RT,y); var const cl_I& c = numerator(y); var const cl_I& d = denominator(y); var cl_I_div_t q_r = ceiling2(x*d,c); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_RA_div_t(q,I_posI_div_RA(r,d)); } } else { DeclareType(cl_RT,x); var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); if (integerp(y)) { DeclareType(cl_I,y); var cl_I_div_t q_r = ceiling2(a,b*y); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_RA_div_t(q,I_posI_div_RA(r,b)); } else { DeclareType(cl_RT,y); var const cl_I& c = numerator(y); var const cl_I& d = denominator(y); var cl_I_div_t q_r = ceiling2(a*d,b*c); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_RA_div_t(q,I_posI_div_RA(r,b*d)); } } #else // Methode: // ceiling2(x/y) -> (q,r). Liefere q und x-y*q=y*r. var cl_RA_div_t q_r = ceiling2(x/y); var cl_I& q = q_r.quotient; var cl_RA& r = q_r.remainder; return cl_RA_div_t(q,y*r); #endif } } // namespace cln cln-1.3.3/src/rational/division/cl_RA_round22.cc0000644000000000000000000000335211201634740016247 0ustar // round2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_RA_div_t round2 (const cl_RA& x, const cl_RA& y) { #if 1 // Ist das wirklich schneller?? // Methode: // x = a/b, y = c/d -> // (round (* a d) (* b c)) liefert q und r. // Liefere q und r/(b*d). // x Integer -> dito mit b=1. // y Integer -> dito mit d=1. // x und y Integer -> bekannt. if (integerp(x)) { DeclareType(cl_I,x); if (integerp(y)) { DeclareType(cl_I,y); var cl_I_div_t q_r = round2(x,y); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_RA_div_t(q,r); } else { DeclareType(cl_RT,y); var const cl_I& c = numerator(y); var const cl_I& d = denominator(y); var cl_I_div_t q_r = round2(x*d,c); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_RA_div_t(q,I_posI_div_RA(r,d)); } } else { DeclareType(cl_RT,x); var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); if (integerp(y)) { DeclareType(cl_I,y); var cl_I_div_t q_r = round2(a,b*y); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_RA_div_t(q,I_posI_div_RA(r,b)); } else { DeclareType(cl_RT,y); var const cl_I& c = numerator(y); var const cl_I& d = denominator(y); var cl_I_div_t q_r = round2(a*d,b*c); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_RA_div_t(q,I_posI_div_RA(r,b*d)); } } #else // Methode: // round2(x/y) -> (q,r). Liefere q und x-y*q=y*r. var cl_RA_div_t q_r = round2(x/y); var cl_I& q = q_r.quotient; var cl_RA& r = q_r.remainder; return cl_RA_div_t(q,y*r); #endif } } // namespace cln cln-1.3.3/src/rational/division/cl_RA_trunc2.cc0000644000000000000000000000142011201634740016163 0ustar // truncate2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_RA_div_t truncate2 (const cl_RA& x) { // Methode: // x Integer -> (q,r) := (x,0) // x Ratio a/b -> // (truncate a b) liefert q und r. // Liefere q und r/b (mit b>1 und ggT(r,b)=ggT(r+q*b,b)=ggT(a,b)=1). if (integerp(x)) { DeclareType(cl_I,x); // (q,r) := (x,0) return cl_RA_div_t(x,0); } else { DeclareType(cl_RT,x); var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); var cl_I_div_t q_r = truncate2(a,b); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_RA_div_t(q,I_I_to_RT(r,b)); } } } // namespace cln cln-1.3.3/src/rational/division/cl_RA_floor12.cc0000644000000000000000000000176411201634740016245 0ustar // floor1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_I floor1 (const cl_RA& x, const cl_RA& y) { // Methode: // x = a/b, y = c/d -> liefere (floor (* a d) (* b c)). // x Integer -> dito mit b=1. // y Integer -> dito mit d=1. // x und y Integer -> bekannt. if (integerp(x)) { DeclareType(cl_I,x); if (integerp(y)) { DeclareType(cl_I,y); return floor1(x,y); } else { DeclareType(cl_RT,y); var const cl_I& c = numerator(y); var const cl_I& d = denominator(y); return floor1(x*d,c); } } else { DeclareType(cl_RT,x); var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); if (integerp(y)) { DeclareType(cl_I,y); return floor1(a,b*y); } else { DeclareType(cl_RT,y); var const cl_I& c = numerator(y); var const cl_I& d = denominator(y); return floor1(a*d,b*c); } } } } // namespace cln cln-1.3.3/src/rational/division/cl_RA_ceil12.cc0000644000000000000000000000200211201634740016022 0ustar // ceiling1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_I ceiling1 (const cl_RA& x, const cl_RA& y) { // Methode: // x = a/b, y = c/d -> liefere (ceiling (* a d) (* b c)). // x Integer -> dito mit b=1. // y Integer -> dito mit d=1. // x und y Integer -> bekannt. if (integerp(x)) { DeclareType(cl_I,x); if (integerp(y)) { DeclareType(cl_I,y); return ceiling1(x,y); } else { DeclareType(cl_RT,y); var const cl_I& c = numerator(y); var const cl_I& d = denominator(y); return ceiling1(x*d,c); } } else { DeclareType(cl_RT,x); var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); if (integerp(y)) { DeclareType(cl_I,y); return ceiling1(a,b*y); } else { DeclareType(cl_RT,y); var const cl_I& c = numerator(y); var const cl_I& d = denominator(y); return ceiling1(a*d,b*c); } } } } // namespace cln cln-1.3.3/src/rational/division/cl_RA_trunc22.cc0000644000000000000000000000340511201634740016252 0ustar // truncate2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_RA_div_t truncate2 (const cl_RA& x, const cl_RA& y) { #if 1 // Ist das wirklich schneller?? // Methode: // x = a/b, y = c/d -> // (truncate (* a d) (* b c)) liefert q und r. // Liefere q und r/(b*d). // x Integer -> dito mit b=1. // y Integer -> dito mit d=1. // x und y Integer -> bekannt. if (integerp(x)) { DeclareType(cl_I,x); if (integerp(y)) { DeclareType(cl_I,y); var cl_I_div_t q_r = truncate2(x,y); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_RA_div_t(q,r); } else { DeclareType(cl_RT,y); var const cl_I& c = numerator(y); var const cl_I& d = denominator(y); var cl_I_div_t q_r = truncate2(x*d,c); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_RA_div_t(q,I_posI_div_RA(r,d)); } } else { DeclareType(cl_RT,x); var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); if (integerp(y)) { DeclareType(cl_I,y); var cl_I_div_t q_r = truncate2(a,b*y); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_RA_div_t(q,I_posI_div_RA(r,b)); } else { DeclareType(cl_RT,y); var const cl_I& c = numerator(y); var const cl_I& d = denominator(y); var cl_I_div_t q_r = truncate2(a*d,b*c); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_RA_div_t(q,I_posI_div_RA(r,b*d)); } } #else // Methode: // truncate2(x/y) -> (q,r). Liefere q und x-y*q=y*r. var cl_RA_div_t q_r = truncate2(x/y); var cl_I& q = q_r.quotient; var cl_RA& r = q_r.remainder; return cl_RA_div_t(q,y*r); #endif } } // namespace cln cln-1.3.3/src/rational/division/cl_RA_round12.cc0000644000000000000000000000176411201634740016253 0ustar // round1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_I round1 (const cl_RA& x, const cl_RA& y) { // Methode: // x = a/b, y = c/d -> liefere (round (* a d) (* b c)). // x Integer -> dito mit b=1. // y Integer -> dito mit d=1. // x und y Integer -> bekannt. if (integerp(x)) { DeclareType(cl_I,x); if (integerp(y)) { DeclareType(cl_I,y); return round1(x,y); } else { DeclareType(cl_RT,y); var const cl_I& c = numerator(y); var const cl_I& d = denominator(y); return round1(x*d,c); } } else { DeclareType(cl_RT,x); var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); if (integerp(y)) { DeclareType(cl_I,y); return round1(a,b*y); } else { DeclareType(cl_RT,y); var const cl_I& c = numerator(y); var const cl_I& d = denominator(y); return round1(a*d,b*c); } } } } // namespace cln cln-1.3.3/src/rational/division/cl_RA_ceil2.cc0000644000000000000000000000141411201634740015747 0ustar // ceiling2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_RA_div_t ceiling2 (const cl_RA& x) { // Methode: // x Integer -> (q,r) := (x,0) // x Ratio a/b -> // (ceiling a b) liefert q und r. // Liefere q und r/b (mit b>1 und ggT(r,b)=ggT(r+q*b,b)=ggT(a,b)=1). if (integerp(x)) { DeclareType(cl_I,x); // (q,r) := (x,0) return cl_RA_div_t(x,0); } else { DeclareType(cl_RT,x); var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); var cl_I_div_t q_r = ceiling2(a,b); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_RA_div_t(q,I_I_to_RT(r,b)); } } } // namespace cln cln-1.3.3/src/rational/division/cl_RA_round1.cc0000644000000000000000000000100211201634740016152 0ustar // round1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_I round1 (const cl_RA& x) { // Methode: // x Integer -> q := x // x Ratio a/b -> (round a b) if (integerp(x)) { DeclareType(cl_I,x); return x; } else { DeclareType(cl_RT,x); var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); return round1(a,b); } } } // namespace cln cln-1.3.3/src/rational/division/cl_RA_trunc1.cc0000644000000000000000000000101611201634740016163 0ustar // truncate1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_I truncate1 (const cl_RA& x) { // Methode: // x Integer -> q := x // x Ratio a/b -> (truncate a b) if (integerp(x)) { DeclareType(cl_I,x); return x; } else { DeclareType(cl_RT,x); var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); return truncate1(a,b); } } } // namespace cln cln-1.3.3/src/rational/division/cl_RA_floor2.cc0000644000000000000000000000140411201634740016153 0ustar // floor2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_RA_div_t floor2 (const cl_RA& x) { // Methode: // x Integer -> (q,r) := (x,0) // x Ratio a/b -> // (floor a b) liefert q und r. // Liefere q und r/b (mit b>1 und ggT(r,b)=ggT(r+q*b,b)=ggT(a,b)=1). if (integerp(x)) { DeclareType(cl_I,x); // (q,r) := (x,0) return cl_RA_div_t(x,0); } else { DeclareType(cl_RT,x); var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); var cl_I_div_t q_r = floor2(a,b); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_RA_div_t(q,I_I_to_RT(r,b)); } } } // namespace cln cln-1.3.3/src/rational/division/cl_RA_ceil1.cc0000644000000000000000000000101211201634740015740 0ustar // ceiling1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { const cl_I ceiling1 (const cl_RA& x) { // Methode: // x Integer -> q := x // x Ratio a/b -> (ceiling a b) if (integerp(x)) { DeclareType(cl_I,x); return x; } else { DeclareType(cl_RT,x); var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); return ceiling1(a,b); } } } // namespace cln cln-1.3.3/src/rational/cl_RA.h0000644000000000000000000001007211201634740012707 0ustar // cl_RA internals #ifndef _CL_RA_H #define _CL_RA_H #include "cln/number.h" #include "cln/rational.h" #include "base/cl_macros.h" #include "cln/malloc.h" #include "integer/cl_I.h" namespace cln { struct cl_heap_ratio : cl_heap { cl_I numerator; cl_I denominator; }; inline cl_heap_ratio* TheRatio (cl_heap_ratio* p) { return p; } inline cl_heap_ratio* TheRatio (const cl_number& obj) { return (cl_heap_ratio*)(obj.pointer); } inline cl_heap_ratio* allocate_ratio (const cl_I& num, const cl_I& den) { cl_heap_ratio* p = (cl_heap_ratio*) malloc_hook(sizeof(cl_heap_ratio)); p->refcount = 1; p->type = &cl_class_ratio; p->numerator.pointer = num.pointer; cl_inc_refcount(num); p->denominator.pointer = den.pointer; cl_inc_refcount(den); return p; } // Private constructor. // ptr should be the result of some allocate_ratio() call. inline cl_RA::cl_RA (cl_heap_ratio* ptr) : cl_R ((cl_private_thing) ptr) {} // Both work, but the first definition results in less compiler-generated // temporaries. #if 1 #define Ratio cl_heap_ratio* #else #define Ratio cl_RA #endif // Type tests. inline bool rationalp (const cl_RA& x) { unused x; return true; } inline bool integerp (const cl_RA& x) { if (!x.pointer_p()) return true; else if (x.pointer_type() == &cl_class_bignum) return true; return false; } inline bool ratiop (const cl_RA& x) { if (!x.pointer_p()) return false; else if (x.pointer_type() == &cl_class_bignum) return false; return true; } // A ratio (cl_RT) is a rational number which is not an integer (cl_I). // typedef class cl_RT : public cl_RA { public: }; inline bool integerp (const cl_RT& x) { unused x; return false; } inline bool ratiop (const cl_RT& x) { unused x; return true; } // Access numerator and denominator. inline const cl_I& numerator (const cl_RT& x) { return TheRatio(x)->numerator; } inline const cl_I& denominator (const cl_RT& x) { return TheRatio(x)->denominator; } // Sign test: // (MINUSP x) == (< x 0) inline bool minusp (const cl_RT& x) { return minusp(numerator(x)); } inline bool minusp (const cl_RA& x) { if (ratiop(x)) { DeclareType(cl_RT,x); return minusp(x); } else { DeclareType(cl_I,x); return minusp(x); } } // (ZEROP x) == (= x 0) inline bool zerop (const cl_RT& x) { unused x; return false; } inline bool zerop (const cl_RA& x) { return x.word == cl_combine(cl_FN_tag,0); } // (EQ x y) == (= x y), assuming y a fixnum inline bool eq (const cl_RA& x, sint32 y) { return x.word == cl_combine(cl_FN_tag,y); } // Liefert zu den Integers a und b mit b>1 und ggT(a,b)=1 den Bruch a/b. // I_I_to_RT(a,b) extern const cl_RA I_I_to_RT (const cl_I& a, const cl_I& b); // Liefert zu den Integers a und b mit b>0 und ggT(a,b)=1 den Bruch a/b // (Ratio oder Integer). // I_I_to_RA(a,b) extern const cl_RA I_I_to_RA (const cl_I& a, const cl_I& b); // Liefert zu den Integers a und b mit b>0 den Bruch a/b (Ratio oder Integer). // I_posI_div_RA(a,b) extern const cl_RA I_posI_div_RA (const cl_I& a, const cl_I& b); // Liefert zu den Integers a und b den Bruch a/b (Ratio oder Integer). // I_I_div_RA(a,b) extern const cl_RA I_I_div_RA (const cl_I& a, const cl_I& b); // Liefert den Zähler einer rationalen Zahl. // numerator(r) inline const cl_I numerator (const cl_RA& r) { if (integerp(r)) { DeclareType(cl_I,r); return r; } else return TheRatio(r)->numerator; } // Liefert den Nenner einer rationalen Zahl. // denominator(r) inline const cl_I denominator (const cl_RA& r) { if (integerp(r)) return 1; else return TheRatio(r)->denominator; } // Liefert Zähler und Nenner einer rationalen Zahl. // RA_numden_I_I(r, num=,den=); // > r: rationale Zahl // < num: (numerator r) // < den: (denominator r) #define RA_numden_I_I(r,num_zuweisung,den_zuweisung) \ { if (integerp(r)) \ { num_zuweisung *(const cl_I *)&r; \ den_zuweisung 1; /* Zähler = r, Nenner = 1 */ \ } \ else \ { num_zuweisung TheRatio(r)->numerator; \ den_zuweisung TheRatio(r)->denominator; \ } \ } } // namespace cln #endif /* _CL_RA_H */ cln-1.3.3/src/float/0000755000000000000000000000000012173046176011063 5ustar cln-1.3.3/src/float/random/0000755000000000000000000000000012173046200012327 5ustar cln-1.3.3/src/float/random/cl_F_random.cc0000644000000000000000000000220711201634737015053 0ustar // random_F(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "base/random/cl_random_impl.h" #include "base/digitseq/cl_DS.h" #include "integer/cl_I.h" namespace cln { const cl_F random_F (random_state& randomstate, const cl_F& n) { var uintC d = float_digits(n); // d = (float-digits n) > 0 // Bilde neue UDS mit d Zufallsbits: CL_ALLOCA_STACK; var uintC len = ceiling(d,intDsize); var uintD* MSDptr; num_stack_alloc_1(len,MSDptr=,); random_UDS(randomstate,MSDptr,len); // len (>0) Zufallsdigits // von intDsize*ceiling(d/intDsize) auf d Bits herunterschneiden: { var uintL dr = d % intDsize; if (dr>0) { mspref(MSDptr,0) &= (bit(dr)-1); } } // in Integer umwandeln: var cl_I mant = UDS_to_I(MSDptr,len); // Bilde Zufalls-Float zwischen 0 und 1 // = (scale-float (float Zufalls-Integer,d_Bits n) (- d)) : var cl_F result = scale_float(cl_float(mant,n),-(sintC)d) * n; // result ist ein Zufalls-Float >=0, <=n. if (result == n) // falls (durch Rundung) result=n, durch 0 ersetzen: { result = cl_float(0,result); } return result; } } // namespace cln cln-1.3.3/src/float/dfloat/0000755000000000000000000000000012173046177012335 5ustar cln-1.3.3/src/float/dfloat/algebraic/0000755000000000000000000000000012173046177014246 5ustar cln-1.3.3/src/float/dfloat/algebraic/cl_DF_sqrt.cc0000644000000000000000000001350411201634736016573 0ustar // sqrt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" #include "float/cl_F.h" #include "base/cl_low.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_DF sqrt (const cl_DF& x) { // Methode: // x = 0.0 -> Ergebnis 0.0 // Ergebnis-Vorzeichen := positiv, // Ergebnis-Exponent := ceiling(e/2), // Ergebnis-Mantisse: // Bilde aus [1,m51,...,m0,(55 Nullbits)] bei geradem e, // aus [0,1,m51,...,m0,(54 Nullbits)] bei ungeradem e // die Ganzzahl-Wurzel, eine 54-Bit-Zahl mit einer führenden 1. // Runde das letzte Bit weg: // Bit 0 = 0 -> abrunden, // Bit 0 = 1 und Wurzel exakt -> round-to-even, // Bit 0 = 1 und Rest >0 -> aufrunden. // Dabei um ein Bit nach rechts schieben. // Bei Aufrundung auf 2^53 (rounding overflow) Mantisse um 1 Bit nach rechts // schieben und Exponent incrementieren. #if (cl_word_size==64) // x entpacken: var sintL exp; var uint64 mantx; DF_decode(x, { return x; }, ,exp=,mantx=); // Um die 128-Bit-Ganzzahl-Wurzel ausnutzen zu können, fügen wir beim // Radikanden 74 bzw. 75 statt 54 bzw. 55 Nullbits an. if (exp & bit(0)) // e ungerade { mantx = mantx << (63-(DF_mant_len+1)); exp = exp+1; } else // e gerade { mantx = mantx << (64-(DF_mant_len+1)); } exp = exp >> 1; // exp := exp/2 var uintD mant [128/intDsize]; #if (intDsize==64) arrayLSref(mant,128/intDsize,1) = mantx; arrayLSref(mant,128/intDsize,0) = 0; #else // (intDsize<=32) set_32_Dptr(arrayMSDptr(mant,128/intDsize),(uint32)(mantx>>32)); set_32_Dptr(arrayMSDptr(mant,128/intDsize) mspop 32/intDsize,(uint32)mantx); set_32_Dptr(arrayMSDptr(mant,128/intDsize) mspop 2*32/intDsize,0); set_32_Dptr(arrayMSDptr(mant,128/intDsize) mspop 3*32/intDsize,0); #endif {CL_ALLOCA_STACK; var DS wurzel; var bool exactp; UDS_sqrt(arrayMSDptr(mant,128/intDsize),128/intDsize,arrayLSDptr(mant,128/intDsize), &wurzel, exactp=); // wurzel = isqrt(2^74_75 * mant), eine 64-Bit-Zahl. mantx = get_64_Dptr(wurzel.MSDptr); // Die hinteren 63-DF_mant_len Bits wegrunden: if ( ((mantx & bit(62-DF_mant_len)) ==0) // Bit 10 =0 -> abrunden || ( ((mantx & (bit(62-DF_mant_len)-1)) ==0) // Bit 10 =1 und Bits 9..0 >0 -> aufrunden && exactp // Bit 10 =1 und Bits 9..0 =0, aber Rest -> aufrunden // round-to-even, je nach Bit 11 : && ((mantx & bit(63-DF_mant_len)) ==0) ) ) // abrunden { mantx = mantx >> (63-DF_mant_len); } else // aufrunden { mantx = mantx >> (63-DF_mant_len); mantx += 1; if (mantx >= bit(DF_mant_len+1)) // rounding overflow? { mantx = mantx>>1; exp = exp+1; } } } return encode_DF(0,exp,mantx); #else // x entpacken: var sintL exp; var uint32 manthi; var uint32 mantlo; DF_decode2(x, { return x; }, ,exp=,manthi=,mantlo=); // Um die 128-Bit-Ganzzahl-Wurzel ausnutzen zu können, fügen wir beim // Radikanden 74 bzw. 75 statt 54 bzw. 55 Nullbits an. if (exp & bit(0)) // e ungerade { manthi = (manthi << (63-(DF_mant_len+1))) | (mantlo >> ((DF_mant_len+1)-31)); mantlo = mantlo << (63-(DF_mant_len+1)); exp = exp+1; } else // e gerade { manthi = (manthi << (64-(DF_mant_len+1))) | (mantlo >> ((DF_mant_len+1)-32)); mantlo = mantlo << (64-(DF_mant_len+1)); } exp = exp >> 1; // exp := exp/2 var uintD mant [128/intDsize]; #if (intDsize==32) || (intDsize==16) || (intDsize==8) set_32_Dptr(arrayMSDptr(mant,128/intDsize),manthi); set_32_Dptr(arrayMSDptr(mant,128/intDsize) mspop 32/intDsize,mantlo); set_32_Dptr(arrayMSDptr(mant,128/intDsize) mspop 2*32/intDsize,0); set_32_Dptr(arrayMSDptr(mant,128/intDsize) mspop 3*32/intDsize,0); #else {var uintD* ptr; ptr = arrayLSDptr(mant,128/intDsize); doconsttimes(64/intDsize, { lsprefnext(ptr) = 0; } ); doconsttimes(32/intDsize, { lsprefnext(ptr) = (uintD)mantlo; mantlo = mantlo>>intDsize; } ); doconsttimes(32/intDsize, { lsprefnext(ptr) = (uintD)manthi; manthi = manthi>>intDsize; } ); } #endif {CL_ALLOCA_STACK; var DS wurzel; var bool exactp; UDS_sqrt(arrayMSDptr(mant,128/intDsize),128/intDsize,arrayLSDptr(mant,128/intDsize), &wurzel, exactp=); // wurzel = isqrt(2^74_75 * mant), eine 64-Bit-Zahl. {var uintD* ptr = wurzel.MSDptr; manthi = get_32_Dptr(ptr); mantlo = get_32_Dptr(ptr mspop 32/intDsize); } // Die hinteren 63-DF_mant_len Bits wegrunden: if ( ((mantlo & bit(62-DF_mant_len)) ==0) // Bit 10 =0 -> abrunden || ( ((mantlo & (bit(62-DF_mant_len)-1)) ==0) // Bit 10 =1 und Bits 9..0 >0 -> aufrunden && exactp // Bit 10 =1 und Bits 9..0 =0, aber Rest -> aufrunden // round-to-even, je nach Bit 11 : && ((mantlo & bit(63-DF_mant_len)) ==0) ) ) // abrunden { mantlo = (mantlo >> (63-DF_mant_len)) | (manthi << (DF_mant_len-32+1)); manthi = manthi >> (63-DF_mant_len); } else // aufrunden { mantlo = (mantlo >> (63-DF_mant_len)) | (manthi << (DF_mant_len-32+1)); manthi = manthi >> (63-DF_mant_len); mantlo += 1; if (mantlo==0) { manthi += 1; if (manthi >= bit(DF_mant_len-32+1)) // rounding overflow? { manthi = manthi>>1; exp = exp+1; } } } } return encode_DF(0,exp,manthi,mantlo); #endif } } // namespace cln cln-1.3.3/src/float/dfloat/cl_DF.h0000644000000000000000000003125512034641245013454 0ustar // cl_DF internals #ifndef _CL_DF_H #define _CL_DF_H #include "cln/number.h" #include "cln/malloc.h" #include "base/cl_low.h" #include "float/cl_F.h" #ifdef FAST_DOUBLE #include "base/cl_N.h" #include "float/cl_F.h" #endif namespace cln { typedef // 64-bit float in IEEE format #if (cl_word_size==64) // Sign/Exponent/Mantissa uint64 #else // Sign/Exponent/MantissaHigh and MantissaLow #if defined(double_wordorder_bigendian_p) #if double_wordorder_bigendian_p struct { uint32 semhi, mlo; } #else struct { uint32 mlo, semhi; } #endif #else #if CL_CPU_BIG_ENDIAN_P struct { uint32 semhi, mlo; } #else struct { uint32 mlo, semhi; } #endif #endif #endif dfloat; union dfloatjanus { dfloat eksplicit; // explicit value #ifdef FAST_DOUBLE double machine_double; // value as a C `double' #endif }; struct cl_heap_dfloat : cl_heap { dfloatjanus representation; }; inline cl_heap_dfloat* TheDfloat (const cl_number& obj) { return (cl_heap_dfloat*)(obj.pointer); } inline dfloat& cl_dfloat_value (/* const ?? */ cl_DF& x) { return TheDfloat(x)->representation.eksplicit; } // The double-word contains: // |..|.......|........................................| // sign exponent mantissa #define DF_exp_len 11 // number of bits in the exponent #define DF_mant_len 52 // number of bits in the mantissa // (excluding the hidden bit) #define DF_exp_low 1 // minimum exponent #define DF_exp_mid 1022 // exponent bias #define DF_exp_high 2046 // maximum exponent, 2047 is NaN/Inf #define DF_exp_shift (DF_mant_len+DF_mant_shift) // lowest exponent bit #define DF_mant_shift 0 // lowest mantissa bit #define DF_sign_shift (64 - 1) // = (DF_exp_len+DF_mant_len) // Private constructor. inline cl_DF::cl_DF (cl_heap_dfloat* ptr) : cl_F ((cl_private_thing) ptr) {} extern cl_class cl_class_dfloat; // Builds a float from the explicit words. #if (cl_word_size==64) inline cl_heap_dfloat* allocate_dfloat (dfloat eksplicit) { cl_heap_dfloat* p = (cl_heap_dfloat*) malloc_hook(sizeof(cl_heap_dfloat)); p->refcount = 1; p->type = &cl_class_dfloat; p->representation.eksplicit = eksplicit; return p; } #else inline cl_heap_dfloat* allocate_dfloat (uint32 semhi, uint32 mlo) { cl_heap_dfloat* p = (cl_heap_dfloat*) malloc_hook(sizeof(cl_heap_dfloat)); p->refcount = 1; p->type = &cl_class_dfloat; p->representation.eksplicit.semhi = semhi; p->representation.eksplicit.mlo = mlo; return p; } #endif // Double Float 0.0 extern const cl_DF cl_DF_0; // Double Float 1.0 extern const cl_DF cl_DF_1; // Double Float -1.0 extern const cl_DF cl_DF_minus1; #define dfloat_value representation.eksplicit // Entpacken eines Double-Float: #if (cl_word_size==64) // DF_decode(obj, zero_statement, sign=,exp=,mant=); // zerlegt ein Double-Float obj. // Ist obj=0.0, wird zero_statement ausgeführt. // Sonst: cl_signean sign = Vorzeichen (0 = +, -1 = -), // sintL exp = Exponent (vorzeichenbehaftet), // uintQ mant = Mantisse (>= 2^DF_mant_len, < 2^(DF_mant_len+1)) #define dfloat_value_semhi dfloat_value #define DF_uexp(x) (((x) >> DF_mant_len) & (bit(DF_exp_len)-1)) #define DF_decode(obj, zero_statement, sign_zuweisung,exp_zuweisung,mant_zuweisung) \ { var dfloat _x = TheDfloat(obj)->dfloat_value; \ var uintL uexp = DF_uexp(_x); \ if (uexp==0) \ { zero_statement } /* e=0 -> Zahl 0.0 */ \ else \ { exp_zuweisung (sintL)(uexp - DF_exp_mid); /* Exponent */ \ unused (sign_zuweisung ((sint64)_x >> 63)); /* Vorzeichen */ \ mant_zuweisung (bit(DF_mant_len) | (_x & (bit(DF_mant_len)-1))); \ } } #else // DF_decode2(obj, zero_statement, sign=,exp=,manthi=,mantlo=); // zerlegt ein Double-Float obj. // Ist obj=0.0, wird zero_statement ausgeführt. // Sonst: cl_signean sign = Vorzeichen (0 = +, -1 = -), // sintL exp = Exponent (vorzeichenbehaftet), // uintL manthi,mantlo = Mantisse 2^32*manthi+mantlo // (>= 2^DF_mant_len, < 2^(DF_mant_len+1)) #define dfloat_value_semhi dfloat_value.semhi #define DF_uexp(semhi) (((semhi) >> (DF_mant_len-32)) & (bit(DF_exp_len)-1)) #define DF_decode2(obj, zero_statement, sign_zuweisung,exp_zuweisung,manthi_zuweisung,mantlo_zuweisung) \ { var uint32 semhi = TheDfloat(obj)->dfloat_value.semhi; \ var uint32 mlo = TheDfloat(obj)->dfloat_value.mlo; \ var uintL uexp = DF_uexp(semhi); \ if (uexp==0) \ { zero_statement } /* e=0 -> Zahl 0.0 */ \ else \ { exp_zuweisung (sintL)(uexp - DF_exp_mid); /* Exponent */ \ unused (sign_zuweisung sign_of((sint32)(semhi))); /* Vorzeichen */\ manthi_zuweisung (bit(DF_mant_len-32) | (semhi & (bit(DF_mant_len-32)-1))); \ mantlo_zuweisung mlo; \ } } #endif // Einpacken eines Double-Float: #if (cl_word_size==64) // encode_DF(sign,exp,mant) // liefert ein Double-Float. // > cl_signean sign: Vorzeichen, 0 für +, -1 für negativ. // > sintE exp: Exponent // > uintQ mant: Mantisse, sollte >= 2^DF_mant_len und < 2^(DF_mant_len+1) sein. // < cl_DF ergebnis: ein Double-Float // Der Exponent wird auf Überlauf/Unterlauf getestet. inline const cl_DF encode_DF (cl_signean sign, sintE exp, uintQ mant) { if (exp < (sintE)(DF_exp_low-DF_exp_mid)) { if (underflow_allowed()) { throw floating_point_underflow_exception(); } else { return cl_DF_0; } } else if (exp > (sintE)(DF_exp_high-DF_exp_mid)) { throw floating_point_overflow_exception(); } else return allocate_dfloat ( ((sint64)sign & bit(63)) /* Vorzeichen */ | ((uint64)(exp+DF_exp_mid) << DF_mant_len) /* Exponent */ | ((uint64)mant & (bit(DF_mant_len)-1)) /* Mantisse */ ); } #else // encode_DF(sign,exp,manthi,mantlo) // liefert ein Double-Float. // > cl_signean sign: Vorzeichen, 0 für +, -1 für negativ. // > sintE exp: Exponent // > uintL manthi,mantlo: Mantisse 2^32*manthi+mantlo, // sollte >= 2^DF_mant_len und < 2^(DF_mant_len+1) sein. // < cl_DF ergebnis: ein Double-Float // Der Exponent wird auf Überlauf/Unterlauf getestet. inline const cl_DF encode_DF (cl_signean sign, sintE exp, uintL manthi, uintL mantlo) { if (exp < (sintE)(DF_exp_low-DF_exp_mid)) { if (underflow_allowed()) { throw floating_point_underflow_exception(); } else { return cl_DF_0; } } else if (exp > (sintE)(DF_exp_high-DF_exp_mid)) { throw floating_point_overflow_exception(); } else return allocate_dfloat ( ((sint32)sign & bit(31)) /* Vorzeichen */ | ((uint32)(exp+DF_exp_mid) << (DF_mant_len-32)) /* Exponent */ | ((uint32)manthi & (bit(DF_mant_len-32)-1)) /* Mantisse */ , mantlo ); } #endif #ifdef FAST_DOUBLE // Auspacken eines Double: inline double DF_to_double (const cl_DF& obj) { return TheDfloat(obj)->representation.machine_double; } // Überprüfen und Einpacken eines von den 'double'-Routinen gelieferten // IEEE-Floats. // Klassifikation: // 1 <= e <= 2046 : normalisierte Zahl // e=0, m/=0: subnormale Zahl // e=0, m=0: vorzeichenbehaftete 0.0 // e=2047, m=0: vorzeichenbehaftete Infinity // e=2047, m/=0: NaN // Angabe der möglicherweise auftretenden Sonderfälle: // maybe_overflow: Operation läuft über, liefert IEEE-Infinity // maybe_subnormal: Ergebnis sehr klein, liefert IEEE-subnormale Zahl // maybe_underflow: Ergebnis sehr klein und /=0, liefert IEEE-Null // maybe_divide_0: Ergebnis unbestimmt, liefert IEEE-Infinity // maybe_nan: Ergebnis unbestimmt, liefert IEEE-NaN #if (cl_word_size==64) #define double_to_DF(expr,ergebnis_zuweisung,maybe_overflow,maybe_subnormal,maybe_underflow,maybe_divide_0,maybe_nan) \ { var dfloatjanus _erg; _erg.machine_double = (expr); \ if ((_erg.eksplicit & ((uint64)bit(DF_exp_len+DF_mant_len)-bit(DF_mant_len))) == 0) /* e=0 ? */\ { if ((maybe_underflow \ || (maybe_subnormal && !((_erg.eksplicit << 1) == 0)) \ ) \ && underflow_allowed() \ ) \ { throw floating_point_underflow_exception(); } /* subnormal oder noch kleiner -> Underflow */\ else \ { ergebnis_zuweisung cl_DF_0; } /* +/- 0.0 -> 0.0 */ \ } \ elif ((maybe_overflow || maybe_divide_0) \ && (((~_erg.eksplicit) & ((uint64)bit(DF_exp_len+DF_mant_len)-bit(DF_mant_len))) == 0) /* e=2047 ? */\ ) \ { if (maybe_nan && !((_erg.eksplicit<<(64-DF_mant_len)) == 0)) \ { throw division_by_0_exception(); } /* NaN, also Singularität -> "Division durch 0" */\ else /* Infinity */ \ if (!maybe_overflow || maybe_divide_0) \ { throw division_by_0_exception(); } /* Infinity, Division durch 0 */\ else \ { throw floating_point_overflow_exception(); } /* Infinity, Overflow */\ } \ else \ { ergebnis_zuweisung allocate_dfloat(_erg.eksplicit); } \ } #else #define double_to_DF(expr,ergebnis_zuweisung,maybe_overflow,maybe_subnormal,maybe_underflow,maybe_divide_0,maybe_nan) \ { var dfloatjanus _erg; _erg.machine_double = (expr); \ if ((_erg.eksplicit.semhi & ((uint32)bit(DF_exp_len+DF_mant_len-32)-bit(DF_mant_len-32))) == 0) /* e=0 ? */\ { if ((maybe_underflow \ || (maybe_subnormal \ && !(((_erg.eksplicit.semhi << 1) == 0) && (_erg.eksplicit.mlo == 0)) \ ) ) \ && underflow_allowed() \ ) \ { throw floating_point_underflow_exception(); } /* subnormal oder noch kleiner -> Underflow */\ else \ { ergebnis_zuweisung cl_DF_0; } /* +/- 0.0 -> 0.0 */\ } \ elif ((maybe_overflow || maybe_divide_0) \ && (((~_erg.eksplicit.semhi) & ((uint32)bit(DF_exp_len+DF_mant_len-32)-bit(DF_mant_len-32))) == 0) /* e=2047 ? */\ ) \ { if (maybe_nan && !(((_erg.eksplicit.semhi<<(64-DF_mant_len)) == 0) && (_erg.eksplicit.mlo==0))) \ { throw division_by_0_exception(); } /* NaN, also Singularität -> "Division durch 0" */\ else /* Infinity */\ if (!maybe_overflow || maybe_divide_0) \ { throw division_by_0_exception(); } /* Infinity, Division durch 0 */\ else \ { throw floating_point_overflow_exception(); } /* Infinity, Overflow */\ } \ else \ { ergebnis_zuweisung allocate_dfloat(_erg.eksplicit.semhi,_erg.eksplicit.mlo); } \ } #endif #endif // Liefert zu einem Double-Float x : (futruncate x), ein DF. // x wird von der 0 weg zur nächsten ganzen Zahl gerundet. extern const cl_DF futruncate (const cl_DF& x); // DF_to_I(x) wandelt ein Double-Float x, das eine ganze Zahl darstellt, // in ein Integer um. extern const cl_I cl_DF_to_I (const cl_DF& x); // cl_I_to_DF(x) wandelt ein Integer x in ein Double-Float um und rundet dabei. extern const cl_DF cl_I_to_DF (const cl_I& x); // cl_RA_to_DF(x) wandelt eine rationale Zahl x in ein Double-Float um // und rundet dabei. extern const cl_DF cl_RA_to_DF (const cl_RA& x); // IEEE-Double-Float: // Bit 63 = s, Bits 62..52 = e, Bits 51..0 = m. // e=0, m=0: vorzeichenbehaftete 0.0 // e=0, m/=0: subnormale Zahl, // Wert = (-1)^s * 2^(1-1022) * [ 0 . 0 m51 ... m0 ] // 1 <= e <= 2046 : normalisierte Zahl, // Wert = (-1)^s * 2^(e-1022) * [ 0 . 1 m51 ... m0 ] // e=2047, m=0: vorzeichenbehaftete Infinity // e=2047, m/=0: NaN // cl_double_to_DF_pointer(val) wandelt ein IEEE-Double-Float val in ein Double-Float um. extern cl_heap_dfloat* cl_double_to_DF_pointer (const double val); // cl_DF_to_double(obj,&val); // wandelt ein Double-Float obj in ein IEEE-Double-Float val um. extern void cl_DF_to_double (const cl_DF& obj, dfloatjanus* val_); } // namespace cln #endif /* _CL_DF_H */ cln-1.3.3/src/float/dfloat/conv/0000755000000000000000000000000012173046177013302 5ustar cln-1.3.3/src/float/dfloat/conv/cl_I_to_double.cc0000644000000000000000000001377611201634736016524 0ustar // double_approx(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "float/dfloat/cl_DF.h" #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "float/cl_F.h" namespace cln { double double_approx (const cl_I& x) { // Method: same as cl_I_to_DF(). if (eq(x,0)) { return 0.0; } var cl_signean sign = -(cl_signean)minusp(x); // Vorzeichen var cl_I abs_x = (sign==0 ? x : -x); var uintC exp = integer_length(abs_x); // (integer-length x) // NDS zu |x|>0 bilden: var const uintD* MSDptr; var uintC len; I_to_NDS_nocopy(abs_x, MSDptr=,len=,,false,); // MSDptr/len/LSDptr ist die NDS zu x, len>0. // Führende Digits holen: Brauche DF_mant_len+1 Bits, dazu intDsize // Bits (die NDS kann mit bis zu intDsize Nullbits anfangen). // Dann werden diese Bits um (exp mod intDsize) nach rechts geschoben. var uintD msd = msprefnext(MSDptr); // erstes Digit #if (cl_word_size==64) var uint64 msdd = 0; // weitere min(len-1,64/intDsize) Digits #define NEXT_DIGIT(i) \ { if (--len == 0) goto ok; \ msdd |= (uint64)msprefnext(MSDptr) << (64-(i+1)*intDsize); \ } DOCONSTTIMES(64/intDsize,NEXT_DIGIT); #undef NEXT_DIGIT #else var uint32 msdd = 0; // weitere min(len-1,32/intDsize) Digits var uint32 msddf = 0; // weitere maximal 32/intDsize Digits #define NEXT_DIGIT(i) \ { if (--len == 0) goto ok; \ msdd |= (uint32)msprefnext(MSDptr) << (32-(i+1)*intDsize); \ } DOCONSTTIMES(32/intDsize,NEXT_DIGIT); #undef NEXT_DIGIT #define NEXT_DIGIT(i) \ { if (--len == 0) goto ok; \ msddf |= (uint32)msprefnext(MSDptr) << (32-(i+1)*intDsize); \ } DOCONSTTIMES(32/intDsize,NEXT_DIGIT); #undef NEXT_DIGIT #endif --len; ok: #if (cl_word_size==64) // Die NDS besteht aus msd, msdd und len weiteren Digits. // Das höchste in 2^64*msd+msdd gesetzte Bit ist Bit Nummer // 63 + (exp mod intDsize). var uintL shiftcount = exp % intDsize; var uint64 mant = // führende 64 Bits (shiftcount==0 ? msdd : (((uint64)msd << (64-shiftcount)) | (msdd >> shiftcount)) ); // Das höchste in mant gesetzte Bit ist Bit Nummer 63. if ( ((mant & bit(62-DF_mant_len)) ==0) // Bit 10 =0 -> abrunden || ( ((mant & (bit(62-DF_mant_len)-1)) ==0) // Bit 10 =1 und Bits 9..0 =0 && ((msdd & (bit(shiftcount)-1)) ==0) // und weitere Bits aus msddf =0 && (!test_loop_msp(MSDptr,len)) // und alle weiteren Digits =0 // round-to-even, je nach Bit 11 : && ((mant & bit(63-DF_mant_len)) ==0) ) ) // abrunden { mant = mant >> (63-DF_mant_len); } else // aufrunden { mant = mant >> (63-DF_mant_len); mant += 1; if (mant >= bit(DF_mant_len+1)) // rounding overflow? { mant = mant>>1; exp = exp+1; } } union { dfloat eksplicit; double machine_double; } u; if ((sintL)exp > (sintL)(DF_exp_high-DF_exp_mid)) { u.eksplicit = ((sint64)sign & bit(63)) | ((uint64)(bit(DF_exp_len)-1) << DF_mant_len); // Infinity } else { u.eksplicit = ((sint64)sign & bit(63)) /* Vorzeichen */ | ((uint64)((sintL)exp+DF_exp_mid) << DF_mant_len) /* Exponent */ | ((uint64)mant & (bit(DF_mant_len)-1)); /* Mantisse */ } return u.machine_double; #else // Die NDS besteht aus msd, msdd, msddf und len weiteren Digits. // Das höchste in 2^64*msd+2^32*msdd+msddf gesetzte Bit ist Bit Nummer // 63 + (exp mod intDsize). var uintL shiftcount = exp % intDsize; var uint32 manthi; // führende 32 Bits var uint32 mantlo; // nächste 32 Bits if (shiftcount==0) { manthi = msdd; mantlo = msddf; } else { manthi = ((uint32)msd << (32-shiftcount)) | (msdd >> shiftcount); mantlo = (msdd << (32-shiftcount)) | (msddf >> shiftcount); } // Das höchste in mant gesetzte Bit ist Bit Nummer 63. if ( ((mantlo & bit(62-DF_mant_len)) ==0) // Bit 10 =0 -> abrunden || ( ((mantlo & (bit(62-DF_mant_len)-1)) ==0) // Bit 10 =1 und Bits 9..0 =0 && ((msddf & (bit(shiftcount)-1)) ==0) // und weitere Bits aus msddf =0 && (!test_loop_msp(MSDptr,len)) // und alle weiteren Digits =0 // round-to-even, je nach Bit 11 : && ((mantlo & bit(63-DF_mant_len)) ==0) ) ) // abrunden { mantlo = (mantlo >> (63-DF_mant_len)) | (manthi << (DF_mant_len-32+1)); manthi = manthi >> (63-DF_mant_len); } else // aufrunden { mantlo = (mantlo >> (63-DF_mant_len)) | (manthi << (DF_mant_len-32+1)); manthi = manthi >> (63-DF_mant_len); mantlo += 1; if (mantlo==0) { manthi += 1; if (manthi >= bit(DF_mant_len-32+1)) // rounding overflow? { manthi = manthi>>1; exp = exp+1; } } } union { dfloat eksplicit; double machine_double; } u; if ((sintL)exp > (sintL)(DF_exp_high-DF_exp_mid)) { u.eksplicit.semhi = ((sint32)sign & bit(31)) | ((uint32)(bit(DF_exp_len)-1) << (DF_mant_len-32)); // Infinity u.eksplicit.mlo = 0; } else { u.eksplicit.semhi = ((sint32)sign & bit(31)) /* Vorzeichen */ | ((uint32)((sintL)exp+DF_exp_mid) << (DF_mant_len-32)) /* Exponent */ | ((uint32)manthi & (bit(DF_mant_len-32)-1)); /* Mantisse */ u.eksplicit.mlo = mantlo; } return u.machine_double; #endif } } // namespace cln cln-1.3.3/src/float/dfloat/conv/cl_DF_from_double.cc0000644000000000000000000000453011201634736017132 0ustar // cl_double_to_DF_pointer(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/dfloat/cl_DF.h" // Implementation. namespace cln { cl_heap_dfloat* cl_double_to_DF_pointer (const double x) { var union { dfloat eksplicit; double machine_double; } u; u.machine_double = x; var dfloat val = u.eksplicit; #if (cl_word_size==64) var uintL exp = (val >> DF_mant_len) & (bit(DF_exp_len)-1); // e if (exp == 0) // e=0 ? // vorzeichenbehaftete 0.0 oder subnormale Zahl { if (!((val << 1) == 0) && underflow_allowed()) { throw floating_point_underflow_exception(); } else { return cl_DF_0; } // +/- 0.0 -> 0.0 } elif (exp == 2047) // e=2047 ? { if (!((val << (64-DF_mant_len)) == 0)) { throw floating_point_nan_exception(); } // NaN else { throw floating_point_overflow_exception(); } // Infinity, Overflow } else { // Der Exponent muß um DF_exp_mid-1022 erhöht werden. if ((DF_exp_mid>1022) && (exp > DF_exp_high-DF_exp_mid+1022)) { throw floating_point_overflow_exception(); } // Overflow val += (sint64)(DF_exp_mid - 1022) << DF_mant_len; return allocate_dfloat(val); } #else var uintL exp = (val.semhi >> (DF_mant_len-32)) & (bit(DF_exp_len)-1); // e if (exp == 0) // e=0 ? // vorzeichenbehaftete 0.0 oder subnormale Zahl { if (!(((val.semhi << 1) == 0) && (val.mlo == 0)) && underflow_allowed()) { throw floating_point_underflow_exception(); } else { return cl_DF_0; } // +/- 0.0 -> 0.0 } elif (exp == 2047) // e=2047 ? { if (!(((val.semhi << (64-DF_mant_len)) == 0) && (val.mlo == 0))) { throw floating_point_nan_exception(); } // NaN else { throw floating_point_overflow_exception(); } // Infinity, Overflow } else { // Der Exponent muß um DF_exp_mid-1022 erhöht werden. if ((DF_exp_mid>1022) && (exp > DF_exp_high-DF_exp_mid+1022)) { throw floating_point_overflow_exception(); } // Overflow val.semhi += (sint32)(DF_exp_mid - 1022) << (DF_mant_len-32); return allocate_dfloat(val.semhi,val.mlo); } #endif } } // namespace cln cln-1.3.3/src/float/dfloat/conv/cl_DF_to_doublej.cc0000644000000000000000000000333511201634736016765 0ustar // cl_DF_to_double(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/dfloat/cl_DF.h" // Implementation. namespace cln { void cl_DF_to_double (const cl_DF& obj, dfloatjanus* val_) { var dfloat val = TheDfloat(obj)->dfloat_value; // Der Exponent muß um DF_exp_mid-1022 erniedrigt werden. if (DF_exp_mid>1022) #if (cl_word_size==64) { var uintL exp = (val >> DF_mant_len) & (bit(DF_exp_len)-1); // e if (exp < DF_exp_mid-1022+1) { // produziere denormalisiertes Float val = (val & minus_bit(DF_exp_len+DF_mant_len)) // selbes Vorzeichen | ((sint64)0 << DF_mant_len) // Exponent 0 | (((val & (bit(DF_mant_len)-1)) | bit(DF_mant_len)) // Mantisse shiften >> (DF_exp_mid-1022+1 - exp) // shiften ); } else { val -= (sint64)(DF_exp_mid - 1022) << DF_mant_len; } } #else { var uintL exp = (val.semhi >> (DF_mant_len-32)) & (bit(DF_exp_len)-1); // e if (exp < DF_exp_mid-1022+1) { // produziere denormalisiertes Float var uintL shiftcount = DF_exp_mid-1022+1 - exp; val.mlo = val.mlo >> shiftcount; // Mantisse shiften val.mlo |= val.semhi << (32-shiftcount); val.semhi = (val.semhi & minus_bit(DF_exp_len+DF_mant_len-32)) // selbes Vorzeichen | ((sint32)0 << (DF_mant_len-32)) // Exponent 0 | (((val.semhi & (bit(DF_mant_len-32)-1)) | bit(DF_mant_len-32)) // Mantisse shiften >> shiftcount // shiften ); } else { val.semhi -= (sint32)(DF_exp_mid - 1022) << (DF_mant_len-32); } } #endif val_->eksplicit = val; } } // namespace cln cln-1.3.3/src/float/dfloat/conv/cl_RA_to_double.cc0000644000000000000000000001532711252534244016627 0ustar // double_approx(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "float/dfloat/cl_DF.h" #include "rational/cl_RA.h" #include "cln/integer.h" #include "integer/cl_I.h" #include "float/cl_F.h" namespace cln { double double_approx (const cl_RA& x) { // Method: same as cl_RA_to_DF(). if (integerp(x)) { DeclareType(cl_I,x); return double_approx(x); } { // x Ratio DeclareType(cl_RT,x); union { dfloat eksplicit; double machine_double; } u; var cl_I a = numerator(x); // +/- a var const cl_I& b = denominator(x); // b var cl_signean sign = -(cl_signean)minusp(a); // Vorzeichen if (!(sign==0)) { a = -a; } // Betrag nehmen, liefert a var sintC lendiff = (sintC)integer_length(a) // (integer-length a) - (sintC)integer_length(b); // (integer-length b) if (lendiff > DF_exp_high-DF_exp_mid) // Exponent >= n-m > Obergrenze ? { #if (cl_word_size==64) u.eksplicit = ((sint64)sign & bit(63)) | ((uint64)(bit(DF_exp_len)-1) << DF_mant_len); // Infinity #else u.eksplicit.semhi = ((sint32)sign & bit(31)) | ((uint32)(bit(DF_exp_len)-1) << (DF_mant_len-32)); // Infinity u.eksplicit.mlo = 0; #endif return u.machine_double; } if (lendiff < DF_exp_low-DF_exp_mid-2) // Exponent <= n-m+2 < Untergrenze ? { #if (cl_word_size==64) u.eksplicit = ((sint64)sign & bit(63)); // 0.0 #else u.eksplicit.semhi = ((sint32)sign & bit(31)); // 0.0 u.eksplicit.mlo = 0; #endif return u.machine_double; } var cl_I zaehler; var cl_I nenner; if (lendiff >= DF_mant_len+2) // n-m-54>=0 { nenner = ash(b,lendiff - (DF_mant_len+2)); // (ash b n-m-54) zaehler = a; // a } else { zaehler = ash(a,(DF_mant_len+2) - lendiff); // (ash a -n+m+54) nenner = b; // b } // Division zaehler/nenner durchführen: var cl_I_div_t q_r = cl_divide(zaehler,nenner); var cl_I& q = q_r.quotient; // 2^53 <= q < 2^55 var cl_I& r = q_r.remainder; #if (cl_word_size==64) # if (cl_value_len-1 > 55) var uint64 mant = FN_to_V(q); // q is a fixnum! # elif (cl_value_len-1 <= 53) var uint64 mant = get_max64_Dptr(55,BN_MSDptr(q)); // q is a bignum! # else var uint64 mant = fixnump(q) ? FN_to_V(q) : get_max64_Dptr(55,BN_MSDptr(q)); # endif if (mant >= bit(DF_mant_len+2)) // 2^54 <= q < 2^55, schiebe um 2 Bits nach rechts { var uint64 rounding_bits = mant & (bit(2)-1); lendiff = lendiff+1; // Exponent := n-m+1 mant = mant >> 2; if ( (rounding_bits < bit(1)) // 00,01 werden abgerundet || ( (rounding_bits == bit(1)) // 10 && (eq(r,0)) // und genau halbzahlig (r=0) && ((mant & bit(0)) ==0) // -> round-to-even ) ) // abrunden goto ab; else // aufrunden goto auf; } else { var uint64 rounding_bit = mant & bit(0); mant = mant >> 1; if ( (rounding_bit == 0) // 0 wird abgerundet || ( (eq(r,0)) // genau halbzahlig (r=0) && ((mant & bit(0)) ==0) // -> round-to-even ) ) // abrunden goto ab; else // aufrunden goto auf; } auf: mant += 1; if (mant >= bit(DF_mant_len+1)) // rounding overflow? { mant = mant>>1; lendiff = lendiff+1; } ab: // Fertig. if (lendiff < (sintL)(DF_exp_low-DF_exp_mid)) { u.eksplicit = ((sint64)sign & bit(63)); } // 0.0 else if (lendiff > (sintL)(DF_exp_high-DF_exp_mid)) { u.eksplicit = ((sint64)sign & bit(63)) | ((uint64)(bit(DF_exp_len)-1) << DF_mant_len); // Infinity } else { u.eksplicit = ((sint64)sign & bit(63)) /* Vorzeichen */ | ((uint64)(lendiff+DF_exp_mid) << DF_mant_len) /* Exponent */ | ((uint64)mant & (bit(DF_mant_len)-1)); /* Mantisse */ } return u.machine_double; #else // q is bignum with ceiling(55/intDsize) Digits. var const uintD* ptr = BN_MSDptr(q); var uint32 manthi = get_max32_Dptr(23,ptr); var uint32 mantlo = get_32_Dptr(ptr mspop ceiling(23,intDsize)); if (manthi >= bit(DF_mant_len-32+2)) // 2^54 <= q < 2^55, schiebe um 2 Bits nach rechts { var uintL rounding_bits = mantlo & (bit(2)-1); lendiff = lendiff+1; // Exponent := n-m+1 mantlo = (mantlo >> 2) | (manthi << 30); manthi = manthi >> 2; if ( (rounding_bits < bit(1)) // 00,01 werden abgerundet || ( (rounding_bits == bit(1)) // 10 && (eq(r,0)) // und genau halbzahlig (r=0) && ((mantlo & bit(0)) ==0) // -> round-to-even ) ) // abrunden goto ab; else // aufrunden goto auf; } else { var uintL rounding_bit = mantlo & bit(0); mantlo = (mantlo >> 1) | (manthi << 31); manthi = manthi >> 1; if ( (rounding_bit == 0) // 0 wird abgerundet || ( (eq(r,0)) // genau halbzahlig (r=0) && ((mantlo & bit(0)) ==0) // -> round-to-even ) ) // abrunden goto ab; else // aufrunden goto auf; } auf: mantlo += 1; if (mantlo==0) { manthi += 1; if (manthi >= bit(DF_mant_len-32+1)) // rounding overflow? { manthi = manthi>>1; lendiff = lendiff+1; } } ab: // Fertig. if (lendiff < (sintL)(DF_exp_low-DF_exp_mid)) { u.eksplicit.semhi = ((sint32)sign & bit(31)); // 0.0 u.eksplicit.mlo = 0; } else if (lendiff > (sintL)(DF_exp_high-DF_exp_mid)) { u.eksplicit.semhi = ((sint32)sign & bit(31)) | ((uint32)(bit(DF_exp_len)-1) << (DF_mant_len-32)); // Infinity u.eksplicit.mlo = 0; } else { u.eksplicit.semhi = ((sint32)sign & bit(31)) /* Vorzeichen */ | ((uint32)(lendiff+DF_exp_mid) << (DF_mant_len-32)) /* Exponent */ | ((uint32)manthi & (bit(DF_mant_len-32)-1)); /* Mantisse */ u.eksplicit.mlo = mantlo; } return u.machine_double; #endif }} } // namespace cln cln-1.3.3/src/float/dfloat/misc/0000755000000000000000000000000012173046177013270 5ustar cln-1.3.3/src/float/dfloat/misc/cl_DF_decode.cc0000644000000000000000000000174611201634736016054 0ustar // decode_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" #include "integer/cl_I.h" namespace cln { const decoded_dfloat decode_float (const cl_DF& x) { // x entpacken: var cl_signean sign; var sintL exp; #if (cl_word_size==64) var uint64 mant; DF_decode(x, { return decoded_dfloat(cl_DF_0, 0, cl_DF_1); }, sign=,exp=,mant= ); return decoded_dfloat( encode_DF(0,0,mant), // (-1)^0 * 2^0 * m erzeugen L_to_FN(exp), // e als Fixnum encode_DF(sign,1,bit(DF_mant_len)) // (-1)^s erzeugen ); #else var uint32 manthi; var uint32 mantlo; DF_decode2(x, { return decoded_dfloat(cl_DF_0, 0, cl_DF_1); }, sign=,exp=,manthi=,mantlo= ); return decoded_dfloat( encode_DF(0,0,manthi,mantlo), // (-1)^0 * 2^0 * m erzeugen L_to_FN(exp), // e als Fixnum encode_DF(sign,1,bit(DF_mant_len-32),0) // (-1)^s erzeugen ); #endif } } // namespace cln cln-1.3.3/src/float/dfloat/misc/cl_DF_debug.cc0000644000000000000000000000105411201634736015707 0ustar // cl_DF debugging support. // General includes. #include "base/cl_sysdep.h" // Specification. // Implementation. #include "cln/dfloat.h" #include "cln/io.h" #include "cln/float_io.h" namespace cln { static void dprint (cl_heap* pointer) { var const cl_DF& obj = *(const cl_DF*)&pointer; fprint(cl_debugout, "(cl_DF) "); fprint(cl_debugout, obj); } AT_INITIALIZATION(dprint_DF) { cl_register_type_printer(cl_class_dfloat,dprint); } // This dummy links in this module when requires it. int cl_DF_debug_module; } // namespace cln cln-1.3.3/src/float/dfloat/misc/cl_DF_max.cc0000644000000000000000000000036211201634736015407 0ustar // max(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. namespace cln { const cl_DF max (const cl_DF& x, const cl_DF& y) { return (x >= y ? x : y); } } // namespace cln cln-1.3.3/src/float/dfloat/misc/cl_DF_signum.cc0000644000000000000000000000104311201634736016121 0ustar // signum(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" #include "base/cl_inline.h" #include "float/dfloat/elem/cl_DF_minusp.cc" #include "float/dfloat/elem/cl_DF_zerop.cc" namespace cln { CL_INLINE2 const cl_DF CL_INLINE2_DECL(signum) (const cl_DF& x) { if (minusp_inline(x)) { return cl_DF_minus1; } // x<0 -> -1.0 elif (zerop_inline(x)) { return cl_DF_0; } // x=0 -> 0.0 else { return cl_DF_1; } // x>0 -> +1.0 } } // namespace cln cln-1.3.3/src/float/dfloat/misc/cl_DF_exponent.cc0000644000000000000000000000062011201634736016457 0ustar // float_exponent(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" namespace cln { CL_INLINE sintE CL_INLINE_DECL(float_exponent) (const cl_DF& x) { var uintL uexp = DF_uexp(TheDfloat(x)->dfloat_value_semhi); if (uexp==0) { return 0; } return (sintL)(uexp - DF_exp_mid); } } // namespace cln cln-1.3.3/src/float/dfloat/misc/cl_DF_as.cc0000644000000000000000000000103611201634736015224 0ustar // cl_DF_As(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "base/cl_N.h" namespace cln { inline bool cl_DF_p (const cl_number& x) { if (x.pointer_p()) if (x.heappointer->type == &cl_class_dfloat) return true; return false; } const cl_DF& cl_DF_As (const cl_number& x, const char * filename, int line) { if (cl_DF_p(x)) { DeclareType(cl_DF,x); return x; } else throw as_exception(x,"a double-float number",filename,line); } } // namespace cln cln-1.3.3/src/float/dfloat/misc/cl_DF_eqhashcode.cc0000644000000000000000000000132511201634736016726 0ustar // cl_DF equal_hashcode(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "base/cl_N.h" #include "float/dfloat/cl_DF.h" namespace cln { CL_INLINE uint32 CL_INLINE_DECL(equal_hashcode) (const cl_DF& x) { var cl_signean sign; var sintL exp; #if (cl_word_size==64) var uint64 mant; DF_decode(x, { return 0; }, sign=,exp=,mant=); var uint32 msd = mant >> ((DF_mant_len+1)-32); #else var uint32 manthi; var uint32 mantlo; DF_decode2(x, { return 0; }, sign=,exp=,manthi=,mantlo=); var uint32 msd = (manthi << (64-(DF_mant_len+1))) | (mantlo >> ((DF_mant_len+1)-32)); #endif return equal_hashcode_low(msd,exp,sign); } } // namespace cln cln-1.3.3/src/float/dfloat/misc/cl_DF_class.cc0000644000000000000000000000051111201634736015723 0ustar // cl_class_dfloat. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. namespace cln { cl_class cl_class_dfloat = { NULL, // empty destructor cl_class_flags_subclass_complex | cl_class_flags_subclass_real | cl_class_flags_subclass_float }; } // namespace cln cln-1.3.3/src/float/dfloat/misc/cl_DF_sign.cc0000644000000000000000000000071211201634736015561 0ustar // float_sign(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" #include "base/cl_inline.h" #include "float/dfloat/elem/cl_DF_minusp.cc" namespace cln { CL_INLINE2 const cl_DF CL_INLINE2_DECL(float_sign) (const cl_DF& x) { // Methode: x>=0 -> Ergebnis 1.0; x<0 -> Ergebnis -1.0 return (!minusp_inline(x) ? cl_DF_1 : cl_DF_minus1); } } // namespace cln cln-1.3.3/src/float/dfloat/misc/cl_DF_idecode.cc0000644000000000000000000000203411201634736016214 0ustar // integer_decode_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" #include "integer/cl_I.h" namespace cln { CL_INLINE const cl_idecoded_float CL_INLINE_DECL(integer_decode_float) (const cl_DF& x) { // x entpacken: var cl_signean sign; var sintL exp; #if (cl_word_size==64) var uint64 mant; DF_decode(x, { return cl_idecoded_float(0, 0, 1); }, sign=,exp=,mant= ); return cl_idecoded_float( Q_to_I(mant), // Mantisse (>0, <2^53) als Bignum L_to_FN(exp-(DF_mant_len+1)), // e-53 als Fixnum (sign>=0 ? cl_I(1) : cl_I(-1)) // (-1)^s erzeugen ); #else var uint32 manthi; var uint32 mantlo; DF_decode2(x, { return cl_idecoded_float(0, 0, 1); }, sign=,exp=,manthi=,mantlo= ); return cl_idecoded_float( L2_to_I(manthi,mantlo), // Mantisse (>0, <2^53) als Bignum L_to_FN(exp-(DF_mant_len+1)), // e als Fixnum (sign>=0 ? cl_I(1) : cl_I(-1)) // (-1)^s erzeugen ); #endif } } // namespace cln cln-1.3.3/src/float/dfloat/misc/cl_DF_abs.cc0000644000000000000000000000054211201634736015367 0ustar // abs(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "base/cl_inline.h" #include "float/dfloat/elem/cl_DF_minusp.cc" namespace cln { const cl_DF CL_FLATTEN abs (const cl_DF& x) { // x<0 -> (- x), x>=0 -> x if (minusp(x)) return -x; else return x; } } // namespace cln cln-1.3.3/src/float/dfloat/misc/cl_DF_min.cc0000644000000000000000000000036211201634736015405 0ustar // min(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. namespace cln { const cl_DF min (const cl_DF& x, const cl_DF& y) { return (x <= y ? x : y); } } // namespace cln cln-1.3.3/src/float/dfloat/misc/cl_DF_digits.cc0000644000000000000000000000046711201634736016113 0ustar // float_digits(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" namespace cln { CL_INLINE uintC CL_INLINE_DECL(float_digits) (const cl_DF& x) { unused x; return DF_mant_len+1; // 53 } } // namespace cln cln-1.3.3/src/float/dfloat/misc/cl_DF_precision.cc0000644000000000000000000000063511201634736016620 0ustar // float_precision(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" #include "base/cl_inline.h" #include "float/dfloat/elem/cl_DF_zerop.cc" namespace cln { CL_INLINE2 uintC CL_INLINE2_DECL(float_precision) (const cl_DF& x) { if (zerop_inline(x)) return 0; return DF_mant_len+1; // 53 } } // namespace cln cln-1.3.3/src/float/dfloat/elem/0000755000000000000000000000000012173046177013257 5ustar cln-1.3.3/src/float/dfloat/elem/cl_DF_scale_I.cc0000644000000000000000000000351711201634736016155 0ustar // scale_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" #include "float/cl_F.h" #include "integer/cl_I.h" namespace cln { const cl_DF scale_float (const cl_DF& x, const cl_I& delta) { // Methode: // x=0.0 -> x als Ergebnis // delta muß ein Fixnum betragsmäßig <= DF_exp_high-DF_exp_low sein. // Neues DF mit um delta vergrößertem Exponenten bilden. // x entpacken: var cl_signean sign; var sintL exp; #if (cl_word_size==64) var uint64 mant; DF_decode(x, { return x; }, sign=,exp=,mant=); #else var uint32 manthi; var uint32 mantlo; DF_decode2(x, { return x; }, sign=,exp=,manthi=,mantlo=); #endif if (!minusp(delta)) // delta>=0 { var uintV udelta; if (fixnump(delta) && ((udelta = FN_to_V(delta)) <= (uintV)(DF_exp_high-DF_exp_low)) ) { exp = exp+udelta; #if (cl_word_size==64) return encode_DF(sign,exp,mant); #else return encode_DF(sign,exp,manthi,mantlo); #endif } else { throw floating_point_overflow_exception(); } } else // delta<0 { var uintL udelta; if (fixnump(delta) && ((udelta = -FN_to_V(delta)) <= (uintV)(DF_exp_high-DF_exp_low)) && ((cl_value_len+1 Ergebnis 0.0 // Merke Vorzeichen von x. // x:=(abs x) // Exponent:=(integer-length x) // Greife die 54 höchstwertigen Bits heraus (angeführt von einer 1). // Runde das letzte Bit weg: // Bit 0 = 0 -> abrunden, // Bit 0 = 1 und Rest =0 -> round-to-even, // Bit 0 = 1 und Rest >0 -> aufrunden. // Dabei um ein Bit nach rechts schieben. // Bei Aufrundung auf 2^53 (rounding overflow) Mantisse um 1 Bit nach rechts // schieben und Exponent incrementieren. if (eq(x,0)) { return cl_DF_0; } var cl_signean sign = -(cl_signean)minusp(x); // Vorzeichen var cl_I abs_x = (sign==0 ? x : -x); var uintC exp = integer_length(abs_x); // (integer-length x) // NDS zu |x|>0 bilden: var const uintD* MSDptr; var uintC len; I_to_NDS_nocopy(abs_x, MSDptr=,len=,,false,); // MSDptr/len/LSDptr ist die NDS zu x, len>0. // Führende Digits holen: Brauche DF_mant_len+1 Bits, dazu intDsize // Bits (die NDS kann mit bis zu intDsize Nullbits anfangen). // Dann werden diese Bits um (exp mod intDsize) nach rechts geschoben. var uintD msd = msprefnext(MSDptr); // erstes Digit #if (cl_word_size==64) var uint64 msdd = 0; // weitere min(len-1,64/intDsize) Digits #define NEXT_DIGIT(i) \ { if (--len == 0) goto ok; \ msdd |= (uint64)msprefnext(MSDptr) << (64-(i+1)*intDsize); \ } DOCONSTTIMES(64/intDsize,NEXT_DIGIT); #undef NEXT_DIGIT #else var uint32 msdd = 0; // weitere min(len-1,32/intDsize) Digits var uint32 msddf = 0; // weitere maximal 32/intDsize Digits #define NEXT_DIGIT(i) \ { if (--len == 0) goto ok; \ msdd |= (uint32)msprefnext(MSDptr) << (32-(i+1)*intDsize); \ } DOCONSTTIMES(32/intDsize,NEXT_DIGIT); #undef NEXT_DIGIT #define NEXT_DIGIT(i) \ { if (--len == 0) goto ok; \ msddf |= (uint32)msprefnext(MSDptr) << (32-(i+1)*intDsize); \ } DOCONSTTIMES(32/intDsize,NEXT_DIGIT); #undef NEXT_DIGIT #endif --len; ok: #if (cl_word_size==64) // Die NDS besteht aus msd, msdd und len weiteren Digits. // Das höchste in 2^64*msd+msdd gesetzte Bit ist Bit Nummer // 63 + (exp mod intDsize). var uintL shiftcount = exp % intDsize; var uint64 mant = // führende 64 Bits (shiftcount==0 ? msdd : (((uint64)msd << (64-shiftcount)) | (msdd >> shiftcount)) ); // Das höchste in mant gesetzte Bit ist Bit Nummer 63. if ( ((mant & bit(62-DF_mant_len)) ==0) // Bit 10 =0 -> abrunden || ( ((mant & (bit(62-DF_mant_len)-1)) ==0) // Bit 10 =1 und Bits 9..0 =0 && ((msdd & (bit(shiftcount)-1)) ==0) // und weitere Bits aus msddf =0 && (!test_loop_msp(MSDptr,len)) // und alle weiteren Digits =0 // round-to-even, je nach Bit 11 : && ((mant & bit(63-DF_mant_len)) ==0) ) ) // abrunden { mant = mant >> (63-DF_mant_len); } else // aufrunden { mant = mant >> (63-DF_mant_len); mant += 1; if (mant >= bit(DF_mant_len+1)) // rounding overflow? { mant = mant>>1; exp = exp+1; } } return encode_DF(sign,(sintE)exp,mant); #else // Die NDS besteht aus msd, msdd, msddf und len weiteren Digits. // Das höchste in 2^64*msd+2^32*msdd+msddf gesetzte Bit ist Bit Nummer // 63 + (exp mod intDsize). var uintL shiftcount = exp % intDsize; var uint32 manthi; // führende 32 Bits var uint32 mantlo; // nächste 32 Bits if (shiftcount==0) { manthi = msdd; mantlo = msddf; } else { manthi = ((uint32)msd << (32-shiftcount)) | (msdd >> shiftcount); mantlo = (msdd << (32-shiftcount)) | (msddf >> shiftcount); } // Das höchste in mant gesetzte Bit ist Bit Nummer 63. if ( ((mantlo & bit(62-DF_mant_len)) ==0) // Bit 10 =0 -> abrunden || ( ((mantlo & (bit(62-DF_mant_len)-1)) ==0) // Bit 10 =1 und Bits 9..0 =0 && ((msddf & (bit(shiftcount)-1)) ==0) // und weitere Bits aus msddf =0 && (!test_loop_msp(MSDptr,len)) // und alle weiteren Digits =0 // round-to-even, je nach Bit 11 : && ((mantlo & bit(63-DF_mant_len)) ==0) ) ) // abrunden { mantlo = (mantlo >> (63-DF_mant_len)) | (manthi << (DF_mant_len-32+1)); manthi = manthi >> (63-DF_mant_len); } else // aufrunden { mantlo = (mantlo >> (63-DF_mant_len)) | (manthi << (DF_mant_len-32+1)); manthi = manthi >> (63-DF_mant_len); mantlo += 1; if (mantlo==0) { manthi += 1; if (manthi >= bit(DF_mant_len-32+1)) // rounding overflow? { manthi = manthi>>1; exp = exp+1; } } } return encode_DF(sign,(sintE)exp,manthi,mantlo); #endif } } // namespace cln cln-1.3.3/src/float/dfloat/elem/cl_DF_to_I.cc0000644000000000000000000000224711201634736015507 0ustar // cl_DF_to_I(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/dfloat/cl_DF.h" // Implementation. #include "cln/integer.h" #include "integer/cl_I.h" namespace cln { const cl_I cl_DF_to_I (const cl_DF& x) { // Methode: // Falls x=0.0, Ergebnis 0. // Sonst (ASH Vorzeichen*Mantisse (e-53)). #if (cl_word_size==64) // x entpacken: var cl_signean sign; var sintL exp; var sint64 mant; DF_decode(x, { return 0; }, sign=,exp=,mant=); exp = exp-(DF_mant_len+1); // mant mit Vorzeichen versehen: if (!(sign==0)) { mant = -mant; } // in ein Bignum umwandeln und shiften: return ash( Q_to_I(mant), exp ); #else // x entpacken: var cl_signean sign; var sintL exp; var sint32 manthi; var uint32 mantlo; DF_decode2(x, { return 0; }, sign=,exp=,manthi=,mantlo=); exp = exp-(DF_mant_len+1); // mant mit Vorzeichen versehen: if (!(sign==0)) { manthi = -manthi; mantlo = -mantlo; if (!(mantlo==0)) { manthi -= 1; } } // in ein Bignum umwandeln und shiften: return ash( L2_to_I(manthi,mantlo), exp ); #endif } } // namespace cln cln-1.3.3/src/float/dfloat/elem/cl_DF_from_RA.cc0000644000000000000000000001254411201634736016143 0ustar // cl_RA_to_DF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/dfloat/cl_DF.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" #include "integer/cl_I.h" #include "float/cl_F.h" namespace cln { const cl_DF cl_RA_to_DF (const cl_RA& x) { // Methode: // x ganz -> klar. // x = +/- a/b mit Integers a,b>0: // Seien n,m so gewählt, daß // 2^(n-1) <= a < 2^n, 2^(m-1) <= b < 2^m. // Dann ist 2^(n-m-1) < a/b < 2^(n-m+1). // Berechne n=(integer-length a) und m=(integer-length b) und // floor(2^(-n+m+54)*a/b) : // Bei n-m>=54 dividiere a durch (ash b (n-m-54)), // bei n-m<54 dividiere (ash a (-n+m+54)) durch b. // Der erste Wert ist >=2^53, <2^55. // Falls er >=2^54 ist, runde 2 Bits weg, // falls er <2^54 ist, runde 1 Bit weg. if (integerp(x)) { DeclareType(cl_I,x); return cl_I_to_DF(x); } { // x Ratio DeclareType(cl_RT,x); var cl_I a = numerator(x); // +/- a var const cl_I& b = denominator(x); // b var cl_signean sign = -(cl_signean)minusp(a); // Vorzeichen if (!(sign==0)) { a = -a; } // Betrag nehmen, liefert a var sintC lendiff = (sintC)integer_length(a) // (integer-length a) - (sintC)integer_length(b); // (integer-length b) if (lendiff > DF_exp_high-DF_exp_mid) // Exponent >= n-m > Obergrenze ? { throw floating_point_overflow_exception(); } // -> Overflow if (lendiff < DF_exp_low-DF_exp_mid-2) // Exponent <= n-m+2 < Untergrenze ? { if (underflow_allowed()) { throw floating_point_underflow_exception(); } // -> Underflow else { return cl_DF_0; } } var cl_I zaehler; var cl_I nenner; if (lendiff >= DF_mant_len+2) // n-m-54>=0 { nenner = ash(b,lendiff - (DF_mant_len+2)); // (ash b n-m-54) zaehler = a; // a } else { zaehler = ash(a,(DF_mant_len+2) - lendiff); // (ash a -n+m+54) nenner = b; // b } // Division zaehler/nenner durchführen: var cl_I_div_t q_r = cl_divide(zaehler,nenner); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; #if (cl_word_size==64) #if (cl_value_len>=55) // 2^53 <= q < 2^55: q is fixnum. var uint64 mant = FN_to_UV(q); #else // 2^53 <= q < 2^55: q is bignum with one Digit. var const uintD* ptr = BN_MSDptr(q); var uint64 mant = get_max64_Dptr(55,ptr); #endif if (mant >= bit(DF_mant_len+2)) // 2^54 <= q < 2^55, schiebe um 2 Bits nach rechts { var uint64 rounding_bits = mant & (bit(2)-1); lendiff = lendiff+1; // Exponent := n-m+1 mant = mant >> 2; if ( (rounding_bits < bit(1)) // 00,01 werden abgerundet || ( (rounding_bits == bit(1)) // 10 && (eq(r,0)) // und genau halbzahlig (r=0) && ((mant & bit(0)) ==0) // -> round-to-even ) ) // abrunden goto ab; else // aufrunden goto auf; } else { var uint64 rounding_bit = mant & bit(0); mant = mant >> 1; if ( (rounding_bit == 0) // 0 wird abgerundet || ( (eq(r,0)) // genau halbzahlig (r=0) && ((mant & bit(0)) ==0) // -> round-to-even ) ) // abrunden goto ab; else // aufrunden goto auf; } auf: mant += 1; if (mant >= bit(DF_mant_len+1)) // rounding overflow? { mant = mant>>1; lendiff = lendiff+1; } ab: // Fertig. return encode_DF(sign,lendiff,mant); #else // (cl_word_size<64) // 2^53 <= q < 2^55: q is bignum with two Digits. var const uintD* ptr = BN_MSDptr(q); var uint32 manthi = get_max32_Dptr(23,ptr); var uint32 mantlo = get_32_Dptr(ptr mspop ceiling(23,intDsize)); if (manthi >= bit(DF_mant_len-32+2)) // 2^54 <= q < 2^55, schiebe um 2 Bits nach rechts { var uintL rounding_bits = mantlo & (bit(2)-1); lendiff = lendiff+1; // Exponent := n-m+1 mantlo = (mantlo >> 2) | (manthi << 30); manthi = manthi >> 2; if ( (rounding_bits < bit(1)) // 00,01 werden abgerundet || ( (rounding_bits == bit(1)) // 10 && (eq(r,0)) // und genau halbzahlig (r=0) && ((mantlo & bit(0)) ==0) // -> round-to-even ) ) // abrunden goto ab; else // aufrunden goto auf; } else { var uintL rounding_bit = mantlo & bit(0); mantlo = (mantlo >> 1) | (manthi << 31); manthi = manthi >> 1; if ( (rounding_bit == 0) // 0 wird abgerundet || ( (eq(r,0)) // genau halbzahlig (r=0) && ((mantlo & bit(0)) ==0) // -> round-to-even ) ) // abrunden goto ab; else // aufrunden goto auf; } auf: mantlo += 1; if (mantlo==0) { manthi += 1; if (manthi >= bit(DF_mant_len-32+1)) // rounding overflow? { manthi = manthi>>1; lendiff = lendiff+1; } } ab: // Fertig. return encode_DF(sign,lendiff,manthi,mantlo); #endif }} } // namespace cln cln-1.3.3/src/float/dfloat/elem/cl_DF_plusp.cc0000644000000000000000000000101411201634736015747 0ustar // plusp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" #include "base/cl_inline.h" #include "float/dfloat/elem/cl_DF_minusp.cc" #include "float/dfloat/elem/cl_DF_zerop.cc" namespace cln { CL_INLINE2 bool CL_INLINE2_DECL(plusp) (const cl_DF& x) { if (minusp_inline(x)) return false; // x<0 -> nein elif (zerop_inline(x)) return false; // x=0 -> nein else return true; // sonst ist x>0. } } // namespace cln cln-1.3.3/src/float/dfloat/elem/cl_DF_compare.cc0000644000000000000000000000506011201634736016237 0ustar // compare(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" namespace cln { cl_signean compare (const cl_DF& x, const cl_DF& y) { // Methode: // x und y haben verschiedenes Vorzeichen -> // x < 0 -> x < y // x >= 0 -> x > y // x und y haben gleiches Vorzeichen -> // x >=0 -> vergleiche x und y (die rechten 53 Bits) // x <0 -> vergleiche y und x (die rechten 53 Bits) #if (cl_word_size==64) var dfloat x_ = TheDfloat(x)->dfloat_value; var dfloat y_ = TheDfloat(y)->dfloat_value; if ((sint64)y_ >= 0) // y>=0 { if ((sint64)x_ >= 0) // y>=0, x>=0 { if (x_ < y_) return signean_minus; // x y_) return signean_plus; // x>y return signean_null; } else // y>=0, x<0 { return signean_minus; } // x= 0) // y<0, x>=0 { return signean_plus; } // x>y else // y<0, x<0 { if (x_ > y_) return signean_minus; // |x|>|y| -> x x>y return signean_null; } } #else var uint32 x_semhi = TheDfloat(x)->dfloat_value.semhi; var uint32 y_semhi = TheDfloat(y)->dfloat_value.semhi; var uint32 x_mlo = TheDfloat(x)->dfloat_value.mlo; var uint32 y_mlo = TheDfloat(y)->dfloat_value.mlo; if ((sint32)y_semhi >= 0) // y>=0 { if ((sint32)x_semhi >= 0) // y>=0, x>=0 { if (x_semhi < y_semhi) return signean_minus; // x y_semhi) return signean_plus; // x>y if (x_mlo < y_mlo) return signean_minus; // x y_mlo) return signean_plus; // x>y return signean_null; } else // y>=0, x<0 { return signean_minus; } // x= 0) // y<0, x>=0 { return signean_plus; } // x>y else // y<0, x<0 { if (x_semhi > y_semhi) return signean_minus; // |x|>|y| -> x x>y if (x_mlo > y_mlo) return signean_minus; // |x|>|y| -> x x>y return signean_null; } } #endif } } // namespace cln cln-1.3.3/src/float/dfloat/elem/cl_DF_futrunc.cc0000644000000000000000000000630411201634736016301 0ustar // futruncate(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/dfloat/cl_DF.h" // Implementation. namespace cln { const cl_DF futruncate (const cl_DF& x) { // Methode: // x = 0.0 -> Ergebnis 0.0 // e<=0 -> Ergebnis 1.0 oder -1.0, je nach Vorzeichen von x. // 1<=e<=52 -> Greife die letzten (53-e) Bits von x heraus. // Sind sie alle =0 -> Ergebnis x. // Sonst setze sie alle und erhöhe dann die letzte Stelle um 1. // Kein Überlauf der 52 Bit -> fertig. // Sonst (Ergebnis eine Zweierpotenz): Mantisse := .1000...000, // e:=e+1. (Test auf Überlauf wegen e<=53 überflüssig) // e>=53 -> Ergebnis x. #if (cl_word_size==64) var dfloat x_ = TheDfloat(x)->dfloat_value; var uintL uexp = DF_uexp(x_); // e + DF_exp_mid if (uexp==0) // 0.0 ? { return x; } if (uexp <= DF_exp_mid) // e<=0 ? { // Exponent auf 1, Mantisse auf .1000...000 setzen. return ((x_ & bit(63))==0 ? cl_DF_1 : cl_DF_minus1); } else { if (uexp > DF_exp_mid+DF_mant_len) // e > 52 ? { return x; } else { var uint64 mask = // Bitmaske: Bits 52-e..0 gesetzt, alle anderen gelöscht bit(DF_mant_len+1+DF_exp_mid-uexp)-1; if ((x_ & mask)==0) // alle diese Bits =0 ? { return x; } return allocate_dfloat ((x_ | mask) // alle diese Bits setzen + 1 // letzte Stelle erhöhen, dabei evtl. Exponenten incrementieren ); } } #else var uint32 semhi = TheDfloat(x)->dfloat_value.semhi; var uint32 mlo = TheDfloat(x)->dfloat_value.mlo; var uintL uexp = DF_uexp(semhi); // e + DF_exp_mid if (uexp==0) // 0.0 ? { return x; } if (uexp <= DF_exp_mid) // e<=0 ? { // Exponent auf 1, Mantisse auf .1000...000 setzen. return ((semhi & bit(31))==0 ? cl_DF_1 : cl_DF_minus1); } else { if (uexp > DF_exp_mid+DF_mant_len) // e > 52 ? { return x; } else if (uexp > DF_exp_mid+DF_mant_len+1-32) // e > 21 ? { var uint32 mask = // Bitmaske: Bits 52-e..0 gesetzt, alle anderen gelöscht bit(DF_mant_len+1+DF_exp_mid-uexp)-1; if ((mlo & mask)==0) // alle diese Bits =0 ? { return x; } mlo = (mlo | mask) // alle diese Bits setzen + 1; // letzte Stelle erhöhen, if (mlo==0) { semhi += 1; } // dabei evtl. Exponenten incrementieren return allocate_dfloat(semhi,mlo); } else { var uint32 mask = // Bitmaske: Bits 20-e..0 gesetzt, alle anderen gelöscht bit(DF_mant_len+1+DF_exp_mid-32-uexp)-1; if ((mlo==0) && ((semhi & mask)==0)) // alle diese Bits und mlo =0 ? { return x; } return allocate_dfloat ((semhi | mask) // alle diese Bits setzen + 1, // letzte Stelle erhöhen, dabei evtl. Exponenten incrementieren 0 ); } } #endif } } // namespace cln cln-1.3.3/src/float/dfloat/elem/cl_DF_plus.cc0000644000000000000000000002557511201634736015611 0ustar // binary operator + // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" #include "float/cl_F.h" #include "base/cl_xmacros.h" namespace cln { const cl_DF operator+ (const cl_DF& x1, const cl_DF& x2) { // Methode (nach [Knuth, II, Seminumerical Algorithms, Abschnitt 4.2.1., S.200]): // x1=0.0 -> Ergebnis x2. // x2=0.0 -> Ergebnis x1. // Falls e1= e2. // Falls e1 - e2 >= 52 + 3, Ergebnis x1. // Schiebe beide Mantissen um 3 Bits nach links (Vorbereitung der Rundung: // Bei e1-e2=0,1 ist keine Rundung nötig, bei e1-e2>1 ist der Exponent des // Ergebnisses =e1-1, =e1 oder =e1+1. Brauche daher 1 Schutzbit und zwei // Rundungsbits: 00 exakt, 01 1.Hälfte, 10 exakte Mitte, 11 2.Hälfte.) // Schiebe die Mantisse von x2 um e0-e1 Bits nach rechts. (Dabei die Rundung // ausführen: Bit 0 ist das logische Oder der Bits 0,-1,-2,...) // Falls x1,x2 selbes Vorzeichen haben: Addiere dieses zur Mantisse von x1. // Falls x1,x2 verschiedenes Vorzeichen haben: Subtrahiere dieses von der // Mantisse von x1. <0 -> (Es war e1=e2) Vertausche die Vorzeichen, negiere. // =0 -> Ergebnis 0.0 // Exponent ist e1. // Normalisiere, fertig. #ifdef FAST_DOUBLE double_to_DF(DF_to_double(x1) + DF_to_double(x2), return , TRUE, TRUE, // Overflow und subnormale Zahl abfangen FALSE, // kein Underflow mit Ergebnis +/- 0.0 möglich // (nach Definition der subnormalen Zahlen) FALSE, FALSE // keine Singularität, kein NaN als Ergebnis möglich ); #else #if (cl_word_size==64) // x1,x2 entpacken: var cl_signean sign1; var sintL exp1; var uint64 mant1; var cl_signean sign2; var sintL exp2; var uint64 mant2; DF_decode(x1, { return x2; }, sign1=,exp1=,mant1=); DF_decode(x2, { return x1; }, sign2=,exp2=,mant2=); var cl_DF max_x1_x2 = x1; if (exp1 < exp2) { max_x1_x2 = x2; swap(cl_signean, sign1,sign2); swap(sintL, exp1 ,exp2 ); swap(uint64, mant1,mant2); } // Nun ist exp1>=exp2. var uintL expdiff = exp1 - exp2; // Exponentendifferenz if (expdiff >= DF_mant_len+3) // >= 52+3 ? { return max_x1_x2; } mant1 = mant1 << 3; mant2 = mant2 << 3; // Nun 2^(DF_mant_len+3) <= mant1,mant2 < 2^(DF_mant_len+4). {var uint64 mant2_last = mant2 & (bit(expdiff)-1); // letzte expdiff Bits von mant2 mant2 = mant2 >> expdiff; if (!(mant2_last==0)) { mant2 |= bit(0); } } // mant2 = um expdiff Bits nach rechts geschobene und gerundete Mantisse // von x2. if (!(sign1==sign2)) // verschiedene Vorzeichen -> Mantissen subtrahieren { if (mant1 > mant2) { mant1 = mant1 - mant2; goto norm_2; } if (mant1 == mant2) // Ergebnis 0 ? { return cl_DF_0; } // negatives Subtraktionsergebnis mant1 = mant2 - mant1; sign1 = sign2; goto norm_2; } else // gleiche Vorzeichen -> Mantissen addieren { mant1 = mant1 + mant2; } // mant1 = Ergebnis-Mantisse >0, sign1 = Ergebnis-Vorzeichen, // exp1 = Ergebnis-Exponent. // Außerdem: Bei expdiff=0,1 sind die zwei letzten Bits von mant1 Null, // bei expdiff>=2 ist mant1 >= 2^(DF_mant_len+2). // Stets ist mant1 < 2^(DF_mant_len+5). (Daher werden die 2 Rundungsbits // nachher um höchstens eine Position nach links geschoben werden.) // [Knuth, S.201, leicht modifiziert: // N1. m>=1 -> goto N4. // N2. [Hier m<1] m>=1/2 -> goto N5. // N3. m:=2*m, e:=e-1, goto N2. // N4. [Hier 1<=m<2] m:=m/2, e:=e+1. // N5. [Hier 1/2<=m<1] Runde m auf 53 Bits hinterm Komma. // Falls hierdurch m=1 geworden, setze m:=m/2, e:=e+1. // ] // Bei uns ist m=mant1/2^(DF_mant_len+4), // ab Schritt N5 ist m=mant1/2^(DF_mant_len+1). norm_1: // [Knuth, S.201, Schritt N1] if (mant1 >= bit(DF_mant_len+4)) goto norm_4; norm_2: // [Knuth, S.201, Schritt N2] // Hier ist mant1 < 2^(DF_mant_len+4) if (mant1 >= bit(DF_mant_len+3)) goto norm_5; // [Knuth, S.201, Schritt N3] mant1 = mant1 << 1; exp1 = exp1-1; // Mantisse links schieben goto norm_2; norm_4: // [Knuth, S.201, Schritt N4] // Hier ist 2^(DF_mant_len+4) <= mant1 < 2^(DF_mant_len+5) exp1 = exp1+1; mant1 = (mant1>>1) | (mant1 & bit(0)); // Mantisse rechts schieben norm_5: // [Knuth, S.201, Schritt N5] // Hier ist 2^(DF_mant_len+3) <= mant1 < 2^(DF_mant_len+4) // Auf DF_mant_len echte Mantissenbits runden, d.h. rechte 3 Bits // wegrunden, und dabei mant1 um 3 Bits nach rechts schieben: {var uint64 rounding_bits = mant1 & (bit(3)-1); mant1 = mant1 >> 3; if ( (rounding_bits < bit(2)) // 000,001,010,011 werden abgerundet || ( (rounding_bits == bit(2)) // 100 (genau halbzahlig) && ((mant1 & bit(0)) ==0) // -> round-to-even ) ) // abrunden {} else // aufrunden { mant1 = mant1+1; if (mant1 >= bit(DF_mant_len+1)) // Bei Überlauf während der Rundung nochmals rechts schieben // (Runden ist hier überflüssig): { mant1 = mant1>>1; exp1 = exp1+1; } // Mantisse rechts schieben } }// Runden fertig return encode_DF(sign1,exp1,mant1); #else // x1,x2 entpacken: var cl_signean sign1; var sintL exp1; var uintL manthi1; var uintL mantlo1; var cl_signean sign2; var sintL exp2; var uintL manthi2; var uintL mantlo2; DF_decode2(x1, { return x2; }, sign1=,exp1=,manthi1=,mantlo1=); DF_decode2(x2, { return x1; }, sign2=,exp2=,manthi2=,mantlo2=); var cl_DF max_x1_x2 = x1; if (exp1 < exp2) { max_x1_x2 = x2; swap(cl_signean, sign1,sign2); swap(sintL, exp1 ,exp2 ); swap(uintL, manthi1,manthi2); swap(uintL, mantlo1,mantlo2); } // Nun ist exp1>=exp2. var uintL expdiff = exp1 - exp2; // Exponentendifferenz if (expdiff >= DF_mant_len+3) // >= 52+3 ? { return max_x1_x2; } manthi1 = (manthi1 << 3) | (mantlo1 >> (32-3)); mantlo1 = mantlo1 << 3; manthi2 = (manthi2 << 3) | (mantlo2 >> (32-3)); mantlo2 = mantlo2 << 3; // Nun 2^(DF_mant_len+3) <= mant1,mant2 < 2^(DF_mant_len+4). if (expdiff<32) {if (!(expdiff==0)) {var uintL mant2_last = mantlo2 & (bit(expdiff)-1); // letzte expdiff Bits von mant2 mantlo2 = (mantlo2 >> expdiff) | (manthi2 << (32-expdiff)); manthi2 = manthi2 >> expdiff; if (!(mant2_last==0)) { mantlo2 |= bit(0); } } } else {var uintL mant2_last = (manthi2 & (bit(expdiff-32)-1)) | mantlo2; // letzte expdiff Bits von mant2 mantlo2 = manthi2 >> (expdiff-32); manthi2 = 0; if (!(mant2_last==0)) { mantlo2 |= bit(0); } } // mant2 = um expdiff Bits nach rechts geschobene und gerundete Mantisse // von x2. if (!(sign1==sign2)) // verschiedene Vorzeichen -> Mantissen subtrahieren { if (manthi1 > manthi2) { manthi1 = manthi1 - manthi2; if (mantlo1 < mantlo2) { manthi1 -= 1; } mantlo1 = mantlo1 - mantlo2; goto norm_2; } if (manthi1 == manthi2) { if (mantlo1 > mantlo2) { manthi1 = 0; mantlo1 = mantlo1 - mantlo2; goto norm_2; } if (mantlo1 == mantlo2) // Ergebnis 0 ? { return cl_DF_0; } } // Hier ((manthi1 < manthi2) || ((manthi1 == manthi2) && (mantlo1 < mantlo2))). // negatives Subtraktionsergebnis manthi1 = manthi2 - manthi1; if (mantlo2 < mantlo1) { manthi1 -= 1; } mantlo1 = mantlo2 - mantlo1; sign1 = sign2; goto norm_2; } else // gleiche Vorzeichen -> Mantissen addieren { manthi1 = manthi1 + manthi2; if ((mantlo1 = mantlo1 + mantlo2) < mantlo2) { manthi1 += 1; } } // mant1 = Ergebnis-Mantisse >0, sign1 = Ergebnis-Vorzeichen, // exp1 = Ergebnis-Exponent. // Außerdem: Bei expdiff=0,1 sind die zwei letzten Bits von mant1 Null, // bei expdiff>=2 ist mant1 >= 2^(DF_mant_len+2). // Stets ist mant1 < 2^(DF_mant_len+5). (Daher werden die 2 Rundungsbits // nachher um höchstens eine Position nach links geschoben werden.) // [Knuth, S.201, leicht modifiziert: // N1. m>=1 -> goto N4. // N2. [Hier m<1] m>=1/2 -> goto N5. // N3. m:=2*m, e:=e-1, goto N2. // N4. [Hier 1<=m<2] m:=m/2, e:=e+1. // N5. [Hier 1/2<=m<1] Runde m auf 53 Bits hinterm Komma. // Falls hierdurch m=1 geworden, setze m:=m/2, e:=e+1. // ] // Bei uns ist m=mant1/2^(DF_mant_len+4), // ab Schritt N5 ist m=mant1/2^(DF_mant_len+1). norm_1: // [Knuth, S.201, Schritt N1] if (manthi1 >= bit(DF_mant_len-32+4)) goto norm_4; norm_2: // [Knuth, S.201, Schritt N2] // Hier ist mant1 < 2^(DF_mant_len+4) if (manthi1 >= bit(DF_mant_len-32+3)) goto norm_5; // [Knuth, S.201, Schritt N3] manthi1 = (manthi1 << 1) | (mantlo1 >> 31); // Mantisse links schieben mantlo1 = mantlo1 << 1; exp1 = exp1-1; goto norm_2; norm_4: // [Knuth, S.201, Schritt N4] // Hier ist 2^(DF_mant_len+4) <= mant1 < 2^(DF_mant_len+5) exp1 = exp1+1; mantlo1 = (mantlo1 >> 1) | (manthi1 << 31) | (mantlo1 & bit(0)); // Mantisse rechts schieben manthi1 = (manthi1 >> 1); norm_5: // [Knuth, S.201, Schritt N5] // Hier ist 2^(DF_mant_len+3) <= mant1 < 2^(DF_mant_len+4) // Auf DF_mant_len echte Mantissenbits runden, d.h. rechte 3 Bits // wegrunden, und dabei mant1 um 3 Bits nach rechts schieben: {var uintL rounding_bits = mantlo1 & (bit(3)-1); mantlo1 = (mantlo1 >> 3) | (manthi1 << (32-3)); manthi1 = manthi1 >> 3; if ( (rounding_bits < bit(2)) // 000,001,010,011 werden abgerundet || ( (rounding_bits == bit(2)) // 100 (genau halbzahlig) && ((mantlo1 & bit(0)) ==0) // -> round-to-even ) ) // abrunden {} else // aufrunden { mantlo1 = mantlo1+1; if (mantlo1==0) { manthi1 = manthi1+1; if (manthi1 >= bit(DF_mant_len-32+1)) // Bei Überlauf während der Rundung nochmals rechts schieben // (Runden ist hier überflüssig): { manthi1 = manthi1>>1; exp1 = exp1+1; } // Mantisse rechts schieben } } }// Runden fertig return encode_DF(sign1,exp1,manthi1,mantlo1); #endif #endif } } // namespace cln cln-1.3.3/src/float/dfloat/elem/cl_DF_minusp.cc0000644000000000000000000000062211201634736016123 0ustar // minusp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" namespace cln { CL_INLINE bool CL_INLINE_DECL(minusp) (const cl_DF& x) { #if (cl_word_size==64) return (sint64)TheDfloat(x)->dfloat_value_semhi < 0; #else return (sint32)TheDfloat(x)->dfloat_value_semhi < 0; #endif } } // namespace cln cln-1.3.3/src/float/dfloat/elem/cl_DF_minus.cc0000644000000000000000000000226111201634736015744 0ustar // binary operator - // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" namespace cln { const cl_DF operator- (const cl_DF& x1, const cl_DF& x2) { // Methode: // (- x1 x2) = (+ x1 (- x2)) #ifdef FAST_DOUBLE double_to_DF(DF_to_double(x1) - DF_to_double(x2), return , TRUE, TRUE, // Overflow und subnormale Zahl abfangen FALSE, // kein Underflow mit Ergebnis +/- 0.0 möglich // (nach Definition der subnormalen Zahlen) FALSE, FALSE // keine Singularität, kein NaN als Ergebnis möglich ); #else #if (cl_word_size==64) var dfloat x2_ = TheDfloat(x2)->dfloat_value; if (DF_uexp(x2_) == 0) { return x1; } else { return x1 + allocate_dfloat(x2_ ^ bit(63)); } #else var uint32 x2_semhi = TheDfloat(x2)->dfloat_value.semhi; var uint32 x2_mlo = TheDfloat(x2)->dfloat_value.mlo; if (DF_uexp(x2_semhi) == 0) { return x1; } else { return x1 + allocate_dfloat(x2_semhi ^ bit(31), x2_mlo); } #endif #endif } } // namespace cln cln-1.3.3/src/float/dfloat/elem/cl_DF_uminus.cc0000644000000000000000000000134011201634736016126 0ustar // unary operator - // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" namespace cln { const cl_DF operator- (const cl_DF& x) { // Methode: // Falls x=0.0, fertig. Sonst Vorzeichenbit umdrehen. #if (cl_word_size==64) var dfloat x_ = TheDfloat(x)->dfloat_value; if (DF_uexp(x_) == 0) return x; else return allocate_dfloat( x_ ^ bit(63) ); #else var uint32 semhi = TheDfloat(x)->dfloat_value.semhi; var uint32 mlo = TheDfloat(x)->dfloat_value.mlo; if (DF_uexp(semhi) == 0) return x; else return allocate_dfloat( semhi ^ bit(31), mlo ); #endif } } // namespace cln cln-1.3.3/src/float/dfloat/elem/cl_DF_ftrunc.cc0000644000000000000000000000364311201634736016117 0ustar // ftruncate(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" namespace cln { const cl_DF ftruncate (const cl_DF& x) { // Methode: // x = 0.0 oder e<=0 -> Ergebnis 0.0 // 1<=e<=52 -> letzte (53-e) Bits der Mantisse auf 0 setzen, // Exponent und Vorzeichen beibehalten // e>=53 -> Ergebnis x #if (cl_word_size==64) var dfloat x_ = TheDfloat(x)->dfloat_value; var uintL uexp = DF_uexp(x_); // e + DF_exp_mid if (uexp <= DF_exp_mid) // 0.0 oder e<=0 ? { return cl_DF_0; } else { if (uexp > DF_exp_mid+DF_mant_len) // e > 52 ? { return x; } else // 1<=e<=52 { return allocate_dfloat ( x_ & // Bitmaske: Bits 52-e..0 gelöscht, alle anderen gesetzt ~(bit(DF_mant_len+1+DF_exp_mid-uexp)-1) ); } } #else var uint32 semhi = TheDfloat(x)->dfloat_value.semhi; var uint32 mlo = TheDfloat(x)->dfloat_value.mlo; var uintL uexp = DF_uexp(semhi); // e + DF_exp_mid if (uexp <= DF_exp_mid) // 0.0 oder e<=0 ? { return cl_DF_0; } else { if (uexp > DF_exp_mid+DF_mant_len) // e > 52 ? { return x; } else // 1<=e<=52 if (uexp > DF_exp_mid+DF_mant_len+1-32) // e > 21 ? { return allocate_dfloat ( semhi, mlo & // Bitmaske: Bits 52-e..0 gelöscht, alle anderen gesetzt ~(bit(DF_mant_len+1+DF_exp_mid-uexp)-1) ); } else { return allocate_dfloat ( semhi & // Bitmaske: Bits 20-e..0 gelöscht, alle anderen gesetzt ~(bit(DF_mant_len+1+DF_exp_mid-32-uexp)-1), 0 ); } } #endif } } // namespace cln cln-1.3.3/src/float/dfloat/elem/cl_DF_zerop.cc0000644000000000000000000000061411201634736015750 0ustar // zerop(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" namespace cln { CL_INLINE bool CL_INLINE_DECL(zerop) (const cl_DF& x) { #if 0 return DF_uexp(TheDfloat(x)->dfloat_value_semhi) == 0; #else // this is faster return TheDfloat(x)->dfloat_value_semhi == 0; #endif } } // namespace cln cln-1.3.3/src/float/dfloat/elem/cl_DF_mul.cc0000644000000000000000000002537411201634736015420 0ustar // binary operator * // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" #include "float/cl_F.h" #include "base/cl_low.h" #include "base/digitseq/cl_DS.h" #include "base/cl_inline.h" #include "float/dfloat/elem/cl_DF_zerop.cc" namespace cln { const cl_DF operator* (const cl_DF& x1, const cl_DF& x2) { // Methode: // Falls x1=0.0 oder x2=0.0 -> Ergebnis 0.0 // Sonst: Ergebnis-Vorzeichen = VZ von x1 xor VZ von x2. // Ergebnis-Exponent = Summe der Exponenten von x1 und x2. // Ergebnis-Mantisse = Produkt der Mantissen von x1 und x2, gerundet: // 2^-53 * mant1 * 2^-53 * mant2 = 2^-106 * (mant1*mant2), // die Klammer ist >=2^104, <=(2^53-1)^2<2^106 . // Falls die Klammer >=2^105 ist, um 53 Bit nach rechts schieben und // runden: Falls Bit 52 Null, abrunden; falls Bit 52 Eins und // Bits 51..0 alle Null, round-to-even; sonst aufrunden. // Falls die Klammer <2^105 ist, um 52 Bit nach rechts schieben und // runden: Falls Bit 51 Null, abrunden; falls Bit 51 Eins und // Bits 50..0 alle Null, round-to-even; sonst aufrunden. Nach // Aufrunden: Falls =2^53, um 1 Bit nach rechts schieben. Sonst // Exponenten um 1 erniedrigen. #ifdef FAST_DOUBLE double_to_DF(DF_to_double(x1) * DF_to_double(x2), return , TRUE, TRUE, // Overflow und subnormale Zahl abfangen !(zerop_inline(x1) || zerop_inline(x2)), // ein Ergebnis +/- 0.0 // ist genau dann in Wirklichkeit ein Underflow FALSE, FALSE // keine Singularität, kein NaN als Ergebnis möglich ); #else // x1,x2 entpacken: var cl_signean sign1; var sintL exp1; #if (intDsize<=32) var uintL manthi1; var uintL mantlo1; #endif var cl_signean sign2; var sintL exp2; #if (intDsize<=32) var uintL manthi2; var uintL mantlo2; #endif #if (cl_word_size==64) var uint64 mantx1; DF_decode(x1, { return x1; }, sign1=,exp1=,mantx1=); #if (intDsize<=32) manthi1 = high32(mantx1); mantlo1 = low32(mantx1); #endif var uint64 mantx2; DF_decode(x2, { return x2; }, sign2=,exp2=,mantx2=); #if (intDsize<=32) manthi2 = high32(mantx2); mantlo2 = low32(mantx2); #endif #else DF_decode2(x1, { return x1; }, sign1=,exp1=,manthi1=,mantlo1=); DF_decode2(x2, { return x2; }, sign2=,exp2=,manthi2=,mantlo2=); #endif exp1 = exp1 + exp2; // Summe der Exponenten sign1 = sign1 ^ sign2; // Ergebnis-Vorzeichen // Mantissen mant1 und mant2 multiplizieren (64x64-Bit-Multiplikation): var uintD mant1 [64/intDsize]; var uintD mant2 [64/intDsize]; var uintD mant [128/intDsize]; #if (intDsize==64) arrayLSref(mant1,64/intDsize,0) = mantx1; arrayLSref(mant2,64/intDsize,0) = mantx2; #elif (intDsize==32) || (intDsize==16) || (intDsize==8) set_32_Dptr(arrayMSDptr(mant1,64/intDsize),manthi1); set_32_Dptr(arrayMSDptr(mant1,64/intDsize) mspop 32/intDsize,mantlo1); set_32_Dptr(arrayMSDptr(mant2,64/intDsize),manthi2); set_32_Dptr(arrayMSDptr(mant2,64/intDsize) mspop 32/intDsize,mantlo2); #else {var uintD* ptr; ptr = arrayLSDptr(mant1,64/intDsize); doconsttimes(32/intDsize, { lsprefnext(ptr) = (uintD)mantlo1; mantlo1 = mantlo1>>intDsize; } ); doconsttimes(32/intDsize, { lsprefnext(ptr) = (uintD)manthi1; manthi1 = manthi1>>intDsize; } ); } {var uintD* ptr; ptr = arrayLSDptr(mant2,64/intDsize); doconsttimes(32/intDsize, { lsprefnext(ptr) = (uintD)mantlo2; mantlo2 = mantlo2>>intDsize; } ); doconsttimes(32/intDsize, { lsprefnext(ptr) = (uintD)manthi2; manthi2 = manthi2>>intDsize; } ); } #endif cl_UDS_mul(arrayLSDptr(mant1,64/intDsize),64/intDsize, arrayLSDptr(mant2,64/intDsize),64/intDsize, arrayLSDptr(mant,128/intDsize) ); { #if (cl_word_size==64) var uint64 manterg; #else var uintL manthi; var uintL mantlo; #endif // Produkt mant = mant1 * mant2 ist >= 2^104, < 2^106. Bit 105 abtesten: #define mant_bit(k) (arrayLSref(mant,128/intDsize,floor(k,intDsize)) & bit((k)%intDsize)) if (mant_bit(2*DF_mant_len+1)) // mant>=2^(2*DF_mant_len+1), um DF_mant_len+1 Bits nach rechts schieben: { // Bits 105..53 holen: #if (cl_word_size==64) && (intDsize==64) manterg = ((uint64)arrayLSref(mant,2,1) << 11) | ((uint64)arrayLSref(mant,2,0) >> 53); // Bits 116..53 #define mantrest() (arrayLSref(mant,2,0) & (bit(53)-1)) #elif (cl_word_size==64) && (intDsize==32) manterg = ((uint64)arrayLSref(mant,4,3) << 43) | ((uint64)arrayLSref(mant,4,2) << 11) | ((uint64)arrayLSref(mant,4,1) >> 21); // Bits 116..53 #define mantrest() ((arrayLSref(mant,4,1) & (bit(21)-1)) || arrayLSref(mant,4,0)) #elif (intDsize==32) manthi = ((uint32)arrayLSref(mant,4,3) << 11) | ((uint32)arrayLSref(mant,4,2) >> 21); // Bits 116..85 mantlo = ((uint32)arrayLSref(mant,4,2) << 11) | ((uint32)arrayLSref(mant,4,1) >> 21); // Bits 84..53 #define mantrest() ((arrayLSref(mant,4,1) & (bit(21)-1)) || arrayLSref(mant,4,0)) #elif (intDsize==16) manthi = ((uint32)arrayLSref(mant,8,7) << 27) | ((uint32)arrayLSref(mant,8,6) << 11) | ((uint32)arrayLSref(mant,8,5) >> 5); // Bits 116..85 mantlo = ((uint32)arrayLSref(mant,8,5) << 27) | ((uint32)arrayLSref(mant,8,4) << 11) | ((uint32)arrayLSref(mant,8,3) >> 5); // Bits 84..53 #define mantrest() ((arrayLSref(mant,8,3) & (bit(5)-1)) || arrayLSref(mant,8,2) || arrayLSref(mant,8,1) || arrayLSref(mant,8,0)) #elif (intDsize==8) manthi = ((uint32)arrayLSref(mant,16,14) << 27) | ((uint32)arrayLSref(mant,16,13) << 19) | ((uint32)arrayLSref(mant,16,12) << 11) | ((uint32)arrayLSref(mant,16,11) << 3) | ((uint32)arrayLSref(mant,16,10) >> 5); // Bits 116..85 mantlo = ((uint32)arrayLSref(mant,16,10) << 27) | ((uint32)arrayLSref(mant,16,9) << 19) | ((uint32)arrayLSref(mant,16,8) << 11) | ((uint32)arrayLSref(mant,16,7) << 3) | ((uint32)arrayLSref(mant,16,6) >> 5); // Bits 84..53 #define mantrest() ((arrayLSref(mant,16,6) & (bit(5)-1)) || arrayLSref(mant,16,5) || arrayLSref(mant,16,4) || arrayLSref(mant,16,3) || arrayLSref(mant,16,2) || arrayLSref(mant,16,1) || arrayLSref(mant,16,0)) #endif if ( (mant_bit(DF_mant_len) ==0) // Bit DF_mant_len =0 -> abrunden || ( !mantrest() // Bit DF_mant_len =1 und Bits DF_mant_len-1..0 >0 -> aufrunden // round-to-even, je nach Bit DF_mant_len+1 : && (mant_bit(DF_mant_len+1) ==0) ) ) // abrunden goto ab; else // aufrunden goto auf; #undef mantrest } else // mant<2^(2*DF_mant_len+1), um DF_mant_len Bits nach rechts schieben: { exp1 = exp1-1; // Exponenten decrementieren // Bits 104..52 holen: #if (cl_word_size==64) && (intDsize==64) manterg = ((uint64)arrayLSref(mant,2,1) << 12) | ((uint64)arrayLSref(mant,2,0) >> 52); // Bits 115..52 #define mantrest() (arrayLSref(mant,2,0) & (bit(52)-1)) #elif (cl_word_size==64) && (intDsize==32) manterg = ((uint64)arrayLSref(mant,4,3) << 44) | ((uint64)arrayLSref(mant,4,2) << 12) | ((uint64)arrayLSref(mant,4,1) >> 20); // Bits 115..52 #define mantrest() ((arrayLSref(mant,4,1) & (bit(20)-1)) || arrayLSref(mant,4,0)) #elif (intDsize==32) manthi = ((uint32)arrayLSref(mant,4,3) << 12) | ((uint32)arrayLSref(mant,4,2) >> 20); // Bits 115..84 mantlo = ((uint32)arrayLSref(mant,4,2) << 12) | ((uint32)arrayLSref(mant,4,1) >> 20); // Bits 83..52 #define mantrest() ((arrayLSref(mant,4,1) & (bit(20)-1)) || arrayLSref(mant,4,0)) #elif (intDsize==16) manthi = // ((uint32)arrayLSref(mant,8,7) << 28) | ((uint32)arrayLSref(mant,8,6) << 12) | ((uint32)arrayLSref(mant,8,5) >> 4); // Bits 115..84 mantlo = // ((uint32)arrayLSref(mant,8,5) << 28) | ((uint32)arrayLSref(mant,8,4) << 12) | ((uint32)arrayLSref(mant,8,3) >> 4); // Bits 83..52 #define mantrest() ((arrayLSref(mant,8,3) & (bit(4)-1)) || arrayLSref(mant,8,2) || arrayLSref(mant,8,1) || arrayLSref(mant,8,0)) #elif (intDsize==8) manthi = ((uint32)arrayLSref(mant,16,14) << 28) | ((uint32)arrayLSref(mant,16,13) << 20) | ((uint32)arrayLSref(mant,16,12) << 12) | ((uint32)arrayLSref(mant,16,11) << 4) | ((uint32)arrayLSref(mant,16,10) >> 4); // Bits 115..84 mantlo = ((uint32)arrayLSref(mant,16,10) << 28) | ((uint32)arrayLSref(mant,16,9) << 20) | ((uint32)arrayLSref(mant,16,8) << 12) | ((uint32)arrayLSref(mant,16,7) << 4) | ((uint32)arrayLSref(mant,16,6) >> 4); // Bits 83..52 #define mantrest() ((arrayLSref(mant,16,6) & (bit(4)-1)) || arrayLSref(mant,16,5) || arrayLSref(mant,16,4) || arrayLSref(mant,16,3) || arrayLSref(mant,16,2) || arrayLSref(mant,16,1) || arrayLSref(mant,16,0)) #endif if ( (mant_bit(DF_mant_len-1) ==0) // Bit DF_mant_len-1 =0 -> abrunden || ( !mantrest() // Bit DF_mant_len-1 =1 und Bits DF_mant_len-2..0 >0 -> aufrunden // round-to-even, je nach Bit DF_mant_len : && (mant_bit(DF_mant_len) ==0) ) ) // abrunden goto ab; else // aufrunden goto auf; #undef mantrest } #undef mant_bit auf: #if (cl_word_size==64) manterg = manterg+1; // Hier ist 2^DF_mant_len <= manterg <= 2^(DF_mant_len+1) if (manterg >= bit(DF_mant_len+1)) // rounding overflow? { manterg = manterg>>1; exp1 = exp1+1; } // Shift nach rechts #else mantlo = mantlo+1; if (mantlo==0) { manthi = manthi+1; // Hier ist 2^(DF_mant_len-32) <= manthi <= 2^(DF_mant_len-32+1) if (manthi >= bit(DF_mant_len-32+1)) // rounding overflow? { manthi = manthi>>1; exp1 = exp1+1; } // Shift nach rechts } #endif ab: // Runden fertig, 2^DF_mant_len <= manterg < 2^(DF_mant_len+1) #if (cl_word_size==64) return encode_DF(sign1,exp1,manterg); #else return encode_DF(sign1,exp1,manthi,mantlo); #endif } #endif } } // namespace cln cln-1.3.3/src/float/dfloat/elem/cl_DF_scale.cc0000644000000000000000000000315511201634736015703 0ustar // scale_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" #include "float/cl_F.h" namespace cln { const cl_DF scale_float (const cl_DF& x, sintC delta) { // Methode: // x=0.0 -> x als Ergebnis // delta muß betragsmäßig <= DF_exp_high-DF_exp_low sein. // Neues DF mit um delta vergrößertem Exponenten bilden. // x entpacken: var cl_signean sign; var sintL exp; #if (cl_word_size==64) var uint64 mant; DF_decode(x, { return x; }, sign=,exp=,mant=); #else var uint32 manthi; var uint32 mantlo; DF_decode2(x, { return x; }, sign=,exp=,manthi=,mantlo=); #endif if (delta >= 0) // delta>=0 { var uintC udelta = delta; if (udelta <= (uintL)(DF_exp_high-DF_exp_low)) { exp = exp+udelta; #if (cl_word_size==64) return encode_DF(sign,exp,mant); #else return encode_DF(sign,exp,manthi,mantlo); #endif } else { throw floating_point_overflow_exception(); } } else // delta<0 { var uintC udelta = -delta; if (udelta <= (uintL)(DF_exp_high-DF_exp_low)) { exp = exp-udelta; #if (cl_word_size==64) return encode_DF(sign,exp,mant); #else return encode_DF(sign,exp,manthi,mantlo); #endif } else if (underflow_allowed()) { throw floating_point_underflow_exception(); } else { return cl_DF_0; } } } } // namespace cln cln-1.3.3/src/float/dfloat/elem/cl_DF_fround.cc0000644000000000000000000001677011201634736016120 0ustar // fround(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" namespace cln { const cl_DF fround (const cl_DF& x) { // Methode: // x = 0.0 oder e<0 -> Ergebnis 0.0 // 0<=e<=52 -> letzte (53-e) Bits der Mantisse wegrunden, // Exponent und Vorzeichen beibehalten. // e>52 -> Ergebnis x #if (cl_word_size==64) var dfloat x_ = TheDfloat(x)->dfloat_value; var uintL uexp = DF_uexp(x_); // e + DF_exp_mid if (uexp < DF_exp_mid) // x = 0.0 oder e<0 ? { return cl_DF_0; } else { if (uexp > DF_exp_mid+DF_mant_len) // e > 52 ? { return x; } else if (uexp > DF_exp_mid+1) // e>1 ? { var uint64 bitmask = // Bitmaske: Bit 52-e gesetzt, alle anderen gelöscht bit(DF_mant_len+DF_exp_mid-uexp); var uint64 mask = // Bitmaske: Bits 51-e..0 gesetzt, alle anderen gelöscht bitmask-1; if ( ((x_ & bitmask) ==0) // Bit 52-e =0 -> abrunden || ( ((x_ & mask) ==0) // Bit 52-e =1 und Bits 51-e..0 >0 -> aufrunden // round-to-even, je nach Bit 53-e : && ((x_ & (bitmask<<1)) ==0) ) ) // abrunden { mask |= bitmask; // Bitmaske: Bits 52-e..0 gesetzt, alle anderen gelöscht return allocate_dfloat( x_ & ~mask ); } else // aufrunden { return allocate_dfloat ((x_ | mask) // alle diese Bits 51-e..0 setzen (Bit 52-e schon gesetzt) + 1 // letzte Stelle erhöhen, dabei evtl. Exponenten incrementieren ); } } elif (uexp == DF_exp_mid+1) // e=1 ? // Wie bei 1 < e <= 52, nur daß Bit 53-e stets gesetzt ist. { if ((x_ & bit(DF_mant_len-1)) ==0) // Bit 52-e =0 -> abrunden // abrunden { return allocate_dfloat( x_ & ~(bit(DF_mant_len)-1) ); } else // aufrunden { return allocate_dfloat ((x_ | (bit(DF_mant_len)-1)) // alle diese Bits 52-e..0 setzen + 1 // letzte Stelle erhöhen, dabei evtl. Exponenten incrementieren ); } } else // e=0 ? // Wie bei 1 < e <= 52, nur daß Bit 52-e stets gesetzt // und Bit 53-e stets gelöscht ist. { if ((x_ & (bit(DF_mant_len)-1)) ==0) // abrunden von +-0.5 zu 0.0 { return cl_DF_0; } else // aufrunden { return allocate_dfloat ((x_ | (bit(DF_mant_len)-1)) // alle Bits 51-e..0 setzen + 1 // letzte Stelle erhöhen, dabei Exponenten incrementieren ); } } } #else var uint32 semhi = TheDfloat(x)->dfloat_value.semhi; var uint32 mlo = TheDfloat(x)->dfloat_value.mlo; var uintL uexp = DF_uexp(semhi); // e + DF_exp_mid if (uexp < DF_exp_mid) // x = 0.0 oder e<0 ? { return cl_DF_0; } else { if (uexp > DF_exp_mid+DF_mant_len) // e > 52 ? { return x; } else if (uexp > DF_exp_mid+1) // e>1 ? { if (uexp > DF_exp_mid+DF_mant_len-32) // e > 20 ? { var uint32 bitmask = // Bitmaske: Bit 52-e gesetzt, alle anderen gelöscht bit(DF_mant_len+DF_exp_mid-uexp); var uint32 mask = // Bitmaske: Bits 51-e..0 gesetzt, alle anderen gelöscht bitmask-1; if ( ((mlo & bitmask) ==0) // Bit 52-e =0 -> abrunden || ( ((mlo & mask) ==0) // Bit 52-e =1 und Bits 51-e..0 >0 -> aufrunden // round-to-even, je nach Bit 53-e : && ( ((bitmask<<1) == 0) // e=21 ? ? ((semhi & bit(0)) ==0) : ((mlo & (bitmask<<1)) ==0) ) ) ) // abrunden { mask |= bitmask; // Bitmaske: Bits 52-e..0 gesetzt, alle anderen gelöscht return allocate_dfloat(semhi, mlo & ~mask ); } else // aufrunden { mlo = (mlo | mask) // alle diese Bits 51-e..0 setzen (Bit 52-e schon gesetzt) + 1; // letzte Stelle erhöhen, if (mlo==0) { semhi += 1; } // dabei evtl. Exponenten incrementieren return allocate_dfloat(semhi,mlo); } } else { var uint32 bitmask = // Bitmaske: Bit 20-e gesetzt, alle anderen gelöscht bit(DF_mant_len+DF_exp_mid-32-uexp); var uint32 mask = // Bitmaske: Bits 19-e..0 gesetzt, alle anderen gelöscht bitmask-1; if ( ((semhi & bitmask) ==0) // Bit 52-e =0 -> abrunden || ( (mlo==0) && ((semhi & mask) ==0) // Bit 52-e =1 und Bits 51-e..0 >0 -> aufrunden // round-to-even, je nach Bit 53-e : && ((semhi & (bitmask<<1)) ==0) ) ) // abrunden { mask |= bitmask; // Bitmaske: Bits 20-e..0 gesetzt, alle anderen gelöscht return allocate_dfloat( semhi & ~mask, 0 ); } else // aufrunden { return allocate_dfloat ((semhi | mask) // alle diese Bits 19-e..0 setzen (Bit 20-e schon gesetzt) + 1, // letzte Stelle erhöhen, dabei evtl. Exponenten incrementieren 0 ); } } } elif (uexp == DF_exp_mid+1) // e=1 ? // Wie bei 1 < e <= 20, nur daß Bit 53-e stets gesetzt ist. { if ((semhi & bit(DF_mant_len-32-1)) ==0) // Bit 52-e =0 -> abrunden // abrunden { return allocate_dfloat( semhi & ~(bit(DF_mant_len-32)-1) , 0 ); } else // aufrunden { return allocate_dfloat ((semhi | (bit(DF_mant_len-32)-1)) // alle diese Bits 52-e..0 setzen + 1, // letzte Stelle erhöhen, dabei evtl. Exponenten incrementieren 0 ); } } else // e=0 ? // Wie bei 1 < e <= 20, nur daß Bit 52-e stets gesetzt // und Bit 53-e stets gelöscht ist. { if ((mlo==0) && ((semhi & (bit(DF_mant_len-32)-1)) ==0)) // abrunden von +-0.5 zu 0.0 { return cl_DF_0; } else // aufrunden { return allocate_dfloat ((semhi | (bit(DF_mant_len-32)-1)) // alle Bits 51-e..0 setzen + 1, // letzte Stelle erhöhen, dabei Exponenten incrementieren 0 ); } } } #endif } } // namespace cln cln-1.3.3/src/float/dfloat/elem/cl_DF_globals.cc0000644000000000000000000000200311201634736016226 0ustar // Global variables for cl_DF. // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/dfloat/cl_DF.h" // Implementation. namespace cln { const cl_DF cl_DF_0 = cl_DF_0; const cl_DF cl_DF_1 = cl_DF_1; const cl_DF cl_DF_minus1 = cl_DF_minus1; int cl_DF_globals_init_helper::count = 0; cl_DF_globals_init_helper::cl_DF_globals_init_helper() { if (count++ == 0) { #if (cl_word_size == 64) new ((void *)&cl_DF_0) cl_DF(allocate_dfloat(0)); // 0.0d0 new ((void *)&cl_DF_1) cl_DF(encode_DF(0, 1, bit(DF_mant_len))); // 1.0d0 new ((void *)&cl_DF_minus1) cl_DF(encode_DF(-1,1,bit(DF_mant_len))); // -1.0d0 #else new ((void *)&cl_DF_0) cl_DF(allocate_dfloat(0, 0)); // 0.0d0 new ((void *)&cl_DF_1) cl_DF(encode_DF(0, 1, bit(DF_mant_len - 32), 0)); // 1.0d0 new ((void *)&cl_DF_minus1) cl_DF(encode_DF(-1, 1, bit(DF_mant_len - 32), 0)); // -1.0d0 #endif } } cl_DF_globals_init_helper::~cl_DF_globals_init_helper() { if (--count == 0) { // Nothing to clean up } } } // namespace cln cln-1.3.3/src/float/dfloat/elem/cl_DF_div.cc0000644000000000000000000002063611201634736015401 0ustar // binary operator / // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" #include "base/cl_N.h" #include "float/cl_F.h" #include "base/cl_low.h" #include "base/digitseq/cl_DS.h" #include "base/cl_inline.h" #include "float/dfloat/elem/cl_DF_zerop.cc" namespace cln { const cl_DF operator/ (const cl_DF& x1, const cl_DF& x2) { // Methode: // x2 = 0.0 -> Error // x1 = 0.0 -> Ergebnis 0.0 // Sonst: // Ergebnis-Vorzeichen = xor der beiden Vorzeichen von x1 und x2 // Ergebnis-Exponent = Differenz der beiden Exponenten von x1 und x2 // Ergebnis-Mantisse = Mantisse mant1 / Mantisse mant2, gerundet. // mant1/mant2 > 1/2, mant1/mant2 < 2; // nach Rundung mant1/mant2 >=1/2, <=2*mant1<2. // Bei mant1/mant2 >=1 brauche 52 Nachkommabits, // bei mant1/mant2 <1 brauche 53 Nachkommabits. // Fürs Runden: brauche ein Rundungsbit (Rest gibt an, ob exakt). // Brauche daher insgesamt 54 Nachkommabits von mant1/mant2. // Dividiere daher (als Unsigned Integers) 2^54*(2^53*mant1) durch (2^53*mant2). // Falls der Quotient >=2^54 ist, runde die letzten zwei Bits weg und // erhöhe den Exponenten um 1. // Falls der Quotient <2^54 ist, runde das letzte Bit weg. Bei rounding // overflow schiebe um ein weiteres Bit nach rechts, incr. Exponenten. #if defined(FAST_DOUBLE) && !defined(__i386__) double_to_DF(DF_to_double(x1) / DF_to_double(x2), return , TRUE, TRUE, // Overflow und subnormale Zahl abfangen !zerop_inline(x1), // ein Ergebnis +/- 0.0 // ist genau dann in Wirklichkeit ein Underflow zerop_inline(x2), // Division durch Null abfangen FALSE // kein NaN als Ergebnis möglich ); #else // x1,x2 entpacken: var cl_signean sign1; var sintL exp1; #if (intDsize<=32) var uintL manthi1; var uintL mantlo1; #endif var cl_signean sign2; var sintL exp2; #if (intDsize<=32) var uintL manthi2; var uintL mantlo2; #endif #if (cl_word_size==64) var uint64 mantx1; var uint64 mantx2; DF_decode(x2, { throw division_by_0_exception(); }, sign2=,exp2=,mantx2=); DF_decode(x1, { return x1; }, sign1=,exp1=,mantx1=); #else DF_decode2(x2, { throw division_by_0_exception(); }, sign2=,exp2=,manthi2=,mantlo2=); DF_decode2(x1, { return x1; }, sign1=,exp1=,manthi1=,mantlo1=); #endif exp1 = exp1 - exp2; // Differenz der Exponenten sign1 = sign1 ^ sign2; // Ergebnis-Vorzeichen // Dividiere 2^54*mant1 durch mant2 oder (äquivalent) // 2^i*2^54*mant1 durch 2^i*mant2 für irgendein i mit 0 <= i <= 64-53 : // wähle i = 64-(DF_mant_len+1), also i+(DF_mant_len+2) = 65. #if (cl_word_size==64) mantx1 = mantx1 << 1; mantx2 = mantx2 << (64-(DF_mant_len+1)); #if (intDsize<=32) manthi1 = high32(mantx1); mantlo1 = low32(mantx1); manthi2 = high32(mantx2); mantlo2 = low32(mantx2); #endif #else manthi1 = (manthi1 << 1) | (mantlo1 >> 31); mantlo1 = mantlo1 << 1; manthi2 = (manthi2 << (64-(DF_mant_len+1))) | (mantlo2 >> ((DF_mant_len+1)-32)); mantlo2 = mantlo2 << (64-(DF_mant_len+1)); #endif var uintD mant1 [128/intDsize]; var uintD mant2 [64/intDsize]; #if (intDsize==64) arrayLSref(mant1,128/intDsize,1) = mantx1; arrayLSref(mant1,128/intDsize,0) = 0; arrayLSref(mant2,64/intDsize,0) = mantx2; #elif (intDsize==32) || (intDsize==16) || (intDsize==8) set_32_Dptr(arrayMSDptr(mant1,128/intDsize),manthi1); set_32_Dptr(arrayMSDptr(mant1,128/intDsize) mspop 32/intDsize,mantlo1); set_32_Dptr(arrayMSDptr(mant1,128/intDsize) mspop 2*32/intDsize,0); set_32_Dptr(arrayMSDptr(mant1,128/intDsize) mspop 3*32/intDsize,0); set_32_Dptr(arrayMSDptr(mant2,64/intDsize),manthi2); set_32_Dptr(arrayMSDptr(mant2,64/intDsize) mspop 32/intDsize,mantlo2); #else {var uintD* ptr; ptr = arrayLSDptr(mant1,128/intDsize); doconsttimes(64/intDsize, { lsprefnext(ptr) = 0; } ); doconsttimes(32/intDsize, { lsprefnext(ptr) = (uintD)mantlo1; mantlo1 = mantlo1>>intDsize; } ); doconsttimes(32/intDsize, { lsprefnext(ptr) = (uintD)manthi1; manthi1 = manthi1>>intDsize; } ); } {var uintD* ptr; ptr = arrayLSDptr(mant2,64/intDsize); doconsttimes(32/intDsize, { lsprefnext(ptr) = (uintD)mantlo2; mantlo2 = mantlo2>>intDsize; } ); doconsttimes(32/intDsize, { lsprefnext(ptr) = (uintD)manthi2; manthi2 = manthi2>>intDsize; } ); } #endif #if (cl_word_size==64) var uint64 mantx; #endif #if (intDsize<=32) var uintL manthi; var uintL mantlo; #endif {CL_ALLOCA_STACK; var DS q; var DS r; UDS_divide(arrayMSDptr(mant1,128/intDsize),128/intDsize,arrayLSDptr(mant1,128/intDsize), arrayMSDptr(mant2,64/intDsize),64/intDsize,arrayLSDptr(mant2,64/intDsize), &q, &r ); // Es ist 2^53 <= q < 2^55, also q.len = ceiling(54/intDsize)=ceiling(55/intDsize), // und r=0 genau dann, wenn r.len=0. ASSERT(q.len==ceiling(54,intDsize)) {var uintD* ptr = q.MSDptr; #if (intDsize==64) mantx = mspref(ptr,0); #else // (intDsize<=32) manthi = get_max32_Dptr(23,ptr); mantlo = get_32_Dptr(ptr mspop ceiling(23,intDsize)); #endif } // q = 2^32*manthi+mantlo. #if (cl_word_size==64) #if (intDsize<=32) mantx = ((uint64)manthi<<32) | (uint64)mantlo; #endif if (mantx >= bit(DF_mant_len+2)) // Quotient >=2^54 -> 2 Bits wegrunden { var uint64 rounding_bits = mantx & (bit(2)-1); exp1 += 1; // Exponenten incrementieren mantx = mantx >> 2; if ( (rounding_bits < bit(1)) // 00,01 werden abgerundet || ( (rounding_bits == bit(1)) // 10 && (r.len == 0) // und genau halbzahlig && ((mantx & bit(0)) ==0) // -> round-to-even ) ) // abrunden {} else // aufrunden { mantx += 1; } } else // Quotient <2^54 -> 1 Bit wegrunden { var uint64 rounding_bit = mantx & bit(0); mantx = mantx >> 1; if ( (rounding_bit == 0) // 0 wird abgerundet || ( (r.len == 0) // genau halbzahlig && ((mantx & bit(0)) ==0) // -> round-to-even ) ) // abrunden {} else // aufrunden { mantx += 1; if (mantx >= bit(DF_mant_len+1)) // rounding overflow? { mantx = mantx>>1; exp1 = exp1+1; } } } #else if (manthi >= bit(DF_mant_len-32+2)) // Quotient >=2^54 -> 2 Bits wegrunden { var uintL rounding_bits = mantlo & (bit(2)-1); exp1 += 1; // Exponenten incrementieren mantlo = (mantlo >> 2) | (manthi << 30); manthi = manthi >> 2; if ( (rounding_bits < bit(1)) // 00,01 werden abgerundet || ( (rounding_bits == bit(1)) // 10 && (r.len == 0) // und genau halbzahlig && ((mantlo & bit(0)) ==0) // -> round-to-even ) ) // abrunden {} else // aufrunden { mantlo += 1; if (mantlo==0) { manthi += 1; } } } else // Quotient <2^54 -> 1 Bit wegrunden { var uintL rounding_bit = mantlo & bit(0); mantlo = (mantlo >> 1) | (manthi << 31); manthi = manthi >> 1; if ( (rounding_bit == 0) // 0 wird abgerundet || ( (r.len == 0) // genau halbzahlig && ((mantlo & bit(0)) ==0) // -> round-to-even ) ) // abrunden {} else // aufrunden { mantlo += 1; if (mantlo==0) { manthi += 1; if (manthi >= bit(DF_mant_len-32+1)) // rounding overflow? { manthi = manthi>>1; exp1 = exp1+1; } } } } #endif } #if (cl_word_size==64) return encode_DF(sign1,exp1,mantx); #else return encode_DF(sign1,exp1,manthi,mantlo); #endif #endif } } // namespace cln cln-1.3.3/src/float/dfloat/elem/cl_DF_ffloor.cc0000644000000000000000000000062011201634736016075 0ustar // ffloor(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" #include "base/cl_inline.h" #include "float/dfloat/elem/cl_DF_minusp.cc" namespace cln { const cl_DF CL_FLATTEN ffloor (const cl_DF& x) { if (minusp_inline(x)) return futruncate(x); else return ftruncate(x); } } // namespace cln cln-1.3.3/src/float/dfloat/input/0000755000000000000000000000000012173046177013474 5ustar cln-1.3.3/src/float/dfloat/input/cl_DF_from_string.cc0000644000000000000000000000102511201634736017354 0ustar // cl_DF (const char *) constructor. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat_class.h" // Implementation. #include "cln/dfloat.h" #include "cln/input.h" #include "cln/float_io.h" namespace cln { cl_read_flags cl_DF_read_flags = { syntax_dfloat, lsyntax_all, 10, { float_format_dfloat, float_format_lfloat_min, false } }; cl_DF::cl_DF (const char * string) { pointer = as_cl_private_thing( As(cl_DF)(read_float(cl_DF_read_flags,string,NULL,NULL))); } } // namespace cln cln-1.3.3/src/float/dfloat/division/0000755000000000000000000000000012173046177014161 5ustar cln-1.3.3/src/float/dfloat/division/cl_DF_floor22.cc0000644000000000000000000000070011201634736016774 0ustar // floor2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" namespace cln { const cl_DF_div_t floor2 (const cl_DF& x, const cl_DF& y) { // Methode: // (q,r) := floor(x/y). Liefere q und x-y*q = y*r. var cl_DF_div_t q_r = floor2(x/y); var cl_I& q = q_r.quotient; var cl_DF& r = q_r.remainder; return cl_DF_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/float/dfloat/division/cl_DF_trunc22.cc0000644000000000000000000000071411201634736017013 0ustar // truncate2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" namespace cln { const cl_DF_div_t truncate2 (const cl_DF& x, const cl_DF& y) { // Methode: // (q,r) := truncate(x/y). Liefere q und x-y*q = y*r. var cl_DF_div_t q_r = truncate2(x/y); var cl_I& q = q_r.quotient; var cl_DF& r = q_r.remainder; return cl_DF_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/float/dfloat/division/cl_DF_fceil.cc0000644000000000000000000000066711201634736016605 0ustar // fceiling(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" /* For inline version of minusp */ #include "base/cl_inline.h" #include "float/dfloat/elem/cl_DF_minusp.cc" namespace cln { const cl_DF CL_FLATTEN fceiling (const cl_DF& x) { if (minusp_inline(x)) return ftruncate(x); else return futruncate(x); } } // namespace cln cln-1.3.3/src/float/dfloat/division/cl_DF_round22.cc0000644000000000000000000000070011201634736017002 0ustar // round2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" namespace cln { const cl_DF_div_t round2 (const cl_DF& x, const cl_DF& y) { // Methode: // (q,r) := round(x/y). Liefere q und x-y*q = y*r. var cl_DF_div_t q_r = round2(x/y); var cl_I& q = q_r.quotient; var cl_DF& r = q_r.remainder; return cl_DF_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/float/dfloat/division/cl_DF_recip.cc0000644000000000000000000000040211201634736016610 0ustar // recip(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" namespace cln { const cl_DF recip (const cl_DF& x) { return cl_DF_1 / x; } } // namespace cln cln-1.3.3/src/float/dfloat/division/cl_DF_ceil22.cc0000644000000000000000000000071011201634736016570 0ustar // ceiling2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" namespace cln { const cl_DF_div_t ceiling2 (const cl_DF& x, const cl_DF& y) { // Methode: // (q,r) := ceiling(x/y). Liefere q und x-y*q = y*r. var cl_DF_div_t q_r = ceiling2(x/y); var cl_I& q = q_r.quotient; var cl_DF& r = q_r.remainder; return cl_DF_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/float/algebraic/0000755000000000000000000000000012173046176012774 5ustar cln-1.3.3/src/float/algebraic/cl_F_sqrt.cc0000644000000000000000000000052711201634736015217 0ustar // sqrt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" namespace cln { const cl_F sqrt (const cl_F& x) GEN_F_OP1(x, sqrt, return) } // namespace cln cln-1.3.3/src/float/conv/0000755000000000000000000000000012173046177012031 5ustar cln-1.3.3/src/float/conv/cl_SF_to_DF.cc0000644000000000000000000000116311201634736014375 0ustar // cl_SF_to_DF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/cl_F.h" // Implementation. #include "float/sfloat/cl_SF.h" #include "float/dfloat/cl_DF.h" namespace cln { const cl_DF cl_SF_to_DF (const cl_SF& x) { // x entpacken: var cl_signean sign; var sintL exp; var uint32 mant; SF_decode(x, { return cl_DF_0; }, sign=,exp=,mant=); // Mantisse um 52-16=36 Nullbits erweitern: #if (cl_word_size==64) return encode_DF(sign,exp,(uint64)mant<<(DF_mant_len-SF_mant_len)); #else return encode_DF(sign,exp,mant<<(DF_mant_len-SF_mant_len-32),0); #endif } } // namespace cln cln-1.3.3/src/float/conv/cl_SF_to_double.cc0000644000000000000000000000401611201634736015356 0ustar // cl_SF_to_double(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" #include "float/dfloat/cl_DF.h" namespace cln { double double_approx (const cl_SF& x) { // x entpacken: var cl_signean sign; var sintL exp; var uint32 mant; SF_decode(x, { return 0.0; }, sign=,exp=,mant=); // Mantisse um 52-16=36 Nullbits erweitern: union { dfloat eksplicit; double machine_double; } u; #if (cl_word_size==64) if (((sintL)(SF_exp_high-SF_exp_mid) > (sintL)(DF_exp_high-DF_exp_mid)) && (exp > (sintL)(DF_exp_high-DF_exp_mid))) { u.eksplicit = ((sint64)sign & bit(63)) | ((uint64)(bit(DF_exp_len)-1) << DF_mant_len); // Infinity } else if (((sintL)(SF_exp_low-SF_exp_mid) < (sintL)(DF_exp_low-DF_exp_mid)) && (exp < (sintL)(DF_exp_low-DF_exp_mid))) { u.eksplicit = ((sint64)sign & bit(63)); } // 0.0 else { u.eksplicit = ((sint64)sign & bit(63)) /* Vorzeichen */ | ((uint64)(exp+DF_exp_mid) << DF_mant_len) /* Exponent */ | (((uint64)mant<<(DF_mant_len-SF_mant_len)) & (bit(DF_mant_len)-1)); /* Mantisse */ } #else if (((sintL)(SF_exp_high-SF_exp_mid) > (sintL)(DF_exp_high-DF_exp_mid)) && (exp > (sintL)(DF_exp_high-DF_exp_mid))) { u.eksplicit.semhi = ((sint32)sign & bit(31)) | ((uint32)(bit(DF_exp_len)-1) << (DF_mant_len-32)); // Infinity u.eksplicit.mlo = 0; } else if (((sintL)(SF_exp_low-SF_exp_mid) < (sintL)(DF_exp_low-DF_exp_mid)) && (exp < (sintL)(DF_exp_low-DF_exp_mid))) { u.eksplicit.semhi = ((sint32)sign & bit(31)); // 0.0 u.eksplicit.mlo = 0; } else { u.eksplicit.semhi = ((sint32)sign & bit(31)) /* Vorzeichen */ | ((uint32)(exp+DF_exp_mid) << (DF_mant_len-32)) /* Exponent */ | (((uint32)mant<<(DF_mant_len-SF_mant_len-32)) & (bit(DF_mant_len-32)-1)); /* Mantisse */ u.eksplicit.mlo = 0; } #endif return u.machine_double; } } // namespace cln cln-1.3.3/src/float/conv/cl_F_from_RA.cc0000644000000000000000000000100711201634736014601 0ustar // cl_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F cl_float (const cl_RA& x, const cl_F& y) { floattypecase(y , return cl_RA_to_SF(x); , return cl_RA_to_FF(x); , return cl_RA_to_DF(x); , return cl_RA_to_LF(x,TheLfloat(y)->len); ); } } // namespace cln cln-1.3.3/src/float/conv/cl_F_to_LF.cc0000644000000000000000000000063611201634736014266 0ustar // cl_F_to_LF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_LF cl_F_to_LF (const cl_F& x, uintC len) { floatcase(x , return cl_SF_to_LF(x,len); , return cl_FF_to_LF(x,len); , return cl_DF_to_LF(x,len); , return LF_to_LF(x,len); ); } } // namespace cln cln-1.3.3/src/float/conv/cl_F_from_I.cc0000644000000000000000000000100211201634736014462 0ustar // cl_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F cl_float (const cl_I& x, const cl_F& y) { floattypecase(y , return cl_I_to_SF(x); , return cl_I_to_FF(x); , return cl_I_to_DF(x); , return cl_I_to_LF(x,TheLfloat(y)->len); ); } } // namespace cln cln-1.3.3/src/float/conv/cl_F_from_I_f.cc0000644000000000000000000000100011201634736014765 0ustar // cl_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F cl_float (const cl_I& x, float_format_t f) { floatformatcase((uintC)f , return cl_I_to_SF(x); , return cl_I_to_FF(x); , return cl_I_to_DF(x); , return cl_I_to_LF(x,len); ); } } // namespace cln cln-1.3.3/src/float/conv/cl_FF_to_double.cc0000644000000000000000000000405611201634736015345 0ustar // cl_FF_to_double(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" namespace cln { double double_approx (const cl_FF& x) { // x entpacken: var cl_signean sign; var sintL exp; var uint32 mant; FF_decode(x, { return 0.0; }, sign=,exp=,mant=); // Mantisse um 52-23=29 Nullbits erweitern: union { dfloat eksplicit; double machine_double; } u; #if (cl_word_size==64) if (((sintL)(FF_exp_high-FF_exp_mid) > (sintL)(DF_exp_high-DF_exp_mid)) && (exp > (sintL)(DF_exp_high-DF_exp_mid))) { u.eksplicit = ((sint64)sign & bit(63)) | ((uint64)(bit(DF_exp_len)-1) << DF_mant_len); // Infinity } else if (((sintL)(FF_exp_low-FF_exp_mid) < (sintL)(DF_exp_low-DF_exp_mid)) && (exp < (sintL)(DF_exp_low-DF_exp_mid))) { u.eksplicit = ((sint64)sign & bit(63)); } // 0.0 else { u.eksplicit = ((sint64)sign & bit(63)) /* Vorzeichen */ | ((uint64)(exp+DF_exp_mid) << DF_mant_len) /* Exponent */ | (((uint64)mant<<(DF_mant_len-FF_mant_len)) & (bit(DF_mant_len)-1)); /* Mantisse */ } #else if (((sintL)(FF_exp_high-FF_exp_mid) > (sintL)(DF_exp_high-DF_exp_mid)) && (exp > (sintL)(DF_exp_high-DF_exp_mid))) { u.eksplicit.semhi = ((sint32)sign & bit(31)) | ((uint32)(bit(DF_exp_len)-1) << (DF_mant_len-32)); // Infinity u.eksplicit.mlo = 0; } else if (((sintL)(FF_exp_low-FF_exp_mid) < (sintL)(DF_exp_low-DF_exp_mid)) && (exp < (sintL)(DF_exp_low-DF_exp_mid))) { u.eksplicit.semhi = ((sint32)sign & bit(31)); // 0.0 u.eksplicit.mlo = 0; } else { u.eksplicit.semhi = ((sint32)sign & bit(31)) /* Vorzeichen */ | ((uint32)(exp+DF_exp_mid) << (DF_mant_len-32)) /* Exponent */ | (((uint32)mant>>(32-(DF_mant_len-FF_mant_len))) & (bit(DF_mant_len-32)-1)); /* Mantisse */ u.eksplicit.mlo = mant<<(DF_mant_len-FF_mant_len); } #endif return u.machine_double; } } // namespace cln cln-1.3.3/src/float/conv/cl_F_to_FF.cc0000644000000000000000000000053111201634736014252 0ustar // cl_F_to_FF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" namespace cln { const cl_FF cl_F_to_FF (const cl_F& x) { floatcase(x , return cl_SF_to_FF(x); , return x; , return cl_DF_to_FF(x); , return cl_LF_to_FF(x); ); } } // namespace cln cln-1.3.3/src/float/conv/cl_F_from_I_def.cc0000644000000000000000000000077211201634736015315 0ustar // cl_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F cl_float (const cl_I& x) { floatformatcase(default_float_format , return cl_I_to_SF(x); , return cl_I_to_FF(x); , return cl_I_to_DF(x); , return cl_I_to_LF(x,len); ); } } // namespace cln cln-1.3.3/src/float/conv/cl_F_to_DF.cc0000644000000000000000000000053111201634736014250 0ustar // cl_F_to_DF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" namespace cln { const cl_DF cl_F_to_DF (const cl_F& x) { floatcase(x , return cl_SF_to_DF(x); , return cl_FF_to_DF(x); , return x; , return cl_LF_to_DF(x); ); } } // namespace cln cln-1.3.3/src/float/conv/cl_F_from_RA_def.cc0000644000000000000000000000077711201634736015434 0ustar // cl_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F cl_float (const cl_RA& x) { floatformatcase(default_float_format , return cl_RA_to_SF(x); , return cl_RA_to_FF(x); , return cl_RA_to_DF(x); , return cl_RA_to_LF(x,len); ); } } // namespace cln cln-1.3.3/src/float/conv/cl_LF_to_SF.cc0000644000000000000000000000301312034641727014404 0ustar // cl_LF_to_SF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/cl_F.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "float/sfloat/cl_SF.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_SF cl_LF_to_SF (const cl_LF& x) { // x entpacken: var cl_signean sign; var sintE exp; var uintD* ptr; var uintC len; LF_decode(x, { return SF_0; }, sign=,exp=,ptr=,len=,); // intDsize*len-SF_mant_len-1 Bits der Mantisse wegrunden: // erste k := ceiling(SF_mant_len+2,intDsize) Digits nach mant holen: #if (intDsize==64) var uint64 mant = get_max64_Dptr(SF_mant_len+2,ptr); #else var uint32 mant = get_max32_Dptr(SF_mant_len+2,ptr); #endif ptr = ptr mspop ceiling(SF_mant_len+2,intDsize); var const int shiftcount = ceiling(SF_mant_len+2,intDsize)*intDsize-(SF_mant_len+1); if ( ((mant & bit(shiftcount-1)) ==0) // Bit 14 war 0 -> abrunden || ( ((mant & (bit(shiftcount-1)-1)) ==0) // war 1, Bits 13..0 >0 -> aufrunden && !test_loop_msp(ptr,len-ceiling(SF_mant_len+2,intDsize)) // weitere Bits /=0 -> aufrunden // round-to-even && ((mant & bit(shiftcount)) ==0) ) ) // abrunden { mant = mant >> shiftcount; } else // aufrunden { mant = mant >> shiftcount; mant = mant+1; if (mant >= bit(SF_mant_len+1)) // Überlauf durchs Runden { mant = mant>>1; exp = exp+1; } // Mantisse rechts schieben } return encode_SF(sign,exp,mant); } } // namespace cln cln-1.3.3/src/float/conv/cl_F_to_float.cc0000644000000000000000000000071111201634736015064 0ustar // cl_F_to_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" namespace cln { float float_approx (const cl_F& x) { floatcase(x , return float_approx(x); , return float_approx(x); , return float_approx(x); , return float_approx(x); ); } } // namespace cln cln-1.3.3/src/float/conv/cl_DF_to_LF.cc0000644000000000000000000000264411201634736014373 0ustar // cl_DF_to_LF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/cl_F.h" // Implementation. #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_LF cl_DF_to_LF (const cl_DF& x, uintC len) { // x entpacken: var cl_signean sign; var sintL exp; #if (cl_word_size==64) var uint64 mant; DF_decode(x, { return encode_LF0(len); }, sign=,exp=(sintL),mant=); #else var uint32 manthi; var uint32 mantlo; DF_decode2(x, { return encode_LF0(len); }, sign=,exp=(sintL),manthi=,mantlo=); #endif // Long-Float allozieren, // Mantisse mit intDsize*len-DF_mant_len-1 Nullbits auffüllen: var Lfloat y = allocate_lfloat(len,exp+LF_exp_mid,sign); var uintD* ptr = arrayMSDptr(TheLfloat(y)->data,len); // erste k := ceiling(DF_mant_len+1,intDsize) Digits mit mant füllen: var const int shiftcount = (ceiling(DF_mant_len+1,intDsize)*intDsize-(DF_mant_len+1)); #if (cl_word_size==64) mant = mant<>(32-shiftcount)); mantlo = mantlo< abrunden || ( ((mant & (bit(shiftcount-1)-1)) ==0) // war 1, Bits 9..0 >0 -> aufrunden && !test_loop_msp(ptr,len-ceiling(DF_mant_len+2,intDsize)) // weitere Bits /=0 -> aufrunden // round-to-even && ((mant & bit(shiftcount)) ==0) ) ) // abrunden { mant = mant >> shiftcount; } else // aufrunden { mant = mant >> shiftcount; mant = mant+1; if (mant >= bit(DF_mant_len+1)) // Überlauf durchs Runden { mant = mant>>1; exp = exp+1; } // Mantisse rechts schieben } if (exp > (sintL)(DF_exp_high-DF_exp_mid)) { u.eksplicit = ((sint64)sign & bit(63)) | ((uint64)(bit(DF_exp_len)-1) << DF_mant_len); // Infinity } else if (exp < (sintL)(DF_exp_low-DF_exp_mid)) { u.eksplicit = ((sint64)sign & bit(63)); } // 0.0 else { u.eksplicit = ((sint64)sign & bit(63)) /* Vorzeichen */ | ((uint64)(exp+DF_exp_mid) << DF_mant_len) /* Exponent */ | ((uint64)mant & (bit(DF_mant_len)-1)); /* Mantisse */ } #else var uint32 manthi = get_max32_Dptr(DF_mant_len+2-32,ptr); var uint32 mantlo = get_32_Dptr(ptr mspop ceiling(DF_mant_len+2-32,intDsize)); ptr = ptr mspop ceiling(DF_mant_len+2,intDsize); if ( ((mantlo & bit(shiftcount-1)) ==0) // Bit 10 war 0 -> abrunden || ( ((mantlo & (bit(shiftcount-1)-1)) ==0) // war 1, Bits 9..0 >0 -> aufrunden && !test_loop_msp(ptr,len-ceiling(DF_mant_len+2,intDsize)) // weitere Bits /=0 -> aufrunden // round-to-even && ((mantlo & bit(shiftcount)) ==0) ) ) // abrunden { mantlo = (manthi << (32-shiftcount)) | (mantlo >> shiftcount); manthi = manthi >> shiftcount; } else // aufrunden { mantlo = (manthi << (32-shiftcount)) | (mantlo >> shiftcount); manthi = manthi >> shiftcount; mantlo = mantlo+1; if (mantlo==0) { manthi = manthi+1; if (manthi >= bit(DF_mant_len+1-32)) // Überlauf durchs Runden { manthi = manthi>>1; exp = exp+1; } // Mantisse rechts schieben } } if (exp > (sintL)(DF_exp_high-DF_exp_mid)) { u.eksplicit.semhi = ((sint32)sign & bit(31)) | ((uint32)(bit(DF_exp_len)-1) << (DF_mant_len-32)); // Infinity u.eksplicit.mlo = 0; } else if (exp < (sintL)(DF_exp_low-DF_exp_mid)) { u.eksplicit.semhi = ((sint32)sign & bit(31)); // 0.0 u.eksplicit.mlo = 0; } else { u.eksplicit.semhi = ((sint32)sign & bit(31)) /* Vorzeichen */ | ((uint32)(exp+DF_exp_mid) << (DF_mant_len-32)) /* Exponent */ | ((uint32)manthi & (bit(DF_mant_len-32)-1)); /* Mantisse */ u.eksplicit.mlo = mantlo; } #endif return u.machine_double; } } // namespace cln cln-1.3.3/src/float/conv/cl_FF_to_float.cc0000644000000000000000000000174211201634736015177 0ustar // cl_FF_to_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" namespace cln { float float_approx (const cl_FF& obj) { union { ffloat eksplicit; float machine_float; } u; #define val u.eksplicit val = cl_ffloat_value(obj); // Der Exponent muß um FF_exp_mid-126 erniedrigt werden. if (FF_exp_mid>126) { var uintL exp = (val >> FF_mant_len) & (bit(FF_exp_len)-1); // e if (exp < FF_exp_mid-126+1) { // produziere denormalisiertes Float val = (val & minus_bit(FF_exp_len+FF_mant_len)) // selbes Vorzeichen | (0 << FF_mant_len) // Exponent 0 | (((val & (bit(FF_mant_len)-1)) | bit(FF_mant_len)) // Mantisse shiften >> (FF_exp_mid-126+1 - exp) // shiften ); } else { val -= (FF_exp_mid - 126) << FF_mant_len; } } #undef val return u.machine_float; } } // namespace cln cln-1.3.3/src/float/conv/cl_SF_to_LF.cc0000644000000000000000000000215611201634736014410 0ustar // cl_SF_to_LF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/cl_F.h" // Implementation. #include "float/sfloat/cl_SF.h" #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_LF cl_SF_to_LF (const cl_SF& x, uintC len) { // x entpacken: var cl_signean sign; var sintL exp; #if (intDsize==64) var uint64 mant; #else var uint32 mant; #endif SF_decode(x, { return encode_LF0(len); }, sign=,exp=(sintL),mant=); // Long-Float allozieren, // Mantisse mit intDsize*len-SF_mant_len-1 Nullbits auffüllen: var Lfloat y = allocate_lfloat(len,exp+LF_exp_mid,sign); var uintD* ptr = arrayMSDptr(TheLfloat(y)->data,len); // erste k := ceiling(SF_mant_len+1,intDsize) Digits mit mant füllen: mant = mant << (ceiling(SF_mant_len+1,intDsize)*intDsize-(SF_mant_len+1)); #if (intDsize==64) set_max64_Dptr(SF_mant_len+1,ptr,mant); #else set_max32_Dptr(SF_mant_len+1,ptr,mant); #endif clear_loop_msp(ptr mspop ceiling(SF_mant_len+1,intDsize),len-ceiling(SF_mant_len+1,intDsize)); return y; } } // namespace cln cln-1.3.3/src/float/conv/cl_DF_to_float.cc0000644000000000000000000000411011201634736015165 0ustar // cl_DF_to_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" #include "float/ffloat/cl_FF.h" namespace cln { float float_approx (const cl_DF& x) { union { ffloat eksplicit; float machine_float; } u; // x entpacken: var cl_signean sign; var sintL exp; #if (cl_word_size==64) var uint64 mant; DF_decode(x, { return 0.0; }, sign=,exp=,mant=); // 52-23=29 Bits wegrunden: var const int shiftcount = DF_mant_len-FF_mant_len; if ( ((mant & bit(shiftcount-1)) ==0) // Bit 28 war 0 -> abrunden || ( ((mant & (bit(shiftcount-1)-1)) ==0) // war 1, Bits 27..0 >0 -> aufrunden // round-to-even && ((mant & bit(shiftcount)) ==0) ) ) // abrunden { mant = mant >> shiftcount; } else // aufrunden { mant = mant >> shiftcount; mant = mant+1; if (mant >= bit(FF_mant_len+1)) // Überlauf durchs Runden { mant = mant>>1; exp = exp+1; } // Mantisse rechts schieben } #else var uint32 manthi; var uint32 mantlo; DF_decode2(x, { return 0.0; }, sign=,exp=,manthi=,mantlo=); // 52-23=29 Bits wegrunden: var const int shiftcount = DF_mant_len-FF_mant_len; manthi = (manthi << (32-shiftcount)) | (mantlo >> shiftcount); if ( ((mantlo & bit(shiftcount-1)) ==0) // Bit 28 war 0 -> abrunden || ( ((mantlo & (bit(shiftcount-1)-1)) ==0) // war 1, Bits 27..0 >0 -> aufrunden // round-to-even && ((mantlo & bit(shiftcount)) ==0) ) ) // abrunden {} else // aufrunden { manthi = manthi+1; if (manthi >= bit(FF_mant_len+1)) // Überlauf durchs Runden { manthi = manthi>>1; exp = exp+1; } // Mantisse rechts schieben } #define mant manthi #endif if (exp > (sintL)(FF_exp_high-FF_exp_mid)) { u.eksplicit = make_FF_word(sign,bit(FF_exp_len)-1,0); } // Infinity else if (exp < (sintL)(FF_exp_low-FF_exp_mid)) { u.eksplicit = make_FF_word(sign,0,0); } // 0.0 else { u.eksplicit = make_FF_word(sign,exp+FF_exp_mid,mant); } return u.machine_float; } } // namespace cln cln-1.3.3/src/float/conv/cl_F_to_SF.cc0000644000000000000000000000053111201634736014267 0ustar // cl_F_to_SF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" namespace cln { const cl_SF cl_F_to_SF (const cl_F& x) { floatcase(x , return x; , return cl_FF_to_SF(x); , return cl_DF_to_SF(x); , return cl_LF_to_SF(x); ); } } // namespace cln cln-1.3.3/src/float/conv/cl_FF_to_DF.cc0000644000000000000000000000122311201634736014355 0ustar // cl_FF_to_DF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/cl_F.h" // Implementation. #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" namespace cln { const cl_DF cl_FF_to_DF (const cl_FF& x) { // x entpacken: var cl_signean sign; var sintL exp; var uint32 mant; FF_decode(x, { return cl_DF_0; }, sign=,exp=,mant=); // Mantisse um 52-23=29 Nullbits erweitern: #if (cl_word_size==64) return encode_DF(sign,exp,(uint64)mant<<(DF_mant_len-FF_mant_len)); #else return encode_DF(sign,exp,mant>>(32-(DF_mant_len-FF_mant_len)),mant<<(DF_mant_len-FF_mant_len)); #endif } } // namespace cln cln-1.3.3/src/float/conv/cl_DF_to_FF.cc0000644000000000000000000000343011201634736014357 0ustar // cl_DF_to_FF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/cl_F.h" // Implementation. #include "float/dfloat/cl_DF.h" #include "float/ffloat/cl_FF.h" namespace cln { const cl_FF cl_DF_to_FF (const cl_DF& x) { // x entpacken: var cl_signean sign; var sintL exp; #if (cl_word_size==64) var uint64 mant; DF_decode(x, { return cl_FF_0; }, sign=,exp=,mant=); // 52-23=29 Bits wegrunden: var const int shiftcount = DF_mant_len-FF_mant_len; if ( ((mant & bit(shiftcount-1)) ==0) // Bit 28 war 0 -> abrunden || ( ((mant & (bit(shiftcount-1)-1)) ==0) // war 1, Bits 27..0 >0 -> aufrunden // round-to-even && ((mant & bit(shiftcount)) ==0) ) ) // abrunden { mant = mant >> shiftcount; } else // aufrunden { mant = mant >> shiftcount; mant = mant+1; if (mant >= bit(FF_mant_len+1)) // Überlauf durchs Runden { mant = mant>>1; exp = exp+1; } // Mantisse rechts schieben } return encode_FF(sign,exp,mant); #else var uint32 manthi; var uint32 mantlo; DF_decode2(x, { return cl_FF_0; }, sign=,exp=,manthi=,mantlo=); // 52-23=29 Bits wegrunden: var const int shiftcount = DF_mant_len-FF_mant_len; manthi = (manthi << (32-shiftcount)) | (mantlo >> shiftcount); if ( ((mantlo & bit(shiftcount-1)) ==0) // Bit 28 war 0 -> abrunden || ( ((mantlo & (bit(shiftcount-1)-1)) ==0) // war 1, Bits 27..0 >0 -> aufrunden // round-to-even && ((mantlo & bit(shiftcount)) ==0) ) ) // abrunden {} else // aufrunden { manthi = manthi+1; if (manthi >= bit(FF_mant_len+1)) // Überlauf durchs Runden { manthi = manthi>>1; exp = exp+1; } // Mantisse rechts schieben } return encode_FF(sign,exp,manthi); #endif } } // namespace cln cln-1.3.3/src/float/conv/cl_SF_to_float.cc0000644000000000000000000000174411201634736015216 0ustar // cl_SF_to_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" namespace cln { float float_approx (const cl_SF& x) { // x entpacken: var cl_signean sign; var sintL exp; var uint32 mant; SF_decode(x, { return 0.0; }, sign=,exp=,mant=); // Mantisse um 23-16=7 Bits nach links schieben: union { ffloat eksplicit; float machine_float; } u; if (((sintL)(SF_exp_high-SF_exp_mid) > (sintL)(FF_exp_high-FF_exp_mid)) && (exp > (sintL)(FF_exp_high-FF_exp_mid))) { u.eksplicit = make_FF_word(sign,bit(FF_exp_len)-1,0); } // Infinity else if (((sintL)(SF_exp_low-SF_exp_mid) < (sintL)(FF_exp_low-FF_exp_mid)) && (exp < (sintL)(FF_exp_low-FF_exp_mid))) { u.eksplicit = make_FF_word(sign,0,0); } // 0.0 else { u.eksplicit = make_FF_word(sign,exp+FF_exp_mid,mant<<(FF_mant_len-SF_mant_len)); } return u.machine_float; } } // namespace cln cln-1.3.3/src/float/conv/cl_F_from_F_f.cc0000644000000000000000000000060011201634736014767 0ustar // cl_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" namespace cln { const cl_F cl_float (const cl_F& x, float_format_t f) { floatformatcase((uintC)f , return cl_F_to_SF(x); , return cl_F_to_FF(x); , return cl_F_to_DF(x); , return cl_F_to_LF(x,len); ); } } // namespace cln cln-1.3.3/src/float/conv/cl_LF_to_float.cc0000644000000000000000000000351711724245161015207 0ustar // cl_LF_to_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "float/ffloat/cl_FF.h" #include "base/digitseq/cl_DS.h" namespace cln { float float_approx (const cl_LF& x) { // x entpacken: var cl_signean sign; var sintE exp; var uintD* ptr; var uintC len; LF_decode(x, { return 0.0; }, sign=,exp=,ptr=,len=,); // intDsize*len-FF_mant_len-1 Bits der Mantisse wegrunden: // erste k := ceiling(FF_mant_len+2,intDsize) Digits nach mant holen: #if (intDsize==64) var uint64 mant = get_max64_Dptr(FF_mant_len+2,ptr); #else var uint32 mant = get_max32_Dptr(FF_mant_len+2,ptr); #endif ptr = ptr mspop ceiling(FF_mant_len+2,intDsize); var const int shiftcount = ceiling(FF_mant_len+2,intDsize)*intDsize-(FF_mant_len+1); if ( ((mant & bit(shiftcount-1)) ==0) // Bit 7 war 0 -> abrunden || ( ((mant & (bit(shiftcount-1)-1)) ==0) // war 1, Bits 6..0 >0 -> aufrunden && !test_loop_msp(ptr,len-ceiling(FF_mant_len+2,intDsize)) // weitere Bits /=0 -> aufrunden // round-to-even && ((mant & bit(shiftcount)) ==0) ) ) // abrunden { mant = mant >> shiftcount; } else // aufrunden { mant = mant >> shiftcount; mant = mant+1; if (mant >= bit(FF_mant_len+1)) // Überlauf durchs Runden { mant = mant>>1; exp = exp+1; } // Mantisse rechts schieben } union { ffloat eksplicit; float machine_float; } u; if (exp > (sintL)(FF_exp_high-FF_exp_mid)) { u.eksplicit = make_FF_word(sign,bit(FF_exp_len)-1,0); } // Infinity else if (exp < (sintL)(FF_exp_low-FF_exp_mid)) { u.eksplicit = make_FF_word(sign,0,0); } // 0.0 else { u.eksplicit = make_FF_word(sign,exp+FF_exp_mid,mant); } return u.machine_float; } } // namespace cln cln-1.3.3/src/float/conv/cl_LF_to_FF.cc0000644000000000000000000000301412034641503014360 0ustar // cl_LF_to_FF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/cl_F.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "float/ffloat/cl_FF.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_FF cl_LF_to_FF (const cl_LF& x) { // x entpacken: var cl_signean sign; var sintE exp; var uintD* ptr; var uintC len; LF_decode(x, { return cl_FF_0; }, sign=,exp=,ptr=,len=,); // intDsize*len-FF_mant_len-1 Bits der Mantisse wegrunden: // erste k := ceiling(FF_mant_len+2,intDsize) Digits nach mant holen: #if (intDsize==64) var uint64 mant = get_max64_Dptr(FF_mant_len+2,ptr); #else var uint32 mant = get_max32_Dptr(FF_mant_len+2,ptr); #endif ptr = ptr mspop ceiling(FF_mant_len+2,intDsize); var const int shiftcount = ceiling(FF_mant_len+2,intDsize)*intDsize-(FF_mant_len+1); if ( ((mant & bit(shiftcount-1)) ==0) // Bit 7 war 0 -> abrunden || ( ((mant & (bit(shiftcount-1)-1)) ==0) // war 1, Bits 6..0 >0 -> aufrunden && !test_loop_msp(ptr,len-ceiling(FF_mant_len+2,intDsize)) // weitere Bits /=0 -> aufrunden // round-to-even && ((mant & bit(shiftcount)) ==0) ) ) // abrunden { mant = mant >> shiftcount; } else // aufrunden { mant = mant >> shiftcount; mant = mant+1; if (mant >= bit(FF_mant_len+1)) // Überlauf durchs Runden { mant = mant>>1; exp = exp+1; } // Mantisse rechts schieben } return encode_FF(sign,exp,mant); } } // namespace cln cln-1.3.3/src/float/conv/cl_SF_to_FF.cc0000644000000000000000000000100711201634736014374 0ustar // cl_SF_to_FF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/cl_F.h" // Implementation. #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" namespace cln { const cl_FF cl_SF_to_FF (const cl_SF& x) { // x entpacken: var cl_signean sign; var sintL exp; var uint32 mant; SF_decode(x, { return cl_FF_0; }, sign=,exp=,mant=); // Mantisse um 23-16=7 Bits nach links schieben: return encode_FF(sign,exp,mant<<(FF_mant_len-SF_mant_len)); } } // namespace cln cln-1.3.3/src/float/conv/cl_DF_to_double.cc0000644000000000000000000000346611201634736015347 0ustar // cl_DF_to_double(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/dfloat.h" // Implementation. #include "float/dfloat/cl_DF.h" namespace cln { double double_approx (const cl_DF& obj) { union { dfloat eksplicit; double machine_double; } u; #define val u.eksplicit val = TheDfloat(obj)->dfloat_value; // Der Exponent muß um DF_exp_mid-1022 erniedrigt werden. if (DF_exp_mid>1022) #if (cl_word_size==64) { var uintL exp = (val >> DF_mant_len) & (bit(DF_exp_len)-1); // e if (exp < DF_exp_mid-1022+1) { // produziere denormalisiertes Float val = (val & minus_bit(DF_exp_len+DF_mant_len)) // selbes Vorzeichen | ((sint64)0 << DF_mant_len) // Exponent 0 | (((val & (bit(DF_mant_len)-1)) | bit(DF_mant_len)) // Mantisse shiften >> (DF_exp_mid-1022+1 - exp) // shiften ); } else { val -= (sint64)(DF_exp_mid - 1022) << DF_mant_len; } } #else { var uintL exp = (val.semhi >> (DF_mant_len-32)) & (bit(DF_exp_len)-1); // e if (exp < DF_exp_mid-1022+1) { // produziere denormalisiertes Float var uintL shiftcount = DF_exp_mid-1022+1 - exp; val.mlo = val.mlo >> shiftcount; // Mantisse shiften val.mlo |= val.semhi << (32-shiftcount); val.semhi = (val.semhi & minus_bit(DF_exp_len+DF_mant_len-32)) // selbes Vorzeichen | ((sint32)0 << (DF_mant_len-32)) // Exponent 0 | (((val.semhi & (bit(DF_mant_len-32)-1)) | bit(DF_mant_len-32)) // Mantisse shiften >> shiftcount // shiften ); } else { val.semhi -= (sint32)(DF_exp_mid - 1022) << (DF_mant_len-32); } } #endif #undef val return u.machine_double; } } // namespace cln cln-1.3.3/src/float/conv/cl_FF_to_SF.cc0000644000000000000000000000177511201634736014410 0ustar // cl_FF_to_SF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/cl_F.h" // Implementation. #include "float/ffloat/cl_FF.h" #include "float/sfloat/cl_SF.h" namespace cln { const cl_SF cl_FF_to_SF (const cl_FF& x) { // x entpacken: var cl_signean sign; var sintL exp; var uint32 mant; FF_decode(x, { return SF_0; }, sign=,exp=,mant=); // 23-16 Bits wegrunden: var const int shiftcount = FF_mant_len-SF_mant_len; if ( ((mant & bit(shiftcount-1)) ==0) // Bit 6 war 0 -> abrunden || ( ((mant & (bit(shiftcount-1)-1)) ==0) // war 1, Bits 5..0 >0 -> aufrunden // round-to-even && ((mant & bit(shiftcount)) ==0) ) ) // abrunden { mant = mant >> shiftcount; } else // aufrunden { mant = mant >> shiftcount; mant = mant+1; if (mant >= bit(SF_mant_len+1)) // Überlauf durchs Runden { mant = mant>>1; exp = exp+1; } // Mantisse rechts schieben } return encode_SF(sign,exp,mant); } } // namespace cln cln-1.3.3/src/float/conv/cl_DF_to_SF.cc0000644000000000000000000000346311201634736014402 0ustar // cl_DF_to_SF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/cl_F.h" // Implementation. #include "float/dfloat/cl_DF.h" #include "float/sfloat/cl_SF.h" namespace cln { const cl_SF cl_DF_to_SF (const cl_DF& x) { // x entpacken: var cl_signean sign; var sintL exp; #if (cl_word_size==64) var uint64 mant; DF_decode(x, { return SF_0; }, sign=,exp=,mant=); // 52-16=36 Bits wegrunden: var const int shiftcount = DF_mant_len-SF_mant_len; if ( ((mant & bit(shiftcount-1)) ==0) // Bit 35 war 0 -> abrunden || ( ((mant & (bit(shiftcount-1)-1)) ==0) // war 1, Bits 34..0 >0 -> aufrunden // round-to-even && ((mant & bit(shiftcount)) ==0) ) ) // abrunden { mant = mant >> shiftcount; } else // aufrunden { mant = mant >> shiftcount; mant = mant+1; if (mant >= bit(SF_mant_len+1)) // Überlauf durchs Runden { mant = mant>>1; exp = exp+1; } // Mantisse rechts schieben } return encode_SF(sign,exp,mant); #else var uint32 manthi; var uint32 mantlo; DF_decode2(x, { return SF_0; }, sign=,exp=,manthi=,mantlo=); // 52-16=36 Bits wegrunden: var const int shiftcount = DF_mant_len-SF_mant_len-32; if ( ((manthi & bit(shiftcount-1)) ==0) // Bit 35 war 0 -> abrunden || ( ((manthi & (bit(shiftcount-1)-1)) ==0) // war 1, Bits 34..0 >0 -> aufrunden && (mantlo==0) // round-to-even && ((manthi & bit(shiftcount)) ==0) ) ) // abrunden { manthi = manthi >> shiftcount; } else // aufrunden { manthi = manthi >> shiftcount; manthi = manthi+1; if (manthi >= bit(SF_mant_len+1)) // Überlauf durchs Runden { manthi = manthi>>1; exp = exp+1; } // Mantisse rechts schieben } return encode_SF(sign,exp,manthi); #endif } } // namespace cln cln-1.3.3/src/float/conv/cl_LF_to_DF.cc0000644000000000000000000000502112034641302014353 0ustar // cl_LF_to_DF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/cl_F.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "float/dfloat/cl_DF.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_DF cl_LF_to_DF (const cl_LF& x) { // x entpacken: var cl_signean sign; var sintE exp; var uintD* ptr; var uintC len; LF_decode(x, { return cl_DF_0; }, sign=,exp=,ptr=,len=,); // intDsize*len-DF_mant_len-1 Bits der Mantisse wegrunden: // erste k := ceiling(DF_mant_len+2,intDsize) Digits nach manthi,mantlo holen: var const int shiftcount = ceiling(DF_mant_len+2,intDsize)*intDsize-(DF_mant_len+1); #if (cl_word_size==64) var uint64 mant = get_max64_Dptr(DF_mant_len+2,ptr); ptr = ptr mspop ceiling(DF_mant_len+2,intDsize); if ( ((mant & bit(shiftcount-1)) ==0) // Bit 10 war 0 -> abrunden || ( ((mant & (bit(shiftcount-1)-1)) ==0) // war 1, Bits 9..0 >0 -> aufrunden && !test_loop_msp(ptr,len-ceiling(DF_mant_len+2,intDsize)) // weitere Bits /=0 -> aufrunden // round-to-even && ((mant & bit(shiftcount)) ==0) ) ) // abrunden { mant = mant >> shiftcount; } else // aufrunden { mant = mant >> shiftcount; mant = mant+1; if (mant >= bit(DF_mant_len+1)) // Überlauf durchs Runden { mant = mant>>1; exp = exp+1; } // Mantisse rechts schieben } return encode_DF(sign,exp,mant); #else var uint32 manthi = get_max32_Dptr(DF_mant_len+2-32,ptr); var uint32 mantlo = get_32_Dptr(ptr mspop ceiling(DF_mant_len+2-32,intDsize)); ptr = ptr mspop ceiling(DF_mant_len+2,intDsize); if ( ((mantlo & bit(shiftcount-1)) ==0) // Bit 10 war 0 -> abrunden || ( ((mantlo & (bit(shiftcount-1)-1)) ==0) // war 1, Bits 9..0 >0 -> aufrunden && !test_loop_msp(ptr,len-ceiling(DF_mant_len+2,intDsize)) // weitere Bits /=0 -> aufrunden // round-to-even && ((mantlo & bit(shiftcount)) ==0) ) ) // abrunden { mantlo = (manthi << (32-shiftcount)) | (mantlo >> shiftcount); manthi = manthi >> shiftcount; } else // aufrunden { mantlo = (manthi << (32-shiftcount)) | (mantlo >> shiftcount); manthi = manthi >> shiftcount; mantlo = mantlo+1; if (mantlo==0) { manthi = manthi+1; if (manthi >= bit(DF_mant_len+1-32)) // Überlauf durchs Runden { manthi = manthi>>1; exp = exp+1; } // Mantisse rechts schieben } } return encode_DF(sign,exp,manthi,mantlo); #endif } } // namespace cln cln-1.3.3/src/float/conv/cl_F_from_F.cc0000644000000000000000000000064211201634736014470 0ustar // cl_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F cl_float (const cl_F& x, const cl_F& y) { floattypecase(y , return cl_F_to_SF(x); , return cl_F_to_FF(x); , return cl_F_to_DF(x); , return cl_F_to_LF(x,TheLfloat(y)->len); ); } } // namespace cln cln-1.3.3/src/float/conv/cl_F_from_RA_f.cc0000644000000000000000000000100511201634736015104 0ustar // cl_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F cl_float (const cl_RA& x, float_format_t f) { floatformatcase((uintC)f , return cl_RA_to_SF(x); , return cl_RA_to_FF(x); , return cl_RA_to_DF(x); , return cl_RA_to_LF(x,len); ); } } // namespace cln cln-1.3.3/src/float/conv/cl_F_to_double.cc0000644000000000000000000000072011201634736015231 0ustar // cl_F_to_double(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" namespace cln { double double_approx (const cl_F& x) { floatcase(x , return double_approx(x); , return double_approx(x); , return double_approx(x); , return double_approx(x); ); } } // namespace cln cln-1.3.3/src/float/conv/cl_FF_to_LF.cc0000644000000000000000000000215611201634736014373 0ustar // cl_FF_to_LF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/cl_F.h" // Implementation. #include "float/ffloat/cl_FF.h" #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_LF cl_FF_to_LF (const cl_FF& x, uintC len) { // x entpacken: var cl_signean sign; var sintL exp; #if (intDsize==64) var uint64 mant; #else var uint32 mant; #endif FF_decode(x, { return encode_LF0(len); }, sign=,exp=(sintL),mant=); // Long-Float allozieren, // Mantisse mit intDsize*len-FF_mant_len-1 Nullbits auffüllen: var Lfloat y = allocate_lfloat(len,exp+LF_exp_mid,sign); var uintD* ptr = arrayMSDptr(TheLfloat(y)->data,len); // erste k := ceiling(FF_mant_len+1,intDsize) Digits mit mant füllen: mant = mant << (ceiling(FF_mant_len+1,intDsize)*intDsize-(FF_mant_len+1)); #if (intDsize==64) set_max64_Dptr(FF_mant_len+1,ptr,mant); #else set_max32_Dptr(FF_mant_len+1,ptr,mant); #endif clear_loop_msp(ptr mspop ceiling(FF_mant_len+1,intDsize),len-ceiling(FF_mant_len+1,intDsize)); return y; } } // namespace cln cln-1.3.3/src/float/transcendental/0000755000000000000000000000000012173046200014054 5ustar cln-1.3.3/src/float/transcendental/cl_F_ln10.cc0000644000000000000000000000063611201634737016076 0ustar // cl_ln10(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "float/cl_F.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F cl_ln10 (const cl_F& y) { floattypecase(y , return cl_SF_ln10(); , return cl_FF_ln10(); , return cl_DF_ln10(); , return cl_ln10(TheLfloat(y)->len); ); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_sinhx.cc0000644000000000000000000001624711201634737016462 0ustar // sinhxbyx(), sinhx(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "cln/float.h" #include "base/cl_low.h" #include "float/cl_F.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" #include "cln/integer.h" #include "base/cl_inline.h" #include "float/lfloat/elem/cl_LF_zerop.cc" #include "float/lfloat/misc/cl_LF_exponent.cc" namespace cln { // sinhxbyx is mainly for cl_SF, cl_FF, cl_DF, where we want to avoid underflow. const cl_F sinhxbyx_naive (const cl_F& x) { // Methode: // e := Exponent aus (decode-float x), d := (float-digits x) // Bei x=0.0 oder e<=(1-d)/2 liefere 1.0 // (denn bei e<=(1-d)/2 ist x^2/6 < x^2/4 < 2^(1-d)/4 = 2^(-d-1), also // 1 <= sinh(x)/x = 1+x^2/6+... < 1+2^(-d-1), also 1 <= (sinh(x)/x)^2 < 1+2^(-d), // also ist (sinh(x)/x)^2, auf d Bits gerundet, gleich 1.0). // Bei e<=-sqrt(d) verwende die Potenzreihe // sinh(x)/x = sum(j=0..inf,(x^2)^j/(2j+1)!): // a:=x^2, b:=1, i:=1, sum:=0, // while (/= sum (setq sum (+ sum b))) do b:=b*a/((i+1)*(i+2)), i:=i+2. // Ergebnis sum^2. // Sonst setze y := x/2 = (scale-float x -1), // berechne rekursiv z:=(sinh(y)/y)^2 und liefere z*(1+y^2*z). // [Die Grenze sqrt(d) ergibt sich so: // Man braucht bei der Potenzreihe mit x=2^-k etwa j Glieder, mit // k*j*ln 2 + j*(ln j - 1) = d, und der Aufwand beträgt etwa 2.8*(j/2) // Multiplikationen von d-Bit-Zahlen. Bei Halbierungen bis x=2^-k ist der // Gesamtaufwand etwa 2*(k+e)+1.4*j(k). Dieses minimieren nach k: Soll sein // -1.4 = d/dk j(k) = (d/dj k(j))^-1 = - j^2/(d+j)*ln 2, also j^2=2(d+j), // grob j=sqrt(2d) und damit k=sqrt(d).] // Aufwand: asymptotisch d^2.5 . if (zerop(x)) return cl_float(1,x); var uintC d = float_digits(x); var sintE e = float_exponent(x); if (e <= (1-(sintC)d)>>1) // e <= (1-d)/2 <==> e <= -ceiling((d-1)/2) ? return cl_float(1,x); // ja -> 1.0 als Ergebnis { Mutable(cl_F,x); // Bei e <= -1-limit_slope*floor(sqrt(d)) kann die Potenzreihe // angewandt werden. Wähle limit_slope = 13/32 = 0.4. var sintL e_limit = -1-floor(isqrtC(d)*13,32); // -1-floor(sqrt(d)) if (e > e_limit) { // e > -1-limit_slope*floor(sqrt(d)) -> muß |x| verkleinern. x = scale_float(x,e_limit-e); // Neuer Exponent = e_limit. } var cl_F x2 = square(x); // x^2 // Potenzreihe anwenden: var cl_F a = x2; // a := x^2 var int i = 1; var cl_F b = cl_float(1,x); // b := (float 1 x) var cl_F sum = cl_float(0,x); // sum := (float 0 x) loop { var cl_F new_sum = sum + b; if (new_sum == sum) // = sum ? break; // ja -> Potenzreihe abbrechen sum = new_sum; b = (b*a)/(cl_I)((i+1)*(i+2)); i = i+2; } var cl_F z = square(sum); // sum^2 als Ergebnis while (e > e_limit) { z = z + x2 * square(z); x2 = scale_float(x2,2); // x^2 := x^2*4 e--; } return z; }} // Bit complexity (N = length(x)): O(N^(1/2)*M(N)). const cl_LF sinhx_naive (const cl_LF& x) { // Methode: // e := Exponent aus (decode-float x), d := (float-digits x) // Bei x=0.0 oder e<=(1-d)/2 liefere x // (denn bei e<=(1-d)/2 ist x^2/6 < x^2/4 < 2^(1-d)/4 = 2^(-d-1), also // 1 <= sinh(x)/x = 1+x^2/6+... < 1+2^(-d-1), also ist sinh(x)^2, auf d Bits // gerundet, gleich x). // Bei e<=-sqrt(d) verwende die Potenzreihe // sinh(x) = sum(j=0..inf,x*(x^2)^j/(2j+1)!): // a:=x^2, b:=x, i:=1, sum:=0, // while (/= sum (setq sum (+ sum b))) do b:=b*a/((i+1)*(i+2)), i:=i+2. // Ergebnis sum^2. // Sonst setze y := x/2 = (scale-float x -1), // berechne rekursiv z:=sinh(y)^2 und liefere 4*z*(1+z) = (1+2*z)^2-1. // [Die Grenze sqrt(d) ergibt sich so: // Man braucht bei der Potenzreihe mit x=2^-k etwa j Glieder, mit // k*j*ln 2 + j*(ln j - 1) = d, und der Aufwand beträgt etwa 2.8*(j/2) // Multiplikationen von d-Bit-Zahlen. Bei Halbierungen bis x=2^-k ist der // Gesamtaufwand etwa 2*(k+e)+1.4*j(k). Dieses minimieren nach k: Soll sein // -1.4 = d/dk j(k) = (d/dj k(j))^-1 = - j^2/(d+j)*ln 2, also j^2=2(d+j), // grob j=sqrt(2d) und damit k=sqrt(d).] // Aufwand: asymptotisch d^2.5 . if (zerop_inline(x)) return x; var uintC actuallen = TheLfloat(x)->len; var uintC d = float_digits(x); var sintE e = float_exponent_inline(x); if (e <= (1-(sintC)d)>>1) // e <= (1-d)/2 <==> e <= -ceiling((d-1)/2) ? return square(x); // ja -> x^2 als Ergebnis { Mutable(cl_LF,x); var sintE ee = e; // Bei e <= -1-limit_slope*floor(sqrt(d)) kann die Potenzreihe // angewandt werden. Ein guter Wert für naive1 ist limit_slope = 0.6, // für naive3 aber limit_slope = 0.5. var sintL e_limit = -1-floor(isqrtC(d),2); // -1-floor(sqrt(d)) if (e > e_limit) { // e > -1-limit_slope*floor(sqrt(d)) -> muß |x| verkleinern. x = scale_float(x,e_limit-e); ee = e_limit; // Neuer Exponent = e_limit. } var cl_LF x2 = square(x); // x^2 // Potenzreihe anwenden: var cl_LF powser_value; var cl_LF a = x2; // a := x^2 var int i = 1; if (0) { // naive1: // fixed-point representation d = d-ee; // fixed-point representation with d mantissa bits var cl_I b = round1(scale_float(x,d)); // b := x var cl_I sum = 0; // sum := (float 0 x) loop { if (b == 0) break; sum = sum + b; b = round1(round1(The(cl_LF)(b*a)),(cl_I)((i+1)*(i+2))); i = i+2; } powser_value = scale_float(cl_float(sum,x),-(sintC)d); } else if (actuallen <= 7) { // Break-even-Point before extendsqrt: N<=6 // naive2: // floating-point representation var cl_LF b = x; // b := x var cl_LF sum = cl_float(0,x); // sum := (float 0 x) loop { var cl_LF new_sum = sum + b; if (new_sum == sum) // = sum ? break; // ja -> Potenzreihe abbrechen sum = new_sum; b = (b*a)/(cl_I)((i+1)*(i+2)); i = i+2; } powser_value = sum; } else { // naive3: // floating-point representation with smooth precision reduction var cl_LF b = x; // b := x var cl_LF eps = scale_float(b,-(sintC)d-10); var cl_LF sum = cl_float(0,x); // sum := (float 0 x) loop { var cl_LF new_sum = sum + LF_to_LF(b,actuallen); if (new_sum == sum) // = sum ? break; // ja -> Potenzreihe abbrechen sum = new_sum; b = cl_LF_shortenwith(b,eps); b = (b*a)/(cl_I)((i+1)*(i+2)); i = i+2; } powser_value = sum; } var cl_LF z = square(powser_value); // sinh^2 als Ergebnis while (e > e_limit) { z = square(cl_float(1,x) + scale_float(z,1)) - cl_float(1,x); // z := (1+2*z)^2-1 e--; } return z; }} // Bit complexity (N = length(x)): O(N^(1/2)*M(N)). // Timings of the three variants, on an i486 33 MHz, running Linux, // applied to x = sqrt(2)-1 = 0.414... // N naive1 naive2 naive3 ratseries exp&recip // 4 0.0055 0.0039 0.0041 0.021 0.0046 // 6 0.0073 0.0054 0.0054 0.029 0.0062 // 8 0.0093 0.0075 0.0070 0.036 0.0081 // 10 0.011 0.010 0.009 0.046 0.0011 // 25 0.041 0.046 0.033 0.133 0.043 // 50 0.14 0.18 0.12 0.36 0.16 // 100 0.56 0.70 0.43 1.12 0.61 // 250 3.5 4.5 2.7 5.3 3.3 // 500 14.9 19.4 11.4 19.0 11.4 // 1000 63 82 47 63 35 // 2500 328 381 243 261 143 // ==> naive2 fastest for N <= 6, // naive3 fastest for 6 <= N <= 500, // exp&recip (which uses exp's own ratseries) fastest for N >= 500. } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_ratsumseries_pqd.cc0000644000000000000000000000312511201634737021026 0ustar // eval_pqd_series(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_LF_tran.h" // Implementation. #include "cln/lfloat.h" #include "cln/integer.h" #include "cln/real.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_LF eval_pqd_series (uintC N, cl_pqd_series_term* args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_pqd_series_result sums; eval_pqd_series_aux(N,args,sums); // Instead of computing fsum = T/Q and gsum = V/(D*Q) // and then dividing them, to compute gsum/fsum, we save two // divisions by computing V/(D*T). return cl_I_to_LF(sums.V,len) / The(cl_LF)(sums.D * cl_I_to_LF(sums.T,len)); } const cl_LF eval_pqd_series (uintC N, cl_pqd_series_stream& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_pqd_series_result sums; eval_pqd_series_aux(N,args,sums); // Instead of computing fsum = T/Q and gsum = V/(D*Q) // and then dividing them, to compute gsum/fsum, we save two // divisions by computing V/(D*T). return cl_I_to_LF(sums.V,len) / The(cl_LF)(sums.D * cl_I_to_LF(sums.T,len)); } const cl_LF eval_pqd_series (uintC N, cl_pqd_series_stream& args, uintC len, uintC trunclen) { if (N==0) return cl_I_to_LF(0,len); var cl_pqd_series_result sums; eval_pqd_series_aux(N,args,sums,trunclen); // Instead of computing fsum = T/Q and gsum = V/(D*Q) // and then dividing them, to compute gsum/fsum, we save two // divisions by computing V/(D*T). return cl_R_to_LF(sums.V,len) / The(cl_LF)(sums.D * cl_R_to_LF(sums.T,len)); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_ratseries_ab.cc0000644000000000000000000000424711201634737020105 0ustar // eval_rational_series(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_LF_tran.h" // Implementation. #include "cln/lfloat.h" #include "cln/integer.h" #include "cln/exception.h" #include "float/lfloat/cl_LF.h" namespace cln { // Subroutine. // Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n))) // and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1) // and T = B*Q*S (all integers). On entry N1 < N2. // P will not be computed if a NULL pointer is passed. static void eval_ab_series_aux (uintC N1, uintC N2, const cl_ab_series& args, cl_I* B, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: *B = args.bv[N1]; *T = args.av[N1]; break; case 2: { *B = args.bv[N1] * args.bv[N1+1]; *T = args.bv[N1+1] * args.av[N1] + args.bv[N1] * args.av[N1+1]; break; } case 3: { var cl_I b12 = args.bv[N1+1] * args.bv[N1+2]; *B = args.bv[N1] * b12; *T = b12 * args.av[N1] + args.bv[N1] * (args.bv[N1+2] * args.av[N1+1] + args.bv[N1+1] * args.av[N1+2]); break; } case 4: { var cl_I b01 = args.bv[N1] * args.bv[N1+1]; var cl_I b23 = args.bv[N1+2] * args.bv[N1+3]; *B = b01 * b23; *T = b23 * (args.bv[N1+1] * args.av[N1] + args.bv[N1] * args.av[N1+1]) + b01 * (args.bv[N1+3] * args.av[N1+2] + args.bv[N1+2] * args.av[N1+3]); break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LB, LT; eval_ab_series_aux(N1,Nm,args,&LB,<); // Compute right part. var cl_I RB, RT; eval_ab_series_aux(Nm,N2,args,&RB,&RT); // Put together partial results. *B = LB*RB; // S = LS + RS, so T = RB*LT + LB*RT. *T = RB*LT + LB*RT; break; } } } const cl_LF eval_rational_series (uintC N, const cl_ab_series& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I B, T; eval_ab_series_aux(0,N,args,&B,&T); return cl_I_to_LF(T,len) / cl_I_to_LF(B,len); } // Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))): // O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_cosh.cc0000644000000000000000000000510211201634737016251 0ustar // cosh(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/transcendental/cl_F_tran.h" #include "float/cl_F.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F cosh (const cl_F& x) { // Methode: // Genauigkeit erhöhen, // e := Exponent aus (decode-float x), d := (float-digits x) // falls x=0.0 oder e<=(1-d)/2 liefere 1.0 // (denn bei e<=(1-d)/2 ist 1 <= cosh(x) = 1+x^2/2+... < 1+2^(-d), // also ist cosh(x), auf d Bits gerundet, gleich 1.0). // falls e<0: // y := x/2 = (scale-float x -1), (sinh(y)/y)^2 errechnen, // cosh(x) = 1+x*y*(sinh(y)/y)^2 errechnen. // falls e>=0: y:=exp(x) errechnen, (scale-float (+ y (/ y)) -1) bilden. var sintE e = float_exponent(x); if (e < 0) { // Exponent e abtesten // e<0 if (zerop(x)) return cl_float(1,x); var uintC d = float_digits(x); if (e <= (1-(sintC)d)>>1) // e <= (1-d)/2 <==> e <= -ceiling((d-1)/2) ? return cl_float(1,x); // ja -> 1.0 als Ergebnis // Rechengenauigkeit erhöhen if (longfloatp(x)) { DeclareType(cl_LF,x); #if 0 if (TheLfloat(x)->len >= infty) { var cl_LF xx = extend(x,TheLfloat(x)->len+1); var cl_LF_cosh_sinh_t hyp = cl_coshsinh_ratseries(xx); return cl_float(hyp.cosh,x); } else #endif if (TheLfloat(x)->len >= 600) { // verwende exp(x), schneller als cl_coshsinh_ratseries var cl_LF xx = extend(x,TheLfloat(x)->len+1); var cl_F y = exp(xx); var cl_F z = scale_float(y + recip(y), -1); // (/ (+ y (/ y)) 2) return cl_float(z,x); } else { var cl_LF xx = The(cl_LF)(cl_F_extendsqrt(x)); var cl_LF y = scale_float(xx,-1); // 1 + 2*sinh(y)^2, und wieder runden return cl_float(1 + scale_float(sinhx_naive(y),1), x); } } else { var cl_F xx = cl_F_extendsqrt(x); var cl_F y = scale_float(xx,-1); // 1 + 2*y^2*(sinh(y)/y)^2, und wieder runden return cl_float(1 + scale_float(square(y) * sinhxbyx_naive(y),1), x); } } else { // e>=0 -> verwende exp(x) var cl_F y = exp(x); return scale_float(y + recip(y), -1); // (/ (+ y (/ y)) 2) } } // Timings of the three algorithms, on an i486 33 MHz, running Linux, // applied to x = sqrt(2)-1 = 0.414... // N naive ratseries exp&recip // 10 0.008 0.037 0.012 // 25 0.032 0.117 0.047 // 50 0.11 0.33 0.017 // 100 0.40 1.06 0.63 // 250 2.65 5.2 3.3 // 500 11.1 18.7 11.5 // 1000 46 61 35 // 2500 238 250 143 // ==> exp&recip fastest for N >= 600. } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_tan.cc0000644000000000000000000000052711201634737016105 0ustar // tan(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. namespace cln { CL_INLINE const cl_F CL_INLINE_DECL(tan) (const cl_F& x) { // Methode: // (/ (sin x) (cos x)) var cos_sin_t trig = cos_sin(x); return The(cl_F)(trig.sin) / The(cl_F)(trig.cos); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_zeta3.cc0000644000000000000000000000542412035212645016462 0ustar // zeta3(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "cln/lfloat.h" #include "float/transcendental/cl_LF_tran.h" #include "float/lfloat/cl_LF.h" #include "cln/integer.h" #include "base/cl_alloca.h" namespace cln { const cl_LF zeta3 (uintC len) { struct rational_series_stream : cl_pqa_series_stream { uintC n; static cl_pqa_series_term computenext (cl_pqa_series_stream& thisss) { var rational_series_stream& thiss = (rational_series_stream&)thisss; var uintC n = thiss.n; var cl_pqa_series_term result; if (n==0) { result.p = 1; } else { result.p = -expt_pos(n,5); } result.q = expt_pos(2*n+1,5)<<5; result.a = 205*square((cl_I)n) + 250*(cl_I)n + 77; thiss.n = n+1; return result; } rational_series_stream () : cl_pqa_series_stream (rational_series_stream::computenext), n (0) {} } series; // Method: // /infinity \ // | ----- (n + 1) 2 | // 1 | \ (-1) (205 n - 160 n + 32)| // - | ) ---------------------------------| // 2 | / 5 5 | // | ----- n binomial(2 n, n) | // \ n = 1 / // // The formula used to compute Zeta(3) has reference in the paper // "Hypergeometric Series Acceleration via the WZ method" by // T. Amdeberhan and Doron Zeilberger, // Electronic J. Combin. 4 (1997), R3. // // Computation of the sum: // Evaluate a sum(0 <= n < N, a(n)/b(n) * (p(0)...p(n))/(q(0)...q(n))) // with appropriate N, and // a(n) = 205*n^2+250*n+77, b(n) = 1, // p(0) = 1, p(n) = -n^5 for n>0, q(n) = 32*(2n+1)^5. var uintC actuallen = len+2; // 2 guard digits var uintC N = ceiling(actuallen*intDsize,10); // 1024^-N <= 2^(-intDsize*actuallen). var cl_LF sum = eval_rational_series(N,series,actuallen,actuallen); return scale_float(shorten(sum,len),-1); } // Bit complexity (N := len): O(log(N)^2*M(N)). // Timings of the above algorithm, on an i486 33 MHz, running Linux. // N sum_exp sum_cvz1 sum_cvz2 hypgeom // 10 1.17 0.081 0.125 0.013 // 25 5.1 0.23 0.50 0.045 // 50 15.7 0.66 1.62 0.14 // 100 45.5 1.93 5.4 0.44 // 250 169 13.1 25.1 2.03 // 500 436 56.5 70.6 6.44 // 1000 236 192 18.2 // 2500 78.3 // 5000 202 // 10000 522 // 25000 1512 // 50000 3723 // asymp. FAST N^2 FAST FAST // (FAST means O(log(N)^2*M(N))) } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_catalanconst.cc0000644000000000000000000000073411201634737017775 0ustar // catalanconst(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/transcendental/cl_F_tran.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F catalanconst (const cl_F& y) { floattypecase(y , return cl_SF_catalanconst(); , return cl_FF_catalanconst(); , return cl_DF_catalanconst(); , return catalanconst(TheLfloat(y)->len); ); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_ratseries_q.cc0000644000000000000000000000705111201634737017757 0ustar // eval_rational_series(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_LF_tran.h" // Implementation. #include "cln/lfloat.h" #include "cln/integer.h" #include "cln/exception.h" #include "float/lfloat/cl_LF.h" namespace cln { // Subroutine. // Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n))) // and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1) // and T = B*Q*S (all integers). On entry N1 < N2. // P will not be computed if a NULL pointer is passed. static void eval_q_series_aux (uintC N1, uintC N2, const cl_q_series& args, cl_I* Q, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: *Q = args.qv[N1]; *T = 1; break; case 2: { *Q = args.qv[N1] * args.qv[N1+1]; *T = args.qv[N1+1] + 1; break; } case 3: { var cl_I q12 = args.qv[N1+1] * args.qv[N1+2]; *Q = args.qv[N1] * q12; *T = q12 + args.qv[N1+2] + 1; break; } case 4: { var cl_I q23 = args.qv[N1+2] * args.qv[N1+3]; var cl_I q123 = args.qv[N1+1] * q23; *Q = args.qv[N1] * q123; *T = q123 + q23 + args.qv[N1+3] + 1; break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LQ, LT; eval_q_series_aux(N1,Nm,args,&LQ,<); // Compute right part. var cl_I RQ, RT; eval_q_series_aux(Nm,N2,args,&RQ,&RT); // Put together partial results. *Q = LQ*RQ; // S = LS + 1/LQ * RS, so T = RQ*LT + RT. *T = RQ*LT + RT; break; } } } template<> const cl_LF eval_rational_series (uintC N, const cl_q_series& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I Q, T; eval_q_series_aux(0,N,args,&Q,&T); return cl_I_to_LF(T,len) / cl_I_to_LF(Q,len); } static void eval_q_series_aux (uintC N1, uintC N2, cl_q_series_stream& args, cl_I* Q, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: { var cl_q_series_term v0 = args.next(); // [N1] *Q = v0.q; *T = 1; break; } case 2: { var cl_q_series_term v0 = args.next(); // [N1] var cl_q_series_term v1 = args.next(); // [N1+1] *Q = v0.q * v1.q; *T = v1.q + 1; break; } case 3: { var cl_q_series_term v0 = args.next(); // [N1] var cl_q_series_term v1 = args.next(); // [N1+1] var cl_q_series_term v2 = args.next(); // [N1+2] var cl_I q12 = v1.q * v2.q; *Q = v0.q * q12; *T = q12 + v2.q + 1; break; } case 4: { var cl_q_series_term v0 = args.next(); // [N1] var cl_q_series_term v1 = args.next(); // [N1+1] var cl_q_series_term v2 = args.next(); // [N1+2] var cl_q_series_term v3 = args.next(); // [N1+3] var cl_I q23 = v2.q * v3.q; var cl_I q123 = v1.q * q23; *Q = v0.q * q123; *T = q123 + q23 + v3.q + 1; break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LQ, LT; eval_q_series_aux(N1,Nm,args,&LQ,<); // Compute right part. var cl_I RQ, RT; eval_q_series_aux(Nm,N2,args,&RQ,&RT); // Put together partial results. *Q = LQ*RQ; // S = LS + 1/LQ * RS, so T = RQ*LT + RT. *T = RQ*LT + RT; break; } } } template<> const cl_LF eval_rational_series (uintC N, cl_q_series_stream& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I Q, T; eval_q_series_aux(0,N,args,&Q,&T); return cl_I_to_LF(T,len) / cl_I_to_LF(Q,len); } // Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))): // O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_ratseries_pqa.cc0000644000000000000000000002341311201634737020300 0ustar // eval_rational_series(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_LF_tran.h" // Implementation. #include "cln/lfloat.h" #include "cln/integer.h" #include "cln/real.h" #include "cln/exception.h" #include "float/lfloat/cl_LF.h" #include "base/cl_alloca.h" namespace cln { // Subroutine. // Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n))) // and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1) // and T = B*Q*S (all integers). On entry N1 < N2. // P will not be computed if a NULL pointer is passed. static void eval_pqa_series_aux (uintC N1, uintC N2, const cl_pqa_series& args, cl_I* P, cl_I* Q, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: if (P) { *P = args.pv[N1]; } *Q = args.qv[N1]; *T = args.av[N1] * args.pv[N1]; break; case 2: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; if (P) { *P = p01; } *Q = args.qv[N1] * args.qv[N1+1]; *T = args.qv[N1+1] * args.av[N1] * args.pv[N1] + args.av[N1+1] * p01; break; } case 3: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; if (P) { *P = p012; } var cl_I q12 = args.qv[N1+1] * args.qv[N1+2]; *Q = args.qv[N1] * q12; *T = q12 * args.av[N1] * args.pv[N1] + args.qv[N1+2] * args.av[N1+1] * p01 + args.av[N1+2] * p012; break; } case 4: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; var cl_I p0123 = p012 * args.pv[N1+3]; if (P) { *P = p0123; } var cl_I q23 = args.qv[N1+2] * args.qv[N1+3]; var cl_I q123 = args.qv[N1+1] * q23; *Q = args.qv[N1] * q123; *T = q123 * args.av[N1] * args.pv[N1] + q23 * args.av[N1+1] * p01 + args.qv[N1+3] * args.av[N1+2] * p012 + args.av[N1+3] * p0123; break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LP, LQ, LT; eval_pqa_series_aux(N1,Nm,args,&LP,&LQ,<); // Compute right part. var cl_I RP, RQ, RT; eval_pqa_series_aux(Nm,N2,args,(P?&RP:(cl_I*)0),&RQ,&RT); // Put together partial results. if (P) { *P = LP*RP; } *Q = LQ*RQ; // S = LS + LP/LQ * RS, so T = RQ*LT + LP*RT. *T = RQ*LT + LP*RT; break; } } } template<> const cl_LF eval_rational_series (uintC N, const cl_pqa_series& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I Q, T; eval_pqa_series_aux(0,N,args,NULL,&Q,&T); return cl_I_to_LF(T,len) / cl_I_to_LF(Q,len); } static void eval_pqsa_series_aux (uintC N1, uintC N2, const cl_pqa_series& args, const uintC* qsv, cl_I* P, cl_I* Q, uintC* QS, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: if (P) { *P = args.pv[N1]; } *Q = args.qv[N1]; *QS = qsv[N1]; *T = args.av[N1] * args.pv[N1]; break; case 2: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; if (P) { *P = p01; } *Q = args.qv[N1] * args.qv[N1+1]; *QS = qsv[N1] + qsv[N1+1]; *T = ((args.qv[N1+1] * args.av[N1] * args.pv[N1]) << qsv[N1+1]) + args.av[N1+1] * p01; break; } case 3: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; if (P) { *P = p012; } var cl_I q12 = args.qv[N1+1] * args.qv[N1+2]; *Q = args.qv[N1] * q12; *QS = qsv[N1] + qsv[N1+1] + qsv[N1+2]; *T = ((q12 * args.av[N1] * args.pv[N1]) << (qsv[N1+1] + qsv[N1+2])) + ((args.qv[N1+2] * args.av[N1+1] * p01) << qsv[N1+2]) + args.av[N1+2] * p012; break; } case 4: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; var cl_I p0123 = p012 * args.pv[N1+3]; if (P) { *P = p0123; } var cl_I q23 = args.qv[N1+2] * args.qv[N1+3]; var cl_I q123 = args.qv[N1+1] * q23; *Q = args.qv[N1] * q123; *QS = qsv[N1] + qsv[N1+1] + qsv[N1+2] + qsv[N1+3]; *T = ((((((q123 * args.av[N1] * args.pv[N1]) << qsv[N1+1]) + q23 * args.av[N1+1] * p01) << qsv[N1+2]) + args.qv[N1+3] * args.av[N1+2] * p012) << qsv[N1+3]) + args.av[N1+3] * p0123; break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LP, LQ, LT; var uintC LQS; eval_pqsa_series_aux(N1,Nm,args,qsv,&LP,&LQ,&LQS,<); // Compute right part. var cl_I RP, RQ, RT; var uintC RQS; eval_pqsa_series_aux(Nm,N2,args,qsv,(P?&RP:(cl_I*)0),&RQ,&RQS,&RT); // Put together partial results. if (P) { *P = LP*RP; } *Q = LQ*RQ; *QS = LQS+RQS; // S = LS + LP/LQ * RS, so T = RQ*LT + LP*RT. *T = ((RQ*LT) << RQS) + LP*RT; break; } } } template<> const cl_LF eval_rational_series (uintC N, const cl_pqa_series& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I Q, T; // Precomputation of the shift counts: // Split qv[n] into qv[n]*2^qsv[n]. CL_ALLOCA_STACK; var uintC* qsv = (uintC*) cl_alloca(N*sizeof(uintC)); var cl_I* qp = args.qv; var uintC* qsp = qsv; for (var uintC n = 0; n < N; n++, qp++, qsp++) { *qsp = pullout_shiftcount(*qp); } // Main computation. var uintC QS; eval_pqsa_series_aux(0,N,args,qsv,NULL,&Q,&QS,&T); return cl_I_to_LF(T,len) / scale_float(cl_I_to_LF(Q,len),QS); } static void eval_pqa_series_aux (uintC N1, uintC N2, cl_pqa_series_stream& args, cl_I* P, cl_I* Q, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: { var cl_pqa_series_term v0 = args.next(); // [N1] if (P) { *P = v0.p; } *Q = v0.q; *T = v0.a * v0.p; break; } case 2: { var cl_pqa_series_term v0 = args.next(); // [N1] var cl_pqa_series_term v1 = args.next(); // [N1+1] var cl_I p01 = v0.p * v1.p; if (P) { *P = p01; } *Q = v0.q * v1.q; *T = v1.q * v0.a * v0.p + v1.a * p01; break; } case 3: { var cl_pqa_series_term v0 = args.next(); // [N1] var cl_pqa_series_term v1 = args.next(); // [N1+1] var cl_pqa_series_term v2 = args.next(); // [N1+2] var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; if (P) { *P = p012; } var cl_I q12 = v1.q * v2.q; *Q = v0.q * q12; *T = q12 * v0.a * v0.p + v2.q * v1.a * p01 + v2.a * p012; break; } case 4: { var cl_pqa_series_term v0 = args.next(); // [N1] var cl_pqa_series_term v1 = args.next(); // [N1+1] var cl_pqa_series_term v2 = args.next(); // [N1+2] var cl_pqa_series_term v3 = args.next(); // [N1+3] var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; var cl_I p0123 = p012 * v3.p; if (P) { *P = p0123; } var cl_I q23 = v2.q * v3.q; var cl_I q123 = v1.q * q23; *Q = v0.q * q123; *T = q123 * v0.a * v0.p + q23 * v1.a * p01 + v3.q * v2.a * p012 + v3.a * p0123; break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LP, LQ, LT; eval_pqa_series_aux(N1,Nm,args,&LP,&LQ,<); // Compute right part. var cl_I RP, RQ, RT; eval_pqa_series_aux(Nm,N2,args,(P?&RP:(cl_I*)0),&RQ,&RT); // Put together partial results. if (P) { *P = LP*RP; } *Q = LQ*RQ; // S = LS + LP/LQ * RS, so T = RQ*LT + LP*RT. *T = RQ*LT + LP*RT; break; } } } template<> const cl_LF eval_rational_series (uintC N, cl_pqa_series_stream& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I Q, T; eval_pqa_series_aux(0,N,args,NULL,&Q,&T); return cl_I_to_LF(T,len) / cl_I_to_LF(Q,len); } static void eval_pqa_series_aux (uintC N1, uintC N2, cl_pqa_series_stream& args, cl_R* P, cl_R* Q, cl_R* T, uintC trunclen) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: { var cl_pqa_series_term v0 = args.next(); // [N1] if (P) { *P = v0.p; } *Q = v0.q; *T = v0.a * v0.p; break; } case 2: { var cl_pqa_series_term v0 = args.next(); // [N1] var cl_pqa_series_term v1 = args.next(); // [N1+1] var cl_I p01 = v0.p * v1.p; if (P) { *P = p01; } *Q = v0.q * v1.q; *T = v1.q * v0.a * v0.p + v1.a * p01; break; } case 3: { var cl_pqa_series_term v0 = args.next(); // [N1] var cl_pqa_series_term v1 = args.next(); // [N1+1] var cl_pqa_series_term v2 = args.next(); // [N1+2] var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; if (P) { *P = p012; } var cl_I q12 = v1.q * v2.q; *Q = v0.q * q12; *T = q12 * v0.a * v0.p + v2.q * v1.a * p01 + v2.a * p012; break; } case 4: { var cl_pqa_series_term v0 = args.next(); // [N1] var cl_pqa_series_term v1 = args.next(); // [N1+1] var cl_pqa_series_term v2 = args.next(); // [N1+2] var cl_pqa_series_term v3 = args.next(); // [N1+3] var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; var cl_I p0123 = p012 * v3.p; if (P) { *P = p0123; } var cl_I q23 = v2.q * v3.q; var cl_I q123 = v1.q * q23; *Q = v0.q * q123; *T = q123 * v0.a * v0.p + q23 * v1.a * p01 + v3.q * v2.a * p012 + v3.a * p0123; break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_R LP, LQ, LT; eval_pqa_series_aux(N1,Nm,args,&LP,&LQ,<,trunclen); // Compute right part. var cl_R RP, RQ, RT; eval_pqa_series_aux(Nm,N2,args,(P?&RP:(cl_R*)0),&RQ,&RT,trunclen); // Put together partial results. if (P) { *P = LP*RP; truncate_precision(*P,trunclen); } *Q = LQ*RQ; truncate_precision(*Q,trunclen); // S = LS + LP/LQ * RS, so T = RQ*LT + LP*RT. *T = RQ*LT + LP*RT; truncate_precision(*T,trunclen); break; } } } template<> const cl_LF eval_rational_series (uintC N, cl_pqa_series_stream& args, uintC len, uintC trunclen) { if (N==0) return cl_I_to_LF(0,len); var cl_R Q, T; eval_pqa_series_aux(0,N,args,NULL,&Q,&T,trunclen); return cl_R_to_LF(T,len) / cl_R_to_LF(Q,len); } // Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))): // O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_zeta_int.cc0000644000000000000000000000075311201634737017141 0ustar // zeta(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/transcendental/cl_F_tran.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F zeta (int s, const cl_F& y) { floattypecase(y , return cl_LF_to_SF(zeta(s,LF_minlen)); , return cl_LF_to_FF(zeta(s,LF_minlen)); , return cl_LF_to_DF(zeta(s,LF_minlen)); , return zeta(s,TheLfloat(y)->len); ); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_ratseries_pa.cc0000644000000000000000000000427211201634737020121 0ustar // eval_rational_series(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_LF_tran.h" // Implementation. #include "cln/lfloat.h" #include "cln/integer.h" #include "cln/exception.h" #include "float/lfloat/cl_LF.h" namespace cln { // Subroutine. // Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n))) // and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1) // and T = B*Q*S (all integers). On entry N1 < N2. // P will not be computed if a NULL pointer is passed. static void eval_pa_series_aux (uintC N1, uintC N2, const cl_pa_series& args, cl_I* P, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: if (P) { *P = args.pv[N1]; } *T = args.av[N1] * args.pv[N1]; break; case 2: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; if (P) { *P = p01; } *T = args.av[N1] * args.pv[N1] + args.av[N1+1] * p01; break; } case 3: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; if (P) { *P = p012; } *T = args.av[N1] * args.pv[N1] + args.av[N1+1] * p01 + args.av[N1+2] * p012; break; } case 4: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; var cl_I p0123 = p012 * args.pv[N1+3]; if (P) { *P = p0123; } *T = args.av[N1] * args.pv[N1] + args.av[N1+1] * p01 + args.av[N1+2] * p012 + args.av[N1+3] * p0123; break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LP, LT; eval_pa_series_aux(N1,Nm,args,&LP,<); // Compute right part. var cl_I RP, RT; eval_pa_series_aux(Nm,N2,args,(P?&RP:(cl_I*)0),&RT); // Put together partial results. if (P) { *P = LP*RP; } // S = LS + LP * RS, so T = LT + LP*RT. *T = LT + LP*RT; break; } } } const cl_LF eval_rational_series (uintC N, const cl_pa_series& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I T; eval_pa_series_aux(0,N,args,NULL,&T); return cl_I_to_LF(T,len); } // Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))): // O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_exp_aux.cc0000644000000000000000000000476011201634737017113 0ustar // cl_exp_aux(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "cln/lfloat.h" #include "float/transcendental/cl_LF_tran.h" #include "float/lfloat/cl_LF.h" #include "cln/integer.h" #include "cln/exception.h" #undef floor #include #define floor cln_floor namespace cln { const cl_LF cl_exp_aux (const cl_I& p, uintE lq, uintC len) { { Mutable(cl_I,p); var uintE lp = integer_length(p); // now |p| < 2^lp. if (!(lp <= lq)) throw runtime_exception(); lp = lq - lp; // now |p/2^lq| < 2^-lp. // Minimize lq (saves computation time). { var uintC lp2 = ord2(p); if (lp2 > 0) { p = p >> lp2; lq = lq - lp2; } } // Evaluate a sum(0 <= n < N, a(n)/b(n) * (p(0)...p(n))/(q(0)...q(n))) // with appropriate N, and // a(n) = 1, b(n) = 1, p(n) = p for n>0, q(n) = n*2^lq for n>0. var uintC actuallen = len+1; // 1 guard digit // How many terms do we need for M bits of precision? N terms suffice, // provided that // 1/(2^(N*lp)*N!) < 2^-M // <== N*(log(N)-1)+N*lp*log(2) > M*log(2) // First approximation: // N0 = M will suffice, so put N<=N0. // Second approximation: // N1 = floor(M*log(2)/(log(N0)-1+lp*log(2))), slightly too small, // so put N>=N1. // Third approximation: // N2 = ceiling(M*log(2)/(log(N1)-1+lp*log(2))), slightly too large. // N = N2+2, two more terms for safety. var uintC N0 = intDsize*actuallen; var uintC N1 = (uintC)(0.693147*intDsize*actuallen/(::log((double)N0)-1.0+0.693148*lp)); var uintC N2 = (uintC)(0.693148*intDsize*actuallen/(::log((double)N1)-1.0+0.693147*lp))+1; var uintC N = N2+2; struct rational_series_stream : cl_pq_series_stream { var uintC n; var cl_I p; var uintE lq; static cl_pq_series_term computenext (cl_pq_series_stream& thisss) { var rational_series_stream& thiss = (rational_series_stream&)thisss; var uintC n = thiss.n; var cl_pq_series_term result; if (n==0) { result.p = 1; result.q = 1; } else { result.p = thiss.p; result.q = (cl_I)n << thiss.lq; } thiss.n = n+1; return result; } rational_series_stream(const cl_I& p_, uintE lq_) : cl_pq_series_stream (rational_series_stream::computenext), n (0), p(p_), lq(lq_) {} } series(p, lq); var cl_LF fsum = eval_rational_series(N,series,actuallen); return shorten(fsum,len); // verkürzen und fertig }} // Bit complexity (N = len, and if p has length O(log N) and ql = O(log N)): // O(log(N)*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_exp1.cc0000644000000000000000000000065411201634737016201 0ustar // exp1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/transcendental/cl_F_tran.h" #include "float/cl_F.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F exp1 (const cl_F& y) { floattypecase(y , return cl_SF_exp1(); , return cl_FF_exp1(); , return cl_DF_exp1(); , return exp1(TheLfloat(y)->len); ); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_ratseries_pqab.cc0000644000000000000000000002675111201634737020452 0ustar // eval_rational_series(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_LF_tran.h" // Implementation. #include "cln/lfloat.h" #include "cln/integer.h" #include "cln/real.h" #include "cln/exception.h" #include "float/lfloat/cl_LF.h" #include "base/cl_alloca.h" namespace cln { // Subroutine. // Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n))) // and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1) // and T = B*Q*S (all integers). On entry N1 < N2. // P will not be computed if a NULL pointer is passed. static void eval_pqab_series_aux (uintC N1, uintC N2, const cl_pqab_series& args, cl_I* P, cl_I* Q, cl_I* B, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: if (P) { *P = args.pv[N1]; } *Q = args.qv[N1]; *B = args.bv[N1]; *T = args.av[N1] * args.pv[N1]; break; case 2: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; if (P) { *P = p01; } *Q = args.qv[N1] * args.qv[N1+1]; *B = args.bv[N1] * args.bv[N1+1]; *T = args.bv[N1+1] * args.qv[N1+1] * args.av[N1] * args.pv[N1] + args.bv[N1] * args.av[N1+1] * p01; break; } case 3: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; if (P) { *P = p012; } var cl_I q12 = args.qv[N1+1] * args.qv[N1+2]; *Q = args.qv[N1] * q12; var cl_I b12 = args.bv[N1+1] * args.bv[N1+2]; *B = args.bv[N1] * b12; *T = b12 * q12 * args.av[N1] * args.pv[N1] + args.bv[N1] * (args.bv[N1+2] * args.qv[N1+2] * args.av[N1+1] * p01 + args.bv[N1+1] * args.av[N1+2] * p012); break; } case 4: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; var cl_I p0123 = p012 * args.pv[N1+3]; if (P) { *P = p0123; } var cl_I q23 = args.qv[N1+2] * args.qv[N1+3]; var cl_I q123 = args.qv[N1+1] * q23; *Q = args.qv[N1] * q123; var cl_I b01 = args.bv[N1] * args.bv[N1+1]; var cl_I b23 = args.bv[N1+2] * args.bv[N1+3]; *B = b01 * b23; *T = b23 * (args.bv[N1+1] * q123 * args.av[N1] * args.pv[N1] + args.bv[N1] * q23 * args.av[N1+1] * p01) + b01 * (args.bv[N1+3] * args.qv[N1+3] * args.av[N1+2] * p012 + args.bv[N1+2] * args.av[N1+3] * p0123); break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LP, LQ, LB, LT; eval_pqab_series_aux(N1,Nm,args,&LP,&LQ,&LB,<); // Compute right part. var cl_I RP, RQ, RB, RT; eval_pqab_series_aux(Nm,N2,args,(P?&RP:(cl_I*)0),&RQ,&RB,&RT); // Put together partial results. if (P) { *P = LP*RP; } *Q = LQ*RQ; *B = LB*RB; // S = LS + LP/LQ * RS, so T = RB*RQ*LT + LB*LP*RT. *T = RB*RQ*LT + LB*LP*RT; break; } } } template<> const cl_LF eval_rational_series (uintC N, const cl_pqab_series& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I Q, B, T; eval_pqab_series_aux(0,N,args,NULL,&Q,&B,&T); return cl_I_to_LF(T,len) / cl_I_to_LF(B*Q,len); } static void eval_pqsab_series_aux (uintC N1, uintC N2, const cl_pqab_series& args, const uintC* qsv, cl_I* P, cl_I* Q, uintC* QS, cl_I* B, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: if (P) { *P = args.pv[N1]; } *Q = args.qv[N1]; *QS = qsv[N1]; *B = args.bv[N1]; *T = args.av[N1] * args.pv[N1]; break; case 2: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; if (P) { *P = p01; } *Q = args.qv[N1] * args.qv[N1+1]; *QS = qsv[N1] + qsv[N1+1]; *B = args.bv[N1] * args.bv[N1+1]; *T = ((args.bv[N1+1] * args.qv[N1+1] * args.av[N1] * args.pv[N1]) << qsv[N1+1]) + args.bv[N1] * args.av[N1+1] * p01; break; } case 3: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; if (P) { *P = p012; } var cl_I q12 = args.qv[N1+1] * args.qv[N1+2]; *Q = args.qv[N1] * q12; *QS = qsv[N1] + qsv[N1+1] + qsv[N1+2]; var cl_I b12 = args.bv[N1+1] * args.bv[N1+2]; *B = args.bv[N1] * b12; *T = ((b12 * q12 * args.av[N1] * args.pv[N1]) << (qsv[N1+1] + qsv[N1+2])) + args.bv[N1] * (((args.bv[N1+2] * args.qv[N1+2] * args.av[N1+1] * p01) << qsv[N1+2]) + args.bv[N1+1] * args.av[N1+2] * p012); break; } case 4: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; var cl_I p0123 = p012 * args.pv[N1+3]; if (P) { *P = p0123; } var cl_I q23 = args.qv[N1+2] * args.qv[N1+3]; var cl_I q123 = args.qv[N1+1] * q23; *Q = args.qv[N1] * q123; *QS = qsv[N1] + qsv[N1+1] + qsv[N1+2] + qsv[N1+3]; var cl_I b01 = args.bv[N1] * args.bv[N1+1]; var cl_I b23 = args.bv[N1+2] * args.bv[N1+3]; *B = b01 * b23; *T = ((b23 * (((args.bv[N1+1] * q123 * args.av[N1] * args.pv[N1]) << qsv[N1+1]) + args.bv[N1] * q23 * args.av[N1+1] * p01)) << (qsv[N1+2] + qsv[N1+3])) + b01 * (((args.bv[N1+3] * args.qv[N1+3] * args.av[N1+2] * p012) << qsv[N1+3]) + args.bv[N1+2] * args.av[N1+3] * p0123); break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LP, LQ, LB, LT; var uintC LQS; eval_pqsab_series_aux(N1,Nm,args,qsv,&LP,&LQ,&LQS,&LB,<); // Compute right part. var cl_I RP, RQ, RB, RT; var uintC RQS; eval_pqsab_series_aux(Nm,N2,args,qsv,(P?&RP:(cl_I*)0),&RQ,&RQS,&RB,&RT); // Put together partial results. if (P) { *P = LP*RP; } *Q = LQ*RQ; *QS = LQS+RQS; *B = LB*RB; // S = LS + LP/LQ * RS, so T = RB*RQ*LT + LB*LP*RT. *T = ((RB*RQ*LT) << RQS) + LB*LP*RT; break; } } } template<> const cl_LF eval_rational_series (uintC N, const cl_pqab_series& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I Q, B, T; // Precomputation of the shift counts: // Split qv[n] into qv[n]*2^qsv[n]. CL_ALLOCA_STACK; var uintC* qsv = (uintC*) cl_alloca(N*sizeof(uintC)); var cl_I* qp = args.qv; var uintC* qsp = qsv; for (var uintC n = 0; n < N; n++, qp++, qsp++) { *qsp = pullout_shiftcount(*qp); } // Main computation. var uintC QS; eval_pqsab_series_aux(0,N,args,qsv,NULL,&Q,&QS,&B,&T); return cl_I_to_LF(T,len) / scale_float(cl_I_to_LF(B*Q,len),QS); } static void eval_pqab_series_aux (uintC N1, uintC N2, cl_pqab_series_stream& args, cl_I* P, cl_I* Q, cl_I* B, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: { var cl_pqab_series_term v0 = args.next(); // [N1] if (P) { *P = v0.p; } *Q = v0.q; *B = v0.b; *T = v0.a * v0.p; break; } case 2: { var cl_pqab_series_term v0 = args.next(); // [N1] var cl_pqab_series_term v1 = args.next(); // [N1+1] var cl_I p01 = v0.p * v1.p; if (P) { *P = p01; } *Q = v0.q * v1.q; *B = v0.b * v1.b; *T = v1.b * v1.q * v0.a * v0.p + v0.b * v1.a * p01; break; } case 3: { var cl_pqab_series_term v0 = args.next(); // [N1] var cl_pqab_series_term v1 = args.next(); // [N1+1] var cl_pqab_series_term v2 = args.next(); // [N1+2] var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; if (P) { *P = p012; } var cl_I q12 = v1.q * v2.q; *Q = v0.q * q12; var cl_I b12 = v1.b * v2.b; *B = v0.b * b12; *T = b12 * q12 * v0.a * v0.p + v0.b * (v2.b * v2.q * v1.a * p01 + v1.b * v2.a * p012); break; } case 4: { var cl_pqab_series_term v0 = args.next(); // [N1] var cl_pqab_series_term v1 = args.next(); // [N1+1] var cl_pqab_series_term v2 = args.next(); // [N1+2] var cl_pqab_series_term v3 = args.next(); // [N1+3] var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; var cl_I p0123 = p012 * v3.p; if (P) { *P = p0123; } var cl_I q23 = v2.q * v3.q; var cl_I q123 = v1.q * q23; *Q = v0.q * q123; var cl_I b01 = v0.b * v1.b; var cl_I b23 = v2.b * v3.b; *B = b01 * b23; *T = b23 * (v1.b * q123 * v0.a * v0.p + v0.b * q23 * v1.a * p01) + b01 * (v3.b * v3.q * v2.a * p012 + v2.b * v3.a * p0123); break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LP, LQ, LB, LT; eval_pqab_series_aux(N1,Nm,args,&LP,&LQ,&LB,<); // Compute right part. var cl_I RP, RQ, RB, RT; eval_pqab_series_aux(Nm,N2,args,(P?&RP:(cl_I*)0),&RQ,&RB,&RT); // Put together partial results. if (P) { *P = LP*RP; } *Q = LQ*RQ; *B = LB*RB; // S = LS + LP/LQ * RS, so T = RB*RQ*LT + LB*LP*RT. *T = RB*RQ*LT + LB*LP*RT; break; } } } template<> const cl_LF eval_rational_series (uintC N, cl_pqab_series_stream& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I Q, B, T; eval_pqab_series_aux(0,N,args,NULL,&Q,&B,&T); return cl_I_to_LF(T,len) / cl_I_to_LF(B*Q,len); } static void eval_pqab_series_aux (uintC N1, uintC N2, cl_pqab_series_stream& args, cl_R* P, cl_R* Q, cl_R* B, cl_R* T, uintC trunclen) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: { var cl_pqab_series_term v0 = args.next(); // [N1] if (P) { *P = v0.p; } *Q = v0.q; *B = v0.b; *T = v0.a * v0.p; break; } case 2: { var cl_pqab_series_term v0 = args.next(); // [N1] var cl_pqab_series_term v1 = args.next(); // [N1+1] var cl_I p01 = v0.p * v1.p; if (P) { *P = p01; } *Q = v0.q * v1.q; *B = v0.b * v1.b; *T = v1.b * v1.q * v0.a * v0.p + v0.b * v1.a * p01; break; } case 3: { var cl_pqab_series_term v0 = args.next(); // [N1] var cl_pqab_series_term v1 = args.next(); // [N1+1] var cl_pqab_series_term v2 = args.next(); // [N1+2] var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; if (P) { *P = p012; } var cl_I q12 = v1.q * v2.q; *Q = v0.q * q12; var cl_I b12 = v1.b * v2.b; *B = v0.b * b12; *T = b12 * q12 * v0.a * v0.p + v0.b * (v2.b * v2.q * v1.a * p01 + v1.b * v2.a * p012); break; } case 4: { var cl_pqab_series_term v0 = args.next(); // [N1] var cl_pqab_series_term v1 = args.next(); // [N1+1] var cl_pqab_series_term v2 = args.next(); // [N1+2] var cl_pqab_series_term v3 = args.next(); // [N1+3] var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; var cl_I p0123 = p012 * v3.p; if (P) { *P = p0123; } var cl_I q23 = v2.q * v3.q; var cl_I q123 = v1.q * q23; *Q = v0.q * q123; var cl_I b01 = v0.b * v1.b; var cl_I b23 = v2.b * v3.b; *B = b01 * b23; *T = b23 * (v1.b * q123 * v0.a * v0.p + v0.b * q23 * v1.a * p01) + b01 * (v3.b * v3.q * v2.a * p012 + v2.b * v3.a * p0123); break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_R LP, LQ, LB, LT; eval_pqab_series_aux(N1,Nm,args,&LP,&LQ,&LB,<,trunclen); // Compute right part. var cl_R RP, RQ, RB, RT; eval_pqab_series_aux(Nm,N2,args,(P?&RP:(cl_I*)0),&RQ,&RB,&RT,trunclen); // Put together partial results. if (P) { *P = LP*RP; truncate_precision(*P,trunclen); } *Q = LQ*RQ; truncate_precision(*Q,trunclen); *B = LB*RB; truncate_precision(*B,trunclen); // S = LS + LP/LQ * RS, so T = RB*RQ*LT + LB*LP*RT. *T = RB*RQ*LT + LB*LP*RT; truncate_precision(*T,trunclen); break; } } } template<> const cl_LF eval_rational_series (uintC N, cl_pqab_series_stream& args, uintC len, uintC trunclen) { if (N==0) return cl_I_to_LF(0,len); var cl_R Q, B, T; eval_pqab_series_aux(0,N,args,NULL,&Q,&B,&T,trunclen); return cl_R_to_LF(T,len) / cl_R_to_LF(B*Q,len); } // Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))): // O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_cossin.cc0000644000000000000000000000527011201634737016621 0ustar // cos_sin(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/transcendental/cl_F_tran.h" #include "float/cl_F.h" #include "cln/integer.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { const cos_sin_t cos_sin (const cl_F& x) { // Methode: // Genauigkeit erhöhen, // (q,r) := (round x (float pi/2 x)), so daß |r|<=pi/4. // y:=(sin(r)/r)^2 errechnen. // cos(r) berechnen: // e := Exponent aus (decode-float r), d := (float-digits r) // Bei r=0.0 oder e<=-d/2 liefere 1.0 // (denn bei e<=-d/2 ist r^2/2 < 2^(-d)/2 = 2^(-d-1), also // 1 >= cos(r) > 1-r^2/2 > 1-2^(-d-1), // also ist cos(r), auf d Bits gerundet, gleich 1.0). // Sonst sqrt(1-r^2*y). // sin(r) berechnen: r*sqrt(y). // Genauigkeit wieder verringern. // Falls q = 0 mod 4: (cos(r), sin(r)) // Falls q = 1 mod 4: (-sin(r), cos(r)) // Falls q = 2 mod 4: (-cos(r), -sin(r)) // Falls q = 3 mod 4: (sin(r), -cos(r)) // Rechengenauigkeit erhöhen und durch pi/2 dividieren: var cl_F cos_r; var cl_F sin_r; var cl_I q; if (longfloatp(x)) { DeclareType(cl_LF,x); if (TheLfloat(x)->len >= 2710) { var cl_F_div_t q_r = cl_round_pi2(extend(x,TheLfloat(x)->len+1)); q = q_r.quotient; var cl_LF r = The(cl_LF)(q_r.remainder); var cl_LF_cos_sin_t trig = cl_cossin_ratseries(r); cos_r = cl_float(trig.cos,x); sin_r = cl_float(trig.sin,x); } else { var cl_F_div_t q_r = cl_round_pi2(cl_F_extendsqrt(x)); q = q_r.quotient; var cl_LF r = The(cl_LF)(q_r.remainder); var cl_LF y = sinx_naive(r); // y := sin(r)^2 // erste Komponente cos(r) berechnen: if (zerop(r) || (float_exponent(r) <= (-(sintC)float_digits(r))>>1)) cos_r = cl_float(1,x); // cos(r) = 1.0 else cos_r = cl_float(sqrt(1-y),x); // cos(r) = sqrt(1-y) // zweite Komponente sin(r) berechnen: sin_r = cl_float(sqrt(y),x); if (minusp(r)) sin_r = - sin_r; } } else { var cl_F_div_t q_r = cl_round_pi2(cl_F_extendsqrt(x)); q = q_r.quotient; var cl_F& r = q_r.remainder; var cl_F y = sinxbyx_naive(r); // y := (sin(r)/r)^2 // erste Komponente cos(r) berechnen: if (zerop(r) || (float_exponent(r) <= (-(sintC)float_digits(r))>>1)) cos_r = cl_float(1,x); // cos(r) = 1.0 else cos_r = cl_float(sqrt(1 - square(r)*y),x); // sqrt(1-r^2*y) // zweite Komponente sin(r) berechnen: sin_r = cl_float(r*sqrt(y),x); } // evtl. Vorzeichenwechsel oder Vertauschen: switch (cl_I_to_UL(logand(q,3))) { // q mod 4 case 0: return cos_sin_t(cos_r,sin_r); case 1: return cos_sin_t(-sin_r,cos_r); case 2: return cos_sin_t(-cos_r,-sin_r); case 3: return cos_sin_t(sin_r,-cos_r); default: NOTREACHED } } } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_exp.cc0000644000000000000000000000313611201634737016116 0ustar // exp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/transcendental/cl_F_tran.h" #include "cln/float.h" #include "float/cl_F.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" #include "base/cl_inline.h" #include "float/lfloat/elem/cl_LF_minusp.cc" #include "float/lfloat/misc/cl_LF_exponent.cc" namespace cln { // Division durch ln(2). inline const cl_F_div_t cl_floor_ln2 (const cl_F& x) { // Bei 0<=x<1/2 kann man sofort q:=0 setzen. if (!minusp(x) && (float_exponent(x) < 0)) return cl_F_div_t(0,x); else return floor2(x,cl_ln2(x)); } inline const cl_LF_div_t cl_floor_ln2 (const cl_LF& x) { // Bei 0<=x<1/2 kann man sofort q:=0 setzen. if (!minusp_inline(x) && (float_exponent_inline(x) < 0)) return cl_LF_div_t(0,x); else return floor2(x,The(cl_LF)(cl_ln2(x))); } const cl_F exp (const cl_F& x) { // Methode: // d := (float-digits x), // Genauigkeit um sqrt(d)+max(integer-length(e)) Bits erhöhen, // (q,r) := (floor x ln(2)) // Ergebnis ist exp(q*ln(2)+r) = (scale-float exp(r) q). // Rechengenauigkeit erhöhen und durch ln(2) dividieren: if (longfloatp(x) && (TheLfloat(x)->len >= 84)) { DeclareType(cl_LF,x); var cl_LF_div_t q_r = cl_floor_ln2(extend(x,TheLfloat(x)->len+1)); var cl_I& q = q_r.quotient; var cl_LF& r = q_r.remainder; return cl_float(scale_float(expx_ratseries(r),q),x); } else { var cl_F_div_t q_r = cl_floor_ln2(cl_F_extendsqrtx(x)); var cl_I& q = q_r.quotient; var cl_F& r = q_r.remainder; return cl_float(scale_float(expx_naive(r),q),x); } } } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_coshsinh.cc0000644000000000000000000000314011201634737017247 0ustar // cl_coshsinh_ratseries(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" #include "cln/integer.h" namespace cln { inline const cl_LF_cosh_sinh_t operator* (const cl_LF_cosh_sinh_t& a, const cl_LF_cosh_sinh_t& b) { return cl_LF_cosh_sinh_t(a.cosh*b.cosh+a.sinh*b.sinh,a.sinh*b.cosh+a.cosh*b.sinh); } const cl_LF_cosh_sinh_t cl_coshsinh_ratseries (const cl_LF& x) { // Similar to expx_ratseries. var uintC len = TheLfloat(x)->len; var cl_idecoded_float x_ = integer_decode_float(x); // x = (-1)^sign * 2^exponent * mantissa var uintE lq = cl_I_to_UE(- x_.exponent); var const cl_I& p = x_.mantissa; // Compute sinh(p/2^lq) and cosh(p/2^lq) by splitting into pieces. var bool first_factor = true; var cl_LF_cosh_sinh_t product; var uintE b1; var uintE b2; for (b1 = 0, b2 = 1; b1 < lq; b1 = b2, b2 = 2*b2) { // Piece containing bits b1+1..b2 after "decimal point" // in the binary representation of (p/2^lq). var uintE lqk = (lq >= b2 ? b2 : lq); var cl_I pk = ldb(p,cl_byte(lqk-b1,lq-lqk)); // Compute sinh(pk/2^lqk) and cosh(pk/2^lqk). if (!zerop(pk)) { if (minusp(x_.sign)) { pk = -pk; } var cl_LF_cosh_sinh_t factor = cl_coshsinh_aux(pk,lqk,len); if (first_factor) { product = factor; first_factor = false; } else product = product * factor; } } if (first_factor) return cl_LF_cosh_sinh_t(cl_I_to_LF(1,len),cl_I_to_LF(0,len)); else return product; } // Bit complexity (N = length(x)): O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_ln2_var.cc0000644000000000000000000000170111201634737016661 0ustar // cl_F_ln2. // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "base/digitseq/cl_DS.h" #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "float/cl_F.h" namespace cln { cl_LF& cl_LF_ln2() { // Mantisse von ln(2) : static const uintD ln2_mantisse [64/intDsize] = #include "cl_F_ln2_var.h" static cl_LF val = encode_LF_array(0,0,ln2_mantisse,64/intDsize); return val; } // Problem: If someone changes free_hook, the destructor of this // will call the new hook, passing it some pointer obtained by the old // malloc_hook. ?? const cl_SF& cl_SF_ln2() { static const cl_SF val = cl_LF_to_SF(cl_LF_ln2()); return val; } const cl_FF& cl_FF_ln2() { static const cl_FF val = cl_LF_to_FF(cl_LF_ln2()); return val; } const cl_DF& cl_DF_ln2() { static const cl_DF val = cl_LF_to_DF(cl_LF_ln2()); return val; } } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc0000644000000000000000000001540211201634737022047 0ustar // eval_pqcd_series_aux(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_LF_tran.h" // Implementation. #include "cln/integer.h" #include "cln/real.h" #include "cln/exception.h" namespace cln { void eval_pqcd_series_aux (uintC N, cl_pqcd_series_term* args, cl_pqcd_series_result& Z, bool rightmost) { // N = N2-N1 switch (N) { case 0: throw runtime_exception(); break; case 1: if (!rightmost) { Z.P = args[0].p; } Z.Q = args[0].q; Z.T = args[0].p; if (!rightmost) { Z.C = args[0].c; } Z.D = args[0].d; Z.V = args[0].c * args[0].p; break; case 2: { var cl_I p01 = args[0].p * args[1].p; if (!rightmost) { Z.P = p01; } Z.Q = args[0].q * args[1].q; var cl_I p0q1 = args[0].p * args[1].q + p01; Z.T = p0q1; var cl_I c0d1 = args[0].c * args[1].d; var cl_I c1d0 = args[1].c * args[0].d; if (!rightmost) { Z.C = c0d1 + c1d0; } Z.D = args[0].d * args[1].d; Z.V = c0d1 * p0q1 + c1d0 * p01; break; } case 3: { var cl_I p01 = args[0].p * args[1].p; var cl_I p012 = p01 * args[2].p; if (!rightmost) { Z.P = p012; } Z.Q = args[0].q * args[1].q * args[2].q; var cl_I p0q1 = args[0].p * args[1].q + p01; Z.T = args[2].q * p0q1 + p012; var cl_I c0d1 = args[0].c * args[1].d; var cl_I c1d0 = args[1].c * args[0].d; var cl_I d01 = args[0].d * args[1].d; if (!rightmost) { Z.C = (c0d1 + c1d0) * args[2].d + args[2].c * d01; } Z.D = d01 * args[2].d; Z.V = args[2].d * (args[2].q * (c0d1 * p0q1 + c1d0 * p01) + (c0d1 + c1d0) * p012) + args[2].c * d01 * p012; break; } default: { var uintC Nm = N/2; // midpoint // Compute left part. var cl_pqcd_series_result L; eval_pqcd_series_aux(Nm,args+0,L,false); // Compute right part. var cl_pqcd_series_result R; eval_pqcd_series_aux(N-Nm,args+Nm,R,rightmost); // Put together partial results. if (!rightmost) { Z.P = L.P * R.P; } Z.Q = L.Q * R.Q; // Z.S = L.S + L.P/L.Q*R.S; var cl_I tmp = L.P * R.T; Z.T = R.Q * L.T + tmp; if (!rightmost) { Z.C = L.C * R.D + L.D * R.C; } Z.D = L.D * R.D; // Z.U = L.U + L.C/L.D * L.P/L.Q * R.S + L.P/L.Q * R.U; // Z.V = R.D * R.Q * L.V + R.D * L.C * L.P * R.T + L.D * L.P * R.V; Z.V = R.D * (R.Q * L.V + L.C * tmp) + L.D * L.P * R.V; break; } } } void eval_pqcd_series_aux (uintC N, cl_pqcd_series_stream& args, cl_pqcd_series_result& Z, bool rightmost) { // N = N2-N1 switch (N) { case 0: throw runtime_exception(); break; case 1: { var cl_pqcd_series_term v0 = args.next(); // [N1] if (!rightmost) { Z.P = v0.p; } Z.Q = v0.q; Z.T = v0.p; if (!rightmost) { Z.C = v0.c; } Z.D = v0.d; Z.V = v0.c * v0.p; break; } case 2: { var cl_pqcd_series_term v0 = args.next(); // [N1] var cl_pqcd_series_term v1 = args.next(); // [N1+1] var cl_I p01 = v0.p * v1.p; if (!rightmost) { Z.P = p01; } Z.Q = v0.q * v1.q; var cl_I p0q1 = v0.p * v1.q + p01; Z.T = p0q1; var cl_I c0d1 = v0.c * v1.d; var cl_I c1d0 = v1.c * v0.d; if (!rightmost) { Z.C = c0d1 + c1d0; } Z.D = v0.d * v1.d; Z.V = c0d1 * p0q1 + c1d0 * p01; break; } case 3: { var cl_pqcd_series_term v0 = args.next(); // [N1] var cl_pqcd_series_term v1 = args.next(); // [N1+1] var cl_pqcd_series_term v2 = args.next(); // [N1+2] var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; if (!rightmost) { Z.P = p012; } Z.Q = v0.q * v1.q * v2.q; var cl_I p0q1 = v0.p * v1.q + p01; Z.T = v2.q * p0q1 + p012; var cl_I c0d1 = v0.c * v1.d; var cl_I c1d0 = v1.c * v0.d; var cl_I d01 = v0.d * v1.d; if (!rightmost) { Z.C = (c0d1 + c1d0) * v2.d + v2.c * d01; } Z.D = d01 * v2.d; Z.V = v2.d * (v2.q * (c0d1 * p0q1 + c1d0 * p01) + (c0d1 + c1d0) * p012) + v2.c * d01 * p012; break; } default: { var uintC Nm = N/2; // midpoint // Compute left part. var cl_pqcd_series_result L; eval_pqcd_series_aux(Nm,args,L,false); // Compute right part. var cl_pqcd_series_result R; eval_pqcd_series_aux(N-Nm,args,R,rightmost); // Put together partial results. if (!rightmost) { Z.P = L.P * R.P; } Z.Q = L.Q * R.Q; // Z.S = L.S + L.P/L.Q*R.S; var cl_I tmp = L.P * R.T; Z.T = R.Q * L.T + tmp; if (!rightmost) { Z.C = L.C * R.D + L.D * R.C; } Z.D = L.D * R.D; // Z.U = L.U + L.C/L.D * L.P/L.Q * R.S + L.P/L.Q * R.U; // Z.V = R.D * R.Q * L.V + R.D * L.C * L.P * R.T + L.D * L.P * R.V; Z.V = R.D * (R.Q * L.V + L.C * tmp) + L.D * L.P * R.V; break; } } } void eval_pqcd_series_aux (uintC N, cl_pqcd_series_stream& args, cl_pqcd_series_result& Z, uintC trunclen, bool rightmost) { // N = N2-N1 switch (N) { case 0: throw runtime_exception(); break; case 1: { var cl_pqcd_series_term v0 = args.next(); // [N1] if (!rightmost) { Z.P = v0.p; } Z.Q = v0.q; Z.T = v0.p; if (!rightmost) { Z.C = v0.c; } Z.D = v0.d; Z.V = v0.c * v0.p; break; } case 2: { var cl_pqcd_series_term v0 = args.next(); // [N1] var cl_pqcd_series_term v1 = args.next(); // [N1+1] var cl_I p01 = v0.p * v1.p; if (!rightmost) { Z.P = p01; } Z.Q = v0.q * v1.q; var cl_I p0q1 = v0.p * v1.q + p01; Z.T = p0q1; var cl_I c0d1 = v0.c * v1.d; var cl_I c1d0 = v1.c * v0.d; if (!rightmost) { Z.C = c0d1 + c1d0; } Z.D = v0.d * v1.d; Z.V = c0d1 * p0q1 + c1d0 * p01; break; } case 3: { var cl_pqcd_series_term v0 = args.next(); // [N1] var cl_pqcd_series_term v1 = args.next(); // [N1+1] var cl_pqcd_series_term v2 = args.next(); // [N1+2] var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; if (!rightmost) { Z.P = p012; } Z.Q = v0.q * v1.q * v2.q; var cl_I p0q1 = v0.p * v1.q + p01; Z.T = v2.q * p0q1 + p012; var cl_I c0d1 = v0.c * v1.d; var cl_I c1d0 = v1.c * v0.d; var cl_I d01 = v0.d * v1.d; if (!rightmost) { Z.C = (c0d1 + c1d0) * v2.d + v2.c * d01; } Z.D = d01 * v2.d; Z.V = v2.d * (v2.q * (c0d1 * p0q1 + c1d0 * p01) + (c0d1 + c1d0) * p012) + v2.c * d01 * p012; break; } default: { var uintC Nm = N/2; // midpoint // Compute left part. var cl_pqcd_series_result L; eval_pqcd_series_aux(Nm,args,L,trunclen,false); // Compute right part. var cl_pqcd_series_result R; eval_pqcd_series_aux(N-Nm,args,R,trunclen,rightmost); // Put together partial results. if (!rightmost) { Z.P = L.P * R.P; truncate_precision(Z.P,trunclen); } Z.Q = L.Q * R.Q; truncate_precision(Z.Q,trunclen); // Z.S = L.S + L.P/L.Q*R.S; var cl_R tmp = L.P * R.T; Z.T = R.Q * L.T + tmp; truncate_precision(Z.T,trunclen); if (!rightmost) { Z.C = L.C * R.D + L.D * R.C; truncate_precision(Z.C,trunclen); } Z.D = L.D * R.D; truncate_precision(Z.D,trunclen); // Z.U = L.U + L.C/L.D * L.P/L.Q * R.S + L.P/L.Q * R.U; // Z.V = R.D * R.Q * L.V + R.D * L.C * L.P * R.T + L.D * L.P * R.V; Z.V = R.D * (R.Q * L.V + L.C * tmp) + L.D * L.P * R.V; truncate_precision(Z.V,trunclen); break; } } } } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_ratseries_qab.cc0000644000000000000000000000507211201634737020263 0ustar // eval_rational_series(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_LF_tran.h" // Implementation. #include "cln/lfloat.h" #include "cln/integer.h" #include "cln/exception.h" #include "float/lfloat/cl_LF.h" namespace cln { // Subroutine. // Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n))) // and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1) // and T = B*Q*S (all integers). On entry N1 < N2. // P will not be computed if a NULL pointer is passed. static void eval_qab_series_aux (uintC N1, uintC N2, const cl_qab_series& args, cl_I* Q, cl_I* B, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: *Q = args.qv[N1]; *B = args.bv[N1]; *T = args.av[N1]; break; case 2: { *Q = args.qv[N1] * args.qv[N1+1]; *B = args.bv[N1] * args.bv[N1+1]; *T = args.bv[N1+1] * args.qv[N1+1] * args.av[N1] + args.bv[N1] * args.av[N1+1]; break; } case 3: { var cl_I q12 = args.qv[N1+1] * args.qv[N1+2]; *Q = args.qv[N1] * q12; var cl_I b12 = args.bv[N1+1] * args.bv[N1+2]; *B = args.bv[N1] * b12; *T = b12 * q12 * args.av[N1] + args.bv[N1] * (args.bv[N1+2] * args.qv[N1+2] * args.av[N1+1] + args.bv[N1+1] * args.av[N1+2]); break; } case 4: { var cl_I q23 = args.qv[N1+2] * args.qv[N1+3]; var cl_I q123 = args.qv[N1+1] * q23; *Q = args.qv[N1] * q123; var cl_I b01 = args.bv[N1] * args.bv[N1+1]; var cl_I b23 = args.bv[N1+2] * args.bv[N1+3]; *B = b01 * b23; *T = b23 * (args.bv[N1+1] * q123 * args.av[N1] + args.bv[N1] * q23 * args.av[N1+1]) + b01 * (args.bv[N1+3] * args.qv[N1+3] * args.av[N1+2] + args.bv[N1+2] * args.av[N1+3]); break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LQ, LB, LT; eval_qab_series_aux(N1,Nm,args,&LQ,&LB,<); // Compute right part. var cl_I RQ, RB, RT; eval_qab_series_aux(Nm,N2,args,&RQ,&RB,&RT); // Put together partial results. *Q = LQ*RQ; *B = LB*RB; // S = LS + 1/LQ * RS, so T = RB*RQ*LT + LB*RT. *T = RB*RQ*LT + LB*RT; break; } } } template<> const cl_LF eval_rational_series (uintC N, const cl_qab_series& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I Q, B, T; eval_qab_series_aux(0,N,args,&Q,&B,&T); return cl_I_to_LF(T,len) / cl_I_to_LF(B*Q,len); } // Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))): // O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_ln2.cc0000644000000000000000000000063011201634737016011 0ustar // cl_ln2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "float/cl_F.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F cl_ln2 (const cl_F& y) { floattypecase(y , return cl_SF_ln2(); , return cl_FF_ln2(); , return cl_DF_ln2(); , return cl_ln2(TheLfloat(y)->len); ); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_pi.cc0000644000000000000000000000064011201634737015727 0ustar // pi(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/transcendental/cl_F_tran.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F pi (const cl_F& y) { floattypecase(y , return cl_SF_pi(); , return cl_FF_pi(); , return cl_DF_pi(); , return pi(TheLfloat(y)->len); ); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_roundpi2.cc0000644000000000000000000000076311201634737017067 0ustar // cl_round_pi2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. namespace cln { const cl_F_div_t cl_round_pi2 (const cl_F& x) { if (float_exponent(x) < 0) // Exponent <0 -> |x|<1/2 -> |x/(pi/2)| < 1/2, also Division unnötig return cl_F_div_t(0,x); // Quotient 0, Rest x else // x durch pi/2 (mit hinreichender Genauigkeit) dividieren return round2(x,scale_float(pi(x),-1)); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_eulerconst.cc0000644000000000000000000004750011201634737017624 0ustar // eulerconst(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "cln/lfloat.h" #include "float/transcendental/cl_LF_tran.h" #include "float/lfloat/cl_LF.h" #include "cln/integer.h" #include "cln/real.h" #include "base/cl_alloca.h" namespace cln { #if 0 // works, but besselintegral4 is always faster const cl_LF compute_eulerconst_expintegral (uintC len) { // [Jonathan M. Borwein, Peter B. Borwein: Pi and the AGM. // Wiley 1987. Section 10.2.3, exercise 11, p. 336] // Use the following formula for the modified exponential integral // (valid for Re(z) > 0) // E1(z) := integral(t = z..+infty, exp(-t)/t dt) // E1(z) = - log z - C + sum(n=1..infty, (-1)^(n-1) z^n / (n*n!)) // [Hint for proving this formula: // 1. Learn about the elementary properties of the Gamma function. // 2. -C = derivative of Gamma at 1 // = lim_{z -> 0} (Gamma(z) - 1/z) // = integral(t = 0..1, (exp(-t)-1)/t dt) // + integral(t = 1..infty, exp(-t)/t dt) // 3. Add // 0 = integral(t=0..1, 1/(t+1)) - integral(t=1..infty, 1/t(t+1) dt) // to get // -C = integral(t = 0..infty, (exp(-t)/t - 1/t(t+1)) dt) // 4. Compute E1(z) + C and note that E1(z) + C + log z is the integral // of an entire function, hence an entire function as well.] // Of course we also have the estimate // |E1(z)| < exp(-Re(z)). // This means that we can get C by computing // sum(n=1..infty, (-1)^(n-1) z^n / (n*n!)) - log z // for large z. // In order to get M bits of precision, we first choose z (real) such // that exp(-z) < 2^-M. This will make |E1(z)| small enough. z should // be chosen as an integer, this is the key to computing the series // sum very fast. z = M*log(2) + O(1). // Then we choose the number N of terms: // Note than the n-th term's absolute value is (logarithmically) // n*log(z) - n*log(n) + n - 3/2*log(n) - log(sqrt(2 pi)) + o(1). // The derivative of this with respect to n is // log(z) - log(n) - 3/(2n) + o(1/n), // hence is increasing for n < z and decreasing for n > z. // The maximum value is attained at n = z + O(1), and is z + O(log z), // which means that we need z/log(2) + O(log z) bits before the // decimal point. // We can cut off the series when // n*log(z) - n*log(n) + n - 3/2*log(n) - log(sqrt(2 pi)) < -M*log(2) // This happens at n = alpha*z - 3/(2*log(alpha))*log(z) + O(1), // where alpha = 3.591121477... is the solution of // -alpha*log(alpha) + alpha + 1 = 0. // [Use the Newton iteration alpha --> (alpha+1)/log(alpha) to // compute this number.] // Finally we compute the series's sum as // sum(0 <= n < N, a(n)/b(n) * (p(0)...p(n))/(q(0)...q(n))) // with a(n) = 1, b(n) = n+1, p(n) = z for n=0, -z for n>0, q(n) = n+1. // If we computed this with floating-point numbers, we would have // to more than double the floating-point precision because of the large // extinction which takes place. But luckily we compute with integers. var uintC actuallen = len+1; // 1 guard digit var uintC z = (uintC)(0.693148*intDsize*actuallen)+1; var uintC N = (uintC)(3.591121477*z); CL_ALLOCA_STACK; var cl_I* bv = (cl_I*) cl_alloca(N*sizeof(cl_I)); var cl_I* pv = (cl_I*) cl_alloca(N*sizeof(cl_I)); var cl_I* qv = (cl_I*) cl_alloca(N*sizeof(cl_I)); var uintC n; for (n = 0; n < N; n++) { init1(cl_I, bv[n]) (n+1); init1(cl_I, pv[n]) (n==0 ? (cl_I)z : -(cl_I)z); init1(cl_I, qv[n]) (n+1); } var cl_pqb_series series; series.bv = bv; series.pv = pv; series.qv = qv; var cl_LF fsum = eval_rational_series(N,series,actuallen); for (n = 0; n < N; n++) { bv[n].~cl_I(); pv[n].~cl_I(); qv[n].~cl_I(); } fsum = fsum - ln(cl_I_to_LF(z,actuallen)); // log(z) subtrahieren return shorten(fsum,len); // verkürzen und fertig } // Bit complexity (N = len): O(log(N)^2*M(N)). #endif #if 0 // works, but besselintegral1 is twice as fast const cl_LF compute_eulerconst_expintegral1 (uintC len) { // Define f(z) := sum(n=0..infty, z^n/n!) = exp(z) // and g(z) := sum(n=0..infty, H_n*z^n/n!) // where H_n := 1/1 + 1/2 + ... + 1/n. // The following formula can be proved: // g'(z) - g(z) = (exp(z)-1)/z, // g(z) = exp(z)*(log(z) + c3 + integral(t=..z, exp(-t)/t dt)) // The Laplace method for determining the asymptotics of an integral // or sum yields for real x>0 (the terms n = x+O(x^(1/2)) are // dominating): // f(x) = exp(x)*(1 + O(x^(-1/2))) // g(x) = exp(x)*(log(x) + C + O(log(x)*x^(-1/2))) // Hence // g(x)/f(x) - log(x) - C = O(log(x)*x^(-1/2)) // This determines the constant c3, we thus have // g(z) = exp(z)*(log(z) + C + integral(t=z..infty, exp(-t)/t dt)) // Hence we have for x -> infty: // g(x)/f(x) - log(x) - C == O(exp(-x)) // This means that we can get C by computing // g(x)/f(x) - log(x) // for large x. // In order to get M bits of precision, we first choose x (real) such // that exp(-x) < 2^-M. This will make the absolute value of the // integral small enough. x should be chosen as an integer, this is // the key to computing the series sum very fast. x = M*log(2) + O(1). // Then we choose the number N of terms: // Note than the n-th term's absolute value is (logarithmically) // n*log(x) - n*log(n) + n - 1/2*log(n) - 1/2*log(2 pi) + o(1). // The derivative of this with respect to n is // log(x) - log(n) - 1/2n + o(1/n), // hence is increasing for n < x and decreasing for n > x. // The maximum value is attained at n = x + O(1), and is // x + O(log x), which means that we need x/log(2) + O(log x) // bits before the decimal point. This also follows from the // asymptotic estimate for f(x). // We can cut off the series when the relative error is < 2^-M, // i.e. when the absolute error is < 2^-M*exp(x), i.e. // n*log(x) - n*log(n) + n - 1/2*log(n) - 1/2*log(2 pi) < // < -M*log(2) + x // This happens at n = e*x - 1/2*log(x) + O(1). // Finally we compute the sums of the series f(x) and g(x) with N terms // each. // We compute f(x) classically and g(x) using the partial sums of f(x). var uintC actuallen = len+2; // 2 guard digits var uintC x = (uintC)(0.693148*intDsize*actuallen)+1; var uintC N = (uintC)(2.718281828*x); var cl_LF one = cl_I_to_LF(1,actuallen); var cl_LF fterm = one; var cl_LF fsum = fterm; var cl_LF gterm = cl_I_to_LF(0,actuallen); var cl_LF gsum = gterm; var uintC n; // After n loops // fterm = x^n/n!, fsum = 1 + x/1! + ... + x^n/n!, // gterm = H_n*x^n/n!, gsum = H_1*x/1! + ... + H_n*x^n/n!. for (n = 1; n < N; n++) { fterm = The(cl_LF)(fterm*x)/n; gterm = (The(cl_LF)(gterm*x) + fterm)/n; if (len < 10 || n <= x) { fsum = fsum + fterm; gsum = gsum + gterm; } else { // For n > x, the terms are decreasing. // So we can reduce the precision accordingly. fterm = cl_LF_shortenwith(fterm,one); gterm = cl_LF_shortenwith(gterm,one); fsum = fsum + LF_to_LF(fterm,actuallen); gsum = gsum + LF_to_LF(gterm,actuallen); } } var cl_LF result = gsum/fsum - ln(cl_I_to_LF(x,actuallen)); return shorten(result,len); // verkürzen und fertig } // Bit complexity (N = len): O(N^2). #endif #if 0 // works, but besselintegral4 is always faster // Same algorithm as expintegral1, but using binary splitting to evaluate // the sums. const cl_LF compute_eulerconst_expintegral2 (uintC len) { var uintC actuallen = len+2; // 2 guard digits var uintC x = (uintC)(0.693148*intDsize*actuallen)+1; var uintC N = (uintC)(2.718281828*x); CL_ALLOCA_STACK; var cl_pqd_series_term* args = (cl_pqd_series_term*) cl_alloca(N*sizeof(cl_pqd_series_term)); var uintC n; for (n = 0; n < N; n++) { init1(cl_I, args[n].p) (x); init1(cl_I, args[n].q) (n+1); init1(cl_I, args[n].d) (n+1); } var cl_pqd_series_result sums; eval_pqd_series_aux(N,args,sums); // Instead of computing fsum = 1 + T/Q and gsum = V/(D*Q) // and then dividing them, to compute gsum/fsum, we save two // divisions by computing V/(D*(Q+T)). var cl_LF result = cl_I_to_LF(sums.V,actuallen) / The(cl_LF)(sums.D * cl_I_to_LF(sums.Q+sums.T,actuallen)) - ln(cl_I_to_LF(x,actuallen)); for (n = 0; n < N; n++) { args[n].p.~cl_I(); args[n].q.~cl_I(); args[n].d.~cl_I(); } return shorten(result,len); // verkürzen und fertig } // Bit complexity (N = len): O(log(N)^2*M(N)). #endif // cl_LF compute_eulerconst_besselintegral (uintC len) // This is basically the algorithm used in Pari. // Define f(z) := sum(n=0..infty, z^n/n!^2) // and g(z) := sum(n=0..infty, H_n*z^n/n!^2) // where H_n := 1/1 + 1/2 + ... + 1/n. // [f(z) and g(z) are intimately related to the Bessel functions: // f(x^2) = I_0(2*x), g(x^2) = K_0(2*x) + I_0(2*x*)*(C + log(x)).] // The following formulas can be proved: // z f''(z) + f'(z) - f(z) = 0, // z g''(z) + g'(z) - g(z) = f'(z), // g(z) = (log(z)/2 + c3 - 1/2 integral(t=..z, 1/(t f(t)^2) dt)) f(z) // The Laplace method for determining the asymptotics of an integral // or sum yields for real x>0 (the terms n = sqrt(x)+O(x^(1/4)) are // dominating): // f(x) = exp(2*sqrt(x))*x^(-1/4)*1/(2*sqrt(pi))*(1 + O(x^(-1/4))) // g(x) = exp(2*sqrt(x))*x^(-1/4)*1/(2*sqrt(pi))* // (1/2*log(x) + C + O(log(x)*x^(-1/4))) // Hence // g(x)/f(x) - 1/2*log(x) - C = O(log(x)*x^(-1/4)) // This determines the constant c3, we thus have // g(z)= (log(z)/2 + C + 1/2 integral(t=z..infty, 1/(t f(t)^2) dt)) f(z) // Hence we have for x -> infty: // g(x)/f(x) - 1/2*log(x) - C == pi*exp(-4*sqrt(x)) [approx.] // This means that we can get C by computing // g(x)/f(x) - 1/2*log(x) // for large x. // In order to get M bits of precision, we first choose x (real) such // that exp(-4*sqrt(x)) < 2^-(M+2). This will make the absolute value // of the integral small enough. x should be chosen as an integer, // this is the key to computing the series sum very fast. sqrt(x) // need not be an integer. Set sx = sqrt(x). // sx = M*log(2)/4 + O(1). // Then we choose the number N of terms: // Note than the n-th term's absolute value is (logarithmically) // n*log(x) - 2*n*log(n) + 2*n - log(n) - log(2 pi) + o(1). // The derivative of this with respect to n is // log(x) - 2*log(n) - 1/n + o(1/n), // hence is increasing for n < sx and decreasing for n > sx. // The maximum value is attained at n = sx + O(1), and is // 2*sx + O(log x), which means that we need 2*sx/log(2) + O(log x) // bits before the decimal point. This also follows from the // asymptotic estimate for f(x). // We can cut off the series when the relative error is < 2^-M, // i.e. when the absolute error is // < 2^-M*exp(2*sx)*sx^(-1/2)*1/(2*sqrt(pi)), // i.e. // n*log(x) - 2*n*log(n) + 2*n - log(n) - log(2 pi) < // < -M*log(2) + 2*sx - 1/2*log(sx) - log(2 sqrt(pi)) // This happens at n = alpha*sx - 1/(4*log(alpha))*log(sx) + O(1), // where alpha = 3.591121477... is the solution of // -alpha*log(alpha) + alpha + 1 = 0. // [Use the Newton iteration alpha --> (alpha+1)/log(alpha) to // compute this number.] // Finally we compute the sums of the series f(x) and g(x) with N terms // each. const cl_LF compute_eulerconst_besselintegral1 (uintC len) { // We compute f(x) classically and g(x) using the partial sums of f(x). var uintC actuallen = len+1; // 1 guard digit var uintC sx = (uintC)(0.25*0.693148*intDsize*actuallen)+1; var uintC N = (uintC)(3.591121477*sx); var cl_I x = square((cl_I)sx); var cl_LF eps = scale_float(cl_I_to_LF(1,LF_minlen),-(sintC)(sx*2.88539+10)); var cl_LF fterm = cl_I_to_LF(1,actuallen); var cl_LF fsum = fterm; var cl_LF gterm = cl_I_to_LF(0,actuallen); var cl_LF gsum = gterm; var uintC n; // After n loops // fterm = x^n/n!^2, fsum = 1 + x/1!^2 + ... + x^n/n!^2, // gterm = H_n*x^n/n!^2, gsum = H_1*x/1!^2 + ... + H_n*x^n/n!^2. for (n = 1; n < N; n++) { fterm = The(cl_LF)(fterm*x)/square((cl_I)n); gterm = (The(cl_LF)(gterm*x)/(cl_I)n + fterm)/(cl_I)n; if (len < 10 || n <= sx) { fsum = fsum + fterm; gsum = gsum + gterm; } else { // For n > sx, the terms are decreasing. // So we can reduce the precision accordingly. fterm = cl_LF_shortenwith(fterm,eps); gterm = cl_LF_shortenwith(gterm,eps); fsum = fsum + LF_to_LF(fterm,actuallen); gsum = gsum + LF_to_LF(gterm,actuallen); } } var cl_LF result = gsum/fsum - ln(cl_I_to_LF(sx,actuallen)); return shorten(result,len); // verkürzen und fertig } // Bit complexity (N = len): O(N^2). #if 0 // works, but besselintegral1 is faster const cl_LF compute_eulerconst_besselintegral2 (uintC len) { // We compute the sum of the series f(x) as // sum(0 <= n < N, a(n)/b(n) * (p(0)...p(n))/(q(0)...q(n))) // with a(n) = 1, b(n) = 1, p(n) = x for n>0, q(n) = n^2 for n>0. // and the sum of the series g(x) as // sum(0 <= n < N, a(n)/b(n) * (p(0)...p(n))/(q(0)...q(n))) // with // a(n) = HN_{n+1}, b(n) = 1, p(n) = x, q(n) = (n+1)^2 * HD_{n+1}/HD_{n} // where HD_n := lcm(1,...,n) and HN_n := HD_n * H_n. (Note that // HD_n need not be the lowest possible denominator of H_n. For // example, n=6: H_6 = 49/20, but HD_6 = 60.) // WARNING: The memory used by this algorithm grown quadratically in N. // (Because HD_n grows like exp(n), hence HN_n grows like exp(n) as // well, and we store all HN_n values in an array!) var uintC actuallen = len+1; // 1 guard digit var uintC sx = (uintC)(0.25*0.693148*intDsize*actuallen)+1; var uintC N = (uintC)(3.591121477*sx); var cl_I x = square((cl_I)sx); CL_ALLOCA_STACK; var cl_I* av = (cl_I*) cl_alloca(N*sizeof(cl_I)); var cl_I* pv = (cl_I*) cl_alloca(N*sizeof(cl_I)); var cl_I* qv = (cl_I*) cl_alloca(N*sizeof(cl_I)); var uintC n; // Evaluate f(x). init1(cl_I, pv[0]) (1); init1(cl_I, qv[0]) (1); for (n = 1; n < N; n++) { init1(cl_I, pv[n]) (x); init1(cl_I, qv[n]) ((cl_I)n*(cl_I)n); } var cl_pq_series fseries; fseries.pv = pv; fseries.qv = qv; var cl_LF fsum = eval_rational_series(N,fseries,actuallen); for (n = 0; n < N; n++) { pv[n].~cl_I(); qv[n].~cl_I(); } // Evaluate g(x). var cl_I HN = 0; var cl_I HD = 1; for (n = 0; n < N; n++) { // Now HN/HD = H_n. var cl_I Hu = gcd(HD,n+1); var cl_I Hv = exquopos(n+1,Hu); HN = HN*Hv + exquopos(HD,Hu); HD = HD*Hv; // Now HN/HD = H_{n+1}. init1(cl_I, av[n]) (HN); init1(cl_I, pv[n]) (x); init1(cl_I, qv[n]) (Hv*(cl_I)(n+1)*(cl_I)(n+1)); } var cl_pqa_series gseries; gseries.av = av; gseries.pv = pv; gseries.qv = qv; var cl_LF gsum = eval_rational_series(N,gseries,actuallen); for (n = 0; n < N; n++) { av[n].~cl_I(); pv[n].~cl_I(); qv[n].~cl_I(); } var cl_LF result = gsum/fsum - ln(cl_I_to_LF(sx,actuallen)); return shorten(result,len); // verkürzen und fertig } // Bit complexity (N = len): O(N^2). // Memory consumption: O(N^2). // Same algorithm as besselintegral2, but without quadratic memory consumption. #define cl_rational_series_for_g cl_rational_series_for_besselintegral3_g struct cl_rational_series_for_g : cl_pqa_series_stream { uintL n; cl_I HN; cl_I HD; cl_I x; static cl_pqa_series_term computenext (cl_pqa_series_stream& thisss) { var cl_rational_series_for_g& thiss = (cl_rational_series_for_g&)thisss; var uintL n = thiss.n; // Now HN/HD = H_n. var cl_I Hu = gcd(thiss.HD,n+1); var cl_I Hv = exquopos(n+1,Hu); thiss.HN = thiss.HN*Hv + exquopos(thiss.HD,Hu); thiss.HD = thiss.HD*Hv; // Now HN/HD = H_{n+1}. var cl_pqa_series_term result; result.p = thiss.x; result.q = Hv*(cl_I)(n+1)*(cl_I)(n+1); result.a = thiss.HN; thiss.n = n+1; return result; } cl_rational_series_for_g (const cl_I& _x) : cl_pqa_series_stream (cl_rational_series_for_g::computenext), n (0), HN (0), HD (1), x (_x) {} }; const cl_LF compute_eulerconst_besselintegral3 (uintC len) { var uintC actuallen = len+1; // 1 guard digit var uintC sx = (uintC)(0.25*0.693148*intDsize*actuallen)+1; var uintC N = (uintC)(3.591121477*sx); var cl_I x = square((cl_I)sx); CL_ALLOCA_STACK; var cl_I* pv = (cl_I*) cl_alloca(N*sizeof(cl_I)); var cl_I* qv = (cl_I*) cl_alloca(N*sizeof(cl_I)); var uintC n; // Evaluate f(x). init1(cl_I, pv[0]) (1); init1(cl_I, qv[0]) (1); for (n = 1; n < N; n++) { init1(cl_I, pv[n]) (x); init1(cl_I, qv[n]) ((cl_I)n*(cl_I)n); } var cl_pq_series fseries; fseries.pv = pv; fseries.qv = qv; var cl_LF fsum = eval_rational_series(N,fseries,actuallen); for (n = 0; n < N; n++) { pv[n].~cl_I(); qv[n].~cl_I(); } // Evaluate g(x). var cl_rational_series_for_g gseries = cl_rational_series_for_g(x); var cl_LF gsum = eval_rational_series(N,gseries,actuallen); var cl_LF result = gsum/fsum - ln(cl_I_to_LF(sx,actuallen)); return shorten(result,len); // verkürzen und fertig } // Bit complexity (N = len): O(N^2). #endif // Same algorithm as besselintegral1, but using binary splitting to evaluate // the sums. const cl_LF compute_eulerconst_besselintegral4 (uintC len) { var uintC actuallen = len+2; // 2 guard digits var uintC sx = (uintC)(0.25*0.693148*intDsize*actuallen)+1; var uintC N = (uintC)(3.591121477*sx); var cl_I x = square(cl_I(sx)); struct rational_series_stream : cl_pqd_series_stream { uintC n; cl_I x; static cl_pqd_series_term computenext (cl_pqd_series_stream& thisss) { var rational_series_stream& thiss = (rational_series_stream&)thisss; var uintC n = thiss.n; var cl_pqd_series_term result; result.p = thiss.x; result.q = square(cl_I(n+1)); result.d = n+1; thiss.n = n+1; return result; } rational_series_stream (uintC n_, const cl_I& x_) : cl_pqd_series_stream (rational_series_stream::computenext), n (n_), x (x_) {} } series(0,x); var cl_pqd_series_result sums; eval_pqd_series_aux(N,series,sums,actuallen); // Instead of computing fsum = 1 + T/Q and gsum = V/(D*Q) // and then dividing them, to compute gsum/fsum, we save two // divisions by computing V/(D*(Q+T)). var cl_LF result = cl_R_to_LF(sums.V,actuallen) / The(cl_LF)(sums.D * cl_R_to_LF(sums.Q+sums.T,actuallen)) - ln(cl_R_to_LF(sx,actuallen)); return shorten(result,len); // verkürzen und fertig } // Bit complexity (N = len): O(log(N)^2*M(N)). // Timings of the above algorithms, on an i486 33 MHz, running Linux. // N exp exp1 exp2 bessel1 bessel2 bessel3 bessel4 // 10 0.51 0.28 0.52 0.11 0.16 0.16 0.15 // 25 2.23 0.83 2.12 0.36 0.62 0.63 0.62 // 50 6.74 2.23 6.54 0.95 1.95 1.97 1.95 // 100 19.1 6.74 20.6 2.96 6.47 6.42 6.3 // 250 84 37.4 78 16.3 33.6 32.0 28.8 // 500 230 136.5 206 60.5 --- 111 85 // 1000 591 520 536 229 --- 377 241 // 1050 254 252 // 1100 277 266 // 2500 1744 2108 (1268) 855 (run) // 2500 1845 2192 (1269) 891 (real) // // asymp. FAST N^2 FAST N^2 N^2 N^2 FAST // (FAST means O(log(N)^2*M(N))) // // The break-even point between "bessel1" and "bessel4" is at about N = 1050. const cl_LF compute_eulerconst (uintC len) { if (len >= 1050) return compute_eulerconst_besselintegral4(len); else return compute_eulerconst_besselintegral1(len); } const cl_LF eulerconst (uintC len) { var uintC oldlen = TheLfloat(cl_LF_eulerconst())->len; // vorhandene Länge if (len < oldlen) return shorten(cl_LF_eulerconst(),len); if (len == oldlen) return cl_LF_eulerconst(); // TheLfloat(cl_LF_eulerconst())->len um mindestens einen konstanten Faktor // > 1 wachsen lassen, damit es nicht zu häufig nachberechnet wird: var uintC newlen = len; oldlen += floor(oldlen,2); // oldlen * 3/2 if (newlen < oldlen) newlen = oldlen; // gewünschte > vorhandene Länge -> muß nachberechnen: cl_LF_eulerconst() = compute_eulerconst(newlen); return (len < newlen ? shorten(cl_LF_eulerconst(),len) : cl_LF_eulerconst()); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_zeta_int_f.cc0000644000000000000000000000075111201634737017444 0ustar // zeta(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/transcendental/cl_F_tran.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F zeta (int s, float_format_t f) { floatformatcase((uintC)f , return cl_LF_to_SF(zeta(s,LF_minlen)); , return cl_LF_to_FF(zeta(s,LF_minlen)); , return cl_LF_to_DF(zeta(s,LF_minlen)); , return zeta(s,len); ); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_lnx.cc0000644000000000000000000001672011201634737016126 0ustar // lnx(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "cln/float.h" #include "base/cl_low.h" #include "float/cl_F.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" #include "cln/integer.h" #include "base/cl_inline.h" #include "float/lfloat/elem/cl_LF_zerop.cc" #include "float/lfloat/elem/cl_LF_minusp.cc" #include "float/lfloat/misc/cl_LF_exponent.cc" namespace cln { // cl_F lnx_naive (const cl_F& x) // cl_LF lnx_naive (const cl_LF& x) // // Methode: // y:=x-1, e := Exponent aus (decode-float y), d := (float-digits y) // Bei y=0.0 oder e<=-d liefere y // (denn bei e<=-d ist y/2 < 2^(-d)/2 = 2^(-d-1), also // 0 <= y - ln(x) < y^2/2 < 2^(-d-1)*y // also ist ln(x)/y, auf d Bits gerundet, gleich y). // Bei e<=-sqrt(d) verwende die Potenzreihe // ln(x) = sum(j=0..inf,(-1)^j*y^(j+1)/(j+1)): // a:=-y, b:=y, i:=1, sum:=0, // while (/= sum (setq sum (+ sum (/ b i)))) do i:=i+1, b:=b*a. // Ergebnis sum. // Sonst setze y := sqrt(x), berechne rekursiv z:=ln(y) // und liefere 2*z = (scale-float z 1). // Aufwand: asymptotisch d^0.5*M(d) = d^2.5 . const cl_LF lnx_naive (const cl_LF& x) { var cl_LF y = x-cl_float(1,x); if (zerop_inline(y)) // y=0.0 -> y als Ergebnis return y; var uintC actuallen = TheLfloat(x)->len; var uintC d = float_digits(x); var sintE e = float_exponent_inline(y); if (e <= -(sintC)d) // e <= -d ? return y; // ja -> y als Ergebnis { Mutable(cl_LF,x); var uintL k = 0; // Rekursionszähler k:=0 // Bei e <= -1-limit_slope*floor(sqrt(d)) kann die Potenzreihe // angewandt werden. // Wähle für ln(1+y), naive1: limit_slope = 1.0, // für ln(1+y), naive2: limit_slope = 11/16 = 0.7, // für atanh(z), naive1: limit_slope = 0.6, // für atanh(z), naive1: limit_slope = 0.5. var sintL e_limit = -1-floor(isqrtC(d),2); // -1-floor(sqrt(d)) while (e > e_limit) { // e > -1-floor(sqrt(d)) -> muß |y| verkleinern. x = sqrt(x); // x := (sqrt x) y = x-cl_float(1,x); // y := (- x 1) und e = float_exponent_inline(y); // e neu berechnen k = k+1; // k:=k+1 } if (0) { // Potenzreihe ln(1+y) anwenden: var int i = 1; var cl_LF sum = cl_float(0,x); // sum := (float 0 x) var cl_LF a = -y; var cl_LF b = y; if (0) { // naive1: // floating-point representation loop { var cl_LF new_sum = sum + b/(cl_I)i; // (+ sum (/ b i)) if (new_sum == sum) // = sum ? break; // ja -> Potenzreihe abbrechen sum = new_sum; b = b*a; i = i+1; } } else { // naive2: // floating-point representation with smooth precision reduction var cl_LF eps = scale_float(b,-(sintC)d-10); loop { var cl_LF new_sum = sum + LF_to_LF(b/(cl_I)i,actuallen); // (+ sum (/ b i)) if (new_sum == sum) // = sum ? break; // ja -> Potenzreihe abbrechen sum = new_sum; b = cl_LF_shortenwith(b,eps); b = b*a; i = i+1; } } return scale_float(sum,k); // sum als Ergebnis, wegen Rekursion noch mal 2^k } else { var cl_LF z = y / (x+cl_float(1,x)); // Potenzreihe atanh(z) anwenden: var int i = 1; var cl_LF a = square(z); // a = x^2 var cl_LF b = cl_float(1,x); // b := (float 1 x) var cl_LF sum = cl_float(0,x); // sum := (float 0 x) if (0) { // naive1: // floating-point representation loop { var cl_LF new_sum = sum + b / (cl_I)i; // (+ sum (/ b i)) if (new_sum == sum) // = sum ? break; // ja -> Potenzreihe abbrechen sum = new_sum; b = b*a; i = i+2; } } else { // naive2: // floating-point representation with smooth precision reduction var cl_LF eps = scale_float(b,-(sintC)d-10); loop { var cl_LF new_sum = sum + LF_to_LF(b/(cl_I)i,actuallen); // (+ sum (/ b i)) if (new_sum == sum) // = sum ? break; // ja -> Potenzreihe abbrechen sum = new_sum; b = cl_LF_shortenwith(b,eps); b = b*a; i = i+2; } } return scale_float(sum*z,k+1); // 2*sum*z als Ergebnis, wegen Rekursion noch mal 2^k } }} // Bit complexity (N = length(x)): O(N^(1/2)*M(N)). const cl_F lnx_naive (const cl_F& x) { if (longfloatp(x)) { DeclareType(cl_LF,x); return lnx_naive(x); } var cl_F y = x-cl_float(1,x); if (zerop(y)) // y=0.0 -> y als Ergebnis return y; var uintC d = float_digits(x); var sintE e = float_exponent(y); if (e <= -(sintC)d) // e <= -d ? return y; // ja -> y als Ergebnis { Mutable(cl_F,x); var uintL k = 0; // Rekursionszähler k:=0 // Bei e <= -1-floor(sqrt(d)) kann die Potenzreihe angewandt werden. var sintL e_limit = -1-isqrtC(d); // -1-floor(sqrt(d)) while (e > e_limit) { // e > -1-floor(sqrt(d)) -> muß |y| verkleinern. x = sqrt(x); // x := (sqrt x) y = x-cl_float(1,x); // y := (- x 1) und e = float_exponent(y); // e neu berechnen k = k+1; // k:=k+1 } // Potenzreihe anwenden: var int i = 1; var cl_F sum = cl_float(0,x); // sum := (float 0 x) var cl_F a = -y; var cl_F b = y; loop { var cl_F new_sum = sum + b/(cl_I)i; // (+ sum (/ b i)) if (new_sum == sum) // = sum ? break; // ja -> Potenzreihe abbrechen sum = new_sum; b = b*a; i = i+1; } return scale_float(sum,k); // sum als Ergebnis, wegen Rekursion noch mal 2^k }} // Bit complexity (N = length(x)): O(N^(1/2)*M(N)). const cl_LF lnx_ratseries (const cl_LF& x) { // Method: // Based on the same ideas as expx_ratseries. // y := 0. // Loop // [x*exp(y) is invariant] // x' := x-1. If x' = 0, terminate the loop. // Choose approximation y' of log(x) = log(1+x'): // If |x'| >= 1/2, set y' = 1/2 * sign(x'). // If |x'| < 2^-n with n maximal, set // y' = truncate(x'*2^(2n))/2^(2n). // Set y := y + y' and x := x*exp(-y'). var uintC len = TheLfloat(x)->len; { Mutable(cl_LF,x); var cl_LF y = cl_I_to_LF(0,len); loop { var cl_LF x1 = x + cl_I_to_LF(-1,len); var cl_idecoded_float x1_ = integer_decode_float(x1); // x1 = (-1)^sign * 2^exponent * mantissa if (zerop(x1_.mantissa)) break; var uintC lm = integer_length(x1_.mantissa); var uintE me = cl_I_to_UE(- x1_.exponent); var cl_I p; var uintE lq; var bool last_step = false; if (lm >= me) { // |x'| >= 1/2 ? p = x1_.sign; // 1 or -1 lq = 1; } else { var uintE n = me - lm; // |x'| < 2^-n with n maximal // Set p to the first n bits of |x'|: if (lm > n) { p = x1_.mantissa >> (lm - n); lq = 2*n; } else { p = x1_.mantissa; lq = lm + n; } if (minusp(x1_.sign)) { p = -p; } // If 2*n >= lm = intDsize*len, then within our // precision exp(-y') = 1-y', (because |y'^2| < 2^-lm), // and we know a priori that the iteration will stop // after the next big multiplication. This saves one // big multiplication at the end. if (2*n >= lm) last_step = true; } y = y + scale_float(cl_I_to_LF(p,len),-(sintE)lq); if (last_step) break; x = x * cl_exp_aux(-p,lq,len); } return y; }} // Bit complexity (N = length(x)): O(log(N)^2*M(N)). // Timings of the above algorithms, on an i486 33 MHz, running Linux, // applied to x = sqrt(sqrt(2)) = 1.189... // N ln(1+y) ln(1+y) atanh z atanh z exp // naive1 naive2 naive1 naive2 ratseries // 10 0.019 0.016 0.013 0.012 0.036 // 25 0.077 0.056 0.057 0.040 0.087 // 50 0.30 0.21 0.23 0.15 0.21 // 100 1.24 0.81 0.92 0.59 0.61 // 250 8.8 5.8 6.3 4.3 2.77 // 500 43.9 28.8 29.7 21.0 9.8 // 1000 223 149 144 107 30 // ==> ratseries faster for N >= 110. (N = length before extended by the caller.) } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_eulerconst_var.cc0000644000000000000000000000203311201634737020350 0ustar // cl_F_eulerconst. // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "base/digitseq/cl_DS.h" #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "float/cl_F.h" namespace cln { cl_LF& cl_LF_eulerconst() { // Mantisse der Eulerschen Konstante : static const uintD eulerconst_mantisse [64/intDsize] = #include "cl_F_eulerconst_var.h" static cl_LF val = encode_LF_array(0,0,eulerconst_mantisse,64/intDsize); return val; } // Problem: If someone changes free_hook, the destructor of this // will call the new hook, passing it some pointer obtained by the old // malloc_hook. ?? const cl_SF& cl_SF_eulerconst() { static const cl_SF val = cl_LF_to_SF(cl_LF_eulerconst()); return val; } const cl_FF& cl_FF_eulerconst() { static const cl_FF val = cl_LF_to_FF(cl_LF_eulerconst()); return val; } const cl_DF& cl_DF_eulerconst() { static const cl_DF val = cl_LF_to_DF(cl_LF_eulerconst()); return val; } } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_roundpi.cc0000644000000000000000000000073311201634737017002 0ustar // cl_round_pi(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. namespace cln { const cl_F_div_t cl_round_pi (const cl_F& x) { if (float_exponent(x) <= 0) // Exponent <=0 -> |x|<1 -> |x/pi| < 1/2, also Division unnötig return cl_F_div_t(0,x); // Quotient 0, Rest x else // x durch pi (mit hinreichender Genauigkeit) dividieren return round2(x,pi(x)); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_pi_f.cc0000644000000000000000000000057611201634737016244 0ustar // pi(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/transcendental/cl_F_tran.h" namespace cln { const cl_F pi (float_format_t f) { floatformatcase((uintC)f , return cl_SF_pi(); , return cl_FF_pi(); , return cl_DF_pi(); , return pi(len); ); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_pi_def.cc0000644000000000000000000000057611201634737016555 0ustar // pi(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/transcendental/cl_F_tran.h" namespace cln { const cl_F pi (void) { floatformatcase(default_float_format , return cl_SF_pi(); , return cl_FF_pi(); , return cl_DF_pi(); , return pi(len); ); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_sin.cc0000644000000000000000000000534311201634737016115 0ustar // sin(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/transcendental/cl_F_tran.h" #include "float/cl_F.h" #include "cln/integer.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F sin (const cl_F& x) { // Methode: // Genauigkeit erhöhen, // (q,r) := (round x (float pi/2 x)), so daß |r|<=pi/4. // y:=(sin(r)/r)^2 errechnen. // Falls q gerade: // sin(r) berechnen: r*sqrt(y). // Falls q ungerade: // cos(r) berechnen: // e := Exponent aus (decode-float r), d := (float-digits r) // Bei r=0.0 oder e<=-d/2 liefere 1.0 // (denn bei e<=-d/2 ist r^2/2 < 2^(-d)/2 = 2^(-d-1), also // 1 >= cos(r) > 1-r^2/2 > 1-2^(-d-1), // also ist cos(r), auf d Bits gerundet, gleich 1.0). // Sonst sqrt(1-r^2*y). // Falls q == 2,3 mod 4, Vorzeichenwechsel. // Rechengenauigkeit erhöhen und durch pi/2 dividieren: var cl_F z; var cl_I q; if (longfloatp(x)) { DeclareType(cl_LF,x); if (TheLfloat(x)->len >= 2750) { var cl_F_div_t q_r = cl_round_pi2(extend(x,TheLfloat(x)->len+1)); q = q_r.quotient; var cl_LF r = The(cl_LF)(q_r.remainder); var cl_LF_cos_sin_t trig = cl_cossin_ratseries(r); if (evenp(q)) z = cl_float(trig.sin,x); else z = cl_float(trig.cos,x); } else { var cl_F_div_t q_r = cl_round_pi2(cl_F_extendsqrt(x)); q = q_r.quotient; var cl_LF r = The(cl_LF)(q_r.remainder); var cl_LF y = sinx_naive(r); // y := sin(r)^2 if (evenp(q)) { // sin(r) berechnen: z = cl_float(sqrt(y),x); if (minusp(r)) z = -z; } else { // cos(r) berechnen: if (zerop(r) || (float_exponent(r) <= (-(sintC)float_digits(r))>>1)) z = cl_float(1,x); // cos(r) = 1.0 else z = cl_float(sqrt(1 - y),x); // sqrt(1-y) } } } else { var cl_F_div_t q_r = cl_round_pi2(cl_F_extendsqrt(x)); q = q_r.quotient; var cl_F& r = q_r.remainder; var cl_F y = sinxbyx_naive(r); // y := (sin(r)/r)^2 if (evenp(q)) { // sin(r) berechnen: z = cl_float(r*sqrt(y),x); } else { // cos(r) berechnen: if (zerop(r) || (float_exponent(r) <= (-(sintC)float_digits(r))>>1)) z = cl_float(1,x); // cos(r) = 1.0 else z = cl_float(sqrt(1 - square(r)*y),x); // sqrt(1-r^2*y) } } // evtl. Vorzeichenwechsel: if (cl_I_to_UL(logand(q,2))==0) return z; else return -z; } // Timings of the two algorithms, on an i486 33 MHz, running Linux, // applied to x = sqrt(2)-1 = 0.414... // N naive ratseries // 10 0.010 0.048 // 25 0.035 0.119 // 50 0.12 0.37 // 100 0.44 1.09 // 250 2.8 5.5 // 500 11.6 19.4 // 1000 48 64 // 2500 243 261 // ==> ratseries faster for N >= 2750. } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_tanh.cc0000644000000000000000000000053611201634737016255 0ustar // tanh(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. namespace cln { CL_INLINE const cl_F CL_INLINE_DECL(tanh) (const cl_F& x) { // Methode: // (/ (sinh x) (cosh x)) var cosh_sinh_t hyp = cosh_sinh(x); return The(cl_F)(hyp.sinh) / The(cl_F)(hyp.cosh); } } // namespace cln cln-1.3.3/src/float/transcendental/Makefile.devel0000644000000000000000000000060011201634737016617 0ustar # This is the developer's makefile, not the user's makefile. # Don't use it unless you know exactly what you do! SRCDIR = ../.. include $(SRCDIR)/Makerules.devel DATA_HEADERS = cl_F_ln2_var.h cl_F_ln10_var.h cl_F_pi_var.h cl_F_exp1_var.h cl_F_eulerconst_var.h cl_F_catalanconst_var.h all : $(DATA_HEADERS) $(DATA_HEADERS) : % : %.in $(DIGIT_HEADER) $(DIGIT_HEADER) < $< > $@ cln-1.3.3/src/float/transcendental/cl_F_catalanconst_var.h0000644000000000000000000000141211201634737020501 0ustar { #if CL_DS_BIG_ENDIAN_P #if (intDsize==8) D1(0xEA), D1(0x7C), D1(0xB8), D1(0x9F), D1(0x40), D1(0x9A), D1(0xE8), D1(0x45) #endif #if (intDsize==16) D2(0xEA,0x7C), D2(0xB8,0x9F), D2(0x40,0x9A), D2(0xE8,0x45) #endif #if (intDsize==32) D4(0xEA,0x7C,0xB8,0x9F), D4(0x40,0x9A,0xE8,0x45) #endif #if (intDsize==64) D8(0xEA,0x7C,0xB8,0x9F,0x40,0x9A,0xE8,0x45) #endif #else #if (intDsize==8) D1(0x45), D1(0xE8), D1(0x9A), D1(0x40), D1(0x9F), D1(0xB8), D1(0x7C), D1(0xEA) #endif #if (intDsize==16) D2(0xE8,0x45), D2(0x40,0x9A), D2(0xB8,0x9F), D2(0xEA,0x7C) #endif #if (intDsize==32) D4(0x40,0x9A,0xE8,0x45), D4(0xEA,0x7C,0xB8,0x9F) #endif #if (intDsize==64) D8(0xEA,0x7C,0xB8,0x9F,0x40,0x9A,0xE8,0x45) #endif #endif } ; cln-1.3.3/src/float/transcendental/cl_LF_atan_recip.cc0000644000000000000000000000273411201634737017546 0ustar // cl_atan_recip(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "cln/integer.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" #include "float/transcendental/cl_LF_tran.h" #undef floor #include #define floor cln_floor namespace cln { // Method: // See examples/atan_recip.cc for a comparison of the algorithms. // Here we take algorithm 2d. It's the fastest throughout the range. const cl_LF cl_atan_recip (cl_I m, uintC len) { var uintC actuallen = len + 1; var cl_I m2 = m*m+1; var uintC N = (uintC)(0.69314718*intDsize*actuallen/::log(double_approx(m2))) + 1; struct rational_series_stream : cl_pq_series_stream { var uintC n; var cl_I m; var cl_I m2; static cl_pq_series_term computenext (cl_pq_series_stream& thisss) { var rational_series_stream& thiss = (rational_series_stream&)thisss; var uintC n = thiss.n; var cl_pq_series_term result; if (n==0) { result.p = thiss.m; result.q = thiss.m2; } else { result.p = 2*n; result.q = (2*n+1)*thiss.m2; } thiss.n = n+1; return result; } rational_series_stream(const cl_I& m_, const cl_I& m2_) : cl_pq_series_stream (rational_series_stream::computenext), n(0), m(m_), m2(m2_) {} } series(m,m2); var cl_LF result = eval_rational_series(N,series,actuallen); return shorten(result,len); } // Bit complexity (N = len): O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_ln.cc0000644000000000000000000000315511201634737015734 0ustar // ln(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/transcendental/cl_F_tran.h" #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "cln/integer.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F ln (const cl_F& x) { // Methode: // d := (float-digits x), // Genauigkeit um sqrt(d)+max(integer-length(e)) Bits erhöhen, // (m,e) := (decode-float x), so daß 1/2 <= m < 1. // m<2/3 -> m:=2m, e:=e-1, so daß 2/3 <= m <= 4/3. // ln(m) errechnen, ln(x)=ln(m)+e*ln(2) als Ergebnis. // Rechengenauigkeit erhöhen und m,e,s bestimmen: if (longfloatp(x) && (TheLfloat(x)->len >= 110)) { DeclareType(cl_LF,x); var decoded_lfloat m_e_s = decode_float(extend(x,TheLfloat(x)->len+1)); var cl_LF& m = m_e_s.mantissa; var cl_I& e = m_e_s.exponent; if (m < make_SF(0,0+SF_exp_mid,floor(bit(SF_mant_len+2),3))) { // Short-Float 2/3 m = scale_float(m,1); // m verdoppeln e = minus1(e); // e decrementieren } var cl_F res = lnx_ratseries(m); if (!zerop(e)) res = res + cl_float(e,m)*cl_ln2(m); // ln(m)+e*ln(2) return cl_float(res,x); } else { var decoded_float m_e_s = decode_float(cl_F_extendsqrtx(x)); var cl_F& m = m_e_s.mantissa; var cl_I& e = m_e_s.exponent; if (m < make_SF(0,0+SF_exp_mid,floor(bit(SF_mant_len+2),3))) { // Short-Float 2/3 m = scale_float(m,1); // m verdoppeln e = minus1(e); // e decrementieren } var cl_F res = lnx_naive(m); if (!zerop(e)) res = res + cl_float(e,m)*cl_ln2(m); // ln(m)+e*ln(2) return cl_float(res,x); } } } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_ratsumseries_pqd_aux.cc0000644000000000000000000001443211201634737021706 0ustar // eval_pqd_series_aux(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_LF_tran.h" // Implementation. #include "cln/integer.h" #include "cln/real.h" #include "cln/exception.h" namespace cln { void eval_pqd_series_aux (uintC N, cl_pqd_series_term* args, cl_pqd_series_result& Z, bool rightmost) { // N = N2-N1 switch (N) { case 0: throw runtime_exception(); break; case 1: if (!rightmost) { Z.P = args[0].p; } Z.Q = args[0].q; Z.T = args[0].p; if (!rightmost) { Z.C = 1; } Z.D = args[0].d; Z.V = args[0].p; break; case 2: { var cl_I p01 = args[0].p * args[1].p; if (!rightmost) { Z.P = p01; } Z.Q = args[0].q * args[1].q; var cl_I p0q1 = args[0].p * args[1].q + p01; Z.T = p0q1; if (!rightmost) { Z.C = args[1].d + args[0].d; } Z.D = args[0].d * args[1].d; Z.V = args[1].d * p0q1 + args[0].d * p01; break; } case 3: { var cl_I p01 = args[0].p * args[1].p; var cl_I p012 = p01 * args[2].p; if (!rightmost) { Z.P = p012; } Z.Q = args[0].q * args[1].q * args[2].q; var cl_I p0q1 = args[0].p * args[1].q + p01; Z.T = args[2].q * p0q1 + p012; var cl_I d01 = args[0].d * args[1].d; if (!rightmost) { Z.C = (args[1].d + args[0].d) * args[2].d + d01; } Z.D = d01 * args[2].d; Z.V = args[2].d * (args[2].q * (args[1].d * p0q1 + args[0].d * p01) + (args[1].d + args[0].d) * p012) + d01 * p012; break; } default: { var uintC Nm = N/2; // midpoint // Compute left part. var cl_pqd_series_result L; eval_pqd_series_aux(Nm,args+0,L,false); // Compute right part. var cl_pqd_series_result R; eval_pqd_series_aux(N-Nm,args+Nm,R,rightmost); // Put together partial results. if (!rightmost) { Z.P = L.P * R.P; } Z.Q = L.Q * R.Q; // Z.S = L.S + L.P/L.Q*R.S; var cl_I tmp = L.P * R.T; Z.T = R.Q * L.T + tmp; if (!rightmost) { Z.C = L.C * R.D + L.D * R.C; } Z.D = L.D * R.D; // Z.U = L.U + L.C/L.D * L.P/L.Q * R.S + L.P/L.Q * R.U; // Z.V = R.D * R.Q * L.V + R.D * L.C * L.P * R.T + L.D * L.P * R.V; Z.V = R.D * (R.Q * L.V + L.C * tmp) + L.D * L.P * R.V; break; } } } void eval_pqd_series_aux (uintC N, cl_pqd_series_stream& args, cl_pqd_series_result& Z, bool rightmost) { // N = N2-N1 switch (N) { case 0: throw runtime_exception(); break; case 1: { var cl_pqd_series_term v0 = args.next(); // [N1] if (!rightmost) { Z.P = v0.p; } Z.Q = v0.q; Z.T = v0.p; if (!rightmost) { Z.C = 1; } Z.D = v0.d; Z.V = v0.p; break; } case 2: { var cl_pqd_series_term v0 = args.next(); // [N1] var cl_pqd_series_term v1 = args.next(); // [N1+1] var cl_I p01 = v0.p * v1.p; if (!rightmost) { Z.P = p01; } Z.Q = v0.q * v1.q; var cl_I p0q1 = v0.p * v1.q + p01; Z.T = p0q1; if (!rightmost) { Z.C = v1.d + v0.d; } Z.D = v0.d * v1.d; Z.V = v1.d * p0q1 + v0.d * p01; break; } case 3: { var cl_pqd_series_term v0 = args.next(); // [N1] var cl_pqd_series_term v1 = args.next(); // [N1+1] var cl_pqd_series_term v2 = args.next(); // [N1+2] var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; if (!rightmost) { Z.P = p012; } Z.Q = v0.q * v1.q * v2.q; var cl_I p0q1 = v0.p * v1.q + p01; Z.T = v2.q * p0q1 + p012; var cl_I d01 = v0.d * v1.d; if (!rightmost) { Z.C = (v1.d + v0.d) * v2.d + d01; } Z.D = d01 * v2.d; Z.V = v2.d * (v2.q * (v1.d * p0q1 + v0.d * p01) + (v1.d + v0.d) * p012) + d01 * p012; break; } default: { var uintC Nm = N/2; // midpoint // Compute left part. var cl_pqd_series_result L; eval_pqd_series_aux(Nm,args,L,false); // Compute right part. var cl_pqd_series_result R; eval_pqd_series_aux(N-Nm,args,R,rightmost); // Put together partial results. if (!rightmost) { Z.P = L.P * R.P; } Z.Q = L.Q * R.Q; // Z.S = L.S + L.P/L.Q*R.S; var cl_I tmp = L.P * R.T; Z.T = R.Q * L.T + tmp; if (!rightmost) { Z.C = L.C * R.D + L.D * R.C; } Z.D = L.D * R.D; // Z.U = L.U + L.C/L.D * L.P/L.Q * R.S + L.P/L.Q * R.U; // Z.V = R.D * R.Q * L.V + R.D * L.C * L.P * R.T + L.D * L.P * R.V; Z.V = R.D * (R.Q * L.V + L.C * tmp) + L.D * L.P * R.V; break; } } } void eval_pqd_series_aux (uintC N, cl_pqd_series_stream& args, cl_pqd_series_result& Z, uintC trunclen, bool rightmost) { // N = N2-N1 switch (N) { case 0: throw runtime_exception(); break; case 1: { var cl_pqd_series_term v0 = args.next(); // [N1] if (!rightmost) { Z.P = v0.p; } Z.Q = v0.q; Z.T = v0.p; if (!rightmost) { Z.C = 1; } Z.D = v0.d; Z.V = v0.p; break; } case 2: { var cl_pqd_series_term v0 = args.next(); // [N1] var cl_pqd_series_term v1 = args.next(); // [N1+1] var cl_I p01 = v0.p * v1.p; if (!rightmost) { Z.P = p01; } Z.Q = v0.q * v1.q; var cl_I p0q1 = v0.p * v1.q + p01; Z.T = p0q1; if (!rightmost) { Z.C = v1.d + v0.d; } Z.D = v0.d * v1.d; Z.V = v1.d * p0q1 + v0.d * p01; break; } case 3: { var cl_pqd_series_term v0 = args.next(); // [N1] var cl_pqd_series_term v1 = args.next(); // [N1+1] var cl_pqd_series_term v2 = args.next(); // [N1+2] var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; if (!rightmost) { Z.P = p012; } Z.Q = v0.q * v1.q * v2.q; var cl_I p0q1 = v0.p * v1.q + p01; Z.T = v2.q * p0q1 + p012; var cl_I d01 = v0.d * v1.d; if (!rightmost) { Z.C = (v1.d + v0.d) * v2.d + d01; } Z.D = d01 * v2.d; Z.V = v2.d * (v2.q * (v1.d * p0q1 + v0.d * p01) + (v1.d + v0.d) * p012) + d01 * p012; break; } default: { var uintC Nm = N/2; // midpoint // Compute left part. var cl_pqd_series_result L; eval_pqd_series_aux(Nm,args,L,trunclen,false); // Compute right part. var cl_pqd_series_result R; eval_pqd_series_aux(N-Nm,args,R,trunclen,rightmost); // Put together partial results. if (!rightmost) { Z.P = L.P * R.P; truncate_precision(Z.P,trunclen); } Z.Q = L.Q * R.Q; truncate_precision(Z.Q,trunclen); // Z.S = L.S + L.P/L.Q*R.S; var cl_R tmp = L.P * R.T; Z.T = R.Q * L.T + tmp; truncate_precision(Z.T,trunclen); if (!rightmost) { Z.C = L.C * R.D + L.D * R.C; truncate_precision(Z.C,trunclen); } Z.D = L.D * R.D; truncate_precision(Z.D,trunclen); // Z.U = L.U + L.C/L.D * L.P/L.Q * R.S + L.P/L.Q * R.U; // Z.V = R.D * R.Q * L.V + R.D * L.C * L.P * R.T + L.D * L.P * R.V; Z.V = R.D * (R.Q * L.V + L.C * tmp) + L.D * L.P * R.V; truncate_precision(Z.V,trunclen); break; } } } } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_ln2_f.cc0000644000000000000000000000056611201634737016326 0ustar // cl_ln2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "float/cl_F.h" namespace cln { const cl_F cl_ln2 (float_format_t f) { floatformatcase((uintC)f , return cl_SF_ln2(); , return cl_FF_ln2(); , return cl_DF_ln2(); , return cl_ln2(len); ); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_pi_var.cc0000644000000000000000000000173611201634737016606 0ustar // cl_SF_pi(), cl_FF_pi(), cl_DF_pi(), cl_LF_pi(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "base/digitseq/cl_DS.h" #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "float/cl_F.h" namespace cln { cl_LF& cl_LF_pi() { // Mantisse von pi : static const uintD pi_mantisse [2048/intDsize] = #include "cl_F_pi_var.h" static cl_LF val = encode_LF_array(0,2,pi_mantisse,2048/intDsize); return val; } // Problem: If someone changes free_hook, the destructor of this // will call the new hook, passing it some pointer obtained by the old // malloc_hook. ?? const cl_SF& cl_SF_pi() { static const cl_SF val = cl_LF_to_SF(cl_LF_pi()); return val; } const cl_DF& cl_DF_pi() { static const cl_DF val = cl_LF_to_DF(cl_LF_pi()); return val; } const cl_FF& cl_FF_pi() { static const cl_FF val = cl_LF_to_FF(cl_LF_pi()); return val; } } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_ratseries_pab.cc0000644000000000000000000000530611201634737020262 0ustar // eval_rational_series(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_LF_tran.h" // Implementation. #include "cln/lfloat.h" #include "cln/integer.h" #include "cln/exception.h" #include "float/lfloat/cl_LF.h" namespace cln { // Subroutine. // Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n))) // and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1) // and T = B*Q*S (all integers). On entry N1 < N2. // P will not be computed if a NULL pointer is passed. static void eval_pab_series_aux (uintC N1, uintC N2, const cl_pab_series& args, cl_I* P, cl_I* B, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: if (P) { *P = args.pv[N1]; } *B = args.bv[N1]; *T = args.av[N1] * args.pv[N1]; break; case 2: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; if (P) { *P = p01; } *B = args.bv[N1] * args.bv[N1+1]; *T = args.bv[N1+1] * args.av[N1] * args.pv[N1] + args.bv[N1] * args.av[N1+1] * p01; break; } case 3: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; if (P) { *P = p012; } var cl_I b12 = args.bv[N1+1] * args.bv[N1+2]; *B = args.bv[N1] * b12; *T = b12 * args.av[N1] * args.pv[N1] + args.bv[N1] * (args.bv[N1+2] * args.av[N1+1] * p01 + args.bv[N1+1] * args.av[N1+2] * p012); break; } case 4: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; var cl_I p0123 = p012 * args.pv[N1+3]; if (P) { *P = p0123; } var cl_I b01 = args.bv[N1] * args.bv[N1+1]; var cl_I b23 = args.bv[N1+2] * args.bv[N1+3]; *B = b01 * b23; *T = b23 * (args.bv[N1+1] * args.av[N1] * args.pv[N1] + args.bv[N1] * args.av[N1+1] * p01) + b01 * (args.bv[N1+3] * args.av[N1+2] * p012 + args.bv[N1+2] * args.av[N1+3] * p0123); break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LP, LB, LT; eval_pab_series_aux(N1,Nm,args,&LP,&LB,<); // Compute right part. var cl_I RP, RB, RT; eval_pab_series_aux(Nm,N2,args,(P?&RP:(cl_I*)0),&RB,&RT); // Put together partial results. if (P) { *P = LP*RP; } *B = LB*RB; // S = LS + LP * RS, so T = RB*LT + LB*LP*RT. *T = RB*LT + LB*LP*RT; break; } } } const cl_LF eval_rational_series (uintC N, const cl_pab_series& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I B, T; eval_pab_series_aux(0,N,args,NULL,&B,&T); return cl_I_to_LF(T,len) / cl_I_to_LF(B,len); } // Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))): // O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_tran.h0000644000000000000000000001335011201634737016127 0ustar // Internals for transcendental functions on floating-point numbers #ifndef _CL_F_TRAN_H #define _CL_F_TRAN_H #include "cln/number.h" #include "cln/float.h" namespace cln { // pi. extern const cl_SF& cl_SF_pi(); extern const cl_FF& cl_FF_pi(); extern const cl_DF& cl_DF_pi(); extern cl_LF& cl_LF_pi(); // as long as it has ever been computed extern const cl_LF pi (uintC len); // computes it even further // cl_exp_aux(p,lq,len) liefert die Zahl exp(p/2^lq) mit len Digits. // 0 < |p| < 2^lq. // Es sollte |p|^2 < 2^lq sein, sonst ist das nicht effizient. extern const cl_LF cl_exp_aux (const cl_I& p, uintE lq, uintC len); // cl_cossin_aux(p,lq,len) liefert cos(p/2^lq) und sin(p/2^lq) mit len Digits. // 0 < |p| < 2^lq. // Es sollte |p|^2 < 2^lq sein, sonst ist das nicht effizient. struct cl_LF_cos_sin_t { cl_LF cos; cl_LF sin; // Constructor: cl_LF_cos_sin_t (const cl_LF& u, const cl_LF& v) : cos (u), sin (v) {} cl_LF_cos_sin_t () {} }; extern const cl_LF_cos_sin_t cl_cossin_aux (const cl_I& p, uintE lq, uintC len); // cl_coshsinh_aux(p,lq,len) liefert cosh(p/2^lq) und sinh(p/2^lq) mit len Digits. // 0 < |p| < 2^lq. // Es sollte |p|^2 < 2^lq sein, sonst ist das nicht effizient. struct cl_LF_cosh_sinh_t { cl_LF cosh; cl_LF sinh; // Constructor: cl_LF_cosh_sinh_t (const cl_LF& u, const cl_LF& v) : cosh (u), sinh (v) {} cl_LF_cosh_sinh_t () {} }; extern const cl_LF_cosh_sinh_t cl_coshsinh_aux (const cl_I& p, uintE lq, uintC len); // atanhx(x) liefert zu einem Float x (betragsmäßig <1/2) atanh(x) als Float. extern const cl_F atanhx (const cl_F& x); // atanx(x) liefert zu einem Float x (betragsmäßig <=1) atan(x) als Float. extern const cl_F atanx (const cl_F& x); // sinx(x) liefert zu einem Float x (betragsmäßig <1) sin(x)^2 als Float. // sinxbyx(x) liefert zu einem Float x (betragsmäßig <1) (sin(x)/x)^2 als Float. extern const cl_LF sinx_naive (const cl_LF& x); // requires cl_F_extendsqrt extern const cl_F sinxbyx_naive (const cl_F& x); // requires cl_F_extendsqrt // (cos(x),sin(x)) für ein Long-Float x (betragsmäßig <1). extern const cl_LF_cos_sin_t cl_cossin_ratseries (const cl_LF& x); // requires extend by 1 // sinhx(x) liefert zu einem Float x (betragsmäßig <1) sinh(x)^2 als Float. // sinhxbyx(x) liefert zu einem Float x (betragsmäßig <1) (sinh(x)/x)^2 als Float. extern const cl_LF sinhx_naive (const cl_LF& x); // requires cl_F_extendsqrt extern const cl_F sinhxbyx_naive (const cl_F& x); // requires cl_F_extendsqrt // (cosh(x),sinh(x)) für ein Long-Float x (betragsmäßig <1). extern const cl_LF_cosh_sinh_t cl_coshsinh_ratseries (const cl_LF& x); // requires extend by 1 // cl_round_pi(x) dividiert ein Float x mit Rest durch pi. // Beide Werte von (round x (float pi x)). extern const cl_F_div_t cl_round_pi (const cl_F& x); // cl_round_pi2(x) dividiert ein Float x mit Rest durch pi/2. // Beide Werte von (round x (float pi/2 x)). extern const cl_F_div_t cl_round_pi2 (const cl_F& x); // cl_atan_recip(m,len) liefert arctan(1/m) mit len Digits. extern const cl_LF cl_atan_recip (cl_I m, uintC len); // lnx(x) liefert zu einem Float x (>=1/2, <=2) ln(x) als Float. extern const cl_F lnx_naive (const cl_F& x); // requires cl_F_extendsqrtx extern const cl_LF lnx_naive (const cl_LF& x); // requires cl_F_extendsqrtx extern const cl_LF lnx_ratseries (const cl_LF& x); // requires extend by 1 // cl_atanh_recip(m,len) liefert artanh(1/m) mit len Digits. extern const cl_LF cl_atanh_recip (cl_I m, uintC len); // ln(2). extern const cl_SF& cl_SF_ln2(); extern const cl_FF& cl_FF_ln2(); extern const cl_DF& cl_DF_ln2(); extern cl_LF& cl_LF_ln2(); // as long as it has ever been computed extern const cl_LF cl_ln2 (uintC len); // computes it even further // cl_ln2(y) liefert die Zahl ln(2) im selben Float-Format wie y. // > y: ein Float extern const cl_F cl_ln2 (const cl_F& y); // cl_ln2(y) liefert die Zahl ln(2) im Float-Format f. // > f: eine Float-Format-Spezifikation extern const cl_F cl_ln2 (float_format_t f); // ln(10). extern const cl_SF& cl_SF_ln10(); extern const cl_FF& cl_FF_ln10(); extern const cl_DF& cl_DF_ln10(); extern cl_LF& cl_LF_ln10(); // as long as it has ever been computed extern const cl_LF cl_ln10 (uintC len); // computes it even further // cl_ln10(y) liefert die Zahl ln(10) im selben Float-Format wie y. // > y: ein Float extern const cl_F cl_ln10 (const cl_F& y); // cl_ln10(y) liefert die Zahl ln(10) im Float-Format f. // > f: eine Float-Format-Spezifikation extern const cl_F cl_ln10 (float_format_t f); // e = exp(1). extern const cl_SF& cl_SF_exp1(); extern const cl_FF& cl_FF_exp1(); extern const cl_DF& cl_DF_exp1(); extern cl_LF& cl_LF_exp1(); // as long as it has ever been computed extern const cl_LF exp1 (uintC len); // computes it even further // expx(x) liefert zu einem Float x (betragsmäßig <1) exp(x) als Float. extern const cl_F expx_naive (const cl_F& x); // requires cl_F_extendsqrtx extern const cl_LF expx_naive (const cl_LF& x); // requires cl_F_extendsqrtx extern const cl_LF expx_ratseries (const cl_LF& x); // requires extend by 1 // Eulersche Konstante. extern const cl_SF& cl_SF_eulerconst(); extern const cl_FF& cl_FF_eulerconst(); extern const cl_DF& cl_DF_eulerconst(); extern cl_LF& cl_LF_eulerconst(); // as long as it has ever been computed extern const cl_LF eulerconst (uintC len); // computes it even further // Catalansche Konstante. extern const cl_SF& cl_SF_catalanconst(); extern const cl_FF& cl_FF_catalanconst(); extern const cl_DF& cl_DF_catalanconst(); extern cl_LF& cl_LF_catalanconst(); // as long as it has ever been computed extern const cl_LF catalanconst (uintC len); // computes it even further // Zeta-Funktion für s>1 ganzzahlig. extern const cl_LF zeta (int s, uintC len); // Zeta-Funktion für s=3. extern const cl_LF zeta3 (uintC len); } // namespace cln #endif /* _CL_F_TRAN_H */ cln-1.3.3/src/float/transcendental/cl_LF_zeta_int.cc0000644000000000000000000001516111201634737017254 0ustar // zeta(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "cln/lfloat.h" #include "float/transcendental/cl_LF_tran.h" #include "float/lfloat/cl_LF.h" #include "cln/integer.h" #include "cln/exception.h" #include "base/cl_alloca.h" namespace cln { const cl_LF compute_zeta_exp (int s, uintC len) { // Method: // zeta(s) = 1/(1-2^(1-s)) sum(n=0..infty, (-1)^n/(n+1)^s), // with convergence acceleration through exp(x), and evaluated // using the binary-splitting algorithm. var uintC actuallen = len+2; // 2 guard digits var uintC x = (uintC)(0.693148*intDsize*actuallen)+1; var uintC N = (uintC)(2.718281828*x); CL_ALLOCA_STACK; var cl_pqd_series_term* args = (cl_pqd_series_term*) cl_alloca(N*sizeof(cl_pqd_series_term)); var uintC n; for (n = 0; n < N; n++) { if (n==0) { init1(cl_I, args[n].p) (1); init1(cl_I, args[n].q) (1); } else { init1(cl_I, args[n].p) (x); init1(cl_I, args[n].q) (n); } init1(cl_I, args[n].d) (evenp(n) ? expt_pos(n+1,s) : -expt_pos(n+1,s)); } var cl_LF result = eval_pqd_series(N,args,actuallen); for (n = 0; n < N; n++) { args[n].p.~cl_I(); args[n].q.~cl_I(); args[n].d.~cl_I(); } result = shorten(result,len); // verkürzen und fertig // Zum Schluss mit 2^(s-1)/(2^(s-1)-1) multiplizieren: return scale_float(result,s-1) / (ash(1,s-1)-1); } // Bit complexity (N = len): O(log(N)^2*M(N)). const cl_LF compute_zeta_cvz1 (int s, uintC len) { // Method: // zeta(s) = 1/(1-2^(1-s)) sum(n=0..infty, (-1)^n/(n+1)^s), // with Cohen-Villegas-Zagier convergence acceleration. var uintC actuallen = len+2; // 2 guard digits var uintC N = (uintC)(0.39321985*intDsize*actuallen)+1; var cl_I fterm = 2*(cl_I)N*(cl_I)N; var cl_I fsum = fterm; var cl_LF gterm = cl_I_to_LF(fterm,actuallen); var cl_LF gsum = gterm; var uintC n; // After n loops // fterm = (N+n)!N/(2n+2)!(N-n-1)!*2^(2n+2), fsum = ... + fterm, // gterm = S_n*fterm, gsum = ... + gterm. for (n = 1; n < N; n++) { fterm = exquopos(fterm*(2*(cl_I)(N-n)*(cl_I)(N+n)),(cl_I)(2*n+1)*(cl_I)(n+1)); fsum = fsum + fterm; gterm = The(cl_LF)(gterm*(2*(cl_I)(N-n)*(cl_I)(N+n)))/((cl_I)(2*n+1)*(cl_I)(n+1)); if (evenp(n)) gterm = gterm + cl_I_to_LF(fterm,actuallen)/expt_pos(n+1,s); else gterm = gterm - cl_I_to_LF(fterm,actuallen)/expt_pos(n+1,s); gsum = gsum + gterm; } var cl_LF result = gsum/cl_I_to_LF(1+fsum,actuallen); result = shorten(result,len); // verkürzen und fertig // Zum Schluss mit 2^(s-1)/(2^(s-1)-1) multiplizieren: return scale_float(result,s-1) / (ash(1,s-1)-1); } // Bit complexity (N = len): O(N^2). const cl_LF compute_zeta_cvz2 (int s, uintC len) { // Method: // zeta(s) = 1/(1-2^(1-s)) sum(n=0..infty, (-1)^n/(n+1)^s), // with Cohen-Villegas-Zagier convergence acceleration, and // evaluated using the binary splitting algorithm with truncation. var uintC actuallen = len+2; // 2 guard digits var uintC N = (uintC)(0.39321985*intDsize*actuallen)+1; struct rational_series_stream : cl_pqd_series_stream { uintC n; int s; uintC N; static cl_pqd_series_term computenext (cl_pqd_series_stream& thisss) { var rational_series_stream& thiss = (rational_series_stream&)thisss; var uintC n = thiss.n; var uintC s = thiss.s; var uintC N = thiss.N; var cl_pqd_series_term result; result.p = 2*(cl_I)(N-n)*(cl_I)(N+n); result.q = (cl_I)(2*n+1)*(cl_I)(n+1); result.d = evenp(n) ? expt_pos(n+1,s) : -expt_pos(n+1,s); thiss.n = n+1; return result; } rational_series_stream (int s_, uintC N_) : cl_pqd_series_stream (rational_series_stream::computenext), n (0), s (s_), N (N_) {} } series(s,N); var cl_pqd_series_result sums; eval_pqd_series_aux(N,series,sums,actuallen); // Here we need U/(1+S) = V/D(Q+T). var cl_LF result = cl_I_to_LF(sums.V,actuallen) / The(cl_LF)(sums.D * cl_I_to_LF(sums.Q+sums.T,actuallen)); result = shorten(result,len); // verkürzen und fertig // Zum Schluss mit 2^(s-1)/(2^(s-1)-1) multiplizieren: return scale_float(result,s-1) / (ash(1,s-1)-1); } // Bit complexity (N = len): O(log(N)^2*M(N)). // Timings of the above algorithm in seconds, on a P-4, 3GHz, running Linux. // s 5 15 // N sum_exp sum_cvz1 sum_cvz2 sum_exp sum_cvz1 sum_cvz2 // 125 0.60 0.04 0.06 1.88 0.04 0.20 // 250 1.60 0.13 0.19 4.82 0.15 0.58 // 500 4.3 0.48 0.60 12.2 0.55 1.67 // 1000 11.0 1.87 1.63 31.7 2.11 4.60 // 2000 28.0 7.4 4.23 111 8.2 11.3 // 4000 70.2 30.6 10.6 50 44 // 8000 142 26.8 169 75 // asymp. FAST N^2 FAST FAST N^2 FAST // // s 35 75 // N sum_exp sum_cvz1 sum_cvz2 sum_exp sum_cvz1 sum_cvz2 // 125 4.70 0.05 0.53 11.3 0.07 1.35 // 250 12.5 0.19 1.62 28.7 0.25 3.74 // 500 31.3 0.69 4.40 70.2 0.96 10.2 // 1000 88.8 2.70 11.4 191 3.76 25.4 // 2000 10.9 28.9 15.6 64.3 // 4000 46 73 64.4 170 // 8000 215 178 295 397 // 16000 898 419 1290 972 // asymp. FAST N^2 FAST FAST N^2 FAST // // The break-even point between cvz1 and cvz2 seems to grow linearly with s. // Timings of the above algorithm, on an i486 33 MHz, running Linux. // s 5 15 // N sum_exp sum_cvz1 sum_cvz2 sum_exp sum_cvz1 sum_cvz2 // 10 2.04 0.09 0.17 8.0 0.11 0.49 // 25 8.6 0.30 0.76 30.6 0.37 2.36 // 50 25.1 0.92 2.49 91.1 1.15 7.9 // 100 2.97 8.46 3.75 24.5 // 250 16.7 36.5 21.7 108 // 500 64.2 106 85.3 295 // 1000 263 285 342 788 // asymp. FAST N^2 FAST FAST N^2 FAST // // The break-even point between cvz1 and cvz2 seems to grow linearly with s. const cl_LF zeta (int s, uintC len) { if (!(s > 1)) throw runtime_exception("zeta(s) with illegal s<2."); if (s==3) return zeta3(len); if (len < 220*(uintC)s) return compute_zeta_cvz1(s,len); else return compute_zeta_cvz2(s,len); } // Bit complexity (N = len): O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_ln10_var.cc0000644000000000000000000000171411201634737016744 0ustar // cl_F_ln10. // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "base/digitseq/cl_DS.h" #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "float/cl_F.h" namespace cln { cl_LF& cl_LF_ln10() { // Mantisse von ln(10) : static const uintD ln10_mantisse [64/intDsize] = #include "cl_F_ln10_var.h" static cl_LF val = encode_LF_array(0,2,ln10_mantisse,64/intDsize); return val; } // Problem: If someone changes free_hook, the destructor of this // will call the new hook, passing it some pointer obtained by the old // malloc_hook. ?? const cl_SF& cl_SF_ln10() { static const cl_SF val = cl_LF_to_SF(cl_LF_ln10()); return val; } const cl_FF& cl_FF_ln10() { static const cl_FF val = cl_LF_to_FF(cl_LF_ln10()); return val; } const cl_DF& cl_DF_ln10() { static const cl_DF val = cl_LF_to_DF(cl_LF_ln10()); return val; } } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_ratseries_qa.cc0000644000000000000000000000410011201634737020110 0ustar // eval_rational_series(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_LF_tran.h" // Implementation. #include "cln/lfloat.h" #include "cln/integer.h" #include "cln/exception.h" #include "float/lfloat/cl_LF.h" namespace cln { // Subroutine. // Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n))) // and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1) // and T = B*Q*S (all integers). On entry N1 < N2. // P will not be computed if a NULL pointer is passed. static void eval_qa_series_aux (uintC N1, uintC N2, const cl_qa_series& args, cl_I* Q, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: *Q = args.qv[N1]; *T = args.av[N1]; break; case 2: { *Q = args.qv[N1] * args.qv[N1+1]; *T = args.qv[N1+1] * args.av[N1] + args.av[N1+1]; break; } case 3: { var cl_I q12 = args.qv[N1+1] * args.qv[N1+2]; *Q = args.qv[N1] * q12; *T = q12 * args.av[N1] + args.qv[N1+2] * args.av[N1+1] + args.av[N1+2]; break; } case 4: { var cl_I q23 = args.qv[N1+2] * args.qv[N1+3]; var cl_I q123 = args.qv[N1+1] * q23; *Q = args.qv[N1] * q123; *T = q123 * args.av[N1] + q23 * args.av[N1+1] + args.qv[N1+3] * args.av[N1+2] + args.av[N1+3]; break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LQ, LT; eval_qa_series_aux(N1,Nm,args,&LQ,<); // Compute right part. var cl_I RQ, RT; eval_qa_series_aux(Nm,N2,args,&RQ,&RT); // Put together partial results. *Q = LQ*RQ; // S = LS + 1/LQ * RS, so T = RQ*LT + RT. *T = RQ*LT + RT; break; } } } template<> const cl_LF eval_rational_series (uintC N, const cl_qa_series& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I Q, T; eval_qa_series_aux(0,N,args,&Q,&T); return cl_I_to_LF(T,len) / cl_I_to_LF(Q,len); } // Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))): // O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_eulerconst_f.cc0000644000000000000000000000065611201634737020016 0ustar // eulerconst(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/transcendental/cl_F_tran.h" namespace cln { const cl_F eulerconst (float_format_t f) { floatformatcase((uintC)f , return cl_SF_eulerconst(); , return cl_FF_eulerconst(); , return cl_DF_eulerconst(); , return eulerconst(len); ); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_sinx.cc0000644000000000000000000001651611201634737016311 0ustar // sinxbyx(), sinx(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "cln/float.h" #include "base/cl_low.h" #include "float/cl_F.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" #include "cln/integer.h" #include "base/cl_inline.h" #include "float/lfloat/elem/cl_LF_zerop.cc" #include "float/lfloat/misc/cl_LF_exponent.cc" namespace cln { // sinxbyx is mainly for cl_SF, cl_FF, cl_DF, where we want to avoid underflow. const cl_F sinxbyx_naive (const cl_F& x) { // Methode: // e := Exponent aus (decode-float x), d := (float-digits x) // Bei x=0.0 oder e<=-d/2 liefere 1.0 // (denn bei e<=-d/2 ist x^2/6 < x^2/4 < 2^(-d)/4 = 2^(-d-2), also // 1 >= sin(x)/x > 1-x^2/6 > 1-2^(-d-2), also 1 >= (sin(x)/x)^2 > 1-2^(-d-1), // also ist (sin(x)/x)^2, auf d Bits gerundet, gleich 1.0). // Bei e<=-sqrt(d) verwende die Potenzreihe // sin(x)/x = sum(j=0..inf,(-x^2)^j/(2j+1)!): // a:=-x^2, b:=1, i:=1, sum:=0, // while (/= sum (setq sum (+ sum b))) do b:=b*a/((i+1)*(i+2)), i:=i+2. // Ergebnis sum^2. // Sonst setze y := x/2 = (scale-float x -1), // berechne rekursiv z:=(sin(y)/y)^2 und liefere z*(1-y^2*z). // [Die Grenze sqrt(d) ergibt sich so: // Man braucht bei der Potenzreihe mit x=2^-k etwa j Glieder, mit // k*j*ln 2 + j*(ln j - 1) = d, und der Aufwand beträgt etwa 2.8*(j/2) // Multiplikationen von d-Bit-Zahlen. Bei Halbierungen bis x=2^-k ist der // Gesamtaufwand etwa 2*(k+e)+1.4*j(k). Dieses minimieren nach k: Soll sein // -1.4 = d/dk j(k) = (d/dj k(j))^-1 = - j^2/(d+j)*ln 2, also j^2=2(d+j), // grob j=sqrt(2d) und damit k=sqrt(d).] // Aufwand: asymptotisch d^2.5 . if (zerop(x)) return cl_float(1,x); var uintC d = float_digits(x); var sintE e = float_exponent(x); if (e <= (-(sintC)d)>>1) // e <= (-d)/2 <==> e <= -ceiling(d/2) ? return cl_float(1,x); // ja -> 1.0 als Ergebnis { Mutable(cl_F,x); // Bei e <= -1-limit_slope*floor(sqrt(d)) kann die Potenzreihe // angewandt werden. limit_slope = 1.0 ist sehr schlecht (ca. 30% // zu schlecht). Gute Werte bei N limbs: // N limit_slope // 5 0.15-0.30 // 10 0.25 // 25 0.25-0.35 // 50 0.35-0.40 // 100 0.40-0.45 // 200 0.40-0.45 // Wähle limit_slope = 13/32 = 0.4. var sintL e_limit = -1-floor(isqrtC(d)*13,32); // -1-floor(sqrt(d)) if (e > e_limit) { // e > -1-limit_slope*floor(sqrt(d)) -> muß |x| verkleinern. x = scale_float(x,e_limit-e); // Neuer Exponent = e_limit. } var cl_F x2 = square(x); // x^2 // Potenzreihe anwenden: var cl_F a = - x2; // a := -x^2 var int i = 1; var cl_F b = cl_float(1,x); // b := (float 1 x) var cl_F sum = cl_float(0,x); // sum := (float 0 x) loop { var cl_F new_sum = sum + b; if (new_sum == sum) // = sum ? break; // ja -> Potenzreihe abbrechen sum = new_sum; b = (b*a)/(cl_I)((i+1)*(i+2)); i = i+2; } var cl_F z = square(sum); // sum^2 als Ergebnis while (e > e_limit) { z = z - x2 * square(z); x2 = scale_float(x2,2); // x^2 := x^2*4 e--; } return z; }} // Bit complexity (N = length(x)): O(N^(1/2)*M(N)). const cl_LF sinx_naive (const cl_LF& x) { // Methode: // e := Exponent aus (decode-float x), d := (float-digits x) // Bei x=0.0 oder e<=-d/2 liefere x // (denn bei e<=-d/2 ist x^2/6 < x^2/4 < 2^(-d)/4 = 2^(-d-2), also // 1 >= sin(x)/x > 1-x^2/6 > 1-2^(-d-2), also ist sin(x)^2, auf d Bits // gerundet, gleich x). // Bei e<=-sqrt(d) verwende die Potenzreihe // sin(x) = sum(j=0..inf,x*(-x^2)^j/(2j+1)!): // a:=-x^2, b:=x, i:=1, sum:=0, // while (/= sum (setq sum (+ sum b))) do b:=b*a/((i+1)*(i+2)), i:=i+2. // Ergebnis sum^2. // Sonst setze y := x/2 = (scale-float x -1), // berechne rekursiv z:=sin(y)^2 und liefere 4*z*(1-z) = 1-(1-2*z)^2. // [Die Grenze sqrt(d) ergibt sich so: // Man braucht bei der Potenzreihe mit x=2^-k etwa j Glieder, mit // k*j*ln 2 + j*(ln j - 1) = d, und der Aufwand beträgt etwa 2.8*(j/2) // Multiplikationen von d-Bit-Zahlen. Bei Halbierungen bis x=2^-k ist der // Gesamtaufwand etwa 2*(k+e)+1.4*j(k). Dieses minimieren nach k: Soll sein // -1.4 = d/dk j(k) = (d/dj k(j))^-1 = - j^2/(d+j)*ln 2, also j^2=2(d+j), // grob j=sqrt(2d) und damit k=sqrt(d).] // Aufwand: asymptotisch d^2.5 . if (zerop_inline(x)) return x; var uintC actuallen = TheLfloat(x)->len; var uintC d = float_digits(x); var sintE e = float_exponent_inline(x); if (e <= (-(sintC)d)>>1) // e <= (-d)/2 <==> e <= -ceiling(d/2) ? return square(x); // ja -> x^2 als Ergebnis { Mutable(cl_LF,x); var sintE ee = e; // Bei e <= -1-limit_slope*floor(sqrt(d)) kann die Potenzreihe // angewandt werden. limit_slope = 1.0 ist schlecht (ca. 10% zu // schlecht). Ein guter Wert für naive1 ist limit_slope = 0.6, // für naive3 aber limit_slope = 0.5. var sintL e_limit = -1-floor(isqrtC(d),2); // -1-floor(sqrt(d)) if (e > e_limit) { // e > -1-limit_slope*floor(sqrt(d)) -> muß |x| verkleinern. x = scale_float(x,e_limit-e); ee = e_limit; // Neuer Exponent = e_limit. } var cl_LF x2 = square(x); // x^2 // Potenzreihe anwenden: var cl_LF powser_value; var cl_LF a = - x2; // a := -x^2 var int i = 1; if (0) { // naive1: // fixed-point representation d = d-ee; // fixed-point representation with d mantissa bits var cl_I b = round1(scale_float(x,d)); // b := x var cl_I sum = 0; // sum := (float 0 x) loop { if (b == 0) break; sum = sum + b; b = round1(round1(The(cl_LF)(b*a)),(cl_I)((i+1)*(i+2))); i = i+2; } powser_value = scale_float(cl_float(sum,x),-(sintC)d); } else if (actuallen <= 7) { // Break-even-Point before extendsqrt: N<=6 // naive2: // floating-point representation var cl_LF b = x; // b := x var cl_LF sum = cl_float(0,x); // sum := (float 0 x) loop { var cl_LF new_sum = sum + b; if (new_sum == sum) // = sum ? break; // ja -> Potenzreihe abbrechen sum = new_sum; b = (b*a)/(cl_I)((i+1)*(i+2)); i = i+2; } powser_value = sum; } else { // naive3: // floating-point representation with smooth precision reduction var cl_LF b = x; // b := x var cl_LF eps = scale_float(b,-(sintC)d-10); var cl_LF sum = cl_float(0,x); // sum := (float 0 x) loop { var cl_LF new_sum = sum + LF_to_LF(b,actuallen); if (new_sum == sum) // = sum ? break; // ja -> Potenzreihe abbrechen sum = new_sum; b = cl_LF_shortenwith(b,eps); b = (b*a)/(cl_I)((i+1)*(i+2)); i = i+2; } powser_value = sum; } var cl_LF z = square(powser_value); // sin^2 als Ergebnis while (e > e_limit) { z = cl_float(1,x) - square(cl_float(1,x) - scale_float(z,1)); // z := 1-(1-2*z)^2 e--; } return z; }} // Bit complexity (N = length(x)): O(N^(1/2)*M(N)). // Timings of the three variants, on an i486 33 MHz, running Linux, // applied to x = sqrt(2)-1 = 0.414... // N naive1 naive2 naive3 ratseries // 4 0.0064 0.0048 0.0049 0.023 // 6 0.0081 0.0064 0.0065 0.031 // 8 0.0103 0.0085 0.0083 0.038 // 10 0.012 0.011 0.010 0.048 // 25 0.043 0.047 0.035 0.119 // 50 0.15 0.17 0.12 0.37 // 100 0.54 0.67 0.44 1.09 // 250 3.5 4.4 2.8 5.5 // 500 14.7 18.5 11.6 19.4 // 1000 61 78 48 64 // 2500 315 361 243 261 // 2700 265 270 // 3000 294 282 // 3500 339 303 // ==> ratseries faster for N >= 2750. } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_ratseries_pb.cc0000644000000000000000000000504611201634737020122 0ustar // eval_rational_series(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_LF_tran.h" // Implementation. #include "cln/lfloat.h" #include "cln/integer.h" #include "cln/exception.h" #include "float/lfloat/cl_LF.h" namespace cln { // Subroutine. // Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n))) // and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1) // and T = B*Q*S (all integers). On entry N1 < N2. // P will not be computed if a NULL pointer is passed. static void eval_pb_series_aux (uintC N1, uintC N2, const cl_pb_series& args, cl_I* P, cl_I* B, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: if (P) { *P = args.pv[N1]; } *B = args.bv[N1]; *T = args.pv[N1]; break; case 2: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; if (P) { *P = p01; } *B = args.bv[N1] * args.bv[N1+1]; *T = args.bv[N1+1] * args.pv[N1] + args.bv[N1] * p01; break; } case 3: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; if (P) { *P = p012; } var cl_I b12 = args.bv[N1+1] * args.bv[N1+2]; *B = args.bv[N1] * b12; *T = b12 * args.pv[N1] + args.bv[N1] * (args.bv[N1+2] * p01 + args.bv[N1+1] * p012); break; } case 4: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; var cl_I p0123 = p012 * args.pv[N1+3]; if (P) { *P = p0123; } var cl_I b01 = args.bv[N1] * args.bv[N1+1]; var cl_I b23 = args.bv[N1+2] * args.bv[N1+3]; *B = b01 * b23; *T = b23 * (args.bv[N1+1] * args.pv[N1] + args.bv[N1] * p01) + b01 * (args.bv[N1+3] * p012 + args.bv[N1+2] * p0123); break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LP, LB, LT; eval_pb_series_aux(N1,Nm,args,&LP,&LB,<); // Compute right part. var cl_I RP, RB, RT; eval_pb_series_aux(Nm,N2,args,(P?&RP:(cl_I*)0),&RB,&RT); // Put together partial results. if (P) { *P = LP*RP; } *B = LB*RB; // S = LS + LP * RS, so T = RB*LT + LB*LP*RT. *T = RB*LT + LB*LP*RT; break; } } } const cl_LF eval_rational_series (uintC N, const cl_pb_series& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I B, T; eval_pb_series_aux(0,N,args,NULL,&B,&T); return cl_I_to_LF(T,len) / cl_I_to_LF(B,len); } // Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))): // O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_zeta_int_def.cc0000644000000000000000000000074311201634737017756 0ustar // zeta(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/transcendental/cl_F_tran.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F zeta (int s) { floatformatcase(default_float_format , return cl_LF_to_SF(zeta(s,LF_minlen)); , return cl_LF_to_FF(zeta(s,LF_minlen)); , return cl_LF_to_DF(zeta(s,LF_minlen)); , return zeta(s,len); ); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_ratseries_qb.cc0000644000000000000000000001052511201634737020121 0ustar // eval_rational_series(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_LF_tran.h" // Implementation. #include "cln/lfloat.h" #include "cln/integer.h" #include "cln/exception.h" #include "float/lfloat/cl_LF.h" namespace cln { // Subroutine. // Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n))) // and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1) // and T = B*Q*S (all integers). On entry N1 < N2. // P will not be computed if a NULL pointer is passed. static void eval_qb_series_aux (uintC N1, uintC N2, const cl_qb_series& args, cl_I* Q, cl_I* B, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: *Q = args.qv[N1]; *B = args.bv[N1]; *T = 1; break; case 2: { *Q = args.qv[N1] * args.qv[N1+1]; *B = args.bv[N1] * args.bv[N1+1]; *T = args.bv[N1+1] * args.qv[N1+1] + args.bv[N1]; break; } case 3: { var cl_I q12 = args.qv[N1+1] * args.qv[N1+2]; *Q = args.qv[N1] * q12; var cl_I b12 = args.bv[N1+1] * args.bv[N1+2]; *B = args.bv[N1] * b12; *T = b12 * q12 + args.bv[N1] * (args.bv[N1+2] * args.qv[N1+2] + args.bv[N1+1]); break; } case 4: { var cl_I q23 = args.qv[N1+2] * args.qv[N1+3]; var cl_I q123 = args.qv[N1+1] * q23; *Q = args.qv[N1] * q123; var cl_I b01 = args.bv[N1] * args.bv[N1+1]; var cl_I b23 = args.bv[N1+2] * args.bv[N1+3]; *B = b01 * b23; *T = b23 * (args.bv[N1+1] * q123 + args.bv[N1] * q23) + b01 * (args.bv[N1+3] * args.qv[N1+3] + args.bv[N1+2]); break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LQ, LB, LT; eval_qb_series_aux(N1,Nm,args,&LQ,&LB,<); // Compute right part. var cl_I RQ, RB, RT; eval_qb_series_aux(Nm,N2,args,&RQ,&RB,&RT); // Put together partial results. *Q = LQ*RQ; *B = LB*RB; // S = LS + 1/LQ * RS, so T = RB*RQ*LT + LB*RT. *T = RB*RQ*LT + LB*RT; break; } } } template<> const cl_LF eval_rational_series (uintC N, const cl_qb_series& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I Q, B, T; eval_qb_series_aux(0,N,args,&Q,&B,&T); return cl_I_to_LF(T,len) / cl_I_to_LF(B*Q,len); } static void eval_qb_series_aux (uintC N1, uintC N2, cl_qb_series_stream& args, cl_I* Q, cl_I* B, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: { var cl_qb_series_term v0 = args.next(); // [N1] *Q = v0.q; *B = v0.b; *T = 1; break; } case 2: { var cl_qb_series_term v0 = args.next(); // [N1] var cl_qb_series_term v1 = args.next(); // [N1+1] *Q = v0.q * v1.q; *B = v0.b * v1.b; *T = v1.b * v1.q + v0.b; break; } case 3: { var cl_qb_series_term v0 = args.next(); // [N1] var cl_qb_series_term v1 = args.next(); // [N1+1] var cl_qb_series_term v2 = args.next(); // [N1+2] var cl_I q12 = v1.q * v2.q; *Q = v0.q * q12; var cl_I b12 = v1.b * v2.b; *B = v0.b * b12; *T = b12 * q12 + v0.b * (v2.b * v2.q + v1.b); break; } case 4: { var cl_qb_series_term v0 = args.next(); // [N1] var cl_qb_series_term v1 = args.next(); // [N1+1] var cl_qb_series_term v2 = args.next(); // [N1+2] var cl_qb_series_term v3 = args.next(); // [N1+3] var cl_I q23 = v2.q * v3.q; var cl_I q123 = v1.q * q23; *Q = v0.q * q123; var cl_I b01 = v0.b * v1.b; var cl_I b23 = v2.b * v3.b; *B = b01 * b23; *T = b23 * (v1.b * q123 + v0.b * q23) + b01 * (v3.b * v3.q + v2.b); break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LQ, LB, LT; eval_qb_series_aux(N1,Nm,args,&LQ,&LB,<); // Compute right part. var cl_I RQ, RB, RT; eval_qb_series_aux(Nm,N2,args,&RQ,&RB,&RT); // Put together partial results. *Q = LQ*RQ; *B = LB*RB; // S = LS + 1/LQ * RS, so T = RB*RQ*LT + LB*RT. *T = RB*RQ*LT + LB*RT; break; } } } template<> const cl_LF eval_rational_series (uintC N, cl_qb_series_stream& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I Q, B, T; eval_qb_series_aux(0,N,args,&Q,&B,&T); return cl_I_to_LF(T,len) / cl_I_to_LF(B*Q,len); } // Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))): // O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_exp1_def.cc0000644000000000000000000000061211201634737017011 0ustar // exp1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/transcendental/cl_F_tran.h" namespace cln { const cl_F exp1 (void) { floatformatcase(default_float_format , return cl_SF_exp1(); , return cl_FF_exp1(); , return cl_DF_exp1(); , return exp1(len); ); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_cos.cc0000644000000000000000000000526711201634737016115 0ustar // cos(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/transcendental/cl_F_tran.h" #include "float/cl_F.h" #include "cln/integer.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F cos (const cl_F& x) { // Methode: // Genauigkeit erhöhen, // (q,r) := (round x (float pi x)), so daß |r|<=pi/2. // e := Exponent aus (decode-float r), d := (float-digits r) // Bei r=0.0 oder e<=-d/2 liefere 1.0 // (denn bei e<=-d/2 ist r^2/2 < 2^(-d)/2 = 2^(-d-1), also // 1 >= cos(r) > 1-r^2/2 > 1-2^(-d-1), // also ist cos(r), auf d Bits gerundet, gleich 1.0). // Sonst s := r/2 = (scale-float r -1), // (sin(s)/s)^2 errechnen, cos(r) = 1-r*s*(sin(s)/s)^2 errechnen. // Falls q ungerade: Vorzeichenwechsel. // Rechengenauigkeit erhöhen und durch pi dividieren: var cl_F cos_r; if (longfloatp(x)) { DeclareType(cl_LF,x); if (TheLfloat(x)->len >= 2850) { var cl_F_div_t q_r = cl_round_pi2(extend(x,TheLfloat(x)->len+1)); var cl_I& q = q_r.quotient; var cl_LF r = The(cl_LF)(q_r.remainder); var cl_LF_cos_sin_t trig = cl_cossin_ratseries(r); switch (cl_I_to_UL(logand(q,3))) { // q mod 4 case 0: return cl_float(trig.cos,x); case 1: return -cl_float(trig.sin,x); case 2: return -cl_float(trig.cos,x); case 3: return cl_float(trig.sin,x); default: NOTREACHED } } else { var cl_F_div_t q_r = cl_round_pi(cl_F_extendsqrt(x)); var cl_I& q = q_r.quotient; var cl_LF r = The(cl_LF)(q_r.remainder); if (zerop(r) || (float_exponent(r) <= (-(sintC)float_digits(r))>>1)) cos_r = cl_float(1,x); // (cos r) = 1.0 else { var cl_LF s = scale_float(r,-1); // s := r/2 cos_r = cl_float(1-scale_float(sinx_naive(s),1),x); // cos(2s) = 1-2*sin(s)^2 } if (oddp(q)) return -cos_r; // q ungerade -> mal -1 else return cos_r; } } else { var cl_F_div_t q_r = cl_round_pi(cl_F_extendsqrt(x)); var cl_I& q = q_r.quotient; var cl_F& r = q_r.remainder; if (zerop(r) || (float_exponent(r) <= (-(sintC)float_digits(r))>>1)) cos_r = cl_float(1,x); // (cos r) = 1.0 else { var cl_F s = scale_float(r,-1); // s := r/2 cos_r = cl_float(1 - r * s * sinxbyx_naive(s),x); } if (oddp(q)) return -cos_r; // q ungerade -> mal -1 else return cos_r; } } // Timings of the two algorithms, on an i486 33 MHz, running Linux, // applied to x = sqrt(2)-1 = 0.414... // N naive ratseries // 10 0.009 0.049 // 25 0.033 0.137 // 50 0.11 0.37 // 100 0.41 1.15 // 250 2.7 5.5 // 500 11.1 19.4 // 1000 46 64 // 2500 239 260 // ==> ratseries faster for N >= 2850. } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_eulerconst_def.cc0000644000000000000000000000065611201634737020327 0ustar // eulerconst(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/transcendental/cl_F_tran.h" namespace cln { const cl_F eulerconst (void) { floatformatcase(default_float_format , return cl_SF_eulerconst(); , return cl_FF_eulerconst(); , return cl_DF_eulerconst(); , return eulerconst(len); ); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_cossin_aux.cc0000644000000000000000000000663711201634737017622 0ustar // cl_cossin_aux(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "cln/lfloat.h" #include "float/transcendental/cl_LF_tran.h" #include "float/lfloat/cl_LF.h" #include "cln/integer.h" #include "base/cl_alloca.h" #include "cln/exception.h" #undef floor #include #define floor cln_floor namespace cln { // Computing cos(x) = sqrt(1-sin(x)^2) instead of computing separately // by a power series evaluation brings 20% speedup, even more for small lengths. #define TRIVIAL_SPEEDUP const cl_LF_cos_sin_t cl_cossin_aux (const cl_I& p, uintE lq, uintC len) { { Mutable(cl_I,p); var uintE lp = integer_length(p); // now |p| < 2^lp. if (!(lp <= lq)) throw runtime_exception(); lp = lq - lp; // now |p/2^lq| < 2^-lp. // Minimize lq (saves computation time). { var uintC lp2 = ord2(p); if (lp2 > 0) { p = p >> lp2; lq = lq - lp2; } } // cos(p/2^lq): // Evaluate a sum(0 <= n < N, a(n)/b(n) * (p(0)...p(n))/(q(0)...q(n))) // with appropriate N, and // a(n) = 1, b(n) = 1, // p(n) = -p^2 for n>0, // q(n) = (2*n-1)*(2*n)*(2^lq)^2 for n>0. // sin(p/2^lq): // Evaluate a sum(0 <= n < N, a(n)/b(n) * (p(0)...p(n))/(q(0)...q(n))) // with appropriate N, and // a(n) = 1, b(n) = 1, // p(0) = p, p(n) = -p^2 for n>0, // q(0) = 2^lq, q(n) = (2*n)*(2*n+1)*(2^lq)^2 for n>0. var uintC actuallen = len+1; // 1 guard digit // How many terms do we need for M bits of precision? N/2 terms suffice, // provided that // 1/(2^(N*lp)*N!) < 2^-M // <== N*(log(N)-1)+N*lp*log(2) > M*log(2) // First approximation: // N0 = M will suffice, so put N<=N0. // Second approximation: // N1 = floor(M*log(2)/(log(N0)-1+lp*log(2))), slightly too small, // so put N>=N1. // Third approximation: // N2 = ceiling(M*log(2)/(log(N1)-1+lp*log(2))), slightly too large. // N = N2+2, two more terms for safety. var uintC N0 = intDsize*actuallen; var uintC N1 = (uintC)(0.693147*intDsize*actuallen/(::log((double)N0)-1.0+0.693148*lp)); var uintC N2 = (uintC)(0.693148*intDsize*actuallen/(::log((double)N1)-1.0+0.693147*lp))+1; var uintC N = N2+2; N = ceiling(N,2); CL_ALLOCA_STACK; var cl_I* pv = (cl_I*) cl_alloca(N*sizeof(cl_I)); var cl_I* qv = (cl_I*) cl_alloca(N*sizeof(cl_I)); var uintC n; var cl_I p2 = -square(p); var cl_LF sinsum; { init1(cl_I, pv[0]) (p); init1(cl_I, qv[0]) ((cl_I)1 << lq); for (n = 1; n < N; n++) { init1(cl_I, pv[n]) (p2); init1(cl_I, qv[n]) (((cl_I)n*(cl_I)(2*n+1)) << (2*lq+1)); } var cl_pq_series series; series.pv = pv; series.qv = qv; sinsum = eval_rational_series(N,series,actuallen); for (n = 0; n < N; n++) { pv[n].~cl_I(); qv[n].~cl_I(); } } #if !defined(TRIVIAL_SPEEDUP) var cl_LF cossum; { init1(cl_I, pv[0]) (1); init1(cl_I, qv[0]) (1); for (n = 1; n < N; n++) { init1(cl_I, pv[n]) (p2); init1(cl_I, qv[n]) (((cl_I)n*(cl_I)(2*n-1)) << (2*lq+1)); } var cl_pq_series series; series.pv = pv; series.qv = qv; cossum = eval_rational_series(N,series,actuallen); for (n = 0; n < N; n++) { pv[n].~cl_I(); qv[n].~cl_I(); } } #else // TRIVIAL_SPEEDUP var cl_LF cossum = sqrt(cl_I_to_LF(1,actuallen) - square(sinsum)); #endif return cl_LF_cos_sin_t(shorten(cossum,len),shorten(sinsum,len)); // verkürzen und fertig }} // Bit complexity (N = len, and if p has length O(log N) and ql = O(log N)): // O(log(N)*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_ratseries_p.cc0000644000000000000000000000403211201634737017752 0ustar // eval_rational_series(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_LF_tran.h" // Implementation. #include "cln/lfloat.h" #include "cln/integer.h" #include "cln/exception.h" #include "float/lfloat/cl_LF.h" namespace cln { // Subroutine. // Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n))) // and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1) // and T = B*Q*S (all integers). On entry N1 < N2. // P will not be computed if a NULL pointer is passed. static void eval_p_series_aux (uintC N1, uintC N2, const cl_p_series& args, cl_I* P, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: if (P) { *P = args.pv[N1]; } *T = args.pv[N1]; break; case 2: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; if (P) { *P = p01; } *T = args.pv[N1] + p01; break; } case 3: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; if (P) { *P = p012; } *T = args.pv[N1] + p01 + p012; break; } case 4: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; var cl_I p0123 = p012 * args.pv[N1+3]; if (P) { *P = p0123; } *T = args.pv[N1] + p01 + p012 + p0123; break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LP, LT; eval_p_series_aux(N1,Nm,args,&LP,<); // Compute right part. var cl_I RP, RT; eval_p_series_aux(Nm,N2,args,(P?&RP:(cl_I*)0),&RT); // Put together partial results. if (P) { *P = LP*RP; } // S = LS + LP * RS, so T = LT + LP*RT. *T = LT + LP*RT; break; } } } const cl_LF eval_rational_series (uintC N, const cl_p_series& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I T; eval_p_series_aux(0,N,args,NULL,&T); return cl_I_to_LF(T,len); } // Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))): // O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_ratseries_pqb.cc0000644000000000000000000002577111201634737020312 0ustar // eval_rational_series(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_LF_tran.h" // Implementation. #include "cln/lfloat.h" #include "cln/integer.h" #include "cln/real.h" #include "cln/exception.h" #include "float/lfloat/cl_LF.h" #include "base/cl_alloca.h" namespace cln { // Subroutine. // Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n))) // and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1) // and T = B*Q*S (all integers). On entry N1 < N2. // P will not be computed if a NULL pointer is passed. static void eval_pqb_series_aux (uintC N1, uintC N2, const cl_pqb_series& args, cl_I* P, cl_I* Q, cl_I* B, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: if (P) { *P = args.pv[N1]; } *Q = args.qv[N1]; *B = args.bv[N1]; *T = args.pv[N1]; break; case 2: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; if (P) { *P = p01; } *Q = args.qv[N1] * args.qv[N1+1]; *B = args.bv[N1] * args.bv[N1+1]; *T = args.bv[N1+1] * args.qv[N1+1] * args.pv[N1] + args.bv[N1] * p01; break; } case 3: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; if (P) { *P = p012; } var cl_I q12 = args.qv[N1+1] * args.qv[N1+2]; *Q = args.qv[N1] * q12; var cl_I b12 = args.bv[N1+1] * args.bv[N1+2]; *B = args.bv[N1] * b12; *T = b12 * q12 * args.pv[N1] + args.bv[N1] * (args.bv[N1+2] * args.qv[N1+2] * p01 + args.bv[N1+1] * p012); break; } case 4: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; var cl_I p0123 = p012 * args.pv[N1+3]; if (P) { *P = p0123; } var cl_I q23 = args.qv[N1+2] * args.qv[N1+3]; var cl_I q123 = args.qv[N1+1] * q23; *Q = args.qv[N1] * q123; var cl_I b01 = args.bv[N1] * args.bv[N1+1]; var cl_I b23 = args.bv[N1+2] * args.bv[N1+3]; *B = b01 * b23; *T = b23 * (args.bv[N1+1] * q123 * args.pv[N1] + args.bv[N1] * q23 * p01) + b01 * (args.bv[N1+3] * args.qv[N1+3] * p012 + args.bv[N1+2] * p0123); break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LP, LQ, LB, LT; eval_pqb_series_aux(N1,Nm,args,&LP,&LQ,&LB,<); // Compute right part. var cl_I RP, RQ, RB, RT; eval_pqb_series_aux(Nm,N2,args,(P?&RP:(cl_I*)0),&RQ,&RB,&RT); // Put together partial results. if (P) { *P = LP*RP; } *Q = LQ*RQ; *B = LB*RB; // S = LS + LP/LQ * RS, so T = RB*RQ*LT + LB*LP*RT. *T = RB*RQ*LT + LB*LP*RT; break; } } } template<> const cl_LF eval_rational_series (uintC N, const cl_pqb_series& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I Q, B, T; eval_pqb_series_aux(0,N,args,NULL,&Q,&B,&T); return cl_I_to_LF(T,len) / cl_I_to_LF(B*Q,len); } static void eval_pqsb_series_aux (uintC N1, uintC N2, const cl_pqb_series& args, const uintC* qsv, cl_I* P, cl_I* Q, uintC* QS, cl_I* B, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: if (P) { *P = args.pv[N1]; } *Q = args.qv[N1]; *QS = qsv[N1]; *B = args.bv[N1]; *T = args.pv[N1]; break; case 2: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; if (P) { *P = p01; } *Q = args.qv[N1] * args.qv[N1+1]; *QS = qsv[N1] + qsv[N1+1]; *B = args.bv[N1] * args.bv[N1+1]; *T = ((args.bv[N1+1] * args.qv[N1+1] * args.pv[N1]) << qsv[N1+1]) + args.bv[N1] * p01; break; } case 3: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; if (P) { *P = p012; } var cl_I q12 = args.qv[N1+1] * args.qv[N1+2]; *Q = args.qv[N1] * q12; *QS = qsv[N1] + qsv[N1+1] + qsv[N1+2]; var cl_I b12 = args.bv[N1+1] * args.bv[N1+2]; *B = args.bv[N1] * b12; *T = ((b12 * q12 * args.pv[N1]) << (qsv[N1+1] + qsv[N1+2])) + args.bv[N1] * (((args.bv[N1+2] * args.qv[N1+2] * p01) << qsv[N1+2]) + args.bv[N1+1] * p012); break; } case 4: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; var cl_I p0123 = p012 * args.pv[N1+3]; if (P) { *P = p0123; } var cl_I q23 = args.qv[N1+2] * args.qv[N1+3]; var cl_I q123 = args.qv[N1+1] * q23; *Q = args.qv[N1] * q123; *QS = qsv[N1] + qsv[N1+1] + qsv[N1+2] + qsv[N1+3]; var cl_I b01 = args.bv[N1] * args.bv[N1+1]; var cl_I b23 = args.bv[N1+2] * args.bv[N1+3]; *B = b01 * b23; *T = ((b23 * (((args.bv[N1+1] * q123 * args.pv[N1]) << qsv[N1+1]) + args.bv[N1] * q23 * p01)) << (qsv[N1+2] + qsv[N1+3])) + b01 * (((args.bv[N1+3] * args.qv[N1+3] * p012) << qsv[N1+3]) + args.bv[N1+2] * p0123); break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LP, LQ, LB, LT; var uintC LQS; eval_pqsb_series_aux(N1,Nm,args,qsv,&LP,&LQ,&LQS,&LB,<); // Compute right part. var cl_I RP, RQ, RB, RT; var uintC RQS; eval_pqsb_series_aux(Nm,N2,args,qsv,(P?&RP:(cl_I*)0),&RQ,&RQS,&RB,&RT); // Put together partial results. if (P) { *P = LP*RP; } *Q = LQ*RQ; *QS = LQS+RQS; *B = LB*RB; // S = LS + LP/LQ * RS, so T = RB*RQ*LT + LB*LP*RT. *T = ((RB*RQ*LT) << RQS) + LB*LP*RT; break; } } } template<> const cl_LF eval_rational_series (uintC N, const cl_pqb_series& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I Q, B, T; // Precomputation of the shift counts: // Split qv[n] into qv[n]*2^qsv[n]. CL_ALLOCA_STACK; var uintC* qsv = (uintC*) cl_alloca(N*sizeof(uintC)); var cl_I* qp = args.qv; var uintC* qsp = qsv; for (var uintC n = 0; n < N; n++, qp++, qsp++) { *qsp = pullout_shiftcount(*qp); } // Main computation. var uintC QS; eval_pqsb_series_aux(0,N,args,qsv,NULL,&Q,&QS,&B,&T); return cl_I_to_LF(T,len) / scale_float(cl_I_to_LF(B*Q,len),QS); } static void eval_pqb_series_aux (uintC N1, uintC N2, cl_pqb_series_stream& args, cl_I* P, cl_I* Q, cl_I* B, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: { var cl_pqb_series_term v0 = args.next(); // [N1] if (P) { *P = v0.p; } *Q = v0.q; *B = v0.b; *T = v0.p; break; } case 2: { var cl_pqb_series_term v0 = args.next(); // [N1] var cl_pqb_series_term v1 = args.next(); // [N1+1] var cl_I p01 = v0.p * v1.p; if (P) { *P = p01; } *Q = v0.q * v1.q; *B = v0.b * v1.b; *T = v1.b * v1.q * v0.p + v0.b * p01; break; } case 3: { var cl_pqb_series_term v0 = args.next(); // [N1] var cl_pqb_series_term v1 = args.next(); // [N1+1] var cl_pqb_series_term v2 = args.next(); // [N1+2] var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; if (P) { *P = p012; } var cl_I q12 = v1.q * v2.q; *Q = v0.q * q12; var cl_I b12 = v1.b * v2.b; *B = v0.b * b12; *T = b12 * q12 * v0.p + v0.b * (v2.b * v2.q * p01 + v1.b * p012); break; } case 4: { var cl_pqb_series_term v0 = args.next(); // [N1] var cl_pqb_series_term v1 = args.next(); // [N1+1] var cl_pqb_series_term v2 = args.next(); // [N1+2] var cl_pqb_series_term v3 = args.next(); // [N1+3] var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; var cl_I p0123 = p012 * v3.p; if (P) { *P = p0123; } var cl_I q23 = v2.q * v3.q; var cl_I q123 = v1.q * q23; *Q = v0.q * q123; var cl_I b01 = v0.b * v1.b; var cl_I b23 = v2.b * v3.b; *B = b01 * b23; *T = b23 * (v1.b * q123 * v0.p + v0.b * q23 * p01) + b01 * (v3.b * v3.q * p012 + v2.b * p0123); break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LP, LQ, LB, LT; eval_pqb_series_aux(N1,Nm,args,&LP,&LQ,&LB,<); // Compute right part. var cl_I RP, RQ, RB, RT; eval_pqb_series_aux(Nm,N2,args,(P?&RP:(cl_I*)0),&RQ,&RB,&RT); // Put together partial results. if (P) { *P = LP*RP; } *Q = LQ*RQ; *B = LB*RB; // S = LS + LP/LQ * RS, so T = RB*RQ*LT + LB*LP*RT. *T = RB*RQ*LT + LB*LP*RT; break; } } } template<> const cl_LF eval_rational_series (uintC N, cl_pqb_series_stream& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I Q, B, T; eval_pqb_series_aux(0,N,args,NULL,&Q,&B,&T); return cl_I_to_LF(T,len) / cl_I_to_LF(B*Q,len); } static void eval_pqb_series_aux (uintC N1, uintC N2, cl_pqb_series_stream& args, cl_R* P, cl_R* Q, cl_R* B, cl_R* T, uintC trunclen) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: { var cl_pqb_series_term v0 = args.next(); // [N1] if (P) { *P = v0.p; } *Q = v0.q; *B = v0.b; *T = v0.p; break; } case 2: { var cl_pqb_series_term v0 = args.next(); // [N1] var cl_pqb_series_term v1 = args.next(); // [N1+1] var cl_I p01 = v0.p * v1.p; if (P) { *P = p01; } *Q = v0.q * v1.q; *B = v0.b * v1.b; *T = v1.b * v1.q * v0.p + v0.b * p01; break; } case 3: { var cl_pqb_series_term v0 = args.next(); // [N1] var cl_pqb_series_term v1 = args.next(); // [N1+1] var cl_pqb_series_term v2 = args.next(); // [N1+2] var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; if (P) { *P = p012; } var cl_I q12 = v1.q * v2.q; *Q = v0.q * q12; var cl_I b12 = v1.b * v2.b; *B = v0.b * b12; *T = b12 * q12 * v0.p + v0.b * (v2.b * v2.q * p01 + v1.b * p012); break; } case 4: { var cl_pqb_series_term v0 = args.next(); // [N1] var cl_pqb_series_term v1 = args.next(); // [N1+1] var cl_pqb_series_term v2 = args.next(); // [N1+2] var cl_pqb_series_term v3 = args.next(); // [N1+3] var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; var cl_I p0123 = p012 * v3.p; if (P) { *P = p0123; } var cl_I q23 = v2.q * v3.q; var cl_I q123 = v1.q * q23; *Q = v0.q * q123; var cl_I b01 = v0.b * v1.b; var cl_I b23 = v2.b * v3.b; *B = b01 * b23; *T = b23 * (v1.b * q123 * v0.p + v0.b * q23 * p01) + b01 * (v3.b * v3.q * p012 + v2.b * p0123); break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_R LP, LQ, LB, LT; eval_pqb_series_aux(N1,Nm,args,&LP,&LQ,&LB,<,trunclen); // Compute right part. var cl_R RP, RQ, RB, RT; eval_pqb_series_aux(Nm,N2,args,(P?&RP:(cl_I*)0),&RQ,&RB,&RT,trunclen); // Put together partial results. if (P) { *P = LP*RP; truncate_precision(*P,trunclen); } *Q = LQ*RQ; truncate_precision(*Q,trunclen); *B = LB*RB; truncate_precision(*B,trunclen); // S = LS + LP/LQ * RS, so T = RB*RQ*LT + LB*LP*RT. *T = RB*RQ*LT + LB*LP*RT; truncate_precision(*T,trunclen); break; } } } template<> const cl_LF eval_rational_series (uintC N, cl_pqb_series_stream& args, uintC len, uintC trunclen) { if (N==0) return cl_I_to_LF(0,len); var cl_R Q, B, T; eval_pqb_series_aux(0,N,args,NULL,&Q,&B,&T,trunclen); return cl_R_to_LF(T,len) / cl_R_to_LF(B*Q,len); } // Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))): // O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_atanx.cc0000644000000000000000000002074411201634737016441 0ustar // atanx(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "cln/float.h" #include "base/cl_low.h" #include "float/cl_F.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" #include "cln/integer.h" #include "base/cl_inline.h" #include "float/lfloat/elem/cl_LF_zerop.cc" #include "float/lfloat/elem/cl_LF_minusp.cc" #include "float/lfloat/misc/cl_LF_exponent.cc" namespace cln { // cl_F atanx_naive (const cl_F& x) // cl_LF atanx_naive (const cl_LF& x) // // Methode: // e := Exponent aus (decode-float x), d := (float-digits x) // Bei x=0.0 oder e<=-d/2 liefere x // (denn bei e<=-d/2 ist x^2/3 < x^2/2 < 2^(-d)/2 = 2^(-d-1), also // 1 >= atan(x)/x > 1-x^2/3 > 1-2^(-d-1), // also ist atan(x)/x, auf d Bits gerundet, gleich 1.0). // Bei e<=-sqrt(d) verwende die Potenzreihe // atan(x)/x = sum(j=0..inf,(-x^2)^j/(2j+1)): // a:=-x^2, b:=1, i:=1, sum:=0, // while (/= sum (setq sum (+ sum (/ b i)))) do i:=i+2, b:=b*a. // Ergebnis x*sum. // Sonst setze y := x/(1+sqrt(1+x^2)), berechne rekursiv z:=atan(y) // und liefere 2*z = (scale-float z 1). // Diese Rekursion wird entrekursiviert. Statt k mal hintereinander // x := x/(1+sqrt(1+x^2)) zu bilden, arbeitet man lieber mit den Kehrwerten, // setzt also x := 1/|x|, dann k mal x := x+sqrt(x^2+1), dann x := +- 1/x. // Aufwand: asymptotisch d^2.5 . static const cl_LF atanx_naive (const cl_LF& x) { if (zerop_inline(x)) return x; var uintC actuallen = TheLfloat(x)->len; var uintC d = float_digits(x); var sintE e = float_exponent_inline(x); if (e <= (sintC)(-d)>>1) // e <= -d/2 <==> e <= -ceiling(d/2) return x; // ja -> x als Ergebnis var uintL k = 0; // Rekursionszähler k:=0 // Bei e <= -1-limit_slope*floor(sqrt(d)) kann die Potenzreihe // angewandt werden. limit_slope = 1.0 ist schlecht (ca. 20% zu // schlecht). Ein guter Wert ist: // Für naive1: limit_scope = 0.5. // Für naive2: limit_scope = 0.375 (ca. 0.5 für kleine len, 0.35 für // große len). var uintL sqrt_d = floor(isqrtC(d)*3,8); // limit_slope*floor(sqrt(d)) var cl_LF xx = x; if (e >= (sintL)(-sqrt_d)) { // e > -1-limit_slope*floor(sqrt(d)) -> muß |x| verkleinern. var sintL e_limit = 1+sqrt_d; // 1+limit_slope*floor(sqrt(d)) xx = recip(abs(xx)); // 1/|x| do { // nächstes x nach der Formel x := x+sqrt(x^2 + 1) berechnen: xx = sqrt(square(xx) + cl_float(1,xx)) + xx; k = k+1; } until (float_exponent_inline(xx) > e_limit); // Schleifenende mit Exponent(x) > 1+limit_slope*floor(sqrt(d)), // also x >= 2^(1+limit_slope*floor(sqrt(d))), // also 1/x <= 2^(-1-limit_slope*floor(sqrt(d))). // Nun kann die Potenzreihe auf 1/x angewandt werden. xx = recip(xx); if (minusp_inline(x)) xx = - xx; // Vorzeichen wieder rein } // Potenzreihe anwenden: var int i = 1; var cl_LF a = - square(xx); // a = - x^2 var cl_LF b = cl_float(1,xx); // b := (float 1 x) var cl_LF sum = cl_float(0,xx); // sum := (float 0 x) if (0) { // naive1: // floating-point representation loop { var cl_LF new_sum = sum + b / (cl_I)i; // (+ sum (/ b i)) if (new_sum == sum) // = sum ? break; // ja -> Potenzreihe abbrechen sum = new_sum; b = b*a; i = i+2; } } else { // naive2: // floating-point representation with smooth precision reduction var cl_LF eps = scale_float(b,-(sintC)d-10); loop { var cl_LF new_sum = sum + LF_to_LF(b/(cl_I)i,actuallen); // (+ sum (/ b i)) if (new_sum == sum) // = sum ? break; // ja -> Potenzreihe abbrechen sum = new_sum; b = cl_LF_shortenwith(b,eps); b = b*a; i = i+2; } } var cl_LF erg = sum*xx; // sum*x als Ergebnis return scale_float(erg,k); // wegen Rekursion noch mal 2^k } // Bit complexity (N = length(x)): O(N^(1/2)*M(N)). static const cl_F atanx_naive (const cl_F& x) { if (zerop(x)) return x; var uintC d = float_digits(x); var sintE e = float_exponent(x); if (e <= (sintC)(-d)>>1) // e <= -d/2 <==> e <= -ceiling(d/2) return x; // ja -> x als Ergebnis var uintL k = 0; // Rekursionszähler k:=0 var uintL sqrt_d = floor(isqrtC(d),2); // limit_slope*floor(sqrt(d)) // Bei e <= -1-limit_slope*floor(sqrt(d)) kann die Potenzreihe // angewandt werden. limit_slope = 1.0 ist schlecht (ca. 20% zu // schlecht). Ein guter Wert ist limit_scope = 0.5. var cl_F xx = x; if (e >= (sintL)(-sqrt_d)) { // e > -1-limit_slope*floor(sqrt(d)) -> muß |x| verkleinern. var sintL e_limit = 1+sqrt_d; // 1+limit_slope*floor(sqrt(d)) xx = recip(abs(xx)); // 1/|x| do { // nächstes x nach der Formel x := x+sqrt(x^2 + 1) berechnen: xx = sqrt(square(xx) + cl_float(1,xx)) + xx; k = k+1; } until (float_exponent(xx) > e_limit); // Schleifenende mit Exponent(x) > 1+limit_slope*floor(sqrt(d)), // also x >= 2^(1+limit_slope*floor(sqrt(d))), // also 1/x <= 2^(-1-limit_slope*floor(sqrt(d))). // Nun kann die Potenzreihe auf 1/x angewandt werden. xx = recip(xx); if (minusp(x)) xx = - xx; // Vorzeichen wieder rein } // Potenzreihe anwenden: var int i = 1; var cl_F a = - square(xx); // a = - x^2 var cl_F b = cl_float(1,xx); // b := (float 1 x) var cl_F sum = cl_float(0,xx); // sum := (float 0 x) loop { var cl_F new_sum = sum + b / (cl_I)i; // (+ sum (/ b i)) if (new_sum == sum) // = sum ? break; // ja -> Potenzreihe abbrechen sum = new_sum; b = b*a; i = i+2; } var cl_F erg = sum*xx; // sum*x als Ergebnis return scale_float(erg,k); // wegen Rekursion noch mal 2^k } // Bit complexity (N = length(x)): O(N^(1/2)*M(N)). static const cl_LF atanx_ratseries (const cl_LF& t) { // Method: // Based on the same ideas as lnx_ratseries. // e := exponent of (decode-float t), d := (float-digits t). // If t=0.0 or e<=-d/2, return t. // (x,y) := (1/sqrt(1+t^2),t/sqrt(1+t^2)), z := 0. // Loop // [(x+i*y)*exp(i*z) is invariant, x>0, sqrt(x^2+y^2)=1] // e := exponent of (decode-float y), d := (float-digits y). // If y=0.0 or e<=-d/2, return z+y // (because if e<=-d/2 then |y|^3/6 < 2^(-d)/2*|y|, and since // asin(y) = y+y^3/6+..., asin(y) rounded to d bits is = y). // Choose approximation z' of angle(x+i*y): // If |y| >= 1/2, set z' = 1/2 * sign(y). // If |y| < 2^-n with n maximal, set // z' = truncate(y*2^(2n))/2^(2n). // Set z := z + z' and x+i*y := (x+i*y)*exp(-i*z'). var uintC len = TheLfloat(t)->len; var uintC d = intDsize*len; if (zerop_inline(t) || (float_exponent_inline(t) <= (sintC)(-d)>>1)) return t; var cl_LF x = recip(sqrt(cl_I_to_LF(1,len) + square(t))); var cl_LF y = t*x; var cl_LF z = cl_I_to_LF(0,len); loop { if (zerop_inline(y) || (float_exponent_inline(y) <= (sintC)(-d)>>1)) break; var cl_idecoded_float y_ = integer_decode_float(y); // y = (-1)^sign * 2^exponent * mantissa var uintC lm = integer_length(y_.mantissa); var uintE me = cl_I_to_UE(- y_.exponent); var cl_I p; var uintE lq; var bool last_step = false; if (lm >= me) { // |y| >= 1/2 ? p = y_.sign; // 1 or -1 lq = 1; } else { var uintE n = me - lm; // |y| < 2^-n with n maximal // Set p to the first n bits of |y|: if (lm > n) { p = y_.mantissa >> (lm - n); lq = 2*n; } else { p = y_.mantissa; lq = lm + n; } if (minusp(y_.sign)) { p = -p; } // If 2*n >= lm = intDsize*len, then within our // precision exp(-i*z')=1-i*z' (because |z'^2| < 2^-lm), // and we know a priori that the iteration will stop // after the next big multiplication. This saves one // big multiplication at the end. if (2*n >= lm) last_step = true; } z = z + scale_float(cl_I_to_LF(p,len),-(sintE)lq); if (last_step) break; var cl_LF_cos_sin_t cis_z = cl_cossin_aux(-p,lq,len); var cl_LF new_x = x*cis_z.cos - y*cis_z.sin; var cl_LF new_y = x*cis_z.sin + y*cis_z.cos; x = new_x; y = new_y; } return z+y; } // Bit complexity (N = length(x)): O(log(N)^2*M(N)). // Timings of the above algorithms, on an i486 33 MHz, running Linux, // applied to x = sqrt(2)-1 = 0.414... // N naive1 naive2 ratseries // 10 0.013 0.013 0.043 // 25 0.062 0.048 0.122 // 50 0.25 0.17 0.34 // 100 1.06 0.70 1.07 // 250 7.5 5.0 5.6 // 500 34.7 23.2 20.0 // 1000 167 112 65 // ==> ratseries faster for N >= 325. const cl_F CL_FLATTEN atanx (const cl_F& x) { if (longfloatp(x)) { DeclareType(cl_LF,x); if (TheLfloat(x)->len >= 325) return cl_float(atanx_ratseries(extend(x,TheLfloat(x)->len+1)),x); else return atanx_naive(x); } else return atanx_naive(x); } // Bit complexity (N = length(x)): O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_ln2_var.h0000644000000000000000000000141211201634737016522 0ustar { #if CL_DS_BIG_ENDIAN_P #if (intDsize==8) D1(0xB1), D1(0x72), D1(0x17), D1(0xF7), D1(0xD1), D1(0xCF), D1(0x79), D1(0xAC) #endif #if (intDsize==16) D2(0xB1,0x72), D2(0x17,0xF7), D2(0xD1,0xCF), D2(0x79,0xAC) #endif #if (intDsize==32) D4(0xB1,0x72,0x17,0xF7), D4(0xD1,0xCF,0x79,0xAC) #endif #if (intDsize==64) D8(0xB1,0x72,0x17,0xF7,0xD1,0xCF,0x79,0xAC) #endif #else #if (intDsize==8) D1(0xAC), D1(0x79), D1(0xCF), D1(0xD1), D1(0xF7), D1(0x17), D1(0x72), D1(0xB1) #endif #if (intDsize==16) D2(0x79,0xAC), D2(0xD1,0xCF), D2(0x17,0xF7), D2(0xB1,0x72) #endif #if (intDsize==32) D4(0xD1,0xCF,0x79,0xAC), D4(0xB1,0x72,0x17,0xF7) #endif #if (intDsize==64) D8(0xB1,0x72,0x17,0xF7,0xD1,0xCF,0x79,0xAC) #endif #endif } ; cln-1.3.3/src/float/transcendental/cl_LF_pi.cc0000644000000000000000000002340111201634737016043 0ustar // pi(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "cln/lfloat.h" #include "float/transcendental/cl_LF_tran.h" #include "float/lfloat/cl_LF.h" #include "cln/integer.h" #include "base/cl_alloca.h" namespace cln { ALL_cl_LF_OPERATIONS_SAME_PRECISION() // For the next algorithms, I warmly recommend // [Jörg Arndt: hfloat documentation, august 1996, // http://www.tu-chemnitz.de/~arndt/ hfdoc.dvi // But beware of the typos in his formulas! ] const cl_LF compute_pi_brent_salamin (uintC len) { // Methode: // [Richard P. Brent: Fast multiple-precision evaluation of elementary // functions. J. ACM 23(1976), 242-251.] // [Jonathan M. Borwein, Peter B. Borwein: Pi and the AGM. // Wiley 1987. Algorithm 2.2, p. 48.] // [Jörg Arndt, formula (4.51)-(4.52).] // pi = AGM(1,1/sqrt(2))^2 * 2/(1 - sum(k=0..infty, 2^k c_k^2)). // where the AGM iteration reads // a_0 := 1, b_0 := 1/sqrt(2). // a_(k+1) := (a_k + b_k)/2, b_(k+1) := sqrt(a_k*b_k). // and we set // c_k^2 := a_k^2 - b_k^2, // i.e. c_0^2 = 1/2, // c_(k+1)^2 = a_(k+1)^2 - b_(k+1)^2 = (a_k - b_k)^2/4 // = (a_k - a_(k+1))^2. // (Actually c_(k+1) is _defined_ as = a_k - a_(k+1) = (a_k - b_k)/2.) // d=len, n:=intDsize*d. Verwende Long-Floats mit intDsize*(d+1) // Mantissenbits. // (let* ((a (coerce 1 'long-float)) ; 1 // (b (sqrt (scale-float a -1))) ; 2^-(1/2) // (eps (scale-float a (- n))) ; 2^-n // (t (scale-float a -2)) ; 1/4 // (k 0) // ) // (loop // (when (< (- a b) eps) (return)) // (let ((y a)) // (setq a (scale-float (+ a b) -1)) // (setq b (sqrt (* b y))) // (setq t (- t (scale-float (expt (- a y) 2) k))) // ) // (incf k) // ) // (/ (expt a 2) t) // ) var uintC actuallen = len + 1; // 1 guard digit var uintE uexp_limit = LF_exp_mid - intDsize*len; // Ein Long-Float ist genau dann betragsmäßig <2^-n, wenn // sein Exponent < LF_exp_mid-n = uexp_limit ist. var cl_LF a = cl_I_to_LF(1,actuallen); var cl_LF b = sqrt(scale_float(a,-1)); var uintL k = 0; var cl_LF t = scale_float(a,-2); until (TheLfloat(a-b)->expo < uexp_limit) { // |a-b| < 2^-n -> fertig var cl_LF new_a = scale_float(a+b,-1); // (a+b)/2 b = sqrt(a*b); var cl_LF a_diff = new_a - a; t = t - scale_float(square(a_diff),k); a = new_a; k++; } var cl_LF pires = square(a)/t; // a^2/t return shorten(pires,len); // verkürzen und fertig } // Bit complexity (N := len): O(log(N)*M(N)). const cl_LF compute_pi_brent_salamin_quartic (uintC len) { // See [Borwein, Borwein, section 1.4, exercise 3, p. 17]. // See also [Jörg Arndt], formulas (4.52) and (3.30)[wrong!]. // As above, we are using the formula // pi = AGM(1,1/sqrt(2))^2 * 2/(1 - sum(k=0..infty, 2^k c_k^2)). // where the AGM iteration reads // a_0 := 1, b_0 := 1/sqrt(2). // a_(k+1) := (a_k + b_k)/2, b_(k+1) := sqrt(a_k*b_k). // But we keep computing with // wa_k := sqrt(a_k) and wb_k := sqrt(b_k) // at the same time and do two iteration steps at once. // The iteration takes now takes the form // wa_0 := 1, wb_0 := 2^-1/4, // (wa_k, wb_k, a_k, b_k) // --> ((wa_k^2 + wb_k^2)/2, wa_k*wb_k) // --> (((wa_k + wb_k)/2)^2, sqrt(wa_k*wb_k*(wa_k^2 + wb_k^2)/2)), // i.e. wa_(k+2) = (wa_k + wb_k)/2 and // wb_(k+2) = sqrt(sqrt(wa_k*wb_k*(wa_k^2 + wb_k^2)/2)). // For the sum, we can group two successive items together: // 2^k * c_k^2 + 2^(k+1) * c_(k+1)^2 // = 2^k * [(a_k^2 - b_k^2) + 2*((a_k - b_k)/2)^2] // = 2^k * [3/2*a_k^2 - a_k*b_k - 1/2*b_k^2] // = 2^k * [2*a_k^2 - 1/2*(a_k+b_k)^2] // = 2^(k+1) * [a_k^2 - ((a_k+b_k)/2)^2] // = 2^(k+1) * [wa_k^4 - ((wa_k^2+wb_k^2)/2)^2]. // Hence, // pi = AGM(1,1/sqrt(2))^2 * 1/(1/2 - sum(k even, 2^k*[....])). var uintC actuallen = len + 1; // 1 guard digit var uintE uexp_limit = LF_exp_mid - intDsize*len; var cl_LF one = cl_I_to_LF(1,actuallen); var cl_LF a = one; var cl_LF wa = one; var cl_LF b = sqrt(scale_float(one,-1)); var cl_LF wb = sqrt(b); // We keep a = wa^2, b = wb^2. var uintL k = 0; var cl_LF t = scale_float(one,-1); until (TheLfloat(wa-wb)->expo < uexp_limit) { // |wa-wb| < 2^-n -> fertig var cl_LF wawb = wa*wb; var cl_LF new_wa = scale_float(wa+wb,-1); var cl_LF a_b = scale_float(a+b,-1); var cl_LF new_a = scale_float(a_b+wawb,-1); var cl_LF new_b = sqrt(wawb*a_b); var cl_LF new_wb = sqrt(new_b); t = t - scale_float((a - a_b)*(a + a_b),k); a = new_a; wa = new_wa; b = new_b; wb = new_wb; k += 2; } var cl_LF pires = square(a)/t; return shorten(pires,len); // verkürzen und fertig } // Bit complexity (N := len): O(log(N)*M(N)). const cl_LF compute_pi_ramanujan_163 (uintC len) { // 1/pi = 1/sqrt(-1728 J) // * sum(n=0..infty, (6n)! (A+nB) / 12^(3n) (3n)! n!^3 J^n) // mit J = -53360^3 = - (2^4 5 23 29)^3 // A = 163096908 = 2^2 3 13 1045493 // B = 6541681608 = 2^3 3^3 7 11 19 127 163 // See [Jörg Arndt], formulas (4.27)-(4.30). // This is also the formula used in Pari. // The absolute value of the n-th summand is approximately // |J|^-n * n^(-1/2) * B/(2*pi^(3/2)), // hence every summand gives more than 14 new decimal digits // in precision. // The sum is best evaluated using fixed-point arithmetic, // so that the precision is reduced for the later summands. var uintC actuallen = len + 4; // 4 guard digits var sintC scale = intDsize*actuallen; static const cl_I A = "163096908"; static const cl_I B = "6541681608"; //static const cl_I J1 = "10939058860032000"; // 72*abs(J) static const cl_I J2 = "333833583375"; // odd part of J1 var cl_I sum = 0; var cl_I n = 0; var cl_I factor = ash(1,scale); while (!zerop(factor)) { sum = sum + factor * (A+n*B); factor = factor * ((6*n+1)*(2*n+1)*(6*n+5)); n = n+1; factor = truncate1(factor,n*n*n*J2); // Finally divide by 2^15 and change sign. if (minusp(factor)) factor = (-factor) >> 15; else factor = -(factor >> 15); } var cl_LF fsum = scale_float(cl_I_to_LF(sum,actuallen),-scale); static const cl_I J3 = "262537412640768000"; // -1728*J var cl_LF pires = sqrt(cl_I_to_LF(J3,actuallen)) / fsum; return shorten(pires,len); // verkürzen und fertig } // Bit complexity (N := len): O(N^2). #if defined(__mips__) && !defined(__GNUC__) // workaround SGI CC bug #define A A_fast #define B B_fast #define J3 J3_fast #endif const cl_LF compute_pi_ramanujan_163_fast (uintC len) { // Same formula as above, using a binary splitting evaluation. // See [Borwein, Borwein, section 10.2.3]. struct rational_series_stream : cl_pqa_series_stream { uintC n; static cl_pqa_series_term computenext (cl_pqa_series_stream& thisss) { static const cl_I A = "163096908"; static const cl_I B = "6541681608"; static const cl_I J1 = "10939058860032000"; // 72*abs(J) var rational_series_stream& thiss = (rational_series_stream&)thisss; var uintC n = thiss.n; var cl_pqa_series_term result; if (n==0) { result.p = 1; result.q = 1; } else { result.p = -((cl_I)(6*n-5)*(cl_I)(2*n-1)*(cl_I)(6*n-1)); result.q = (cl_I)n*(cl_I)n*(cl_I)n*J1; } result.a = A+n*B; thiss.n = n+1; return result; } rational_series_stream () : cl_pqa_series_stream (rational_series_stream::computenext), n (0) {} } series; var uintC actuallen = len + 4; // 4 guard digits static const cl_I A = "163096908"; static const cl_I B = "6541681608"; static const cl_I J1 = "10939058860032000"; // 72*abs(J) // Evaluate a sum(0 <= n < N, a(n)/b(n) * (p(0)...p(n))/(q(0)...q(n))) // with appropriate N, and // a(n) = A+n*B, b(n) = 1, // p(n) = -(6n-5)(2n-1)(6n-1) for n>0, // q(n) = 72*|J|*n^3 for n>0. var const uintC n_slope = (uintC)(intDsize*32*0.02122673)+1; // n_slope >= 32*intDsize*log(2)/log(|J|), normally n_slope = 22. var uintC N = (n_slope*actuallen)/32 + 1; // N > intDsize*log(2)/log(|J|) * actuallen, hence // |J|^-N < 2^(-intDsize*actuallen). var cl_LF fsum = eval_rational_series(N,series,actuallen,actuallen); static const cl_I J3 = "262537412640768000"; // -1728*J var cl_LF pires = sqrt(cl_I_to_LF(J3,actuallen)) / fsum; return shorten(pires,len); // verkürzen und fertig } // Bit complexity (N := len): O(log(N)^2*M(N)). // Timings of the above algorithms, on an i486 33 MHz, running Linux. // N Brent Brent4 R 163 R 163 fast // 10 0.0079 0.0079 0.0052 0.0042 // 25 0.026 0.026 0.014 0.012 // 50 0.085 0.090 0.037 0.033 // 100 0.29 0.29 0.113 0.098 // 250 1.55 1.63 0.60 0.49 // 500 5.7 5.7 2.24 1.71 // 1000 21.6 22.9 8.5 5.5 // 2500 89 95 49 19.6 // 5000 217 218 188 49 // 10000 509 540 747 117 // 25000 1304 1310 4912 343 // We see that // - "Brent4" isn't worth it: No speed improvement over "Brent". // - "R 163" is pretty fast at the beginning, but it is an O(N^2) // algorithm, hence it loses in the end, // - "R 163 fast", which uses the same formula as "R 163", but evaluates // it using binary splitting, is an O(log N * M(N)) algorithm, and // outperforms all of the others. const cl_LF pi (uintC len) { var uintC oldlen = TheLfloat(cl_LF_pi())->len; // vorhandene Länge if (len < oldlen) return shorten(cl_LF_pi(),len); if (len == oldlen) return cl_LF_pi(); // TheLfloat(cl_LF_pi())->len um mindestens einen konstanten Faktor // > 1 wachsen lassen, damit es nicht zu häufig nachberechnet wird: var uintC newlen = len; oldlen += floor(oldlen,2); // oldlen * 3/2 if (newlen < oldlen) newlen = oldlen; // gewünschte > vorhandene Länge -> muß nachberechnen: cl_LF_pi() = compute_pi_ramanujan_163_fast(newlen); return (len < newlen ? shorten(cl_LF_pi(),len) : cl_LF_pi()); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_exp1.cc0000644000000000000000000000537011201634737016315 0ustar // exp1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "cln/lfloat.h" #include "float/transcendental/cl_LF_tran.h" #include "float/lfloat/cl_LF.h" #include "cln/integer.h" #undef floor #include #define floor cln_floor namespace cln { const cl_LF compute_exp1 (uintC len) { // Evaluate a sum(0 <= n < N, a(n)/b(n) * (p(0)...p(n))/(q(0)...q(n))) // with appropriate N, and // a(n) = 1, b(n) = 1, p(n) = 1, q(n) = n for n>0. var uintC actuallen = len+1; // 1 guard digit // How many terms do we need for M bits of precision? N terms suffice, // provided that // 1/N! < 2^-M // <== N*(log(N)-1) > M*log(2) // First approximation: // N0 = M will suffice, so put N<=N0. // Second approximation: // N1 = floor(M*log(2)/(log(N0)-1)), slightly too small, so put N>=N1. // Third approximation: // N2 = ceiling(M*log(2)/(log(N1)-1)), slightly too large. // N = N2+2, two more terms for safety. var uintC N0 = intDsize*actuallen; var uintC N1 = (uintC)(0.693147*intDsize*actuallen/(::log((double)N0)-1.0)); var uintC N2 = (uintC)(0.693148*intDsize*actuallen/(::log((double)N1)-1.0))+1; var uintC N = N2+2; struct rational_series_stream : cl_q_series_stream { var uintC n; static cl_q_series_term computenext (cl_q_series_stream& thisss) { var rational_series_stream& thiss = (rational_series_stream&)thisss; var uintC n = thiss.n; var cl_q_series_term result; result.q = (n==0 ? 1 : n); thiss.n = n+1; return result; } rational_series_stream() : cl_q_series_stream (rational_series_stream::computenext), n(0) {} } series; var cl_LF fsum = eval_rational_series(N,series,actuallen); return shorten(fsum,len); // verkürzen und fertig } // Bit complexity (N = len): O(log(N)*M(N)). // Timings of the above algorithm, on an i486 33 MHz, running Linux. // N // 10 0.0040 // 25 0.0096 // 50 0.0218 // 100 0.057 // 250 0.24 // 500 0.78 // 1000 2.22 // 2500 7.6 // 5000 17.8 // 10000 41.4 // 25000 111 // 50000 254 const cl_LF exp1 (uintC len) { var uintC oldlen = TheLfloat(cl_LF_exp1())->len; // vorhandene Länge if (len < oldlen) return shorten(cl_LF_exp1(),len); if (len == oldlen) return cl_LF_exp1(); // TheLfloat(cl_LF_exp1())->len um mindestens einen konstanten Faktor // > 1 wachsen lassen, damit es nicht zu häufig nachberechnet wird: var uintC newlen = len; oldlen += floor(oldlen,2); // oldlen * 3/2 if (newlen < oldlen) newlen = oldlen; // gewünschte > vorhandene Länge -> muß nachberechnen: cl_LF_exp1() = compute_exp1(newlen); // (exp 1) return (len < newlen ? shorten(cl_LF_exp1(),len) : cl_LF_exp1()); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_ratseries_.cc0000644000000000000000000000201711201634737017573 0ustar // eval_rational_series(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_LF_tran.h" // Implementation. #include "cln/lfloat.h" #include "cln/integer.h" #include "float/lfloat/cl_LF.h" namespace cln { // Subroutine. // Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n))) // and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1) // and T = B*Q*S (all integers). On entry N1 < N2. // P will not be computed if a NULL pointer is passed. static inline void eval__series_aux (uintC N1, uintC N2, const cl__series& args, cl_I* T) { unused args; *T = N2-N1; } const cl_LF eval_rational_series (uintC N, const cl__series& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I T; eval__series_aux(0,N,args,&T); return cl_I_to_LF(T,len); } // Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))): // O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_exp1_var.h0000644000000000000000000000141211201634737016704 0ustar { #if CL_DS_BIG_ENDIAN_P #if (intDsize==8) D1(0xAD), D1(0xF8), D1(0x54), D1(0x58), D1(0xA2), D1(0xBB), D1(0x4A), D1(0x9B) #endif #if (intDsize==16) D2(0xAD,0xF8), D2(0x54,0x58), D2(0xA2,0xBB), D2(0x4A,0x9B) #endif #if (intDsize==32) D4(0xAD,0xF8,0x54,0x58), D4(0xA2,0xBB,0x4A,0x9B) #endif #if (intDsize==64) D8(0xAD,0xF8,0x54,0x58,0xA2,0xBB,0x4A,0x9B) #endif #else #if (intDsize==8) D1(0x9B), D1(0x4A), D1(0xBB), D1(0xA2), D1(0x58), D1(0x54), D1(0xF8), D1(0xAD) #endif #if (intDsize==16) D2(0x4A,0x9B), D2(0xA2,0xBB), D2(0x54,0x58), D2(0xAD,0xF8) #endif #if (intDsize==32) D4(0xA2,0xBB,0x4A,0x9B), D4(0xAD,0xF8,0x54,0x58) #endif #if (intDsize==64) D8(0xAD,0xF8,0x54,0x58,0xA2,0xBB,0x4A,0x9B) #endif #endif } ; cln-1.3.3/src/float/transcendental/cl_F_coshsinh.cc0000644000000000000000000000472311201634737017143 0ustar // cosh_sinh(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/transcendental/cl_F_tran.h" #include "float/cl_F.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { const cosh_sinh_t cosh_sinh (const cl_F& x) { // Methode: // Genauigkeit erhöhen, // e := Exponent aus (decode-float x), d := (float-digits x) // falls x=0.0 oder e<=(1-d)/2 liefere (1.0,x) // (denn bei e<=(1-d)/2 ist // 1 <= sinh(x)/x < cosh(x) = 1+x^2/2+... < 1+2^(-d), // also ist cosh(x), auf d Bits gerundet, gleich 1.0 // und sinh(x), auf d Bits gerundet, gleich x). // falls e<0: // y:=(sinh(x)/x)^2 errechnen, // cosh(x) = sqrt(1+x^2*y) und sinh(x) = x*sqrt(y) errechnen. // falls e>=0: y:=exp(x) errechnen, // (scale-float (+ y (/ y)) -1) und (scale-float (- y (/ y)) -1) bilden. // Genauigkeit wieder verringern. var sintE e = float_exponent(x); if (e < 0) { // Exponent e abtesten // e<0 if (zerop(x) || (e <= (1-(sintC)float_digits(x))>>1)) // e <= (1-d)/2 <==> e <= -ceiling((d-1)/2) return cosh_sinh_t(cl_float(1,x),x); // Rechengenauigkeit erhöhen if (longfloatp(x)) { DeclareType(cl_LF,x); #if 0 if (TheLfloat(x)->len >= infty) { var cl_LF xx = extend(x,TheLfloat(x)->len+1); var cl_LF_cosh_sinh_t hyp = cl_coshsinh_ratseries(xx); return cosh_sinh_t( cl_float(hyp.cosh,x), cl_float(hyp.sinh,x) ); } else #endif if (TheLfloat(x)->len >= 585) { // verwende exp(x), schneller als cl_coshsinh_ratseries var cl_LF xx = extend(x,TheLfloat(x)->len+ceiling((uintE)(-e),intDsize)); var cl_F y = exp(xx); var cl_F y_inv = recip(y); return cosh_sinh_t( cl_float(scale_float(y + y_inv, -1), x), cl_float(scale_float(y - y_inv, -1), x) ); } else { var cl_LF xx = The(cl_LF)(cl_F_extendsqrt(x)); var cl_LF y = sinhx_naive(xx); var cl_LF z = sqrt(y); if (minusp(xx)) z = -z; return cosh_sinh_t( cl_float(sqrt(1+y),x), // sqrt(1+y) cl_float(z,x) ); } } else { var cl_F xx = cl_F_extendsqrt(x); var cl_F y = sinhxbyx_naive(xx); return cosh_sinh_t( cl_float(sqrt(1+square(xx)*y),x), // sqrt(1+x^2*y) cl_float(xx*sqrt(y),x) ); } } else { // e>=0 -> verwende exp(x) var cl_F y = exp(x); var cl_F y_inv = recip(y); return cosh_sinh_t( scale_float(y+y_inv,-1), scale_float(y-y_inv,-1) ); } } } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_ln10_f.cc0000644000000000000000000000057411201634737016404 0ustar // cl_ln10(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "float/cl_F.h" namespace cln { const cl_F cl_ln10 (float_format_t f) { floatformatcase((uintC)f , return cl_SF_ln10(); , return cl_FF_ln10(); , return cl_DF_ln10(); , return cl_ln10(len); ); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_catalanconst_var.cc0000644000000000000000000000206311201634737020642 0ustar // cl_F_catalanconst. // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "base/digitseq/cl_DS.h" #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "float/cl_F.h" namespace cln { cl_LF& cl_LF_catalanconst() { // Mantisse der Catalanschen Konstante : static const uintD catalanconst_mantisse [64/intDsize] = #include "cl_F_catalanconst_var.h" static cl_LF val = encode_LF_array(0,0,catalanconst_mantisse,64/intDsize); return val; } // Problem: If someone changes free_hook, the destructor of this // will call the new hook, passing it some pointer obtained by the old // malloc_hook. ?? const cl_SF& cl_SF_catalanconst() { static const cl_SF val = cl_LF_to_SF(cl_LF_catalanconst()); return val; } const cl_DF& cl_DF_catalanconst() { static const cl_DF val = cl_LF_to_DF(cl_LF_catalanconst()); return val; } const cl_FF& cl_FF_catalanconst() { static const cl_FF val = cl_LF_to_FF(cl_LF_catalanconst()); return val; } } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_catalanconst_f.cc0000644000000000000000000000067211201634737020303 0ustar // catalanconst(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/transcendental/cl_F_tran.h" namespace cln { const cl_F catalanconst (float_format_t f) { floatformatcase((uintC)f , return cl_SF_catalanconst(); , return cl_FF_catalanconst(); , return cl_DF_catalanconst(); , return catalanconst(len); ); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_coshsinh_aux.cc0000644000000000000000000000666011201634737020136 0ustar // cl_coshsinh_aux(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "cln/lfloat.h" #include "float/transcendental/cl_LF_tran.h" #include "float/lfloat/cl_LF.h" #include "cln/integer.h" #include "base/cl_alloca.h" #include "cln/exception.h" #undef floor #include #define floor cln_floor namespace cln { // Computing cosh(x) = sqrt(1+sinh(x)^2) instead of computing separately // by a power series evaluation brings 20% speedup, even more for small lengths. #define TRIVIAL_SPEEDUP const cl_LF_cosh_sinh_t cl_coshsinh_aux (const cl_I& p, uintE lq, uintC len) { { Mutable(cl_I,p); var uintE lp = integer_length(p); // now |p| < 2^lp. if (!(lp <= lq)) throw runtime_exception(); lp = lq - lp; // now |p/2^lq| < 2^-lp. // Minimize lq (saves computation time). { var uintC lp2 = ord2(p); if (lp2 > 0) { p = p >> lp2; lq = lq - lp2; } } // cosh(p/2^lq): // Evaluate a sum(0 <= n < N, a(n)/b(n) * (p(0)...p(n))/(q(0)...q(n))) // with appropriate N, and // a(n) = 1, b(n) = 1, // p(n) = p^2 for n>0, // q(n) = (2*n-1)*(2*n)*(2^lq)^2 for n>0. // sinh(p/2^lq): // Evaluate a sum(0 <= n < N, a(n)/b(n) * (p(0)...p(n))/(q(0)...q(n))) // with appropriate N, and // a(n) = 1, b(n) = 1, // p(0) = p, p(n) = p^2 for n>0, // q(0) = 2^lq, q(n) = (2*n)*(2*n+1)*(2^lq)^2 for n>0. var uintC actuallen = len+1; // 1 guard digit // How many terms do we need for M bits of precision? N/2 terms suffice, // provided that // 1/(2^(N*lp)*N!) < 2^-M // <== N*(log(N)-1)+N*lp*log(2) > M*log(2) // First approximation: // N0 = M will suffice, so put N<=N0. // Second approximation: // N1 = floor(M*log(2)/(log(N0)-1+lp*log(2))), slightly too small, // so put N>=N1. // Third approximation: // N2 = ceiling(M*log(2)/(log(N1)-1+lp*log(2))), slightly too large. // N = N2+2, two more terms for safety. var uintC N0 = intDsize*actuallen; var uintC N1 = (uintC)(0.693147*intDsize*actuallen/(::log((double)N0)-1.0+0.693148*lp)); var uintC N2 = (uintC)(0.693148*intDsize*actuallen/(::log((double)N1)-1.0+0.693147*lp))+1; var uintC N = N2+2; N = ceiling(N,2); CL_ALLOCA_STACK; var cl_I* pv = (cl_I*) cl_alloca(N*sizeof(cl_I)); var cl_I* qv = (cl_I*) cl_alloca(N*sizeof(cl_I)); var uintC n; var cl_I p2 = square(p); var cl_LF sinhsum; { init1(cl_I, pv[0]) (p); init1(cl_I, qv[0]) ((cl_I)1 << lq); for (n = 1; n < N; n++) { init1(cl_I, pv[n]) (p2); init1(cl_I, qv[n]) (((cl_I)n*(cl_I)(2*n+1)) << (2*lq+1)); } var cl_pq_series series; series.pv = pv; series.qv = qv; sinhsum = eval_rational_series(N,series,actuallen); for (n = 0; n < N; n++) { pv[n].~cl_I(); qv[n].~cl_I(); } } #if !defined(TRIVIAL_SPEEDUP) var cl_LF coshsum; { init1(cl_I, pv[0]) (1); init1(cl_I, qv[0]) (1); for (n = 1; n < N; n++) { init1(cl_I, pv[n]) (p2); init1(cl_I, qv[n]) (((cl_I)n*(cl_I)(2*n-1)) << (2*lq+1)); } var cl_pq_series series; series.pv = pv; series.qv = qv; coshsum = eval_rational_series(N,series,actuallen); for (n = 0; n < N; n++) { pv[n].~cl_I(); qv[n].~cl_I(); } } #else // TRIVIAL_SPEEDUP var cl_LF coshsum = sqrt(cl_I_to_LF(1,actuallen) + square(sinhsum)); #endif return cl_LF_cosh_sinh_t(shorten(coshsum,len),shorten(sinhsum,len)); // verkürzen und fertig }} // Bit complexity (N = len, and if p has length O(log N) and ql = O(log N)): // O(log(N)*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_atanhx.cc0000644000000000000000000001431411201634737016605 0ustar // atanhx(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" #include "float/cl_F.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" // Implementation. #include "cln/float.h" #include "base/cl_low.h" #include "base/cl_inline.h" #include "float/lfloat/elem/cl_LF_zerop.cc" #include "float/lfloat/elem/cl_LF_minusp.cc" #include "float/lfloat/misc/cl_LF_exponent.cc" namespace cln { // cl_F atanhx (const cl_F& x) // cl_LF atanhx (const cl_LF& x) // // Methode: // e := Exponent aus (decode-float x), d := (float-digits x) // Bei x=0.0 oder e<=-d/2 liefere x // (denn bei e<=-d/2 ist x^2 < 2^(-d), also // 1 <= atanh(x)/x = 1+x^2/3+x^4/5+... < 1+x^2/2 < 1+2^(-d-1) < 1+2^(-d), // also ist atanh(x)/x, auf d Bits gerundet, gleich 1.0). // Bei großem d verwende die Formel ln((1+x)/(1-x))/2 (asymptotisch schneller), // aber erhöhe die Genauigkeit, so daß beim Bilden von 1+x keine Bits verloren // gehen. // Bei e<=-sqrt(d) verwende die Potenzreihe // atanh(x)/x = sum(j=0..inf,(x^2)^j/(2j+1)): // a:=x^2, b:=1, i:=1, sum:=0, // while (/= sum (setq sum (+ sum (/ b i)))) do i:=i+2, b:=b*a. // Ergebnis x*sum. // Sonst setze y := x/(1+sqrt(1-x^2)), berechne rekursiv z:=atanh(y) // und liefere 2*z = (scale-float z 1). // Diese Rekursion wird entrekursiviert. Statt k mal hintereinander // x := x/(1+sqrt(1-x^2)) zu bilden, arbeitet man lieber mit den Kehrwerten, // setzt also x := 1/|x|, dann k mal x := x+sqrt(x^2-1), dann x := +- 1/x. // Aufwand: asymptotisch d^2.5 . const cl_LF atanhx (const cl_LF& x) { if (zerop_inline(x)) return x; var uintC actuallen = TheLfloat(x)->len; var uintC d = float_digits(x); var sintE e = float_exponent_inline(x); if (e <= (sintC)(-d)>>1) // e <= -d/2 <==> e <= -ceiling(d/2) return x; // ja -> x als Ergebnis if (actuallen >= 34) { DeclareType(cl_LF,x); var cl_LF xx = extend(x,TheLfloat(x)->len+ceiling((uintE)(-e),intDsize)); return cl_float(scale_float(ln((1+xx)/(1-xx)),-1),x); } var uintL k = 0; // Rekursionszähler k:=0 // Bei e <= -1-limit_slope*floor(sqrt(d)) kann die Potenzreihe // angewandt werden. limit_slope = 1.0 ist schlecht (ca. 15% zu // schlecht). Ein guter Wert ist: // für naive1: limit_scope = 0.625 = 5/8, // für naive2: limit_scope = 0.4 = 13/32. var uintL sqrt_d = floor(isqrtC(d)*13,32); // limit_slope*floor(sqrt(d)) var cl_LF xx = x; if (e >= (sintL)(-sqrt_d)) { // e > -1-limit_slope*floor(sqrt(d)) -> muß |x| verkleinern. var sintL e_limit = 1+sqrt_d; // 1+limit_slope*floor(sqrt(d)) xx = recip(abs(xx)); // 1/|x| do { // nächstes x nach der Formel x := x+sqrt(x^2 - 1) berechnen: xx = sqrt(square(xx) + cl_float(-1,xx)) + xx; k = k+1; } until (float_exponent_inline(xx) > e_limit); // Schleifenende mit Exponent(x) > 1+limit_slope*floor(sqrt(d)), // also x >= 2^(1+limit_slope*floor(sqrt(d))), // also 1/x <= 2^(-1-limit_slope*floor(sqrt(d))). // Nun kann die Potenzreihe auf 1/x angewandt werden. xx = recip(xx); if (minusp_inline(x)) xx = - xx; // Vorzeichen wieder rein } // Potenzreihe anwenden: var int i = 1; var cl_LF a = square(xx); // a = x^2 var cl_LF b = cl_float(1,xx); // b := (float 1 x) var cl_LF sum = cl_float(0,xx); // sum := (float 0 x) if (0) { // naive1: // floating-point representation loop { var cl_LF new_sum = sum + b/(cl_I)i; // (+ sum (/ b i)) if (new_sum == sum) // = sum ? break; // ja -> Potenzreihe abbrechen sum = new_sum; b = b*a; i = i+2; } } else { // naive2: // floating-point representation with smooth precision reduction var cl_LF eps = scale_float(b,-(sintC)d-10); loop { var cl_LF new_sum = sum + LF_to_LF(b/(cl_I)i,actuallen); // (+ sum (/ b i)) if (new_sum == sum) // = sum ? break; // ja -> Potenzreihe abbrechen sum = new_sum; b = cl_LF_shortenwith(b,eps); b = b*a; i = i+2; } } var cl_LF erg = sum*xx; // sum*x als Ergebnis return scale_float(erg,k); // wegen Rekursion noch mal 2^k } // Bit complexity (N = length(x)): O(log(N)^2*M(N)). const cl_F atanhx (const cl_F& x) { if (longfloatp(x)) { DeclareType(cl_LF,x); return atanhx(x); } if (zerop(x)) return x; var uintC d = float_digits(x); var sintE e = float_exponent(x); if (e <= (sintC)(-d)>>1) // e <= -d/2 <==> e <= -ceiling(d/2) return x; // ja -> x als Ergebnis var uintL k = 0; // Rekursionszähler k:=0 // Bei e <= -1-limit_slope*floor(sqrt(d)) kann die Potenzreihe // angewandt werden. limit_slope = 1.0 ist schlecht (ca. 15% zu // schlecht). Ein guter Wert ist limit_scope = 0.625 = 5/8. var uintL sqrt_d = floor(isqrtC(d)*5,8); // limit_slope*floor(sqrt(d)) var cl_F xx = x; if (e >= (sintL)(-sqrt_d)) { // e > -1-limit_slope*floor(sqrt(d)) -> muß |x| verkleinern. var sintL e_limit = 1+sqrt_d; // 1+limit_slope*floor(sqrt(d)) xx = recip(abs(xx)); // 1/|x| do { // nächstes x nach der Formel x := x+sqrt(x^2 - 1) berechnen: xx = sqrt(square(xx) + cl_float(-1,xx)) + xx; k = k+1; } until (float_exponent(xx) > e_limit); // Schleifenende mit Exponent(x) > 1+limit_slope*floor(sqrt(d)), // also x >= 2^(1+limit_slope*floor(sqrt(d))), // also 1/x <= 2^(-1-limit_slope*floor(sqrt(d))). // Nun kann die Potenzreihe auf 1/x angewandt werden. xx = recip(xx); if (minusp(x)) xx = - xx; // Vorzeichen wieder rein } // Potenzreihe anwenden: var int i = 1; var cl_F a = square(xx); // a = x^2 var cl_F b = cl_float(1,xx); // b := (float 1 x) var cl_F sum = cl_float(0,xx); // sum := (float 0 x) loop { var cl_F new_sum = sum + b / (cl_I)i; // (+ sum (/ b i)) if (new_sum == sum) // = sum ? break; // ja -> Potenzreihe abbrechen sum = new_sum; b = b*a; i = i+2; } var cl_F erg = sum*xx; // sum*x als Ergebnis return scale_float(erg,k); // wegen Rekursion noch mal 2^k } // Bit complexity (N = length(x)): O(log(N)^2*M(N)). // Timings of the above algorithms, on an i486 33 MHz, running Linux, // applied to x = sqrt(2)-1 = 0.414... // N naive1 naive2 use ln // 10 0.013 0.013 0.015 // 25 0.064 0.050 0.049 // 50 0.25 0.018 0.17 // 100 1.07 0.75 0.64 // 250 7.6 5.2 2.7 // 500 35.5 24.2 9.7 // 1000 168 116 29.6 // ==> using ln faster for N >= 34. } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_exp1_f.cc0000644000000000000000000000061211201634737016500 0ustar // exp1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/transcendental/cl_F_tran.h" #include "float/cl_F.h" namespace cln { const cl_F exp1 (float_format_t f) { floatformatcase((uintC)f , return cl_SF_exp1(); , return cl_FF_exp1(); , return cl_DF_exp1(); , return exp1(len); ); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_cossin.cc0000644000000000000000000000307611201634737016737 0ustar // cl_cossin_ratseries(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" #include "cln/integer.h" namespace cln { inline const cl_LF_cos_sin_t operator* (const cl_LF_cos_sin_t& a, const cl_LF_cos_sin_t& b) { return cl_LF_cos_sin_t(a.cos*b.cos-a.sin*b.sin,a.sin*b.cos+a.cos*b.sin); } const cl_LF_cos_sin_t cl_cossin_ratseries (const cl_LF& x) { // Similar to expx_ratseries. var uintC len = TheLfloat(x)->len; var cl_idecoded_float x_ = integer_decode_float(x); // x = (-1)^sign * 2^exponent * mantissa var uintE lq = cl_I_to_UE(- x_.exponent); var const cl_I& p = x_.mantissa; // Compute sin(p/2^lq) and cos(p/2^lq) by splitting into pieces. var bool first_factor = true; var cl_LF_cos_sin_t product; var uintE b1; var uintE b2; for (b1 = 0, b2 = 1; b1 < lq; b1 = b2, b2 = 2*b2) { // Piece containing bits b1+1..b2 after "decimal point" // in the binary representation of (p/2^lq). var uintE lqk = (lq >= b2 ? b2 : lq); var cl_I pk = ldb(p,cl_byte(lqk-b1,lq-lqk)); // Compute sin(pk/2^lqk) and cos(pk/2^lqk). if (!zerop(pk)) { if (minusp(x_.sign)) { pk = -pk; } var cl_LF_cos_sin_t factor = cl_cossin_aux(pk,lqk,len); if (first_factor) { product = factor; first_factor = false; } else product = product * factor; } } if (first_factor) return cl_LF_cos_sin_t(cl_I_to_LF(1,len),cl_I_to_LF(0,len)); else return product; } // Bit complexity (N = length(x)): O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_sinh.cc0000644000000000000000000000432011201634737016257 0ustar // sinh(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/transcendental/cl_F_tran.h" #include "float/cl_F.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F sinh (const cl_F& x) { // Methode: // Genauigkeit erhöhen, // e := Exponent aus (decode-float x) // falls e<0: (sinh(x)/x)^2 errechnen, Wurzel ziehen, mit x multiplizieren. // falls e>=0: y:=exp(x) errechnen, (scale-float (- y (/ y)) -1) bilden. if (float_exponent(x) < 0) { // Exponent e abtesten // e<0 // Rechengenauigkeit erhöhen if (longfloatp(x)) { DeclareType(cl_LF,x); #if 0 if (TheLfloat(x)->len >= infty) { var cl_LF xx = extend(x,TheLfloat(x)->len+1); var cl_LF_cosh_sinh_t hyp = cl_coshsinh_ratseries(xx); return cl_float(hyp.sinh,x); } else #endif if ((TheLfloat(x)->len >= 500) && (float_exponent(x) > (-(sintC)float_digits(x))>>1)) { // verwende exp(x), schneller als cl_coshsinh_ratseries // (aber nur bei 0 > e > -d/2, denn wir müssen, um // Auslöschung zu verhindern, |e| Bits dazunehmen) var cl_LF xx = extend(x,TheLfloat(x)->len+ceiling((uintE)(-float_exponent(x)),intDsize)); var cl_F y = exp(xx); var cl_F z = scale_float(y - recip(y), -1); // (/ (- y (/ y)) 2) return cl_float(z,x); } else { var cl_LF xx = The(cl_LF)(cl_F_extendsqrt(x)); // Wurzel aus sinh(x)^2 bilden var cl_LF z = sqrt(sinhx_naive(xx)); if (minusp(xx)) z = -z; return cl_float(z,x); } } else { var cl_F xx = cl_F_extendsqrt(x); // Wurzel aus (sinh(x)/x)^2 mit x multiplizieren und wieder runden return cl_float(sqrt(sinhxbyx_naive(xx))*xx,x); } } else { // e>=0 -> verwende exp(x) var cl_F y = exp(x); return scale_float(y - recip(y), -1); // (/ (- y (/ y)) 2) } } // Timings of the two algorithms, on an i486 33 MHz, running Linux, // applied to x = sqrt(2)-1 = 0.414... // N naive ratseries // 10 0.008 0.037 // 25 0.034 0.115 // 50 0.13 0.33 // 100 0.50 1.07 // 250 3.3 5.2 // 500 14.2 18.8 // 1000 59 61 // 2500 297 247 // ==> ratseries faster for N >= 1300. } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_pi_var.h0000644000000000000000000003576411201634737016460 0ustar { #if CL_DS_BIG_ENDIAN_P #if (intDsize==8) D1(0xC9), D1(0x0F), D1(0xDA), D1(0xA2), D1(0x21), D1(0x68), D1(0xC2), D1(0x34), D1(0xC4), D1(0xC6), D1(0x62), D1(0x8B), D1(0x80), D1(0xDC), D1(0x1C), D1(0xD1), D1(0x29), D1(0x02), D1(0x4E), D1(0x08), D1(0x8A), D1(0x67), D1(0xCC), D1(0x74), D1(0x02), D1(0x0B), D1(0xBE), D1(0xA6), D1(0x3B), D1(0x13), D1(0x9B), D1(0x22), D1(0x51), D1(0x4A), D1(0x08), D1(0x79), D1(0x8E), D1(0x34), D1(0x04), D1(0xDD), D1(0xEF), D1(0x95), D1(0x19), D1(0xB3), D1(0xCD), D1(0x3A), D1(0x43), D1(0x1B), D1(0x30), D1(0x2B), D1(0x0A), D1(0x6D), D1(0xF2), D1(0x5F), D1(0x14), D1(0x37), D1(0x4F), D1(0xE1), D1(0x35), D1(0x6D), D1(0x6D), D1(0x51), D1(0xC2), D1(0x45), D1(0xE4), D1(0x85), D1(0xB5), D1(0x76), D1(0x62), D1(0x5E), D1(0x7E), D1(0xC6), D1(0xF4), D1(0x4C), D1(0x42), D1(0xE9), D1(0xA6), D1(0x37), D1(0xED), D1(0x6B), D1(0x0B), D1(0xFF), D1(0x5C), D1(0xB6), D1(0xF4), D1(0x06), D1(0xB7), D1(0xED), D1(0xEE), D1(0x38), D1(0x6B), D1(0xFB), D1(0x5A), D1(0x89), D1(0x9F), D1(0xA5), D1(0xAE), D1(0x9F), D1(0x24), D1(0x11), D1(0x7C), D1(0x4B), D1(0x1F), D1(0xE6), D1(0x49), D1(0x28), D1(0x66), D1(0x51), D1(0xEC), D1(0xE4), D1(0x5B), D1(0x3D), D1(0xC2), D1(0x00), D1(0x7C), D1(0xB8), D1(0xA1), D1(0x63), D1(0xBF), D1(0x05), D1(0x98), D1(0xDA), D1(0x48), D1(0x36), D1(0x1C), D1(0x55), D1(0xD3), D1(0x9A), D1(0x69), D1(0x16), D1(0x3F), D1(0xA8), D1(0xFD), D1(0x24), D1(0xCF), D1(0x5F), D1(0x83), D1(0x65), D1(0x5D), D1(0x23), D1(0xDC), D1(0xA3), D1(0xAD), D1(0x96), D1(0x1C), D1(0x62), D1(0xF3), D1(0x56), D1(0x20), D1(0x85), D1(0x52), D1(0xBB), D1(0x9E), D1(0xD5), D1(0x29), D1(0x07), D1(0x70), D1(0x96), D1(0x96), D1(0x6D), D1(0x67), D1(0x0C), D1(0x35), D1(0x4E), D1(0x4A), D1(0xBC), D1(0x98), D1(0x04), D1(0xF1), D1(0x74), D1(0x6C), D1(0x08), D1(0xCA), D1(0x18), D1(0x21), D1(0x7C), D1(0x32), D1(0x90), D1(0x5E), D1(0x46), D1(0x2E), D1(0x36), D1(0xCE), D1(0x3B), D1(0xE3), D1(0x9E), D1(0x77), D1(0x2C), D1(0x18), D1(0x0E), D1(0x86), D1(0x03), D1(0x9B), D1(0x27), D1(0x83), D1(0xA2), D1(0xEC), D1(0x07), D1(0xA2), D1(0x8F), D1(0xB5), D1(0xC5), D1(0x5D), D1(0xF0), D1(0x6F), D1(0x4C), D1(0x52), D1(0xC9), D1(0xDE), D1(0x2B), D1(0xCB), D1(0xF6), D1(0x95), D1(0x58), D1(0x17), D1(0x18), D1(0x39), D1(0x95), D1(0x49), D1(0x7C), D1(0xEA), D1(0x95), D1(0x6A), D1(0xE5), D1(0x15), D1(0xD2), D1(0x26), D1(0x18), D1(0x98), D1(0xFA), D1(0x05), D1(0x10), D1(0x15), D1(0x72), D1(0x8E), D1(0x5A), D1(0x8A), D1(0xAA), D1(0xC4), D1(0x2D), D1(0xAD), D1(0x33), D1(0x17), D1(0x0D), D1(0x04), D1(0x50), D1(0x7A), D1(0x33), D1(0xA8), D1(0x55), D1(0x21), D1(0xAB), D1(0xDF), D1(0x1C), D1(0xBA), D1(0x65) #endif #if (intDsize==16) D2(0xC9,0x0F), D2(0xDA,0xA2), D2(0x21,0x68), D2(0xC2,0x34), D2(0xC4,0xC6), D2(0x62,0x8B), D2(0x80,0xDC), D2(0x1C,0xD1), D2(0x29,0x02), D2(0x4E,0x08), D2(0x8A,0x67), D2(0xCC,0x74), D2(0x02,0x0B), D2(0xBE,0xA6), D2(0x3B,0x13), D2(0x9B,0x22), D2(0x51,0x4A), D2(0x08,0x79), D2(0x8E,0x34), D2(0x04,0xDD), D2(0xEF,0x95), D2(0x19,0xB3), D2(0xCD,0x3A), D2(0x43,0x1B), D2(0x30,0x2B), D2(0x0A,0x6D), D2(0xF2,0x5F), D2(0x14,0x37), D2(0x4F,0xE1), D2(0x35,0x6D), D2(0x6D,0x51), D2(0xC2,0x45), D2(0xE4,0x85), D2(0xB5,0x76), D2(0x62,0x5E), D2(0x7E,0xC6), D2(0xF4,0x4C), D2(0x42,0xE9), D2(0xA6,0x37), D2(0xED,0x6B), D2(0x0B,0xFF), D2(0x5C,0xB6), D2(0xF4,0x06), D2(0xB7,0xED), D2(0xEE,0x38), D2(0x6B,0xFB), D2(0x5A,0x89), D2(0x9F,0xA5), D2(0xAE,0x9F), D2(0x24,0x11), D2(0x7C,0x4B), D2(0x1F,0xE6), D2(0x49,0x28), D2(0x66,0x51), D2(0xEC,0xE4), D2(0x5B,0x3D), D2(0xC2,0x00), D2(0x7C,0xB8), D2(0xA1,0x63), D2(0xBF,0x05), D2(0x98,0xDA), D2(0x48,0x36), D2(0x1C,0x55), D2(0xD3,0x9A), D2(0x69,0x16), D2(0x3F,0xA8), D2(0xFD,0x24), D2(0xCF,0x5F), D2(0x83,0x65), D2(0x5D,0x23), D2(0xDC,0xA3), D2(0xAD,0x96), D2(0x1C,0x62), D2(0xF3,0x56), D2(0x20,0x85), D2(0x52,0xBB), D2(0x9E,0xD5), D2(0x29,0x07), D2(0x70,0x96), D2(0x96,0x6D), D2(0x67,0x0C), D2(0x35,0x4E), D2(0x4A,0xBC), D2(0x98,0x04), D2(0xF1,0x74), D2(0x6C,0x08), D2(0xCA,0x18), D2(0x21,0x7C), D2(0x32,0x90), D2(0x5E,0x46), D2(0x2E,0x36), D2(0xCE,0x3B), D2(0xE3,0x9E), D2(0x77,0x2C), D2(0x18,0x0E), D2(0x86,0x03), D2(0x9B,0x27), D2(0x83,0xA2), D2(0xEC,0x07), D2(0xA2,0x8F), D2(0xB5,0xC5), D2(0x5D,0xF0), D2(0x6F,0x4C), D2(0x52,0xC9), D2(0xDE,0x2B), D2(0xCB,0xF6), D2(0x95,0x58), D2(0x17,0x18), D2(0x39,0x95), D2(0x49,0x7C), D2(0xEA,0x95), D2(0x6A,0xE5), D2(0x15,0xD2), D2(0x26,0x18), D2(0x98,0xFA), D2(0x05,0x10), D2(0x15,0x72), D2(0x8E,0x5A), D2(0x8A,0xAA), D2(0xC4,0x2D), D2(0xAD,0x33), D2(0x17,0x0D), D2(0x04,0x50), D2(0x7A,0x33), D2(0xA8,0x55), D2(0x21,0xAB), D2(0xDF,0x1C), D2(0xBA,0x65) #endif #if (intDsize==32) D4(0xC9,0x0F,0xDA,0xA2), D4(0x21,0x68,0xC2,0x34), D4(0xC4,0xC6,0x62,0x8B), D4(0x80,0xDC,0x1C,0xD1), D4(0x29,0x02,0x4E,0x08), D4(0x8A,0x67,0xCC,0x74), D4(0x02,0x0B,0xBE,0xA6), D4(0x3B,0x13,0x9B,0x22), D4(0x51,0x4A,0x08,0x79), D4(0x8E,0x34,0x04,0xDD), D4(0xEF,0x95,0x19,0xB3), D4(0xCD,0x3A,0x43,0x1B), D4(0x30,0x2B,0x0A,0x6D), D4(0xF2,0x5F,0x14,0x37), D4(0x4F,0xE1,0x35,0x6D), D4(0x6D,0x51,0xC2,0x45), D4(0xE4,0x85,0xB5,0x76), D4(0x62,0x5E,0x7E,0xC6), D4(0xF4,0x4C,0x42,0xE9), D4(0xA6,0x37,0xED,0x6B), D4(0x0B,0xFF,0x5C,0xB6), D4(0xF4,0x06,0xB7,0xED), D4(0xEE,0x38,0x6B,0xFB), D4(0x5A,0x89,0x9F,0xA5), D4(0xAE,0x9F,0x24,0x11), D4(0x7C,0x4B,0x1F,0xE6), D4(0x49,0x28,0x66,0x51), D4(0xEC,0xE4,0x5B,0x3D), D4(0xC2,0x00,0x7C,0xB8), D4(0xA1,0x63,0xBF,0x05), D4(0x98,0xDA,0x48,0x36), D4(0x1C,0x55,0xD3,0x9A), D4(0x69,0x16,0x3F,0xA8), D4(0xFD,0x24,0xCF,0x5F), D4(0x83,0x65,0x5D,0x23), D4(0xDC,0xA3,0xAD,0x96), D4(0x1C,0x62,0xF3,0x56), D4(0x20,0x85,0x52,0xBB), D4(0x9E,0xD5,0x29,0x07), D4(0x70,0x96,0x96,0x6D), D4(0x67,0x0C,0x35,0x4E), D4(0x4A,0xBC,0x98,0x04), D4(0xF1,0x74,0x6C,0x08), D4(0xCA,0x18,0x21,0x7C), D4(0x32,0x90,0x5E,0x46), D4(0x2E,0x36,0xCE,0x3B), D4(0xE3,0x9E,0x77,0x2C), D4(0x18,0x0E,0x86,0x03), D4(0x9B,0x27,0x83,0xA2), D4(0xEC,0x07,0xA2,0x8F), D4(0xB5,0xC5,0x5D,0xF0), D4(0x6F,0x4C,0x52,0xC9), D4(0xDE,0x2B,0xCB,0xF6), D4(0x95,0x58,0x17,0x18), D4(0x39,0x95,0x49,0x7C), D4(0xEA,0x95,0x6A,0xE5), D4(0x15,0xD2,0x26,0x18), D4(0x98,0xFA,0x05,0x10), D4(0x15,0x72,0x8E,0x5A), D4(0x8A,0xAA,0xC4,0x2D), D4(0xAD,0x33,0x17,0x0D), D4(0x04,0x50,0x7A,0x33), D4(0xA8,0x55,0x21,0xAB), D4(0xDF,0x1C,0xBA,0x65) #endif #if (intDsize==64) D8(0xC9,0x0F,0xDA,0xA2,0x21,0x68,0xC2,0x34), D8(0xC4,0xC6,0x62,0x8B,0x80,0xDC,0x1C,0xD1), D8(0x29,0x02,0x4E,0x08,0x8A,0x67,0xCC,0x74), D8(0x02,0x0B,0xBE,0xA6,0x3B,0x13,0x9B,0x22), D8(0x51,0x4A,0x08,0x79,0x8E,0x34,0x04,0xDD), D8(0xEF,0x95,0x19,0xB3,0xCD,0x3A,0x43,0x1B), D8(0x30,0x2B,0x0A,0x6D,0xF2,0x5F,0x14,0x37), D8(0x4F,0xE1,0x35,0x6D,0x6D,0x51,0xC2,0x45), D8(0xE4,0x85,0xB5,0x76,0x62,0x5E,0x7E,0xC6), D8(0xF4,0x4C,0x42,0xE9,0xA6,0x37,0xED,0x6B), D8(0x0B,0xFF,0x5C,0xB6,0xF4,0x06,0xB7,0xED), D8(0xEE,0x38,0x6B,0xFB,0x5A,0x89,0x9F,0xA5), D8(0xAE,0x9F,0x24,0x11,0x7C,0x4B,0x1F,0xE6), D8(0x49,0x28,0x66,0x51,0xEC,0xE4,0x5B,0x3D), D8(0xC2,0x00,0x7C,0xB8,0xA1,0x63,0xBF,0x05), D8(0x98,0xDA,0x48,0x36,0x1C,0x55,0xD3,0x9A), D8(0x69,0x16,0x3F,0xA8,0xFD,0x24,0xCF,0x5F), D8(0x83,0x65,0x5D,0x23,0xDC,0xA3,0xAD,0x96), D8(0x1C,0x62,0xF3,0x56,0x20,0x85,0x52,0xBB), D8(0x9E,0xD5,0x29,0x07,0x70,0x96,0x96,0x6D), D8(0x67,0x0C,0x35,0x4E,0x4A,0xBC,0x98,0x04), D8(0xF1,0x74,0x6C,0x08,0xCA,0x18,0x21,0x7C), D8(0x32,0x90,0x5E,0x46,0x2E,0x36,0xCE,0x3B), D8(0xE3,0x9E,0x77,0x2C,0x18,0x0E,0x86,0x03), D8(0x9B,0x27,0x83,0xA2,0xEC,0x07,0xA2,0x8F), D8(0xB5,0xC5,0x5D,0xF0,0x6F,0x4C,0x52,0xC9), D8(0xDE,0x2B,0xCB,0xF6,0x95,0x58,0x17,0x18), D8(0x39,0x95,0x49,0x7C,0xEA,0x95,0x6A,0xE5), D8(0x15,0xD2,0x26,0x18,0x98,0xFA,0x05,0x10), D8(0x15,0x72,0x8E,0x5A,0x8A,0xAA,0xC4,0x2D), D8(0xAD,0x33,0x17,0x0D,0x04,0x50,0x7A,0x33), D8(0xA8,0x55,0x21,0xAB,0xDF,0x1C,0xBA,0x65) #endif #else #if (intDsize==8) D1(0x65), D1(0xBA), D1(0x1C), D1(0xDF), D1(0xAB), D1(0x21), D1(0x55), D1(0xA8), D1(0x33), D1(0x7A), D1(0x50), D1(0x04), D1(0x0D), D1(0x17), D1(0x33), D1(0xAD), D1(0x2D), D1(0xC4), D1(0xAA), D1(0x8A), D1(0x5A), D1(0x8E), D1(0x72), D1(0x15), D1(0x10), D1(0x05), D1(0xFA), D1(0x98), D1(0x18), D1(0x26), D1(0xD2), D1(0x15), D1(0xE5), D1(0x6A), D1(0x95), D1(0xEA), D1(0x7C), D1(0x49), D1(0x95), D1(0x39), D1(0x18), D1(0x17), D1(0x58), D1(0x95), D1(0xF6), D1(0xCB), D1(0x2B), D1(0xDE), D1(0xC9), D1(0x52), D1(0x4C), D1(0x6F), D1(0xF0), D1(0x5D), D1(0xC5), D1(0xB5), D1(0x8F), D1(0xA2), D1(0x07), D1(0xEC), D1(0xA2), D1(0x83), D1(0x27), D1(0x9B), D1(0x03), D1(0x86), D1(0x0E), D1(0x18), D1(0x2C), D1(0x77), D1(0x9E), D1(0xE3), D1(0x3B), D1(0xCE), D1(0x36), D1(0x2E), D1(0x46), D1(0x5E), D1(0x90), D1(0x32), D1(0x7C), D1(0x21), D1(0x18), D1(0xCA), D1(0x08), D1(0x6C), D1(0x74), D1(0xF1), D1(0x04), D1(0x98), D1(0xBC), D1(0x4A), D1(0x4E), D1(0x35), D1(0x0C), D1(0x67), D1(0x6D), D1(0x96), D1(0x96), D1(0x70), D1(0x07), D1(0x29), D1(0xD5), D1(0x9E), D1(0xBB), D1(0x52), D1(0x85), D1(0x20), D1(0x56), D1(0xF3), D1(0x62), D1(0x1C), D1(0x96), D1(0xAD), D1(0xA3), D1(0xDC), D1(0x23), D1(0x5D), D1(0x65), D1(0x83), D1(0x5F), D1(0xCF), D1(0x24), D1(0xFD), D1(0xA8), D1(0x3F), D1(0x16), D1(0x69), D1(0x9A), D1(0xD3), D1(0x55), D1(0x1C), D1(0x36), D1(0x48), D1(0xDA), D1(0x98), D1(0x05), D1(0xBF), D1(0x63), D1(0xA1), D1(0xB8), D1(0x7C), D1(0x00), D1(0xC2), D1(0x3D), D1(0x5B), D1(0xE4), D1(0xEC), D1(0x51), D1(0x66), D1(0x28), D1(0x49), D1(0xE6), D1(0x1F), D1(0x4B), D1(0x7C), D1(0x11), D1(0x24), D1(0x9F), D1(0xAE), D1(0xA5), D1(0x9F), D1(0x89), D1(0x5A), D1(0xFB), D1(0x6B), D1(0x38), D1(0xEE), D1(0xED), D1(0xB7), D1(0x06), D1(0xF4), D1(0xB6), D1(0x5C), D1(0xFF), D1(0x0B), D1(0x6B), D1(0xED), D1(0x37), D1(0xA6), D1(0xE9), D1(0x42), D1(0x4C), D1(0xF4), D1(0xC6), D1(0x7E), D1(0x5E), D1(0x62), D1(0x76), D1(0xB5), D1(0x85), D1(0xE4), D1(0x45), D1(0xC2), D1(0x51), D1(0x6D), D1(0x6D), D1(0x35), D1(0xE1), D1(0x4F), D1(0x37), D1(0x14), D1(0x5F), D1(0xF2), D1(0x6D), D1(0x0A), D1(0x2B), D1(0x30), D1(0x1B), D1(0x43), D1(0x3A), D1(0xCD), D1(0xB3), D1(0x19), D1(0x95), D1(0xEF), D1(0xDD), D1(0x04), D1(0x34), D1(0x8E), D1(0x79), D1(0x08), D1(0x4A), D1(0x51), D1(0x22), D1(0x9B), D1(0x13), D1(0x3B), D1(0xA6), D1(0xBE), D1(0x0B), D1(0x02), D1(0x74), D1(0xCC), D1(0x67), D1(0x8A), D1(0x08), D1(0x4E), D1(0x02), D1(0x29), D1(0xD1), D1(0x1C), D1(0xDC), D1(0x80), D1(0x8B), D1(0x62), D1(0xC6), D1(0xC4), D1(0x34), D1(0xC2), D1(0x68), D1(0x21), D1(0xA2), D1(0xDA), D1(0x0F), D1(0xC9) #endif #if (intDsize==16) D2(0xBA,0x65), D2(0xDF,0x1C), D2(0x21,0xAB), D2(0xA8,0x55), D2(0x7A,0x33), D2(0x04,0x50), D2(0x17,0x0D), D2(0xAD,0x33), D2(0xC4,0x2D), D2(0x8A,0xAA), D2(0x8E,0x5A), D2(0x15,0x72), D2(0x05,0x10), D2(0x98,0xFA), D2(0x26,0x18), D2(0x15,0xD2), D2(0x6A,0xE5), D2(0xEA,0x95), D2(0x49,0x7C), D2(0x39,0x95), D2(0x17,0x18), D2(0x95,0x58), D2(0xCB,0xF6), D2(0xDE,0x2B), D2(0x52,0xC9), D2(0x6F,0x4C), D2(0x5D,0xF0), D2(0xB5,0xC5), D2(0xA2,0x8F), D2(0xEC,0x07), D2(0x83,0xA2), D2(0x9B,0x27), D2(0x86,0x03), D2(0x18,0x0E), D2(0x77,0x2C), D2(0xE3,0x9E), D2(0xCE,0x3B), D2(0x2E,0x36), D2(0x5E,0x46), D2(0x32,0x90), D2(0x21,0x7C), D2(0xCA,0x18), D2(0x6C,0x08), D2(0xF1,0x74), D2(0x98,0x04), D2(0x4A,0xBC), D2(0x35,0x4E), D2(0x67,0x0C), D2(0x96,0x6D), D2(0x70,0x96), D2(0x29,0x07), D2(0x9E,0xD5), D2(0x52,0xBB), D2(0x20,0x85), D2(0xF3,0x56), D2(0x1C,0x62), D2(0xAD,0x96), D2(0xDC,0xA3), D2(0x5D,0x23), D2(0x83,0x65), D2(0xCF,0x5F), D2(0xFD,0x24), D2(0x3F,0xA8), D2(0x69,0x16), D2(0xD3,0x9A), D2(0x1C,0x55), D2(0x48,0x36), D2(0x98,0xDA), D2(0xBF,0x05), D2(0xA1,0x63), D2(0x7C,0xB8), D2(0xC2,0x00), D2(0x5B,0x3D), D2(0xEC,0xE4), D2(0x66,0x51), D2(0x49,0x28), D2(0x1F,0xE6), D2(0x7C,0x4B), D2(0x24,0x11), D2(0xAE,0x9F), D2(0x9F,0xA5), D2(0x5A,0x89), D2(0x6B,0xFB), D2(0xEE,0x38), D2(0xB7,0xED), D2(0xF4,0x06), D2(0x5C,0xB6), D2(0x0B,0xFF), D2(0xED,0x6B), D2(0xA6,0x37), D2(0x42,0xE9), D2(0xF4,0x4C), D2(0x7E,0xC6), D2(0x62,0x5E), D2(0xB5,0x76), D2(0xE4,0x85), D2(0xC2,0x45), D2(0x6D,0x51), D2(0x35,0x6D), D2(0x4F,0xE1), D2(0x14,0x37), D2(0xF2,0x5F), D2(0x0A,0x6D), D2(0x30,0x2B), D2(0x43,0x1B), D2(0xCD,0x3A), D2(0x19,0xB3), D2(0xEF,0x95), D2(0x04,0xDD), D2(0x8E,0x34), D2(0x08,0x79), D2(0x51,0x4A), D2(0x9B,0x22), D2(0x3B,0x13), D2(0xBE,0xA6), D2(0x02,0x0B), D2(0xCC,0x74), D2(0x8A,0x67), D2(0x4E,0x08), D2(0x29,0x02), D2(0x1C,0xD1), D2(0x80,0xDC), D2(0x62,0x8B), D2(0xC4,0xC6), D2(0xC2,0x34), D2(0x21,0x68), D2(0xDA,0xA2), D2(0xC9,0x0F) #endif #if (intDsize==32) D4(0xDF,0x1C,0xBA,0x65), D4(0xA8,0x55,0x21,0xAB), D4(0x04,0x50,0x7A,0x33), D4(0xAD,0x33,0x17,0x0D), D4(0x8A,0xAA,0xC4,0x2D), D4(0x15,0x72,0x8E,0x5A), D4(0x98,0xFA,0x05,0x10), D4(0x15,0xD2,0x26,0x18), D4(0xEA,0x95,0x6A,0xE5), D4(0x39,0x95,0x49,0x7C), D4(0x95,0x58,0x17,0x18), D4(0xDE,0x2B,0xCB,0xF6), D4(0x6F,0x4C,0x52,0xC9), D4(0xB5,0xC5,0x5D,0xF0), D4(0xEC,0x07,0xA2,0x8F), D4(0x9B,0x27,0x83,0xA2), D4(0x18,0x0E,0x86,0x03), D4(0xE3,0x9E,0x77,0x2C), D4(0x2E,0x36,0xCE,0x3B), D4(0x32,0x90,0x5E,0x46), D4(0xCA,0x18,0x21,0x7C), D4(0xF1,0x74,0x6C,0x08), D4(0x4A,0xBC,0x98,0x04), D4(0x67,0x0C,0x35,0x4E), D4(0x70,0x96,0x96,0x6D), D4(0x9E,0xD5,0x29,0x07), D4(0x20,0x85,0x52,0xBB), D4(0x1C,0x62,0xF3,0x56), D4(0xDC,0xA3,0xAD,0x96), D4(0x83,0x65,0x5D,0x23), D4(0xFD,0x24,0xCF,0x5F), D4(0x69,0x16,0x3F,0xA8), D4(0x1C,0x55,0xD3,0x9A), D4(0x98,0xDA,0x48,0x36), D4(0xA1,0x63,0xBF,0x05), D4(0xC2,0x00,0x7C,0xB8), D4(0xEC,0xE4,0x5B,0x3D), D4(0x49,0x28,0x66,0x51), D4(0x7C,0x4B,0x1F,0xE6), D4(0xAE,0x9F,0x24,0x11), D4(0x5A,0x89,0x9F,0xA5), D4(0xEE,0x38,0x6B,0xFB), D4(0xF4,0x06,0xB7,0xED), D4(0x0B,0xFF,0x5C,0xB6), D4(0xA6,0x37,0xED,0x6B), D4(0xF4,0x4C,0x42,0xE9), D4(0x62,0x5E,0x7E,0xC6), D4(0xE4,0x85,0xB5,0x76), D4(0x6D,0x51,0xC2,0x45), D4(0x4F,0xE1,0x35,0x6D), D4(0xF2,0x5F,0x14,0x37), D4(0x30,0x2B,0x0A,0x6D), D4(0xCD,0x3A,0x43,0x1B), D4(0xEF,0x95,0x19,0xB3), D4(0x8E,0x34,0x04,0xDD), D4(0x51,0x4A,0x08,0x79), D4(0x3B,0x13,0x9B,0x22), D4(0x02,0x0B,0xBE,0xA6), D4(0x8A,0x67,0xCC,0x74), D4(0x29,0x02,0x4E,0x08), D4(0x80,0xDC,0x1C,0xD1), D4(0xC4,0xC6,0x62,0x8B), D4(0x21,0x68,0xC2,0x34), D4(0xC9,0x0F,0xDA,0xA2) #endif #if (intDsize==64) D8(0xA8,0x55,0x21,0xAB,0xDF,0x1C,0xBA,0x65), D8(0xAD,0x33,0x17,0x0D,0x04,0x50,0x7A,0x33), D8(0x15,0x72,0x8E,0x5A,0x8A,0xAA,0xC4,0x2D), D8(0x15,0xD2,0x26,0x18,0x98,0xFA,0x05,0x10), D8(0x39,0x95,0x49,0x7C,0xEA,0x95,0x6A,0xE5), D8(0xDE,0x2B,0xCB,0xF6,0x95,0x58,0x17,0x18), D8(0xB5,0xC5,0x5D,0xF0,0x6F,0x4C,0x52,0xC9), D8(0x9B,0x27,0x83,0xA2,0xEC,0x07,0xA2,0x8F), D8(0xE3,0x9E,0x77,0x2C,0x18,0x0E,0x86,0x03), D8(0x32,0x90,0x5E,0x46,0x2E,0x36,0xCE,0x3B), D8(0xF1,0x74,0x6C,0x08,0xCA,0x18,0x21,0x7C), D8(0x67,0x0C,0x35,0x4E,0x4A,0xBC,0x98,0x04), D8(0x9E,0xD5,0x29,0x07,0x70,0x96,0x96,0x6D), D8(0x1C,0x62,0xF3,0x56,0x20,0x85,0x52,0xBB), D8(0x83,0x65,0x5D,0x23,0xDC,0xA3,0xAD,0x96), D8(0x69,0x16,0x3F,0xA8,0xFD,0x24,0xCF,0x5F), D8(0x98,0xDA,0x48,0x36,0x1C,0x55,0xD3,0x9A), D8(0xC2,0x00,0x7C,0xB8,0xA1,0x63,0xBF,0x05), D8(0x49,0x28,0x66,0x51,0xEC,0xE4,0x5B,0x3D), D8(0xAE,0x9F,0x24,0x11,0x7C,0x4B,0x1F,0xE6), D8(0xEE,0x38,0x6B,0xFB,0x5A,0x89,0x9F,0xA5), D8(0x0B,0xFF,0x5C,0xB6,0xF4,0x06,0xB7,0xED), D8(0xF4,0x4C,0x42,0xE9,0xA6,0x37,0xED,0x6B), D8(0xE4,0x85,0xB5,0x76,0x62,0x5E,0x7E,0xC6), D8(0x4F,0xE1,0x35,0x6D,0x6D,0x51,0xC2,0x45), D8(0x30,0x2B,0x0A,0x6D,0xF2,0x5F,0x14,0x37), D8(0xEF,0x95,0x19,0xB3,0xCD,0x3A,0x43,0x1B), D8(0x51,0x4A,0x08,0x79,0x8E,0x34,0x04,0xDD), D8(0x02,0x0B,0xBE,0xA6,0x3B,0x13,0x9B,0x22), D8(0x29,0x02,0x4E,0x08,0x8A,0x67,0xCC,0x74), D8(0xC4,0xC6,0x62,0x8B,0x80,0xDC,0x1C,0xD1), D8(0xC9,0x0F,0xDA,0xA2,0x21,0x68,0xC2,0x34) #endif #endif } ; cln-1.3.3/src/float/transcendental/cl_F_expx.cc0000644000000000000000000001375711201634737016320 0ustar // expx(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "cln/float.h" #include "base/cl_low.h" #include "float/cl_F.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" #include "cln/integer.h" #include "base/cl_inline.h" #include "float/lfloat/elem/cl_LF_zerop.cc" #include "float/lfloat/misc/cl_LF_exponent.cc" namespace cln { // cl_F expx_naive (const cl_F& x) // cl_LF expx_naive (const cl_LF& x) // // Methode: // e := Exponent aus (decode-float x), d := (float-digits x) // Bei x=0.0 oder e<-d liefere 1.0 // (denn bei e<=-d-1 ist abs(exp(x)-1) = abs(x)+O(x^2) < 2^(-d-1), // also ist exp(x), auf d Bits gerundet, gleich 1.0). // Bei e<=-sqrt(d) verwende die Potenzreihe // exp(x) = sum(j=0..inf,x^j/j!): // b:=1, i:=0, sum:=0, // while (/= sum (setq sum (+ sum b))) do b:=b*x/(i+1), i:=i+1. // Ergebnis sum. // Sonst setze y := x/2 = (scale-float x -1), // berechne rekursiv z:=exp(y) und liefere z^2. // Aufwand: asymptotisch d^2.5 . const cl_LF expx_naive (const cl_LF& x) { // Methode: // wie oben, mit adaptiver Genauigkeit während der Potenzreihen-Summation. if (zerop_inline(x)) return cl_float(1,x); var uintC actuallen = TheLfloat(x)->len; var uintC d = float_digits(x); var sintE e = float_exponent_inline(x); if (e < -(sintC)d) // e < -d ? return cl_float(1,x); // ja -> 1.0 als Ergebnis { Mutable(cl_LF,x); var uintE k = 0; // Rekursionszähler k:=0 // Bei e <= -1-limit_slope*floor(sqrt(d)) kann die Potenzreihe // angewandt werden. limit_slope = 1.0 ist nicht schlecht, // auch im Bereich d = ca. 800. var sintL e_limit = -1-isqrtC(d); // -1-floor(sqrt(d)) if (e > e_limit) { // e > -1-floor(sqrt(d)) -> muß |x| verkleinern. k = e - e_limit; x = scale_float(x,-(sintE)k); // x := x/2^k // Neuer Exponent = e-k = e_limit. } // Potenzreihe anwenden: var int i = 0; var cl_LF b = cl_float(1,x); // b := (float 1 x) var cl_LF eps = scale_float(b,-(sintC)d-10); var cl_LF sum = cl_float(0,x); // sum := (float 0 x) loop { var cl_LF new_sum = sum + LF_to_LF(b,actuallen); if (new_sum == sum) // = sum ? break; // ja -> Potenzreihe abbrechen sum = new_sum; i = i+1; b = cl_LF_shortenwith(b,eps); b = (b*x)/(cl_I)i; // b := b*x/i } var cl_LF& result = sum; // sum als Ergebnis // Wegen Rekursion noch k mal quadrieren: for ( ; k > 0; k--) result = square(result); return result; }} // Bit complexity (N = length(x)): O(N^(1/2)*M(N)). const cl_F expx_naive (const cl_F& x) { if (longfloatp(x)) { DeclareType(cl_LF,x); return expx_naive(x); } if (zerop(x)) return cl_float(1,x); var uintC d = float_digits(x); var sintE e = float_exponent(x); if (e < -(sintC)d) // e < -d ? return cl_float(1,x); // ja -> 1.0 als Ergebnis { Mutable(cl_F,x); var uintE k = 0; // Rekursionszähler k:=0 // Bei e <= -1-limit_slope*floor(sqrt(d)) kann die Potenzreihe // angewandt werden. limit_slope = 1.0 ist nicht schlecht. Für // d > 1600 scheint der Bereich 2.0 <= limit_slope <= 2.6 am besten // zu sein (mit bis zu 15% Beschleunigung gegenüber limit_slope = 1.0), // aber in diesem Bereich rechnen wir gar nicht. // Wir wählen limit_slope = 1.5. var sintL e_limit = -1-floor(isqrtC(d)*3,2); // -1-floor(sqrt(d)) if (e > e_limit) { // e > -1-floor(sqrt(d)) -> muß |x| verkleinern. k = e - e_limit; x = scale_float(x,-(sintE)k); // x := x/2^k // Neuer Exponent = e-k = e_limit. } // Potenzreihe anwenden: var int i = 0; var cl_F b = cl_float(1,x); // b := (float 1 x) var cl_F sum = cl_float(0,x); // sum := (float 0 x) loop { var cl_F new_sum = sum + b; if (new_sum == sum) // = sum ? break; // ja -> Potenzreihe abbrechen sum = new_sum; i = i+1; b = (b*x)/(cl_I)i; // b := b*x/i } var cl_F& result = sum; // sum als Ergebnis // Wegen Rekursion noch k mal quadrieren: for ( ; k > 0; k--) result = square(result); return result; }} // Bit complexity (N = length(x)): O(N^(1/2)*M(N)). const cl_LF expx_ratseries (const cl_LF& x) { // [Jonathan M. Borwein, Peter B. Borwein: Pi and the AGM. // Wiley 1987. Section 10.2.3] var uintC len = TheLfloat(x)->len; var cl_idecoded_float x_ = integer_decode_float(x); // x = (-1)^sign * 2^exponent * mantissa var uintE lq = cl_I_to_UE(- x_.exponent); var const cl_I& p = x_.mantissa; // Compute exp(p/2^lq) by splitting into pieces. // Each piece gives rise to a factor exp(pk/2^lqk). // Instead of the standard choice lqk = 2^k, we choose // lqk = c^k + O(1), where c > 1 is real. // Running time on Linux i486, 33 Mhz, computing exp(sqrt(2)-1): // c 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.3 3.4 3.5 // (a) 400 393 390 377 371 360 363 367 367 358 362 362 363 362 376 372 // (b) 311 317 305 312 295 291 286 293 291 284 295 284 293 287 288 305 // (a): N=300, time in 0.01 sec. (b): N=1000, time in 0.1 sec. // Values 2.5 <= c <= 3.2 seem best. Let's choose c = 2.875. var bool first_factor = true; var cl_LF product; var uintE b1; var uintE b2; for (b1 = 0, b2 = 1; b1 < lq; b1 = b2, b2 = ceiling(b2*23,8)) { // Piece containing bits b1+1..b2 after "decimal point" // in the binary representation of (p/2^lq). var uintE lqk = (lq >= b2 ? b2 : lq); var cl_I pk = ldb(p,cl_byte(lqk-b1,lq-lqk)); // Compute exp(pk/2^lqk). if (!zerop(pk)) { if (minusp(x_.sign)) { pk = -pk; } var cl_LF factor = cl_exp_aux(pk,lqk,len); if (first_factor) { product = factor; first_factor = false; } else product = product * factor; } } if (first_factor) return cl_I_to_LF(1,len); else return product; } // Bit complexity (N = length(x)): O(log(N)^2*M(N)). // Timings of the above algorithms, on an i486 33 MHz, running Linux, // applied to x = sqrt(2)-1 = 0.414... // ("naive" with adaptive limit_slope, about sqrt(ln(len)).) // N naive ratseries // 10 0.010 0.027 // 25 0.039 0.072 // 50 0.15 0.19 // 100 0.60 0.55 // 250 3.9 2.6 // 500 16.3 9.3 // 1000 68 29 // ==> ratseries faster for N >= 84. } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_catalanconst_def.cc0000644000000000000000000000067211201634737020614 0ustar // catalanconst(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/transcendental/cl_F_tran.h" namespace cln { const cl_F catalanconst (void) { floatformatcase(default_float_format , return cl_SF_catalanconst(); , return cl_FF_catalanconst(); , return cl_DF_catalanconst(); , return catalanconst(len); ); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_ln10_var.h0000644000000000000000000000141211201634737016601 0ustar { #if CL_DS_BIG_ENDIAN_P #if (intDsize==8) D1(0x93), D1(0x5D), D1(0x8D), D1(0xDD), D1(0xAA), D1(0xA8), D1(0xAC), D1(0x17) #endif #if (intDsize==16) D2(0x93,0x5D), D2(0x8D,0xDD), D2(0xAA,0xA8), D2(0xAC,0x17) #endif #if (intDsize==32) D4(0x93,0x5D,0x8D,0xDD), D4(0xAA,0xA8,0xAC,0x17) #endif #if (intDsize==64) D8(0x93,0x5D,0x8D,0xDD,0xAA,0xA8,0xAC,0x17) #endif #else #if (intDsize==8) D1(0x17), D1(0xAC), D1(0xA8), D1(0xAA), D1(0xDD), D1(0x8D), D1(0x5D), D1(0x93) #endif #if (intDsize==16) D2(0xAC,0x17), D2(0xAA,0xA8), D2(0x8D,0xDD), D2(0x93,0x5D) #endif #if (intDsize==32) D4(0xAA,0xA8,0xAC,0x17), D4(0x93,0x5D,0x8D,0xDD) #endif #if (intDsize==64) D8(0x93,0x5D,0x8D,0xDD,0xAA,0xA8,0xAC,0x17) #endif #endif } ; cln-1.3.3/src/float/transcendental/cl_LF_ln2.cc0000644000000000000000000000550411201634737016132 0ustar // cl_ln2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { static inline const cl_LF compute_ln2_old (uintC len) { // Here, it is tricky to avoid a recursive loop. We assume that ln() // will not invoke cl_ln2() if its argument is between 2/3 and 4/3. // So we compute -2*ln(1/sqrt(2)). return -scale_float(ln(sqrt(scale_float(cl_I_to_LF(1,len),-1))),1); } // ln 2 = // = 2 atanh(1/3) // = 4 atanh(1/7) + 2 atanh(1/17) // = 14 atanh(1/31) + 10 atanh(1/49) + 6 atanh(1/161) // = 144 atanh(1/251) + 54 atanh(1/449) - 38 atanh(1/4801) + 62 atanh(1/8749) static inline const cl_LF compute_ln2_p2 (uintC len) { return scale_float(cl_atanh_recip(3,len),1); } static inline const cl_LF compute_ln2_p23 (uintC len) { var uintC actuallen = len+1; return shorten(scale_float(cl_atanh_recip(7,actuallen),2) + scale_float(cl_atanh_recip(17,actuallen),1), len ); } static inline const cl_LF compute_ln2_p235 (uintC len) { var uintC actuallen = len+1; return shorten( The(cl_LF)(14 * cl_atanh_recip(31,actuallen)) + The(cl_LF)(10 * cl_atanh_recip(49,actuallen)) + The(cl_LF)( 6 * cl_atanh_recip(161,actuallen)), len ); } static inline const cl_LF compute_ln2_p2357 (uintC len) { var uintC actuallen = len+1; return shorten( The(cl_LF)(144 * cl_atanh_recip(251,actuallen)) + The(cl_LF)( 54 * cl_atanh_recip(449,actuallen)) - The(cl_LF)( 38 * cl_atanh_recip(4801,actuallen)) + The(cl_LF)( 62 * cl_atanh_recip(8749,actuallen)), len ); } // Timings of the above algorithms, on an i486 33 MHz, running Linux. // N = 250 // p2 1.71 s total 1.71 s // p23 0.88 + 0.60 s total 1.48 s // p235 0.51 + 0.48 + 0.40 s total 1.39 s // p2357 0.38 + 0.37 + 0.31 + 0.29 s total 1.35 s // In general, for fixed precision N, the computation time of atanh(1/m) // seems to be proportional to 1/log(m). #define compute_ln2 compute_ln2_p2357 const cl_LF cl_ln2 (uintC len) { var uintC oldlen = TheLfloat(cl_LF_ln2())->len; // vorhandene Länge if (len < oldlen) return shorten(cl_LF_ln2(),len); if (len == oldlen) return cl_LF_ln2(); // TheLfloat(cl_LF_ln2())->len um mindestens einen konstanten Faktor // > 1 wachsen lassen, damit es nicht zu häufig nachberechnet wird: var uintC newlen = len; oldlen += floor(oldlen,2); // oldlen * 3/2 if (newlen < oldlen) newlen = oldlen; // gewünschte > vorhandene Länge -> muß nachberechnen: cl_LF_ln2() = compute_ln2(newlen); return (len < newlen ? shorten(cl_LF_ln2(),len) : cl_LF_ln2()); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_exp1_var.cc0000644000000000000000000000171411201634737017047 0ustar // cl_F_exp1. // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "base/digitseq/cl_DS.h" #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "float/cl_F.h" namespace cln { cl_LF& cl_LF_exp1() { // Mantisse von exp(1) : static const uintD exp1_mantisse [64/intDsize] = #include "cl_F_exp1_var.h" static cl_LF val = encode_LF_array(0,2,exp1_mantisse,64/intDsize); return val; } // Problem: If someone changes free_hook, the destructor of this // will call the new hook, passing it some pointer obtained by the old // malloc_hook. ?? const cl_SF& cl_SF_exp1() { static const cl_SF val = cl_LF_to_SF(cl_LF_exp1()); return val; } const cl_FF& cl_FF_exp1() { static const cl_FF val = cl_LF_to_FF(cl_LF_exp1()); return val; } const cl_DF& cl_DF_exp1() { static const cl_DF val = cl_LF_to_DF(cl_LF_exp1()); return val; } } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_tran.h0000644000000000000000000002626511201634737016254 0ustar // cl_LF internals, transcendental functions #ifndef _CL_LF_TRAN_H #define _CL_LF_TRAN_H #include "cln/integer.h" #include "cln/integer_ring.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { // Subroutine for evaluating // sum(0 <= n < N, a(n)/b(n) * (p(0)...p(n))/(q(0)...q(n))) // where all the entries are small integers (ideally polynomials in n). // Some of the factors (a,b,p,q) may be omitted. They are then understood to // be 1. This is fast because it groups factors together before multiplying. // Result will be a cl_LF with len digits. // There are various alternative implementations of the same algorithm that // differ in the way the series is represented and, as a consequence, in memory // consumption. // // 1st implementation (series is precomputed entirely) // Arguments: // Vectors p[0..N-1], q[0..N-1], a[0..N-1], b[0..N-1], N. // Some of the vectors (a,b,p,q) can be a NULL pointer, all of its entries // are then understood to be 1. // If given, a vector qs[0..N-1] which the evaluation routine may use to // split off q[n] into q[n]*2^qs[n]. qs may be NULL, in that case no shift // optimizations will be used. (They are worth it only if a significant // amount of multiplication work can be saved by shifts.) // // 2nd implemenation (series is computed on demand, as a stream) // In this alternate implementation the series is not represented as a couple // of arrays, but as a method returning each tuple (p(n),q(n),a(n),b(n)) // in turn. This is preferrable if the a(n) are big, in order to avoid too // much memory usage at the same time. // The next() function is called N times and is expected to return // (p(n),q(n),a(n),b(n)) for n=0..N-1 in that order. // // 3rd implemenation (series is computed on demand and truncated early) // This is like the second implementation, but it coerces the integer factors // to cl_LF of a given length (trunclen) as soon as the integer factor's size // exceeds the size to store the cl_LF. For this to make sense, trunclen must // not be smaller than len. In practice, this can shave off substantially from // the memory consumption but it also bears a potential for rounding errors. // A minimum trunclen that guarantees correctness must be evaluated on a // case-by-case basis. // // As a variation, it is sometimes advantageous to factor out from q[0..N-1] // powers of two and put them back in again at the end of the computation by // left-shifting. These are distinguished by a boolean template parameter. // (Some combinations might not be implemented yet.) // In each of the special cases below, none of (a,b,p,q) can be NULL. struct cl_pqab_series { const cl_I* pv; cl_I* qv; const cl_I* av; const cl_I* bv; }; struct cl_pqab_series_term { cl_I p; cl_I q; cl_I a; cl_I b; }; struct cl_pqab_series_stream { cl_pqab_series_term (*nextfn)(cl_pqab_series_stream&); cl_pqab_series_term next () { return nextfn(*this); } // Constructor. cl_pqab_series_stream (cl_pqab_series_term (*n)(cl_pqab_series_stream&)) : nextfn (n) {} }; template const cl_LF eval_rational_series (uintC N, const cl_pqab_series& args, uintC len); template const cl_LF eval_rational_series (uintC N, cl_pqab_series_stream& args, uintC len); template const cl_LF eval_rational_series (uintC N, cl_pqab_series_stream& args, uintC len, uintC trunclen); struct cl_pqb_series { const cl_I* pv; cl_I* qv; const cl_I* bv; }; struct cl_pqb_series_term { cl_I p; cl_I q; cl_I b; }; struct cl_pqb_series_stream { cl_pqb_series_term (*nextfn)(cl_pqb_series_stream&); cl_pqb_series_term next () { return nextfn(*this); } // Constructor. cl_pqb_series_stream (cl_pqb_series_term (*n)(cl_pqb_series_stream&)) : nextfn (n) {} }; template const cl_LF eval_rational_series (uintC N, const cl_pqb_series& args, uintC len); template const cl_LF eval_rational_series (uintC N, cl_pqb_series_stream& args, uintC len); template const cl_LF eval_rational_series (uintC N, cl_pqb_series_stream& args, uintC len, uintC trunclen); struct cl_pqa_series { const cl_I* pv; cl_I* qv; const cl_I* av; }; struct cl_pqa_series_term { cl_I p; cl_I q; cl_I a; }; struct cl_pqa_series_stream { cl_pqa_series_term (*nextfn)(cl_pqa_series_stream&); cl_pqa_series_term next () { return nextfn(*this); } // Constructor. cl_pqa_series_stream (cl_pqa_series_term (*n)(cl_pqa_series_stream&)) : nextfn (n) {} }; template const cl_LF eval_rational_series (uintC N, const cl_pqa_series& args, uintC len); template const cl_LF eval_rational_series (uintC N, cl_pqa_series_stream& args, uintC len); template const cl_LF eval_rational_series (uintC N, cl_pqa_series_stream& args, uintC len, uintC trunclen); struct cl_pq_series { const cl_I* pv; cl_I* qv; }; struct cl_pq_series_term { cl_I p; cl_I q; }; struct cl_pq_series_stream { cl_pq_series_term (*nextfn)(cl_pq_series_stream&); cl_pq_series_term next () { return nextfn(*this); } // Constructor. cl_pq_series_stream (cl_pq_series_term (*n)(cl_pq_series_stream&)) : nextfn (n) {} }; template const cl_LF eval_rational_series (uintC N, const cl_pq_series& args, uintC len); template const cl_LF eval_rational_series (uintC N, cl_pq_series_stream& args, uintC len); template const cl_LF eval_rational_series (uintC N, cl_pq_series_stream& args, uintC len, uintC trunclen); struct cl_pab_series { const cl_I* pv; const cl_I* av; const cl_I* bv; }; const cl_LF eval_rational_series (uintC N, const cl_pab_series& args, uintC len); struct cl_pb_series { const cl_I* pv; const cl_I* bv; }; const cl_LF eval_rational_series (uintC N, const cl_pb_series& args, uintC len); struct cl_pa_series { const cl_I* pv; const cl_I* av; }; const cl_LF eval_rational_series (uintC N, const cl_pa_series& args, uintC len); struct cl_p_series { const cl_I* pv; }; const cl_LF eval_rational_series (uintC N, const cl_p_series& args, uintC len); struct cl_qab_series { cl_I* qv; const cl_I* av; const cl_I* bv; }; template const cl_LF eval_rational_series (uintC N, const cl_qab_series& args, uintC len); struct cl_qb_series { cl_I* qv; const cl_I* bv; }; struct cl_qb_series_term { cl_I q; cl_I b; }; struct cl_qb_series_stream { cl_qb_series_term (*nextfn)(cl_qb_series_stream&); cl_qb_series_term next () { return nextfn(*this); } // Constructor. cl_qb_series_stream (cl_qb_series_term (*n)(cl_qb_series_stream&)) : nextfn (n) {} }; template const cl_LF eval_rational_series (uintC N, const cl_qb_series& args, uintC len); template const cl_LF eval_rational_series (uintC N, cl_qb_series_stream& args, uintC len); struct cl_qa_series { cl_I* qv; const cl_I* av; }; template const cl_LF eval_rational_series (uintC N, const cl_qa_series& args, uintC len); struct cl_q_series { cl_I* qv; }; struct cl_q_series_term { cl_I q; }; struct cl_q_series_stream { cl_q_series_term (*nextfn)(cl_q_series_stream&); cl_q_series_term next () { return nextfn(*this); } // Constructor. cl_q_series_stream (cl_q_series_term (*n)(cl_q_series_stream&)) : nextfn (n) {} }; template const cl_LF eval_rational_series (uintC N, const cl_q_series& args, uintC len); template const cl_LF eval_rational_series (uintC N, cl_q_series_stream& args, uintC len); struct cl_ab_series { const cl_I* av; const cl_I* bv; }; const cl_LF eval_rational_series (uintC N, const cl_ab_series& args, uintC len); struct cl_b_series { const cl_I* bv; }; const cl_LF eval_rational_series (uintC N, const cl_b_series& args, uintC len); struct cl_a_series { const cl_I* av; }; const cl_LF eval_rational_series (uintC N, const cl_a_series& args, uintC len); struct cl__series { }; const cl_LF eval_rational_series (uintC N, const cl__series& args, uintC len); // [Generalization.] // Subroutine: // Evaluates S = sum(N1 <= n < N2, (p(N1)...p(n))/(q(N1)...q(n))) // and U = sum(N1 <= n < N2, // (c(N1)/d(N1)+...+c(n)/d(n))*(p(N1)...p(n))/(q(N1)...q(n))) // and returns // P = p(N1)...p(N2-1), // Q = q(N1)...q(N2-1), // T = Q*S, // C/D = c(N1)/d(N1)+...+c(N2-1)/d(N2-1), // V = D*Q*U, // all integers. On entry N1 < N2. struct cl_pqcd_series_term { cl_I p; cl_I q; cl_I c; cl_I d; }; template struct cl_pqcd_series_result { cl_T P; cl_T Q; cl_T T; cl_T C; cl_T D; cl_T V; }; struct cl_pqcd_series_stream { cl_pqcd_series_term (*nextfn)(cl_pqcd_series_stream&); cl_pqcd_series_term next () { return nextfn(*this); } // Constructor. cl_pqcd_series_stream( cl_pqcd_series_term (*n)(cl_pqcd_series_stream&)) : nextfn (n) {} }; void eval_pqcd_series_aux (uintC N, cl_pqcd_series_term* args, cl_pqcd_series_result& Z, bool rightmost = true); void eval_pqcd_series_aux (uintC N, cl_pqcd_series_stream& args, cl_pqcd_series_result& Z, bool rightmost = true); void eval_pqcd_series_aux (uintC N, cl_pqcd_series_stream& args, cl_pqcd_series_result& Z, uintC trunclen, bool rightmost = true); // Ditto, but returns U/S. const cl_LF eval_pqcd_series (uintC N, cl_pqcd_series_term* args, uintC len); const cl_LF eval_pqcd_series (uintC N, cl_pqcd_series_stream& args, uintC len); const cl_LF eval_pqcd_series (uintC N, cl_pqcd_series_stream& args, uintC len, uintC trunclen); // [Special case c(n)=1.] // Subroutine: // Evaluates S = sum(N1 <= n < N2, (p(N1)...p(n))/(q(N1)...q(n))) // and U = sum(N1 <= n < N2, (1/d(N1)+...+1/d(n))*(p(N1)...p(n))/(q(N1)...q(n))) // and returns // P = p(N1)...p(N2-1), // Q = q(N1)...q(N2-1), // T = Q*S, // C/D = 1/d(N1)+...+1/d(N2-1), // V = D*Q*U, // all integers. On entry N1 < N2. struct cl_pqd_series_term { cl_I p; cl_I q; cl_I d; }; template struct cl_pqd_series_result { cl_T P; cl_T Q; cl_T T; cl_T C; cl_T D; cl_T V; }; struct cl_pqd_series_stream { cl_pqd_series_term (*nextfn)(cl_pqd_series_stream&); cl_pqd_series_term next () { return nextfn(*this); } // Constructor. cl_pqd_series_stream( cl_pqd_series_term (*n)(cl_pqd_series_stream&)) : nextfn (n) {} }; void eval_pqd_series_aux (uintC N, cl_pqd_series_term* args, cl_pqd_series_result& Z, bool rightmost = true); void eval_pqd_series_aux (uintC N, cl_pqd_series_stream& args, cl_pqd_series_result& Z, bool rightmost = true); void eval_pqd_series_aux (uintC N, cl_pqd_series_stream& args, cl_pqd_series_result& Z, uintC trunclen, bool rightmost = true); // Ditto, but returns U/S. const cl_LF eval_pqd_series (uintC N, cl_pqd_series_term* args, uintC len); const cl_LF eval_pqd_series (uintC N, cl_pqd_series_stream& args, uintC len); const cl_LF eval_pqd_series (uintC N, cl_pqd_series_stream& args, uintC len, uintC trunclen); // Helper function to divide q by the largest s such that 2^s divides q, returns s. inline uintC pullout_shiftcount(cl_I& q) { var uintC qs = 0; if (!zerop(q)) { qs = ord2(q); if (qs > 0) q = q >> qs; } return qs; } // Helper function to convert integer of length > trunclen to long float of // length = trunclen. inline void truncate_precision(cl_R& x, uintC trunclen) { if (instanceof(x,cl_I_ring) && integer_length(the(x))>trunclen*intDsize) { x = cl_I_to_LF(the(x),trunclen); } } } // namespace cln #endif /* _CL_LF_TRAN_H */ cln-1.3.3/src/float/transcendental/cl_LF_ratseries_a.cc0000644000000000000000000000323311201634737017735 0ustar // eval_rational_series(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_LF_tran.h" // Implementation. #include "cln/lfloat.h" #include "cln/integer.h" #include "cln/exception.h" #include "float/lfloat/cl_LF.h" namespace cln { // Subroutine. // Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n))) // and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1) // and T = B*Q*S (all integers). On entry N1 < N2. // P will not be computed if a NULL pointer is passed. static void eval_a_series_aux (uintC N1, uintC N2, const cl_a_series& args, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: *T = args.av[N1]; break; case 2: { *T = args.av[N1] + args.av[N1+1]; break; } case 3: { *T = args.av[N1] + args.av[N1+1] + args.av[N1+2]; break; } case 4: { *T = args.av[N1] + args.av[N1+1] + args.av[N1+2] + args.av[N1+3]; break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LT; eval_a_series_aux(N1,Nm,args,<); // Compute right part. var cl_I RT; eval_a_series_aux(Nm,N2,args,&RT); // Put together partial results. // S = LS + RS, so T = LT + RT. *T = LT + RT; break; } } } const cl_LF eval_rational_series (uintC N, const cl_a_series& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I T; eval_a_series_aux(0,N,args,&T); return cl_I_to_LF(T,len); } // Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))): // O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_ratsumseries_pqcd.cc0000644000000000000000000000314211201634737021170 0ustar // eval_pqcd_series(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_LF_tran.h" // Implementation. #include "cln/lfloat.h" #include "cln/integer.h" #include "cln/real.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_LF eval_pqcd_series (uintC N, cl_pqcd_series_term* args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_pqcd_series_result sums; eval_pqcd_series_aux(N,args,sums); // Instead of computing fsum = T/Q and gsum = V/(D*Q) // and then dividing them, to compute gsum/fsum, we save two // divisions by computing V/(D*T). return cl_I_to_LF(sums.V,len) / The(cl_LF)(sums.D * cl_I_to_LF(sums.T,len)); } const cl_LF eval_pqcd_series (uintC N, cl_pqcd_series_stream& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_pqcd_series_result sums; eval_pqcd_series_aux(N,args,sums); // Instead of computing fsum = T/Q and gsum = V/(D*Q) // and then dividing them, to compute gsum/fsum, we save two // divisions by computing V/(D*T). return cl_I_to_LF(sums.V,len) / The(cl_LF)(sums.D * cl_I_to_LF(sums.T,len)); } const cl_LF eval_pqcd_series (uintC N, cl_pqcd_series_stream& args, uintC len, uintC trunclen) { if (N==0) return cl_I_to_LF(0,len); var cl_pqcd_series_result sums; eval_pqcd_series_aux(N,args,sums,trunclen); // Instead of computing fsum = T/Q and gsum = V/(D*Q) // and then dividing them, to compute gsum/fsum, we save two // divisions by computing V/(D*T). return cl_R_to_LF(sums.V,len) / The(cl_LF)(sums.D * cl_R_to_LF(sums.T,len)); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_ratseries_pq.cc0000644000000000000000000003006711201634737020142 0ustar // eval_rational_series(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_LF_tran.h" // Implementation. #include "cln/lfloat.h" #include "cln/integer.h" #include "cln/real.h" #include "cln/exception.h" #include "float/lfloat/cl_LF.h" #include "base/cl_alloca.h" namespace cln { // Subroutine. // Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n))) // and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1) // and T = B*Q*S (all integers). On entry N1 < N2. // P will not be computed if a NULL pointer is passed. static void eval_pq_series_aux (uintC N1, uintC N2, const cl_pq_series& args, cl_I* P, cl_I* Q, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: if (P) { *P = args.pv[N1]; } *Q = args.qv[N1]; *T = args.pv[N1]; break; case 2: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; if (P) { *P = p01; } *Q = args.qv[N1] * args.qv[N1+1]; *T = args.qv[N1+1] * args.pv[N1] + p01; break; } case 3: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; if (P) { *P = p012; } var cl_I q12 = args.qv[N1+1] * args.qv[N1+2]; *Q = args.qv[N1] * q12; *T = q12 * args.pv[N1] + args.qv[N1+2] * p01 + p012; break; } case 4: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; var cl_I p0123 = p012 * args.pv[N1+3]; if (P) { *P = p0123; } var cl_I q23 = args.qv[N1+2] * args.qv[N1+3]; var cl_I q123 = args.qv[N1+1] * q23; *Q = args.qv[N1] * q123; *T = q123 * args.pv[N1] + q23 * p01 + args.qv[N1+3] * p012 + p0123; break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LP, LQ, LT; eval_pq_series_aux(N1,Nm,args,&LP,&LQ,<); // Compute right part. var cl_I RP, RQ, RT; eval_pq_series_aux(Nm,N2,args,(P?&RP:(cl_I*)0),&RQ,&RT); // Put together partial results. if (P) { *P = LP*RP; } *Q = LQ*RQ; // S = LS + LP/LQ * RS, so T = RQ*LT + LP*RT. *T = RQ*LT + LP*RT; break; } } } template<> const cl_LF eval_rational_series (uintC N, const cl_pq_series& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I Q, T; eval_pq_series_aux(0,N,args,NULL,&Q,&T); return cl_I_to_LF(T,len) / cl_I_to_LF(Q,len); } static void eval_pqs_series_aux (uintC N1, uintC N2, const cl_pq_series& args, const uintC* qsv, cl_I* P, cl_I* Q, uintC* QS, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: if (P) { *P = args.pv[N1]; } *Q = args.qv[N1]; *QS = qsv[N1]; *T = args.pv[N1]; break; case 2: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; if (P) { *P = p01; } *Q = args.qv[N1] * args.qv[N1+1]; *QS = qsv[N1] + qsv[N1+1]; *T = ((args.qv[N1+1] * args.pv[N1]) << qsv[N1+1]) + p01; break; } case 3: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; if (P) { *P = p012; } var cl_I q12 = args.qv[N1+1] * args.qv[N1+2]; *Q = args.qv[N1] * q12; *QS = qsv[N1] + qsv[N1+1] + qsv[N1+2]; *T = ((q12 * args.pv[N1]) << (qsv[N1+1] + qsv[N1+2])) + ((args.qv[N1+2] * p01) << qsv[N1+2]) + p012; break; } case 4: { var cl_I p01 = args.pv[N1] * args.pv[N1+1]; var cl_I p012 = p01 * args.pv[N1+2]; var cl_I p0123 = p012 * args.pv[N1+3]; if (P) { *P = p0123; } var cl_I q23 = args.qv[N1+2] * args.qv[N1+3]; var cl_I q123 = args.qv[N1+1] * q23; *Q = args.qv[N1] * q123; *QS = qsv[N1] + qsv[N1+1] + qsv[N1+2] + qsv[N1+3]; *T = ((((((q123 * args.pv[N1]) << qsv[N1+1]) + q23 * p01) << qsv[N1+2]) + args.qv[N1+3] * p012) << qsv[N1+3]) + p0123; break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LP, LQ, LT; var uintC LQS; eval_pqs_series_aux(N1,Nm,args,qsv,&LP,&LQ,&LQS,<); // Compute right part. var cl_I RP, RQ, RT; var uintC RQS; eval_pqs_series_aux(Nm,N2,args,qsv,(P?&RP:(cl_I*)0),&RQ,&RQS,&RT); // Put together partial results. if (P) { *P = LP*RP; } *Q = LQ*RQ; *QS = LQS+RQS; // S = LS + LP/LQ * RS, so T = RQ*LT + LP*RT. *T = ((RQ*LT) << RQS) + LP*RT; break; } } } template<> const cl_LF eval_rational_series (uintC N, const cl_pq_series& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I Q, T; // Precomputation of the shift counts: // Split qv[n] into qv[n]*2^qsv[n]. CL_ALLOCA_STACK; var uintC* qsv = (uintC*) cl_alloca(N*sizeof(uintC)); var cl_I* qp = args.qv; var uintC* qsp = qsv; for (var uintC n = 0; n < N; n++, qp++, qsp++) { *qsp = pullout_shiftcount(*qp); } // Main computation. var uintC QS; eval_pqs_series_aux(0,N,args,qsv,NULL,&Q,&QS,&T); return cl_I_to_LF(T,len) / scale_float(cl_I_to_LF(Q,len),QS); } static void eval_pq_series_aux (uintC N1, uintC N2, cl_pq_series_stream& args, cl_I* P, cl_I* Q, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: { var cl_pq_series_term v0 = args.next(); // [N1] if (P) { *P = v0.p; } *Q = v0.q; *T = v0.p; break; } case 2: { var cl_pq_series_term v0 = args.next(); // [N1] var cl_pq_series_term v1 = args.next(); // [N1+1] var cl_I p01 = v0.p * v1.p; if (P) { *P = p01; } *Q = v0.q * v1.q; *T = v1.q * v0.p + p01; break; } case 3: { var cl_pq_series_term v0 = args.next(); // [N1] var cl_pq_series_term v1 = args.next(); // [N1+1] var cl_pq_series_term v2 = args.next(); // [N1+2] var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; if (P) { *P = p012; } var cl_I q12 = v1.q * v2.q; *Q = v0.q * q12; *T = q12 * v0.p + v2.q * p01 + p012; break; } case 4: { var cl_pq_series_term v0 = args.next(); // [N1] var cl_pq_series_term v1 = args.next(); // [N1+1] var cl_pq_series_term v2 = args.next(); // [N1+2] var cl_pq_series_term v3 = args.next(); // [N1+3] var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; var cl_I p0123 = p012 * v3.p; if (P) { *P = p0123; } var cl_I q23 = v2.q * v3.q; var cl_I q123 = v1.q * q23; *Q = v0.q * q123; *T = q123 * v0.p + q23 * p01 + v3.q * p012 + p0123; break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LP, LQ, LT; eval_pq_series_aux(N1,Nm,args,&LP,&LQ,<); // Compute right part. var cl_I RP, RQ, RT; eval_pq_series_aux(Nm,N2,args,(P?&RP:(cl_I*)0),&RQ,&RT); // Put together partial results. if (P) { *P = LP*RP; } *Q = LQ*RQ; // S = LS + LP/LQ * RS, so T = RQ*LT + LP*RT. *T = RQ*LT + LP*RT; break; } } } template<> const cl_LF eval_rational_series (uintC N, cl_pq_series_stream& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I Q, T; eval_pq_series_aux(0,N,args,NULL,&Q,&T); return cl_I_to_LF(T,len) / cl_I_to_LF(Q,len); } static void eval_pqs_series_aux (uintC N1, uintC N2, cl_pq_series_stream& args, cl_I* P, cl_I* Q, uintC* QS, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: { var cl_pq_series_term v0 = args.next(); // [N1] var uintC qs0 = pullout_shiftcount(v0.q); if (P) { *P = v0.p; } *Q = v0.q; *QS = qs0; *T = v0.p; break; } case 2: { var cl_pq_series_term v0 = args.next(); // [N1] var cl_pq_series_term v1 = args.next(); // [N1+1] var uintC qs0 = pullout_shiftcount(v0.q); var uintC qs1 = pullout_shiftcount(v1.q); var cl_I p01 = v0.p * v1.p; if (P) { *P = p01; } *Q = v0.q * v1.q; *QS = qs0 + qs1; *T = ((v1.q * v0.p) << qs1) + p01; break; } case 3: { var cl_pq_series_term v0 = args.next(); // [N1] var cl_pq_series_term v1 = args.next(); // [N1+1] var cl_pq_series_term v2 = args.next(); // [N1+2] var uintC qs0 = pullout_shiftcount(v0.q); var uintC qs1 = pullout_shiftcount(v1.q); var uintC qs2 = pullout_shiftcount(v2.q); var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; if (P) { *P = p012; } var cl_I q12 = v1.q * v2.q; *Q = v0.q * q12; *QS = qs0 + qs1 + qs2; *T = ((q12 * v0.p) << (qs1 + qs2)) + ((v2.q * p01) << qs2) + p012; break; } case 4: { var cl_pq_series_term v0 = args.next(); // [N1] var cl_pq_series_term v1 = args.next(); // [N1+1] var cl_pq_series_term v2 = args.next(); // [N1+2] var cl_pq_series_term v3 = args.next(); // [N1+3] var uintC qs0 = pullout_shiftcount(v0.q); var uintC qs1 = pullout_shiftcount(v1.q); var uintC qs2 = pullout_shiftcount(v2.q); var uintC qs3 = pullout_shiftcount(v3.q); var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; var cl_I p0123 = p012 * v3.p; if (P) { *P = p0123; } var cl_I q23 = v2.q * v3.q; var cl_I q123 = v1.q * q23; *Q = v0.q * q123; *QS = qs0 + qs1 + qs2 + qs3; *T = ((((((q123 * v0.p) << qs1) + q23 * p01) << qs2) + v3.q * p012) << qs3) + p0123; break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LP, LQ, LT; var uintC LQS; eval_pqs_series_aux(N1,Nm,args,&LP,&LQ,&LQS,<); // Compute right part. var cl_I RP, RQ, RT; var uintC RQS; eval_pqs_series_aux(Nm,N2,args,(P?&RP:(cl_I*)0),&RQ,&RQS,&RT); // Put together partial results. if (P) { *P = LP*RP; } *Q = LQ*RQ; *QS = LQS+RQS; // S = LS + LP/LQ * RS, so T = RQ*LT + LP*RT. *T = ((RQ*LT) << RQS) + LP*RT; break; } } } template<> const cl_LF eval_rational_series (uintC N, cl_pq_series_stream& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I Q, T; var uintC QS; eval_pqs_series_aux(0,N,args,NULL,&Q,&QS,&T); return cl_I_to_LF(T,len) / scale_float(cl_I_to_LF(Q,len),QS); } static void eval_pq_series_aux (uintC N1, uintC N2, cl_pq_series_stream& args, cl_R* P, cl_R* Q, cl_R* T, uintC trunclen) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: { var cl_pq_series_term v0 = args.next(); // [N1] if (P) { *P = v0.p; } *Q = v0.q; *T = v0.p; break; } case 2: { var cl_pq_series_term v0 = args.next(); // [N1] var cl_pq_series_term v1 = args.next(); // [N1+1] var cl_I p01 = v0.p * v1.p; if (P) { *P = p01; } *Q = v0.q * v1.q; *T = v1.q * v0.p + p01; break; } case 3: { var cl_pq_series_term v0 = args.next(); // [N1] var cl_pq_series_term v1 = args.next(); // [N1+1] var cl_pq_series_term v2 = args.next(); // [N1+2] var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; if (P) { *P = p012; } var cl_I q12 = v1.q * v2.q; *Q = v0.q * q12; *T = q12 * v0.p + v2.q * p01 + p012; break; } case 4: { var cl_pq_series_term v0 = args.next(); // [N1] var cl_pq_series_term v1 = args.next(); // [N1+1] var cl_pq_series_term v2 = args.next(); // [N1+2] var cl_pq_series_term v3 = args.next(); // [N1+3] var cl_I p01 = v0.p * v1.p; var cl_I p012 = p01 * v2.p; var cl_I p0123 = p012 * v3.p; if (P) { *P = p0123; } var cl_I q23 = v2.q * v3.q; var cl_I q123 = v1.q * q23; *Q = v0.q * q123; *T = q123 * v0.p + q23 * p01 + v3.q * p012 + p0123; break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_R LP, LQ, LT; eval_pq_series_aux(N1,Nm,args,&LP,&LQ,<,trunclen); // Compute right part. var cl_R RP, RQ, RT; eval_pq_series_aux(Nm,N2,args,(P?&RP:(cl_I*)0),&RQ,&RT,trunclen); // Put together partial results. if (P) { *P = LP*RP; truncate_precision(*P,trunclen); } *Q = LQ*RQ; truncate_precision(*Q,trunclen); // S = LS + LP/LQ * RS, so T = RQ*LT + LP*RT. *T = RQ*LT + LP*RT; truncate_precision(*T,trunclen); break; } } } template<> const cl_LF eval_rational_series (uintC N, cl_pq_series_stream& args, uintC len, uintC trunclen) { if (N==0) return cl_I_to_LF(0,len); var cl_R Q, T; eval_pq_series_aux(0,N,args,NULL,&Q,&T,trunclen); return cl_R_to_LF(T,len) / cl_R_to_LF(Q,len); } // Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))): // O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_ln10.cc0000644000000000000000000000351311201634737016207 0ustar // cl_ln10(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { static inline const cl_LF compute_ln10_old (uintC len) { return ln(cl_I_to_LF(10,len)); } // ln 10 = // = 46 atanh(1/31) + 34 atanh(1/49) + 20 atanh(1/161) // = 478 atanh(1/251) + 180 atanh(1/449) - 126 atanh(1/4801) + 206 atanh(1/8749) static inline const cl_LF compute_ln10_p235 (uintC len) { var uintC actuallen = len+1; return shorten( The(cl_LF)(46 * cl_atanh_recip(31,actuallen)) + The(cl_LF)(34 * cl_atanh_recip(49,actuallen)) + The(cl_LF)(20 * cl_atanh_recip(161,actuallen)), len ); } static inline const cl_LF compute_ln10_p2357 (uintC len) { var uintC actuallen = len+1; return shorten( The(cl_LF)(478 * cl_atanh_recip(251,actuallen)) + The(cl_LF)(180 * cl_atanh_recip(449,actuallen)) - The(cl_LF)(126 * cl_atanh_recip(4801,actuallen)) + The(cl_LF)(206 * cl_atanh_recip(8749,actuallen)), len ); } #define compute_ln10 compute_ln10_p2357 const cl_LF cl_ln10 (uintC len) { var uintC oldlen = TheLfloat(cl_LF_ln10())->len; // vorhandene Länge if (len < oldlen) return shorten(cl_LF_ln10(),len); if (len == oldlen) return cl_LF_ln10(); // TheLfloat(cl_LF_ln10())->len um mindestens einen konstanten Faktor // > 1 wachsen lassen, damit es nicht zu häufig nachberechnet wird: var uintC newlen = len; oldlen += floor(oldlen,2); // oldlen * 3/2 if (newlen < oldlen) newlen = oldlen; // gewünschte > vorhandene Länge -> muß nachberechnen: cl_LF_ln10() = compute_ln10(newlen); return (len < newlen ? shorten(cl_LF_ln10(),len) : cl_LF_ln10()); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_ratseries_b.cc0000644000000000000000000000401311201634737017733 0ustar // eval_rational_series(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_LF_tran.h" // Implementation. #include "cln/lfloat.h" #include "cln/integer.h" #include "cln/exception.h" #include "float/lfloat/cl_LF.h" namespace cln { // Subroutine. // Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n))) // and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1) // and T = B*Q*S (all integers). On entry N1 < N2. // P will not be computed if a NULL pointer is passed. static void eval_b_series_aux (uintC N1, uintC N2, const cl_b_series& args, cl_I* B, cl_I* T) { switch (N2 - N1) { case 0: throw runtime_exception(); break; case 1: *B = args.bv[N1]; *T = 1; break; case 2: { *B = args.bv[N1] * args.bv[N1+1]; *T = args.bv[N1+1] + args.bv[N1]; break; } case 3: { var cl_I b12 = args.bv[N1+1] * args.bv[N1+2]; *B = args.bv[N1] * b12; *T = b12 + args.bv[N1] * (args.bv[N1+2] + args.bv[N1+1]); break; } case 4: { var cl_I b01 = args.bv[N1] * args.bv[N1+1]; var cl_I b23 = args.bv[N1+2] * args.bv[N1+3]; *B = b01 * b23; *T = b23 * (args.bv[N1+1] + args.bv[N1]) + b01 * (args.bv[N1+3] + args.bv[N1+2]); break; } default: { var uintC Nm = (N1+N2)/2; // midpoint // Compute left part. var cl_I LB, LT; eval_b_series_aux(N1,Nm,args,&LB,<); // Compute right part. var cl_I RB, RT; eval_b_series_aux(Nm,N2,args,&RB,&RT); // Put together partial results. *B = LB*RB; // S = LS + RS, so T = RB*LT + LB*RT. *T = RB*LT + LB*RT; break; } } } const cl_LF eval_rational_series (uintC N, const cl_b_series& args, uintC len) { if (N==0) return cl_I_to_LF(0,len); var cl_I B, T; eval_b_series_aux(0,N,args,&B,&T); return cl_I_to_LF(T,len) / cl_I_to_LF(B,len); } // Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))): // O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_atanh_recip.cc0000644000000000000000000000256711201634737017722 0ustar // cl_atanh_recip(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "cln/integer.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" #include "float/transcendental/cl_LF_tran.h" #undef floor #include #define floor cln_floor namespace cln { // Method: // See examples/atanh_recip.cc for a comparison of the algorithms. // Here we take algorithm 1d. It's the fastest throughout the range. const cl_LF cl_atanh_recip (cl_I m, uintC len) { var uintC actuallen = len + 1; var uintC N = (uintC)(0.69314718*intDsize/2*actuallen/::log(double_approx(m))) + 1; struct rational_series_stream : cl_qb_series_stream { var uintC n; var cl_I m; var cl_I m2; static cl_qb_series_term computenext (cl_qb_series_stream& thisss) { var rational_series_stream& thiss = (rational_series_stream&)thisss; var uintC n = thiss.n; var cl_qb_series_term result; result.b = 2*n+1; result.q = (n==0 ? thiss.m : thiss.m2); thiss.n = n+1; return result; } rational_series_stream(const cl_I& m_) : cl_qb_series_stream (rational_series_stream::computenext), n(0), m(m_), m2(square(m_)) {} } series(m); var cl_LF result = eval_rational_series(N,series,actuallen); return shorten(result,len); } // Bit complexity (N = len): O(log(N)^2*M(N)). } // namespace cln cln-1.3.3/src/float/transcendental/cl_LF_catalanconst.cc0000644000000000000000000002563411201634737020117 0ustar // catalanconst(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/transcendental/cl_F_tran.h" // Implementation. #include "cln/lfloat.h" #include "float/transcendental/cl_LF_tran.h" #include "float/lfloat/cl_LF.h" #include "cln/integer.h" #include "base/cl_alloca.h" namespace cln { const cl_LF compute_catalanconst_ramanujan (uintC len) { // [Jonathan M. Borwein, Peter B. Borwein: Pi and the AGM. // Wiley 1987. Section 11.3, exercise 16 g, p. 386] // G = 3/8 * sum(n=0..infty, n!^2 / (2n+1)!*(2n+1)) // + pi/8 * log(2+sqrt(3)). // Every summand gives 0.6 new decimal digits in precision. // The sum is best evaluated using fixed-point arithmetic, // so that the precision is reduced for the later summands. var uintC actuallen = len + 2; // 2 guard digits var sintC scale = intDsize*actuallen; var cl_I sum = 0; var cl_I n = 0; var cl_I factor = ash(1,scale); while (!zerop(factor)) { sum = sum + truncate1(factor,2*n+1); n = n+1; factor = truncate1(factor*n,2*(2*n+1)); } var cl_LF fsum = scale_float(cl_I_to_LF(sum,actuallen),-scale); var cl_LF g = scale_float(The(cl_LF)(3*fsum) + The(cl_LF)(pi(actuallen)) * ln(cl_I_to_LF(2,actuallen)+sqrt(cl_I_to_LF(3,actuallen))), -3); return shorten(g,len); // verkürzen und fertig } // Bit complexity (N := len): O(N^2). const cl_LF compute_catalanconst_ramanujan_fast (uintC len) { // Same formula as above, using a binary splitting evaluation. // See [Borwein, Borwein, section 10.2.3]. struct rational_series_stream : cl_pqb_series_stream { cl_I n; static cl_pqb_series_term computenext (cl_pqb_series_stream& thisss) { var rational_series_stream& thiss = (rational_series_stream&)thisss; var cl_I n = thiss.n; var cl_pqb_series_term result; if (n==0) { result.p = 1; result.q = 1; result.b = 1; } else { result.p = n; result.b = 2*n+1; result.q = result.b << 1; // 2*(2*n+1) } thiss.n = n+1; return result; } rational_series_stream () : cl_pqb_series_stream (rational_series_stream::computenext), n (0) {} } series; var uintC actuallen = len + 2; // 2 guard digits // Evaluate a sum(0 <= n < N, a(n)/b(n) * (p(0)...p(n))/(q(0)...q(n))) // with appropriate N, and // a(n) = 1, b(n) = 2*n+1, // p(n) = n for n>0, q(n) = 2*(2*n+1) for n>0. var uintC N = (intDsize/2)*actuallen; // 4^-N <= 2^(-intDsize*actuallen). var cl_LF fsum = eval_rational_series(N,series,actuallen,actuallen); var cl_LF g = scale_float(The(cl_LF)(3*fsum) + The(cl_LF)(pi(actuallen)) * ln(cl_I_to_LF(2,actuallen)+sqrt(cl_I_to_LF(3,actuallen))), -3); return shorten(g,len); // verkürzen und fertig } // Bit complexity (N := len): O(log(N)^2*M(N)). const cl_LF compute_catalanconst_expintegral1 (uintC len) { // We compute f(x) classically and g(x) using the partial sums of f(x). var uintC actuallen = len+2; // 2 guard digits var uintC x = (uintC)(0.693148*intDsize*actuallen)+1; var uintC N = (uintC)(2.718281828*x); var cl_LF fterm = cl_I_to_LF(1,actuallen); var cl_LF fsum = fterm; var cl_LF gterm = fterm; var cl_LF gsum = gterm; var uintC n; // After n loops // fterm = x^n/n!, fsum = 1 + x/1! + ... + x^n/n!, // gterm = S_n*x^n/n!, gsum = S_0*x^0/0! + ... + S_n*x^n/n!. for (n = 1; n < N; n++) { fterm = The(cl_LF)(fterm*x)/n; fsum = fsum + fterm; gterm = The(cl_LF)(gterm*x)/n; if (evenp(n)) gterm = gterm + fterm/square((cl_I)(2*n+1)); else gterm = gterm - fterm/square((cl_I)(2*n+1)); gsum = gsum + gterm; } var cl_LF result = gsum/fsum; return shorten(result,len); // verkürzen und fertig } // Bit complexity (N = len): O(N^2). // Same algorithm as expintegral1, but using binary splitting to evaluate // the sums. const cl_LF compute_catalanconst_expintegral2 (uintC len) { var uintC actuallen = len+2; // 2 guard digits var uintC x = (uintC)(0.693148*intDsize*actuallen)+1; var uintC N = (uintC)(2.718281828*x); CL_ALLOCA_STACK; var cl_pqd_series_term* args = (cl_pqd_series_term*) cl_alloca(N*sizeof(cl_pqd_series_term)); var uintC n; for (n = 0; n < N; n++) { if (n==0) { init1(cl_I, args[n].p) (1); init1(cl_I, args[n].q) (1); } else { init1(cl_I, args[n].p) (x); init1(cl_I, args[n].q) (n); } init1(cl_I, args[n].d) (evenp(n) ? square((cl_I)(2*n+1)) : -square((cl_I)(2*n+1))); } var cl_LF result = eval_pqd_series(N,args,actuallen); for (n = 0; n < N; n++) { args[n].p.~cl_I(); args[n].q.~cl_I(); args[n].d.~cl_I(); } return shorten(result,len); // verkürzen und fertig } // Bit complexity (N = len): O(log(N)^2*M(N)). // Using Cohen-Villegas-Zagier acceleration, but without binary splitting. const cl_LF compute_catalanconst_cvz1 (uintC len) { var uintC actuallen = len+2; // 2 guard digits var uintC N = (uintC)(0.39321985*intDsize*actuallen)+1; #if 0 var cl_LF fterm = cl_I_to_LF(2*(cl_I)N*(cl_I)N,actuallen); var cl_LF fsum = fterm; var cl_LF gterm = fterm; var cl_LF gsum = gterm; var uintC n; // After n loops // fterm = (N+n)!N/(2n+2)!(N-n-1)!*2^(2n+2), fsum = ... + fterm, // gterm = S_n*fterm, gsum = ... + gterm. for (n = 1; n < N; n++) { fterm = The(cl_LF)(fterm*(2*(cl_I)(N-n)*(cl_I)(N+n)))/((cl_I)(2*n+1)*(cl_I)(n+1)); fsum = fsum + fterm; gterm = The(cl_LF)(gterm*(2*(cl_I)(N-n)*(cl_I)(N+n)))/((cl_I)(2*n+1)*(cl_I)(n+1)); if (evenp(n)) gterm = gterm + fterm/square((cl_I)(2*n+1)); else gterm = gterm - fterm/square((cl_I)(2*n+1)); gsum = gsum + gterm; } var cl_LF result = gsum/(cl_I_to_LF(1,actuallen)+fsum); #else // Take advantage of the fact that fterm and fsum are integers. var cl_I fterm = 2*(cl_I)N*(cl_I)N; var cl_I fsum = fterm; var cl_LF gterm = cl_I_to_LF(fterm,actuallen); var cl_LF gsum = gterm; var uintC n; // After n loops // fterm = (N+n)!N/(2n+2)!(N-n-1)!*2^(2n+2), fsum = ... + fterm, // gterm = S_n*fterm, gsum = ... + gterm. for (n = 1; n < N; n++) { fterm = exquopos(fterm*(2*(cl_I)(N-n)*(cl_I)(N+n)),(cl_I)(2*n+1)*(cl_I)(n+1)); fsum = fsum + fterm; gterm = The(cl_LF)(gterm*(2*(cl_I)(N-n)*(cl_I)(N+n)))/((cl_I)(2*n+1)*(cl_I)(n+1)); if (evenp(n)) gterm = gterm + cl_I_to_LF(fterm,actuallen)/square((cl_I)(2*n+1)); else gterm = gterm - cl_I_to_LF(fterm,actuallen)/square((cl_I)(2*n+1)); gsum = gsum + gterm; } var cl_LF result = gsum/cl_I_to_LF(1+fsum,actuallen); #endif return shorten(result,len); // verkürzen und fertig } // Bit complexity (N = len): O(N^2). // Using Cohen-Villegas-Zagier acceleration, with binary splitting. const cl_LF compute_catalanconst_cvz2 (uintC len) { var uintC actuallen = len+2; // 2 guard digits var uintC N = (uintC)(0.39321985*intDsize*actuallen)+1; CL_ALLOCA_STACK; var cl_pqd_series_term* args = (cl_pqd_series_term*) cl_alloca(N*sizeof(cl_pqd_series_term)); var uintC n; for (n = 0; n < N; n++) { init1(cl_I, args[n].p) (2*(cl_I)(N-n)*(cl_I)(N+n)); init1(cl_I, args[n].q) ((cl_I)(2*n+1)*(cl_I)(n+1)); init1(cl_I, args[n].d) (evenp(n) ? square((cl_I)(2*n+1)) : -square((cl_I)(2*n+1))); } var cl_pqd_series_result sums; eval_pqd_series_aux(N,args,sums); // Here we need U/(1+S) = V/D(Q+T). var cl_LF result = cl_I_to_LF(sums.V,actuallen) / The(cl_LF)(sums.D * cl_I_to_LF(sums.Q+sums.T,actuallen)); for (n = 0; n < N; n++) { args[n].p.~cl_I(); args[n].q.~cl_I(); args[n].d.~cl_I(); } return shorten(result,len); // verkürzen und fertig } // Bit complexity (N = len): O(log(N)^2*M(N)). const cl_LF compute_catalanconst_lupas (uintC len) { // [Alexandru Lupas. Formulae for Some Classical Constants. // Proceedings of ROGER-2000. // http://www.lacim.uqam.ca/~plouffe/articles/alupas1.pdf] // [http://mathworld.wolfram.com/CatalansConstant.html] // G = 19/18 * sum(n=0..infty, // mul(m=1..n, -32*((80*m^3+72*m^2-18*m-19)*m^3)/ // (10240*m^6+14336*m^5+2560*m^4-3072*m^3-888*m^2+72*m+27))). struct rational_series_stream : cl_pq_series_stream { cl_I n; static cl_pq_series_term computenext (cl_pq_series_stream& thisss) { var rational_series_stream& thiss = (rational_series_stream&)thisss; var cl_I n = thiss.n; var cl_pq_series_term result; if (zerop(n)) { result.p = 1; result.q = 1; } else { // Compute -32*((80*n^3+72*n^2-18*n-19)*n^3) (using Horner scheme): result.p = (19+(18+(-72-80*n)*n)*n)*n*n*n << 5; // Compute 10240*n^6+14336*n^5+2560*n^4-3072*n^3-888*n^2+72*n+27: result.q = 27+(72+(-888+(-3072+(2560+(14336+10240*n)*n)*n)*n)*n)*n; } thiss.n = plus1(n); return result; } rational_series_stream () : cl_pq_series_stream (rational_series_stream::computenext), n (0) {} } series; var uintC actuallen = len + 2; // 2 guard digits var uintC N = (intDsize/2)*actuallen; var cl_LF fsum = eval_rational_series(N,series,actuallen,actuallen); var cl_LF g = fsum*cl_I_to_LF(19,actuallen)/cl_I_to_LF(18,actuallen); return shorten(g,len); } // Bit complexity (N = len): O(log(N)^2*M(N)). // Timings of the above algorithms, on an AMD Opteron 1.7 GHz, running Linux/x86. // N ram ramfast exp1 exp2 cvz1 cvz2 lupas // 25 0.0011 0.0010 0.0094 0.0107 0.0021 0.0016 0.0034 // 50 0.0030 0.0025 0.0280 0.0317 0.0058 0.0045 0.0095 // 100 0.0087 0.0067 0.0854 0.0941 0.0176 0.0121 0.0260 // 250 0.043 0.029 0.462 0.393 0.088 0.055 0.109 // 500 0.15 0.086 1.7 1.156 0.323 0.162 0.315 // 1000 0.57 0.25 7.5 3.23 1.27 0.487 0.864 // 2500 3.24 1.10 52.2 12.4 8.04 2.02 3.33 // 5000 13.1 3.06 218 32.7 42.1 5.59 8.80 // 10000 52.7 8.2 910 85.3 216.7 15.3 22.7 // 25000 342 29.7 6403 295 1643 54.5 77.3 // 50000 89.9 139 195 //100000 227 363 483 // asymp. N^2 FAST N^2 FAST N^2 FAST FAST // (FAST means O(log(N)^2*M(N))) // // The "ramfast" algorithm is always fastest. const cl_LF compute_catalanconst (uintC len) { return compute_catalanconst_ramanujan_fast(len); } // Bit complexity (N := len): O(log(N)^2*M(N)). const cl_LF catalanconst (uintC len) { var uintC oldlen = TheLfloat(cl_LF_catalanconst())->len; // vorhandene Länge if (len < oldlen) return shorten(cl_LF_catalanconst(),len); if (len == oldlen) return cl_LF_catalanconst(); // TheLfloat(cl_LF_catalanconst())->len um mindestens einen konstanten Faktor // > 1 wachsen lassen, damit es nicht zu häufig nachberechnet wird: var uintC newlen = len; oldlen += floor(oldlen,2); // oldlen * 3/2 if (newlen < oldlen) newlen = oldlen; // gewünschte > vorhandene Länge -> muß nachberechnen: cl_LF_catalanconst() = compute_catalanconst(newlen); return (len < newlen ? shorten(cl_LF_catalanconst(),len) : cl_LF_catalanconst()); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_eulerconst.cc0000644000000000000000000000072011201634737017501 0ustar // eulerconst(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/transcendental/cl_F_tran.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F eulerconst (const cl_F& y) { floattypecase(y , return cl_SF_eulerconst(); , return cl_FF_eulerconst(); , return cl_DF_eulerconst(); , return eulerconst(TheLfloat(y)->len); ); } } // namespace cln cln-1.3.3/src/float/transcendental/cl_F_eulerconst_var.h0000644000000000000000000000141211201634737020212 0ustar { #if CL_DS_BIG_ENDIAN_P #if (intDsize==8) D1(0x93), D1(0xC4), D1(0x67), D1(0xE3), D1(0x7D), D1(0xB0), D1(0xC7), D1(0xA5) #endif #if (intDsize==16) D2(0x93,0xC4), D2(0x67,0xE3), D2(0x7D,0xB0), D2(0xC7,0xA5) #endif #if (intDsize==32) D4(0x93,0xC4,0x67,0xE3), D4(0x7D,0xB0,0xC7,0xA5) #endif #if (intDsize==64) D8(0x93,0xC4,0x67,0xE3,0x7D,0xB0,0xC7,0xA5) #endif #else #if (intDsize==8) D1(0xA5), D1(0xC7), D1(0xB0), D1(0x7D), D1(0xE3), D1(0x67), D1(0xC4), D1(0x93) #endif #if (intDsize==16) D2(0xC7,0xA5), D2(0x7D,0xB0), D2(0x67,0xE3), D2(0x93,0xC4) #endif #if (intDsize==32) D4(0x7D,0xB0,0xC7,0xA5), D4(0x93,0xC4,0x67,0xE3) #endif #if (intDsize==64) D8(0x93,0xC4,0x67,0xE3,0x7D,0xB0,0xC7,0xA5) #endif #endif } ; cln-1.3.3/src/float/base/0000755000000000000000000000000012173046176011775 5ustar cln-1.3.3/src/float/base/cl_F_nan_exception.cc0000644000000000000000000000051611201634736016057 0ustar // floating_point_nan_exception(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/cl_F.h" // Implementation. #include "cln/io.h" namespace cln { floating_point_nan_exception::floating_point_nan_exception () : floating_point_exception("floating point NaN occurred.") {} } // namespace cln cln-1.3.3/src/float/base/cl_F_overflow_exception.cc0000644000000000000000000000053111201634736017143 0ustar // floating_point_overflow_exception(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/cl_F.h" // Implementation. #include "cln/io.h" namespace cln { floating_point_overflow_exception::floating_point_overflow_exception () : floating_point_exception("floating point overflow.") {} } // namespace cln cln-1.3.3/src/float/base/cl_F_underflow_exception.cc0000644000000000000000000000053511201634736017311 0ustar // floating_point_underflow_exception(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/cl_F.h" // Implementation. #include "cln/io.h" namespace cln { floating_point_underflow_exception::floating_point_underflow_exception () : floating_point_exception("floating point underflow.") {} } // namespace cln cln-1.3.3/src/float/base/cl_F_globals.cc0000644000000000000000000000044611201634736014652 0ustar // Global variables in CLN // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. namespace cln { bool cl_inhibit_floating_point_underflow = false; float_format_t default_float_format = float_format_ffloat; } // namespace cln cln-1.3.3/src/float/misc/0000755000000000000000000000000012173046200012002 5ustar cln-1.3.3/src/float/misc/cl_F_epsneg.cc0000644000000000000000000000275611201634737014540 0ustar // float_negative_epsilon(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" namespace cln { static inline const cl_LF LF_negative_epsilon (uintC len) { var Lfloat erg = allocate_lfloat(len,LF_exp_mid-intDsize*len,0); var uintD* ptr = &TheLfloat(erg)->data[0]; #if CL_DS_BIG_ENDIAN_P *ptr++ = bit(intDsize-1); ptr = clear_loop_up(ptr,len-2); *ptr = bit(0); #else *ptr++ = bit(0); ptr = clear_loop_up(ptr,len-2); *ptr = bit(intDsize-1); #endif return erg; } const cl_F float_negative_epsilon (float_format_t f) { // Bei Floats mit d Bits (incl. Hiddem Bit, also d = ?F_mant_len+1) // ist ?F_negative_epsilon = 2^(-d-1)*(1+2^(1-d)), // d.h. Mantisse 10...01, Vorzeichen +. static const cl_SF SF_negative_epsilon = make_SF(0,SF_exp_mid-SF_mant_len-1,bit(SF_mant_len)+1); static const cl_FF FF_negative_epsilon = encode_FF(0,-FF_mant_len-1,bit(FF_mant_len)+1); static const cl_DF DF_negative_epsilon = #if (cl_word_size==64) encode_DF(0,-DF_mant_len-1,bit(DF_mant_len)+1); #else encode_DF(0,-DF_mant_len-1,bit(DF_mant_len-32),1); #endif floatformatcase((uintC)f , return SF_negative_epsilon; , return FF_negative_epsilon; , return DF_negative_epsilon; , return LF_negative_epsilon(len); ); } } // namespace cln cln-1.3.3/src/float/misc/cl_F_idecode.cc0000644000000000000000000000124611201634737014644 0ustar // integer_decode_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "base/cl_inline.h" #include "float/sfloat/misc/cl_SF_idecode.cc" #include "float/ffloat/misc/cl_FF_idecode.cc" #include "float/dfloat/misc/cl_DF_idecode.cc" #include "float/lfloat/misc/cl_LF_idecode.cc" namespace cln { const cl_idecoded_float CL_FLATTEN integer_decode_float (const cl_F& x) { floatcase(x , return integer_decode_float_inline(x); , return integer_decode_float_inline(x); , return integer_decode_float_inline(x); , return integer_decode_float_inline(x); ); } } // namespace cln cln-1.3.3/src/float/misc/cl_F_as.cc0000644000000000000000000000126211201634737013651 0ustar // cl_F_As(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "base/cl_N.h" namespace cln { inline bool cl_F_p (const cl_number& x) { if (!x.pointer_p()) switch (cl_tag((x).word)) { case cl_SF_tag: #if defined(CL_WIDE_POINTERS) case cl_FF_tag: #endif return true; } else if (x.heappointer->type->flags & cl_class_flags_subclass_float) return true; return false; } const cl_F& cl_F_As (const cl_number& x, const char * filename, int line) { if (cl_F_p(x)) { DeclareType(cl_F,x); return x; } else throw as_exception(x,"a floating-point number",filename,line); } } // namespace cln cln-1.3.3/src/float/misc/cl_F_eqhashcode.cc0000644000000000000000000000123111201634737015346 0ustar // cl_F equal_hashcode(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "base/cl_N.h" #include "float/cl_F.h" #include "base/cl_inline.h" #include "float/sfloat/misc/cl_SF_eqhashcode.cc" #include "float/ffloat/misc/cl_FF_eqhashcode.cc" #include "float/dfloat/misc/cl_DF_eqhashcode.cc" #include "float/lfloat/misc/cl_LF_eqhashcode.cc" namespace cln { uint32 CL_FLATTEN equal_hashcode (const cl_F& x) { floatcase(x , return equal_hashcode_inline(x); , return equal_hashcode_inline(x); , return equal_hashcode_inline(x); , return equal_hashcode_inline(x); ); } } // namespace cln cln-1.3.3/src/float/misc/cl_F_max.cc0000644000000000000000000000035611201634737014036 0ustar // max(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. namespace cln { const cl_F max (const cl_F& x, const cl_F& y) { return (x >= y ? x : y); } } // namespace cln cln-1.3.3/src/float/misc/cl_F_leastneg.cc0000644000000000000000000000254211201634737015052 0ustar // least_negative_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" namespace cln { static inline const cl_LF least_negative_LF (uintC len) { var Lfloat erg = allocate_lfloat(len,LF_exp_low,-1); #if CL_DS_BIG_ENDIAN_P TheLfloat(erg)->data[0] = bit(intDsize-1); clear_loop_up(&TheLfloat(erg)->data[1],len-1); #else var uintD* ptr = clear_loop_up(&TheLfloat(erg)->data[0],len-1); *ptr = bit(intDsize-1); #endif return erg; } const cl_F least_negative_float (float_format_t f) { // Exponent so klein wie möglich, Mantisse 10...0, Vorzeichen -. static const cl_SF least_negative_SF = make_SF(-1,SF_exp_low,bit(SF_mant_len)); static const cl_FF least_negative_FF = encode_FF(-1,FF_exp_low-FF_exp_mid,bit(FF_mant_len)); static const cl_DF least_negative_DF = #if (cl_word_size==64) encode_DF(-1,DF_exp_low-DF_exp_mid,bit(DF_mant_len)); #else encode_DF(-1,DF_exp_low-DF_exp_mid,bit(DF_mant_len-32),0); #endif floatformatcase((uintC)f , return least_negative_SF; , return least_negative_FF; , return least_negative_DF; , return least_negative_LF(len); ); } } // namespace cln cln-1.3.3/src/float/misc/cl_F_mostneg.cc0000644000000000000000000000230411201634737014720 0ustar // most_negative_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" namespace cln { static inline const cl_LF most_negative_LF (uintC len) { var Lfloat erg = allocate_lfloat(len,LF_exp_high,-1); fill_loop_up(&TheLfloat(erg)->data[0],len,~(uintD)0); return erg; } const cl_F most_negative_float (float_format_t f) { // Exponent so groß wie möglich, Mantisse 1...1, Vorzeichen -. static const cl_SF most_negative_SF = make_SF(-1,SF_exp_high,bit(SF_mant_len+1)-1); static const cl_FF most_negative_FF = encode_FF(-1,FF_exp_high-FF_exp_mid,bit(FF_mant_len+1)-1); static const cl_DF most_negative_DF = #if (cl_word_size==64) encode_DF(-1,DF_exp_high-DF_exp_mid,bit(DF_mant_len+1)-1); #else encode_DF(-1,DF_exp_high-DF_exp_mid,bit(DF_mant_len-32+1)-1,bitm(32)-1); #endif floatformatcase((uintC)f , return most_negative_SF; , return most_negative_FF; , return most_negative_DF; , return most_negative_LF(len); ); } } // namespace cln cln-1.3.3/src/float/misc/cl_F_sign2.cc0000644000000000000000000000057711201634737014300 0ustar // float_sign(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" namespace cln { const cl_F float_sign (const cl_F& x, const cl_F& y) { // Methode: // Falls x<0 xor y<0, Ergebnis (- y), sonst Ergebnis y. if (minusp(x) != minusp(y)) return -y; else return y; } } // namespace cln cln-1.3.3/src/float/misc/cl_F_extendsqrt.cc0000644000000000000000000000206511201634737015451 0ustar // cl_F_extendsqrt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/cl_F.h" // Implementation. #include "float/sfloat/cl_SF.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F cl_F_extendsqrt (const cl_F& x) { // Methode: // SF -> FF wegen 17+sqrt(17)+2 = 23.2 < 24 // FF -> DF wegen 24+sqrt(24)+2 = 30.9 < 53 // DF -> LF(4) wegen 53+sqrt(53)+2 = 62.3 < 64 // LF(n) -> LF(n+1) für n<=12 wegen 16n+sqrt(16n)+2 < 16(n+1) // LF(n) -> LF(n+2) für n<=56 wegen 16n+sqrt(16n)+2 < 16(n+2) // LF(n) -> LF(n+4) für n<=240 // LF(n) -> LF(n+8) für n<=992 // LF(n) -> LF(n+16) für n<=4032 // LF(n) -> LF(n+32) für n<=16256 // LF(n) -> LF(n+65) für n<=65535 floatcase(x , if (SF_mant_len+1<=17) return cl_SF_to_FF(x); // 17+sqrt(17)+2 = 23.2 < 24 else return cl_SF_to_DF(x); // 24+sqrt(24)+2 = 30.9 < 53 , return cl_FF_to_DF(x); // 24+sqrt(24)+2 = 30.9 < 53 , return cl_DF_to_LF(x,ceiling(63,intDsize)); // 53+sqrt(53)+2 = 62.3 < 63 , return extend(x,cl_LF_len_incsqrt(TheLfloat(x)->len)); ); } } // namespace cln cln-1.3.3/src/float/misc/cl_F_epspos.cc0000644000000000000000000000257511201634737014567 0ustar // float_epsilon(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" namespace cln { static inline const cl_LF LF_epsilon (uintC len) { var Lfloat erg = allocate_lfloat(len,LF_exp_mid+1-intDsize*len,0); var uintD* ptr = &TheLfloat(erg)->data[0]; #if CL_DS_BIG_ENDIAN_P *ptr++ = bit(intDsize-1); ptr = clear_loop_up(ptr,len-2); *ptr = bit(0); #else *ptr++ = bit(0); ptr = clear_loop_up(ptr,len-2); *ptr = bit(intDsize-1); #endif return erg; } const cl_F float_epsilon (float_format_t f) { // Bei Floats mit d Bits (incl. Hiddem Bit, also d = ?F_mant_len+1) // ist ?F_epsilon = 2^-d*(1+2^(1-d)), d.h. Mantisse 10...01, Vorzeichen +. static const cl_SF SF_epsilon = make_SF(0,SF_exp_mid-SF_mant_len,bit(SF_mant_len)+1); static const cl_FF FF_epsilon = encode_FF(0,-FF_mant_len,bit(FF_mant_len)+1); static const cl_DF DF_epsilon = #if (cl_word_size==64) encode_DF(0,-DF_mant_len,bit(DF_mant_len)+1); #else encode_DF(0,-DF_mant_len,bit(DF_mant_len-32),1); #endif floatformatcase((uintC)f , return SF_epsilon; , return FF_epsilon; , return DF_epsilon; , return LF_epsilon(len); ); } } // namespace cln cln-1.3.3/src/float/misc/cl_F_digits.cc0000644000000000000000000000112511201634737014527 0ustar // float_digits(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "base/cl_inline.h" #include "float/sfloat/misc/cl_SF_digits.cc" #include "float/ffloat/misc/cl_FF_digits.cc" #include "float/dfloat/misc/cl_DF_digits.cc" #include "float/lfloat/misc/cl_LF_digits.cc" namespace cln { uintC float_digits (const cl_F& x) { floatcase(x , return float_digits_inline(x); , return float_digits_inline(x); , return float_digits_inline(x); , return float_digits_inline(x); ); } } // namespace cln cln-1.3.3/src/float/misc/cl_F_leastpos.cc0000644000000000000000000000253511201634737015104 0ustar // least_positive_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" namespace cln { static inline const cl_LF least_positive_LF (uintC len) { var Lfloat erg = allocate_lfloat(len,LF_exp_low,0); #if CL_DS_BIG_ENDIAN_P TheLfloat(erg)->data[0] = bit(intDsize-1); clear_loop_up(&TheLfloat(erg)->data[1],len-1); #else var uintD* ptr = clear_loop_up(&TheLfloat(erg)->data[0],len-1); *ptr = bit(intDsize-1); #endif return erg; } const cl_F least_positive_float (float_format_t f) { // Exponent so klein wie möglich, Mantisse 10...0, Vorzeichen +. static const cl_SF least_positive_SF = make_SF(0,SF_exp_low,bit(SF_mant_len)); static const cl_FF least_positive_FF = encode_FF(0,FF_exp_low-FF_exp_mid,bit(FF_mant_len)); static const cl_DF least_positive_DF = #if (cl_word_size==64) encode_DF(0,DF_exp_low-DF_exp_mid,bit(DF_mant_len)); #else encode_DF(0,DF_exp_low-DF_exp_mid,bit(DF_mant_len-32),0); #endif floatformatcase((uintC)f , return least_positive_SF; , return least_positive_FF; , return least_positive_DF; , return least_positive_LF(len); ); } } // namespace cln cln-1.3.3/src/float/misc/cl_F_min.cc0000644000000000000000000000035611201634737014034 0ustar // min(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. namespace cln { const cl_F min (const cl_F& x, const cl_F& y) { return (x <= y ? x : y); } } // namespace cln cln-1.3.3/src/float/misc/cl_F_rational.cc0000644000000000000000000000245411201634737015063 0ustar // rational(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "cln/integer.h" #include "rational/cl_RA.h" namespace cln { const cl_RA rational (const cl_F& x) { // Methode: // Der mathematische Wert eines Float ist, wenn INTEGER-DECODE-FLOAT die // drei Zahlen m,e,s (Mantisse, Exponent, Vorzeichen) liefert, // = s * 2^e * m. // n:=m. Falls s<0, setze n:=-m. // Falls e>=0, ist (ash n e) das Ergebnis, // sonst ist die rationale Zahl (/ n (ash 1 (- e))) das Ergebnis. var cl_idecoded_float x_decoded = integer_decode_float(x); var cl_I& m = x_decoded.mantissa; var cl_I& e = x_decoded.exponent; var cl_I& s = x_decoded.sign; var cl_I n = (!minusp(s) ? m : -m); if (!minusp(e)) return ash(n,e); else { #if 0 return I_posI_div_RA(n, ash(1,-e)); #else // spart ggT // n /= 0, -e > 0. Kürze mit ggT(n,2^(-e)) = 2^min(ord2(n),-e). // 0 < -e <= LF_exp_mid-LF_exp_low + intDsize*len < 2^32, var cl_I minus_e = -e; var uintL _e = cl_I_to_UL(minus_e); // daher kein Überlauf var uintC k = ord2(n); if (k >= _e) // Kürze mit 2^(-e). return ash(n,e); else // Kürze mit 2^k, 0 <= k < -e. return I_I_to_RT(ash(n,-(sintC)k), ash(1,minus_e-(cl_I)(unsigned long)k)); #endif } } } // namespace cln cln-1.3.3/src/float/misc/cl_F_exponent.cc0000644000000000000000000000116411201634737015107 0ustar // float_exponent(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "base/cl_inline.h" #include "float/sfloat/misc/cl_SF_exponent.cc" #include "float/ffloat/misc/cl_FF_exponent.cc" #include "float/dfloat/misc/cl_DF_exponent.cc" #include "float/lfloat/misc/cl_LF_exponent.cc" namespace cln { sintE CL_FLATTEN float_exponent (const cl_F& x) { floatcase(x , return float_exponent_inline(x); , return float_exponent_inline(x); , return float_exponent_inline(x); , return float_exponent_inline(x); ); } } // namespace cln cln-1.3.3/src/float/misc/cl_F_shortenrel.cc0000644000000000000000000000230011201634737015425 0ustar // cl_F_shortenrelative(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/cl_F.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "cln/exception.h" namespace cln { const cl_F cl_F_shortenrelative (const cl_F& x, const cl_F& y) { // Methode: // x = 0.0 -> Precision egal, return x. // ex := float_exponent(x), ey := float_exponent(y). // dx := float_digits(x), dy := float_digits(y). // 1 ulp(x) = 2^(ex-dx), 1 ulp(y) = 2^(ey-dy). // Falls ex-dx < ey-dy, x von Precision dx auf dy-ey+ex verkürzen. var sintE ey = float_exponent(y); var sintC dy = float_precision(y); if (dy==0) // zerop(y) ? throw runtime_exception(); var sintE ex = float_exponent(x); var sintC dx = float_precision(x); if (dx==0) // zerop(x) ? return x; var sintE d = ex - ey; if (ex>=0 && ey<0 && d<0) // d overflow? return x; if (ex<0 && ey>=0 && d>=0) // d underflow? return cl_F_to_SF(x); if (d >= dx - dy) return x; var uintC new_dx = dy + d; floatformatcase(new_dx , return cl_F_to_SF(x); , return cl_F_to_FF(x); , return cl_F_to_DF(x); , if (intDsize*len < (uintC)dx) return shorten(The(cl_LF)(x),len); else return x; ); } } // namespace cln cln-1.3.3/src/float/misc/cl_F_decode.cc0000644000000000000000000000504611201634737014475 0ustar // decode_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "integer/cl_I.h" #include "float/cl_F.h" namespace cln { inline const decoded_float decode_float (const cl_SF& x) { // x entpacken: var cl_signean sign; var sintL exp; var uint32 mant; SF_decode(x, { return decoded_float(SF_0, 0, SF_1); }, sign=,exp=,mant= ); return decoded_float( encode_SF(0,0,mant), // (-1)^0 * 2^0 * m erzeugen L_to_FN(exp), // e als Fixnum encode_SF(sign,1,bit(SF_mant_len)) // (-1)^s erzeugen ); } inline const decoded_float decode_float (const cl_FF& x) { // x entpacken: var cl_signean sign; var sintL exp; var uint32 mant; FF_decode(x, { return decoded_float(cl_FF_0, 0, cl_FF_1); }, sign=,exp=,mant= ); return decoded_float( encode_FF(0,0,mant), // (-1)^0 * 2^0 * m erzeugen L_to_FN(exp), // e als Fixnum encode_FF(sign,1,bit(FF_mant_len)) // (-1)^s erzeugen ); } inline const decoded_float decode_float (const cl_DF& x) { // x entpacken: var cl_signean sign; var sintL exp; #if (cl_word_size==64) var uint64 mant; DF_decode(x, { return decoded_float(cl_DF_0, 0, cl_DF_1); }, sign=,exp=,mant= ); return decoded_float( encode_DF(0,0,mant), // (-1)^0 * 2^0 * m erzeugen L_to_FN(exp), // e als Fixnum encode_DF(sign,1,bit(DF_mant_len)) // (-1)^s erzeugen ); #else var uint32 manthi; var uint32 mantlo; DF_decode2(x, { return decoded_float(cl_DF_0, 0, cl_DF_1); }, sign=,exp=,manthi=,mantlo= ); return decoded_float( encode_DF(0,0,manthi,mantlo), // (-1)^0 * 2^0 * m erzeugen L_to_FN(exp), // e als Fixnum encode_DF(sign,1,bit(DF_mant_len-32),0) // (-1)^s erzeugen ); #endif } inline const decoded_float decode_float (const cl_LF& x) { // x entpacken: var cl_signean sign; var sintE exp; var uintC mantlen; var const uintD* mantMSDptr; LF_decode(x, { return decoded_float(x, 0, encode_LF1(mantlen)); }, sign=,exp=,mantMSDptr=,mantlen=,); return decoded_float( encode_LFu(0,0+LF_exp_mid,mantMSDptr,mantlen), // (-1)^0 * 2^0 * m erzeugen E_to_I(exp), // e als Fixnum encode_LF1s(sign,mantlen) // (-1)^s erzeugen ); } const decoded_float decode_float (const cl_F& x) { floatcase(x , return decode_float(x); , return decode_float(x); , return decode_float(x); , return decode_float(x); ); } } // namespace cln cln-1.3.3/src/float/misc/cl_F_signum.cc0000644000000000000000000000120211201634737014542 0ustar // signum(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" /* Use inline versions of signum(cl_{SF,FF,DF,LF}) functions */ #include "base/cl_inline2.h" #include "float/sfloat/misc/cl_SF_signum.cc" #include "float/ffloat/misc/cl_FF_signum.cc" #include "float/dfloat/misc/cl_DF_signum.cc" #include "float/lfloat/misc/cl_LF_signum.cc" namespace cln { const cl_F CL_FLATTEN signum (const cl_F& x) { floatcase(x , return signum_inline(x); , return signum_inline(x); , return signum_inline(x); , return signum_inline(x); ); } } // namespace cln cln-1.3.3/src/float/misc/cl_F_sign.cc0000644000000000000000000000121111201634737014200 0ustar // float_sign(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "base/cl_inline2.h" #include "float/sfloat/misc/cl_SF_sign.cc" #include "float/ffloat/misc/cl_FF_sign.cc" #include "float/dfloat/misc/cl_DF_sign.cc" #include "float/lfloat/misc/cl_LF_sign.cc" namespace cln { const cl_F CL_FLATTEN float_sign (const cl_F& x) { // Methode: x>=0 -> Ergebnis 1.0; x<0 -> Ergebnis -1.0 floatcase(x , return float_sign_inline(x); , return float_sign_inline(x); , return float_sign_inline(x); , return float_sign_inline(x); ); } } // namespace cln cln-1.3.3/src/float/misc/cl_F_precision.cc0000644000000000000000000000114311201634737015237 0ustar // float_precision(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "base/cl_inline2.h" #include "float/sfloat/misc/cl_SF_precision.cc" #include "float/ffloat/misc/cl_FF_precision.cc" #include "float/dfloat/misc/cl_DF_precision.cc" #include "float/lfloat/misc/cl_LF_precision.cc" namespace cln { uintC CL_FLATTEN float_precision (const cl_F& x) { floatcase(x , return float_precision(x); , return float_precision(x); , return float_precision(x); , return float_precision(x); ); } } // namespace cln cln-1.3.3/src/float/misc/cl_F_extendsqrtx.cc0000644000000000000000000000133411201634737015637 0ustar // cl_F_extendsqrtx(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/cl_F.h" // Implementation. #include "float/sfloat/cl_SF.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F cl_F_extendsqrtx (const cl_F& x) { // Methode: // SF -> DF wegen 17+sqrt(17)+2+7 = 30.2 < 53 // FF -> DF wegen 24+sqrt(24)+2+7 = 37.9 < 53 // DF -> LF(5) wegen 53+sqrt(53)+2+10 = 72.3 < 80 // LF(n) -> LF(n+i) floatcase(x , return cl_SF_to_DF(x); // 17+sqrt(17)+2+7 = 30.2 < 53 , return cl_FF_to_DF(x); // 24+sqrt(24)+2+7 = 37.9 < 53 , return cl_DF_to_LF(x,ceiling(73,intDsize)); // 53+sqrt(53)+2+10 = 72.3 < 73 , return extend(x,cl_LF_len_incsqrtx(TheLfloat(x)->len)); ); } } // namespace cln cln-1.3.3/src/float/misc/cl_F_mostpos.cc0000644000000000000000000000227711201634737014761 0ustar // most_positive_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" namespace cln { static inline const cl_LF most_positive_LF (uintC len) { var Lfloat erg = allocate_lfloat(len,LF_exp_high,0); fill_loop_up(&TheLfloat(erg)->data[0],len,~(uintD)0); return erg; } const cl_F most_positive_float (float_format_t f) { // Exponent so groß wie möglich, Mantisse 1...1, Vorzeichen +. static const cl_SF most_positive_SF = make_SF(0,SF_exp_high,bit(SF_mant_len+1)-1); static const cl_FF most_positive_FF = encode_FF(0,FF_exp_high-FF_exp_mid,bit(FF_mant_len+1)-1); static const cl_DF most_positive_DF = #if (cl_word_size==64) encode_DF(0,DF_exp_high-DF_exp_mid,bit(DF_mant_len+1)-1); #else encode_DF(0,DF_exp_high-DF_exp_mid,bit(DF_mant_len-32+1)-1,bitm(32)-1); #endif floatformatcase((uintC)f , return most_positive_SF; , return most_positive_FF; , return most_positive_DF; , return most_positive_LF(len); ); } } // namespace cln cln-1.3.3/src/float/misc/cl_F_abs.cc0000644000000000000000000000142211201634737014011 0ustar // abs(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "base/cl_inline.h" #include "float/sfloat/elem/cl_SF_minusp.cc" #include "float/ffloat/elem/cl_FF_minusp.cc" #include "float/dfloat/elem/cl_DF_minusp.cc" #include "float/lfloat/elem/cl_LF_minusp.cc" namespace cln { const cl_F CL_FLATTEN abs (const cl_F& x) { // x<0 -> (- x), x>=0 -> x floatcase(x , if (minusp_inline(x)) return -x; else return x; , if (minusp_inline(x)) return -x; else return x; , if (minusp_inline(x)) return -x; else return x; , if (minusp_inline(x)) return -x; else return x; ); } } // namespace cln cln-1.3.3/src/float/misc/cl_float_format.cc0000644000000000000000000000174411201634737015463 0ustar // float_format(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. namespace cln { float_format_t float_format (uintE n) { // Methode: // Mindestens 1+n Dezimalstellen (inklusive Vorkommastelle) // bedeutet mindestens ceiling((1+n)*ln(10)/ln(2)) Binärstellen. // ln(10)/ln(2) = 3.321928095 = (binär) 11.0101001001101001111000010010111100110100... // = (binär) 100 - 0.1010110110010110000111101101000111001011... // Durch diese Berechnungsmethode wird das Ergebnis sicher >= (1+n)*ln(10)/ln(2) // sein, evtl. um ein paar Bit zu groß aber nicht zu klein. n = 1+n; return (float_format_t) ((n << 2) - (n >> 1) - (n >> 3) - (n >> 5) - (n >> 6) - (n >> 8) - (n >> 9) - (n >> 12) - (n >> 14) - (n >> 15) - (n >> 20) - (n >> 21) - (n >> 22) - (n >> 23) - (n >> 25) - (n >> 26) - (n >> 28) #if (intEsize>32) - (n >> 32) - (n >> 33) - (n >> 34) - (n >> 35) #endif ); } } // namespace cln cln-1.3.3/src/float/cl_F.h0000644000000000000000000002462111201634736012100 0ustar // cl_F internals #ifndef _CL_F_H #define _CL_F_H #include "cln/number.h" #include "base/cl_macros.h" #include "cln/float.h" namespace cln { #define underflow_allowed() (! cl_inhibit_floating_point_underflow) // For all floating-point formats: // Sign s, Exponent e, Mantissa mk-1,...,m0 // represents the number (-1)^s * 2^(e-_EXP_MID) * [0 . 1 mk-1 ... m0] // e=0 represents the number 0, always with sign s=0 (and mantissa =0). // _exp_low and _exp_high are (inclusive) bounds for e. // Bits for Sign s Exponent e Mantissa m (= k) // SF 1 8 16 // FF 1 8 23 // DF 1 11 52 // LF 1 32 or 64 intDsize*n >= 53 // Konversionen ohne Rundung: // cl_SF_to_FF(x) wandelt ein Short-Float x in ein Single-Float um. extern const cl_FF cl_SF_to_FF (const cl_SF& x); // cl_SF_to_DF(x) wandelt ein Short-Float x in ein Double-Float um. extern const cl_DF cl_SF_to_DF (const cl_SF& x); // cl_SF_to_LF(x,len) wandelt ein Short-Float x in ein Long-Float mit len Digits um. // > uintC len: gewünschte Anzahl Digits, >=LF_minlen extern const cl_LF cl_SF_to_LF (const cl_SF& x, uintC len); // cl_FF_to_DF(x) wandelt ein Single-Float x in ein Double-Float um. extern const cl_DF cl_FF_to_DF (const cl_FF& x); // cl_FF_to_LF(x,len) wandelt ein Single-Float x in ein Long-Float mit len Digits um. // > uintC len: gewünschte Anzahl Digits, >=LF_minlen extern const cl_LF cl_FF_to_LF (const cl_FF& x, uintC len); // cl_DF_to_LF(x,len) wandelt ein Double-Float x in ein Long-Float mit len Digits um. // > uintC len: gewünschte Anzahl Digits, >=LF_minlen extern const cl_LF cl_DF_to_LF (const cl_DF& x, uintC len); // Konversionen mit Rundung: // cl_FF_to_SF(x) wandelt ein Single-Float x in ein Short-Float um. extern const cl_SF cl_FF_to_SF (const cl_FF& x); // cl_DF_to_SF(x) wandelt ein Double-Float x in ein Short-Float um. extern const cl_SF cl_DF_to_SF (const cl_DF& x); // cl_LF_to_SF(x) wandelt ein Long-Float x in ein Short-Float um. extern const cl_SF cl_LF_to_SF (const cl_LF& x); // cl_DF_to_FF(x) wandelt ein Double-Float x in ein Single-Float um. extern const cl_FF cl_DF_to_FF (const cl_DF& x); // cl_LF_to_FF(x) wandelt ein Long-Float x in ein Single-Float um. extern const cl_FF cl_LF_to_FF (const cl_LF& x); // cl_LF_to_DF(x) wandelt ein Long-Float x in ein Double-Float um. extern const cl_DF cl_LF_to_DF (const cl_LF& x); // Runtime typing support. extern cl_class cl_class_ffloat; extern cl_class cl_class_dfloat; extern cl_class cl_class_lfloat; // Type test. inline bool longfloatp (const cl_F& x) { if (x.pointer_p()) if (x.pointer_type() == &cl_class_lfloat) return true; return false; } // Macro: verteilt je nach Float-Typ eines Floats x auf 4 Statements. // floattypecase(x, SF_statement,FF_statement,DF_statement,LF_statement); // x sollte eine Variable sein. #ifdef CL_WIDE_POINTERS #define floattypecase(x, SF_statement,FF_statement,DF_statement,LF_statement) \ if (!(x).pointer_p()) \ switch ((x).nonpointer_tag()) \ { case cl_SF_tag: { SF_statement } break; \ case cl_FF_tag: { FF_statement } break; \ default: NOTREACHED \ } \ else { \ if ((x).pointer_type() == &cl_class_dfloat) { DF_statement } \ else if ((x).pointer_type() == &cl_class_lfloat) { LF_statement } \ else NOTREACHED \ } #else #define floattypecase(x, SF_statement,FF_statement,DF_statement,LF_statement) \ if (!(x).pointer_p()) \ switch ((x).nonpointer_tag()) \ { case cl_SF_tag: { SF_statement } break; \ default: NOTREACHED \ } \ else { \ if ((x).pointer_type() == &cl_class_ffloat) { FF_statement } \ else if ((x).pointer_type() == &cl_class_dfloat) { DF_statement } \ else if ((x).pointer_type() == &cl_class_lfloat) { LF_statement } \ else NOTREACHED \ } #endif // Macro: verteilt je nach Float-Typ eines Floats x auf 4 Statements, // die x vom jeweiligen Float-Typ benutzen dürfen. // floatcase(x, SF_statement,FF_statement,DF_statement,LF_statement); // x sollte eine Variable sein. #define floatcase(x, SF_statement,FF_statement,DF_statement,LF_statement) \ floattypecase(x \ , var cl_SF& __tmp = *(cl_SF*)&x; var cl_SF& x = __tmp; SF_statement \ , var cl_FF& __tmp = *(cl_FF*)&x; var cl_FF& x = __tmp; FF_statement \ , var cl_DF& __tmp = *(cl_DF*)&x; var cl_DF& x = __tmp; DF_statement \ , var cl_LF& __tmp = *(cl_LF*)&x; var cl_LF& x = __tmp; LF_statement \ ) // GEN_F_OP1(arg1,F_OP,ergebnis_zuweisung) // generates the body of a float operation with one argument. // LF_OP is executed once the argument has been converted to its exact // float type. #define GEN_F_OP1(arg1,F_OP,ergebnis_zuweisung) \ { \ floatcase(arg1 \ , /* SF */ ergebnis_zuweisung F_OP(arg1); \ , /* FF */ ergebnis_zuweisung F_OP(arg1); \ , /* DF */ ergebnis_zuweisung F_OP(arg1); \ , /* LF */ ergebnis_zuweisung F_OP(arg1); \ ); \ } // GEN_F_OP2(arg1,arg2,F_OP,r,s,ergebnis_zuweisung) // generates the body of a float operation with two arguments. // F_OP is executed once both arguments have been converted to the same // float format (the longer one of arg1 and arg2). The r results are then // converted the shorter of the two float formats. (r = 0,1,2.) // s = 0,1. s=0 means the LF operation needs two long-floats of the same size. // s=1 means they may be of different sizes. #define GEN_F_OP2(arg1,arg2,F_OP,r,s,ergebnis_zuweisung) \ { \ floatcase(arg1 \ , /* arg1 SF */ \ floatcase(arg2 \ , /* arg2 SF */ \ ergebnis_zuweisung CONCAT(NOMAP,r)(SF, \ F_OP(arg1,arg2) ); \ , /* arg2 FF */ \ ergebnis_zuweisung CONCAT(MAP,r)(FF,cl_FF_to_SF,\ F_OP(cl_SF_to_FF(arg1),arg2) ); \ , /* arg2 DF */ \ ergebnis_zuweisung CONCAT(MAP,r)(DF,cl_DF_to_SF,\ F_OP(cl_SF_to_DF(arg1),arg2) ); \ , /* arg2 LF */ \ ergebnis_zuweisung CONCAT(MAP,r)(LF,cl_LF_to_SF,\ F_OP(cl_SF_to_LF(arg1,CONCAT(LFlen,s)(arg2)),arg2) ); \ ); \ , /* arg1 FF */ \ floatcase(arg2 \ , /* arg2 SF */ \ ergebnis_zuweisung CONCAT(MAP,r)(FF,cl_FF_to_SF,\ F_OP(arg1,cl_SF_to_FF(arg2)) ); \ , /* arg2 FF */ \ ergebnis_zuweisung CONCAT(NOMAP,r)(FF, \ F_OP(arg1,arg2) ); \ , /* arg2 DF */ \ ergebnis_zuweisung CONCAT(MAP,r)(DF,cl_DF_to_FF,\ F_OP(cl_FF_to_DF(arg1),arg2) ); \ , /* arg2 LF */ \ ergebnis_zuweisung CONCAT(MAP,r)(LF,cl_LF_to_FF,\ F_OP(cl_FF_to_LF(arg1,CONCAT(LFlen,s)(arg2)),arg2) ); \ ); \ , /* arg1 DF */ \ floatcase(arg2 \ , /* arg2 SF */ \ ergebnis_zuweisung CONCAT(MAP,r)(DF,cl_DF_to_SF,\ F_OP(arg1,cl_SF_to_DF(arg2)) ); \ , /* arg2 FF */ \ ergebnis_zuweisung CONCAT(MAP,r)(DF,cl_DF_to_FF,\ F_OP(arg1,cl_FF_to_DF(arg2)) ); \ , /* arg2 DF */ \ ergebnis_zuweisung CONCAT(NOMAP,r)(DF, \ F_OP(arg1,arg2) ); \ , /* arg2 LF */ \ ergebnis_zuweisung CONCAT(MAP,r)(LF,cl_LF_to_DF,\ F_OP(cl_DF_to_LF(arg1,CONCAT(LFlen,s)(arg2)),arg2) ); \ ); \ , /* arg1 LF */ \ floatcase(arg2 \ , /* arg2 SF */ \ ergebnis_zuweisung CONCAT(MAP,r)(LF,cl_LF_to_SF,\ F_OP(arg1,cl_SF_to_LF(arg2,CONCAT(LFlen,s)(arg1))) ); \ , /* arg2 FF */ \ ergebnis_zuweisung CONCAT(MAP,r)(LF,cl_LF_to_FF,\ F_OP(arg1,cl_FF_to_LF(arg2,CONCAT(LFlen,s)(arg1))) ); \ , /* arg2 DF */ \ ergebnis_zuweisung CONCAT(MAP,r)(LF,cl_LF_to_DF,\ F_OP(arg1,cl_DF_to_LF(arg2,CONCAT(LFlen,s)(arg1))) ); \ , /* arg2 LF */ \ GEN_LF_OP2_AUX(arg1,arg2,F_OP,r,s,ergebnis_zuweisung) \ ); \ ); \ } #define GEN_LF_OP2_AUX(arg1,arg2,F_OP,r,s,ergebnis_zuweisung) \ CONCAT(GEN_LF_OP2_AUX,s)(arg1,arg2,F_OP,r,ergebnis_zuweisung) #define GEN_LF_OP2_AUX0(arg1,arg2,F_OP,r,ergebnis_zuweisung) \ var uintC len1 = TheLfloat(arg1)->len; \ var uintC len2 = TheLfloat(arg2)->len; \ if (len1 == len2) /* gleich -> direkt ausführen */ \ { ergebnis_zuweisung CONCAT(NOMAP,r) (LF, F_OP(arg1,arg2)); } \ elif (len1 > len2) /* -> arg2 auf die Länge von arg1 bringen */ \ { ergebnis_zuweisung CONCAT(MAP,r) (LF, LF_shorten_len2, \ F_OP(arg1,extend(arg2,len1)) ); \ } \ else /* (len1 < len2) -> arg1 auf die Länge von arg2 bringen */ \ { ergebnis_zuweisung CONCAT(MAP,r) (LF, LF_shorten_len1, \ F_OP(extend(arg1,len2),arg2) ); \ } #define LF_shorten_len1(arg) shorten(arg,len1) #define LF_shorten_len2(arg) shorten(arg,len2) #define GEN_LF_OP2_AUX1(arg1,arg2,F_OP,r,ergebnis_zuweisung) \ ergebnis_zuweisung CONCAT(NOMAP,r) (LF, F_OP(arg1,arg2)); #define NOMAP0(F,EXPR) EXPR #define NOMAP1(F,EXPR) EXPR #define MAP0(F,FN,EXPR) EXPR #define MAP1(F,FN,EXPR) FN(EXPR) #define LFlen0(arg) TheLfloat(arg)->len #define LFlen1(arg) LF_minlen // cl_F_extendsqrt(x) erweitert die Genauigkeit eines Floats x um eine Stufe // SF -> FF -> DF -> LF(4) -> LF(5) -> LF(6) -> ... // Ein Float mit d Mantissenbits wird so zu einem Float mit // mindestens d+sqrt(d)+2 Mantissenbits. extern const cl_F cl_F_extendsqrt (const cl_F& x); // cl_F_extendsqrtx(x) erweitert die Genauigkeit eines Floats x um eine Stufe // SF -> FF -> DF -> LF(4) -> LF(5) -> LF(6) -> ... // Ein Float mit d Mantissenbits und l Exponentenbits wird so zu einem Float // mit mindestens d+sqrt(d)+2+(l-1) Mantissenbits. extern const cl_F cl_F_extendsqrtx (const cl_F& x); // cl_F_shortenrelative(x,y) tries to reduce the size of x, such that one // wouldn't notice it when adding x to y. y must be /= 0. More precisely, // this returns a float approximation of x, such that 1 ulp(x) < 1 ulp(y). extern const cl_F cl_F_shortenrelative (const cl_F& x, const cl_F& y); // Macro: dispatches according to a float_format_t value. // floatformatcase(value, SF_statement,FF_statement,DF_statement,LF_statement) // LF_statement darf auf `len' zugreifen, die zu `value' korrespondierende // Mantissenlänge (gemessen in Digits). #define floatformatcase(value, SF_statement,FF_statement,DF_statement,LF_statement) \ { if ((value) <= float_format_sfloat) { SF_statement } \ elif ((value) <= float_format_ffloat) { FF_statement } \ elif ((value) <= float_format_dfloat) { DF_statement } \ else { var uintC len = ceiling((uintC)(value),intDsize); LF_statement } \ } } // namespace cln #endif /* _CL_F_H */ cln-1.3.3/src/float/sfloat/0000755000000000000000000000000012173046200012337 5ustar cln-1.3.3/src/float/sfloat/algebraic/0000755000000000000000000000000012173046200014250 5ustar cln-1.3.3/src/float/sfloat/algebraic/cl_SF_sqrt.cc0000644000000000000000000000432211201634737016630 0ustar // sqrt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" #include "base/cl_low.h" namespace cln { const cl_SF sqrt (const cl_SF& x) { // Methode: // x = 0.0 -> Ergebnis 0.0 // Ergebnis-Vorzeichen := positiv, // Ergebnis-Exponent := ceiling(e/2), // Ergebnis-Mantisse: // Bilde aus [1,m15,...,m0,(19 Nullbits)] bei geradem e, // aus [0,1,m15,...,m0,(18 Nullbits)] bei ungeradem e // die Ganzzahl-Wurzel, eine 18-Bit-Zahl mit einer führenden 1. // Runde das letzte Bit weg: // Bit 0 = 0 -> abrunden, // Bit 0 = 1 und Wurzel exakt -> round-to-even, // Bit 0 = 1 und Rest >0 -> aufrunden. // Dabei um ein Bit nach rechts schieben. // Bei Aufrundung auf 2^17 (rounding overflow) Mantisse um 1 Bit nach rechts // schieben und Exponent incrementieren. // x entpacken: var sintL exp; var uint32 mant; SF_decode(x, { return x; }, ,exp=,mant=); // Um die 64-Bit-Ganzzahl-Wurzel ausnutzen zu können, fügen wir beim // Radikanden 46 bzw. 47 statt 18 bzw. 19 Nullbits an. if (exp & bit(0)) // e ungerade { mant = mant << (31-(SF_mant_len+1)); exp = exp+1; } else // e gerade { mant = mant << (32-(SF_mant_len+1)); } exp = exp >> 1; // exp := exp/2 var bool exactp; isqrt_64_32(mant,0, mant=,exactp=); // mant := isqrt(mant*2^32), eine 32-Bit-Zahl // Die hinteren 31-SF_mant_len Bits wegrunden: if ( ((mant & bit(30-SF_mant_len)) ==0) // Bit 14 =0 -> abrunden || ( ((mant & (bit(30-SF_mant_len)-1)) ==0) // Bit 14 =1 und Bits 13..0 >0 -> aufrunden && exactp // Bit 14 =1 und Bits 13..0 =0, aber Rest -> aufrunden // round-to-even, je nach Bit 15 : && ((mant & bit(31-SF_mant_len)) ==0) ) ) // abrunden { mant = mant >> (31-SF_mant_len); } else // aufrunden { mant = mant >> (31-SF_mant_len); mant += 1; if (mant >= bit(SF_mant_len+1)) // rounding overflow? { mant = mant>>1; exp = exp+1; } } return encode_SF(0,exp,mant); } } // namespace cln cln-1.3.3/src/float/sfloat/misc/0000755000000000000000000000000012173046200013272 5ustar cln-1.3.3/src/float/sfloat/misc/cl_SF_idecode.cc0000644000000000000000000000125111201634737016253 0ustar // integer_decode_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" #include "integer/cl_I.h" namespace cln { CL_INLINE const cl_idecoded_float CL_INLINE_DECL(integer_decode_float) (const cl_SF& x) { // x entpacken: var cl_signean sign; var sintL exp; var uint32 mant; SF_decode(x, { return cl_idecoded_float(0, 0, 1); }, sign=,exp=,mant= ); return cl_idecoded_float( L_to_FN(mant), // Mantisse als Fixnum (>0, <2^17) L_to_FN(exp-(SF_mant_len+1)), // e-17 als Fixnum (sign>=0 ? cl_I(1) : cl_I(-1)) // (-1)^s erzeugen ); } } // namespace cln cln-1.3.3/src/float/sfloat/misc/cl_SF_digits.cc0000644000000000000000000000046711201634737016152 0ustar // float_digits(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" namespace cln { CL_INLINE uintC CL_INLINE_DECL(float_digits) (const cl_SF& x) { unused x; return SF_mant_len+1; // 17 } } // namespace cln cln-1.3.3/src/float/sfloat/misc/cl_SF_min.cc0000644000000000000000000000036211201634737015444 0ustar // min(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. namespace cln { const cl_SF min (const cl_SF& x, const cl_SF& y) { return (x <= y ? x : y); } } // namespace cln cln-1.3.3/src/float/sfloat/misc/cl_SF_sign.cc0000644000000000000000000000070611201634737015623 0ustar // float_sign(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" #include "base/cl_inline.h" #include "float/sfloat/elem/cl_SF_minusp.cc" namespace cln { CL_INLINE2 const cl_SF CL_INLINE2_DECL(float_sign) (const cl_SF& x) { // Methode: x>=0 -> Ergebnis 1.0; x<0 -> Ergebnis -1.0 return encode_SF(SF_sign(x),1,bit(SF_mant_len)); } } // namespace cln cln-1.3.3/src/float/sfloat/misc/cl_SF_as.cc0000644000000000000000000000102411201634737015260 0ustar // cl_SF_As(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "base/cl_N.h" namespace cln { inline bool cl_SF_p (const cl_number& x) { if (!x.pointer_p()) if (cl_tag((x).word) == cl_SF_tag) return true; return false; } const cl_SF& cl_SF_As (const cl_number& x, const char * filename, int line) { if (cl_SF_p(x)) { DeclareType(cl_SF,x); return x; } else throw as_exception(x,"a short-float number",filename,line); } } // namespace cln cln-1.3.3/src/float/sfloat/misc/cl_SF_abs.cc0000644000000000000000000000055111201634737015426 0ustar // abs(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "base/cl_inline.h" #include "float/sfloat/elem/cl_SF_minusp.cc" namespace cln { const cl_SF CL_FLATTEN abs (const cl_SF& x) { // x<0 -> (- x), x>=0 -> x if (minusp_inline(x)) return -x; else return x; } } // namespace cln cln-1.3.3/src/float/sfloat/misc/cl_SF_eqhashcode.cc0000644000000000000000000000076311201634737016772 0ustar // cl_SF equal_hashcode(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "base/cl_N.h" #include "float/sfloat/cl_SF.h" namespace cln { CL_INLINE uint32 CL_INLINE_DECL(equal_hashcode) (const cl_SF& x) { var cl_signean sign; var sintL exp; var uint32 mant; SF_decode(x, { return 0; }, sign=,exp=,mant=); var uint32 msd = mant << (32-(SF_mant_len+1)); return equal_hashcode_low(msd,exp,sign); } } // namespace cln cln-1.3.3/src/float/sfloat/misc/cl_SF_precision.cc0000644000000000000000000000063511201634737016657 0ustar // float_precision(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" #include "base/cl_inline.h" #include "float/sfloat/elem/cl_SF_zerop.cc" namespace cln { CL_INLINE2 uintC CL_INLINE2_DECL(float_precision) (const cl_SF& x) { if (zerop_inline(x)) return 0; return SF_mant_len+1; // 17 } } // namespace cln cln-1.3.3/src/float/sfloat/misc/cl_SF_debug.cc0000644000000000000000000000105411201634737015746 0ustar // cl_SF debugging support. // General includes. #include "base/cl_sysdep.h" // Specification. // Implementation. #include "cln/sfloat.h" #include "cln/io.h" #include "cln/float_io.h" namespace cln { static void dprint (cl_heap* pointer) { var const cl_SF& obj = *(const cl_SF*)&pointer; fprint(cl_debugout, "(cl_SF) "); fprint(cl_debugout, obj); } AT_INITIALIZATION(dprint_SF) { cl_register_type_printer(cl_class_sfloat,dprint); } // This dummy links in this module when requires it. int cl_SF_debug_module; } // namespace cln cln-1.3.3/src/float/sfloat/misc/cl_SF_signum.cc0000644000000000000000000000111011201634737016153 0ustar // signum(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" /* Use inline versions of minusp and zerop */ #include "base/cl_inline.h" #include "float/sfloat/elem/cl_SF_minusp.cc" #include "float/sfloat/elem/cl_SF_zerop.cc" namespace cln { CL_INLINE2 const cl_SF CL_INLINE2_DECL(signum) (const cl_SF& x) { if (minusp_inline(x)) { return SF_minus1; } // x<0 -> -1.0 elif (zerop_inline(x)) { return SF_0; } // x=0 -> 0.0 else { return SF_1; } // x>0 -> +1.0 } } // namespace cln cln-1.3.3/src/float/sfloat/misc/cl_SF_max.cc0000644000000000000000000000036211201634737015446 0ustar // max(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. namespace cln { const cl_SF max (const cl_SF& x, const cl_SF& y) { return (x >= y ? x : y); } } // namespace cln cln-1.3.3/src/float/sfloat/misc/cl_SF_exponent.cc0000644000000000000000000000056111201634737016522 0ustar // float_exponent(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" namespace cln { CL_INLINE sintE CL_INLINE_DECL(float_exponent) (const cl_SF& x) { var uintL uexp = SF_uexp(x); if (uexp==0) { return 0; } return (sintL)(uexp - SF_exp_mid); } } // namespace cln cln-1.3.3/src/float/sfloat/misc/cl_SF_decode.cc0000644000000000000000000000115511201634737016105 0ustar // decode_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" #include "integer/cl_I.h" namespace cln { const decoded_sfloat decode_float (const cl_SF& x) { // x entpacken: var cl_signean sign; var sintL exp; var uint32 mant; SF_decode(x, { return decoded_sfloat(SF_0, 0, SF_1); }, sign=,exp=,mant= ); return decoded_sfloat( encode_SF(0,0,mant), // (-1)^0 * 2^0 * m erzeugen L_to_FN(exp), // e als Fixnum encode_SF(sign,1,bit(SF_mant_len)) // (-1)^s erzeugen ); } } // namespace cln cln-1.3.3/src/float/sfloat/misc/cl_SF_class.cc0000644000000000000000000000070211201634737015764 0ustar // cl_class_sfloat. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. namespace cln { cl_class cl_class_sfloat = { NULL, // destructor not used, since not heap objects cl_class_flags_subclass_complex | cl_class_flags_subclass_real | cl_class_flags_subclass_float }; AT_INITIALIZATION(ini_class_sfloat) { cl_immediate_classes[cl_SF_tag] = &cl_class_sfloat; } } // namespace cln cln-1.3.3/src/float/sfloat/elem/0000755000000000000000000000000012173046200013261 5ustar cln-1.3.3/src/float/sfloat/elem/cl_SF_scale_I.cc0000644000000000000000000000277611201634737016222 0ustar // scale_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" #include "float/cl_F.h" #include "integer/cl_I.h" namespace cln { const cl_SF scale_float (const cl_SF& x, const cl_I& delta) { // Methode: // x=0.0 -> x als Ergebnis // delta muß ein Fixnum betragsmäßig <= SF_exp_high-SF_exp_low sein. // Neues SF mit um delta vergrößertem Exponenten bilden. // x entpacken: var cl_signean sign; var sintL exp; var uint32 mant; SF_decode(x, { return x; }, sign=,exp=,mant=); if (!minusp(delta)) // delta>=0 { var uintV udelta; if (fixnump(delta) && ((udelta = FN_to_V(delta)) <= (uintV)(SF_exp_high-SF_exp_low)) ) { exp = exp+udelta; return encode_SF(sign,exp,mant); } else { throw floating_point_overflow_exception(); } } else // delta<0 { var uintV udelta; if (fixnump(delta) && ((udelta = -FN_to_V(delta)) <= (uintV)(SF_exp_high-SF_exp_low)) && ((cl_value_len+1 nein elif (zerop_inline(x)) return false; // x=0 -> nein else return true; // sonst ist x>0. } } // namespace cln cln-1.3.3/src/float/sfloat/elem/cl_SF_mul.cc0000644000000000000000000000741611201634737015454 0ustar // binary operator * // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" #include "base/cl_low.h" namespace cln { const cl_SF operator* (const cl_SF& x1, const cl_SF& x2) { // Methode: // Falls x1=0.0 oder x2=0.0 -> Ergebnis 0.0 // Sonst: Ergebnis-Vorzeichen = VZ von x1 xor VZ von x2. // Ergebnis-Exponent = Summe der Exponenten von x1 und x2. // Ergebnis-Mantisse = Produkt der Mantissen von x1 und x2, gerundet: // 2^-17 * (2^16 + m1) * 2^-17 * (2^16 + m2) // = 2^-34 * (2^32 + 2^16*m1 + 2^16*m2 + m1*m2), // die Klammer ist >=2^32, <=(2^17-1)^2<2^34 . // Falls die Klammer >=2^33 ist, um 17 Bit nach rechts schieben und // runden: Falls Bit 16 Null, abrunden; falls Bit 16 Eins und // Bits 15..0 alle Null, round-to-even; sonst aufrunden. // Falls die Klammer <2^33 ist, um 16 Bit nach rechts schieben und // runden: Falls Bit 15 Null, abrunden; falls Bit 15 Eins und // Bits 14..0 alle Null, round-to-even; sonst aufrunden. Nach // Aufrunden: Falls =2^17, um 1 Bit nach rechts schieben. Sonst // Exponenten um 1 erniedrigen. // x1,x2 entpacken: var cl_signean sign1; var sintL exp1; var uintL mant1; var cl_signean sign2; var sintL exp2; var uintL mant2; SF_decode(x1, { return x1; }, sign1=,exp1=,mant1=); SF_decode(x2, { return x2; }, sign2=,exp2=,mant2=); exp1 = exp1 + exp2; // Summe der Exponenten sign1 = sign1 ^ sign2; // Ergebnis-Vorzeichen var uintL manthi; var uintL mantlo; // Mantissen mant1 und mant2 multiplizieren: #if (SF_mant_len<16) mantlo = mulu16(mant1,mant2); manthi = mantlo >> SF_mant_len; mantlo = mantlo & (bit(SF_mant_len)-1); #elif (SF_mant_len==16) manthi = mulu16(low16(mant1),low16(mant2)); mantlo = low16(manthi); manthi = (uint32)(high16(manthi)) + (uint32)(low16(mant1)) + mant2; #else // (SF_mant_len>16) mulu24(mant1,mant2, manthi=,mantlo=); manthi = (manthi << (32-SF_mant_len)) | (mantlo >> SF_mant_len); mantlo = mantlo & (bit(SF_mant_len)-1); #endif // Nun ist 2^SF_mant_len * manthi + mantlo = mant1 * mant2. if (manthi >= bit(SF_mant_len+1)) // mant1*mant2 >= 2^(2*SF_mant_len+1) { if ( ((manthi & bit(0)) ==0) // Bit SF_mant_len =0 -> abrunden || ( (mantlo ==0) // Bit SF_mant_len =1 und Bits SF_mant_len-1..0 >0 -> aufrunden // round-to-even, je nach Bit SF_mant_len+1 : && ((manthi & bit(1)) ==0) ) ) // abrunden { manthi = manthi >> 1; goto ab; } else // aufrunden { manthi = manthi >> 1; goto auf; } } else // mant1*mant2 < 2^(2*SF_mant_len+1) { exp1 = exp1-1; // Exponenten decrementieren if ( ((mantlo & bit(SF_mant_len-1)) ==0) // Bit SF_mant_len-1 =0 -> abrunden || ( ((mantlo & (bit(SF_mant_len-1)-1)) ==0) // Bit SF_mant_len-1 =1 und Bits SF_mant_len-2..0 >0 -> aufrunden // round-to-even, je nach Bit SF_mant_len : && ((manthi & bit(0)) ==0) ) ) // abrunden goto ab; else // aufrunden goto auf; } auf: manthi = manthi+1; // Hier ist 2^SF_mant_len <= manthi <= 2^(SF_mant_len+1) if (manthi >= bit(SF_mant_len+1)) // rounding overflow? { manthi = manthi>>1; exp1 = exp1+1; } // Shift nach rechts ab: // Runden fertig, 2^SF_mant_len <= manthi < 2^(SF_mant_len+1) return encode_SF(sign1,exp1,manthi); } } // namespace cln cln-1.3.3/src/float/sfloat/elem/cl_SF_futrunc.cc0000644000000000000000000000350311256620710016332 0ustar // futruncate(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/sfloat/cl_SF.h" // Implementation. namespace cln { const cl_SF futruncate (const cl_SF& x) { // Methode: // x = 0.0 -> Ergebnis 0.0 // e<=0 -> Ergebnis 1.0 oder -1.0, je nach Vorzeichen von x. // 1<=e<=16 -> Greife die letzten (17-e) Bits von x heraus. // Sind sie alle =0 -> Ergebnis x. // Sonst setze sie alle und erhöhe dann die letzte Stelle um 1. // Kein Überlauf der 16 Bit -> fertig. // Sonst (Ergebnis eine Zweierpotenz): Mantisse := .1000...000, // e:=e+1. (Test auf Überlauf wegen e<=17 überflüssig) // e>=17 -> Ergebnis x. var uintL uexp = SF_uexp(x); // e + SF_exp_mid if (uexp==0) // 0.0 ? { return x; } if (uexp <= SF_exp_mid) // e<=0 ? { // Exponent auf 1, Mantisse auf .1000...000 setzen. return cl_SF_from_word( (x.word & ~(bit(SF_exp_len+SF_exp_shift)-bit(SF_exp_shift) + bit(SF_mant_len+SF_mant_shift)-bit(SF_mant_shift))) | ((cl_uint)(SF_exp_mid+1) << SF_exp_shift) | ((cl_uint)0 << SF_mant_shift) ); } else { if (uexp > SF_exp_mid+SF_mant_len) // e > 16 ? { return x; } else { var cl_uint mask = // Bitmaske: Bits 16-e..0 gesetzt, alle anderen gelöscht bit(SF_mant_len+SF_mant_shift + 1+SF_exp_mid-uexp) - bit(SF_mant_shift); if ((x.word & mask)==0) // alle diese Bits =0 ? { return x; } return cl_SF_from_word( (x.word | mask) // alle diese Bits setzen + bit(SF_mant_shift) // letzte Stelle erhöhen, dabei evtl. Exponenten incrementieren ); } } } } // namespace cln cln-1.3.3/src/float/sfloat/elem/cl_SF_uminus.cc0000644000000000000000000000075211201634737016173 0ustar // unary operator - // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" #include "base/cl_inline.h" #include "float/sfloat/elem/cl_SF_zerop.cc" namespace cln { const cl_SF operator- (const cl_SF& x) { // Methode: // Falls x=0.0, fertig. Sonst Vorzeichenbit umdrehen. if (zerop_inline(x)) return SF_0; return cl_SF_from_word(x.word ^ ((cl_uint)1 << SF_sign_shift)); } } // namespace cln cln-1.3.3/src/float/sfloat/elem/cl_SF_to_I.cc0000644000000000000000000000125111201634737015540 0ustar // cl_SF_to_I(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/sfloat/cl_SF.h" // Implementation. #include "cln/integer.h" #include "integer/cl_I.h" namespace cln { const cl_I cl_SF_to_I (const cl_SF& x) { // x entpacken: var cl_signean sign; var sintL exp; var uint32 mant; SF_decode(x, { return 0; }, sign=,exp=,mant=); exp = exp-(SF_mant_len+1); return ash( L_to_FN(sign==0 ? (sintL)mant // mant als Fixnum >0 : -(sintL)mant // -mant als Fixnum <0 ), exp ); } } // namespace cln cln-1.3.3/src/float/sfloat/elem/cl_SF_from_RA.cc0000644000000000000000000000672411201634737016205 0ustar // cl_RA_to_SF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/sfloat/cl_SF.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" #include "integer/cl_I.h" namespace cln { const cl_SF cl_RA_to_SF (const cl_RA& x) { // Methode: // x ganz -> klar. // x = +/- a/b mit Integers a,b>0: // Seien n,m so gewählt, daß // 2^(n-1) <= a < 2^n, 2^(m-1) <= b < 2^m. // Dann ist 2^(n-m-1) < a/b < 2^(n-m+1). // Berechne n=(integer-length a) und m=(integer-length b) und // floor(2^(-n+m+18)*a/b) : // Bei n-m>=18 dividiere a durch (ash b (n-m-18)), // bei n-m<18 dividiere (ash a (-n+m+18)) durch b. // Der erste Wert ist >=2^17, <2^19. // Falls er >=2^18 ist, runde 2 Bits weg, // falls er <2^18 ist, runde 1 Bit weg. if (integerp(x)) { DeclareType(cl_I,x); return cl_I_to_SF(x); } { // x Ratio DeclareType(cl_RT,x); var cl_I a = numerator(x); // +/- a var const cl_I& b = denominator(x); // b var cl_signean sign = -(cl_signean)minusp(a); // Vorzeichen if (!(sign==0)) { a = -a; } // Betrag nehmen, liefert a var sintC lendiff = (sintC)integer_length(a) // (integer-length a) - (sintC)integer_length(b); // (integer-length b) if (lendiff > SF_exp_high-SF_exp_mid) // Exponent >= n-m > Obergrenze ? { throw floating_point_overflow_exception(); } // -> Overflow if (lendiff < SF_exp_low-SF_exp_mid-2) // Exponent <= n-m+2 < Untergrenze ? { if (underflow_allowed()) { throw floating_point_underflow_exception(); } // -> Underflow else { return SF_0; } } var cl_I zaehler; var cl_I nenner; if (lendiff >= SF_mant_len+2) // n-m-18>=0 { nenner = ash(b,lendiff - (SF_mant_len+2)); // (ash b n-m-18) zaehler = a; // a } else { zaehler = ash(a,(SF_mant_len+2) - lendiff); // (ash a -n+m+18) nenner = b; // b } // Division zaehler/nenner durchführen: var cl_I_div_t q_r = cl_divide(zaehler,nenner); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; // 2^17 <= q < 2^19, also ist q Fixnum. var uint32 mant = FN_to_UV(q); if (mant >= bit(SF_mant_len+2)) // 2^18 <= q < 2^19, schiebe um 2 Bits nach rechts { var uintL rounding_bits = mant & (bit(2)-1); lendiff = lendiff+1; // Exponent := n-m+1 mant = mant >> 2; if ( (rounding_bits < bit(1)) // 00,01 werden abgerundet || ( (rounding_bits == bit(1)) // 10 && (eq(r,0)) // und genau halbzahlig (r=0) && ((mant & bit(0)) ==0) // -> round-to-even ) ) // abrunden goto ab; else // aufrunden goto auf; } else { var uintL rounding_bit = mant & bit(0); mant = mant >> 1; if ( (rounding_bit == 0) // 0 wird abgerundet || ( (eq(r,0)) // genau halbzahlig (r=0) && ((mant & bit(0)) ==0) // -> round-to-even ) ) // abrunden goto ab; else // aufrunden goto auf; } auf: mant += 1; if (mant >= bit(SF_mant_len+1)) // rounding overflow? { mant = mant>>1; lendiff = lendiff+1; } ab: // Fertig. return encode_SF(sign,lendiff,mant); }} } // namespace cln cln-1.3.3/src/float/sfloat/elem/cl_SF_div.cc0000644000000000000000000000620411201634737015433 0ustar // binary operator / // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" #include "base/cl_N.h" #include "base/cl_low.h" namespace cln { const cl_SF operator/ (const cl_SF& x1, const cl_SF& x2) { // Methode: // x2 = 0.0 -> Error // x1 = 0.0 -> Ergebnis 0.0 // Sonst: // Ergebnis-Vorzeichen = xor der beiden Vorzeichen von x1 und x2 // Ergebnis-Exponent = Differenz der beiden Exponenten von x1 und x2 // Ergebnis-Mantisse = Mantisse mant1 / Mantisse mant2, gerundet. // mant1/mant2 > 1/2, mant1/mant2 < 2; // nach Rundung mant1/mant2 >=1/2, <=2*mant1<2. // Bei mant1/mant2 >=1 brauche 16 Nachkommabits, // bei mant1/mant2 <1 brauche 17 Nachkommabits. // Fürs Runden: brauche ein Rundungsbit (Rest gibt an, ob exakt). // Brauche daher insgesamt 18 Nachkommabits von mant1/mant2. // Dividiere daher (als Unsigned Integers) 2^18*(2^17*mant1) durch (2^17*mant2). // Falls der Quotient >=2^18 ist, runde die letzten zwei Bits weg und // erhöhe den Exponenten um 1. // Falls der Quotient <2^18 ist, runde das letzte Bit weg. Bei rounding // overflow schiebe um ein weiteres Bit nach rechts, incr. Exponenten. // x1,x2 entpacken: var cl_signean sign1; var sintL exp1; var uintL mant1; var cl_signean sign2; var sintL exp2; var uintL mant2; SF_decode(x2, { throw division_by_0_exception(); }, sign2=,exp2=,mant2=); SF_decode(x1, { return x1; }, sign1=,exp1=,mant1=); exp1 = exp1 - exp2; // Differenz der Exponenten sign1 = sign1 ^ sign2; // Ergebnis-Vorzeichen // Dividiere 2^18*mant1 durch mant2 oder (äquivalent) // 2^i*2^18*mant1 durch 2^i*mant2 für irgendein i mit 0 <= i <= 32-17 : var uintL mant; var uintL rest; // wähle i = 32-(SF_mant_len+1), also i+(SF_mant_len+2) = 33. divu_6432_3232(mant1<<1,0, mant2<<(32-(SF_mant_len+1)), mant=,rest=); if (mant >= bit(SF_mant_len+2)) // Quotient >=2^18 -> 2 Bits wegrunden { var uintL rounding_bits = mant & (bit(2)-1); exp1 += 1; // Exponenten incrementieren mant = mant >> 2; if ( (rounding_bits < bit(1)) // 00,01 werden abgerundet || ( (rounding_bits == bit(1)) // 10 && (rest == 0) // und genau halbzahlig && ((mant & bit(0)) ==0) // -> round-to-even ) ) // abrunden {} else // aufrunden { mant += 1; } } else // Quotient <2^18 -> 1 Bit wegrunden { var uintL rounding_bit = mant & bit(0); mant = mant >> 1; if ( (rounding_bit == 0) // 0 wird abgerundet || ( (rest == 0) // genau halbzahlig && ((mant & bit(0)) ==0) // -> round-to-even ) ) // abrunden {} else // aufrunden { mant += 1; if (mant >= bit(SF_mant_len+1)) // rounding overflow? { mant = mant>>1; exp1 = exp1+1; } } } return encode_SF(sign1,exp1,mant); } } // namespace cln cln-1.3.3/src/float/sfloat/elem/cl_SF_plus.cc0000644000000000000000000001221111201634737015627 0ustar // binary operator + // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" #include "base/cl_xmacros.h" namespace cln { const cl_SF operator+ (const cl_SF& x1, const cl_SF& x2) { // Methode (nach [Knuth, II, Seminumerical Algorithms, Abschnitt 4.2.1., S.200]): // x1=0.0 -> Ergebnis x2. // x2=0.0 -> Ergebnis x1. // Falls e1= e2. // Falls e1 - e2 >= 16 + 3, Ergebnis x1. // Schiebe beide Mantissen um 3 Bits nach links (Vorbereitung der Rundung: // Bei e1-e2=0,1 ist keine Rundung nötig, bei e1-e2>1 ist der Exponent des // Ergebnisses =e1-1, =e1 oder =e1+1. Brauche daher 1 Schutzbit und zwei // Rundungsbits: 00 exakt, 01 1.Hälfte, 10 exakte Mitte, 11 2.Hälfte.) // Schiebe die Mantisse von x2 um e0-e1 Bits nach rechts. (Dabei die Rundung // ausführen: Bit 0 ist das logische Oder der Bits 0,-1,-2,...) // Falls x1,x2 selbes Vorzeichen haben: Addiere dieses zur Mantisse von x1. // Falls x1,x2 verschiedenes Vorzeichen haben: Subtrahiere dieses von der // Mantisse von x1. <0 -> (Es war e1=e2) Vertausche die Vorzeichen, negiere. // =0 -> Ergebnis 0.0 // Exponent ist e1. // Normalisiere, fertig. // x1,x2 entpacken: var cl_signean sign1; var sintL exp1; var uintL mant1; var cl_signean sign2; var sintL exp2; var uintL mant2; SF_decode(x1, { return x2; }, sign1=,exp1=,mant1=); SF_decode(x2, { return x1; }, sign2=,exp2=,mant2=); var cl_uint max_x1_x2 = x1.word; if (exp1 < exp2) { max_x1_x2 = x2.word; swap(cl_signean, sign1,sign2); swap(sintL, exp1 ,exp2 ); swap(uintL, mant1,mant2); } // Nun ist exp1>=exp2. {var uintL expdiff = exp1 - exp2; // Exponentendifferenz if (expdiff >= SF_mant_len+3) // >= 16+3 ? { return cl_SF_from_word(max_x1_x2); } mant1 = mant1 << 3; mant2 = mant2 << 3; // Nun 2^(SF_mant_len+3) <= mant1,mant2 < 2^(SF_mant_len+4). {var uintL mant2_last = mant2 & (bit(expdiff)-1); // letzte expdiff Bits von mant2 mant2 = mant2 >> expdiff; if (!(mant2_last==0)) { mant2 |= bit(0); } } // mant2 = um expdiff Bits nach rechts geschobene und gerundete Mantisse // von x2. if ((x1.word ^ x2.word) & bit(SF_sign_shift)) // verschiedene Vorzeichen -> Mantissen subtrahieren { if (mant1 > mant2) { mant1 = mant1 - mant2; goto norm_2; } if (mant1 == mant2) // Ergebnis 0 ? { return SF_0; } // negatives Subtraktionsergebnis mant1 = mant2 - mant1; sign1 = sign2; goto norm_2; } else // gleiche Vorzeichen -> Mantissen addieren { mant1 = mant1 + mant2; } // mant1 = Ergebnis-Mantisse >0, sign1 = Ergebnis-Vorzeichen, // exp1 = Ergebnis-Exponent. // Außerdem: Bei expdiff=0,1 sind die zwei letzten Bits von mant1 Null, // bei expdiff>=2 ist mant1 >= 2^(SF_mant_len+2). // Stets ist mant1 < 2^(SF_mant_len+5). (Daher werden die 2 Rundungsbits // nachher um höchstens eine Position nach links geschoben werden.) // [Knuth, S.201, leicht modifiziert: // N1. m>=1 -> goto N4. // N2. [Hier m<1] m>=1/2 -> goto N5. // N3. m:=2*m, e:=e-1, goto N2. // N4. [Hier 1<=m<2] m:=m/2, e:=e+1. // N5. [Hier 1/2<=m<1] Runde m auf 17 Bits hinterm Komma. // Falls hierdurch m=1 geworden, setze m:=m/2, e:=e+1. // ] // Bei uns ist m=mant1/2^(SF_mant_len+4), // ab Schritt N5 ist m=mant1/2^(SF_mant_len+1). norm_1: // [Knuth, S.201, Schritt N1] if (mant1 >= bit(SF_mant_len+4)) goto norm_4; norm_2: // [Knuth, S.201, Schritt N2] // Hier ist mant1 < 2^(SF_mant_len+4) if (mant1 >= bit(SF_mant_len+3)) goto norm_5; // [Knuth, S.201, Schritt N3] mant1 = mant1 << 1; exp1 = exp1-1; // Mantisse links schieben goto norm_2; norm_4: // [Knuth, S.201, Schritt N4] // Hier ist 2^(SF_mant_len+4) <= mant1 < 2^(SF_mant_len+5) exp1 = exp1+1; mant1 = (mant1>>1) | (mant1 & bit(0)); // Mantisse rechts schieben norm_5: // [Knuth, S.201, Schritt N5] // Hier ist 2^(SF_mant_len+3) <= mant1 < 2^(SF_mant_len+4) // Auf SF_mant_len echte Mantissenbits runden, d.h. rechte 3 Bits // wegrunden, und dabei mant1 um 3 Bits nach rechts schieben: {var uintL rounding_bits = mant1 & (bit(3)-1); mant1 = mant1 >> 3; if ( (rounding_bits < bit(2)) // 000,001,010,011 werden abgerundet || ( (rounding_bits == bit(2)) // 100 (genau halbzahlig) && ((mant1 & bit(0)) ==0) // -> round-to-even ) ) // abrunden {} else // aufrunden { mant1 = mant1+1; if (mant1 >= bit(SF_mant_len+1)) // Bei Überlauf während der Rundung nochmals rechts schieben // (Runden ist hier überflüssig): { mant1 = mant1>>1; exp1 = exp1+1; } // Mantisse rechts schieben } }// Runden fertig return encode_SF(sign1,exp1,mant1); } } } // namespace cln cln-1.3.3/src/float/sfloat/elem/cl_SF_compare.cc0000644000000000000000000000242411201634737016277 0ustar // compare(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "base/cl_inline.h" #include "float/sfloat/elem/cl_SF_minusp.cc" namespace cln { cl_signean CL_FLATTEN compare (const cl_SF& x, const cl_SF& y) { // Methode: // x und y haben verschiedenes Vorzeichen -> // x < 0 -> x < y // x >= 0 -> x > y // x und y haben gleiches Vorzeichen -> // x >=0 -> vergleiche x und y (die rechten 24 Bits) // x <0 -> vergleiche y und x (die rechten 24 Bits) if (!minusp_inline(y)) // y>=0 { if (!minusp_inline(x)) // y>=0, x>=0 { if (x.word < y.word) return signean_minus; // x y.word) return signean_plus; // x>y return signean_null; } else // y>=0, x<0 { return signean_minus; } // x=0 { return signean_plus; } // x>y else // y<0, x<0 { if (x.word > y.word) return signean_minus; // |x|>|y| -> x x>y return signean_null; } } } } // namespace cln cln-1.3.3/src/float/sfloat/elem/cl_SF_ftrunc.cc0000644000000000000000000000163411201634737016154 0ustar // ftruncate(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" namespace cln { const cl_SF ftruncate (const cl_SF& x) { // Methode: // x = 0.0 oder e<=0 -> Ergebnis 0.0 // 1<=e<=16 -> letzte (17-e) Bits der Mantisse auf 0 setzen, // Exponent und Vorzeichen beibehalten // e>=17 -> Ergebnis x var uintL uexp = SF_uexp(x); // e + SF_exp_mid if (uexp <= SF_exp_mid) // 0.0 oder e<=0 ? { return SF_0; } else { if (uexp > SF_exp_mid+SF_mant_len) // e > 16 ? { return x; } else { return cl_SF_from_word( x.word & // Bitmaske: Bits 16-e..0 gelöscht, alle anderen gesetzt ~(bit(SF_mant_len+SF_mant_shift + 1+SF_exp_mid-uexp) - bit(SF_mant_shift)) ); } } } } // namespace cln cln-1.3.3/src/float/sfloat/elem/cl_SF_minusp.cc0000644000000000000000000000045611201634737016167 0ustar // minusp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" namespace cln { CL_INLINE bool CL_INLINE_DECL(minusp) (const cl_SF& x) { return (x.word & bit(SF_sign_shift)) != 0; } } // namespace cln cln-1.3.3/src/float/sfloat/elem/cl_SF_scale.cc0000644000000000000000000000243411201634737015741 0ustar // scale_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" #include "float/cl_F.h" namespace cln { const cl_SF scale_float (const cl_SF& x, sintC delta) { // Methode: // x=0.0 -> x als Ergebnis // delta muß betragsmäßig <= SF_exp_high-SF_exp_low sein. // Neues SF mit um delta vergrößertem Exponenten bilden. // x entpacken: var cl_signean sign; var sintL exp; var uint32 mant; SF_decode(x, { return x; }, sign=,exp=,mant=); if (delta >= 0) // delta>=0 { var uintC udelta = delta; if (udelta <= (uintL)(SF_exp_high-SF_exp_low)) { exp = exp+udelta; return encode_SF(sign,exp,mant); } else { throw floating_point_overflow_exception(); } } else // delta<0 { var uintC udelta = -delta; if (udelta <= (uintL)(SF_exp_high-SF_exp_low)) { exp = exp-udelta; return encode_SF(sign,exp,mant); } else if (underflow_allowed()) { throw floating_point_underflow_exception(); } else { return SF_0; } } } } // namespace cln cln-1.3.3/src/float/sfloat/elem/cl_SF_minus.cc0000644000000000000000000000101611201634737016000 0ustar // binary operator - // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" /* Use inline version of zerop */ #include "base/cl_inline.h" #include "float/sfloat/elem/cl_SF_zerop.cc" namespace cln { const cl_SF operator- (const cl_SF& x1, const cl_SF& x2) { // Methode: // (- x1 x2) = (+ x1 (- x2)) if (zerop_inline(x2)) return x1; else return x1 + cl_SF_from_word(x2.word ^ bit(SF_sign_shift)); } } // namespace cln cln-1.3.3/src/float/sfloat/elem/cl_SF_zerop.cc0000644000000000000000000000044711201634737016013 0ustar // zerop(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" namespace cln { CL_INLINE bool CL_INLINE_DECL(zerop) (const cl_SF& x) { return x.word == make_SF_word(0,0,0); } } // namespace cln cln-1.3.3/src/float/sfloat/elem/cl_SF_from_I.cc0000644000000000000000000001050412034736655016071 0ustar // cl_I_to_SF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/sfloat/cl_SF.h" // Implementation. #include "cln/integer.h" #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_SF cl_I_to_SF (const cl_I& x) { // Methode: // x=0 -> Ergebnis 0.0 // Merke Vorzeichen von x. // x:=(abs x) // Exponent:=(integer-length x) // Greife die 18 höchstwertigen Bits heraus (angeführt von einer 1). // Runde das letzte Bit weg: // Bit 0 = 0 -> abrunden, // Bit 0 = 1 und Rest =0 -> round-to-even, // Bit 0 = 1 und Rest >0 -> aufrunden. // Dabei um ein Bit nach rechts schieben. // Bei Aufrundung auf 2^17 (rounding overflow) Mantisse um 1 Bit nach rechts // schieben und Exponent incrementieren. if (eq(x,0)) { return SF_0; } var cl_signean sign = -(cl_signean)minusp(x); // Vorzeichen var cl_I abs_x = (sign==0 ? x : -x); var uintC exp = integer_length(abs_x); // (integer-length x) // NDS zu |x|>0 bilden: var const uintD* MSDptr; var uintC len; I_to_NDS_nocopy(abs_x, MSDptr=,len=,,false,); // MSDptr/len/LSDptr ist die NDS zu x, len>0. // Führende Digits holen: Brauche SF_mant_len+1 Bits, dazu intDsize // Bits (die NDS kann mit bis zu intDsize Nullbits anfangen). // Dann werden diese Bits um (exp mod intDsize) nach rechts geschoben. var uintD msd = msprefnext(MSDptr); // erstes Digit #if (intDsize==64) var uintD msdd = 0; // weiteres Digit if (--len == 0) goto ok; msdd = msprefnext(MSDptr); #else // (intDsize<=32) var uint32 msdd = 0; // weitere min(len-1,32/intDsize) Digits #define NEXT_DIGIT(i) \ { if (--len == 0) goto ok; \ msdd |= (uint32)msprefnext(MSDptr) << (32-(i+1)*intDsize); \ } DOCONSTTIMES(32/intDsize,NEXT_DIGIT); #undef NEXT_DIGIT #endif --len; ok: #if (intDsize==64) // Die NDS besteht aus msd, msdd, und len weiteren Digits. // Das höchste in 2^intDsize*msd+msdd gesetzte Bit ist Bit Nummer // intDsize-1 + (exp mod intDsize). var uintL shiftcount = exp % intDsize; var uint64 mant = // führende 64 Bits (shiftcount==0 ? msdd : ((msd << (64-shiftcount)) | (msdd >> shiftcount)) ); // Das höchste in mant gesetzte Bit ist Bit Nummer 63. if ( ((mant & bit(62-SF_mant_len)) ==0) // Bit 46 =0 -> abrunden || ( ((mant & (bit(62-SF_mant_len)-1)) ==0) // Bit 46 =1 und Bits 45..0 =0 && ((msdd & (bit(shiftcount)-1)) ==0) // und weitere Bits aus msdd =0 && (!test_loop_msp(MSDptr,len)) // und alle weiteren Digits =0 // round-to-even, je nach Bit 47 : && ((mant & bit(63-SF_mant_len)) ==0) ) ) // abrunden { mant = mant >> (63-SF_mant_len); } else // aufrunden { mant = mant >> (63-SF_mant_len); mant += 1; if (mant >= bit(SF_mant_len+1)) // rounding overflow? { mant = mant>>1; exp = exp+1; } } #else // Die NDS besteht aus msd, msdd, und len weiteren Digits. // Das höchste in 2^32*msd+msdd gesetzte Bit ist Bit Nummer // 31 + (exp mod intDsize). var uintL shiftcount = exp % intDsize; var uint32 mant = // führende 32 Bits (shiftcount==0 ? msdd : (((uint32)msd << (32-shiftcount)) | (msdd >> shiftcount)) ); // Das höchste in mant gesetzte Bit ist Bit Nummer 31. if ( ((mant & bit(30-SF_mant_len)) ==0) // Bit 14 =0 -> abrunden || ( ((mant & (bit(30-SF_mant_len)-1)) ==0) // Bit 14 =1 und Bits 13..0 =0 && ((msdd & (bit(shiftcount)-1)) ==0) // und weitere Bits aus msdd =0 && (!test_loop_msp(MSDptr,len)) // und alle weiteren Digits =0 // round-to-even, je nach Bit 15 : && ((mant & bit(31-SF_mant_len)) ==0) ) ) // abrunden { mant = mant >> (31-SF_mant_len); } else // aufrunden { mant = mant >> (31-SF_mant_len); mant += 1; if (mant >= bit(SF_mant_len+1)) // rounding overflow? { mant = mant>>1; exp = exp+1; } } #endif return encode_SF(sign,(sintE)exp,mant); } } // namespace cln cln-1.3.3/src/float/sfloat/elem/cl_SF_fround.cc0000644000000000000000000000637411201634737016156 0ustar // fround(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" namespace cln { const cl_SF fround (const cl_SF& x) { // Methode: // x = 0.0 oder e<0 -> Ergebnis 0.0 // 0<=e<=16 -> letzte (17-e) Bits der Mantisse wegrunden, // Exponent und Vorzeichen beibehalten. // e>16 -> Ergebnis x var uintL uexp = SF_uexp(x); // e + SF_exp_mid if (uexp < SF_exp_mid) // x = 0.0 oder e<0 ? { return SF_0; } else { if (uexp > SF_exp_mid+SF_mant_len) // e > 16 ? { return x; } else if (uexp > SF_exp_mid+1) // e>1 ? { var cl_uint bitmask = // Bitmaske: Bit 16-e gesetzt, alle anderen gelöscht bit(SF_mant_len+SF_mant_shift + SF_exp_mid-uexp); var cl_uint mask = // Bitmaske: Bits 15-e..0 gesetzt, alle anderen gelöscht bitmask - bit(SF_mant_shift); if ( ((x.word & bitmask) ==0) // Bit 16-e =0 -> abrunden || ( ((x.word & mask) ==0) // Bit 16-e =1 und Bits 15-e..0 >0 -> aufrunden // round-to-even, je nach Bit 17-e : && ((x.word & (bitmask<<1)) ==0) ) ) // abrunden { mask |= bitmask; // Bitmaske: Bits 16-e..0 gesetzt, alle anderen gelöscht return cl_SF_from_word(x.word & ~mask); } else // aufrunden { return cl_SF_from_word( (x.word | mask) // alle diese Bits 15-e..0 setzen (Bit 16-e schon gesetzt) + bit(SF_mant_shift) // letzte Stelle erhöhen, dabei evtl. Exponenten incrementieren ); } } elif (uexp == SF_exp_mid+1) // e=1 ? // Wie bei 1 < e <= 16, nur daß Bit 17-e stets gesetzt ist. { if ((x.word & bit(SF_mant_len+SF_mant_shift-1)) ==0) // Bit 16-e =0 -> abrunden // abrunden { return cl_SF_from_word(x.word & ~(bit(SF_mant_len+SF_mant_shift)-bit(SF_mant_shift))); } else // aufrunden { return cl_SF_from_word( (x.word | (bit(SF_mant_len+SF_mant_shift)-bit(SF_mant_shift))) // alle diese Bits 16-e..0 setzen + bit(SF_mant_shift) // letzte Stelle erhöhen, dabei evtl. Exponenten incrementieren ); } } else // e=0 ? // Wie bei 1 < e <= 16, nur daß Bit 16-e stets gesetzt // und Bit 17-e stets gelöscht ist. { if ((x.word & (bit(SF_mant_len+SF_mant_shift)-bit(SF_mant_shift))) ==0) // abrunden von +-0.5 zu 0.0 { return SF_0; } else // aufrunden { return cl_SF_from_word( (x.word | (bit(SF_mant_len+SF_mant_shift)-bit(SF_mant_shift))) // alle Bits 15-e..0 setzen + bit(SF_mant_shift) // letzte Stelle erhöhen, dabei Exponenten incrementieren ); } } } } } // namespace cln cln-1.3.3/src/float/sfloat/cl_SF.h0000644000000000000000000001073512034641763013517 0ustar // cl_SF internals #ifndef _CL_SF_H #define _CL_SF_H #include "cln/number.h" #include "float/cl_F.h" namespace cln { // The immediate word contains: // |..|.......|..........................|....| // sign exponent mantissa tag #define SF_value_shift 7 // could also be = cl_value_shift #define SF_exp_len 8 // number of bits in the exponent #define SF_mant_len 16 // number of bits in the mantissa // (excluding the hidden bit) #define SF_mant_hiddenbit 1 // yes, we have a hidden bit representation // (this is hardwired in some of the code) #define SF_exp_low 1 // minimum exponent #define SF_exp_mid bit(SF_exp_len-1) // exponent bias #define SF_exp_high (bit(SF_exp_len)-1) // maximum exponent #define SF_exp_shift (SF_mant_len+SF_mant_shift) // lowest exponent bit #define SF_mant_shift SF_value_shift // lowest mantissa bit #define SF_sign_shift (cl_pointer_size - 1) // Builds a float from the immediate word. inline cl_SF::cl_SF (struct cl_sfloat * null, cl_uint w) : cl_F ((cl_private_thing) w) { unused null; } inline const cl_SF cl_SF_from_word (cl_uint word) { return cl_SF((struct cl_sfloat *) 0, word); } // Builds a float word from sign (0 or -1), exponent and mantissa. inline cl_uint make_SF_word (cl_sint sign, unsigned int exp, cl_uint mant) { return (sign & ((cl_uint)1 << SF_sign_shift)) | (exp << SF_exp_shift) #if SF_mant_hiddenbit | ((mant & (bit(SF_mant_len)-1)) << SF_mant_shift) #else | (mant << SF_mant_shift) #endif | (cl_SF_tag << cl_tag_shift); } // Builds a float from sign (0 or -1), exponent and mantissa. inline const cl_SF make_SF (cl_sint sign, unsigned int exp, cl_uint mant) { return cl_SF_from_word(make_SF_word(sign,exp,mant)); } // Short Float 0.0 #define SF_0 make_SF(0,0,0) // Short Float 1.0 #define SF_1 make_SF(0,SF_exp_mid+1,bit(SF_mant_len)) // Short Float -1.0 #define SF_minus1 make_SF(-1,SF_exp_mid+1,bit(SF_mant_len)) // Entpacken eines Short-Float: // SF_decode(obj, zero_statement, sign=,exp=,mant=); // zerlegt ein Short-Float obj. // Ist obj=0.0, wird zero_statement ausgeführt. // Sonst: cl_signean sign = Vorzeichen (0 = +, -1 = -), // sintL exp = Exponent (vorzeichenbehaftet), // uintL mant = Mantisse (>= 2^SF_mant_len, < 2^(SF_mant_len+1)) inline uintL SF_uexp (const cl_SF& x) { return (x.word >> SF_exp_shift) & (bit(SF_exp_len)-1); } inline cl_signean SF_sign (const cl_SF& x) { return ((cl_sint)x.word << (cl_pointer_size-1 - SF_sign_shift)) >> (cl_pointer_size-1); } inline uintL SF_mant (const cl_SF& x) { return #if SF_mant_hiddenbit bit(SF_mant_len) | #endif ((uintL)(x.word >> SF_mant_shift) & (bit(SF_mant_len)-1)); } #define SF_decode(_x, zero_statement, sign_zuweisung,exp_zuweisung,mant_zuweisung) \ { var uintL uexp = SF_uexp(_x); \ if (uexp==0) \ { zero_statement } /* e=0 -> Zahl 0.0 */ \ else \ { exp_zuweisung (sintL)(uexp - SF_exp_mid); /* Exponent */ \ unused (sign_zuweisung SF_sign(_x)); /* Vorzeichen */\ mant_zuweisung SF_mant(_x); /* Mantisse */ \ } } // Einpacken eines Short-Float: // encode_SF(sign,exp,mant) // liefert ein Short-Float. // > cl_signean sign: Vorzeichen, 0 für +, -1 für negativ. // > sintE exp: Exponent // > uintL mant: Mantisse, sollte >= 2^SF_mant_len und < 2^(SF_mant_len+1) sein. // < object ergebnis: ein Short-Float // Der Exponent wird auf Überlauf/Unterlauf getestet. inline const cl_SF encode_SF (cl_signean sign, sintE exp, uintL mant) { if (exp < (sintE)(SF_exp_low-SF_exp_mid)) { if (underflow_allowed()) { throw floating_point_underflow_exception(); } else { return SF_0; } } else if (exp > (sintE)(SF_exp_high-SF_exp_mid)) { throw floating_point_overflow_exception(); } else return make_SF(sign, exp+SF_exp_mid, mant); } // Liefert zu einem Short-Float x : (futruncate x), ein SF. // x wird von der 0 weg zur nächsten ganzen Zahl gerundet. extern const cl_SF futruncate (const cl_SF& x); // SF_to_I(x) wandelt ein Short-Float x, das eine ganze Zahl darstellt, // in ein Integer um. extern const cl_I cl_SF_to_I (const cl_SF& x); // cl_I_to_SF(x) wandelt ein Integer x in ein Short-Float um und rundet dabei. extern const cl_SF cl_I_to_SF (const cl_I& x); // cl_RA_to_SF(x) wandelt eine rationale Zahl x in ein Short-Float um // und rundet dabei. extern const cl_SF cl_RA_to_SF (const cl_RA& x); } // namespace cln #endif /* _CL_SF_H */ cln-1.3.3/src/float/sfloat/input/0000755000000000000000000000000012173046200013476 5ustar cln-1.3.3/src/float/sfloat/input/cl_SF_from_string.cc0000644000000000000000000000102511201634737017413 0ustar // cl_SF (const char *) constructor. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat_class.h" // Implementation. #include "cln/sfloat.h" #include "cln/input.h" #include "cln/float_io.h" namespace cln { cl_read_flags cl_SF_read_flags = { syntax_sfloat, lsyntax_all, 10, { float_format_sfloat, float_format_lfloat_min, false } }; cl_SF::cl_SF (const char * string) { pointer = as_cl_private_thing( As(cl_SF)(read_float(cl_SF_read_flags,string,NULL,NULL))); } } // namespace cln cln-1.3.3/src/float/sfloat/division/0000755000000000000000000000000012173046200014163 5ustar cln-1.3.3/src/float/sfloat/division/cl_SF_ffloor.cc0000644000000000000000000000066311201634737017045 0ustar // ffloor(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" /* For inline version of minusp */ #include "base/cl_inline.h" #include "float/sfloat/elem/cl_SF_minusp.cc" namespace cln { const cl_SF CL_FLATTEN ffloor (const cl_SF& x) { if (minusp_inline(x)) return futruncate(x); else return ftruncate(x); } } // namespace cln cln-1.3.3/src/float/sfloat/division/cl_SF_ceil22.cc0000644000000000000000000000071011201634737016627 0ustar // ceiling2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" namespace cln { const cl_SF_div_t ceiling2 (const cl_SF& x, const cl_SF& y) { // Methode: // (q,r) := ceiling(x/y). Liefere q und x-y*q = y*r. var cl_SF_div_t q_r = ceiling2(x/y); var cl_I& q = q_r.quotient; var cl_SF& r = q_r.remainder; return cl_SF_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/float/sfloat/division/cl_SF_recip.cc0000644000000000000000000000037711201634737016662 0ustar // recip(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" namespace cln { const cl_SF recip (const cl_SF& x) { return SF_1 / x; } } // namespace cln cln-1.3.3/src/float/sfloat/division/cl_SF_round22.cc0000644000000000000000000000070011201634737017041 0ustar // round2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" namespace cln { const cl_SF_div_t round2 (const cl_SF& x, const cl_SF& y) { // Methode: // (q,r) := round(x/y). Liefere q und x-y*q = y*r. var cl_SF_div_t q_r = round2(x/y); var cl_I& q = q_r.quotient; var cl_SF& r = q_r.remainder; return cl_SF_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/float/sfloat/division/cl_SF_fceil.cc0000644000000000000000000000066711201634737016644 0ustar // fceiling(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" /* For inline version of minusp */ #include "base/cl_inline.h" #include "float/sfloat/elem/cl_SF_minusp.cc" namespace cln { const cl_SF CL_FLATTEN fceiling (const cl_SF& x) { if (minusp_inline(x)) return ftruncate(x); else return futruncate(x); } } // namespace cln cln-1.3.3/src/float/sfloat/division/cl_SF_trunc22.cc0000644000000000000000000000071411201634737017052 0ustar // truncate2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" namespace cln { const cl_SF_div_t truncate2 (const cl_SF& x, const cl_SF& y) { // Methode: // (q,r) := truncate(x/y). Liefere q und x-y*q = y*r. var cl_SF_div_t q_r = truncate2(x/y); var cl_I& q = q_r.quotient; var cl_SF& r = q_r.remainder; return cl_SF_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/float/sfloat/division/cl_SF_floor22.cc0000644000000000000000000000070011201634737017033 0ustar // floor2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/sfloat.h" // Implementation. #include "float/sfloat/cl_SF.h" namespace cln { const cl_SF_div_t floor2 (const cl_SF& x, const cl_SF& y) { // Methode: // (q,r) := floor(x/y). Liefere q und x-y*q = y*r. var cl_SF_div_t q_r = floor2(x/y); var cl_I& q = q_r.quotient; var cl_SF& r = q_r.remainder; return cl_SF_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/float/elem/0000755000000000000000000000000012173046177012006 5ustar cln-1.3.3/src/float/elem/cl_F_plus.cc0000644000000000000000000000073211201634737014221 0ustar // binary operator + // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { ALL_cl_LF_OPERATIONS_SAME_PRECISION() const cl_F operator+ (const cl_F& x, const cl_F& y) #define plus(a,b) a+b GEN_F_OP2(x,y, plus, 1, 0, return) } // namespace cln cln-1.3.3/src/float/elem/cl_F_uminus.cc0000644000000000000000000000057211201634737014560 0ustar // unary operator - // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" namespace cln { const cl_F operator- (const cl_F& x) #define minus(a) -a GEN_F_OP1(x, minus, return) } // namespace cln cln-1.3.3/src/float/elem/cl_F_I_div.cc0000644000000000000000000000124211201634737014265 0ustar // binary operator / // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "rational/cl_RA.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F operator/ (const cl_F& x, const cl_I& y) { floatcase(x , /* SF */ return x / cl_I_to_SF(y); , /* FF */ return x / cl_I_to_FF(y); , /* DF */ return x / cl_I_to_DF(y); , /* LF */ return cl_LF_I_div(x,y); ); } } // namespace cln cln-1.3.3/src/float/elem/cl_F_zerop.cc0000644000000000000000000000106111201634737014371 0ustar // zerop(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "base/cl_inline.h" #include "float/sfloat/elem/cl_SF_zerop.cc" #include "float/ffloat/elem/cl_FF_zerop.cc" #include "float/dfloat/elem/cl_DF_zerop.cc" #include "float/lfloat/elem/cl_LF_zerop.cc" namespace cln { bool CL_FLATTEN zerop (const cl_F& x) { floatcase(x , return zerop_inline(x); , return zerop_inline(x); , return zerop_inline(x); , return zerop_inline(x); ); } } // namespace cln cln-1.3.3/src/float/elem/cl_F_I_mul.cc0000644000000000000000000000132111201634737014276 0ustar // binary operator * // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "integer/cl_I.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_R cl_F_I_mul (const cl_F& x, const cl_I& y) { if (eq(y,0)) { return 0; } // x * 0 = exakte 0 floatcase(x , /* SF */ return x * cl_I_to_SF(y); , /* FF */ return x * cl_I_to_FF(y); , /* DF */ return x * cl_I_to_DF(y); , /* LF */ return cl_LF_I_mul(x,y); ); } } // namespace cln cln-1.3.3/src/float/elem/cl_RA_F_div.cc0000644000000000000000000000204211201634737014376 0ustar // binary operator / // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "rational/cl_RA.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_R operator/ (const cl_RA& x, const cl_F& y) { if (eq(x,0)) { return 0; } floatcase(y , /* SF */ if (integerp(x)) { DeclareType(cl_I,x); return cl_I_to_SF(x) / y; } else return cl_RA_to_SF(x) / y; , /* FF */ if (integerp(x)) { DeclareType(cl_I,x); return cl_I_to_FF(x) / y; } else return cl_RA_to_FF(x) / y; , /* DF */ if (integerp(x)) { DeclareType(cl_I,x); return cl_I_to_DF(x) / y; } else return cl_RA_to_DF(x) / y; , /* LF */ if (integerp(x)) { DeclareType(cl_I,x); return cl_I_LF_div(x,y); } else return cl_RA_LF_div(x,y); ); } } // namespace cln cln-1.3.3/src/float/elem/cl_I_F_div.cc0000644000000000000000000000133411201634737014267 0ustar // binary operator / // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "rational/cl_RA.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_R operator/ (const cl_I& x, const cl_F& y) { if (eq(x,0)) { return 0; } floatcase(y , /* SF */ return cl_I_to_SF(x) / y; , /* FF */ return cl_I_to_FF(x) / y; , /* DF */ return cl_I_to_DF(x) / y; , /* LF */ return cl_I_to_LF(x,LFlen0(y)) / y; // cf. cl_I_LF_div ); } } // namespace cln cln-1.3.3/src/float/elem/cl_F_mul.cc0000644000000000000000000000073011201634737014031 0ustar // binary operator * // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { ALL_cl_LF_OPERATIONS_SAME_PRECISION() const cl_F operator* (const cl_F& x, const cl_F& y) #define mul(a,b) a*b GEN_F_OP2(x,y, mul, 1, 1, return) } // namespace cln cln-1.3.3/src/float/elem/cl_F_square.cc0000644000000000000000000000053511201634737014537 0ustar // square(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" namespace cln { const cl_F square (const cl_F& x) GEN_F_OP1(x, square, return) } // namespace cln cln-1.3.3/src/float/elem/cl_F_scale_I.cc0000644000000000000000000000076211201634737014600 0ustar // scale_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/cl_F.h" namespace cln { const cl_F scale_float (const cl_F& x, const cl_I& delta) { floatcase(x , return scale_float(x,delta); , return scale_float(x,delta); , return scale_float(x,delta); , return scale_float(x,delta); ); } } // namespace cln cln-1.3.3/src/float/elem/cl_F_compare.cc0000644000000000000000000000062711201634737014667 0ustar // compare(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { cl_signean compare (const cl_F& x, const cl_F& y) GEN_F_OP2(x,y, compare, 0, 1, return) } // namespace cln cln-1.3.3/src/float/elem/cl_F_plusp.cc0000644000000000000000000000106211201634737014376 0ustar // plusp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "base/cl_inline2.h" #include "float/sfloat/elem/cl_SF_plusp.cc" #include "float/ffloat/elem/cl_FF_plusp.cc" #include "float/dfloat/elem/cl_DF_plusp.cc" #include "float/lfloat/elem/cl_LF_plusp.cc" namespace cln { bool CL_FLATTEN plusp (const cl_F& x) { floatcase(x , return plusp_inline(x); , return plusp_inline(x); , return plusp_inline(x); , return plusp_inline(x); ); } } // namespace cln cln-1.3.3/src/float/elem/cl_F_minus.cc0000644000000000000000000000073411201634737014373 0ustar // binary operator - // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { ALL_cl_LF_OPERATIONS_SAME_PRECISION() const cl_F operator- (const cl_F& x, const cl_F& y) #define minus(a,b) a-b GEN_F_OP2(x,y, minus, 1, 0, return) } // namespace cln cln-1.3.3/src/float/elem/cl_F_div.cc0000644000000000000000000000073011201634737014016 0ustar // binary operator / // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { ALL_cl_LF_OPERATIONS_SAME_PRECISION() const cl_F operator/ (const cl_F& x, const cl_F& y) #define div(a,b) a/b GEN_F_OP2(x,y, div, 1, 1, return) } // namespace cln cln-1.3.3/src/float/elem/cl_F_RA_div.cc0000644000000000000000000000200611201634737014376 0ustar // binary operator / // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "rational/cl_RA.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F operator/ (const cl_F& x, const cl_RA& y) { floatcase(x , /* SF */ if (integerp(y)) { DeclareType(cl_I,y); return x / cl_I_to_SF(y); } else return x / cl_RA_to_SF(y); , /* FF */ if (integerp(y)) { DeclareType(cl_I,y); return x / cl_I_to_FF(y); } else return x / cl_RA_to_FF(y); , /* DF */ if (integerp(y)) { DeclareType(cl_I,y); return x / cl_I_to_DF(y); } else return x / cl_RA_to_DF(y); , /* LF */ if (integerp(y)) { DeclareType(cl_I,y); return cl_LF_I_div(x,y); } else return cl_LF_RA_div(x,y); ); } } // namespace cln cln-1.3.3/src/float/elem/cl_F_scale.cc0000644000000000000000000000075411201634737014331 0ustar // scale_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/cl_F.h" namespace cln { const cl_F scale_float (const cl_F& x, sintC delta) { floatcase(x , return scale_float(x,delta); , return scale_float(x,delta); , return scale_float(x,delta); , return scale_float(x,delta); ); } } // namespace cln cln-1.3.3/src/float/elem/cl_F_RA_mul.cc0000644000000000000000000000133111201634737014411 0ustar // binary operator * // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "rational/cl_RA.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_R cl_F_RA_mul (const cl_F& x, const cl_RA& y) { if (eq(y,0)) { return 0; } // x * 0 = exakte 0 floatcase(x , /* SF */ return x * cl_RA_to_SF(y); , /* FF */ return x * cl_RA_to_FF(y); , /* DF */ return x * cl_RA_to_DF(y); , /* LF */ return cl_LF_RA_mul(x,y); ); } } // namespace cln cln-1.3.3/src/float/elem/cl_F_recip.cc0000644000000000000000000000053211201634737014336 0ustar // recip(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" namespace cln { const cl_F recip (const cl_F& x) GEN_F_OP1(x, recip, return) } // namespace cln cln-1.3.3/src/float/elem/cl_F_minusp.cc0000644000000000000000000000107311201634737014550 0ustar // minusp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "base/cl_inline.h" #include "float/sfloat/elem/cl_SF_minusp.cc" #include "float/ffloat/elem/cl_FF_minusp.cc" #include "float/dfloat/elem/cl_DF_minusp.cc" #include "float/lfloat/elem/cl_LF_minusp.cc" namespace cln { bool CL_FLATTEN minusp (const cl_F& x) { floatcase(x , return minusp_inline(x); , return minusp_inline(x); , return minusp_inline(x); , return minusp_inline(x); ); } } // namespace cln cln-1.3.3/src/float/ffloat/0000755000000000000000000000000012173046177012337 5ustar cln-1.3.3/src/float/ffloat/algebraic/0000755000000000000000000000000012173046177014250 5ustar cln-1.3.3/src/float/ffloat/algebraic/cl_FF_sqrt.cc0000644000000000000000000000434411201634737016602 0ustar // sqrt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" #include "float/cl_F.h" #include "base/cl_low.h" namespace cln { const cl_FF sqrt (const cl_FF& x) { // Methode: // x = 0.0 -> Ergebnis 0.0 // Ergebnis-Vorzeichen := positiv, // Ergebnis-Exponent := ceiling(e/2), // Ergebnis-Mantisse: // Bilde aus [1,m22,...,m0,(26 Nullbits)] bei geradem e, // aus [0,1,m22,...,m0,(25 Nullbits)] bei ungeradem e // die Ganzzahl-Wurzel, eine 25-Bit-Zahl mit einer führenden 1. // Runde das letzte Bit weg: // Bit 0 = 0 -> abrunden, // Bit 0 = 1 und Wurzel exakt -> round-to-even, // Bit 0 = 1 und Rest >0 -> aufrunden. // Dabei um ein Bit nach rechts schieben. // Bei Aufrundung auf 2^24 (rounding overflow) Mantisse um 1 Bit nach rechts // schieben und Exponent incrementieren. // x entpacken: var sintL exp; var uint32 mant; FF_decode(x, { return x; }, ,exp=,mant=); // Um die 64-Bit-Ganzzahl-Wurzel ausnutzen zu können, fügen wir beim // Radikanden 39 bzw. 40 statt 25 bzw. 26 Nullbits an. if (exp & bit(0)) // e ungerade { mant = mant << (31-(FF_mant_len+1)); exp = exp+1; } else // e gerade { mant = mant << (32-(FF_mant_len+1)); } exp = exp >> 1; // exp := exp/2 var bool exactp; isqrt_64_32(mant,0, mant=,exactp=); // mant := isqrt(mant*2^32), eine 32-Bit-Zahl // Die hinteren 31-FF_mant_len Bits wegrunden: if ( ((mant & bit(30-FF_mant_len)) ==0) // Bit 7 =0 -> abrunden || ( ((mant & (bit(30-FF_mant_len)-1)) ==0) // Bit 7 =1 und Bits 6..0 >0 -> aufrunden && exactp // Bit 7 =1 und Bits 6..0 =0, aber Rest -> aufrunden // round-to-even, je nach Bit 8 : && ((mant & bit(31-FF_mant_len)) ==0) ) ) // abrunden { mant = mant >> (31-FF_mant_len); } else // aufrunden { mant = mant >> (31-FF_mant_len); mant += 1; if (mant >= bit(FF_mant_len+1)) // rounding overflow? { mant = mant>>1; exp = exp+1; } } return encode_FF(0,exp,mant); } } // namespace cln cln-1.3.3/src/float/ffloat/conv/0000755000000000000000000000000012173046177013304 5ustar cln-1.3.3/src/float/ffloat/conv/cl_FF_from_float.cc0000644000000000000000000000267311201634737017000 0ustar // cl_float_to_FF_pointer(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/ffloat/cl_FF.h" namespace cln { // Implementation. cl_private_thing cl_float_to_FF_pointer (const float x) { var union { ffloat eksplicit; float machine_float; } u; u.machine_float = x; var ffloat val = u.eksplicit; var uintL exp = (val >> FF_mant_len) & (bit(FF_exp_len)-1); // e if (exp == 0) // e=0 ? // vorzeichenbehaftete 0.0 oder subnormale Zahl { if (!((val << 1) == 0) && underflow_allowed()) { throw floating_point_underflow_exception(); } else { return as_cl_private_thing(cl_FF_0); } // +/- 0.0 -> 0.0 } elif (exp == 255) // e=255 ? { if (!((val << (32-FF_mant_len)) == 0)) { throw floating_point_nan_exception(); } // NaN else { throw floating_point_overflow_exception(); } // Infinity, Overflow } else { // Der Exponent muß um FF_exp_mid-126 erhöht werden. if ((FF_exp_mid>126) && (exp > FF_exp_high-FF_exp_mid+126)) { throw floating_point_overflow_exception(); } // Overflow val += (FF_exp_mid - 126) << FF_mant_len; #if defined(CL_WIDE_POINTERS) return as_cl_private_thing(allocate_ffloat(val)); #else return (cl_private_thing)allocate_ffloat(val); #endif } } } // namespace cln cln-1.3.3/src/float/ffloat/conv/cl_I_to_float.cc0000644000000000000000000001020611201634737016343 0ustar // float_approx(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" // Implementation. #include "float/ffloat/cl_FF.h" #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "float/cl_F.h" namespace cln { float float_approx (const cl_I& x) { // Method: same as cl_I_to_FF(). if (eq(x,0)) { return 0.0; } var cl_signean sign = -(cl_signean)minusp(x); // Vorzeichen var cl_I abs_x = (sign==0 ? x : -x); var uintC exp = integer_length(abs_x); // (integer-length x) // NDS zu |x|>0 bilden: var const uintD* MSDptr; var uintC len; I_to_NDS_nocopy(abs_x, MSDptr=,len=,,false,); // MSDptr/len/LSDptr ist die NDS zu x, len>0. // Führende Digits holen: Brauche FF_mant_len+1 Bits, dazu intDsize // Bits (die NDS kann mit bis zu intDsize Nullbits anfangen). // Dann werden diese Bits um (exp mod intDsize) nach rechts geschoben. var uintD msd = msprefnext(MSDptr); // erstes Digit #if (intDsize==64) var uintD msdd = 0; // weiteres Digit if (--len == 0) goto ok; msdd = msprefnext(MSDptr); #else // (intDsize<=32) var uint32 msdd = 0; // weitere min(len-1,32/intDsize) Digits #define NEXT_DIGIT(i) \ { if (--len == 0) goto ok; \ msdd |= (uint32)msprefnext(MSDptr) << (32-(i+1)*intDsize); \ } DOCONSTTIMES(32/intDsize,NEXT_DIGIT); #undef NEXT_DIGIT #endif --len; ok: #if (intDsize==64) // Die NDS besteht aus msd, msdd, und len weiteren Digits. // Das höchste in 2^intDsize*msd+msdd gesetzte Bit ist Bit Nummer // intDsize-1 + (exp mod intDsize). var uintL shiftcount = exp % intDsize; var uint64 mant = // führende 64 Bits (shiftcount==0 ? msdd : ((msd << (64-shiftcount)) | (msdd >> shiftcount)) ); // Das höchste in mant gesetzte Bit ist Bit Nummer 63. if ( ((mant & bit(62-FF_mant_len)) ==0) // Bit 39 =0 -> abrunden || ( ((mant & (bit(62-FF_mant_len)-1)) ==0) // Bit 39 =1 und Bits 38..0 =0 && ((msdd & (bit(shiftcount)-1)) ==0) // und weitere Bits aus msdd =0 && (!test_loop_msp(MSDptr,len)) // und alle weiteren Digits =0 // round-to-even, je nach Bit 40 : && ((mant & bit(63-FF_mant_len)) ==0) ) ) // abrunden { mant = mant >> (63-FF_mant_len); } else // aufrunden { mant = mant >> (63-FF_mant_len); mant += 1; if (mant >= bit(FF_mant_len+1)) // rounding overflow? { mant = mant>>1; exp = exp+1; } } #else // Die NDS besteht aus msd, msdd, und len weiteren Digits. // Das höchste in 2^32*msd+msdd gesetzte Bit ist Bit Nummer // 31 + (exp mod intDsize). var uintL shiftcount = exp % intDsize; var uint32 mant = // führende 32 Bits (shiftcount==0 ? msdd : (((uint32)msd << (32-shiftcount)) | (msdd >> shiftcount)) ); // Das höchste in mant gesetzte Bit ist Bit Nummer 31. if ( ((mant & bit(30-FF_mant_len)) ==0) // Bit 7 =0 -> abrunden || ( ((mant & (bit(30-FF_mant_len)-1)) ==0) // Bit 7 =1 und Bits 6..0 =0 && ((msdd & (bit(shiftcount)-1)) ==0) // und weitere Bits aus msdd =0 && (!test_loop_msp(MSDptr,len)) // und alle weiteren Digits =0 // round-to-even, je nach Bit 8 : && ((mant & bit(31-FF_mant_len)) ==0) ) ) // abrunden { mant = mant >> (31-FF_mant_len); } else // aufrunden { mant = mant >> (31-FF_mant_len); mant += 1; if (mant >= bit(FF_mant_len+1)) // rounding overflow? { mant = mant>>1; exp = exp+1; } } #endif union { ffloat eksplicit; float machine_float; } u; if ((sintL)exp > (sintL)(FF_exp_high-FF_exp_mid)) { u.eksplicit = make_FF_word(sign,bit(FF_exp_len)-1,0); } // Infinity else { u.eksplicit = make_FF_word(sign,(sintL)exp+FF_exp_mid,mant); } return u.machine_float; } } // namespace cln cln-1.3.3/src/float/ffloat/conv/cl_RA_to_float.cc0000644000000000000000000000704211201634737016461 0ustar // float_approx(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/rational.h" // Implementation. #include "float/ffloat/cl_FF.h" #include "rational/cl_RA.h" #include "cln/integer.h" #include "integer/cl_I.h" #include "float/cl_F.h" namespace cln { float float_approx (const cl_RA& x) { // Method: same as cl_RA_to_FF(). if (integerp(x)) { DeclareType(cl_I,x); return float_approx(x); } { // x Ratio DeclareType(cl_RT,x); union { ffloat eksplicit; float machine_float; } u; var cl_I a = numerator(x); // +/- a var const cl_I& b = denominator(x); // b var cl_signean sign = -(cl_signean)minusp(a); // Vorzeichen if (!(sign==0)) { a = -a; } // Betrag nehmen, liefert a var sintC lendiff = (sintC)integer_length(a) // (integer-length a) - (sintC)integer_length(b); // (integer-length b) if (lendiff > FF_exp_high-FF_exp_mid) // Exponent >= n-m > Obergrenze ? { u.eksplicit = make_FF_word(sign,bit(FF_exp_len)-1,0); // Infinity return u.machine_float; } if (lendiff < FF_exp_low-FF_exp_mid-2) // Exponent <= n-m+2 < Untergrenze ? { u.eksplicit = make_FF_word(sign,0,0); // 0.0 return u.machine_float; } var cl_I zaehler; var cl_I nenner; if (lendiff >= FF_mant_len+2) // n-m-25>=0 { nenner = ash(b,lendiff - (FF_mant_len+2)); // (ash b n-m-25) zaehler = a; // a } else { zaehler = ash(a,(FF_mant_len+2) - lendiff); // (ash a -n+m+25) nenner = b; // b } // Division zaehler/nenner durchführen: var cl_I_div_t q_r = cl_divide(zaehler,nenner); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; // 2^24 <= q < 2^26, also ist q Fixnum oder Bignum mit bn_minlength Digits. var uint32 mant = ((FF_mant_len+3 < cl_value_len) ? FN_to_UV(q) : cl_I_to_UL(q) ); if (mant >= bit(FF_mant_len+2)) // 2^25 <= q < 2^26, schiebe um 2 Bits nach rechts { var uintL rounding_bits = mant & (bit(2)-1); lendiff = lendiff+1; // Exponent := n-m+1 mant = mant >> 2; if ( (rounding_bits < bit(1)) // 00,01 werden abgerundet || ( (rounding_bits == bit(1)) // 10 && (eq(r,0)) // und genau halbzahlig (r=0) && ((mant & bit(0)) ==0) // -> round-to-even ) ) // abrunden goto ab; else // aufrunden goto auf; } else { var uintL rounding_bit = mant & bit(0); mant = mant >> 1; if ( (rounding_bit == 0) // 0 wird abgerundet || ( (eq(r,0)) // genau halbzahlig (r=0) && ((mant & bit(0)) ==0) // -> round-to-even ) ) // abrunden goto ab; else // aufrunden goto auf; } auf: mant += 1; if (mant >= bit(FF_mant_len+1)) // rounding overflow? { mant = mant>>1; lendiff = lendiff+1; } ab: // Fertig. if (lendiff < (sintL)(FF_exp_low-FF_exp_mid)) { u.eksplicit = make_FF_word(sign,0,0); } else if (lendiff > (sintL)(FF_exp_high-FF_exp_mid)) { u.eksplicit = make_FF_word(sign,bit(FF_exp_len)-1,0); } // Infinity else { u.eksplicit = make_FF_word(sign,lendiff+FF_exp_mid,mant); } return u.machine_float; }} } // namespace cln cln-1.3.3/src/float/ffloat/conv/cl_FF_to_floatj.cc0000644000000000000000000000161411201634737016623 0ustar // cl_FF_to_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/ffloat/cl_FF.h" namespace cln { // Implementation. void cl_FF_to_float (const cl_FF& obj, ffloatjanus* val_) { var ffloat val = cl_ffloat_value(obj); // Der Exponent muß um FF_exp_mid-126 erniedrigt werden. if (FF_exp_mid>126) { var uintL exp = (val >> FF_mant_len) & (bit(FF_exp_len)-1); // e if (exp < FF_exp_mid-126+1) { // produziere denormalisiertes Float val = (val & minus_bit(FF_exp_len+FF_mant_len)) // selbes Vorzeichen | (0 << FF_mant_len) // Exponent 0 | (((val & (bit(FF_mant_len)-1)) | bit(FF_mant_len)) // Mantisse shiften >> (FF_exp_mid-126+1 - exp) // shiften ); } else { val -= (FF_exp_mid - 126) << FF_mant_len; } } val_->eksplicit = val; } } // namespace cln cln-1.3.3/src/float/ffloat/misc/0000755000000000000000000000000012173046177013272 5ustar cln-1.3.3/src/float/ffloat/misc/cl_FF_eqhashcode.cc0000644000000000000000000000076311201634737016740 0ustar // cl_FF equal_hashcode(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "base/cl_N.h" #include "float/ffloat/cl_FF.h" namespace cln { CL_INLINE uint32 CL_INLINE_DECL(equal_hashcode) (const cl_FF& x) { var cl_signean sign; var sintL exp; var uint32 mant; FF_decode(x, { return 0; }, sign=,exp=,mant=); var uint32 msd = mant << (32-(FF_mant_len+1)); return equal_hashcode_low(msd,exp,sign); } } // namespace cln cln-1.3.3/src/float/ffloat/misc/cl_FF_idecode.cc0000644000000000000000000000242611201634737016226 0ustar // integer_decode_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" #include "integer/cl_I.h" #if defined(__mips__) && !defined(__GNUC__) // Workaround SGI Irix 6.2 C++ 7.0 bug. #include "float/cl_F.h" #include "dfloat/cl_DF.h" namespace cln { CL_INLINE const cl_idecoded_float CL_INLINE_DECL(integer_decode_float) (const cl_FF& x) { var cl_idecoded_float sem = integer_decode_float(cl_FF_to_DF(x)); return cl_idecoded_float(sem.mantissa >> (DF_mant_len-FF_mant_len), sem.exponent + (DF_mant_len-FF_mant_len), sem.sign ); } } // namespace cln #else namespace cln { CL_INLINE const cl_idecoded_float CL_INLINE_DECL(integer_decode_float) (const cl_FF& x) { // x entpacken: var cl_signean sign; var sintL exp; var uint32 mant; FF_decode(x, { return cl_idecoded_float(0, 0, 1); }, sign=,exp=,mant= ); return cl_idecoded_float( (FF_mant_len+1 < cl_value_len ? L_to_FN(mant) // Mantisse als Fixnum : UL_to_I(mant) // oder evtl. als Bignum ), L_to_FN(exp-(FF_mant_len+1)), // e-24 als Fixnum (sign>=0 ? cl_I(1) : cl_I(-1)) // (-1)^s erzeugen ); } } // namespace cln #endif cln-1.3.3/src/float/ffloat/misc/cl_FF_exponent.cc0000644000000000000000000000060211201634737016464 0ustar // float_exponent(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" namespace cln { CL_INLINE sintE CL_INLINE_DECL(float_exponent) (const cl_FF& x) { var uintL uexp = FF_uexp(cl_ffloat_value(x)); if (uexp==0) { return 0; } return (sintL)(uexp - FF_exp_mid); } } // namespace cln cln-1.3.3/src/float/ffloat/misc/cl_FF_sign.cc0000644000000000000000000000071211201634737015566 0ustar // float_sign(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" #include "base/cl_inline.h" #include "float/ffloat/elem/cl_FF_minusp.cc" namespace cln { CL_INLINE2 const cl_FF CL_INLINE2_DECL(float_sign) (const cl_FF& x) { // Methode: x>=0 -> Ergebnis 1.0; x<0 -> Ergebnis -1.0 return (!minusp_inline(x) ? cl_FF_1 : cl_FF_minus1); } } // namespace cln cln-1.3.3/src/float/ffloat/misc/cl_FF_as.cc0000644000000000000000000000122311201634737015227 0ustar // cl_FF_As(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "base/cl_N.h" namespace cln { inline bool cl_FF_p (const cl_number& x) { #if defined(CL_WIDE_POINTERS) if (!x.pointer_p()) if (cl_tag((x).word) == cl_FF_tag) return true; #else if (x.pointer_p()) if (x.heappointer->type == &cl_class_ffloat) return true; #endif return false; } const cl_FF& cl_FF_As (const cl_number& x, const char * filename, int line) { if (cl_FF_p(x)) { DeclareType(cl_FF,x); return x; } else throw as_exception(x,"a single-float number",filename,line); } } // namespace cln cln-1.3.3/src/float/ffloat/misc/cl_FF_min.cc0000644000000000000000000000036211201634737015412 0ustar // min(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. namespace cln { const cl_FF min (const cl_FF& x, const cl_FF& y) { return (x <= y ? x : y); } } // namespace cln cln-1.3.3/src/float/ffloat/misc/cl_FF_debug.cc0000644000000000000000000000105411201634737015714 0ustar // cl_FF debugging support. // General includes. #include "base/cl_sysdep.h" // Specification. // Implementation. #include "cln/ffloat.h" #include "cln/io.h" #include "cln/float_io.h" namespace cln { static void dprint (cl_heap* pointer) { var const cl_FF& obj = *(const cl_FF*)&pointer; fprint(cl_debugout, "(cl_FF) "); fprint(cl_debugout, obj); } AT_INITIALIZATION(dprint_FF) { cl_register_type_printer(cl_class_ffloat,dprint); } // This dummy links in this module when requires it. int cl_FF_debug_module; } // namespace cln cln-1.3.3/src/float/ffloat/misc/cl_FF_abs.cc0000644000000000000000000000055111201634737015374 0ustar // abs(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "base/cl_inline.h" #include "float/ffloat/elem/cl_FF_minusp.cc" namespace cln { const cl_FF CL_FLATTEN abs (const cl_FF& x) { // x<0 -> (- x), x>=0 -> x if (minusp_inline(x)) return -x; else return x; } } // namespace cln cln-1.3.3/src/float/ffloat/misc/cl_FF_class.cc0000644000000000000000000000104211201634737015730 0ustar // cl_class_ffloat. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. namespace cln { cl_class cl_class_ffloat = { #ifdef CL_WIDE_POINTERS NULL, // destructor not used, since not heap objects #else NULL, // empty destructor #endif cl_class_flags_subclass_complex | cl_class_flags_subclass_real | cl_class_flags_subclass_float }; #ifdef CL_WIDE_POINTERS AT_INITIALIZATION(ini_class_ffloat) { cl_immediate_classes[cl_FF_tag] = &cl_class_ffloat; } #endif } // namespace cln cln-1.3.3/src/float/ffloat/misc/cl_FF_decode.cc0000644000000000000000000000116311201634737016052 0ustar // decode_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" #include "integer/cl_I.h" namespace cln { const decoded_ffloat decode_float (const cl_FF& x) { // x entpacken: var cl_signean sign; var sintL exp; var uint32 mant; FF_decode(x, { return decoded_ffloat(cl_FF_0, 0, cl_FF_1); }, sign=,exp=,mant= ); return decoded_ffloat( encode_FF(0,0,mant), // (-1)^0 * 2^0 * m erzeugen L_to_FN(exp), // e als Fixnum encode_FF(sign,1,bit(FF_mant_len)) // (-1)^s erzeugen ); } } // namespace cln cln-1.3.3/src/float/ffloat/misc/cl_FF_digits.cc0000644000000000000000000000046711201634737016120 0ustar // float_digits(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" namespace cln { CL_INLINE uintC CL_INLINE_DECL(float_digits) (const cl_FF& x) { unused x; return FF_mant_len+1; // 24 } } // namespace cln cln-1.3.3/src/float/ffloat/misc/cl_FF_signum.cc0000644000000000000000000000104311201634737016126 0ustar // signum(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" #include "base/cl_inline.h" #include "float/ffloat/elem/cl_FF_minusp.cc" #include "float/ffloat/elem/cl_FF_zerop.cc" namespace cln { CL_INLINE2 const cl_FF CL_INLINE2_DECL(signum) (const cl_FF& x) { if (minusp_inline(x)) { return cl_FF_minus1; } // x<0 -> -1.0 elif (zerop_inline(x)) { return cl_FF_0; } // x=0 -> 0.0 else { return cl_FF_1; } // x>0 -> +1.0 } } // namespace cln cln-1.3.3/src/float/ffloat/misc/cl_FF_precision.cc0000644000000000000000000000063511201634737016625 0ustar // float_precision(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" #include "base/cl_inline.h" #include "float/ffloat/elem/cl_FF_zerop.cc" namespace cln { CL_INLINE2 uintC CL_INLINE2_DECL(float_precision) (const cl_FF& x) { if (zerop_inline(x)) return 0; return FF_mant_len+1; // 24 } } // namespace cln cln-1.3.3/src/float/ffloat/misc/cl_FF_max.cc0000644000000000000000000000036211201634737015414 0ustar // max(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. namespace cln { const cl_FF max (const cl_FF& x, const cl_FF& y) { return (x >= y ? x : y); } } // namespace cln cln-1.3.3/src/float/ffloat/cl_FF.h0000644000000000000000000002100412034641564013453 0ustar // cl_FF internals #ifndef _CL_FF_H #define _CL_FF_H #include "cln/number.h" #include "cln/malloc.h" #include "base/cl_low.h" #include "float/cl_F.h" #ifdef FAST_FLOAT #include "base/cl_N.h" #include "float/cl_F.h" #endif namespace cln { typedef uint32 ffloat; // 32-bit float in IEEE format union ffloatjanus { ffloat eksplicit; // explicit value #ifdef FAST_FLOAT float machine_float; // value as a C `float' #endif }; #if defined(CL_WIDE_POINTERS) #define FF_value_shift 32 inline ffloat cl_ffloat_value (const cl_FF& x) { return x.word >> FF_value_shift; } #else struct cl_heap_ffloat : cl_heap { ffloatjanus representation; }; inline cl_heap_ffloat* TheFfloat (const cl_number& obj) { return (cl_heap_ffloat*)(obj.pointer); } inline ffloat cl_ffloat_value (const cl_FF& x) { return TheFfloat(x)->representation.eksplicit; } #endif // The word contains: // |..|.......|..........................| // sign exponent mantissa #define FF_exp_len 8 // number of bits in the exponent #define FF_mant_len 23 // number of bits in the mantissa // (excluding the hidden bit) #define FF_exp_low 1 // minimum exponent #define FF_exp_mid 126 // exponent bias #define FF_exp_high 254 // maximum exponent, 255 is NaN/Inf #define FF_exp_shift (FF_mant_len+FF_mant_shift) // lowest exponent bit #define FF_mant_shift 0 // lowest mantissa bit #define FF_sign_shift (32 - 1) // = (FF_exp_len+FF_mant_len) // Private constructor. #if !defined(CL_WIDE_POINTERS) inline cl_FF::cl_FF (cl_heap_ffloat* ptr) : cl_F ((cl_private_thing) ptr) {} #endif extern cl_class cl_class_ffloat; // Builds a float from the explicit word. #if defined(CL_WIDE_POINTERS) inline cl_FF::cl_FF (struct cl_heap_ffloat * null, cl_uint w) : cl_F ((cl_private_thing) w) { unused null; } inline const cl_FF allocate_ffloat (ffloat eksplicit) { return cl_FF((struct cl_heap_ffloat *) 0, ((cl_uint)eksplicit << FF_value_shift) | (cl_FF_tag << cl_tag_shift)); } #else inline cl_heap_ffloat* allocate_ffloat (ffloat eksplicit) { cl_heap_ffloat* p = (cl_heap_ffloat*) malloc_hook(sizeof(cl_heap_ffloat)); p->refcount = 1; p->type = &cl_class_ffloat; p->representation.eksplicit = eksplicit; return p; } #endif // Builds a float word from sign (0 or -1), exponent and mantissa. inline uint32 make_FF_word (cl_sint sign, unsigned int exp, cl_uint mant) { return (sign << FF_sign_shift) | (exp << FF_exp_shift) | ((mant & (bit(FF_mant_len)-1)) << FF_mant_shift); } // Builds a float from sign (0 or -1), exponent and mantissa. inline const cl_FF make_FF (cl_sint sign, unsigned int exp, cl_uint mant) { return allocate_ffloat(make_FF_word(sign,exp,mant)); } #if defined(CL_WIDE_POINTERS) // Single Float 0.0 #define cl_FF_0 make_FF(0,0,0) // Single Float 1.0 #define cl_FF_1 make_FF(0,FF_exp_mid+1,bit(FF_mant_len)) // Single Float -1.0 #define cl_FF_minus1 make_FF(-1,FF_exp_mid+1,bit(FF_mant_len)) #else // Single Float 0.0 extern const cl_FF cl_FF_0; // Single Float 1.0 extern const cl_FF cl_FF_1; // Single Float -1.0 extern const cl_FF cl_FF_minus1; #endif // Entpacken eines Single-Float: // FF_decode(obj, zero_statement, sign=,exp=,mant=); // zerlegt ein Single-Float obj. // Ist obj=0.0, wird zero_statement ausgeführt. // Sonst: cl_signean sign = Vorzeichen (0 = +, -1 = -), // sintL exp = Exponent (vorzeichenbehaftet), // uintL mant = Mantisse (>= 2^FF_mant_len, < 2^(FF_mant_len+1)) #define FF_uexp(x) (((x) >> FF_mant_len) & (bit(FF_exp_len)-1)) #define FF_decode(obj, zero_statement, sign_zuweisung,exp_zuweisung,mant_zuweisung) \ { var ffloat _x = cl_ffloat_value(obj); \ var uintL uexp = FF_uexp(_x); \ if (uexp==0) \ { zero_statement } /* e=0 -> Zahl 0.0 */ \ else \ { exp_zuweisung (sintL)(uexp - FF_exp_mid); /* Exponent */ \ unused (sign_zuweisung sign_of((sint32)(_x))); /* Vorzeichen */\ mant_zuweisung (bit(FF_mant_len) | (_x & (bit(FF_mant_len)-1))); \ } } // Einpacken eines Single-Float: // encode_FF(sign,exp,mant); // liefert ein Single-Float. // > cl_signean sign: Vorzeichen, 0 für +, -1 für negativ. // > sintE exp: Exponent // > uintL mant: Mantisse, sollte >= 2^FF_mant_len und < 2^(FF_mant_len+1) sein. // < object ergebnis: ein Single-Float // Der Exponent wird auf Überlauf/Unterlauf getestet. inline const cl_FF encode_FF (cl_signean sign, sintE exp, uintL mant) { if (exp < (sintE)(FF_exp_low-FF_exp_mid)) { if (underflow_allowed()) { throw floating_point_underflow_exception(); } else { return cl_FF_0; } } else if (exp > (sintE)(FF_exp_high-FF_exp_mid)) { throw floating_point_overflow_exception(); } else return make_FF(sign, exp+FF_exp_mid, mant & (bit(FF_mant_len)-1)); } #ifdef FAST_FLOAT // Auspacken eines Floats: inline float FF_to_float (const cl_FF& obj) { #if defined(CL_WIDE_POINTERS) // eines der beiden 32-Bit-Wörter #if defined(__GNUC__) return ((ffloatjanus) { eksplicit: cl_ffloat_value(obj) }).machine_float; #else return *(float*)(&((uint32*)&(obj))[BIG_ENDIAN_P+(1-2*BIG_ENDIAN_P)*(FF_value_shift/32)]); #endif #else return TheFfloat(obj)->representation.machine_float; #endif } // Überprüfen und Einpacken eines von den 'float'-Routinen gelieferten // IEEE-Floats. // Klassifikation: // 1 <= e <= 254 : normalisierte Zahl // e=0, m/=0: subnormale Zahl // e=0, m=0: vorzeichenbehaftete 0.0 // e=255, m=0: vorzeichenbehaftete Infinity // e=255, m/=0: NaN // Angabe der möglicherweise auftretenden Sonderfälle: // maybe_overflow: Operation läuft über, liefert IEEE-Infinity // maybe_subnormal: Ergebnis sehr klein, liefert IEEE-subnormale Zahl // maybe_underflow: Ergebnis sehr klein und /=0, liefert IEEE-Null // maybe_divide_0: Ergebnis unbestimmt, liefert IEEE-Infinity // maybe_nan: Ergebnis unbestimmt, liefert IEEE-NaN #define float_to_FF(expr,ergebnis_zuweisung,maybe_overflow,maybe_subnormal,maybe_underflow,maybe_divide_0,maybe_nan) \ { var ffloatjanus _erg; _erg.machine_float = (expr); \ if ((_erg.eksplicit & ((uint32)bit(FF_exp_len+FF_mant_len)-bit(FF_mant_len))) == 0) /* e=0 ? */\ { if ((maybe_underflow \ || (maybe_subnormal && !((_erg.eksplicit << 1) == 0)) \ ) \ && underflow_allowed() \ ) \ { throw floating_point_underflow_exception(); } /* subnormal oder noch kleiner -> Underflow */\ else \ { ergebnis_zuweisung cl_FF_0; } /* +/- 0.0 -> 0.0 */ \ } \ elif ((maybe_overflow || maybe_divide_0) \ && (((~_erg.eksplicit) & ((uint32)bit(FF_exp_len+FF_mant_len)-bit(FF_mant_len))) == 0) /* e=255 ? */\ ) \ { if (maybe_nan && !((_erg.eksplicit << (32-FF_mant_len)) == 0)) \ { throw division_by_0_exception(); } /* NaN, also Singularität -> "Division durch 0" */\ else /* Infinity */ \ if (!maybe_overflow || maybe_divide_0) \ { throw division_by_0_exception(); } /* Infinity, Division durch 0 */\ else \ { throw floating_point_overflow_exception(); } /* Infinity, Overflow */\ } \ else \ { ergebnis_zuweisung allocate_ffloat(_erg.eksplicit); } \ } #endif // Liefert zu einem Single-Float x : (futruncate x), ein FF. // x wird von der 0 weg zur nächsten ganzen Zahl gerundet. extern const cl_FF futruncate (const cl_FF& x); // FF_to_I(x) wandelt ein Single-Float x, das eine ganze Zahl darstellt, // in ein Integer um. extern const cl_I cl_FF_to_I (const cl_FF& x); // cl_I_to_FF(x) wandelt ein Integer x in ein Single-Float um und rundet dabei. extern const cl_FF cl_I_to_FF (const cl_I& x); // cl_RA_to_FF(x) wandelt eine rationale Zahl x in ein Single-Float um // und rundet dabei. extern const cl_FF cl_RA_to_FF (const cl_RA& x); // IEEE-Single-Float: // Bit 31 = s, Bits 30..23 = e, Bits 22..0 = m. // e=0, m=0: vorzeichenbehaftete 0.0 // e=0, m/=0: subnormale Zahl, // Wert = (-1)^s * 2^(1-126) * [ 0 . 0 m22 ... m0 ] // 1 <= e <= 254 : normalisierte Zahl, // Wert = (-1)^s * 2^(e-126) * [ 0 . 1 m22 ... m0 ] // e=255, m=0: vorzeichenbehaftete Infinity // e=255, m/=0: NaN // cl_float_to_FF_pointer(val) wandelt ein IEEE-Single-Float val in ein Single-Float um. extern cl_private_thing cl_float_to_FF_pointer (const float val); // cl_FF_to_float(obj,&val); // wandelt ein Single-Float obj in ein IEEE-Single-Float val um. extern void cl_FF_to_float (const cl_FF& obj, ffloatjanus* val_); } // namespace cln #endif /* _CL_FF_H */ cln-1.3.3/src/float/ffloat/elem/0000755000000000000000000000000012173046177013261 5ustar cln-1.3.3/src/float/ffloat/elem/cl_FF_uminus.cc0000644000000000000000000000071611201634737016141 0ustar // unary operator - // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" namespace cln { const cl_FF operator- (const cl_FF& x) { // Methode: // Falls x=0.0, fertig. Sonst Vorzeichenbit umdrehen. var ffloat x_ = cl_ffloat_value(x); if (FF_uexp(x_) == 0) return x; else return allocate_ffloat( x_ ^ bit(31) ); } } // namespace cln cln-1.3.3/src/float/ffloat/elem/cl_FF_fround.cc0000644000000000000000000000605211201634737016115 0ustar // fround(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" namespace cln { const cl_FF fround (const cl_FF& x) { // Methode: // x = 0.0 oder e<0 -> Ergebnis 0.0 // 0<=e<=23 -> letzte (24-e) Bits der Mantisse wegrunden, // Exponent und Vorzeichen beibehalten. // e>23 -> Ergebnis x var ffloat x_ = cl_ffloat_value(x); var uintL uexp = FF_uexp(x_); // e + FF_exp_mid if (uexp < FF_exp_mid) // x = 0.0 oder e<0 ? { return cl_FF_0; } else { if (uexp > FF_exp_mid+FF_mant_len) // e > 23 ? { return x; } else if (uexp > FF_exp_mid+1) // e>1 ? { var uint32 bitmask = // Bitmaske: Bit 23-e gesetzt, alle anderen gelöscht bit(FF_mant_len+FF_exp_mid-uexp); var uint32 mask = // Bitmaske: Bits 22-e..0 gesetzt, alle anderen gelöscht bitmask-1; if ( ((x_ & bitmask) ==0) // Bit 23-e =0 -> abrunden || ( ((x_ & mask) ==0) // Bit 23-e =1 und Bits 22-e..0 >0 -> aufrunden // round-to-even, je nach Bit 24-e : && ((x_ & (bitmask<<1)) ==0) ) ) // abrunden { mask |= bitmask; // Bitmaske: Bits 23-e..0 gesetzt, alle anderen gelöscht return allocate_ffloat( x_ & ~mask ); } else // aufrunden { return allocate_ffloat ((x_ | mask) // alle diese Bits 22-e..0 setzen (Bit 23-e schon gesetzt) + 1 // letzte Stelle erhöhen, dabei evtl. Exponenten incrementieren ); } } elif (uexp == FF_exp_mid+1) // e=1 ? // Wie bei 1 < e <= 23, nur daß Bit 24-e stets gesetzt ist. { if ((x_ & bit(FF_mant_len-1)) ==0) // Bit 23-e =0 -> abrunden // abrunden { return allocate_ffloat( x_ & ~(bit(FF_mant_len)-1) ); } else // aufrunden { return allocate_ffloat ((x_ | (bit(FF_mant_len)-1)) // alle diese Bits 23-e..0 setzen + 1 // letzte Stelle erhöhen, dabei evtl. Exponenten incrementieren ); } } else // e=0 ? // Wie bei 1 < e <= 23, nur daß Bit 23-e stets gesetzt // und Bit 24-e stets gelöscht ist. { if ((x_ & (bit(FF_mant_len)-1)) ==0) // abrunden von +-0.5 zu 0.0 { return cl_FF_0; } else // aufrunden { return allocate_ffloat ((x_ | (bit(FF_mant_len)-1)) // alle Bits 22-e..0 setzen + 1 // letzte Stelle erhöhen, dabei Exponenten incrementieren ); } } } } } // namespace cln cln-1.3.3/src/float/ffloat/elem/cl_FF_div.cc0000644000000000000000000000731111201634737015401 0ustar // binary operator / // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" #include "base/cl_N.h" #include "float/cl_F.h" #include "base/cl_low.h" #include "base/cl_inline.h" #include "float/ffloat/elem/cl_FF_zerop.cc" namespace cln { const cl_FF operator/ (const cl_FF& x1, const cl_FF& x2) { // Methode: // x2 = 0.0 -> Error // x1 = 0.0 -> Ergebnis 0.0 // Sonst: // Ergebnis-Vorzeichen = xor der beiden Vorzeichen von x1 und x2 // Ergebnis-Exponent = Differenz der beiden Exponenten von x1 und x2 // Ergebnis-Mantisse = Mantisse mant1 / Mantisse mant2, gerundet. // mant1/mant2 > 1/2, mant1/mant2 < 2; // nach Rundung mant1/mant2 >=1/2, <=2*mant1<2. // Bei mant1/mant2 >=1 brauche 23 Nachkommabits, // bei mant1/mant2 <1 brauche 24 Nachkommabits. // Fürs Runden: brauche ein Rundungsbit (Rest gibt an, ob exakt). // Brauche daher insgesamt 25 Nachkommabits von mant1/mant2. // Dividiere daher (als Unsigned Integers) 2^25*(2^24*mant1) durch (2^24*mant2). // Falls der Quotient >=2^25 ist, runde die letzten zwei Bits weg und // erhöhe den Exponenten um 1. // Falls der Quotient <2^25 ist, runde das letzte Bit weg. Bei rounding // overflow schiebe um ein weiteres Bit nach rechts, incr. Exponenten. #if defined(FAST_FLOAT) && !defined(__i386__) float_to_FF(FF_to_float(x1) / FF_to_float(x2), return , TRUE, TRUE, // Overflow und subnormale Zahl abfangen !zerop_inline(x1), // ein Ergebnis +/- 0.0 // ist genau dann in Wirklichkeit ein Underflow zerop_inline(x2), // Division durch Null abfangen FALSE // kein NaN als Ergebnis möglich ); #else // x1,x2 entpacken: var cl_signean sign1; var sintL exp1; var uintL mant1; var cl_signean sign2; var sintL exp2; var uintL mant2; FF_decode(x2, { throw division_by_0_exception(); }, sign2=,exp2=,mant2=); FF_decode(x1, { return x1; }, sign1=,exp1=,mant1=); exp1 = exp1 - exp2; // Differenz der Exponenten sign1 = sign1 ^ sign2; // Ergebnis-Vorzeichen // Dividiere 2^25*mant1 durch mant2 oder (äquivalent) // 2^i*2^25*mant1 durch 2^i*mant2 für irgendein i mit 0 <= i <= 32-24 : var uintL mant; var uintL rest; // wähle i = 32-(FF_mant_len+1), also i+(FF_mant_len+2) = 33. divu_6432_3232(mant1<<1,0, mant2<<(32-(FF_mant_len+1)), mant=,rest=); if (mant >= bit(FF_mant_len+2)) // Quotient >=2^25 -> 2 Bits wegrunden { var uintL rounding_bits = mant & (bit(2)-1); exp1 += 1; // Exponenten incrementieren mant = mant >> 2; if ( (rounding_bits < bit(1)) // 00,01 werden abgerundet || ( (rounding_bits == bit(1)) // 10 && (rest == 0) // und genau halbzahlig && ((mant & bit(0)) ==0) // -> round-to-even ) ) // abrunden {} else // aufrunden { mant += 1; } } else // Quotient <2^25 -> 1 Bit wegrunden { var uintL rounding_bit = mant & bit(0); mant = mant >> 1; if ( (rounding_bit == 0) // 0 wird abgerundet || ( (rest == 0) // genau halbzahlig && ((mant & bit(0)) ==0) // -> round-to-even ) ) // abrunden {} else // aufrunden { mant += 1; if (mant >= bit(FF_mant_len+1)) // rounding overflow? { mant = mant>>1; exp1 = exp1+1; } } } return encode_FF(sign1,exp1,mant); #endif } } // namespace cln cln-1.3.3/src/float/ffloat/elem/cl_FF_compare.cc0000644000000000000000000000241611201634737016246 0ustar // compare(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" namespace cln { cl_signean compare (const cl_FF& x, const cl_FF& y) { // Methode: // x und y haben verschiedenes Vorzeichen -> // x < 0 -> x < y // x >= 0 -> x > y // x und y haben gleiches Vorzeichen -> // x >=0 -> vergleiche x und y (die rechten 24 Bits) // x <0 -> vergleiche y und x (die rechten 24 Bits) var uint32 x_ = cl_ffloat_value(x); var uint32 y_ = cl_ffloat_value(y); if ((sint32)y_ >= 0) // y>=0 { if ((sint32)x_ >= 0) // y>=0, x>=0 { if (x_ < y_) return signean_minus; // x y_) return signean_plus; // x>y return signean_null; } else // y>=0, x<0 { return signean_minus; } // x= 0) // y<0, x>=0 { return signean_plus; } // x>y else // y<0, x<0 { if (x_ > y_) return signean_minus; // |x|>|y| -> x x>y return signean_null; } } } } // namespace cln cln-1.3.3/src/float/ffloat/elem/cl_FF_zerop.cc0000644000000000000000000000044111201634737015753 0ustar // zerop(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" namespace cln { CL_INLINE bool CL_INLINE_DECL(zerop) (const cl_FF& x) { return cl_ffloat_value(x) == 0; } } // namespace cln cln-1.3.3/src/float/ffloat/elem/cl_FF_mul.cc0000644000000000000000000000760211201634737015417 0ustar // binary operator * // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" #include "float/cl_F.h" #include "base/cl_low.h" #include "base/cl_inline.h" #include "float/ffloat/elem/cl_FF_zerop.cc" namespace cln { const cl_FF operator* (const cl_FF& x1, const cl_FF& x2) { // Methode: // Falls x1=0.0 oder x2=0.0 -> Ergebnis 0.0 // Sonst: Ergebnis-Vorzeichen = VZ von x1 xor VZ von x2. // Ergebnis-Exponent = Summe der Exponenten von x1 und x2. // Ergebnis-Mantisse = Produkt der Mantissen von x1 und x2, gerundet: // 2^-24 * mant1 * 2^-24 * mant2 = 2^-48 * (mant1*mant2), // die Klammer ist >=2^46, <=(2^24-1)^2<2^48 . // Falls die Klammer >=2^47 ist, um 24 Bit nach rechts schieben und // runden: Falls Bit 23 Null, abrunden; falls Bit 23 Eins und // Bits 22..0 alle Null, round-to-even; sonst aufrunden. // Falls die Klammer <2^47 ist, um 23 Bit nach rechts schieben und // runden: Falls Bit 22 Null, abrunden; falls Bit 22 Eins und // Bits 21..0 alle Null, round-to-even; sonst aufrunden. Nach // Aufrunden: Falls =2^24, um 1 Bit nach rechts schieben. Sonst // Exponenten um 1 erniedrigen. #ifdef FAST_FLOAT float_to_FF(FF_to_float(x1) * FF_to_float(x2), return , TRUE, TRUE, // Overflow und subnormale Zahl abfangen !(zerop_inline(x1) || zerop_inline(x2)), // ein Ergebnis +/- 0.0 // ist genau dann in Wirklichkeit ein Underflow FALSE, FALSE // keine Singularität, kein NaN als Ergebnis möglich ); #else // x1,x2 entpacken: var cl_signean sign1; var sintL exp1; var uintL mant1; var cl_signean sign2; var sintL exp2; var uintL mant2; FF_decode(x1, { return x1; }, sign1=,exp1=,mant1=); FF_decode(x2, { return x2; }, sign2=,exp2=,mant2=); exp1 = exp1 + exp2; // Summe der Exponenten sign1 = sign1 ^ sign2; // Ergebnis-Vorzeichen var uintL manthi; var uintL mantlo; // Mantissen mant1 und mant2 multiplizieren: mulu24(mant1,mant2, manthi=,mantlo=); manthi = (manthi << (32-FF_mant_len)) | (mantlo >> FF_mant_len); mantlo = mantlo & (bit(FF_mant_len)-1); // Nun ist 2^FF_mant_len * manthi + mantlo = mant1 * mant2. if (manthi >= bit(FF_mant_len+1)) // mant1*mant2 >= 2^(2*FF_mant_len+1) { if ( ((manthi & bit(0)) ==0) // Bit FF_mant_len =0 -> abrunden || ( (mantlo ==0) // Bit FF_mant_len =1 und Bits FF_mant_len-1..0 >0 -> aufrunden // round-to-even, je nach Bit FF_mant_len+1 : && ((manthi & bit(1)) ==0) ) ) // abrunden { manthi = manthi >> 1; goto ab; } else // aufrunden { manthi = manthi >> 1; goto auf; } } else // mant1*mant2 < 2^(2*FF_mant_len+1) { exp1 = exp1-1; // Exponenten decrementieren if ( ((mantlo & bit(FF_mant_len-1)) ==0) // Bit FF_mant_len-1 =0 -> abrunden || ( ((mantlo & (bit(FF_mant_len-1)-1)) ==0) // Bit FF_mant_len-1 =1 und Bits FF_mant_len-2..0 >0 -> aufrunden // round-to-even, je nach Bit FF_mant_len : && ((manthi & bit(0)) ==0) ) ) // abrunden goto ab; else // aufrunden goto auf; } auf: manthi = manthi+1; // Hier ist 2^FF_mant_len <= manthi <= 2^(FF_mant_len+1) if (manthi >= bit(FF_mant_len+1)) // rounding overflow? { manthi = manthi>>1; exp1 = exp1+1; } // Shift nach rechts ab: // Runden fertig, 2^FF_mant_len <= manthi < 2^(FF_mant_len+1) return encode_FF(sign1,exp1,manthi); #endif } } // namespace cln cln-1.3.3/src/float/ffloat/elem/cl_FF_from_RA.cc0000644000000000000000000000722311201634737016146 0ustar // cl_RA_to_FF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/ffloat/cl_FF.h" // Implementation. #include "rational/cl_RA.h" #include "cln/integer.h" #include "integer/cl_I.h" #include "float/cl_F.h" namespace cln { const cl_FF cl_RA_to_FF (const cl_RA& x) { // Methode: // x ganz -> klar. // x = +/- a/b mit Integers a,b>0: // Seien n,m so gewählt, daß // 2^(n-1) <= a < 2^n, 2^(m-1) <= b < 2^m. // Dann ist 2^(n-m-1) < a/b < 2^(n-m+1). // Berechne n=(integer-length a) und m=(integer-length b) und // floor(2^(-n+m+25)*a/b) : // Bei n-m>=25 dividiere a durch (ash b (n-m-25)), // bei n-m<25 dividiere (ash a (-n+m+25)) durch b. // Der erste Wert ist >=2^24, <2^26. // Falls er >=2^25 ist, runde 2 Bits weg, // falls er <2^25 ist, runde 1 Bit weg. if (integerp(x)) { DeclareType(cl_I,x); return cl_I_to_FF(x); } { // x Ratio DeclareType(cl_RT,x); var cl_I a = numerator(x); // +/- a var const cl_I& b = denominator(x); // b var cl_signean sign = -(cl_signean)minusp(a); // Vorzeichen if (!(sign==0)) { a = -a; } // Betrag nehmen, liefert a var sintC lendiff = (sintC)integer_length(a) // (integer-length a) - (sintC)integer_length(b); // (integer-length b) if (lendiff > FF_exp_high-FF_exp_mid) // Exponent >= n-m > Obergrenze ? { throw floating_point_overflow_exception(); } // -> Overflow if (lendiff < FF_exp_low-FF_exp_mid-2) // Exponent <= n-m+2 < Untergrenze ? { if (underflow_allowed()) { throw floating_point_underflow_exception(); } // -> Underflow else { return cl_FF_0; } } var cl_I zaehler; var cl_I nenner; if (lendiff >= FF_mant_len+2) // n-m-25>=0 { nenner = ash(b,lendiff - (FF_mant_len+2)); // (ash b n-m-25) zaehler = a; // a } else { zaehler = ash(a,(FF_mant_len+2) - lendiff); // (ash a -n+m+25) nenner = b; // b } // Division zaehler/nenner durchführen: var cl_I_div_t q_r = cl_divide(zaehler,nenner); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; // 2^24 <= q < 2^26, also ist q Fixnum oder Bignum mit bn_minlength Digits. var uint32 mant = ((FF_mant_len+3 < cl_value_len) ? FN_to_UV(q) : cl_I_to_UL(q) ); if (mant >= bit(FF_mant_len+2)) // 2^25 <= q < 2^26, schiebe um 2 Bits nach rechts { var uintL rounding_bits = mant & (bit(2)-1); lendiff = lendiff+1; // Exponent := n-m+1 mant = mant >> 2; if ( (rounding_bits < bit(1)) // 00,01 werden abgerundet || ( (rounding_bits == bit(1)) // 10 && (eq(r,0)) // und genau halbzahlig (r=0) && ((mant & bit(0)) ==0) // -> round-to-even ) ) // abrunden goto ab; else // aufrunden goto auf; } else { var uintL rounding_bit = mant & bit(0); mant = mant >> 1; if ( (rounding_bit == 0) // 0 wird abgerundet || ( (eq(r,0)) // genau halbzahlig (r=0) && ((mant & bit(0)) ==0) // -> round-to-even ) ) // abrunden goto ab; else // aufrunden goto auf; } auf: mant += 1; if (mant >= bit(FF_mant_len+1)) // rounding overflow? { mant = mant>>1; lendiff = lendiff+1; } ab: // Fertig. return encode_FF(sign,lendiff,mant); }} } // namespace cln cln-1.3.3/src/float/ffloat/elem/cl_FF_minus.cc0000644000000000000000000000152411201634737015752 0ustar // binary operator - // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" namespace cln { const cl_FF operator- (const cl_FF& x1, const cl_FF& x2) { #ifdef FAST_FLOAT float_to_FF(FF_to_float(x1) - FF_to_float(x2), return , TRUE, TRUE, // Overflow und subnormale Zahl abfangen FALSE, // kein Underflow mit Ergebnis +/- 0.0 möglich // (nach Definition der subnormalen Zahlen) FALSE, FALSE // keine Singularität, kein NaN als Ergebnis möglich ); #else var ffloat x2_ = cl_ffloat_value(x2); if (FF_uexp(x2_) == 0) { return x1; } else { return x1 + allocate_ffloat(x2_ ^ bit(31)); } #endif } } // namespace cln cln-1.3.3/src/float/ffloat/elem/cl_FF_to_I.cc0000644000000000000000000000147011201634737015511 0ustar // cl_FF_to_I(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/ffloat/cl_FF.h" // Implementation. #include "cln/integer.h" #include "integer/cl_I.h" namespace cln { const cl_I cl_FF_to_I (const cl_FF& x) { // Methode: // Falls x=0.0, Ergebnis 0. // Sonst (ASH Vorzeichen*Mantisse (e-24)). // x entpacken: var cl_signean sign; var sintL exp; var uint32 mant; FF_decode(x, { return 0; }, sign=,exp=,mant=); exp = exp-(FF_mant_len+1); return ash( // mant >0, <2^(FF_mant_len+1) in ein Fixnum umwandeln: #if (FF_mant_len+1 < cl_value_len) L_to_FN(sign==0 ? (sintL)mant : -(sintL)mant) #else L_to_I(sign==0 ? (sintL)mant : -(sintL)mant) #endif ,exp ); } } // namespace cln cln-1.3.3/src/float/ffloat/elem/cl_FF_ffloor.cc0000644000000000000000000000062011201634737016102 0ustar // ffloor(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" #include "base/cl_inline.h" #include "float/ffloat/elem/cl_FF_minusp.cc" namespace cln { const cl_FF CL_FLATTEN ffloor (const cl_FF& x) { if (minusp_inline(x)) return futruncate(x); else return ftruncate(x); } } // namespace cln cln-1.3.3/src/float/ffloat/elem/cl_FF_futrunc.cc0000644000000000000000000000310711201634737016304 0ustar // futruncate(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/ffloat/cl_FF.h" // Implementation. namespace cln { const cl_FF futruncate (const cl_FF& x) { // Methode: // x = 0.0 -> Ergebnis 0.0 // e<=0 -> Ergebnis 1.0 oder -1.0, je nach Vorzeichen von x. // 1<=e<=23 -> Greife die letzten (24-e) Bits von x heraus. // Sind sie alle =0 -> Ergebnis x. // Sonst setze sie alle und erhöhe dann die letzte Stelle um 1. // Kein Überlauf der 23 Bit -> fertig. // Sonst (Ergebnis eine Zweierpotenz): Mantisse := .1000...000, // e:=e+1. (Test auf Überlauf wegen e<=24 überflüssig) // e>=24 -> Ergebnis x. var ffloat x_ = cl_ffloat_value(x); var uintL uexp = FF_uexp(x_); // e + FF_exp_mid if (uexp==0) // 0.0 ? { return x; } if (uexp <= FF_exp_mid) // e<=0 ? { // Exponent auf 1, Mantisse auf .1000...000 setzen. return ((x_ & bit(31))==0 ? cl_FF_1 : cl_FF_minus1); } else { if (uexp > FF_exp_mid+FF_mant_len) // e > 23 ? { return x; } else { var uint32 mask = // Bitmaske: Bits 23-e..0 gesetzt, alle anderen gelöscht bit(FF_mant_len+1+FF_exp_mid-uexp)-1; if ((x_ & mask)==0) // alle diese Bits =0 ? { return x; } return allocate_ffloat ((x_ | mask) // alle diese Bits setzen + 1 // letzte Stelle erhöhen, dabei evtl. Exponenten incrementieren ); } } } } // namespace cln cln-1.3.3/src/float/ffloat/elem/cl_FF_ftrunc.cc0000644000000000000000000000163411201634737016122 0ustar // ftruncate(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" namespace cln { const cl_FF ftruncate (const cl_FF& x) { // Methode: // x = 0.0 oder e<=0 -> Ergebnis 0.0 // 1<=e<=23 -> letzte (24-e) Bits der Mantisse auf 0 setzen, // Exponent und Vorzeichen beibehalten // e>=24 -> Ergebnis x var ffloat x_ = cl_ffloat_value(x); var uintL uexp = FF_uexp(x_); // e + FF_exp_mid if (uexp <= FF_exp_mid) // 0.0 oder e<=0 ? { return cl_FF_0; } else { if (uexp > FF_exp_mid+FF_mant_len) // e > 23 ? { return x; } else { return allocate_ffloat ( x_ & // Bitmaske: Bits 23-e..0 gelöscht, alle anderen gesetzt ~(bit(FF_mant_len+1+FF_exp_mid-uexp)-1) ); } } } } // namespace cln cln-1.3.3/src/float/ffloat/elem/cl_FF_scale.cc0000644000000000000000000000243711201634737015712 0ustar // scale_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" #include "float/cl_F.h" namespace cln { const cl_FF scale_float (const cl_FF& x, sintC delta) { // Methode: // x=0.0 -> x als Ergebnis // delta muß betragsmäßig <= FF_exp_high-FF_exp_low sein. // Neues FF mit um delta vergrößertem Exponenten bilden. // x entpacken: var cl_signean sign; var sintL exp; var uint32 mant; FF_decode(x, { return x; }, sign=,exp=,mant=); if (delta >= 0) // delta>=0 { var uintC udelta = delta; if (udelta <= (uintL)(FF_exp_high-FF_exp_low)) { exp = exp+udelta; return encode_FF(sign,exp,mant); } else { throw floating_point_overflow_exception(); } } else // delta<0 { var uintC udelta = -delta; if (udelta <= (uintL)(FF_exp_high-FF_exp_low)) { exp = exp-udelta; return encode_FF(sign,exp,mant); } else if (underflow_allowed()) { throw floating_point_underflow_exception(); } else { return cl_FF_0; } } } } // namespace cln cln-1.3.3/src/float/ffloat/elem/cl_FF_minusp.cc0000644000000000000000000000045211201634737016131 0ustar // minusp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" namespace cln { CL_INLINE bool CL_INLINE_DECL(minusp) (const cl_FF& x) { return (sint32)cl_ffloat_value(x) < 0; } } // namespace cln cln-1.3.3/src/float/ffloat/elem/cl_FF_from_I.cc0000644000000000000000000001053312034736606016035 0ustar // cl_I_to_FF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/ffloat/cl_FF.h" // Implementation. #include "cln/integer.h" #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "float/cl_F.h" namespace cln { const cl_FF cl_I_to_FF (const cl_I& x) { // Methode: // x=0 -> Ergebnis 0.0 // Merke Vorzeichen von x. // x:=(abs x) // Exponent:=(integer-length x) // Greife die 25 höchstwertigen Bits heraus (angeführt von einer 1). // Runde das letzte Bit weg: // Bit 0 = 0 -> abrunden, // Bit 0 = 1 und Rest =0 -> round-to-even, // Bit 0 = 1 und Rest >0 -> aufrunden. // Dabei um ein Bit nach rechts schieben. // Bei Aufrundung auf 2^24 (rounding overflow) Mantisse um 1 Bit nach rechts // schieben und Exponent incrementieren. if (eq(x,0)) { return cl_FF_0; } var cl_signean sign = -(cl_signean)minusp(x); // Vorzeichen var cl_I abs_x = (sign==0 ? x : -x); var uintC exp = integer_length(abs_x); // (integer-length x) // NDS zu |x|>0 bilden: var const uintD* MSDptr; var uintC len; I_to_NDS_nocopy(abs_x, MSDptr=,len=,,false,); // MSDptr/len/LSDptr ist die NDS zu x, len>0. // Führende Digits holen: Brauche FF_mant_len+1 Bits, dazu intDsize // Bits (die NDS kann mit bis zu intDsize Nullbits anfangen). // Dann werden diese Bits um (exp mod intDsize) nach rechts geschoben. var uintD msd = msprefnext(MSDptr); // erstes Digit #if (intDsize==64) var uintD msdd = 0; // weiteres Digit if (--len == 0) goto ok; msdd = msprefnext(MSDptr); #else // (intDsize<=32) var uint32 msdd = 0; // weitere min(len-1,32/intDsize) Digits #define NEXT_DIGIT(i) \ { if (--len == 0) goto ok; \ msdd |= (uint32)msprefnext(MSDptr) << (32-(i+1)*intDsize); \ } DOCONSTTIMES(32/intDsize,NEXT_DIGIT); #undef NEXT_DIGIT #endif --len; ok: #if (intDsize==64) // Die NDS besteht aus msd, msdd, und len weiteren Digits. // Das höchste in 2^intDsize*msd+msdd gesetzte Bit ist Bit Nummer // intDsize-1 + (exp mod intDsize). var uintL shiftcount = exp % intDsize; var uint64 mant = // führende 64 Bits (shiftcount==0 ? msdd : ((msd << (64-shiftcount)) | (msdd >> shiftcount)) ); // Das höchste in mant gesetzte Bit ist Bit Nummer 63. if ( ((mant & bit(62-FF_mant_len)) ==0) // Bit 39 =0 -> abrunden || ( ((mant & (bit(62-FF_mant_len)-1)) ==0) // Bit 39 =1 und Bits 38..0 =0 && ((msdd & (bit(shiftcount)-1)) ==0) // und weitere Bits aus msdd =0 && (!test_loop_msp(MSDptr,len)) // und alle weiteren Digits =0 // round-to-even, je nach Bit 40 : && ((mant & bit(63-FF_mant_len)) ==0) ) ) // abrunden { mant = mant >> (63-FF_mant_len); } else // aufrunden { mant = mant >> (63-FF_mant_len); mant += 1; if (mant >= bit(FF_mant_len+1)) // rounding overflow? { mant = mant>>1; exp = exp+1; } } #else // Die NDS besteht aus msd, msdd, und len weiteren Digits. // Das höchste in 2^32*msd+msdd gesetzte Bit ist Bit Nummer // 31 + (exp mod intDsize). var uintL shiftcount = exp % intDsize; var uint32 mant = // führende 32 Bits (shiftcount==0 ? msdd : (((uint32)msd << (32-shiftcount)) | (msdd >> shiftcount)) ); // Das höchste in mant gesetzte Bit ist Bit Nummer 31. if ( ((mant & bit(30-FF_mant_len)) ==0) // Bit 7 =0 -> abrunden || ( ((mant & (bit(30-FF_mant_len)-1)) ==0) // Bit 7 =1 und Bits 6..0 =0 && ((msdd & (bit(shiftcount)-1)) ==0) // und weitere Bits aus msdd =0 && (!test_loop_msp(MSDptr,len)) // und alle weiteren Digits =0 // round-to-even, je nach Bit 8 : && ((mant & bit(31-FF_mant_len)) ==0) ) ) // abrunden { mant = mant >> (31-FF_mant_len); } else // aufrunden { mant = mant >> (31-FF_mant_len); mant += 1; if (mant >= bit(FF_mant_len+1)) // rounding overflow? { mant = mant>>1; exp = exp+1; } } #endif return encode_FF(sign,(sintE)exp,mant); } } // namespace cln cln-1.3.3/src/float/ffloat/elem/cl_FF_globals.cc0000644000000000000000000000152011201634737016236 0ustar // Global variables for cl_FF. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat_class.h" #include "float/ffloat/cl_FF.h" // Implementation. namespace cln { #if !defined(CL_WIDE_POINTERS) const cl_FF cl_FF_0 = cl_FF_0; // 0.0f0 const cl_FF cl_FF_1 = cl_FF_1; // 1.0f0 const cl_FF cl_FF_minus1 = cl_FF_minus1; // -1.0f0 int cl_FF_globals_init_helper::count = 0; cl_FF_globals_init_helper::cl_FF_globals_init_helper() { if (count++ == 0) { new ((void *)&cl_FF_0) cl_FF(allocate_ffloat(0)); // 0.0f0 new ((void *)&cl_FF_1) cl_FF(encode_FF(0,1,bit(FF_mant_len))); // 1.0f0 new ((void *)&cl_FF_minus1) cl_FF(encode_FF(-1,1,bit(FF_mant_len))); // -1.0f0 } } cl_FF_globals_init_helper::~cl_FF_globals_init_helper() { if (--count == 0) { // Nothing to clean up } } #endif } // namespace cln cln-1.3.3/src/float/ffloat/elem/cl_FF_plus.cc0000644000000000000000000001300111201634737015573 0ustar // binary operator + // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" #include "float/cl_F.h" #include "base/cl_xmacros.h" namespace cln { const cl_FF operator+ (const cl_FF& x1, const cl_FF& x2) { // Methode (nach [Knuth, II, Seminumerical Algorithms, Abschnitt 4.2.1., S.200]): // x1=0.0 -> Ergebnis x2. // x2=0.0 -> Ergebnis x1. // Falls e1= e2. // Falls e1 - e2 >= 23 + 3, Ergebnis x1. // Schiebe beide Mantissen um 3 Bits nach links (Vorbereitung der Rundung: // Bei e1-e2=0,1 ist keine Rundung nötig, bei e1-e2>1 ist der Exponent des // Ergebnisses =e1-1, =e1 oder =e1+1. Brauche daher 1 Schutzbit und zwei // Rundungsbits: 00 exakt, 01 1.Hälfte, 10 exakte Mitte, 11 2.Hälfte.) // Schiebe die Mantisse von x2 um e0-e1 Bits nach rechts. (Dabei die Rundung // ausführen: Bit 0 ist das logische Oder der Bits 0,-1,-2,...) // Falls x1,x2 selbes Vorzeichen haben: Addiere dieses zur Mantisse von x1. // Falls x1,x2 verschiedenes Vorzeichen haben: Subtrahiere dieses von der // Mantisse von x1. <0 -> (Es war e1=e2) Vertausche die Vorzeichen, negiere. // =0 -> Ergebnis 0.0 // Exponent ist e1. // Normalisiere, fertig. #ifdef FAST_FLOAT float_to_FF(FF_to_float(x1) + FF_to_float(x2), return , TRUE, TRUE, // Overflow und subnormale Zahl abfangen FALSE, // kein Underflow mit Ergebnis +/- 0.0 möglich // (nach Definition der subnormalen Zahlen) FALSE, FALSE // keine Singularität, kein NaN als Ergebnis möglich ); #else // x1,x2 entpacken: var cl_signean sign1; var sintL exp1; var uintL mant1; var cl_signean sign2; var sintL exp2; var uintL mant2; FF_decode(x1, { return x2; }, sign1=,exp1=,mant1=); FF_decode(x2, { return x1; }, sign2=,exp2=,mant2=); var cl_FF max_x1_x2 = x1; if (exp1 < exp2) { max_x1_x2 = x2; swap(cl_signean, sign1,sign2); swap(sintL, exp1 ,exp2 ); swap(uintL, mant1,mant2); } // Nun ist exp1>=exp2. var uintL expdiff = exp1 - exp2; // Exponentendifferenz if (expdiff >= FF_mant_len+3) // >= 23+3 ? { return max_x1_x2; } mant1 = mant1 << 3; mant2 = mant2 << 3; // Nun 2^(FF_mant_len+3) <= mant1,mant2 < 2^(FF_mant_len+4). {var uintL mant2_last = mant2 & (bit(expdiff)-1); // letzte expdiff Bits von mant2 mant2 = mant2 >> expdiff; if (!(mant2_last==0)) { mant2 |= bit(0); } } // mant2 = um expdiff Bits nach rechts geschobene und gerundete Mantisse // von x2. if (!(sign1==sign2)) // verschiedene Vorzeichen -> Mantissen subtrahieren { if (mant1 > mant2) { mant1 = mant1 - mant2; goto norm_2; } if (mant1 == mant2) // Ergebnis 0 ? { return cl_FF_0; } // negatives Subtraktionsergebnis mant1 = mant2 - mant1; sign1 = sign2; goto norm_2; } else // gleiche Vorzeichen -> Mantissen addieren { mant1 = mant1 + mant2; } // mant1 = Ergebnis-Mantisse >0, sign1 = Ergebnis-Vorzeichen, // exp1 = Ergebnis-Exponent. // Außerdem: Bei expdiff=0,1 sind die zwei letzten Bits von mant1 Null, // bei expdiff>=2 ist mant1 >= 2^(FF_mant_len+2). // Stets ist mant1 < 2^(FF_mant_len+5). (Daher werden die 2 Rundungsbits // nachher um höchstens eine Position nach links geschoben werden.) // [Knuth, S.201, leicht modifiziert: // N1. m>=1 -> goto N4. // N2. [Hier m<1] m>=1/2 -> goto N5. // N3. m:=2*m, e:=e-1, goto N2. // N4. [Hier 1<=m<2] m:=m/2, e:=e+1. // N5. [Hier 1/2<=m<1] Runde m auf 24 Bits hinterm Komma. // Falls hierdurch m=1 geworden, setze m:=m/2, e:=e+1. // ] // Bei uns ist m=mant1/2^(FF_mant_len+4), // ab Schritt N5 ist m=mant1/2^(FF_mant_len+1). norm_1: // [Knuth, S.201, Schritt N1] if (mant1 >= bit(FF_mant_len+4)) goto norm_4; norm_2: // [Knuth, S.201, Schritt N2] // Hier ist mant1 < 2^(FF_mant_len+4) if (mant1 >= bit(FF_mant_len+3)) goto norm_5; // [Knuth, S.201, Schritt N3] mant1 = mant1 << 1; exp1 = exp1-1; // Mantisse links schieben goto norm_2; norm_4: // [Knuth, S.201, Schritt N4] // Hier ist 2^(FF_mant_len+4) <= mant1 < 2^(FF_mant_len+5) exp1 = exp1+1; mant1 = (mant1>>1) | (mant1 & bit(0)); // Mantisse rechts schieben norm_5: // [Knuth, S.201, Schritt N5] // Hier ist 2^(FF_mant_len+3) <= mant1 < 2^(FF_mant_len+4) // Auf FF_mant_len echte Mantissenbits runden, d.h. rechte 3 Bits // wegrunden, und dabei mant1 um 3 Bits nach rechts schieben: {var uintL rounding_bits = mant1 & (bit(3)-1); mant1 = mant1 >> 3; if ( (rounding_bits < bit(2)) // 000,001,010,011 werden abgerundet || ( (rounding_bits == bit(2)) // 100 (genau halbzahlig) && ((mant1 & bit(0)) ==0) // -> round-to-even ) ) // abrunden {} else // aufrunden { mant1 = mant1+1; if (mant1 >= bit(FF_mant_len+1)) // Bei Überlauf während der Rundung nochmals rechts schieben // (Runden ist hier überflüssig): { mant1 = mant1>>1; exp1 = exp1+1; } // Mantisse rechts schieben } }// Runden fertig return encode_FF(sign1,exp1,mant1); #endif } } // namespace cln cln-1.3.3/src/float/ffloat/elem/cl_FF_scale_I.cc0000644000000000000000000000300111201634737016146 0ustar // scale_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" #include "float/cl_F.h" #include "integer/cl_I.h" namespace cln { const cl_FF scale_float (const cl_FF& x, const cl_I& delta) { // Methode: // x=0.0 -> x als Ergebnis // delta muß ein Fixnum betragsmäßig <= FF_exp_high-FF_exp_low sein. // Neues FF mit um delta vergrößertem Exponenten bilden. // x entpacken: var cl_signean sign; var sintL exp; var uint32 mant; FF_decode(x, { return x; }, sign=,exp=,mant=); if (!minusp(delta)) // delta>=0 { var uintV udelta; if (fixnump(delta) && ((udelta = FN_to_V(delta)) <= (uintV)(FF_exp_high-FF_exp_low)) ) { exp = exp+udelta; return encode_FF(sign,exp,mant); } else { throw floating_point_overflow_exception(); } } else // delta<0 { var uintV udelta; if (fixnump(delta) && ((udelta = -FN_to_V(delta)) <= (uintV)(FF_exp_high-FF_exp_low)) && ((cl_value_len+1 nein elif (zerop_inline(x)) return false; // x=0 -> nein else return true; // sonst ist x>0. } } // namespace cln cln-1.3.3/src/float/ffloat/input/0000755000000000000000000000000012173046177013476 5ustar cln-1.3.3/src/float/ffloat/input/cl_FF_from_string.cc0000644000000000000000000000102511201634737017361 0ustar // cl_FF (const char *) constructor. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat_class.h" // Implementation. #include "cln/ffloat.h" #include "cln/input.h" #include "cln/float_io.h" namespace cln { cl_read_flags cl_FF_read_flags = { syntax_ffloat, lsyntax_all, 10, { float_format_ffloat, float_format_lfloat_min, false } }; cl_FF::cl_FF (const char * string) { pointer = as_cl_private_thing( As(cl_FF)(read_float(cl_FF_read_flags,string,NULL,NULL))); } } // namespace cln cln-1.3.3/src/float/ffloat/division/0000755000000000000000000000000012173046177014163 5ustar cln-1.3.3/src/float/ffloat/division/cl_FF_round22.cc0000644000000000000000000000070011201634737017007 0ustar // round2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" namespace cln { const cl_FF_div_t round2 (const cl_FF& x, const cl_FF& y) { // Methode: // (q,r) := round(x/y). Liefere q und x-y*q = y*r. var cl_FF_div_t q_r = round2(x/y); var cl_I& q = q_r.quotient; var cl_FF& r = q_r.remainder; return cl_FF_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/float/ffloat/division/cl_FF_ceil22.cc0000644000000000000000000000071011201634737016575 0ustar // ceiling2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" namespace cln { const cl_FF_div_t ceiling2 (const cl_FF& x, const cl_FF& y) { // Methode: // (q,r) := ceiling(x/y). Liefere q und x-y*q = y*r. var cl_FF_div_t q_r = ceiling2(x/y); var cl_I& q = q_r.quotient; var cl_FF& r = q_r.remainder; return cl_FF_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/float/ffloat/division/cl_FF_fceil.cc0000644000000000000000000000062411201634737016603 0ustar // fceiling(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" #include "base/cl_inline.h" #include "float/ffloat/elem/cl_FF_minusp.cc" namespace cln { const cl_FF CL_FLATTEN fceiling (const cl_FF& x) { if (minusp_inline(x)) return ftruncate(x); else return futruncate(x); } } // namespace cln cln-1.3.3/src/float/ffloat/division/cl_FF_floor22.cc0000644000000000000000000000070011201634737017001 0ustar // floor2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" namespace cln { const cl_FF_div_t floor2 (const cl_FF& x, const cl_FF& y) { // Methode: // (q,r) := floor(x/y). Liefere q und x-y*q = y*r. var cl_FF_div_t q_r = floor2(x/y); var cl_I& q = q_r.quotient; var cl_FF& r = q_r.remainder; return cl_FF_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/float/ffloat/division/cl_FF_trunc22.cc0000644000000000000000000000071411201634737017020 0ustar // truncate2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" namespace cln { const cl_FF_div_t truncate2 (const cl_FF& x, const cl_FF& y) { // Methode: // (q,r) := truncate(x/y). Liefere q und x-y*q = y*r. var cl_FF_div_t q_r = truncate2(x/y); var cl_I& q = q_r.quotient; var cl_FF& r = q_r.remainder; return cl_FF_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/float/ffloat/division/cl_FF_recip.cc0000644000000000000000000000040211201634737016615 0ustar // recip(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/ffloat.h" // Implementation. #include "float/ffloat/cl_FF.h" namespace cln { const cl_FF recip (const cl_FF& x) { return cl_FF_1 / x; } } // namespace cln cln-1.3.3/src/float/lfloat/0000755000000000000000000000000012173046177012345 5ustar cln-1.3.3/src/float/lfloat/algebraic/0000755000000000000000000000000012173046177014256 5ustar cln-1.3.3/src/float/lfloat/algebraic/cl_LF_sqrt.cc0000644000000000000000000001224111201634737016611 0ustar // sqrt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "float/cl_F.h" #include "base/digitseq/cl_DS.h" #include "cln/exception.h" namespace cln { const cl_LF sqrt (const cl_LF& x) { // Methode: // x = 0.0 -> Ergebnis 0.0 // Ergebnis-Vorzeichen := positiv, // Ergebnis-Exponent := ceiling(e/2), // Ergebnis-Mantisse: // Erweitere die Mantisse (n Digits) um n+2 Nulldigits nach hinten. // Bei ungeradem e schiebe dies (oder nur die ersten n+1 Digits davon) // um 1 Bit nach rechts. // Bilde daraus die Ganzzahl-Wurzel, eine n+1-Digit-Zahl mit einer // fhrenden 1. // Runde das letzte Digit weg: // Bit 15 = 0 -> abrunden, // Bit 15 = 1, Rest =0 und Wurzel exakt -> round-to-even, // sonst aufrunden. // Bei rounding overflow Mantisse um 1 Bit nach rechts schieben // und Exponent incrementieren. var uintE uexp = TheLfloat(x)->expo; if (uexp==0) { return x; } // x=0.0 -> 0.0 als Ergebnis var uintC len = TheLfloat(x)->len; // Radikanden bilden: CL_ALLOCA_STACK; var uintD* r_MSDptr; var uintD* r_LSDptr; var uintC r_len = 2*len+2; // Länge des Radikanden num_stack_alloc(r_len, r_MSDptr=,r_LSDptr=); if ((uexp & bit(0)) == (LF_exp_mid & bit(0))) // Exponent gerade {var uintD* ptr = copy_loop_msp(arrayMSDptr(TheLfloat(x)->data,len),r_MSDptr,len); // n Digits kopieren clear_loop_msp(ptr,len+2); // n+2 Nulldigits anh�gen } else // Exponent ungerade {var uintD carry_rechts = // n Digits kopieren und um 1 Bit rechts shiften shiftrightcopy_loop_msp(arrayMSDptr(TheLfloat(x)->data,len),r_MSDptr,len,1,0); var uintD* ptr = r_MSDptr mspop len; msprefnext(ptr) = carry_rechts; // �ertrag und clear_loop_msp(ptr,len+1); // n+1 Nulldigits anh�gen } // Compute ((uexp - LF_exp_mid + 1) >> 1) + LF_exp_mid without risking // uintE overflow. uexp = ((uexp - ((LF_exp_mid - 1) & 1)) >> 1) - ((LF_exp_mid - 1) >> 1) + LF_exp_mid; // Ergebnis allozieren: var Lfloat y = allocate_lfloat(len,uexp,0); var uintD* y_mantMSDptr = arrayMSDptr(TheLfloat(y)->data,len); // Wurzel ziehen: #ifndef CL_LF_PEDANTIC if (len > 2900) // This is about 15% faster { // Kehrwert der Wurzel errechnen: var uintD* s_MSDptr; var uintD* s_LSDptr; num_stack_alloc(len+2, s_MSDptr=,s_LSDptr=); cl_UDS_recipsqrt(r_MSDptr,r_len, s_MSDptr,len); // Mit dem Radikanden multiplizieren: var uintD* p_MSDptr; var uintD* p_LSDptr; num_stack_alloc(2*len+3, p_MSDptr=,p_LSDptr=); cl_UDS_mul(r_MSDptr mspop (len+1),len+1,s_LSDptr,len+2,p_LSDptr); // Ablegen und runden: copy_loop_msp(p_MSDptr mspop 1,y_mantMSDptr,len); // NUDS nach y kopieren if (mspref(p_MSDptr,0) == 0) { if ( ((sintD)mspref(p_MSDptr,len+1) >= 0) // n�hstes Bit =0 -> abrunden || ( ((mspref(p_MSDptr,len+1) & ((uintD)bit(intDsize-1)-1)) ==0) // =1 und weitere Bits >0 -> aufrunden && !test_loop_msp(p_MSDptr mspop (len+2),len+1) // round-to-even (etwas witzlos, da eh alles ungenau ist) && ((mspref(p_MSDptr,len) & bit(0)) ==0) ) ) // abrunden {} else // aufrunden { if ( inc_loop_lsp(y_mantMSDptr mspop len,len) ) // �ertrag durchs Aufrunden { mspref(y_mantMSDptr,0) = bit(intDsize-1); // Mantisse := 10...0 (TheLfloat(y)->expo)++; // Exponenten incrementieren } } } else // �ertrag durch Rundungsfehler { if (test_loop_msp(y_mantMSDptr,len)) throw runtime_exception(); mspref(y_mantMSDptr,0) = bit(intDsize-1); // Mantisse := 10...0 (TheLfloat(y)->expo)++; // Exponenten incrementieren } return y; } #endif var DS w; var bool exactp; UDS_sqrt(r_MSDptr,r_len,r_LSDptr, &w, exactp=); // w ist die Ganzzahl-Wurzel, eine n+1-Digit-Zahl. copy_loop_msp(w.MSDptr,y_mantMSDptr,len); // NUDS nach y kopieren // Runden: if ( ((sintD)lspref(w.LSDptr,0) >= 0) // n�hstes Bit =0 -> abrunden || ( ((lspref(w.LSDptr,0) & ((uintD)bit(intDsize-1)-1)) ==0) // =1 und weitere Bits >0 oder Rest >0 -> aufrunden && exactp // round-to-even && ((lspref(w.LSDptr,1) & bit(0)) ==0) ) ) // abrunden {} else // aufrunden { if ( inc_loop_lsp(y_mantMSDptr mspop len,len) ) // �ertrag durchs Aufrunden { mspref(y_mantMSDptr,0) = bit(intDsize-1); // Mantisse := 10...0 (TheLfloat(y)->expo)++; // Exponenten incrementieren } } return y; } // Bit complexity (N := length(x)): O(M(N)). } // namespace cln cln-1.3.3/src/float/lfloat/cl_LF.h0000644000000000000000000001270211201634737013473 0ustar // cl_LF internals #ifndef _CL_LF_H #define _CL_LF_H #include "cln/number.h" #include "cln/lfloat_class.h" #include "cln/integer_class.h" namespace cln { struct cl_heap_lfloat : cl_heap { uintC len; // length of mantissa (in digits) int sign; // sign (0 or -1) uintE expo; // exponent uintD data[1]; // mantissa }; // Minimum number of mantissa digits, // so that a LF has not fewer mantissa bits than a DF. #define LF_minlen ceiling(53,intDsize) // Exponent. #if (intEsize==64) #define LF_exp_low 1 #define LF_exp_mid 0x8000000000000000ULL #define LF_exp_high 0xFFFFFFFFFFFFFFFFULL #else #define LF_exp_low 1 #define LF_exp_mid 0x80000000U #define LF_exp_high 0xFFFFFFFFU #endif inline cl_heap_lfloat* TheLfloat (cl_heap_lfloat* p) { return p; } inline cl_heap_lfloat* TheLfloat (const cl_number& obj) { return (cl_heap_lfloat*)(obj.pointer); } // Liefert zu einem Long-Float x : (futruncate x), ein LF. // x wird von der 0 weg zur nächsten ganzen Zahl gerundet. extern const cl_LF futruncate (const cl_LF& x); // shorten(x,len) verkürzt ein Long-Float x auf gegebene Länge len // und rundet dabei. // > cl_LF x: ein Long-FLoat // > uintC len: gewünschte Länge (>= LF_minlen, < TheLfloat(x)->len) // < cl_LF ergebnis: verkürztes Long-Float extern const cl_LF shorten (const cl_LF& x, uintC len); // extend(x,len) verlängert ein Long-Float x auf gegebene Länge len. // > cl_LF x: ein Long-FLoat // > uintC len: gewünschte Länge (> TheLfloat(x)->len) // < cl_LF ergebnis: verlängertes Long-Float extern const cl_LF extend (const cl_LF& x, uintC len); // LF_to_LF(x,len) wandelt ein Long-Float x in ein Long-Float gegebener Länge // len um und rundet dabei nötigenfalls. // > cl_LF x: ein Long-FLoat // > uintC len: gewünschte Länge (>= LF_minlen) // < cl_LF ergebnis: Long-Float gegebener Länge extern const cl_LF LF_to_LF (const cl_LF& x, uintC len); // GEN_LF_OP2(arg1,arg2,LF_OP,ergebnis_zuweisung) // generates the body of a LF operation with two arguments. // LF_OP is only executed once both arguments have been converted to the same // float format (the longer one of arg1 and arg2). The result is then // converted the shorter of the two float formats. #define GEN_LF_OP2(arg1,arg2,LF_OP,ergebnis_zuweisung) \ { \ var uintC len1 = TheLfloat(arg1)->len; \ var uintC len2 = TheLfloat(arg2)->len; \ if (len1==len2) /* gleich -> direkt ausführen */ \ return LF_OP(arg1,arg2); \ elif (len1>len2) /* -> arg2 auf die Länge von arg1 bringen */ \ return shorten(LF_OP(arg1,extend(arg2,len1)),len2); \ else /* (len1 arg1 auf die Länge von arg2 bringen */ \ return shorten(LF_OP(extend(arg1,len2),arg2),len1); \ } // Liefert zu zwei gleichlangen Long-Float x und y : (+ x y), ein LF. // LF_LF_plus_LF(x) extern const cl_LF LF_LF_plus_LF (const cl_LF& x, const cl_LF& y); // Liefert zu zwei gleichlangen Long-Float x und y : (- x y), ein LF. // LF_LF_minus_LF(x) extern const cl_LF LF_LF_minus_LF (const cl_LF& x, const cl_LF& y); // Use this macro if ALL of your cl_LF operations (+, -, *, /) in the // rest of your file ALWAYS get two operands of the same precision. #define ALL_cl_LF_OPERATIONS_SAME_PRECISION() \ \ inline const cl_LF operator+ (const cl_LF& x, const cl_LF& y) \ { \ return LF_LF_plus_LF(x,y); \ } \ \ inline const cl_LF operator- (const cl_LF& x, const cl_LF& y) \ { \ return LF_LF_minus_LF(x,y); \ } // LF_to_I(x) wandelt ein Long-Float x, das eine ganze Zahl darstellt, // in ein Integer um. extern const cl_I cl_LF_to_I (const cl_LF& x); // cl_I_to_LF(x,len) wandelt ein Integer x in ein Long-Float um und rundet dabei. extern const cl_LF cl_I_to_LF (const cl_I& x, uintC len); // cl_RA_to_LF(x,len) wandelt eine rationale Zahl x in ein Long-Float um // und rundet dabei. extern const cl_LF cl_RA_to_LF (const cl_RA& x, uintC len); // cl_LF_I_mul(x,y) multipliziert ein Long-Float x und ein Integer y. extern const cl_R cl_LF_I_mul (const cl_LF& x, const cl_I& y); // cl_LF_I_div(x,y) dividiert ein Long-Float x durch ein Integer y. extern const cl_LF cl_LF_I_div (const cl_LF& x, const cl_I& y); // cl_I_LF_div(x,y) dividiert ein Integer x durch ein Long-Float y. extern const cl_R cl_I_LF_div (const cl_I& x, const cl_LF& y); // cl_LF_RA_mul(x,y) multipliziert ein Long-Float x und eine rationale Zahl y. extern const cl_R cl_LF_RA_mul (const cl_LF& x, const cl_RA& y); // cl_LF_RA_div(x,y) dividiert ein Long-Float x durch eine rationale Zahl y. extern const cl_LF cl_LF_RA_div (const cl_LF& x, const cl_RA& y); // cl_RA_LF_div(x,y) dividiert eine rationale Zahl x durch ein Long-Float y. extern const cl_R cl_RA_LF_div (const cl_RA& x, const cl_LF& y); // Vergrößert eine Long-Float-Länge n, so daß aus d = intDsize*n // mindestens d+sqrt(d)+2 wird. extern uintC cl_LF_len_incsqrt (uintC len); // Vergrößert eine Long-Float-Länge n, so daß aus d = intDsize*n // mindestens d+sqrt(d)+2+(LF_exp_len-1) wird. extern uintC cl_LF_len_incsqrtx (uintC len); // cl_LF_shortenrelative(x,y) tries to reduce the size of x, such that one // wouldn't notice it when adding x to y. y must be /= 0. More precisely, // this returns a float approximation of x, such that 1 ulp(x) < 1 ulp(y). extern const cl_LF cl_LF_shortenrelative (const cl_LF& x, const cl_LF& y); // cl_LF_shortenwith(x,y) tries to reduce the size of x, such that still // 1 ulp(x) < y. y must be >0. extern const cl_LF cl_LF_shortenwith (const cl_LF& x, const cl_LF& y); } // namespace cln #endif /* _CL_LF_H */ cln-1.3.3/src/float/lfloat/misc/0000755000000000000000000000000012173046177013300 5ustar cln-1.3.3/src/float/lfloat/misc/cl_LF_min.cc0000644000000000000000000000036211201634737015426 0ustar // min(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. namespace cln { const cl_LF min (const cl_LF& x, const cl_LF& y) { return (x <= y ? x : y); } } // namespace cln cln-1.3.3/src/float/lfloat/misc/cl_LF_as.cc0000644000000000000000000000103411201634737015243 0ustar // cl_LF_As(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "base/cl_N.h" namespace cln { inline bool cl_LF_p (const cl_number& x) { if (x.pointer_p()) if (x.heappointer->type == &cl_class_lfloat) return true; return false; } const cl_LF& cl_LF_As (const cl_number& x, const char * filename, int line) { if (cl_LF_p(x)) { DeclareType(cl_LF,x); return x; } else throw as_exception(x,"a long-float number",filename,line); } } // namespace cln cln-1.3.3/src/float/lfloat/misc/cl_LF_shorten.cc0000644000000000000000000000326411201634737016331 0ustar // shorten(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/lfloat/cl_LF.h" // Implementation. #include "float/lfloat/cl_LF_impl.h" #include "base/digitseq/cl_DS.h" #include "float/cl_F.h" namespace cln { const cl_LF shorten (const cl_LF& x, uintC len) { // x = 0.0 braucht nicht abgefangen zu werden, da bei Mantisse 0 dann // sowieso abgerundet wird, die Mantisse also 0 bleibt. var Lfloat y = allocate_lfloat(len,TheLfloat(x)->expo,TheLfloat(x)->sign); // neues LF { var uintC oldlen = TheLfloat(x)->len; // alte Länge, > len // Mantisse von x nach y kopieren: copy_loop_msp(arrayMSDptr(TheLfloat(x)->data,oldlen),arrayMSDptr(TheLfloat(y)->data,len),len); // Entscheiden, ob auf- oder abrunden: var uintD* ptr = arrayMSDptr(TheLfloat(x)->data,oldlen) mspop len; if ( ((sintD)mspref(ptr,0) >= 0) // nächstes Bit eine 0 -> abrunden || ( ((mspref(ptr,0) & ((uintD)bit(intDsize-1)-1)) ==0) // eine 1 und alles weitere Nullen? && !test_loop_msp(ptr mspop 1,oldlen-len-1) // round-to-even && ((lspref(ptr,0) & bit(0)) ==0) ) ) // abrunden {} else // aufrunden { if ( inc_loop_lsp(arrayLSDptr(TheLfloat(y)->data,len),len) ) // Übertrag durch Aufrunden { mspref(arrayMSDptr(TheLfloat(y)->data,len),0) = bit(intDsize-1); // Mantisse := 10...0 // Exponent erhöhen: if (++(TheLfloat(y)->expo) == LF_exp_high+1) { throw floating_point_overflow_exception(); } } } } return y; } } // namespace cln cln-1.3.3/src/float/lfloat/misc/cl_LF_signum.cc0000644000000000000000000000107111201634737016143 0ustar // signum(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "base/cl_inline.h" #include "float/lfloat/elem/cl_LF_minusp.cc" #include "float/lfloat/elem/cl_LF_zerop.cc" namespace cln { CL_INLINE2 const cl_LF CL_INLINE2_DECL(signum) (const cl_LF& x) { if (zerop_inline(x)) { return x; } // x=0 -> 0.0 else // je nach Vorzeichen von x { return encode_LF1s(TheLfloat(x)->sign,TheLfloat(x)->len); } } } // namespace cln cln-1.3.3/src/float/lfloat/misc/cl_LF_class.cc0000644000000000000000000000051111201634737015744 0ustar // cl_class_lfloat. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. namespace cln { cl_class cl_class_lfloat = { NULL, // empty destructor cl_class_flags_subclass_complex | cl_class_flags_subclass_real | cl_class_flags_subclass_float }; } // namespace cln cln-1.3.3/src/float/lfloat/misc/cl_LF_shortenrel.cc0000644000000000000000000000250611201634737017032 0ustar // cl_LF_shortenrelative(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/lfloat/cl_LF.h" // Implementation. #include "cln/exception.h" #include "base/cl_inline2.h" #include "float/lfloat/misc/cl_LF_precision.cc" #include "base/cl_inline.h" #include "float/lfloat/misc/cl_LF_exponent.cc" namespace cln { const cl_LF cl_LF_shortenrelative (const cl_LF& x, const cl_LF& y) { // Methode: // x = 0.0 -> Precision egal, return x. // ex := float_exponent(x), ey := float_exponent(y). // dx := float_digits(x), dy := float_digits(y). // 1 ulp(x) = 2^(ex-dx), 1 ulp(y) = 2^(ey-dy). // Falls ex-dx < ey-dy, x von Precision dx auf dy-ey+ex verkürzen. var sintE ey = float_exponent_inline(y); var sintC dy = float_precision_inline(y); if (dy==0) // zerop(y) ? throw runtime_exception(); var sintE ex = float_exponent_inline(x); var sintC dx = float_precision_inline(x); if (dx==0) // zerop(x) ? return x; var sintE d = ex - ey; if (ex>=0 && ey<0 && d<0) // d overflow? return x; if (ex<0 && ey>=0 && d>=0) // d underflow? return LF_to_LF(x,LF_minlen); if (d >= dx - dy) return x; var uintC new_dx = dy + d; var uintC len = ceiling(new_dx,intDsize); if (len < LF_minlen) len = LF_minlen; if (intDsize*len < (uintC)dx) return shorten(x,len); else return x; } } // namespace cln cln-1.3.3/src/float/lfloat/misc/cl_LF_decode.cc0000644000000000000000000000133211201634737016064 0ustar // decode_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "integer/cl_I.h" namespace cln { const decoded_lfloat decode_float (const cl_LF& x) { // x entpacken: var cl_signean sign; var sintE exp; var uintC mantlen; var const uintD* mantMSDptr; LF_decode(x, { return decoded_lfloat(x, 0, encode_LF1(mantlen)); }, sign=,exp=,mantMSDptr=,mantlen=,); return decoded_lfloat( encode_LFu(0,0+LF_exp_mid,mantMSDptr,mantlen), // (-1)^0 * 2^0 * m erzeugen E_to_I(exp), // e als Fixnum encode_LF1s(sign,mantlen) // (-1)^s erzeugen ); } } // namespace cln cln-1.3.3/src/float/lfloat/misc/cl_LF_lenincx.cc0000644000000000000000000000241311201634737016302 0ustar // cl_LF_len_incsqrtx(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/lfloat/cl_LF.h" // Implementation. namespace cln { uintC cl_LF_len_incsqrtx (uintC n) { // Methode bei intDsize=16: // Allgemein: intDsize*n + sqrt(intDsize*n) + 2 + 31 < intDsize*(n+inc) // <==> sqrt(intDsize*n) + 33 < intDsize*inc // <==> sqrt(intDsize*n) < intDsize*inc - 33 // <==> intDsize*n < intDsize^2*inc^2 - 66*intDsize*inc + 1089 // <==> n <= intDsize*inc^2 - 66*inc + floor(1089/intDsize) return #define NMAX(k) (uintC)((intDsize*(k)-66)*(k)+floor(1089,intDsize)) #define FITS(n,k) ((intDsize*(k) > 33) && ((n) <= NMAX(k))) #define n_max (uintC)(bitm(intCsize)-1) #define TRYINC(inc) FITS(n_max,inc) || FITS(n,inc) ? RETINC(inc) : #define RETINC(inc) \ /* at this point we know n <= NMAX(inc) */ \ /* Check whether n + (inc) overflows. */ \ ((NMAX(inc) <= n_max-(inc)) || (n <= n_max-(inc)) ? n+(inc) : n_max) #define TEST(i) TRYINC(1UL<expo,TheLfloat(x)->sign); // neues LF { var uintC oldlen = TheLfloat(x)->len; // alte Länge, < len // Mantisse von x nach y kopieren: var uintD* ptr = copy_loop_msp(arrayMSDptr(TheLfloat(x)->data,oldlen),arrayMSDptr(TheLfloat(y)->data,len),oldlen); // und mit Null-Digits ergänzen: clear_loop_msp(ptr,len-oldlen); } return y; } } // namespace cln cln-1.3.3/src/float/lfloat/misc/cl_LF_max.cc0000644000000000000000000000036211201634737015430 0ustar // max(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. namespace cln { const cl_LF max (const cl_LF& x, const cl_LF& y) { return (x >= y ? x : y); } } // namespace cln cln-1.3.3/src/float/lfloat/misc/cl_LF_exponent.cc0000644000000000000000000000057111201634737016505 0ustar // float_exponent(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" namespace cln { CL_INLINE sintE CL_INLINE_DECL(float_exponent) (const cl_LF& x) { var uintE uexp = TheLfloat(x)->expo; if (uexp==0) { return 0; } return (sintE)(uexp - LF_exp_mid); } } // namespace cln cln-1.3.3/src/float/lfloat/misc/cl_LF_digits.cc0000644000000000000000000000047411201634737016132 0ustar // float_digits(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" namespace cln { CL_INLINE uintC CL_INLINE_DECL(float_digits) (const cl_LF& x) { return intDsize*(uintC)(TheLfloat(x)->len); } } // namespace cln cln-1.3.3/src/float/lfloat/misc/cl_LF_precision.cc0000644000000000000000000000065511201634737016643 0ustar // float_precision(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "base/cl_inline.h" #include "float/lfloat/elem/cl_LF_zerop.cc" namespace cln { CL_INLINE2 uintC CL_INLINE2_DECL(float_precision) (const cl_LF& x) { if (zerop_inline(x)) return 0; return intDsize*(uintC)(TheLfloat(x)->len); } } // namespace cln cln-1.3.3/src/float/lfloat/misc/cl_LF_leninc.cc0000644000000000000000000000264511201634737016121 0ustar // cl_LF_len_incsqrt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/lfloat/cl_LF.h" // Implementation. namespace cln { uintC cl_LF_len_incsqrt (uintC n) { // Methode bei intDsize=16: // n -> n+1 für n<=12 wegen 16n+sqrt(16n)+2 < 16(n+1) // n -> n+2 für n<=56 wegen 16n+sqrt(16n)+2 < 16(n+2) // n -> n+4 für n<=240 // n -> n+8 für n<=992 // n -> n+16 für n<=4032 // n -> n+32 für n<=16256 // n -> n+65 für n<=65535 // Allgemein: intDsize*n + sqrt(intDsize*n) + 2 < intDsize*(n+inc) // <==> sqrt(intDsize*n) + 2 < intDsize*inc // <==> sqrt(intDsize*n) < intDsize*inc - 2 // <==> intDsize*n < intDsize^2*inc^2 - 4*intDsize*inc + 4 // <==> n <= intDsize*inc^2 - 4*inc return #define NMAX(k) (uintC)((intDsize*(k)-4)*(k)) #define FITS(n,k) ((n) <= NMAX(k)) #define n_max (uintC)(bitm(intCsize)-1) #define TRYINC(inc) FITS(n_max,inc) || FITS(n,inc) ? RETINC(inc) : #define RETINC(inc) \ /* at this point we know n <= NMAX(inc) */ \ /* Check whether n + (inc) overflows. */ \ ((NMAX(inc) <= n_max-(inc)) || (n <= n_max-(inc)) ? n+(inc) : n_max) #define TEST(i) TRYINC(1UL< (- x), x>=0 -> x if (minusp_inline(x)) return -x; else return x; } } // namespace cln cln-1.3.3/src/float/lfloat/misc/cl_LF_to_LF.cc0000644000000000000000000000063411201634737015650 0ustar // LF_to_LF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/lfloat/cl_LF.h" // Implementation. namespace cln { const cl_LF LF_to_LF (const cl_LF& x, uintC len) { var uintC oldlen = TheLfloat(x)->len; if (len < oldlen) { return shorten(x,len); } if (len > oldlen) { return extend(x,len); } // len = oldlen return x; } } // namespace cln cln-1.3.3/src/float/lfloat/misc/cl_LF_shortenwith.cc0000644000000000000000000000226511201634737017225 0ustar // cl_LF_shortenwith(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/lfloat/cl_LF.h" // Implementation. #include "base/cl_inline2.h" #include "float/lfloat/misc/cl_LF_precision.cc" #include "base/cl_inline.h" #include "float/lfloat/misc/cl_LF_exponent.cc" namespace cln { const cl_LF cl_LF_shortenwith (const cl_LF& x, const cl_LF& y) { // Methode: // x = 0.0 -> Precision egal, return x. // ex := float_exponent(x), dx := float_digits(x), 1 ulp(x) = 2^(ex-dx). // ey := float_exponent(y). // Falls ex-dx < ey, x von Precision dx auf ex-ey verkürzen. var sintE ey = float_exponent_inline(y); var sintE ex = float_exponent_inline(x); var uintC dx = float_precision_inline(x); if (dx==0) // zerop(x) ? return x; var sintE ulpx = ex - dx; if ((ex<0 && ulpx>=0) // underflow? || (ulpx < ey) ) { // Now ex-dx < ey, hence ex-ey < dx. var uintL new_dx; if (ex < ey) new_dx = intDsize*LF_minlen; else if ((new_dx = ex - ey) < intDsize*LF_minlen) new_dx = intDsize*LF_minlen; var uintL len = ceiling(new_dx,intDsize); if (intDsize*len < dx) return shorten(x,len); else return x; } else return x; } } // namespace cln cln-1.3.3/src/float/lfloat/misc/cl_LF_sign.cc0000644000000000000000000000076411201634737015611 0ustar // float_sign(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "base/cl_inline.h" #include "float/lfloat/elem/cl_LF_minusp.cc" namespace cln { CL_INLINE2 const cl_LF CL_INLINE2_DECL(float_sign) (const cl_LF& x) { // Methode: x>=0 -> Ergebnis 1.0; x<0 -> Ergebnis -1.0 return encode_LF1s(TheLfloat(x)->sign,TheLfloat(x)->len); } } // namespace cln cln-1.3.3/src/float/lfloat/misc/cl_LF_eqhashcode.cc0000644000000000000000000000117311201634737016750 0ustar // cl_LF equal_hashcode(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "base/cl_N.h" #include "float/lfloat/cl_LF_impl.h" #include "base/digitseq/cl_DS.h" namespace cln { CL_INLINE uint32 CL_INLINE_DECL(equal_hashcode) (const cl_LF& x) { var cl_signean sign; var sintL exp; var const uintD* MSDptr; LF_decode(x, { return 0; }, sign=,exp=,MSDptr=,,); #if (intDsize==64) var uint32 msd = mspref(MSDptr,0) >> 32; #else // (intDsize<=32) var uint32 msd = get_32_Dptr(MSDptr); #endif return equal_hashcode_low(msd,exp,sign); } } // namespace cln cln-1.3.3/src/float/lfloat/misc/cl_LF_debug.cc0000644000000000000000000000105411201634737015730 0ustar // cl_LF debugging support. // General includes. #include "base/cl_sysdep.h" // Specification. // Implementation. #include "cln/lfloat.h" #include "cln/io.h" #include "cln/float_io.h" namespace cln { static void dprint (cl_heap* pointer) { var const cl_LF& obj = *(const cl_LF*)&pointer; fprint(cl_debugout, "(cl_LF) "); fprint(cl_debugout, obj); } AT_INITIALIZATION(dprint_LF) { cl_register_type_printer(cl_class_lfloat,dprint); } // This dummy links in this module when requires it. int cl_LF_debug_module; } // namespace cln cln-1.3.3/src/float/lfloat/misc/cl_LF_idecode.cc0000644000000000000000000000217211201634737016240 0ustar // integer_decode_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" namespace cln { CL_INLINE const cl_idecoded_float CL_INLINE_DECL(integer_decode_float) (const cl_LF& x) { // x entpacken: var uintE uexp = TheLfloat(x)->expo; if (uexp == 0) { return cl_idecoded_float(0, 0, 1); } var cl_signean sign = TheLfloat(x)->sign; var uintC len = TheLfloat(x)->len; // intDsize*len >= 53 >= 33 >= cl_value_len, also len >= bn_minlength. // Baue Integer für die Mantisse. // Vorne 1 Nulldigit, damit es eine NDS wird. var Bignum mant = allocate_bignum(1+len); mspref(arrayMSDptr(TheBignum(mant)->data,1+len),0) = 0; copy_loop_msp(arrayMSDptr(TheLfloat(x)->data,len),arrayMSDptr(TheBignum(mant)->data,1+len) mspop 1,len); // NUDS kopieren return cl_idecoded_float( // Mantisse mant, // e-intDsize*n = uexp-LF_exp_mid-intDsize*n als Integer minus(uexp, LF_exp_mid + intDsize*len), (sign>=0 ? cl_I(1) : cl_I(-1)) // (-1)^s erzeugen ); } } // namespace cln cln-1.3.3/src/float/lfloat/elem/0000755000000000000000000000000012173046177013267 5ustar cln-1.3.3/src/float/lfloat/elem/cl_LF_uminus.cc0000644000000000000000000000132111201634737016146 0ustar // unary operator - // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_LF operator- (const cl_LF& x) { // Methode: // Falls x=0.0, fertig. Sonst Vorzeichenbit umdrehen und Pointer beibehalten. if (TheLfloat(x)->expo == 0) { return x; } else { var uintC len = TheLfloat(x)->len; var Lfloat mx = allocate_lfloat(len, TheLfloat(x)->expo, ~ TheLfloat(x)->sign); copy_loop_up(&TheLfloat(x)->data[0],&TheLfloat(mx)->data[0],len); return mx; } } } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_scale_I.cc0000644000000000000000000000374211550527470016200 0ustar // scale_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "float/cl_F.h" #include "integer/cl_I.h" namespace cln { const cl_LF scale_float (const cl_LF& x, const cl_I& delta) { // Methode: // delta=0 -> x als Ergebnis // x=0.0 -> x als Ergebnis // delta muß ein Integer betragsmäßig <= LF_exp_high-LF_exp_low sein. // Neues LF mit um delta vergrößertem Exponenten bilden. if (eq(delta,0)) { return x; } // delta=0 -> x als Ergebnis var uintE uexp = TheLfloat(x)->expo; if (uexp==0) { return x; } var uintE udelta; // |delta| muß <= LF_exp_high-LF_exp_low < 2^intEsize sein. if (fixnump(delta)) { // Fixnum var sintV sdelta = FN_to_V(delta); if (sdelta >= 0) { udelta = sdelta; goto pos; } else { udelta = sdelta; goto neg; } } else { // Bignum var cl_heap_bignum* bn = TheBignum(delta); if ((sintD)mspref(arrayMSDptr(bn->data,bn->length),0) >= 0) { // delta >= 0 try { udelta = cl_I_to_UE(delta); goto pos; } catch (const runtime_exception&) { goto overflow; } } else { // delta < 0 try { udelta = cl_I_to_E(delta); goto neg; } catch (const runtime_exception&) { goto underflow; } } } pos: // udelta = delta >=0 if ( ((uexp = uexp+udelta) < udelta) // Exponent-Überlauf? || (uexp > LF_exp_high) // oder Exponent zu groß? ) overflow: { throw floating_point_overflow_exception(); } goto ok; neg: // delta <0, udelta = 2^intEsize+delta if ( ((uexp = uexp+udelta) >= udelta) // oder Exponent-Unterlauf? || (uexp < LF_exp_low) // oder Exponent zu klein? ) underflow: { throw floating_point_underflow_exception(); } goto ok; ok: var uintC len = TheLfloat(x)->len; return encode_LFu(TheLfloat(x)->sign,uexp,arrayMSDptr(TheLfloat(x)->data,len),len); } } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_to_I.cc0000644000000000000000000000252411201634737015526 0ustar // cl_LF_to_I(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/lfloat/cl_LF.h" // Implementation. #include "cln/integer.h" #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "base/cl_inline.h" #include "float/lfloat/elem/cl_LF_minusp.cc" namespace cln { const cl_I cl_LF_to_I (const cl_LF& x) { // Methode: // Falls x=0.0, Ergebnis 0. // Sonst (ASH Vorzeichen*Mantisse (e-16n)). var uintE uexp = TheLfloat(x)->expo; if (uexp==0) { return 0; } // x=0.0 -> Ergebnis 0 // Mantisse zu einem Integer machen: CL_ALLOCA_STACK; var uintD* MSDptr; var uintD* LSDptr; var uintC len = TheLfloat(x)->len; var uintC len1 = len+1; // brauche 1 Digit mehr num_stack_alloc(len1, MSDptr=,LSDptr=); copy_loop_msp(arrayMSDptr(TheLfloat(x)->data,len),MSDptr mspop 1,len); // Mantisse kopieren mspref(MSDptr,0) = 0; // und zusätzliches Nulldigit // Mantisse ist die UDS MSDptr/len1/LSDptr. if (minusp_inline(x)) // x<0 -> Mantisse negieren: { neg_loop_lsp(LSDptr,len1); } // Vorzeichen*Mantisse ist die DS MSDptr/len1/LSDptr. // (ASH Vorzeichen*Mantisse (- e 16n)) durchführen: return ash(DS_to_I(MSDptr,len1), minus(uexp, LF_exp_mid + intDsize*len) ); } } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_from_RA.cc0000644000000000000000000001365411201634737016167 0ustar // cl_RA_to_LF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/lfloat/cl_LF.h" // Implementation. #include "float/lfloat/cl_LF_impl.h" #include "rational/cl_RA.h" #include "cln/integer.h" #include "integer/cl_I.h" #include "float/cl_F.h" namespace cln { const cl_LF cl_RA_to_LF (const cl_RA& x, uintC len) { // Methode: // x ganz -> klar. // x = +/- a/b mit Integers a,b>0: // Sei k,m so gewählt, daß // 2^(k-1) <= a < 2^k, 2^(m-1) <= b < 2^m. // Dann ist 2^(k-m-1) < a/b < 2^(k-m+1). // Ergebnis-Vorzeichen := Vorzeichen von x. // Berechne k=(integer-length a) und m=(integer-length b). // Ergebnis-Exponent := k-m. // Ergebnis-Mantisse: // Berechne floor(2^(-k+m+16n+1)*a/b) : // Bei k-m>=16n+1 dividiere a durch (ash b (k-m-16n-1)), // bei k-m<16n+1 dividiere (ash a (-k+m+16n+1)) durch b. // Der erste Wert ist >=2^16n, <2^(16n+2). // Falls er >=2^(16n+1) ist, erhöhe Exponent um 1, // runde 2 Bits weg und schiebe dabei um 2 Bits nach rechts; // falls er <2^(16n+1) ist, // runde 1 Bit weg und schiebe dabei um 1 Bit nach rechts. // NB: Wenn a und b länger sind als len, ist dieser Algorithmus weniger // effizient, als cl_float(a,len)/cl_float(b,len) zu berechnen. Aber // es ist wichtig, dass cl_RA_to_LF nicht mehr als 0.5 ulp Fehler hat, // deswegen belassen wir es beim ineffizienten aber exakten Algorithmus. // Wenn es auf Rundungsfehler nicht ankommt, muss der Aufrufer im Fall // ceiling(integer_length(a),intDsize) >= len // && ceiling(integer_length(b),intDsize) >= len // einen anderen Algorithmus wählen. if (integerp(x)) { DeclareType(cl_I,x); return cl_I_to_LF(x,len); } { // x Ratio DeclareType(cl_RT,x); var cl_I a = numerator(x); // +/- a var const cl_I& b = denominator(x); // b var cl_signean sign = -(cl_signean)minusp(a); // Vorzeichen if (!(sign==0)) { a = -a; } // Betrag nehmen, liefert a var sintC lendiff = (sintC)integer_length(a) // (integer-length a) - (sintC)integer_length(b); // (integer-length b) // |lendiff| < intDsize*2^intCsize. Da für LF-Exponenten ein sintL zur // Verfügung steht, braucht man keinen Test auf Overflow oder Underflow. var uintC difflimit = intDsize*len + 1; // 16n+1 var cl_I zaehler; var cl_I nenner; if (lendiff > (sintC)difflimit) // 0 <= k-m-16n-1 < k < intDsize*2^intCsize { nenner = ash(b,(uintC)(lendiff - difflimit)); zaehler = a; } else // 0 < -k+m+16n+1 <= m+1 + 16n < intDsize*2^intCsize + intDsize*2^intCsize { zaehler = ash(a,(uintC)(difflimit - lendiff)); // (ash a -k+m+16n+1) nenner = b; // b } // Division zaehler/nenner durchführen: var cl_I_div_t q_r = cl_divide(zaehler,nenner); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; // 2^16n <= q < 2^(16n+2), also ist q Bignum mit n+1 Digits. var Lfloat y = allocate_lfloat(len,lendiff+LF_exp_mid,sign); // neues Long-Float var uintD* y_mantMSDptr = arrayMSDptr(TheLfloat(y)->data,len); {var uintD* q_MSDptr = arrayMSDptr(TheBignum(q)->data,len+1); if (mspref(q_MSDptr,0) == 1) // erstes Digit =1 oder =2,3 ? // 2^16n <= q < 2^(16n+1), also 2^(k-m-1) < a/b < 2^(k-m). { // Mantisse mit einer Schiebeschleife um 1 Bit nach rechts füllen: var uintD rounding_bit = shiftrightcopy_loop_msp(q_MSDptr mspop 1,y_mantMSDptr,len,1,1); if ( (rounding_bit == 0) // herausgeschobenes Bit =0 -> abrunden || ( eq(r,0) // =1 und Rest r > 0 -> aufrunden // round-to-even && ((mspref(y_mantMSDptr,len-1) & bit(0)) ==0) ) ) goto ab; // abrunden else goto auf; // aufrunden } else // 2^(16n+1) <= q < 2^(16n+2), also 2^(k-m) < a/b < 2^(k-m+1). { // Mantisse mit einer Schiebeschleife um 2 Bit nach rechts füllen: var uintD rounding_bits = shiftrightcopy_loop_msp(q_MSDptr mspop 1,y_mantMSDptr,len,2,mspref(q_MSDptr,0)); (TheLfloat(y)->expo)++; // Exponenten incrementieren auf k-m+1 if ( ((sintD)rounding_bits >= 0) // herausgeschobenes Bit =0 -> abrunden || ( ((rounding_bits & bit(intDsize-2)) ==0) // =1 und nächstes Bit =1 oder Rest r > 0 -> aufrunden && eq(r,0) // round-to-even && ((mspref(y_mantMSDptr,len-1) & bit(0)) ==0) ) ) goto ab; // abrunden else goto auf; // aufrunden } } auf: // aufrunden { if ( inc_loop_lsp(y_mantMSDptr mspop len,len) ) // Übertrag durchs Aufrunden { mspref(y_mantMSDptr,0) = bit(intDsize-1); // Mantisse := 10...0 (TheLfloat(y)->expo)++; // Exponenten incrementieren } } ab: // abrunden return y; }} // Timings on an i486 33 MHz, running Linux, in 0.01 sec. // First timing: cl_I_to_LF(numerator,len)/cl_I_to_LF(denominator,len) // Second timing: cl_RA_to_LF(x,len) // with len = 100. // num_length 50 70 100 200 500 // den_length // // 50 1.86 0.97 1.84 0.97 1.85 0.96 1.86 1.86 1.85 7.14 // // 70 1.86 1.33 1.85 1.31 1.85 1.32 1.84 1.84 1.85 7.13 // // 100 1.85 1.85 1.86 1.85 1.85 1.84 1.84 1.84 1.86 7.13 // // 200 1.85 3.61 1.84 3.61 1.85 3.59 1.85 3.59 1.87 7.12 // // 500 1.84 7.44 1.84 7.55 1.85 7.56 1.84 7.66 1.86 7.63 // // We see that cl_RA_to_LF is faster only if // num_length < 2*len && den_length < len // whereas cl_I_to_LF(numerator,len)/cl_I_to_LF(denominator,len) is faster if // num_length > 2*len || den_length > len } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_mul.cc0000644000000000000000000001076111201634737015433 0ustar // binary operator * // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "base/digitseq/cl_DS.h" #include "float/cl_F.h" namespace cln { const cl_LF operator* (const cl_LF& x1, const cl_LF& x2) { // Methode: // Falls x1=0.0 oder x2=0.0 -> Ergebnis 0.0 // Sonst: Ergebnis-Vorzeichen = VZ von x1 xor VZ von x2. // Ergebnis-Exponent = Summe der Exponenten von x1 und x2. // Produkt der Mantissen bilden (2n Digits). // Falls das fhrende Bit =0 ist: Mantissenprodukt um 1 Bit nach links // schieben (die vorderen n+1 Digits gengen) // und Exponent decrementieren. // Runden auf n Digits liefert die Ergebnis-Mantisse. var uintC len1 = TheLfloat(x1)->len; var uintC len2 = TheLfloat(x2)->len; var uintC len = (len1 < len2 ? len1 : len2); // min. L�ge n von x1 und x2 var uintE uexp1 = TheLfloat(x1)->expo; if (uexp1==0) // x1=0.0 -> Ergebnis 0.0 { if (len < len1) return shorten(x1,len); else return x1; } var uintE uexp2 = TheLfloat(x2)->expo; if (uexp2==0) // x2=0.0 -> Ergebnis 0.0 { if (len < len2) return shorten(x2,len); else return x2; } // Exponenten addieren: // (uexp1-LF_exp_mid) + (uexp2-LF_exp_mid) = (uexp1+uexp2-LF_exp_mid)-LF_exp_mid uexp1 = uexp1 + uexp2; if (uexp1 >= uexp2) // kein Carry { if (uexp1 < LF_exp_mid+LF_exp_low) { if (underflow_allowed()) { throw floating_point_underflow_exception(); } else { return encode_LF0(len); } // Ergebnis 0.0 } } else // Carry { if (uexp1 > (uintE)(LF_exp_mid+LF_exp_high+1)) { throw floating_point_overflow_exception(); } } uexp1 = uexp1 - LF_exp_mid; // Nun ist LF_exp_low <= uexp1 <= LF_exp_high+1. // neues Long-Float allozieren: var Lfloat y = allocate_lfloat(len,uexp1, TheLfloat(x1)->sign ^ TheLfloat(x2)->sign // Vorzeichen kombinieren ); // Produkt bilden: var const uintD* x1_LSDptr = arrayLSDptr(TheLfloat(x1)->data,len1); var const uintD* x2_LSDptr = arrayLSDptr(TheLfloat(x2)->data,len2); #ifndef CL_LF_PEDANTIC if (len1 > len2) { x1_LSDptr = x1_LSDptr lspop (len1-(len2+1)); len1 = len2+1; } else if (len1 < len2) { x2_LSDptr = x2_LSDptr lspop (len2-(len1+1)); len2 = len1+1; } #endif var uintD* MSDptr; CL_ALLOCA_STACK; UDS_UDS_mul_UDS(len1,x1_LSDptr, len2,x2_LSDptr, MSDptr=,,); {var uintD* midptr = MSDptr mspop len; // Pointer in die Mitte der len1+len2 Digits if ((sintD)mspref(MSDptr,0) >= 0) // fhrendes Bit abtesten { // erste n+1 Digits um 1 Bit nach links schieben: shift1left_loop_lsp(midptr mspop 1,len+1); // Exponenten decrementieren: if (--(TheLfloat(y)->expo) == LF_exp_low-1) { if (underflow_allowed()) { throw floating_point_underflow_exception(); } else { return encode_LF0(len); } // Ergebnis 0.0 } } // erste H�fte des Mantissenprodukts bertragen: {var uintD* y_mantMSDptr = arrayMSDptr(TheLfloat(y)->data,len); var uintD* y_mantLSDptr = copy_loop_msp(MSDptr,y_mantMSDptr,len); // Runden: if ( ((sintD)mspref(midptr,0) >= 0) // n�hstes Bit =0 -> abrunden || ( ((mspref(midptr,0) & ((uintD)bit(intDsize-1)-1)) ==0) // Bit =1, weitere Bits >0 -> aufrunden && !test_loop_msp(midptr mspop 1,len1+len2-len-1) // round-to-even && ((lspref(midptr,0) & bit(0)) ==0) ) ) // abrunden {} else // aufrunden { if ( inc_loop_lsp(y_mantLSDptr,len) ) { // �ertrag durchs Aufrunden (kann nur auftreten, // wenn vorhin um 1 Bit nach links geschoben wurde) mspref(y_mantMSDptr,0) = bit(intDsize-1); // Mantisse := 10...0 (TheLfloat(y)->expo)++; // Exponent wieder zurck-erhhen } } // LF_exp_low <= exp <= LF_exp_high sicherstellen: if (TheLfloat(y)->expo == LF_exp_high+1) { throw floating_point_overflow_exception(); } }} return y; } // Bit complexity (N = max(length(x1),length(x2))): O(M(N)). } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_2plus.cc0000644000000000000000000000046311201634737015701 0ustar // binary operator + // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" namespace cln { const cl_LF operator+ (const cl_LF& x1, const cl_LF& x2) { GEN_LF_OP2(x1,x2,LF_LF_plus_LF,return) } } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_minusp.cc0000644000000000000000000000043711201634737016150 0ustar // minusp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" namespace cln { CL_INLINE bool CL_INLINE_DECL(minusp) (const cl_LF& x) { return -TheLfloat(x)->sign; } } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_globals.cc0000644000000000000000000000120311201634737016250 0ustar // Global variables for cl_LF. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/number.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" namespace cln { // Only needed for the default constructor of cl_LF. const cl_LF cl_LF_0 = cl_LF_0; // 0.0L0 int cl_LF_globals_init_helper::count = 0; cl_LF_globals_init_helper::cl_LF_globals_init_helper() { if (count++ == 0) new ((void *)&cl_LF_0) cl_LF(encode_LF0(LF_minlen)); // 0.0L0 } cl_LF_globals_init_helper::~cl_LF_globals_init_helper() { if (--count == 0) { // Nothing to clean up } } } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_ffloor.cc0000644000000000000000000000064111201634737016121 0ustar // ffloor(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "base/cl_inline.h" #include "float/lfloat/elem/cl_LF_minusp.cc" namespace cln { CL_INLINE2 const cl_LF CL_INLINE2_DECL(ffloor) (const cl_LF& x) { if (minusp_inline(x)) return futruncate(x); else return ftruncate(x); } } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_I_LF_div.cc0000644000000000000000000000160611201634737015666 0ustar // cl_I_LF_div(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/lfloat/cl_LF.h" // Implementation. #include "cln/lfloat.h" #include "float/lfloat/cl_LF_impl.h" #include "cln/integer.h" #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "float/cl_F.h" #include "base/cl_N.h" namespace cln { const cl_R cl_I_LF_div (const cl_I& x, const cl_LF& y) { // Method: // If x=0, return 0. // Else convert x to a float and divide. // (If x is shorter than y, we would gain nothing by dividing the absolute // value of x by the mantissa of y, since the numerator of the division would // have to have 2*length(y)+1 words, even if length(x) is much smaller than // length(y).) if (eq(x,0)) { return 0; } var uintC len = TheLfloat(y)->len; return cl_I_to_LF(x,len) / y; } // Bit complexity (N = max(length(x),length(y))): O(M(N)). } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_fround.cc0000644000000000000000000001421411201634737016130 0ustar // fround(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_LF fround (const cl_LF& x) { // Methode: // x = 0.0 oder e<0 -> Ergebnis 0.0 // 0<=e<16n -> letzte (16n-e) Bits der Mantisse wegrunden, // Exponent und Vorzeichen beibehalten. // e>=16n -> Ergebnis x #if 0 var cl_signean sign; var sintE exp; var const uintD* mantMSDptr; var uintC mantlen; LF_decode(x, { return x; }, sign=,exp=,mantMSDptr=,mantlen=,); if (exp<0) { return encode_LF0(mantlen); } // e<0 -> Ergebnis 0.0 if ((uintE)exp >= intDsize*mantlen) // e>=16n -> x als Ergebnis { return x; } else // 0 <= e < 16n { // alle hinteren 16n-e Bits wegrunden: var uintC count = floor((uintE)exp,intDsize); // zu kopierende Digits, < mantlen var uintC bitcount = ((uintE)exp) % intDsize; // zu kopierende Bits danach, >=0, abrunden if (!((mspref(mantptr,0) & ~mask) ==0)) goto auf; // Bit 16n-e-1 =1 und Bits 16n-e-2..0 >0 -> aufrunden if (test_loop_msp(mantptr mspop 1,mantlen-count-1)) goto auf; // round-to-even, je nach Bit 16n-e : if (bitcount>0) { if ((mspref(mantptr,0) & (-2*mask)) ==0) goto ab; else goto auf; } elif (count>0) { if ((lspref(mantptr,0) & bit(0)) ==0) goto ab; else goto auf; } else // bitcount=0, count=0, also exp=0: Abrunden von +-0.5 zu 0.0 { return encode_LF0(mantlen); } ab: // abrunden { CL_ALLOCA_STACK; var uintD* MSDptr; num_stack_alloc(mantlen, MSDptr=,); {var uintD* ptr = copy_loop_msp(mantMSDptr,MSDptr,count); // count ganze Digits kopieren msprefnext(ptr) = mspref(mantptr,0) & mask; // dann bitcount Bits kopieren clear_loop_msp(ptr,mantlen-count-1); // Rest mit Nullen füllen return encode_LF(sign,exp,MSDptr,mantlen); }} auf: // aufrunden { CL_ALLOCA_STACK; var uintD* MSDptr; num_stack_alloc(mantlen, MSDptr=,); {var uintD* ptr = copy_loop_msp(mantMSDptr,MSDptr,count); // count ganze Digits kopieren if ((mspref(ptr,0) = ((mspref(mantptr,0) & mask) - mask)) == 0) // dann bitcount Bits kopieren und incrementieren { if (!( inc_loop_lsp(ptr,count) ==0)) // evtl. weiterincrementieren { mspref(MSDptr,0) = bit(intDsize-1); exp = exp+1; } // evtl. Exponenten erhöhen } clear_loop_msp(ptr mspop 1,mantlen-count-1); // Rest mit Nullen füllen return encode_LF(sign,exp,MSDptr,mantlen); }} } #else var uintC len = TheLfloat(x)->len; var uintE uexp = TheLfloat(x)->expo; if (uexp < LF_exp_mid) { if (uexp == 0) { return x; } // x=0.0 -> Ergebnis 0.0 return encode_LF0(len); // e<0 -> Ergebnis 0.0 } var uintE exp = uexp - LF_exp_mid; if (exp >= intDsize*len) // e>=16n -> x als Ergebnis { return x; } // 0 <= e < 16n // alle hinteren 16n-e Bits wegrunden: var uintC count = floor(exp,intDsize); // zu kopierende Digits, < mantlen var uintC bitcount = exp % intDsize; // zu kopierende Bits danach, >=0, abrunden #else // Work around gcc-2.7.x bug on i386/ELF if ((mspref(mantptr,0) & ((~mask)+1)) ==0) goto ab; // Bit 16n-e-1 =0 -> abrunden #endif if (!((mspref(mantptr,0) & ~mask) ==0)) goto auf; // Bit 16n-e-1 =1 und Bits 16n-e-2..0 >0 -> aufrunden if (test_loop_msp(mantptr mspop 1,len-count-1)) goto auf; // round-to-even, je nach Bit 16n-e : if (bitcount>0) { if ((mspref(mantptr,0) & (-2*mask)) ==0) goto ab; else goto auf; } elif (count>0) { if ((lspref(mantptr,0) & bit(0)) ==0) goto ab; else goto auf; } else // bitcount=0, count=0, also exp=0: Abrunden von +-0.5 zu 0.0 { return encode_LF0(len); } } ab: // abrunden {var Lfloat y = allocate_lfloat(len,uexp,TheLfloat(x)->sign); // neues Long-Float // y_mant := NUDS mit e Bits aus x_mant und 16n-e Nullbits: {var const uintD* x_mantMSDptr = LF_MSDptr(x); var uintD* ptr = copy_loop_msp(x_mantMSDptr,arrayMSDptr(TheLfloat(y)->data,len),count); // count ganze Digits kopieren msprefnext(ptr) = mspref(x_mantMSDptr,count) & mask; // dann bitcount Bits kopieren clear_loop_msp(ptr,len-count-1); // Rest mit Nullen füllen } return y; } auf: // aufrunden {var Lfloat y = allocate_lfloat(len,uexp,TheLfloat(x)->sign); // neues Long-Float // y_mant := NUDS mit e Bits aus x_mant mit Increment und 16n-e Nullbits: {var const uintD* x_mantMSDptr = LF_MSDptr(x); var uintD* y_mantMSDptr = arrayMSDptr(TheLfloat(y)->data,len); var uintD* ptr = copy_loop_msp(x_mantMSDptr,y_mantMSDptr,count); // count ganze Digits kopieren if ((mspref(ptr,0) = ((mspref(x_mantMSDptr,count) & mask) - mask)) == 0) // dann bitcount Bits kopieren und incrementieren { if (!( inc_loop_lsp(ptr,count) ==0)) // evtl. weiterincrementieren { mspref(y_mantMSDptr,0) = bit(intDsize-1); (TheLfloat(y)->expo)++; } // evtl. Exponenten erhöhen } clear_loop_msp(ptr mspop 1,len-count-1); // Rest mit Nullen füllen } return y; } #endif } } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_RA_mul.cc0000644000000000000000000000270711201634737016016 0ustar // cl_LF_RA_mul(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/lfloat/cl_LF.h" // Implementation. #include "cln/lfloat.h" #include "rational/cl_RA.h" namespace cln { const cl_R cl_LF_RA_mul (const cl_LF& x, const cl_RA& y) { // Method: // Write y = u/v. Return (x*u)/v. if (integerp(y)) { DeclareType(cl_I,y); return cl_LF_I_mul(x,y); } else { DeclareType(cl_RT,y); var const cl_I& u = TheRatio(y)->numerator; // u /= 0 var const cl_I& v = TheRatio(y)->denominator; // v /= 0 return cl_LF_I_div(The(cl_LF)(cl_LF_I_mul(x,u)),v); } } // Timings on an i486 33 MHz, running Linux, in 0.01 sec. // First timing: (x*u)/v, using cl_LF_I_mul and cl_LF_I_div // Second timing: x*(u/v), using cl_RA_to_LF and operator* // with x_length = 100. // num_length 50 70 100 200 500 // den_length // // 50 1.59 1.92 1.76 1.92 1.89 1.92 1.90 2.78 1.93 8.07 // // 70 1.93 2.26 2.14 2.25 2.25 2.25 2.27 2.78 2.25 8.07 // // 100 2.44 2.77 2.65 2.77 2.79 2.80 2.80 2.81 2.80 8.05 // // 200 2.46 4.53 2.65 4.54 2.78 4.55 2.79 4.55 2.77 8.05 // // 500 2.45 8.38 2.65 8.50 2.76 8.49 2.79 8.52 2.81 8.55 // // We see that the first approach is always better than the second, except if // den_length = x_length && x_length <= num_length <= 2*x_length // when both are equally fast. } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_RA_div.cc0000644000000000000000000000120111201634737015767 0ustar // cl_LF_RA_div(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/lfloat/cl_LF.h" // Implementation. #include "cln/lfloat.h" #include "cln/rational.h" #include "rational/cl_RA.h" namespace cln { const cl_LF cl_LF_RA_div (const cl_LF& x, const cl_RA& y) { // Method: // Write y = u/v. Return (x*v)/u. if (integerp(y)) { DeclareType(cl_I,y); return cl_LF_I_div(x,y); } else { DeclareType(cl_RT,y); var const cl_I& u = TheRatio(y)->numerator; // u /= 0 var const cl_I& v = TheRatio(y)->denominator; // v /= 0 return cl_LF_I_div(The(cl_LF)(cl_LF_I_mul(x,v)),u); } } } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_from_I.cc0000644000000000000000000001201211201634737016040 0ustar // cl_I_to_LF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/lfloat/cl_LF.h" // Implementation. #include "float/lfloat/cl_LF_impl.h" #include "cln/integer.h" #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "float/cl_F.h" namespace cln { const cl_LF cl_I_to_LF (const cl_I& x, uintC len) { // Methode: // x=0 -> Ergebnis 0.0 // Merke Vorzeichen von x. // x:=(abs x) // Exponent:=(integer-length x) // Mantisse enthalte die höchstwertigen 16n Bits des Integers x (wobei die // führenden 16-(e mod 16) Nullbits zu streichen sind). // Runde die weiteren Bits weg: // Kommen keine mehr -> abrunden, // nächstes Bit = 0 -> abrunden, // nächstes Bit = 1 und Rest =0 -> round-to-even, // nächstes Bit = 1 und Rest >0 -> aufrunden. // Bei Aufrundung: rounding overflow -> Mantisse um 1 Bit nach rechts schieben // und Exponent incrementieren. if (eq(x,0)) { return encode_LF0(len); } // x=0 -> Ergebnis 0.0 var cl_signean sign = -(cl_signean)minusp(x); // Vorzeichen von x var cl_I abs_x = (sign==0 ? x : -x); var uintC exp = integer_length(abs_x); // (integer-length x) < intDsize*2^intCsize // Teste, ob exp <= LF_exp_high-LF_exp_mid : if ( (log2_intDsize+intCsize < 32) && ((uintE)(intDsize*bitc(intCsize)-1) <= (uintE)(LF_exp_high-LF_exp_mid)) ) {} // garantiert exp <= intDsize*2^intCsize-1 <= LF_exp_high-LF_exp_mid else { if (!(exp <= (uintE)(LF_exp_high-LF_exp_mid))) { throw floating_point_overflow_exception(); } } // Long-Float bauen: var Lfloat y = allocate_lfloat(len,exp+LF_exp_mid,sign); var uintD* y_mantMSDptr = arrayMSDptr(TheLfloat(y)->data,len); var const uintD* x_MSDptr; var uintC x_len; I_to_NDS_nocopy(abs_x, x_MSDptr=,x_len=,,false,); // NDS zu x bilden, x_len>0 // x_MSDptr/x_len/.. um (exp mod 16) Bits nach rechts shiften und in // y einfüllen (genauer: nur maximal len Digits davon): {var uintL shiftcount = exp % intDsize; // Die NDS fängt mit intDsize-shiftcount Nullbits an, dann kommt eine 1. if (x_len > len) { x_len -= 1+len; if (shiftcount>0) { var uintD carry_rechts = shiftrightcopy_loop_msp(x_MSDptr mspop 1,y_mantMSDptr,len,shiftcount,mspref(x_MSDptr,0)); // Mantisse ist gefüllt. Runden: if ( ((sintD)carry_rechts >= 0) // nächstes Bit =0 -> abrunden || ( ((carry_rechts & ((uintD)bit(intDsize-1)-1)) ==0) // =1, Rest >0 -> aufrunden && !test_loop_msp(x_MSDptr mspop 1 mspop len,x_len) // round-to-even && ((mspref(y_mantMSDptr,len-1) & bit(0)) ==0) ) ) goto ab; // aufrunden else goto auf; // aufrunden } else { copy_loop_msp(x_MSDptr mspop 1,y_mantMSDptr,len); // Mantisse ist gefüllt. Runden: var const uintD* ptr = x_MSDptr mspop 1 mspop len; if ( (x_len==0) // keine Bits mehr -> abrunden || ((sintD)mspref(ptr,0) >= 0) // nächstes Bit =0 -> abrunden || ( ((mspref(ptr,0) & ((uintD)bit(intDsize-1)-1)) ==0) // =1, Rest >0 -> aufrunden && !test_loop_msp(ptr mspop 1,x_len-1) // round-to-even && ((lspref(ptr,0) & bit(0)) ==0) ) ) goto ab; // aufrunden else goto auf; // aufrunden } auf: // aufrunden if ( inc_loop_lsp(y_mantMSDptr mspop len,len) ) // Übertrag durchs Aufrunden { mspref(y_mantMSDptr,0) = bit(intDsize-1); // Mantisse := 10...0 // Exponenten incrementieren: if ( (log2_intDsize+intCsize < 32) && ((uintE)(intDsize*bitc(intCsize)-1) < (uintE)(LF_exp_high-LF_exp_mid)) ) // garantiert exp < intDsize*2^intCsize-1 <= LF_exp_high-LF_exp_mid { (TheLfloat(y)->expo)++; } // jetzt exp <= LF_exp_high-LF_exp_mid else { if (++(TheLfloat(y)->expo) == LF_exp_high+1) { throw floating_point_overflow_exception(); } } } ab: // abrunden ; } else // x_len <= len { var uintD carry_rechts; len -= x_len; x_len -= 1; if (shiftcount>0) { carry_rechts = shiftrightcopy_loop_msp(x_MSDptr mspop 1,y_mantMSDptr,x_len,shiftcount,mspref(x_MSDptr,0)); } else { copy_loop_msp(x_MSDptr mspop 1,y_mantMSDptr,x_len); carry_rechts = 0; } {var uintD* y_ptr = y_mantMSDptr mspop x_len; msprefnext(y_ptr) = carry_rechts; // Carry als nächstes Digit clear_loop_msp(y_ptr,len); // dann len-x_len Nulldigits }} } return y; } } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_2minus.cc0000644000000000000000000000046411201634737016052 0ustar // binary operator - // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" namespace cln { const cl_LF operator- (const cl_LF& x1, const cl_LF& x2) { GEN_LF_OP2(x1,x2,LF_LF_minus_LF,return) } } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_ftrunc.cc0000644000000000000000000000531011201634737016131 0ustar // ftruncate(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_LF ftruncate (const cl_LF& x) { // Methode: // x = 0.0 oder e<=0 -> Ergebnis 0.0 // 1<=e<=16n -> letzte (16n-e) Bits der Mantisse auf 0 setzen, // Exponent und Vorzeichen beibehalten // e>=16n -> Ergebnis x #if 0 var cl_signean sign; var sintE exp; var const uintD* mantMSDptr; var uintC mantlen; LF_decode(x, { return x; }, sign=,exp=,mantMSDptr=,mantlen=,); if (exp<=0) { return encode_LF0(mantlen); } // e<=0 -> Ergebnis 0.0 if ((uintE)exp >= intDsize*mantlen) // e>=16n -> x als Ergebnis { return x; } else // 0 < e < 16n // neue NUDS erzeugen mit e Bits aus mant und 16n-e Nullbits: { CL_ALLOCA_STACK; var uintD* MSDptr; num_stack_alloc(mantlen, MSDptr=,); { var uintC count = floor((uintE)exp,intDsize); // zu kopierende Digits, < mantlen var uintC bitcount = ((uintE)exp) % intDsize; // zu kopierende Bits danach, >=0, len; var uintE uexp = TheLfloat(x)->expo; if (uexp <= LF_exp_mid) { if (uexp == 0) { return x; } // x=0.0 -> Ergebnis 0.0 return encode_LF0(len); // e<=0 -> Ergebnis 0.0 } var uintE exp = uexp - LF_exp_mid; if (exp >= intDsize*len) // e>=16n -> x als Ergebnis { return x; } // 0 < e < 16n var Lfloat y = allocate_lfloat(len,uexp,TheLfloat(x)->sign); // neues Long-Float // y_mant := NUDS mit e Bits aus x_mant und 16n-e Nullbits: {var uintC count = floor(exp,intDsize); // zu kopierende Digits, < mantlen var uintC bitcount = exp % intDsize; // zu kopierende Bits danach, >=0, data,len),count); // count ganze Digits kopieren msprefnext(ptr) = mspref(x_mantMSDptr,count) & minus_bitm(intDsize-bitcount); // dann bitcount Bits kopieren clear_loop_msp(ptr,len-count-1); // Rest mit Nullen füllen } return y; #endif } } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_1minus.cc0000644000000000000000000000127611201634737016053 0ustar // LF_LF_minus_LF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/lfloat/cl_LF.h" // Implementation. #include "float/lfloat/cl_LF_impl.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_LF LF_LF_minus_LF (const cl_LF& x1, const cl_LF& x2) { // Methode: // (- x1 x2) = (+ x1 (- x2)) if (TheLfloat(x2)->expo == 0) { return x1; } else { var uintC len2 = TheLfloat(x2)->len; var Lfloat mx2 = allocate_lfloat(len2, TheLfloat(x2)->expo, ~ TheLfloat(x2)->sign); copy_loop_up(&TheLfloat(x2)->data[0],&TheLfloat(mx2)->data[0],len2); return LF_LF_plus_LF(x1,mx2); } } } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_RA_LF_div.cc0000644000000000000000000000356311201634737016004 0ustar // cl_RA_LF_div(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/lfloat/cl_LF.h" // Implementation. #include "cln/lfloat.h" #include "rational/cl_RA.h" namespace cln { const cl_R cl_RA_LF_div (const cl_RA& x, const cl_LF& y) { // Method: // Write x = u/v. Return u/(v*y). if (integerp(x)) { DeclareType(cl_I,x); return cl_I_LF_div(x,y); } else { DeclareType(cl_RT,x); var const cl_I& u = TheRatio(x)->numerator; var const cl_I& v = TheRatio(x)->denominator; // v /= 0 return cl_I_LF_div(u,The(cl_LF)(cl_LF_I_mul(y,v))); } } // Timings on an i486 33 MHz, running Linux. // First timing: u/(v*y), using cl_LF_I_mul and cl_LF_I_div // Second timing: (u/v)/y, using cl_RA_to_LF and operator/ // With x_length = 100, in 0.01 sec. // num_length 50 70 100 200 500 // den_length // // 50 0.82 0.98 1.38 1.61 2.48 2.80 8.37 9.05 46.92 48.59 // // 70 0.81 1.16 1.43 1.85 2.65 3.18 8.64 9.76 47.53 50.34 // // 100 0.82 1.43 1.44 2.24 2.79 3.69 8.98 10.77 48.42 52.81 // // 200 0.80 2.31 1.43 3.44 2.78 5.43 9.93 14.31 51.08 61.57 // // 500 0.82 4.62 1.44 6.21 2.76 9.40 9.97 22.66 55.52 87.71 // // With x_length = 1000, in sec. // num_length 500 700 1000 2000 5000 // den_length // // 500 0.55 0.88 0.96 1.39 1.60 2.24 4.35 5.60 10.83 14.18 // // 700 0.55 0.95 0.98 1.57 1.65 2.58 4.47 6.34 10.61 15.88 // // 1000 0.56 1.00 0.98 1.67 1.69 2.70 4.61 7.13 10.65 16.29 // // 2000 0.56 1.25 0.98 1.97 1.69 3.05 4.88 7.74 10.75 17.03 // // 5000 0.55 1.94 0.98 2.30 1.70 3.33 4.90 7.74 11.94 19.29 // // We see that the first approach is always better than the second. } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_futrunc.cc0000644000000000000000000001042211201634737016316 0ustar // futruncate(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/lfloat/cl_LF.h" // Implementation. #include "float/lfloat/cl_LF_impl.h" #include "base/digitseq/cl_DS.h" namespace cln { const cl_LF futruncate (const cl_LF& x) { // Methode: // x = 0.0 -> Ergebnis 0.0 // e<=0 -> Ergebnis 1.0 oder -1.0, je nach Vorzeichen von x. // 1<=e<16n -> Greife die letzten (16n-e) Bits von x heraus. // Sind sie alle =0 -> Ergebnis x. // Sonst setze sie alle auf 0 und erhöhe dann die vorderen e Bits // um 1. // Kein Überlauf -> fertig. // Sonst (Ergebnis eine Zweierpotenz): Mantisse := .1000...000, // e:=e+1. (Test auf Überlauf wegen e<=16n überflüssig) // e>=16n -> Ergebnis x. #if 0 var cl_signean sign; var sintE exp; var const uintD* mantMSDptr; var uintC mantlen; LF_decode(x, { return x; }, sign=,exp=,mantMSDptr=,mantlen=,); if (exp<=0) { return encode_LF1s(sign,mantlen); } // e<=0 -> Ergebnis +-1.0 if ((uintE)exp >= intDsize*mantlen) // e>=16n -> x als Ergebnis { return x; } else // 0 < e < 16n { // Testen, ob alle hinteren 16n-e Bits =0 sind: var uintC count = floor((uintE)exp,intDsize); // zu kopierende Digits, < mantlen var uintC bitcount = ((uintE)exp) % intDsize; // zu kopierende Bits danach, >=0, len; var uintE uexp = TheLfloat(x)->expo; if (uexp <= LF_exp_mid) { if (uexp == 0) { return x; } // x=0.0 -> Ergebnis 0.0 return encode_LF1s(TheLfloat(x)->sign,len); // e<=0 -> Ergebnis +-1.0 } var uintE exp = uexp - LF_exp_mid; if (exp >= intDsize*len) // e>=16n -> x als Ergebnis { return x; } // 0 < e < 16n // Testen, ob alle hinteren 16n-e Bits =0 sind: var uintC count = floor(exp,intDsize); // zu kopierende Digits, < mantlen var uintC bitcount = exp % intDsize; // zu kopierende Bits danach, >=0, neues Long-Float produzieren: var Lfloat y = allocate_lfloat(len,uexp,TheLfloat(x)->sign); // neues Long-Float // y_mant := NUDS mit e Bits aus x_mant mit Increment und 16n-e Nullbits: {var const uintD* x_mantMSDptr = LF_MSDptr(x); var uintD* y_mantMSDptr = arrayMSDptr(TheLfloat(y)->data,len); var uintD* ptr = copy_loop_msp(x_mantMSDptr,y_mantMSDptr,count); // count ganze Digits kopieren if ((mspref(ptr,0) = ((mspref(x_mantMSDptr,count) & mask) - mask)) == 0) // dann bitcount Bits kopieren und incrementieren { if (!( inc_loop_lsp(ptr,count) ==0)) // evtl. weiterincrementieren { mspref(y_mantMSDptr,0) = bit(intDsize-1); (TheLfloat(y)->expo)++; } // evtl. Exponenten erhöhen } clear_loop_msp(ptr mspop 1,len-count-1); // Rest mit Nullen füllen } return y; #endif } } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_scale.cc0000644000000000000000000000247111201634737015724 0ustar // scale_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "float/cl_F.h" namespace cln { const cl_LF scale_float (const cl_LF& x, sintC delta) { // Methode: // delta=0 -> x als Ergebnis // x=0.0 -> x als Ergebnis // delta muß ein Integer betragsmäßig <= LF_exp_high-LF_exp_low sein. // Neues LF mit um delta vergrößertem Exponenten bilden. if (delta == 0) { return x; } // delta=0 -> x als Ergebnis var uintE uexp = TheLfloat(x)->expo; if (uexp==0) { return x; } var uintE udelta = delta; if (delta >= 0) { // udelta = delta >=0 if ( ((uexp = uexp+udelta) < udelta) // Exponent-Überlauf? || (uexp > LF_exp_high) // oder Exponent zu groß? ) { throw floating_point_overflow_exception(); } } else { // delta <0, udelta = 2^intEsize+delta if ( ((uintE)(-(uexp = uexp+udelta)) <= (uintE)(-udelta)) // oder Exponent-Unterlauf? || (uexp < LF_exp_low) // oder Exponent zu klein? ) { throw floating_point_underflow_exception(); } } var uintC len = TheLfloat(x)->len; return encode_LFu(TheLfloat(x)->sign,uexp,arrayMSDptr(TheLfloat(x)->data,len),len); } } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_div.cc0000644000000000000000000001425111201634737015416 0ustar // binary operator / // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "base/digitseq/cl_DS.h" #include "float/cl_F.h" #include "base/cl_N.h" namespace cln { const cl_LF operator/ (const cl_LF& x1, const cl_LF& x2) { // Methode: // x2 = 0.0 -> Error // x1 = 0.0 -> Ergebnis 0.0 // Sonst: // Ergebnis-Vorzeichen = xor der beiden Vorzeichen von x1 und x2 // Ergebnis-Exponent = Differenz der beiden Exponenten von x1 und x2 // Ergebnis-Mantisse = Mantisse mant1 / Mantisse mant2, gerundet. // mant1/mant2 > 1/2, mant1/mant2 < 2; // nach Rundung mant1/mant2 >=1/2, <=2*mant1<2. // Bei mant1/mant2 >=1 brauche 16n-1 Nachkommabits, // bei mant1/mant2 <1 brauche 16n Nachkommabits. // Fürs Runden: brauche ein Rundungsbit (Rest gibt an, ob exakt). // Brauche daher insgesamt 16n+1 Nachkommabits von mant1/mant2. // Dividiere daher (als Unsigned Integers) // 2^16(n+1)*(2^16n*m0) durch (2^16n*m1). // Falls der Quotient >=2^16(n+1) ist, schiebe ihn um 1 Bit nach rechts, // erhöhe den Exponenten um 1 und runde das letzte Digit weg. // Falls der Quotient <2^16(n+1) ist, runde das letzte Digit weg. Bei rounding // overflow schiebe um 1 Bit nach rechts und erhöhe den Exponenten um 1. var uintC len1 = TheLfloat(x1)->len; var uintC len2 = TheLfloat(x2)->len; var uintC len = (len1 < len2 ? len1 : len2); // min. Länge n von x1 und x2 var uintE uexp2 = TheLfloat(x2)->expo; if (uexp2==0) { throw division_by_0_exception(); } // x2=0.0 -> Error var uintE uexp1 = TheLfloat(x1)->expo; if (uexp1==0) // x1=0.0 -> Ergebnis 0.0 { if (len < len1) return shorten(x1,len); else return x1; } // Exponenten subtrahieren: // (uexp1-LF_exp_mid) - (uexp2-LF_exp_mid) = (uexp1-uexp2+LF_exp_mid)-LF_exp_mid if (uexp1 >= uexp2) { uexp1 = uexp1 - uexp2; // kein Carry if (uexp1 > LF_exp_high-LF_exp_mid) { throw floating_point_overflow_exception(); } uexp1 = uexp1 + LF_exp_mid; } else { uexp1 = uexp1 - uexp2; // Carry if (uexp1 < (uintE)(LF_exp_low-1-LF_exp_mid)) { if (underflow_allowed()) { throw floating_point_underflow_exception(); } else { return encode_LF0(len); } // Ergebnis 0.0 } uexp1 = uexp1 + LF_exp_mid; } // Nun ist LF_exp_low-1 <= uexp1 <= LF_exp_high. // neues Long-Float allozieren: var Lfloat y = allocate_lfloat(len,uexp1, TheLfloat(x1)->sign ^ TheLfloat(x2)->sign // Vorzeichen kombinieren ); // Nenner bilden: var uintC n_len; n_len = len2; #ifndef CL_LF_PEDANTIC if (n_len > len) { n_len = len+1; } #endif // Zähler bilden: CL_ALLOCA_STACK; var uintD* z_MSDptr; var uintC z_len; var uintD* z_LSDptr; z_len = n_len + len + 1; num_stack_alloc(z_len, z_MSDptr=,z_LSDptr=); if (z_len > len1) { var uintD* ptr = copy_loop_msp(arrayMSDptr(TheLfloat(x1)->data,len1),z_MSDptr,len1); // n Digits kopieren clear_loop_msp(ptr,z_len-len1); // und n+1 Null-Digits } else { copy_loop_msp(arrayMSDptr(TheLfloat(x1)->data,len1),z_MSDptr,z_len); } // Quotienten bilden: 2n+1-Digit-Zahl durch n-Digit-Zahl dividieren {var DS q; var DS r; {var uintD* x2_mantMSDptr = arrayMSDptr(TheLfloat(x2)->data,len2); UDS_divide(z_MSDptr,z_len,z_LSDptr, x2_mantMSDptr,n_len,x2_mantMSDptr mspop n_len, &q, &r ); } // q ist der Quotient mit n+1 oder n+2 Digits, r der Rest. if (q.len > len+1) // Quotient hat n+2 Digits -> um 1 Bit nach rechts schieben: { var uintD* y_mantMSDptr = arrayMSDptr(TheLfloat(y)->data,len); var uintD carry_rechts = shiftrightcopy_loop_msp(q.MSDptr mspop 1,y_mantMSDptr,len,1, /* carry links = mspref(q.MSDptr,0) = 1 */ 1 ); // Exponenten incrementieren: if (++(TheLfloat(y)->expo) == LF_exp_high+1) { throw floating_point_overflow_exception(); } // Runden: if ( (carry_rechts == 0) // herausgeschobenes Bit =0 -> abrunden || ( (lspref(q.LSDptr,0)==0) // =1 und weitere Bits >0 oder Rest >0 -> aufrunden && (r.len==0) // round-to-even && ((lspref(q.LSDptr,1) & bit(1)) ==0) ) ) // abrunden {} else // aufrunden { inc_loop_lsp(y_mantMSDptr mspop len,len); } } else // Quotient hat n+1 Digits -> nur kopieren: { var uintD* y_mantMSDptr = arrayMSDptr(TheLfloat(y)->data,len); copy_loop_msp(q.MSDptr,y_mantMSDptr,len); // Runden: if ( ((sintD)lspref(q.LSDptr,0) >= 0) // nächstes Bit =0 -> abrunden || ( ((lspref(q.LSDptr,0) & ((uintD)bit(intDsize-1)-1)) ==0) // =1 und weitere Bits >0 oder Rest >0 -> aufrunden && (r.len==0) // round-to-even && ((lspref(q.LSDptr,1) & bit(0)) ==0) ) ) // abrunden {} else // aufrunden { if ( inc_loop_lsp(y_mantMSDptr mspop len,len) ) // Übertrag durchs Aufrunden { mspref(y_mantMSDptr,0) = bit(intDsize-1); // Mantisse := 10...0 // Exponenten incrementieren: if (++(TheLfloat(y)->expo) == LF_exp_high+1) { throw floating_point_overflow_exception(); } } } } } // LF_exp_low <= exp <= LF_exp_high sicherstellen: if (TheLfloat(y)->expo == LF_exp_low-1) { if (underflow_allowed()) { throw floating_point_underflow_exception(); } else { return encode_LF0(len); } // Ergebnis 0.0 } return y; } // Bit complexity (N := max(length(x1),length(x2))): O(M(N)). } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_compare.cc0000644000000000000000000001030511201634737016256 0ustar // compare(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "base/digitseq/cl_DS.h" #include "base/cl_inline.h" #include "float/lfloat/elem/cl_LF_minusp.cc" namespace cln { cl_signean compare (const cl_LF& x, const cl_LF& y) { // Methode: // x und y haben verschiedenes Vorzeichen -> // x < 0 -> x < y // x >= 0 -> x > y // x und y haben gleiches Vorzeichen -> // x >=0 -> vergleiche x und y (die rechten 24 Bits) // x <0 -> vergleiche y und x (die rechten 24 Bits) if (!minusp_inline(y)) // y>=0 { if (!minusp_inline(x)) // y>=0, x>=0 { // Vergleiche Exponenten und Mantissen: { var uintE x_uexp = TheLfloat(x)->expo; var uintE y_uexp = TheLfloat(y)->expo; if (x_uexp < y_uexp) return signean_minus; // x y_uexp) return signean_plus; // x>y } { var uintC x_len = TheLfloat(x)->len; var uintC y_len = TheLfloat(y)->len; var uintC len = (x_lendata,x_len),arrayMSDptr(TheLfloat(y)->data,y_len),len); if (!(erg==0)) { return erg; } // verschieden -> fertig // gemeinsames Teilstück war gleich if (x_len == y_len) { return signean_null; } // gleiche Länge -> fertig if (x_len > y_len) // x länger als y { if (DS_test_loop(arrayMSDptr(TheLfloat(x)->data,x_len) mspop y_len,x_len-y_len,arrayLSDptr(TheLfloat(x)->data,x_len))) { return signean_plus; } // x>y else { return signean_null; } } else // y länger als x { if (DS_test_loop(arrayMSDptr(TheLfloat(y)->data,y_len) mspop x_len,y_len-x_len,arrayLSDptr(TheLfloat(y)->data,y_len))) { return signean_minus; } // x=0, x<0 { return signean_minus; } // x=0 { return signean_plus; } // x>y else // y<0, x<0 { // Vergleiche Exponenten und Mantissen: { var uintE x_uexp = TheLfloat(x)->expo; var uintE y_uexp = TheLfloat(y)->expo; if (x_uexp < y_uexp) return signean_plus; // |x|<|y| -> x>y if (x_uexp > y_uexp) return signean_minus; // |x|>|y| -> xlen; var uintC y_len = TheLfloat(y)->len; var uintC len = (x_lendata,y_len),arrayMSDptr(TheLfloat(x)->data,x_len),len); if (!(erg==0)) { return erg; } // verschieden -> fertig // gemeinsames Teilstück war gleich if (x_len == y_len) { return signean_null; } // gleiche Länge -> fertig if (x_len > y_len) // x länger als y { if (DS_test_loop(arrayMSDptr(TheLfloat(x)->data,x_len) mspop y_len,x_len-y_len,arrayLSDptr(TheLfloat(x)->data,x_len))) { return signean_minus; } // |x|>|y| -> xdata,y_len) mspop x_len,y_len-x_len,arrayLSDptr(TheLfloat(y)->data,y_len))) { return signean_plus; } // |x|<|y| -> x>y else { return signean_null; } } } } } } } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_plus1.cc0000644000000000000000000000050711201634737015677 0ustar // plus1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" namespace cln { ALL_cl_LF_OPERATIONS_SAME_PRECISION() const cl_LF plus1 (const cl_LF& x) { return x + cl_I_to_LF(cl_I(1),TheLfloat(x)->len); } } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_plusp.cc0000644000000000000000000000106111201634737015772 0ustar // plusp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "base/cl_inline.h" #include "float/lfloat/elem/cl_LF_minusp.cc" #include "float/lfloat/elem/cl_LF_zerop.cc" namespace cln { CL_INLINE2 bool CL_INLINE2_DECL(plusp) (const cl_LF& x) { if (minusp_inline(x)) return false; // x<0 -> nein elif (zerop_inline(x)) return false; // x=0 -> nein else return true; // sonst ist x>0. } } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_minus1.cc0000644000000000000000000000051211201634737016043 0ustar // minus1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" namespace cln { ALL_cl_LF_OPERATIONS_SAME_PRECISION() const cl_LF minus1 (const cl_LF& x) { return x + cl_I_to_LF(cl_I(-1),TheLfloat(x)->len); } } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_I_div.cc0000644000000000000000000000702411201634737015666 0ustar // cl_LF_I_div(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/lfloat/cl_LF.h" // Implementation. #include "cln/lfloat.h" #include "float/lfloat/cl_LF_impl.h" #include "cln/integer.h" #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "float/cl_F.h" #include "base/cl_N.h" namespace cln { const cl_LF cl_LF_I_div (const cl_LF& x, const cl_I& y) { // Method: // If x = 0.0, return x. // If y is longer than x, convert y to a float and divide. // Else divide the mantissa of x by the absolute value of y, then round. if (TheLfloat(x)->expo == 0) { if (zerop(y)) throw division_by_0_exception(); else return x; } var cl_signean sign = -(cl_signean)minusp(y); // Vorzeichen von y var cl_I abs_y = (sign==0 ? y : -y); var uintC y_exp = integer_length(abs_y); var uintC len = TheLfloat(x)->len; #ifndef CL_LF_PEDANTIC if (ceiling(y_exp,intDsize) > len) return x / cl_I_to_LF(y,len); #endif // x länger als y, direkt dividieren. CL_ALLOCA_STACK; var const uintD* y_MSDptr; var uintC y_len; var const uintD* y_LSDptr; I_to_NDS_nocopy(abs_y, y_MSDptr=,y_len=,y_LSDptr=,false,); // NDS zu y bilden, y_len>0 // y nicht zu einer NUDS normalisieren! (Damit ein Bit Spielraum ist.) // Zähler bilden: x * 2^(intDsize*y_len) var uintD* z_MSDptr; var uintC z_len; var uintD* z_LSDptr; z_len = len + y_len; num_stack_alloc(z_len, z_MSDptr=,z_LSDptr=); { var uintD* ptr = copy_loop_msp(arrayMSDptr(TheLfloat(x)->data,len),z_MSDptr,len); // len Digits clear_loop_msp(ptr,y_len); // und y_len Null-Digits } // Quotienten bilden: var DS q; var DS r; UDS_divide(z_MSDptr,z_len,z_LSDptr, y_MSDptr,y_len,y_LSDptr, &q, &r ); // q ist der Quotient, // q = floor(x/y*2^(intDsize*y_len)) >= 2^(intDsize*len), // q <= x/y*2^(intDsize*y_len) < 2^(1+intDsize+intDsize*len), // also mit len+1 oder len+2 Digits. r der Rest. var uintD* MSDptr = q.MSDptr; var uintL shiftcount; integerlengthD(mspref(MSDptr,0),shiftcount=); // Bei q.len = len+2 : shiftcount=1, // bei q.len = len+1 : 1<=shiftcount<=intDsize. var uintD carry_rechts; if (shiftcount==intDsize) { carry_rechts = mspref(MSDptr,len); } else { carry_rechts = shiftright_loop_msp(MSDptr,len+1,shiftcount%intDsize); if (q.len > len+1) { shiftcount += intDsize; carry_rechts |= (mspref(MSDptr,len+1)==0 ? 0 : 1); } msshrink(MSDptr); } // Quotient MSDptr/len/.. ist nun normalisiert: höchstes Bit =1. // exponent := exponent(x) - intDsize*y_len + shiftcount var uintE uexp = TheLfloat(x)->expo; var uintE dexp = intDsize*y_len - shiftcount; // >= 0 ! if ((uexp < dexp) || ((uexp = uexp - dexp) < LF_exp_low)) { if (underflow_allowed()) { throw floating_point_underflow_exception(); } else { return encode_LF0(len); } } // Runden: if ( ((sintD)carry_rechts >= 0) // herausgeschobenes Bit =0 -> abrunden || ( (carry_rechts == (uintD)bit(intDsize-1)) // =1 und weitere Bits >0 oder Rest >0 -> aufrunden && (r.len==0) // round-to-even && ((mspref(MSDptr,len-1) & bit(0)) ==0) ) ) // abrunden {} else // aufrunden { if ( inc_loop_lsp(MSDptr mspop len,len) ) // Übertrag durchs Aufrunden { mspref(MSDptr,0) = bit(intDsize-1); // Mantisse := 10...0 // Exponenten incrementieren: if (++uexp == LF_exp_high+1) { throw floating_point_overflow_exception(); } } } return encode_LFu(TheLfloat(x)->sign ^ sign, uexp, MSDptr, len); } // Bit complexity (N := max(length(x),length(y))): O(M(N)). } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_1plus.cc0000644000000000000000000002700611201634737015702 0ustar // LF_LF_plus_LF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/lfloat/cl_LF.h" // Implementation. #include "float/lfloat/cl_LF_impl.h" #include "base/digitseq/cl_DS.h" #include "float/cl_F.h" #include "base/cl_xmacros.h" namespace cln { const cl_LF LF_LF_plus_LF (const cl_LF& arg1, const cl_LF& arg2) { // Methode (nach [Knuth, II, Seminumerical Algorithms, Abschnitt 4.2.1., S.200]): // Falls e1= e2. // Falls e2=0, also x2=0.0, Ergebnis x1. // Falls e1 - e2 >= 16n+2, Ergebnis x1. // Erweitere die Mantissen rechts um 3 Bits (Bit -1 als Schutzbit, Bits -2,-3 // als Rundungsbits: 00 exakt, 01 1.Hälfte, 10 exakte Mitte, 11 2.Hälfte.) // Schiebe die Mantisse von x2 um e0-e1 Bits nach rechts. (Dabei die Rundung // ausführen: Bit -3 ist das logische Oder der Bits -3,-4,-5,...) // Falls x1,x2 selbes Vorzeichen haben: Addiere dieses zur Mantisse von x1. // Falls x1,x2 verschiedenes Vorzeichen haben: Subtrahiere dieses von der // Mantisse von x1. <0 -> (Es war e1=e2) Vertausche die Vorzeichen, negiere. // =0 -> Ergebnis 0.0 // Exponent ist e1. // Normalisiere, fertig. var cl_LF x1 = arg1; var cl_LF x2 = arg2; var uintE uexp1 = TheLfloat(arg1)->expo; var uintE uexp2 = TheLfloat(arg2)->expo; if (uexp1 < uexp2) // x1 und x2 vertauschen { x1 = arg2; x2 = arg1; swap(uintE, uexp1,uexp2); } // uexp1 >= uexp2 if (uexp2==0) { return x1; } // x2=0.0 -> x1 als Ergebnis var uintC len = TheLfloat(x1)->len; // Länge n von x1 und x2 var uintE expdiff = uexp1-uexp2; // e1-e2 if ((expdiff == 0) && (TheLfloat(x1)->sign != TheLfloat(x2)->sign)) // verschiedene Vorzeichen, aber gleicher Exponent { // Vorzeichen des Ergebnisses festlegen: var cl_signean erg = // Mantissen (je len Digits) vergleichen compare_loop_msp(arrayMSDptr(TheLfloat(x1)->data,len),arrayMSDptr(TheLfloat(x2)->data,len),len); if (erg==0) // Mantissen gleich { return encode_LF0(len); } // Ergebnis 0.0 if (erg<0) // |x1| < |x2| // x1 und x2 vertauschen, expdiff bleibt =0 { x1.pointer = arg2.pointer; x2.pointer = arg1.pointer; swap(uintE, uexp1,uexp2); } } if (expdiff >= intDsize * len + 2) // e1-e2 >= 16n+2 ? { return x1; } // ja -> x1 als Ergebnis // neues Long-Float allozieren: var Lfloat y = allocate_lfloat(len,uexp1,TheLfloat(x1)->sign); var uintL i = floor(expdiff,intDsize); // e1-e2 div 16 (>=0, <=n) var uintL j = expdiff % intDsize; // e1-e2 mod 16 (>=0, <16) // Mantisse von x2 muß um intDsize*i+j Bits nach rechts geschoben werden. var uintC x2_len = len - i; // n-i Digits von x2 gebraucht // x2_len Digits um j Bits nach rechts schieben und dabei kopieren: CL_ALLOCA_STACK; var uintD* x2_MSDptr; var uintD* x2_LSDptr; var uintD rounding_bits; num_stack_alloc(x2_len, x2_MSDptr=,x2_LSDptr=); // x2_len Digits Platz if (j==0) { copy_loop_msp(arrayMSDptr(TheLfloat(x2)->data,len),x2_MSDptr,x2_len); rounding_bits = 0; } else { rounding_bits = shiftrightcopy_loop_msp(arrayMSDptr(TheLfloat(x2)->data,len),x2_MSDptr,x2_len,j,0); } // x2_MSDptr/x2_len/x2_LSDptr sind die essentiellen Digits von x2. // rounding_bits enthält die letzten j herausgeschobenen Bits. // Aus rounding_bits und den nächsten i Digits die 3 Rundungsbits // (als Bits intDsize-1..intDsize-3 von rounding_bits) aufbauen: if (j>=2) // j>=2 -> Bits -1,-2 sind OK, Bit -3 bestimmen: { if ((rounding_bits & (bit(intDsize-3)-1)) ==0) { if (test_loop_msp(arrayMSDptr(TheLfloat(x2)->data,len) mspop x2_len,i)) { rounding_bits |= bit(intDsize-3); } // Rundungsbit -3 setzen } else { rounding_bits |= bit(intDsize-3); // Rundungsbit -3 setzen rounding_bits &= bitm(intDsize)-bit(intDsize-3); // andere Bits löschen } } else // j<=3 -> Bits intDsize-4..0 von rounding_bits sind bereits Null. // nächstes und weitere i-1 Digits heranziehen: { if (i > 0) // i=0 -> Bits -1,-2,-3 sind OK. { var uintD* ptr = arrayMSDptr(TheLfloat(x2)->data,len) mspop x2_len; rounding_bits |= (mspref(ptr,0) >> j); // weitere relevante Bits des nächsten Digit dazu if ((rounding_bits & (bit(intDsize-3)-1)) ==0) // Alle Bits -3,-4,... =0 ? { if ( (!((mspref(ptr,0) & (bit(3)-1)) ==0)) // j (<=3) untere Bits von ptr[0] alle =0 ? || test_loop_msp(ptr mspop 1,i-1) ) { rounding_bits |= bit(intDsize-3); } // Rundungsbit -3 setzen } else { rounding_bits |= bit(intDsize-3); // Rundungsbit -3 setzen rounding_bits &= bitm(intDsize)-bit(intDsize-3); // andere Bits löschen } } } // x2 liegt in verschobener Form in der UDS x2_MSDptr/x2_len/x2_LSDptr // vor, mit Rundungsbits in Bit intDsize-1..intDsize-3 von rounding_bits. {var uintD* y_mantMSDptr = arrayMSDptr(TheLfloat(y)->data,len); var uintD* y_mantLSDptr = arrayLSDptr(TheLfloat(y)->data,len); if (TheLfloat(x1)->sign == TheLfloat(x2)->sign) // gleiche Vorzeichen -> Mantissen addieren { // erst rechten Mantissenteil (x2_len Digits) durch Addition: var uintD carry = add_loop_lsp(arrayLSDptr(TheLfloat(x1)->data,len),x2_LSDptr, y_mantLSDptr, x2_len ); // dann linken Mantissenteil (i Digits) direkt kopieren: var uintD* ptr = copy_loop_msp(arrayMSDptr(TheLfloat(x1)->data,len),y_mantMSDptr,i); // dann Übertrag vom rechten zum linken Mantissenteil addieren: if (!(carry==0)) { if ( inc_loop_lsp(ptr,i) ) // Übertrag über das erste Digit hinaus { // Exponent von y incrementieren: if ( ++(TheLfloat(y)->expo) == LF_exp_high+1 ) { throw floating_point_overflow_exception(); } // normalisiere durch Schieben um 1 Bit nach rechts: {var uintD carry_rechts = shift1right_loop_msp(y_mantMSDptr,len,~(uintD)0); rounding_bits = rounding_bits>>1; // Rundungsbits mitschieben if (!(carry_rechts==0)) { rounding_bits |= bit(intDsize-1); } } }} } else // verschiedene Vorzeichen -> Mantissen subtrahieren { // erst rechten Mantissenteil (x2_len Digits) durch Subtraktion: rounding_bits = -rounding_bits; {var uintD carry = subx_loop_lsp(arrayLSDptr(TheLfloat(x1)->data,len),x2_LSDptr, y_mantLSDptr, x2_len, (rounding_bits==0 ? 0 : ~(uintD)0) ); // dann linken Mantissenteil (i Digits) direkt kopieren: var uintD* ptr = copy_loop_msp(arrayMSDptr(TheLfloat(x1)->data,len),y_mantMSDptr,i); // dann Übertrag des rechten vom linken Mantissenteil subtrahieren: if (!(carry==0)) { if ( dec_loop_lsp(ptr,i) ) // Übertrag über das erste Digit hinaus, also e1=e2 { NOTREACHED } // diesen Fall haben wir schon behandelt } } // UDS y_mantMSDptr/len/y_mantLSDptr/rounding_bits normalisieren: {var uintD* ptr = y_mantMSDptr; var uintC k = 0; var uintC count; dotimesC(count,len, { if (!(mspref(ptr,0)==0)) goto nonzero_found; ptr = ptr mspop 1; k++; }); if (!(rounding_bits==0)) goto nonzero_found; // Die UDS ist ganz Null. Also war e1=e2, keine Rundungsbits. { NOTREACHED } // diesen Fall haben wir schon behandelt nonzero_found: // Digit /=0 gefunden // UDS von ptr nach y_mantMSDptr um k Digits nach unten kopieren: if (k>0) // mindestens ein führendes Nulldigit. Also war e1-e2 = 0 oder 1. { ptr = copy_loop_msp(ptr,y_mantMSDptr,len-k); // len-k Digits verschieben msprefnext(ptr) = rounding_bits; // Rundungsbits als weiteres Digit clear_loop_msp(ptr,k-1); // dann k-1 Nulldigits rounding_bits = 0; // und keine weiteren Rundungsbits // Exponenten um intDsize*k erniedrigen: k = intDsize*k; {var uintE uexp = TheLfloat(y)->expo; #if !(LF_exp_low==1) if (uexp < k+LF_exp_low) #else if (uexp <= k) #endif { if (underflow_allowed()) { throw floating_point_underflow_exception(); } else { return encode_LF0(len); } // Ergebnis 0.0 } TheLfloat(y)->expo = uexp - k; }} } // NUDS y_mantMSDptr/len/y_mantLSDptr/rounding_bits normalisieren: {var uintL s; integerlengthD(mspref(y_mantMSDptr,0), s = intDsize - ); // s = Anzahl der führenden Nullbits im ersten Word (>=0, 0) { // Muß die NUDS y_mantMSDptr/len/y_mantLSDptr/rounding_bits // um s Bits nach links schieben. // (Bei e1-e2>1 ist dabei zwangsläufig s=1.) if (s==1) { shift1left_loop_lsp(y_mantLSDptr,len); if (rounding_bits & bit(intDsize-1)) { lspref(y_mantLSDptr,0) |= bit(0); } rounding_bits = rounding_bits << 1; } else // s>1, also e1-e2 <= 1 <= s. { shiftleft_loop_lsp(y_mantLSDptr,len,s,rounding_bits>>(intDsize-s)); rounding_bits = 0; // = rounding_bits << s; } // Exponenten um s erniedrigen: {var uintE uexp = TheLfloat(y)->expo; #if !(LF_exp_low==1) if (uexp < s+LF_exp_low) #else if (uexp <= s) #endif { if (underflow_allowed()) { throw floating_point_underflow_exception(); } else { return encode_LF0(len); } // Ergebnis 0.0 } TheLfloat(y)->expo = uexp - s; }} } } // Hier enthält rounding_bits Bit -1 als Bit intDsize-1, Bit -2 als // Bit intDsize-2, Bit -3 als Oder(Bits intDsize-3..0) ! // Runden. Dazu rounding_bits inspizieren: if ((rounding_bits & bit(intDsize-1)) ==0) goto ab; // Bit -1 gelöscht -> abrunden rounding_bits = rounding_bits<<1; // Bits -2,-3 if (!(rounding_bits==0)) goto auf; // Bit -2 oder Bit -3 gesetzt -> aufrunden // round-to-even: if ((lspref(y_mantLSDptr,0) & bit(0)) ==0) goto ab; auf: // aufrunden if ( inc_loop_lsp(y_mantLSDptr,len) ) { // Übertrag durchs Aufrunden mspref(y_mantMSDptr,0) = bit(intDsize-1); // Mantisse := 10...0 // Exponent erhöhen: if (++(TheLfloat(y)->expo) == LF_exp_high+1) { throw floating_point_overflow_exception(); } } ab: // abrunden ; } // y fertig. return y; } } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_I_mul.cc0000644000000000000000000000565011201634737015704 0ustar // cl_LF_I_mul(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "float/lfloat/cl_LF.h" // Implementation. #include "float/lfloat/cl_LF_impl.h" #include "cln/integer.h" #include "integer/cl_I.h" #include "base/digitseq/cl_DS.h" #include "float/cl_F.h" namespace cln { const cl_R cl_LF_I_mul (const cl_LF& x, const cl_I& y) { // Method: // If y=0, return 0. // If x=0.0, return x. // If y is longer than x, convert y to a float and multiply. // Else multiply the mantissa of x with the absolute value of y, then round. if (eq(y,0)) { return 0; } if (TheLfloat(x)->expo == 0) { return x; } var cl_signean sign = -(cl_signean)minusp(y); // Vorzeichen von y var cl_I abs_y = (sign==0 ? y : -y); var uintC y_exp = integer_length(abs_y); var uintC len = TheLfloat(x)->len; #ifndef CL_LF_PEDANTIC if (ceiling(y_exp,intDsize) > len) return x * cl_I_to_LF(y,len); #endif // x länger als y, direkt multiplizieren. CL_ALLOCA_STACK; var const uintD* y_MSDptr; var uintC y_len; var const uintD* y_LSDptr; I_to_NDS_nocopy(abs_y, y_MSDptr=,y_len=,y_LSDptr=,false,); // NDS zu y bilden, y_len>0 if (mspref(y_MSDptr,0)==0) y_len--; // NUDS zu y bilden, y_len>0 // Multiplizieren. var uintD* prodMSDptr; var uintC prodlen; UDS_UDS_mul_UDS(len,arrayLSDptr(TheLfloat(x)->data,len), y_len,y_LSDptr, prodMSDptr=,prodlen=,); // x fing mit 0 Nullbits an, y mit maximal intDsize-1 Nullbits, // daher fängt das Produkt mit maximal intDsize Nullbits an. var uintL shiftcount; if (mspref(prodMSDptr,0)==0) { shiftcount = intDsize; msshrink(prodMSDptr); prodlen--; } else { integerlengthD(mspref(prodMSDptr,0), shiftcount = intDsize -); if (shiftcount > 0) shiftleft_loop_lsp(prodMSDptr mspop (len+1),len+1,shiftcount,0); } // Produkt ist nun normalisiert: höchstes Bit =1. // exponent := exponent(x) + intDsize*y_len - shiftcount var uintE uexp = TheLfloat(x)->expo; var uintE iexp = intDsize*y_len - shiftcount; // >= 0 ! uexp = uexp + iexp; if ((uexp < iexp) || (uexp > LF_exp_high)) throw floating_point_overflow_exception(); // Runden: var uintD* midptr = prodMSDptr mspop len; var uintC restlen = prodlen - len; if ( (restlen==0) || ((sintD)mspref(midptr,0) >= 0) // nächstes Bit =0 -> abrunden || ( ((mspref(midptr,0) & ((uintD)bit(intDsize-1)-1)) ==0) // Bit =1, weitere Bits >0 -> aufrunden && !test_loop_msp(midptr mspop 1,restlen-1) // round-to-even && ((lspref(midptr,0) & bit(0)) ==0) ) ) // abrunden {} else // aufrunden { if ( inc_loop_lsp(midptr,len) ) // Übertrag durchs Aufrunden { mspref(prodMSDptr,0) = bit(intDsize-1); // Mantisse := 10...0 if (++uexp == LF_exp_high+1) { throw floating_point_overflow_exception(); } } } return encode_LFu(TheLfloat(x)->sign ^ sign, uexp, prodMSDptr, len); } // Bit complexity (N = max(length(x),length(y))): O(M(N)). } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_zerop.cc0000644000000000000000000000044111201634737015767 0ustar // zerop(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" namespace cln { CL_INLINE bool CL_INLINE_DECL(zerop) (const cl_LF& x) { return TheLfloat(x)->expo == 0; } } // namespace cln cln-1.3.3/src/float/lfloat/elem/cl_LF_square.cc0000644000000000000000000000643311201634737016137 0ustar // square(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" #include "base/digitseq/cl_DS.h" #include "float/cl_F.h" namespace cln { const cl_LF square (const cl_LF& x) { // Methode: wie operator*(x,x). var uintC len = TheLfloat(x)->len; var uintE uexp = TheLfloat(x)->expo; if (uexp==0) // x=0.0 -> Ergebnis 0.0 { return x; } // Exponenten addieren: // (uexp-LF_exp_mid) + (uexp-LF_exp_mid) = (2*uexp-LF_exp_mid)-LF_exp_mid if ((sintE)uexp >= 0) // kein Carry { uexp = 2*uexp; if (uexp < LF_exp_mid+LF_exp_low) { if (underflow_allowed()) { throw floating_point_underflow_exception(); } else { return encode_LF0(len); } // Ergebnis 0.0 } } else // Carry { uexp = 2*uexp; if (uexp > (uintE)(LF_exp_mid+LF_exp_high+1)) { throw floating_point_overflow_exception(); } } uexp = uexp - LF_exp_mid; // Nun ist LF_exp_low <= uexp <= LF_exp_high+1. // neues Long-Float allozieren: var Lfloat y = allocate_lfloat(len,uexp,0); // Produkt bilden: var const uintD* x_LSDptr = arrayLSDptr(TheLfloat(x)->data,len); var uintD* MSDptr; var uintD* LSDptr; CL_ALLOCA_STACK; num_stack_alloc(2*len,MSDptr=,LSDptr=); cl_UDS_mul_square(x_LSDptr,len,LSDptr); {var uintD* midptr = MSDptr mspop len; // Pointer in die Mitte der 2*len Digits if ((sintD)mspref(MSDptr,0) >= 0) // führendes Bit abtesten { // erste n+1 Digits um 1 Bit nach links schieben: shift1left_loop_lsp(midptr mspop 1,len+1); // Exponenten decrementieren: if ((TheLfloat(y)->expo)-- == LF_exp_low-1) { if (underflow_allowed()) { throw floating_point_underflow_exception(); } else { return encode_LF0(len); } // Ergebnis 0.0 } } // erste Hälfte des Mantissenprodukts übertragen: {var uintD* y_mantMSDptr = arrayMSDptr(TheLfloat(y)->data,len); var uintD* y_mantLSDptr = copy_loop_msp(MSDptr,y_mantMSDptr,len); // Runden: if ( ((sintD)mspref(midptr,0) >= 0) // nächstes Bit =0 -> abrunden || ( ((mspref(midptr,0) & ((uintD)bit(intDsize-1)-1)) ==0) // Bit =1, weitere Bits >0 -> aufrunden && !test_loop_msp(midptr mspop 1,len-1) // round-to-even && ((lspref(midptr,0) & bit(0)) ==0) ) ) // abrunden {} else // aufrunden { if ( inc_loop_lsp(y_mantLSDptr,len) ) { // Übertrag durchs Aufrunden (kann nur auftreten, // wenn vorhin um 1 Bit nach links geschoben wurde) mspref(y_mantMSDptr,0) = bit(intDsize-1); // Mantisse := 10...0 (TheLfloat(y)->expo)++; // Exponent wieder zurück-erhöhen } } // LF_exp_low <= exp <= LF_exp_high sicherstellen: if (TheLfloat(y)->expo == LF_exp_high+1) { throw floating_point_overflow_exception(); } }} return y; } // Bit complexity (N = length(x)): O(M(N)). } // namespace cln cln-1.3.3/src/float/lfloat/input/0000755000000000000000000000000012173046177013504 5ustar cln-1.3.3/src/float/lfloat/input/cl_LF_from_string.cc0000644000000000000000000000103111201634737017372 0ustar // cl_LF (const char *) constructor. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat_class.h" // Implementation. #include "cln/lfloat.h" #include "cln/input.h" #include "cln/float_io.h" namespace cln { cl_read_flags cl_LF_read_flags = { syntax_lfloat, lsyntax_all, 10, { float_format_lfloat_min, float_format_lfloat_min, false } }; cl_LF::cl_LF (const char * string) { pointer = as_cl_private_thing( As(cl_LF)(read_float(cl_LF_read_flags,string,NULL,NULL))); } } // namespace cln cln-1.3.3/src/float/lfloat/cl_LF_impl.h0000644000000000000000000001363711201634737014524 0ustar // cl_LF implementation #ifndef _CL_LF_IMPL_H #define _CL_LF_IMPL_H #include "cln/number.h" #include "float/lfloat/cl_LF.h" #include "cln/malloc.h" #include "base/cl_offsetof.h" #include "base/digitseq/cl_DS.h" namespace cln { extern cl_class cl_class_lfloat; // Builds a long-float, without filling the mantissa. // allocate_lfloat(len,expo,sign) // > uintC len: length of mantissa (in digits) // > uintE expo: exponent // > cl_signean sign: sign (0 = +, -1 = -) // The long-float is only complete when the mantissa has been filled in! inline cl_heap_lfloat* allocate_lfloat (uintC len, uintE expo, cl_signean sign) { cl_heap_lfloat* p = (cl_heap_lfloat*) malloc_hook(offsetofa(cl_heap_lfloat,data)+sizeof(uintD)*len); p->refcount = 1; p->type = &cl_class_lfloat; p->len = len; p->sign = sign; p->expo = expo; return p; } // Private constructor. // ptr should be the result of some allocate_lfloat() call. inline cl_LF::cl_LF (cl_heap_lfloat* ptr) : cl_F ((cl_private_thing) ptr) {} // Both work, but the first definition results in less compiler-generated // temporaries. #if 1 #define Lfloat cl_heap_lfloat* #else #define Lfloat cl_LF #endif // Pointers to the mantissa. #if 1 inline const uintD* LF_MSDptr (Lfloat lf) { return (const uintD*) arrayMSDptr(lf->data,lf->len); } inline const uintD* LF_LSDptr (Lfloat lf) { return (const uintD*) arrayLSDptr(lf->data,lf->len); } #endif inline const uintD* LF_MSDptr (const cl_LF& obj) { var cl_heap_lfloat* lf = TheLfloat(obj); return (const uintD*) arrayMSDptr(lf->data,lf->len); } inline const uintD* LF_LSDptr (const cl_LF& obj) { var cl_heap_lfloat* lf = TheLfloat(obj); return (const uintD*) arrayLSDptr(lf->data,lf->len); } // Entpacken eines Long-Float: // LF_decode(obj, zero_statement, sign=,exp=,mantMSDptr=,mantlen=,mantLSDptr=); // zerlegt ein Long-Float obj. // Ist obj=0.0, wird zero_statement ausgeführt. // Sonst: cl_signean sign = Vorzeichen (0 = +, -1 = -), // sintE exp = Exponent (vorzeichenbehaftet), // UDS mantMSDptr/mantlen/mantLSDptr = Mantisse // (>= 2^(intDsize*mantlen-1), < 2^(intDsize*mantlen)), // mit mantlen>=LF_minlen. #define LF_decode(obj, zero_statement, sign_zuweisung,exp_zuweisung,mantMSDptr_zuweisung,mantlen_zuweisung,mantLSDptr_zuweisung) \ { var Lfloat _x = TheLfloat(obj); \ var uintE uexp = _x->expo; \ if (uexp==0) \ { unused (mantlen_zuweisung _x->len); zero_statement } /* e=0 -> Zahl 0.0 */\ else \ { exp_zuweisung (sintE)(uexp - LF_exp_mid); /* Exponent */ \ sign_zuweisung _x->sign; /* Vorzeichen */\ unused (mantMSDptr_zuweisung arrayMSDptr(_x->data, (uintP)(mantlen_zuweisung _x->len))); /* Mantissen-UDS */\ unused (mantLSDptr_zuweisung arrayLSDptr(_x->data, (uintP)(mantlen_zuweisung _x->len))); \ } } // Einpacken eines Long-Float: // encode_LF0(len) liefert ein Long-Float 0.0 mit len Digits. // > uintC len: Anzahl der Digits // < cl_LF ergebnis: neues Long-Float 0.0 mit len Digits inline const cl_LF encode_LF0 (uintC len) { var Lfloat erg = allocate_lfloat(len,0,0); // Exponent 0, Vorzeichen + DS_clear_loop(arrayMSDptr(TheLfloat(erg)->data,len),len,arrayLSDptr(TheLfloat(erg)->data,len)); // Mantisse := 0 return erg; } // Einpacken eines Long-Float: // encode_LF1s(sign,len) liefert ein Long-Float +-1.0 mit len Digits. // > cl_signean sign: Vorzeichen // > uintC len: Anzahl der Digits // < cl_LF ergebnis: neues Long-Float +1.0 oder -1.0 mit len Digits inline const cl_LF encode_LF1s (cl_signean sign, uintC len) { var Lfloat erg = allocate_lfloat(len,LF_exp_mid+1,sign); // Exponent 1 mspref(arrayMSDptr(TheLfloat(erg)->data,len),0) = bit(intDsize-1); // Mantisse := 2^(intDsize*len-1) DS_clear_loop(arrayMSDptr(TheLfloat(erg)->data,len) mspop 1,len-1,arrayLSDptr(TheLfloat(erg)->data,len)); return erg; } // Einpacken eines Long-Float: // encode_LF1(len) liefert ein Long-Float 1.0 mit len Digits. // > uintC len: Anzahl der Digits // < cl_LF ergebnis: neues Long-Float 1.0 mit len Digits inline const cl_LF encode_LF1 (uintC len) { return encode_LF1s(0,len); } // Einpacken eines Long-Float: // encode_LFu(sign,uexp,mantMSDptr,mantlen) liefert ein Long-Float // > cl_signean sign: Vorzeichen // > uintE exp: Exponent + LF_exp_mid // > uintD* mantMSDptr: Pointer auf eine NUDS mit gesetztem höchstem Bit // > uintC mantlen: Anzahl der Digits, >= LF_minlen // < cl_LF erg: neues Long-Float mit der UDS mantMSDptr/mantlen/.. als Mantisse // Der Exponent wird nicht auf Überlauf/Unterlauf getestet. inline const cl_LF encode_LFu (cl_signean sign, uintE uexp, const uintD* mantMSDptr, uintC mantlen) { var Lfloat erg = allocate_lfloat(mantlen,uexp,sign); /* Exponent */ copy_loop_msp(mantMSDptr,arrayMSDptr(TheLfloat(erg)->data,mantlen),mantlen); /* Mantisse übertragen */ return erg; } // Einpacken eines Long-Float: // encode_LF(sign,exp,mantMSDptr,mantlen) liefert ein Long-Float // > cl_signean sign: Vorzeichen // > sintE exp: Exponent // > uintD* mantMSDptr: Pointer auf eine NUDS mit gesetztem höchstem Bit // > uintC mantlen: Anzahl der Digits, >= LF_minlen // < cl_LF erg: neues Long-Float mit der UDS mantMSDptr/mantlen/.. als Mantisse // Der Exponent wird nicht auf Überlauf/Unterlauf getestet. inline const cl_LF encode_LF (cl_signean sign, sintE exp, const uintD* mantMSDptr, uintC mantlen) { return encode_LFu(sign,LF_exp_mid+(uintE)exp,mantMSDptr,mantlen); } // Einpacken eines Long-Float: // encode_LF_array(sign,exp,mantarr,mantlen) liefert ein Long-Float // > cl_signean sign: Vorzeichen // > sintE exp: Exponent // > uintD mantarr[]: NUDS mit gesetztem höchstem Bit // > uintC mantlen: Anzahl der Digits, >= LF_minlen // < cl_LF erg: neues Long-Float mit der UDS mantarr[] als Mantisse // Der Exponent wird nicht auf Überlauf/Unterlauf getestet. #define encode_LF_array(sign,exp,mantarr,mantlen) \ encode_LF(sign,exp,arrayMSDptr(mantarr,mantlen),mantlen) } // namespace cln #endif /* _CL_LF_IMPL_H */ cln-1.3.3/src/float/lfloat/division/0000755000000000000000000000000012173046177014171 5ustar cln-1.3.3/src/float/lfloat/division/cl_LF_ceil22.cc0000644000000000000000000000071011201634737016611 0ustar // ceiling2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" namespace cln { const cl_LF_div_t ceiling2 (const cl_LF& x, const cl_LF& y) { // Methode: // (q,r) := ceiling(x/y). Liefere q und x-y*q = y*r. var cl_LF_div_t q_r = ceiling2(x/y); var cl_I& q = q_r.quotient; var cl_LF& r = q_r.remainder; return cl_LF_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/float/lfloat/division/cl_LF_recip.cc0000644000000000000000000000054411201634737016640 0ustar // recip(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "float/lfloat/cl_LF_impl.h" namespace cln { ALL_cl_LF_OPERATIONS_SAME_PRECISION() const cl_LF recip (const cl_LF& x) { return encode_LF1(TheLfloat(x)->len) / x; } } // namespace cln cln-1.3.3/src/float/lfloat/division/cl_LF_trunc22.cc0000644000000000000000000000071411201634737017034 0ustar // truncate2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" namespace cln { const cl_LF_div_t truncate2 (const cl_LF& x, const cl_LF& y) { // Methode: // (q,r) := truncate(x/y). Liefere q und x-y*q = y*r. var cl_LF_div_t q_r = truncate2(x/y); var cl_I& q = q_r.quotient; var cl_LF& r = q_r.remainder; return cl_LF_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/float/lfloat/division/cl_LF_floor22.cc0000644000000000000000000000070011201634737017015 0ustar // floor2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" namespace cln { const cl_LF_div_t floor2 (const cl_LF& x, const cl_LF& y) { // Methode: // (q,r) := floor(x/y). Liefere q und x-y*q = y*r. var cl_LF_div_t q_r = floor2(x/y); var cl_I& q = q_r.quotient; var cl_LF& r = q_r.remainder; return cl_LF_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/float/lfloat/division/cl_LF_round22.cc0000644000000000000000000000070011201634737017023 0ustar // round2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" namespace cln { const cl_LF_div_t round2 (const cl_LF& x, const cl_LF& y) { // Methode: // (q,r) := round(x/y). Liefere q und x-y*q = y*r. var cl_LF_div_t q_r = round2(x/y); var cl_I& q = q_r.quotient; var cl_LF& r = q_r.remainder; return cl_LF_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/float/lfloat/division/cl_LF_fceil.cc0000644000000000000000000000064511201634737016622 0ustar // fceiling(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. #include "float/lfloat/cl_LF.h" #include "base/cl_inline.h" #include "float/lfloat/elem/cl_LF_minusp.cc" namespace cln { CL_INLINE2 const cl_LF CL_INLINE2_DECL(fceiling) (const cl_LF& x) { if (minusp_inline(x)) return ftruncate(x); else return futruncate(x); } } // namespace cln cln-1.3.3/src/float/output/0000755000000000000000000000000012173046200012407 5ustar cln-1.3.3/src/float/output/cl_F_aprint.cc0000644000000000000000000000053211201634737015147 0ustar // print_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float_io.h" // Implementation. #include "cln/output.h" namespace cln { void print_float (std::ostream& stream, const cl_print_flags& flags, const cl_F& z) { print_float(stream,(const cl_print_number_flags&)flags,z); } } // namespace cln cln-1.3.3/src/float/output/cl_F_dprint.cc0000644000000000000000000005103311201634737015154 0ustar // print_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float_io.h" // Implementation. // Michael Stoll 10.2.1990 - 26.3.1990 // Bruno Haible 8.9.1990 - 10.9.1990 // Grundgedanken: // Jede Real-Zahl /= 0 repräsentiert ein (offenes) Intervall. Es wird die- // jenige Dezimalzahl mit möglichst wenig Stellen ausgegeben, die in diesem // Intervall liegt. // Um auch große Exponenten zu behandeln, werden Zweier- in Zehnerpotenzen // erst einmal näherungsweise umgerechnet. Nötigenfalls wird die Rechen- // genauigkeit erhöht. Hierbei wird von den Long-Floats beliebiger // Genauigkeit Gebrauch gemacht. // Stützt sich auf: // cl_ln2(digits) liefert ln(2) mit mindestens digits Mantissenbits. // cl_ln10(digits) liefert ln(10) mit mindestens digits Mantissenbits. // cl_decimal_string(integer) liefert zu einem Integer >0 // einen String mit seiner Dezimaldarstellung. // (substring string start [end]) wie subseq, jedoch für Strings schneller. #include #include "cln/output.h" #include "base/string/cl_sstring.h" #include "cln/float.h" #include "float/cl_F.h" #include "float/lfloat/cl_LF.h" #include "float/transcendental/cl_F_tran.h" #include "cln/rational.h" #include "cln/integer.h" #include "cln/integer_io.h" #include "integer/cl_I.h" namespace cln { // Hauptfunktion zur Umwandlung von Floats ins Dezimalsystem: // Zu einem Float x werden ein String as und drei Integers k,e,s // berechnet mit folgenden Eigenschaften: // s = sign(x). // Falls x/=0, betrachte |x| statt x. Also oBdA x>0. // Seien x1 und x2 die nächstkleinere bzw. die nächstgrößere Zahl zu x // vom selben Floating-Point-Format. Die Zahl x repräsentiert somit das // offene Intervall von (x+x1)/2 bis (x+x2)/2. // a ist ein Integer >0, mit genau k Dezimalstellen (k>=1), und es gilt // (x+x1)/2 < a*10^(-k+e) < (x+x2)/2 . // Dabei ist k minimal, also a nicht durch 10 teilbar. // Falls x=0: a=0, k=1, e=0. // as ist die Ziffernfolge von a, der Länge k. // typedef struct cl_decimal_decoded_float { char * a; uintC k; cl_I e; cl_I s; // Constructor. cl_decimal_decoded_float (char * ap, uintC kp, const cl_I& ep, const cl_I& sp) : a(ap), k(kp), e(ep), s(sp) {} }; static const cl_decimal_decoded_float decode_float_decimal (const cl_F& x) { var cl_idecoded_float x_idecoded = integer_decode_float(x); var cl_I& binmant = x_idecoded.mantissa; var cl_I& binexpo = x_idecoded.exponent; var cl_I& sign = x_idecoded.sign; if (eq(binmant,0)) // x=0 ? // a=0, k=1, e=0, s=0 return cl_decimal_decoded_float(cl_sstring("0",1), 1, 0, 0); // x/=0, also ist sign das Vorzeichen von x und // |x| = 2^binexpo * float(binmant,x) . Ab jetzt oBdA x>0. // Also x = 2^binexpo * float(binmant,x) . var uintC l = integer_length(binmant); // Anzahl der Bits von binmant, >=3 var cl_I binmant2 = ash(binmant,1); // 2*binmant var cl_I oben = plus1(binmant2); // obere Intervallgrenze ist // (x+x2)/2 = 2^(binexpo-1) * oben var cl_I unten = minus1(binmant2); // untere Intervallgrenze ist var uintL untenshift = 0; // (x+x1)/2 = 2^(binexpo-1-untenshift) * unten if (integer_length(unten) == l) { // Normalerweise integerlength(unten) = 1+integerlength(binmant). // Hier integerlength(unten) = l = integerlength(binmant), // also war binmant eine Zweierpotenz. In diesem Fall ist die // die Toleranz nach oben 1/2 Einheit, aber die Toleranz nach unten // nur 1/4 Einheit: (x+x1)/2 = 2^(binexpo-2) * (4*binmant-1) unten = minus1(ash(binmant2,1)); untenshift = 1; } // Bestimme d (ganz) und a1,a2 (ganz, >0) so, daß // die ganzen a mit (x+x1)/2 < 10^d * a < (x+x2)/2 genau // die ganzen a mit a1 <= a <= a2 sind und 0 <= a2-a1 < 20 gilt. // Wandle dazu 2^e := 2^(binexpo-1) ins Dezimalsystem um. var cl_I e = binexpo - 1; var bool e_gross = (abs(e) > ash(l,1)); // Ist |e| recht groß, >2*l ? var uintC g; // Hilfsvariablen für den Fall, daß |e| groß ist var cl_I f; // var cl_I zehn_d; // Hilfsvariable 10^|d| für den Fall, daß |e| klein ist var cl_I d; // Ergebnisvariablen var cl_I a1; // var cl_I a2; // if (e_gross) { // Ist |e| recht groß ? // Da 2^e nur näherungsweise gehen kann, braucht man Schutzbits. var uintL h = 16; // Anzahl der Schutzbits, muß >= 3 sein neue_schutzbits: // Ziel: 2^e ~= 10^d * f/2^g, wobei 1 <= f/2^g < 10. g = l + h; // Anzahl der gültigen Bits von f // Schätze d = floor(e*lg(2)) // mit Hilfe der Näherungsbrüche von lg(2): // (0 1/3 3/10 28/93 59/196 146/485 643/2136 4004/13301 // 8651/28738 12655/42039 21306/70777 76573/254370 97879/325147 // 1838395/6107016 1936274/6432163 13456039/44699994 // 15392313/51132157 44240665/146964308 59632978/198096465 // 103873643/345060773 475127550/1578339557 579001193/1923400330 // 24793177656/82361153417 149338067129/496090320832 // 174131244785/578451474249 845863046269/2809896217828 // 1865857337323/6198243909905 6443435058238/21404627947543 // ) // e>=0 : wähle lg(2) < a/b < lg(2) + 1/e, // dann ist d <= floor(e*a/b) <= d+1 . // e<0 : wähle lg(2) - 1/abs(e) < a/b < lg(2), // dann ist d <= floor(e*a/b) <= d+1 . // Es ist bekannt, dass abs(e) <= 2^31 + 2^32*64, falls intEsize == 32, // bzw. dass abs(e) <= 2^63 + 2^64*64, falls intEsize == 64. // (Hierbei steht 64 für die maximale intDsize und es wurde benutzt, // dass intEsize >= intCsize.) // Unser d sei := floor(e*a/b)-1. (d /= 0, da abs(e) >= 7.) d = minus1(minusp(e) ? (e >= -970 ? floor1(e*3,10) // Näherungsbruch 3/10 #if (intEsize==32) : floor1(e*97879,325147) // Näherungsbruch 97879/325147 #else : (e >= -1800000000LL ? floor1(e*8651,28738) // Näherungsbruch 8651/28738 : floor1(e*24793177656LL,82361153417LL) // Näherungsbruch 24793177656/82361153417 ) #endif ) : (e <= 22000 ? floor1(e*28,93) // Näherungsbruch 28/93 #if (intEsize==32) : floor1(e*1838395,6107016) // Näherungsbruch 1838395/6107016 #else : (e <= 3300000000LL ? floor1(e*12655,42039) // Näherungsbruch 12655/42039 : floor1(e*149338067129LL,496090320832LL) // Näherungsbruch 149338067129/496090320832 ) #endif ) ); // Das wahre d wird durch diese Schätzung entweder getroffen // oder um 1 unterschätzt. // Anders ausgedrückt: 0 < e*log(2)-d*log(10) < 2*log(10). // Nun f/2^g als exp(e*log(2)-d*log(10)) berechnen. // Da f < 100*2^g < 2^(g+7), sind g+7 Bits relative Genauigkeit // des Ergebnisses, also g+7 Bits absolute Genauigkeit von // e*log(2)-d*log(10) nötig. Dazu mit l'=integerlength(e) // für log(2): g+7+l' Bits abs. Gen., g+7+l' Bits rel. Gen., // für log(10): g+7+l' Bits abs. Gen., g+7+l'+2 Bist rel. Gen. var float_format_t gen = (float_format_t)(g + integer_length(e) + 9); // Genauigkeit var cl_F f2g = exp(The(cl_F)(e * cl_ln2(gen)) - The(cl_F)(d * cl_ln10(gen))); // f/2^g // Das so berechnete f/2^g ist >1, <100. // Mit 2^g multiplizieren und auf eine ganze Zahl runden: f = round1(scale_float(f2g,g)); // liefert f // Eventuell f und d korrigieren: if (f >= ash(10,g)) // f >= 10*2^g ? { f = floor1(f,10); d = d+1; } // Nun ist 2^e ~= 10^d * f/2^g, wobei 1 <= f/2^g < 10 und // f ein Integer ist, der um höchstens 1 vom wahren Wert abweicht: // 10^d * (f-1)/2^g < 2^e < 10^d * (f+1)/2^g // Wir verkleinern nun das offene Intervall // von (x+x1)/2 = 2^(binexpo-1-untenshift) * unten // bis (x+x2)/2 = 2^(binexpo-1) * oben // zu einem abgeschlossenen Intervall // von 10^d * (f+1)/2^(g+untenshift) * unten // bis 10^d * (f-1)/2^g * oben // und suchen darin Zahlen der Form 10^d * a mit ganzem a. // Wegen oben - unten/2^untenshift >= 3/2 // und oben + unten/2^untenshift <= 4*binmant+1 < 2^(l+2) <= 2^(g-1) // ist die Intervall-Länge // = 10^d * ((f-1)*oben - (f+1)*unten/2^untenshift) / 2^g // = 10^d * ( f * (oben - unten/2^untenshift) // - (oben + unten/2^untenshift) ) / 2^g // >= 10^d * (2^g * 3/2 - 2^(g-1)) / 2^g // = 10^d * (3/2 - 2^(-1)) = 10^d // und daher gibt es in dem Intervall mindestens eine Zahl // dieser Form. // Die Zahlen der Form 10^d * a in diesem Intervall sind die // mit a1 <= a <= a2, wobei a2 = floor((f-1)*oben/2^g) und // a1 = ceiling((f+1)*unten/2^(g+untenshift)) // = floor(((f+1)*unten-1)/2^(g+untenshift))+1 . // Wir haben eben gesehen, daß a1 <= a2 sein muß. a1 = plus1(ash(minus1((f+1)*unten),-(g+untenshift))); a2 = ash((f-1)*oben,-g); // Wir können auch das offene Intervall // von (x+x1)/2 = 2^(binexpo-1-untenshift) * unten // bis (x+x2)/2 = 2^(binexpo-1) * oben // in das (abgeschlossene) Intervall // von 10^d * (f-1)/2^(g+untenshift) * unten // bis 10^d * (f+1)/2^g * oben // einschachteln. Hierin sind die Zahlen der Form 10^d * a // die mit a1' <= a <= a2', wobei a1' <= a1 <= a2 <= a2' ist // und sich a1' und a2' analog zu a1 und a2 berechnen. // Da (f-1)*oben/2^g und (f+1)*oben/2^g sich um 2*oben/2^g // < 2^(l+2-g) < 1 unterscheiden, unterscheiden sich a2 und // a2' um höchstens 1. // Ebenso, wenn 'oben' durch 'unten/2^untenshift' ersetzt // wird: a1' und a1 unterscheiden sich um höchstens 1. // Ist nun a1' < a1 oder a2 < a2' , so ist die Zweierpotenz- // Näherung 10^d * f/2^g für 2^e nicht genau genug gewesen, // und man hat das Ganze mit erhöhtem h zu wiederholen. // Ausnahme (da hilft auch keine höhere Genauigkeit): // Wenn die obere oder untere Intervallgrenze (x+x2)/2 bzw. // (x+x1)/2 selbst die Gestalt 10^d * a mit ganzem a hat. // Dies testet man so: // (x+x2)/2 = 2^e * oben == 10^d * a mit ganzem a, wenn // - für e>=0, (dann 0 <= d <= e): 5^d | oben, // - für e<0, (dann e <= d < 0): 2^(d-e) | oben, was // nur für d-e=0 der Fall ist. // (x+x1)/2 = 2^(e-untenshift) * unten == 10^d * a // mit ganzem a, wenn // - für e>0, (dann 0 <= d < e): 5^d | unten, // - für e<=0, (dann e <= d <= 0): 2^(d-e+untenshift) | unten, // was nur für d-e+untenshift=0 der Fall ist. // Da wir es jedoch mit großem |e| zu tun haben, kann dieser // Ausnahmefall hier gar nicht eintreten! // Denn im Falle e>=0: Aus e>=2*l und l>=11 folgt // e >= (l+2)*ln(10)/ln(5) + ln(10)/ln(2), // d >= e*ln(2)/ln(10)-1 >= (l+2)*ln(2)/ln(5), // 5^d >= 2^(l+2), // und wegen 0 < unten < 2^(l+2) und 0 < oben < 2^(l+1) // sind unten und oben nicht durch 5^d teilbar. // Und im Falle e<=0: Aus -e>=2*l und l>=6 folgt // -e >= (l+2)*ln(10)/ln(5), // d-e >= e*ln(2)/ln(10)-1-e = (1-ln(2)/ln(10))*(-e)-1 // = (-e)*ln(5)/ln(10)-1 >= l+1, // 2^(d-e) >= 2^(l+1), // und wegen 0 < unten < 2^(l+1+untenshift) ist unten nicht // durch 2^(d-e+untenshift) teilbar, und wegen // 0 < oben < 2^(l+1) ist oben nicht durch 2^(d-e) teilbar. { var cl_I a1prime = plus1(ash(minus1((f-1)*unten),-(g+untenshift))); if (a1prime < a1) { h = 2*h; goto neue_schutzbits; } // h verdoppeln und alles wiederholen var cl_I a2prime = ash((f+1)*oben,-g); if (a2 < a2prime) { h = 2*h; goto neue_schutzbits; } // h verdoppeln und alles wiederholen } // Jetzt ist a1 der kleinste und a2 der größte Wert, der // für a möglich ist. // Wegen oben - unten/2^untenshift <= 2 // ist die obige Intervall-Länge // = 10^d * ((f-1)*oben - (f+1)*unten/2^untenshift) / 2^g // < 10^d * ((f-1)*oben - (f-1)*unten/2^untenshift) / 2^g // = 10^d * (f-1)/2^g * (oben - unten/2^untenshift) // < 10^d * 10 * 2, // also gibt es höchstens 20 mögliche Werte für a. } else { // |e| ist recht klein -> man kann 2^e und 10^d exakt ausrechnen if (!minusp(e)) { // e >= 0. Schätze d = floor(e*lg(2)) wie oben. // Es ist e<=2*l<2^39, falls intCsize == 32, // bzw. e<=2*l<2^71, falls intCsize == 64. d = (e <= 22000 ? floor1(e*28,93) // Näherungsbruch 28/93 #if (intCsize==32) : floor1(e*1838395,6107016) // Näherungsbruch 1838395/6107016 #else : (e <= 3300000000LL ? floor1(e*12655,42039) // Näherungsbruch 12655/42039 : floor1(e*149338067129LL,496090320832LL) // Näherungsbruch 149338067129/496090320832 ) #endif ); // Das wahre d wird durch diese Schätzung entweder getroffen // oder um 1 überschätzt, aber das können wir leicht feststellen. zehn_d = The(cl_I)(expt(10,d)); // zehn_d = 10^d if (ash(1,e) < zehn_d) // falls 2^e < 10^d, { d = d-1; zehn_d = exquo(zehn_d,10); } // Schätzung korrigieren // Nun ist 10^d <= 2^e < 10^(d+1) und zehn_d = 10^d. // a1 sei das kleinste ganze a > 2^(e-untenshift) * unten / 10^d, // a2 sei das größte ganze a < 2^e * oben / 10^d. // a1 = 1+floor(unten*2^e/(2^untenshift*10^d)), // a2 = floor((oben*2^e-1)/10^d). a1 = plus1(floor1(ash(unten,e),ash(zehn_d,untenshift))); a2 = floor1(minus1(ash(oben,e)),zehn_d); } else { // e < 0. Schätze d = floor(e*lg(2)) wie oben. // Es ist |e|<=2*l<2^39, falls intCsize == 32, // bzw. |e|<=2*l<2^71, falls intCsize == 64. d = (e >= -970 ? floor1(e*3,10) // Näherungsbruch 3/10 #if (intCsize==32) : floor1(e*97879,325147) // Näherungsbruch 97879/325147 #else : (e >= -1800000000LL ? floor1(e*8651,28738) // Näherungsbruch 8651/28738 : floor1(e*24793177656LL,82361153417LL) // Näherungsbruch 24793177656/82361153417 ) #endif ); // Das wahre d wird durch diese Schätzung entweder getroffen // oder um 1 überschätzt, aber das können wir leicht feststellen. zehn_d = The(cl_I)(expt(10,-d)); // zehn_d = 10^(-d) if (integer_length(zehn_d) <= -e) // falls 2^e < 10^d, { d = d-1; zehn_d = zehn_d*10; } // Schätzung korrigieren // Nun ist 10^d <= 2^e < 10^(d+1) und zehn_d = 10^(-d). // a1 sei das kleinste ganze a > 2^(e-untenshift) * unten / 10^d, // a2 sei das größte ganze a < 2^e * oben / 10^d. // a1 = 1+floor(unten*10^(-d)/2^(-e+untenshift)), // a2 = floor((oben*10^(-d)-1)/2^(-e)) a1 = plus1(ash(unten*zehn_d,e-untenshift)); a2 = ash(minus1(oben*zehn_d),e); } } // Nun sind die ganzen a mit (x+x1)/2 < 10^d * a < (x+x2)/2 genau // die ganzen a mit a1 <= a <= a2. Deren gibt es höchstens 20. // Diese werden in drei Schritten auf einen einzigen reduziert: // 1. Enthält der Bereich eine durch 10 teilbare Zahl a ? // ja -> setze a1:=ceiling(a1/10), a2:=floor(a2/10), d:=d+1. // Danach enthält der Bereich a1 <= a <= a2 höchstens 10 // mögliche Werte für a. // 2. Falls jetzt einer der möglichen Werte durch 10 teilbar ist // (es kann nur noch einen solchen geben), // wird er gewählt, die anderen vergessen. // 3. Sonst wird unter allen noch möglichen Werten der zu x // nächstgelegene gewählt. var bool d_shift = false; // Flag, ob im 1. Schritt d incrementiert wurde var cl_I a; // das ausgewählte a // 1. { var cl_I b1 = ceiling1(a1,10); var cl_I b2 = floor1(a2,10); if (b1 <= b2) // noch eine durch 10 teilbare Zahl a ? { a1 = b1; a2 = b2; d = d+1; d_shift = true; } else goto keine_10_mehr; } // 2. a = floor1(a2,10); if (10*a >= a1) { // Noch eine durch 10 teilbare Zahl -> durch 10 teilen. d = d+1; // noch d erhöhen, zehn-d wird nicht mehr gebraucht // Nun a in einen Dezimalstring umwandeln // und dann Nullen am Schluß streichen: var char* as = cl_decimal_string(a); // Ziffernfolge zu a>0 var uintC las = ::strlen(as); // Länge der Ziffernfolge var uintC k = las; // Länge ohne die gestrichenen Nullen am Schluß var cl_I ee = k+d; // a * 10^d = a * 10^(-k+ee) while (as[k-1] == '0') // eine 0 am Schluß? { // ja -> a := a / 10 (wird aber nicht mehr gebraucht), // d := d+1 (wird aber nicht mehr gebraucht), k = k-1; as[k] = '\0'; } return cl_decimal_decoded_float(as,k,ee,sign); } // 3. keine_10_mehr: if (a1 == a2) { // a1=a2 -> keine Frage der Auswahl mehr: a = a1; } else { // a1 zu x nächstgelegenes 10^d * a wählen: if (e_gross) { // a = round(f*2*binmant/2^g/(1oder10)) (beliebige Rundung) // = ceiling(floor(f*2*binmant/(1oder10)/2^(g-1))/2) wählen: var cl_I temp = f * binmant2; if (d_shift) { temp = floor1(temp,10); } a = ash(plus1(ash(temp,1-g)),-1); } else { // |e| klein -> analog wie oben a2 berechnet wurde if (!minusp(e)) { // e>=0: a = round(2^e*2*binmant/10^d) if (d_shift) { zehn_d = 10*zehn_d; } a = round1(ash(binmant2,e),zehn_d); } else { // e<0, also war d<0, jetzt (wegen Schritt 1) d<=0. // a = round(2*binmant*10^(-d)/2^(-e)) if (d_shift) { zehn_d = floor1(zehn_d,10); } a = ash(plus1(ash(binmant2*zehn_d,e+1)),-1); } } } var char* as = cl_decimal_string(a); // Ziffernfolge zu a>0 var uintC k = ::strlen(as); ASSERT(as[k-1] != '0'); return cl_decimal_decoded_float(as,k,k+d,sign); } // Ausgabefunktion: void print_float (std::ostream& stream, const cl_print_float_flags& flags, const cl_F& z) { var cl_decimal_decoded_float z_decoded = decode_float_decimal(z); var char * & mantstring = z_decoded.a; var uintC& mantlen = z_decoded.k; var cl_I& expo = z_decoded.e; var cl_I& sign = z_decoded.s; // arg in Dezimaldarstellung: +/- 0.mant * 10^expo, wobei // mant die Mantisse: als Simple-String mantstring mit Länge mantlen, // expo der Dezimal-Exponent, // sign das Vorzeichen (-1 oder 0 oder 1). if (eq(sign,-1)) // z < 0 ? fprintchar(stream,'-'); var bool flag = (expo >= -2) && (expo <= 7); // z=0 oder 10^-3 <= |z| < 10^7 ? // Was ist auszugeben? Fallunterscheidung: // flag gesetzt -> "fixed-point notation": // expo <= 0 -> Null, Punkt, -expo Nullen, alle Ziffern // 0 < expo < mantlen -> // die ersten expo Ziffern, Punkt, die restlichen Ziffern // expo >= mantlen -> alle Ziffern, expo-mantlen Nullen, Punkt, Null // Nach Möglichkeit kein Exponent// wenn nötig, Exponent 0. // flag gelöscht -> "scientific notation": // erste Ziffer, Punkt, die restlichen Ziffern, bei mantlen=1 eine Null // Exponent. if (flag && !plusp(expo)) { // "fixed-point notation" mit expo <= 0 // erst Null und Punkt, dann -expo Nullen, dann alle Ziffern fprintchar(stream,'0'); fprintchar(stream,'.'); for (uintV i = -FN_to_V(expo); i > 0; i--) fprintchar(stream,'0'); fprint(stream,mantstring); expo = 0; // auszugebender Exponent ist 0 } else { // "fixed-point notation" mit expo > 0 oder "scientific notation" var uintV scale = (flag ? FN_to_V(expo) : 1); // Der Dezimalpunkt wird um scale Stellen nach rechts geschoben, // d.h. es gibt scale Vorkommastellen. scale > 0. if (scale < mantlen) { // erst scale Ziffern, dann Punkt, dann restliche Ziffern: { for (uintL i = 0; i < scale; i++) fprintchar(stream,mantstring[i]); } fprintchar(stream,'.'); { for (uintC i = scale; i < mantlen; i++) fprintchar(stream,mantstring[i]); } } else { // scale>=mantlen -> es bleibt nichts für die Nachkommastellen. // alle Ziffern, dann scale-mantlen Nullen, dann Punkt und Null fprint(stream,mantstring); for (uintV i = mantlen; i < scale; i++) fprintchar(stream,'0'); fprintchar(stream,'.'); fprintchar(stream,'0'); } expo = expo - scale; // der auszugebende Exponent ist um scale kleiner. } // Nun geht's zum Exponenten: var char exp_marker; floattypecase(z , exp_marker = 's'; , exp_marker = 'f'; , exp_marker = 'd'; , exp_marker = 'L'; ); if (!flags.float_readably) { floatformatcase(flags.default_float_format , if (exp_marker=='s') { exp_marker = 'E'; } , if (exp_marker=='f') { exp_marker = 'E'; } , if (exp_marker=='d') { exp_marker = 'E'; } , if ((exp_marker=='L') && (len == TheLfloat(z)->len)) { exp_marker = 'E'; } ); } if (!(flag && (exp_marker=='E'))) { // evtl. Exponent ganz weglassen fprintchar(stream,exp_marker); print_integer(stream,10,expo); } // Fertig. Aufräumen. free_hook(mantstring); } } // namespace cln cln-1.3.3/src/float/output/cl_F_printb.cc0000644000000000000000000000172611201634737015156 0ustar // print_float_binary(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float_io.h" // Implementation. #include "cln/float.h" #include "float/cl_F.h" #include "cln/integer_io.h" #include "integer/cl_I.h" namespace cln { void print_float_binary (std::ostream& stream, const cl_F& z) { // Vorzeichen, Punkt, Mantisse (binär), (Zweiersystem-)Exponent (dezimal) cl_idecoded_float m_e_s = integer_decode_float(z); var cl_I& m = m_e_s.mantissa; var cl_I& s = m_e_s.sign; // Vorzeichen ausgeben, falls <0: if (eq(s,-1)) fprintchar(stream,'-'); // Mantisse binär(!) ausgeben: fprintchar(stream,'.'); print_integer(stream,2,m); // Exponent-Marker ausgeben: { var char exp_marker; floattypecase(z , exp_marker = 's'; , exp_marker = 'f'; , exp_marker = 'd'; , exp_marker = 'L'; ); fprintchar(stream,exp_marker); } // Exponenten dezimal ausgeben: print_integer(stream,10,cl_I(float_exponent(z))); } } // namespace cln cln-1.3.3/src/float/output/cl_F_bprint.cc0000644000000000000000000000053711201634737015155 0ustar // print_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float_io.h" // Implementation. #include "cln/output.h" namespace cln { void print_float (std::ostream& stream, const cl_print_number_flags& flags, const cl_F& z) { print_float(stream,(const cl_print_real_flags&)flags,z); } } // namespace cln cln-1.3.3/src/float/output/cl_F_cprint.cc0000644000000000000000000000053611201634737015155 0ustar // print_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float_io.h" // Implementation. #include "cln/output.h" namespace cln { void print_float (std::ostream& stream, const cl_print_real_flags& flags, const cl_F& z) { print_float(stream,(const cl_print_float_flags&)flags,z); } } // namespace cln cln-1.3.3/src/float/input/0000755000000000000000000000000012173046177012223 5ustar cln-1.3.3/src/float/input/cl_F_readparsed.cc0000644000000000000000000000535111201634737015567 0ustar // read_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float_io.h" // Implementation. #include "cln/integer.h" #include "integer/cl_I.h" #include "cln/rational.h" #include "rational/cl_RA.h" #include "cln/float.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F read_float (unsigned int base, float_format_t prec, cl_signean sign, const char * string, uintC index1, uintC index4, uintC index2, uintC index3) { var cl_I exponent; { var uintC exp_len = index2-index4; // Anzahl Stellen des Exponenten if (exp_len > 0) { var const char * ptr = &string[index4]; // zeigt auf den Exponentmarker ptr++; exp_len--; // Exponentmarker überlesen var cl_signean exp_sign = 0; // Exponenten-Vorzeichen switch (*ptr) { case '-': exp_sign = ~exp_sign; // Vorzeichen := negativ case '+': ptr++; exp_len--; // Exponenten-Vorzeichen überlesen default: ; } exponent = digits_to_I(ptr,exp_len,(uintD)base); // Exponent in Integer umwandeln if (!(exp_sign==0)) exponent = -exponent; // incl. Vorzeichen } else { // kein Exponent da exponent = 0; } } // exponent = Exponent als Integer. var cl_RA base_power = expt(base,exponent-(index4-index3)); // zu multiplizierende Zehnerpotenz var cl_I mantisse = // Mantisse als Integer digits_to_I(&string[index1],index4-index1,(uintD)base); // Mantisse (Integer) und Zehnerpotenz (rational >0) unelegant zusammenmultiplizieren: var cl_RA ratvalue; if (integerp(base_power)) { DeclareType(cl_I,base_power); ratvalue = mantisse * base_power; } else { // falls mantisse/=0, in exponent=1/10^i den Zähler durch mantisse // ersetzen (liefert ungekürzten Bruch, Vorsicht!) DeclareType(cl_RT,base_power); if (zerop(mantisse)) ratvalue = 0; else { ASSERT(TheRatio(base_power)->refcount == 1); TheRatio(base_power)->numerator = mantisse; ratvalue = base_power; } } // ratvalue = Mantisse * Zehnerpotenz, als ungekürzte rationale Zahl! floatformatcase(prec , // in Short-Float umwandeln { var cl_SF x = cl_RA_to_SF(ratvalue); if (sign==0) { return x; } else { return -x; } } , // in Single-Float umwandeln { var cl_FF x = cl_RA_to_FF(ratvalue); if (sign==0) { return x; } else { return -x; } } , // in Double-Float umwandeln { var cl_DF x = cl_RA_to_DF(ratvalue); if (sign==0) { return x; } else { return -x; } } , // in Long-Float umwandeln { var cl_LF x = cl_RA_to_LF(ratvalue,len); if (sign==0) { return x; } else { return -x; } } ); } } // namespace cln cln-1.3.3/src/float/input/cl_F_read_stream.cc0000644000000000000000000000472111731472024015740 0ustar // read_float(). // This file contains a slimmed down version of read_real(). // It does not pull in all the generic real number code. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float_io.h" // Implementation. #include "cln/input.h" #include "cln/io.h" #include "base/string/cl_spushstring.h" namespace cln { // We read an entire token (or even more, if it begins with #C) into a // buffer and then call read_float() on the buffer. class pushstring_hack : public cl_spushstring { public: char* start_pointer (void) { return buffer; } char* end_pointer (void) { return buffer+index; } }; static bool number_char_p (char c) { if ((c >= '0') && (c <= '9')) return true; if (((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z'))) return true; switch (c) { case '+': case '-': case '.': case '_': case '/': return true; default: return false; } } const cl_F read_float (std::istream& stream, const cl_read_flags& flags) { // One pre-allocated buffer. This reduces the allocation/free cost. static pushstring_hack buffer; var int c; // Skip whitespace at the beginning. loop { c = stream.get(); if (stream.eof() || stream.fail()) goto eof; if ((c == ' ') || (c == '\t') || (c == '\n')) continue; else break; } // Found first non-whitespace character. // Numbers cannot cross lines. We can treat EOF and '\n' the same way. buffer.reset(); if (c == '#') { if (!(flags.lsyntax & lsyntax_commonlisp)) goto syntax1; buffer.push(c); // Read some digits, then a letter, then a token. loop { c = stream.get(); if (stream.eof() || stream.fail()) goto eof; buffer.push(c); if ((c >= '0') && (c <= '9')) continue; else break; } if (!(((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z')))) goto syntax1; c = stream.get(); if (stream.eof() || stream.fail()) goto eof; } // Read a number token. if (!number_char_p(c)) goto syntax1; loop { buffer.push(c); c = stream.peek(); // Avoid fail state on EOF. if (stream.eof() || stream.fail() || !number_char_p(c)) break; c = stream.get(); } // Parse the number. return read_float(flags, buffer.start_pointer(), buffer.end_pointer(), NULL ); // Handle syntax error. syntax1: buffer.push(c); throw read_number_bad_syntax_exception(buffer.start_pointer(),buffer.end_pointer()); // Handle premature EOF. eof: throw read_number_eof_exception(); } } // namespace cln cln-1.3.3/src/float/input/cl_F_from_string.cc0000644000000000000000000000100111201634737015772 0ustar // cl_F (const char *) constructor. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float_class.h" // Implementation. #include "cln/float.h" #include "cln/input.h" #include "cln/float_io.h" namespace cln { cl_read_flags cl_F_read_flags = { syntax_float, lsyntax_all, 10, { float_format_ffloat, float_format_lfloat_min, true } }; cl_F::cl_F (const char * string) { pointer = as_cl_private_thing( read_float(cl_F_read_flags,string,NULL,NULL)); } } // namespace cln cln-1.3.3/src/float/input/cl_F_read.cc0000644000000000000000000001373211522356752014376 0ustar // read_float(). // This file contains a slimmed down version of read_real(). // It does not pull in all the generic real number code. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float_io.h" // Implementation. #include #include "cln/input.h" #include "cln/integer.h" #include "integer/cl_I.h" #include "float/cl_F.h" #undef floor #include #define floor cln_floor namespace cln { // Step forward over all digits, to the end of string or to the next non-digit. static const char * skip_digits (const char * ptr, const char * string_limit, unsigned int base) { for ( ; ptr != string_limit; ptr++) { var char ch = *ptr; if ((ch >= '0') && (ch <= '9')) if (ch < '0' + (int)base) continue; else break; else { if (base <= 10) break; if (((ch >= 'A') && (ch < 'A'-10+(int)base)) || ((ch >= 'a') && (ch < 'a'-10+(int)base)) ) continue; else break; } } return ptr; } #define at_end_of_parse(ptr) \ if (end_of_parse) \ { *end_of_parse = (ptr); } \ else \ { if ((ptr) != string_limit) { throw read_number_junk_exception((ptr),string,string_limit); } } const cl_F read_float (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse) { ASSERT((flags.syntax & ~(syntax_float|syntax_maybe_bad)) == 0); // If no string_limit is given, it defaults to the end of the string. if (!string_limit) string_limit = string + ::strlen(string); if (flags.syntax & syntax_float) { // Check for floating-point number syntax: // {'+'|'-'|} {digit}+ {'.' {digit}* | } expo {'+'|'-'|} {digit}+ // {'+'|'-'|} {digit}* '.' {digit}+ expo {'+'|'-'|} {digit}+ // {'+'|'-'|} {digit}* '.' {digit}+ var const char * ptr = string; var const unsigned int float_base = 10; var cl_signean sign = 0; if (ptr == string_limit) goto not_float_syntax; switch (*ptr) { case '-': sign = ~sign; case '+': ptr++; default: break; } var const char * ptr_after_sign = ptr; var const char * ptr_after_intpart = skip_digits(ptr_after_sign,string_limit,float_base); var bool have_dot = false; var const char * ptr_before_fracpart = ptr_after_intpart; var const char * ptr_after_fracpart = ptr_after_intpart; ptr = ptr_after_intpart; if (ptr != string_limit) if (*ptr == '.') { have_dot = true; ptr_before_fracpart = ptr+1; ptr_after_fracpart = skip_digits(ptr_before_fracpart,string_limit,float_base); } ptr = ptr_after_fracpart; var char exponent_marker; var bool have_exponent; var const char * ptr_in_exponent = ptr; var const char * ptr_after_exponent = ptr; if ((ptr == string_limit) || !(((*ptr >= '0') && (*ptr <= '9')) || ((*ptr >= 'A') && (*ptr <= 'Z') && (*ptr != 'I')) || ((*ptr >= 'a') && (*ptr <= 'z') && (*ptr != 'i')) || (*ptr == '.') || (*ptr == '/'))) { // No exponent. have_exponent = false; // Must have at least one fractional part digit. if (ptr_after_fracpart == ptr_before_fracpart) goto not_float_syntax; exponent_marker = 'E'; } else { have_exponent = true; // Must have at least one digit. if (ptr_after_sign == ptr_after_intpart) if (ptr_after_fracpart == ptr_before_fracpart) goto not_float_syntax; exponent_marker = ((*ptr >= 'a') && (*ptr <= 'z') ? *ptr - 'a' + 'A' : *ptr); switch (exponent_marker) { case 'E': case 'S': case 'F': case 'D': case 'L': break; default: goto not_float_syntax; } } if (have_exponent) { ptr++; if (ptr == string_limit) goto not_float_syntax; switch (*ptr) { case '-': case '+': ptr++; default: break; } ptr_in_exponent = ptr; ptr_after_exponent = skip_digits(ptr_in_exponent,string_limit,10); if (ptr_after_exponent == ptr_in_exponent) goto not_float_syntax; } ptr = ptr_after_exponent; var const char * ptr_after_prec = ptr; var float_format_t prec; if ((ptr != string_limit) && (*ptr == '_')) { ptr++; ptr_after_prec = skip_digits(ptr,string_limit,10); if (ptr_after_prec == ptr) goto not_float_syntax; var cl_I prec1 = digits_to_I(ptr,ptr_after_prec-ptr,10); var uintC prec2 = cl_I_to_UC(prec1); prec = (float_base==10 ? float_format(prec2) : (float_format_t)((uintC)((1+prec2)*::log((double)float_base)*1.442695041)+1) ); } else { switch (exponent_marker) { case 'S': prec = float_format_sfloat; break; case 'F': prec = float_format_ffloat; break; case 'D': prec = float_format_dfloat; break; case 'L': prec = flags.float_flags.default_lfloat_format; break; case 'E': prec = flags.float_flags.default_float_format; break; default: NOTREACHED } if (flags.float_flags.mantissa_dependent_float_format) { // Count the number of significant digits. ptr = ptr_after_sign; while (ptr < ptr_after_fracpart && (*ptr == '0' || *ptr == '.')) ptr++; var uintC num_significant_digits = (ptr_after_fracpart - ptr) - (ptr_before_fracpart > ptr ? 1 : 0); var uintC prec2 = (num_significant_digits>=2 ? num_significant_digits-2 : 0); var float_format_t precx = (float_base==10 ? float_format(prec2) : (float_format_t)((uintC)((1+prec2)*::log((double)float_base)*1.442695041)+1) ); if ((uintE)precx > (uintE)prec) prec = precx; } } floatformatcase(prec , if (!(flags.syntax & syntax_sfloat)) goto not_float_syntax; , if (!(flags.syntax & syntax_ffloat)) goto not_float_syntax; , if (!(flags.syntax & syntax_dfloat)) goto not_float_syntax; , unused len; if (!(flags.syntax & syntax_lfloat)) goto not_float_syntax; ); at_end_of_parse(ptr_after_prec); return read_float(float_base,prec,sign,ptr_after_sign,0,ptr_after_fracpart-ptr_after_sign,ptr_after_exponent-ptr_after_sign,ptr_before_fracpart-ptr_after_sign); } not_float_syntax: if (flags.syntax & syntax_maybe_bad) { ASSERT(end_of_parse); *end_of_parse = string; return cl_F(); // dummy return } throw read_number_bad_syntax_exception(string,string_limit); } } // namespace cln cln-1.3.3/src/float/division/0000755000000000000000000000000012173046177012710 5ustar cln-1.3.3/src/float/division/cl_F_ceil1.cc0000644000000000000000000000054311201634736015134 0ustar // ceiling1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" namespace cln { const cl_I ceiling1 (const cl_F& x) GEN_F_OP1(x, ceiling1, return) } // namespace cln cln-1.3.3/src/float/division/cl_F_ftrunc2.cc0000644000000000000000000000135711201634737015527 0ustar // ftruncate2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F_fdiv_t ftruncate2 (const cl_F& x) { #if 0 // 3 type dispatches var cl_F q = ftruncate(x); return cl_F_fdiv_t(q,x-q); #else // 1 type dispatch floatcase(x , var cl_SF q = ftruncate(x); return cl_F_fdiv_t(q,x-q); , var cl_FF q = ftruncate(x); return cl_F_fdiv_t(q,x-q); , var cl_DF q = ftruncate(x); return cl_F_fdiv_t(q,x-q); , var cl_LF q = ftruncate(x); return cl_F_fdiv_t(q,LF_LF_minus_LF(x,q)); ); #endif } } // namespace cln cln-1.3.3/src/float/division/cl_F_trunc22.cc0000644000000000000000000000067511201634737015445 0ustar // truncate2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" namespace cln { const cl_F_div_t truncate2 (const cl_F& x, const cl_F& y) { // Methode: // (q,r) := truncate(x/y). Liefere q und x-y*q = y*r. var cl_F_div_t q_r = truncate2(x/y); var cl_I& q = q_r.quotient; var cl_F& r = q_r.remainder; return cl_F_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/float/division/cl_F_ftrunc1.cc0000644000000000000000000000054611201634737015525 0ustar // ftruncate(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" namespace cln { const cl_F ftruncate (const cl_F& x) GEN_F_OP1(x, ftruncate, return) } // namespace cln cln-1.3.3/src/float/division/cl_F_fround1.cc0000644000000000000000000000053511201634737015517 0ustar // fround(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" namespace cln { const cl_F fround (const cl_F& x) GEN_F_OP1(x, fround, return) } // namespace cln cln-1.3.3/src/float/division/cl_F_round1.cc0000644000000000000000000000053511201634737015351 0ustar // round1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" namespace cln { const cl_I round1 (const cl_F& x) GEN_F_OP1(x, round1, return) } // namespace cln cln-1.3.3/src/float/division/cl_F_round2.cc0000644000000000000000000000136311201634737015352 0ustar // round2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F_div_t round2 (const cl_F& x) { floatcase(x , var cl_SF q = fround(x); return cl_F_div_t(cl_SF_to_I(q),x-q); , var cl_FF q = fround(x); return cl_F_div_t(cl_FF_to_I(q),x-q); , var cl_DF q = fround(x); return cl_F_div_t(cl_DF_to_I(q),x-q); , var cl_LF q = fround(x); return cl_F_div_t(cl_LF_to_I(q),LF_LF_minus_LF(x,q)); ); } } // namespace cln cln-1.3.3/src/float/division/cl_F_trunc2.cc0000644000000000000000000000140511201634737015353 0ustar // truncate2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F_div_t truncate2 (const cl_F& x) { floatcase(x , var cl_SF q = ftruncate(x); return cl_F_div_t(cl_SF_to_I(q),x-q); , var cl_FF q = ftruncate(x); return cl_F_div_t(cl_FF_to_I(q),x-q); , var cl_DF q = ftruncate(x); return cl_F_div_t(cl_DF_to_I(q),x-q); , var cl_LF q = ftruncate(x); return cl_F_div_t(cl_LF_to_I(q),LF_LF_minus_LF(x,q)); ); } } // namespace cln cln-1.3.3/src/float/division/cl_F_floor1.cc0000644000000000000000000000053511201634737015343 0ustar // floor1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" namespace cln { const cl_I floor1 (const cl_F& x) GEN_F_OP1(x, floor1, return) } // namespace cln cln-1.3.3/src/float/division/cl_F_ffloor2.cc0000644000000000000000000000133211201634737015506 0ustar // ffloor2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F_fdiv_t ffloor2 (const cl_F& x) { #if 0 // 3 type dispatches var cl_F q = ffloor(x); return cl_F_fdiv_t(q,x-q); #else // 1 type dispatch floatcase(x , var cl_SF q = ffloor(x); return cl_F_fdiv_t(q,x-q); , var cl_FF q = ffloor(x); return cl_F_fdiv_t(q,x-q); , var cl_DF q = ffloor(x); return cl_F_fdiv_t(q,x-q); , var cl_LF q = ffloor(x); return cl_F_fdiv_t(q,LF_LF_minus_LF(x,q)); ); #endif } } // namespace cln cln-1.3.3/src/float/division/cl_F_fceil2.cc0000644000000000000000000000135011201634737015301 0ustar // fceiling2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F_fdiv_t fceiling2 (const cl_F& x) { #if 0 // 3 type dispatches var cl_F q = fceiling(x); return cl_F_fdiv_t(q,x-q); #else // 1 type dispatch floatcase(x , var cl_SF q = fceiling(x); return cl_F_fdiv_t(q,x-q); , var cl_FF q = fceiling(x); return cl_F_fdiv_t(q,x-q); , var cl_DF q = fceiling(x); return cl_F_fdiv_t(q,x-q); , var cl_LF q = fceiling(x); return cl_F_fdiv_t(q,LF_LF_minus_LF(x,q)); ); #endif } } // namespace cln cln-1.3.3/src/float/division/cl_F_floor22.cc0000644000000000000000000000066111201634737015426 0ustar // floor2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" namespace cln { const cl_F_div_t floor2 (const cl_F& x, const cl_F& y) { // Methode: // (q,r) := floor(x/y). Liefere q und x-y*q = y*r. var cl_F_div_t q_r = floor2(x/y); var cl_I& q = q_r.quotient; var cl_F& r = q_r.remainder; return cl_F_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/float/division/cl_F_ceil22.cc0000644000000000000000000000067111201634736015221 0ustar // ceiling2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" namespace cln { const cl_F_div_t ceiling2 (const cl_F& x, const cl_F& y) { // Methode: // (q,r) := ceiling(x/y). Liefere q und x-y*q = y*r. var cl_F_div_t q_r = ceiling2(x/y); var cl_I& q = q_r.quotient; var cl_F& r = q_r.remainder; return cl_F_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/float/division/cl_F_trunc1.cc0000644000000000000000000000054611201634737015357 0ustar // truncate1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" namespace cln { const cl_I truncate1 (const cl_F& x) GEN_F_OP1(x, truncate1, return) } // namespace cln cln-1.3.3/src/float/division/cl_F_fceil1.cc0000644000000000000000000000054311201634737015303 0ustar // fceiling(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" namespace cln { const cl_F fceiling (const cl_F& x) GEN_F_OP1(x, fceiling, return) } // namespace cln cln-1.3.3/src/float/division/cl_F_round22.cc0000644000000000000000000000066111201634737015434 0ustar // round2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" namespace cln { const cl_F_div_t round2 (const cl_F& x, const cl_F& y) { // Methode: // (q,r) := round(x/y). Liefere q und x-y*q = y*r. var cl_F_div_t q_r = round2(x/y); var cl_I& q = q_r.quotient; var cl_F& r = q_r.remainder; return cl_F_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/float/division/cl_F_fround2.cc0000644000000000000000000000133211201634737015514 0ustar // fround2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F_fdiv_t fround2 (const cl_F& x) { #if 0 // 3 type dispatches var cl_F q = fround(x); return cl_F_fdiv_t(q,x-q); #else // 1 type dispatch floatcase(x , var cl_SF q = fround(x); return cl_F_fdiv_t(q,x-q); , var cl_FF q = fround(x); return cl_F_fdiv_t(q,x-q); , var cl_DF q = fround(x); return cl_F_fdiv_t(q,x-q); , var cl_LF q = fround(x); return cl_F_fdiv_t(q,LF_LF_minus_LF(x,q)); ); #endif } } // namespace cln cln-1.3.3/src/float/division/cl_F_ffloor1.cc0000644000000000000000000000053511201634737015511 0ustar // ffloor(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" namespace cln { const cl_F ffloor (const cl_F& x) GEN_F_OP1(x, ffloor, return) } // namespace cln cln-1.3.3/src/float/division/cl_F_floor2.cc0000644000000000000000000000136311201634737015344 0ustar // floor2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F_div_t floor2 (const cl_F& x) { floatcase(x , var cl_SF q = ffloor(x); return cl_F_div_t(cl_SF_to_I(q),x-q); , var cl_FF q = ffloor(x); return cl_F_div_t(cl_FF_to_I(q),x-q); , var cl_DF q = ffloor(x); return cl_F_div_t(cl_DF_to_I(q),x-q); , var cl_LF q = ffloor(x); return cl_F_div_t(cl_LF_to_I(q),LF_LF_minus_LF(x,q)); ); } } // namespace cln cln-1.3.3/src/float/division/cl_F_ceil2.cc0000644000000000000000000000137711201634736015143 0ustar // ceiling2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/float.h" // Implementation. #include "float/cl_F.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F_div_t ceiling2 (const cl_F& x) { floatcase(x , var cl_SF q = fceiling(x); return cl_F_div_t(cl_SF_to_I(q),x-q); , var cl_FF q = fceiling(x); return cl_F_div_t(cl_FF_to_I(q),x-q); , var cl_DF q = fceiling(x); return cl_F_div_t(cl_DF_to_I(q),x-q); , var cl_LF q = fceiling(x); return cl_F_div_t(cl_LF_to_I(q),LF_LF_minus_LF(x,q)); ); } } // namespace cln cln-1.3.3/src/real/0000755000000000000000000000000012173046201010666 5ustar cln-1.3.3/src/real/random/0000755000000000000000000000000012173046201012146 5ustar cln-1.3.3/src/real/random/cl_R_random.cc0000644000000000000000000000142611201634740014701 0ustar // random_R(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "rational/cl_RA.h" #include "cln/io.h" #include "cln/real_io.h" #include "cln/exception.h" #include namespace cln { const cl_R random_R (random_state& r, const cl_R& n) { // n muß eine reelle Zahl sein, >0 und Float oder Integer if (plusp(n)) { if (floatp(n)) { DeclareType(cl_F,n); return random_F(r,n); } else { DeclareType(cl_RA,n); if (integerp(n)) { DeclareType(cl_I,n); return random_I(r,n); } } } std::ostringstream buf; fprint(buf, "random: argument should be positive and an integer or float: "); fprint(buf, n); throw runtime_exception(buf.str()); } } // namespace cln cln-1.3.3/src/real/algebraic/0000755000000000000000000000000012173046201012577 5ustar cln-1.3.3/src/real/algebraic/cl_RA_sqrt.cc0000644000000000000000000000071311201634740015142 0ustar // sqrt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "cln/rational.h" #include "cln/float.h" namespace cln { CL_INLINE const cl_R CL_INLINE_DECL(sqrt) (const cl_RA& x) { var cl_RA w; if (sqrtp(x,&w)) // auf Quadrat testen return w; // war Quadrat, w ist die Wurzel else // x in Float umwandeln, dann die Wurzel ziehen: return sqrt(cl_float(x)); } } // namespace cln cln-1.3.3/src/real/algebraic/cl_R_sqrt.cc0000644000000000000000000000055511201634740015045 0ustar // sqrt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/float.h" #include "cln/rational.h" namespace cln { #include "base/cl_inline.h" #include "real/algebraic/cl_RA_sqrt.cc" const cl_R sqrt (const cl_R& x) GEN_R_OP1_2(x, sqrt, return) } // namespace cln cln-1.3.3/src/real/cl_R.h0000644000000000000000000001611511201634740011724 0ustar // cl_R internals #ifndef _CL_R_H #define _CL_R_H #include "cln/number.h" #include "cln/real.h" namespace cln { extern cl_class cl_class_bignum; extern cl_class cl_class_ratio; extern cl_class cl_class_ffloat; extern cl_class cl_class_dfloat; extern cl_class cl_class_lfloat; // Type tests. inline bool rationalp (const cl_R& x) { if (!x.pointer_p()) { if (x.nonpointer_tag() == cl_FN_tag) return true; } else { if (x.pointer_type()->flags & cl_class_flags_subclass_rational) return true; } return false; } inline bool integerp (const cl_R& x) { if (!x.pointer_p()) { if (x.nonpointer_tag() == cl_FN_tag) return true; } else { if (x.pointer_type() == &cl_class_bignum) return true; } return false; } inline bool floatp (const cl_R& x) { if (!x.pointer_p()) { switch (x.nonpointer_tag()) { case cl_SF_tag: #if defined(CL_WIDE_POINTERS) case cl_FF_tag: #endif return true; } } else { if (x.pointer_type()->flags & cl_class_flags_subclass_float) return true; } return false; } // Comparison with a fixnum. inline bool eq (const cl_R& x, sint32 y) { return x.word == cl_combine(cl_FN_tag,y); } inline bool exact_zerop (const cl_R& x) { return eq(x,0); } // Macro: verteilt je nach Real-Typ eines Floats x auf 2 Statements, // die x vom jeweiligen Real-Typ benutzen dürfen. // realcase2(x, RA_statement,F_statement); // x sollte eine Variable sein. #define realcase2(x, RA_statement,F_statement) \ if (rationalp(x)) \ { var cl_RA& __tmp = *(cl_RA*)&x; var cl_RA& x = __tmp; RA_statement } \ else \ { var cl_F& __tmp = *(cl_F*)&x; var cl_F& x = __tmp; F_statement } // Macro: verteilt je nach Real-Typ eines Floats x auf 7 Statements. // realtypecase(x, FN_statement,BN_statement,RT_statement,SF_statement,FF_statement,DF_statement,LF_statement); // x sollte eine Variable sein. #ifdef CL_WIDE_POINTERS #define realtypecase(x, FN_statement,BN_statement,RT_statement,SF_statement,FF_statement,DF_statement,LF_statement) \ if (!(x).pointer_p()) \ switch ((x).nonpointer_tag()) \ { case cl_FN_tag: { FN_statement } break; \ case cl_SF_tag: { SF_statement } break; \ case cl_FF_tag: { FF_statement } break; \ default: NOTREACHED \ } \ else { \ if ((x).pointer_type() == &cl_class_bignum) { BN_statement } \ else if ((x).pointer_type() == &cl_class_ratio) { RT_statement } \ else if ((x).pointer_type() == &cl_class_dfloat) { DF_statement } \ else if ((x).pointer_type() == &cl_class_lfloat) { LF_statement } \ else NOTREACHED \ } #else #define realtypecase(x, FN_statement,BN_statement,RT_statement,SF_statement,FF_statement,DF_statement,LF_statement) \ if (!(x).pointer_p()) \ switch ((x).nonpointer_tag()) \ { case cl_FN_tag: { FN_statement } break; \ case cl_SF_tag: { SF_statement } break; \ default: NOTREACHED \ } \ else { \ if ((x).pointer_type() == &cl_class_bignum) { BN_statement } \ else if ((x).pointer_type() == &cl_class_ratio) { RT_statement } \ else if ((x).pointer_type() == &cl_class_ffloat) { FF_statement } \ else if ((x).pointer_type() == &cl_class_dfloat) { DF_statement } \ else if ((x).pointer_type() == &cl_class_lfloat) { LF_statement } \ else NOTREACHED \ } #endif // Macro: verteilt je nach Real-Typ eines Floats x auf 7 Statements, // die x vom jeweiligen Real-Typ benutzen dürfen. // realcase7(x, FN_statement,BN_statement,RT_statement,SF_statement,FF_statement,DF_statement,LF_statement); // x sollte eine Variable sein. #define realcase7(x, FN_statement,BN_statement,RT_statement,SF_statement,FF_statement,DF_statement,LF_statement) \ realtypecase(x \ , var cl_FN& __tmp = *(cl_FN*)&x; var cl_FN& x = __tmp; FN_statement \ , var cl_BN& __tmp = *(cl_BN*)&x; var cl_BN& x = __tmp; BN_statement \ , var cl_RT& __tmp = *(cl_RT*)&x; var cl_RT& x = __tmp; RT_statement \ , var cl_SF& __tmp = *(cl_SF*)&x; var cl_SF& x = __tmp; SF_statement \ , var cl_FF& __tmp = *(cl_FF*)&x; var cl_FF& x = __tmp; FF_statement \ , var cl_DF& __tmp = *(cl_DF*)&x; var cl_DF& x = __tmp; DF_statement \ , var cl_LF& __tmp = *(cl_LF*)&x; var cl_LF& x = __tmp; LF_statement \ ) // Macro: verteilt je nach Real-Typ eines Floats x auf 6 Statements, // die x vom jeweiligen Real-Typ benutzen dürfen. // realcase6(x, I_statement,RT_statement,SF_statement,FF_statement,DF_statement,LF_statement); // x sollte eine Variable sein. #define realcase6(x, I_statement,RT_statement,SF_statement,FF_statement,DF_statement,LF_statement) \ realcase7(x, I_statement,I_statement,RT_statement,SF_statement,FF_statement,DF_statement,LF_statement) // contagion(x,y) liefert eine reelle Zahl, die so ungenau ist wie die // ungenauere der beiden reellen Zahlen x und y. extern const cl_R contagion (const cl_R& x, const cl_R& y); // ?? Lieber ein uintL (0, SF_mant_len+1, FF_mant_len+1, DF_mant_len+1, intDsize*len liefern, weniger Kopieraufwand! // GEN_R_OP1_2(arg1,R_OP,ergebnis_zuweisung) // generates the body of a real operation with one argument. // Distinguish two cases (rational/float) only. #define GEN_R_OP1_2(arg1,R_OP,ergebnis_zuweisung) \ { \ realcase2(arg1 \ , ergebnis_zuweisung R_OP(arg1); \ , ergebnis_zuweisung R_OP(arg1); \ ); \ } // GEN_R_OP1_7(arg1,R_OP,ergebnis_zuweisung) // generates the body of a real operation with one argument. // Full type dispatch, faster than GEN_R_OP1_2. #define GEN_R_OP1_7(arg1,R_OP,ergebnis_zuweisung) \ { \ realcase7(arg1 \ , ergebnis_zuweisung R_OP(arg1); \ , ergebnis_zuweisung R_OP(arg1); \ , ergebnis_zuweisung R_OP(arg1); \ , ergebnis_zuweisung R_OP(arg1); \ , ergebnis_zuweisung R_OP(arg1); \ , ergebnis_zuweisung R_OP(arg1); \ , ergebnis_zuweisung R_OP(arg1); \ ); \ } // GEN_R_OP2_2(arg1,arg2,R_OP,ergebnis_zuweisung) // generates the body of a real operation with two arguments. // Distinguish two cases (rational/float) only. #define GEN_R_OP2_2(arg1,arg2,R_OP,ergebnis_zuweisung) \ { \ realcase2(arg1 \ , realcase2(arg2 \ , /* beides rationale Zahlen */ \ ergebnis_zuweisung R_OP(arg1,arg2); \ , /* arg1 rational, arg2 Float -> arg1 in Float umwandeln */ \ ergebnis_zuweisung R_OP(cl_float(arg1,arg2),arg2); \ ); \ , realcase2(arg2 \ , /* arg1 Float, arg2 rational -> arg2 in Float umwandeln */ \ ergebnis_zuweisung R_OP(arg1,cl_float(arg2,arg1)); \ , /* beides Floats */ \ ergebnis_zuweisung R_OP(arg1,arg2); \ ); \ ); \ } // cl_somefloat(x,y) wandelt eine reelle Zahl x in ein Float-Format um // (das von y, falls x rational ist) und rundet dabei nötigenfalls. // > x: eine reelle Zahl // > y: ein Float // < ergebnis: x als Float inline const cl_F cl_somefloat (const cl_R& x, const cl_F& y) { if (rationalp(x)) { DeclareType(cl_RA,x); return cl_float(x,y); } else { DeclareType(cl_F,x); return x; } } } // namespace cln #endif /* _CL_R_H */ cln-1.3.3/src/real/ring/0000755000000000000000000000000012173046201011625 5ustar cln-1.3.3/src/real/ring/cl_R_ring.cc0000644000000000000000000000761511201634740014045 0ustar // Ring of real numbers. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real_ring.h" // Implementation. #include "cln/real.h" #include "real/cl_R.h" #include "cln/io.h" #include "cln/real_io.h" namespace cln { static void R_fprint (cl_heap_ring* R, std::ostream& stream, const _cl_ring_element& x) { unused R; fprint(stream,The(cl_R)(x)); } static bool R_equal (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { unused R; return equal(The(cl_R)(x),The(cl_R)(y)); } static const _cl_ring_element R_zero (cl_heap_ring* R) { return _cl_ring_element(R, (cl_R)0); } static bool R_zerop (cl_heap_ring* R, const _cl_ring_element& x) { unused R; // Here we return true only if x is the *exact* zero. Because we // don't want the degree of polynomials to depend on rounding errors. // For all ring theoretic purposes, we treat 0.0 as if it were a // zero divisor. return exact_zerop(The(cl_R)(x)); } static const _cl_ring_element R_plus (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { return _cl_ring_element(R, The(cl_R)(x) + The(cl_R)(y)); } static const _cl_ring_element R_minus (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { return _cl_ring_element(R, The(cl_R)(x) - The(cl_R)(y)); } static const _cl_ring_element R_uminus (cl_heap_ring* R, const _cl_ring_element& x) { return _cl_ring_element(R, - The(cl_R)(x)); } static const _cl_ring_element R_one (cl_heap_ring* R) { return _cl_ring_element(R, (cl_R)1); } static const _cl_ring_element R_canonhom (cl_heap_ring* R, const cl_I& x) { return _cl_ring_element(R, (cl_R)x); } static const _cl_ring_element R_mul (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y) { return _cl_ring_element(R, The(cl_R)(x) * The(cl_R)(y)); } static const _cl_ring_element R_square (cl_heap_ring* R, const _cl_ring_element& x) { return _cl_ring_element(R, square(The(cl_R)(x))); } static const _cl_ring_element R_expt_pos (cl_heap_ring* R, const _cl_ring_element& x, const cl_I& y) { return _cl_ring_element(R, expt(The(cl_R)(x),y)); } static bool cl_R_p (const cl_number& x) { return (!x.pointer_p() || (x.pointer_type()->flags & cl_class_flags_subclass_real) != 0); } static cl_ring_setops R_setops = { R_fprint, R_equal }; static cl_ring_addops R_addops = { R_zero, R_zerop, R_plus, R_minus, R_uminus }; static cl_ring_mulops R_mulops = { R_one, R_canonhom, R_mul, R_square, R_expt_pos }; static cl_number_ring_ops R_ops = { cl_R_p, equal, exact_zerop, operator+, operator-, operator-, operator*, square, expt }; class cl_heap_real_ring : public cl_heap_number_ring { SUBCLASS_cl_heap_ring() public: // Constructor. cl_heap_real_ring () : cl_heap_number_ring (&R_setops,&R_addops,&R_mulops, (cl_number_ring_ops*) &R_ops) { type = &cl_class_real_ring; } // Destructor. ~cl_heap_real_ring () {} }; static void cl_real_ring_destructor (cl_heap* pointer) { (*(cl_heap_real_ring*)pointer).~cl_heap_real_ring(); } static void cl_real_ring_dprint (cl_heap* pointer) { unused pointer; fprint(cl_debugout, "(cl_real_ring) cl_R_ring"); } static cl_heap_real_ring* cl_heap_real_ring_instance; cl_class cl_class_real_ring; // Constructor. template <> inline cl_real_ring::cl_specialized_number_ring () : cl_number_ring (cl_heap_real_ring_instance) {} const cl_real_ring cl_R_ring = cl_R_ring; int cl_R_ring_init_helper::count = 0; cl_R_ring_init_helper::cl_R_ring_init_helper() { if (count++ == 0) { cl_class_real_ring.destruct = cl_real_ring_destructor; cl_class_real_ring.flags = cl_class_flags_number_ring; cl_class_real_ring.dprint = cl_real_ring_dprint; cl_heap_real_ring_instance = new cl_heap_real_ring(); new((void *)&cl_R_ring) cl_real_ring(); } } cl_R_ring_init_helper::~cl_R_ring_init_helper() { if (--count == 0) { delete cl_heap_real_ring_instance; } } } // namespace cln cln-1.3.3/src/real/conv/0000755000000000000000000000000012173046201011633 5ustar cln-1.3.3/src/real/conv/cl_R_to_double.cc0000644000000000000000000000164511201634740015065 0ustar // cl_R_to_double(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "float/cl_F.h" #include "cln/integer.h" #include "cln/rational.h" #include "cln/float.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #if 0 namespace cln { double double_approx (const cl_R& x) { if (rationalp(x)) { DeclareType(cl_RA,x); return double_approx(x); } else { DeclareType(cl_F,x); return double_approx(x); } } } // namespace cln #else // fully inlined, faster #include "rational/cl_RA.h" #include "integer/cl_I.h" namespace cln { double double_approx (const cl_R& x) { realcase6(x , return double_approx(x); , return double_approx(x); , return double_approx(x); , return double_approx(x); , return double_approx(x); , return double_approx(x); ); } } // namespace cln #endif cln-1.3.3/src/real/conv/cl_F_from_R.cc0000644000000000000000000000131511201634740014313 0ustar // cl_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #if 0 namespace cln { const cl_F cl_float (const cl_R& x, const cl_F& y) { if (rationalp(x)) { DeclareType(cl_RA,x); return cl_float(x,y); } else { DeclareType(cl_F,x); return cl_float(x,y); } } } // namespace cln #else // less type dispatch overhead #include "float/cl_F.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_F cl_float (const cl_R& x, const cl_F& y) { floattypecase(y , return cl_R_to_SF(x); , return cl_R_to_FF(x); , return cl_R_to_DF(x); , return cl_R_to_LF(x,TheLfloat(y)->len); ); } } // namespace cln #endif cln-1.3.3/src/real/conv/cl_R_to_LF.cc0000644000000000000000000000147411201634740014114 0ustar // cl_F_to_LF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "float/cl_F.h" #include "float/lfloat/cl_LF.h" #if 0 namespace cln { const cl_LF cl_R_to_LF (const cl_R& x, uintC len) { if (rationalp(x)) { DeclareType(cl_RA,x); return cl_RA_to_LF(x,len); } else { DeclareType(cl_F,x); return cl_F_to_LF(x,len); } } } // namespace cln #else // fully inlined, faster #include "rational/cl_RA.h" #include "integer/cl_I.h" namespace cln { const cl_LF cl_R_to_LF (const cl_R& x, uintC len) { realcase6(x , return cl_I_to_LF(x,len); , return cl_RA_to_LF(x,len); , return cl_SF_to_LF(x,len); , return cl_FF_to_LF(x,len); , return cl_DF_to_LF(x,len); , return LF_to_LF(x,len); ); } } // namespace cln #endif cln-1.3.3/src/real/conv/cl_F_from_R_f.cc0000644000000000000000000000065511201634740014626 0ustar // cl_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/float.h" #include "float/cl_F.h" namespace cln { const cl_F cl_float (const cl_R& x, float_format_t f) { floatformatcase((uintC)f , return cl_R_to_SF(x); , return cl_R_to_FF(x); , return cl_R_to_DF(x); , return cl_R_to_LF(x,len); ); } } // namespace cln cln-1.3.3/src/real/conv/cl_R_to_DF.cc0000644000000000000000000000137411201634740014103 0ustar // cl_F_to_DF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "float/cl_F.h" #include "float/dfloat/cl_DF.h" #if 0 namespace cln { const cl_DF cl_R_to_DF (const cl_R& x) { if (rationalp(x)) { DeclareType(cl_RA,x); return cl_RA_to_DF(x); } else { DeclareType(cl_F,x); return cl_F_to_DF(x); } } } // namespace cln #else // fully inlined, faster #include "rational/cl_RA.h" #include "integer/cl_I.h" namespace cln { const cl_DF cl_R_to_DF (const cl_R& x) { realcase6(x , return cl_I_to_DF(x); , return cl_RA_to_DF(x); , return cl_SF_to_DF(x); , return cl_FF_to_DF(x); , return x; , return cl_LF_to_DF(x); ); } } // namespace cln #endif cln-1.3.3/src/real/conv/cl_F_from_R_def.cc0000644000000000000000000000056311201634740015135 0ustar // cl_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" namespace cln { CL_INLINE const cl_F CL_INLINE_DECL(cl_float) (const cl_R& x) { if (rationalp(x)) { DeclareType(cl_RA,x); return cl_float(x); } else { DeclareType(cl_F,x); return x; } } } // namespace cln cln-1.3.3/src/real/conv/cl_R_to_SF.cc0000644000000000000000000000137411201634740014122 0ustar // cl_R_to_SF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #if 0 namespace cln { const cl_SF cl_R_to_SF (const cl_R& x) { if (rationalp(x)) { DeclareType(cl_RA,x); return cl_RA_to_SF(x); } else { DeclareType(cl_F,x); return cl_F_to_SF(x); } } } // namespace cln #else // fully inlined, faster #include "rational/cl_RA.h" #include "integer/cl_I.h" namespace cln { const cl_SF cl_R_to_SF (const cl_R& x) { realcase6(x , return cl_I_to_SF(x); , return cl_RA_to_SF(x); , return x; , return cl_FF_to_SF(x); , return cl_DF_to_SF(x); , return cl_LF_to_SF(x); ); } } // namespace cln #endif cln-1.3.3/src/real/conv/cl_R_to_FF.cc0000644000000000000000000000137411201634740014105 0ustar // cl_R_to_FF(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "float/cl_F.h" #include "float/ffloat/cl_FF.h" #if 0 namespace cln { const cl_FF cl_R_to_FF (const cl_R& x) { if (rationalp(x)) { DeclareType(cl_RA,x); return cl_RA_to_FF(x); } else { DeclareType(cl_F,x); return cl_F_to_FF(x); } } } // namespace cln #else // fully inlined, faster #include "rational/cl_RA.h" #include "integer/cl_I.h" namespace cln { const cl_FF cl_R_to_FF (const cl_R& x) { realcase6(x , return cl_I_to_FF(x); , return cl_RA_to_FF(x); , return cl_SF_to_FF(x); , return x; , return cl_DF_to_FF(x); , return cl_LF_to_FF(x); ); } } // namespace cln #endif cln-1.3.3/src/real/conv/cl_R_to_float.cc0000644000000000000000000000163011201634740014712 0ustar // cl_R_to_float(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "float/cl_F.h" #include "cln/integer.h" #include "cln/rational.h" #include "cln/float.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #if 0 namespace cln { float float_approx (const cl_R& x) { if (rationalp(x)) { DeclareType(cl_RA,x); return float_approx(x); } else { DeclareType(cl_F,x); return float_approx(x); } } } // namespace cln #else // fully inlined, faster #include "rational/cl_RA.h" #include "integer/cl_I.h" namespace cln { float float_approx (const cl_R& x) { realcase6(x , return float_approx(x); , return float_approx(x); , return float_approx(x); , return float_approx(x); , return float_approx(x); , return float_approx(x); ); } } // namespace cln #endif cln-1.3.3/src/real/transcendental/0000755000000000000000000000000012173046201013673 5ustar cln-1.3.3/src/real/transcendental/cl_R_atan.cc0000644000000000000000000000040511201634740016065 0ustar // atan(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. namespace cln { const cl_R atan (const cl_R& x) { // Methode: // arctan(x) = arctan(X=1,Y=x). return atan(1,x); } } // namespace cln cln-1.3.3/src/real/transcendental/cl_R_exp.cc0000644000000000000000000000105311201634740015736 0ustar // exp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "cln/float.h" #include "real/cl_R.h" namespace cln { const cl_R exp (const cl_R& x) { // Methode: // x rational -> bei x=0 1 als Ergebnis, sonst x in Float umwandeln. // x Float -> bekannt. if (rationalp(x)) { DeclareType(cl_RA,x); if (zerop(x)) // x=0 -> 1 als Ergebnis return 1; return exp(cl_float(x)); // sonst in Float umwandeln } else { DeclareType(cl_F,x); return exp(x); } } } // namespace cln cln-1.3.3/src/real/transcendental/cl_R_cos.cc0000644000000000000000000000105311201634740015726 0ustar // cos(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "cln/float.h" #include "real/cl_R.h" namespace cln { const cl_R cos (const cl_R& x) { // Methode: // x rational -> bei x=0 1 als Ergebnis, sonst x in Float umwandeln. // x Float -> bekannt. if (rationalp(x)) { DeclareType(cl_RA,x); if (zerop(x)) // x=0 -> 1 als Ergebnis return 1; return cos(cl_float(x)); // sonst in Float umwandeln } else { DeclareType(cl_F,x); return cos(x); } } } // namespace cln cln-1.3.3/src/real/transcendental/cl_R_atan2.cc0000644000000000000000000000413211201634740016150 0ustar // atan(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "cln/float.h" #include "float/transcendental/cl_F_tran.h" #include "base/cl_N.h" #include "real/cl_R.h" namespace cln { const cl_R atan (const cl_R& x, const cl_R& y) { // Methode: // y=0 -> bei x>0: 0 als Ergebnis, // bei x<0: pi als Ergebnis. // bei x=0: Error. // x=0 -> bei y>0: pi/2 als Ergebnis. // bei y<0: -pi/2 als Ergebnis. // bei y=0: Error. // Falls x und y beide rational: beide in Floats umwandeln. // 0 <= |y| <= x -> atan(y/x) // 0 <= |x| <= y -> pi/2 - atan(x/y) // 0 <= |x| <= -y -> -pi/2 - atan(x/y) // 0 <= |y| <= -x -> für y>=0: pi + atan(y/x), für y<0: -pi + atan(y/x) if (eq(y,0)) { // y=0 (exakt) if (zerop(x)) // x=0 -> Error { throw division_by_0_exception(); } if (minusp(x)) // x<0 -> pi in Default-Float-Genauigkeit { return pi(); } return 0; // x>0 -> 0 } elif (eq(x,0)) { // x=0 (exakt) if (zerop(y)) // y=0 -> Error { throw division_by_0_exception(); } if (minusp(y)) // y<0 -> -pi/2 { return - scale_float(pi(),-1); } return scale_float(pi(),-1); // y>0 -> pi/2 } else { Mutable(cl_R,x); Mutable(cl_R,y); // Check special case of rational numbers: if (rationalp(x)) if (rationalp(y)) { // x,y in Floats umwandeln: x = cl_float(The(cl_RA)(x)); y = cl_float(The(cl_RA)(y)); } // x,y nicht exakt =0, x/y und y/x werden Floats sein. if (abs(x) >= abs(y)) { // |x| >= |y| var cl_F z = atanx(The(cl_F)(y/x)); // Division war erfolgreich, also x/=0. if (minusp(x)) // x<0 -> pi bzw. -pi addieren: if (!minusp(y)) // y>=0 -> atan(y/x) + pi return z + pi(z); else // y<0 -> atan(y/x) - pi return z - pi(z); else return z; } else { // |x| < |y| var cl_F z = atanx(The(cl_F)(x/y)); // von pi/2 bzw. -pi/2 subtrahieren: if (!minusp(y)) // y>=0 -> pi/2 - atan(x/y) return scale_float(pi(z),-1) - z; else // y<0 -> -pi/2 - atan(x/y) return - scale_float(pi(z),-1) - z; } } } } // namespace cln cln-1.3.3/src/real/transcendental/cl_R_log.cc0000644000000000000000000000241511201634740015726 0ustar // log(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "base/cl_N.h" #include "real/cl_R.h" #include "cln/rational.h" #include "cln/float.h" namespace cln { const cl_R log (const cl_R& a, const cl_R& b) { // Methode: // a und b rational: // b=1 -> Error // log(a,b) rational errechenbar -> liefern. // Sonst a und b in Floats umwandeln. // a Float, b rational -> bei b=1 Error, sonst b := (float b a) // a rational, b Float -> bei a=1 Ergebnis 0, sonst a := (float a b) // a,b Floats -> log(a,b) = ln(a)/ln(b) { Mutable(cl_R,a); Mutable(cl_R,b); if (rationalp(b)) { // b rational if (eq(b,1)) { throw division_by_0_exception(); } if (rationalp(a)) { // a,b beide rational var cl_RA l; if (logp(The(cl_RA)(a),The(cl_RA)(b),&l)) return l; // a,b beide in Floats umwandeln: a = cl_float(The(cl_RA)(a)); b = cl_float(The(cl_RA)(b)); } else // a Float b = cl_float(The(cl_RA)(b),The(cl_F)(a)); // b := (float b a) } else { // b Float if (rationalp(a)) { if (eq(a,1)) { return 0; } // a=1 -> Ergebnis 0 a = cl_float(The(cl_RA)(a),The(cl_F)(b)); // a := (float a b) } } // Nun a,b beide Floats. return ln(The(cl_F)(a)) / ln(The(cl_F)(b)); }} } // namespace cln cln-1.3.3/src/real/transcendental/cl_R_sin.cc0000644000000000000000000000105311201634740015733 0ustar // sin(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "cln/float.h" #include "real/cl_R.h" namespace cln { const cl_R sin (const cl_R& x) { // Methode: // x rational -> bei x=0 0 als Ergebnis, sonst x in Float umwandeln. // x Float -> bekannt. if (rationalp(x)) { DeclareType(cl_RA,x); if (zerop(x)) // x=0 -> 0 als Ergebnis return 0; return sin(cl_float(x)); // sonst in Float umwandeln } else { DeclareType(cl_F,x); return sin(x); } } } // namespace cln cln-1.3.3/src/real/transcendental/cl_R_cosh.cc0000644000000000000000000000105711201634740016102 0ustar // cosh(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "cln/float.h" #include "real/cl_R.h" namespace cln { const cl_R cosh (const cl_R& x) { // Methode: // x rational -> bei x=0 1 als Ergebnis, sonst x in Float umwandeln. // x Float -> bekannt. if (rationalp(x)) { DeclareType(cl_RA,x); if (zerop(x)) // x=0 -> 1 als Ergebnis return 1; return cosh(cl_float(x)); // sonst in Float umwandeln } else { DeclareType(cl_F,x); return cosh(x); } } } // namespace cln cln-1.3.3/src/real/transcendental/cl_R_sinh.cc0000644000000000000000000000105711201634740016107 0ustar // sinh(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "cln/float.h" #include "real/cl_R.h" namespace cln { const cl_R sinh (const cl_R& x) { // Methode: // x rational -> bei x=0 0 als Ergebnis, sonst x in Float umwandeln. // x Float -> bekannt. if (rationalp(x)) { DeclareType(cl_RA,x); if (zerop(x)) // x=0 -> 0 als Ergebnis return 0; return sinh(cl_float(x)); // sonst in Float umwandeln } else { DeclareType(cl_F,x); return sinh(x); } } } // namespace cln cln-1.3.3/src/real/transcendental/cl_R_tan.cc0000644000000000000000000000050011201634740015720 0ustar // tan(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. namespace cln { CL_INLINE const cl_R CL_INLINE_DECL(tan) (const cl_R& x) { // Methode: // (/ (sin x) (cos x)) var cos_sin_t trig = cos_sin(x); return trig.sin / trig.cos; } } // namespace cln cln-1.3.3/src/real/transcendental/cl_R_coshsinh.cc0000644000000000000000000000114111201634740016756 0ustar // cosh_sinh(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "cln/float.h" #include "real/cl_R.h" namespace cln { const cosh_sinh_t cosh_sinh (const cl_R& x) { // Methode: // x rational -> bei x=0 (1,0) als Ergebnis, sonst x in Float umwandeln. // x Float -> bekannt. if (rationalp(x)) { DeclareType(cl_RA,x); if (zerop(x)) // x=0 -> (1,0) als Ergebnis return cosh_sinh_t(1,0); return cosh_sinh(cl_float(x)); // sonst in Float umwandeln } else { DeclareType(cl_F,x); return cosh_sinh(x); } } } // namespace cln cln-1.3.3/src/real/transcendental/cl_R_cossin.cc0000644000000000000000000000112511201634740016440 0ustar // cos_sin(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "cln/float.h" #include "real/cl_R.h" namespace cln { const cos_sin_t cos_sin (const cl_R& x) { // Methode: // x rational -> bei x=0 (1,0) als Ergebnis, sonst x in Float umwandeln. // x Float -> bekannt. if (rationalp(x)) { DeclareType(cl_RA,x); if (zerop(x)) // x=0 -> (1,0) als Ergebnis return cos_sin_t(1,0); return cos_sin(cl_float(x)); // sonst in Float umwandeln } else { DeclareType(cl_F,x); return cos_sin(x); } } } // namespace cln cln-1.3.3/src/real/transcendental/cl_R_tanh.cc0000644000000000000000000000050711201634740016077 0ustar // tanh(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. namespace cln { CL_INLINE const cl_R CL_INLINE_DECL(tanh) (const cl_R& x) { // Methode: // (/ (sinh x) (cosh x)) var cosh_sinh_t hyp = cosh_sinh(x); return hyp.sinh / hyp.cosh; } } // namespace cln cln-1.3.3/src/real/transcendental/cl_R_ln.cc0000644000000000000000000000104511201634740015554 0ustar // ln(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "cln/float.h" #include "real/cl_R.h" namespace cln { const cl_R ln (const cl_R& x) { // Methode: // x rational -> bei x=1 0 als Ergebnis, sonst x in Float umwandeln. // x Float -> bekannt. if (rationalp(x)) { DeclareType(cl_RA,x); if (x == 1) // x=1 -> 0 als Ergebnis return 0; return ln(cl_float(x)); // sonst in Float umwandeln } else { DeclareType(cl_F,x); return ln(x); } } } // namespace cln cln-1.3.3/src/real/misc/0000755000000000000000000000000012173046201011621 5ustar cln-1.3.3/src/real/misc/cl_R_signum.cc0000644000000000000000000000122411201634740014372 0ustar // signum(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" /* use inline versions of zerop */ #include "base/cl_inline.h" #include "integer/misc/cl_I_signum.cc" #include "rational/misc/cl_RA_signum.cc" /* use inline versions of signum */ #include "base/cl_inline2.h" #include "float/sfloat/misc/cl_SF_signum.cc" #include "float/ffloat/misc/cl_FF_signum.cc" #include "float/dfloat/misc/cl_DF_signum.cc" #include "float/lfloat/misc/cl_LF_signum.cc" namespace cln { const cl_R CL_FLATTEN signum (const cl_R& x) GEN_R_OP1_7(x, signum_inline, return) } // namespace cln cln-1.3.3/src/real/misc/cl_R_expt.cc0000644000000000000000000000231111201634740014046 0ustar // expt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "cln/integer.h" namespace cln { // Methode: // Für y>0: // a:=x, b:=y. // Solange b gerade, setze a:=a*a, b:=b/2. [a^b bleibt invariant, = x^y.] // c:=a. // Solange b:=floor(b/2) >0 ist, // setze a:=a*a, und falls b ungerade, setze c:=a*c. // Ergebnis c. // Für y=0: Ergebnis 1. // Für y<0: (/ (expt x (- y))). // Assume y>0. inline const cl_R expt_pos (const cl_R& x, uintL y) { if (rationalp(x)) { DeclareType(cl_RA,x); return expt(x,y); // x rational -> schnellere Routine } else { DeclareType(cl_F,x); var cl_F a = x; var uintL b = y; while (!(b % 2)) { a = square(a); b = b >> 1; } var cl_F c = a; until (b == 1) { b = b >> 1; a = square(a); if (b % 2) { c = a * c; } } return c; } } const cl_R expt (const cl_R& x, sintL y) { if (y==0) { return 1; } // y=0 -> Ergebnis 1 var uintL abs_y = (y<0 ? (uintL)(-y) : y); // Betrag von y nehmen var cl_R z = expt_pos(x,abs_y); // (expt x (abs y)) return (y<0 ? recip(z) : z); // evtl. noch Kehrwert nehmen } } // namespace cln cln-1.3.3/src/real/misc/cl_R_min.cc0000644000000000000000000000035511201634740013657 0ustar // min(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. namespace cln { const cl_R min (const cl_R& x, const cl_R& y) { return (x <= y ? x : y); } } // namespace cln cln-1.3.3/src/real/misc/cl_R_eqhashcode.cc0000644000000000000000000000127011201634740015175 0ustar // cl_R equal_hashcode(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "base/cl_N.h" #include "real/cl_R.h" #include "rational/cl_RA.h" #include "integer/cl_I.h" #include "float/cl_F.h" #include "base/cl_inline.h" #include "float/sfloat/misc/cl_SF_eqhashcode.cc" #include "float/ffloat/misc/cl_FF_eqhashcode.cc" #include "float/dfloat/misc/cl_DF_eqhashcode.cc" #include "float/lfloat/misc/cl_LF_eqhashcode.cc" #include "base/cl_inline2.h" #include "rational/misc/cl_RA_eqhashcode.cc" namespace cln { uint32 CL_FLATTEN equal_hashcode (const cl_R& x) GEN_R_OP1_7(x, equal_hashcode_inline, return) } // namespace cln cln-1.3.3/src/real/misc/cl_R_debug.cc0000644000000000000000000000104211201634740014154 0ustar // cl_R debugging support. // General includes. #include "base/cl_sysdep.h" // Specification. // Implementation. namespace cln { // This dummy links in this module when requires it. int cl_R_debug_module; extern int cl_SF_debug_module; extern int cl_FF_debug_module; extern int cl_DF_debug_module; extern int cl_LF_debug_module; extern int cl_RA_debug_module; static void* dummy[] = { &dummy, &cl_SF_debug_module, &cl_FF_debug_module, &cl_DF_debug_module, &cl_LF_debug_module, &cl_RA_debug_module }; } // namespace cln cln-1.3.3/src/real/misc/cl_R_as.cc0000644000000000000000000000154011201634740013474 0ustar // cl_R_As(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "base/cl_N.h" namespace cln { // Cf. cl_R_p in cl_R_ring.cc. // But here, for better inlining in g++, it is preferrable to finish every // alternative with either "return true;" or "return false;". inline bool cl_R_p (const cl_number& x) { if (!x.pointer_p()) switch (x.nonpointer_tag()) { case cl_FN_tag: case cl_SF_tag: #if defined(CL_WIDE_POINTERS) case cl_FF_tag: #endif return true; } else if (x.pointer_type()->flags & cl_class_flags_subclass_real) return true; return false; } const cl_R& cl_R_As (const cl_number& x, const char * filename, int line) { if (cl_R_p(x)) { DeclareType(cl_R,x); return x; } else throw as_exception(x,"a real number",filename,line); } } // namespace cln cln-1.3.3/src/real/misc/cl_R_max.cc0000644000000000000000000000035511201634740013661 0ustar // max(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. namespace cln { const cl_R max (const cl_R& x, const cl_R& y) { return (x >= y ? x : y); } } // namespace cln cln-1.3.3/src/real/misc/cl_R_rational.cc0000644000000000000000000000040411201634740014700 0ustar // rational(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" namespace cln { const cl_RA rational (const cl_R& x) GEN_R_OP1_2(x, rational, return) } // namespace cln cln-1.3.3/src/real/misc/cl_R_rationalize.cc0000644000000000000000000000673511201634740015425 0ustar // rationalize(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/float.h" #include "cln/rational.h" #include "cln/integer.h" #include "rational/cl_RA.h" #include "integer/cl_I.h" namespace cln { // Methode (rekursiv dargestellt): // Falls x rational ist: x. // Falls x=0.0: 0. // Falls x<0.0: (- (rationalize (- x))) // Falls x>0.0: // (Integer-Decode-Float x) liefert m,e,s=1. // Falls e>=0 : Liefere x=m*2^e als Ergebnis. // Suche rationale Zahl zwischen a=(m-1/2)*2^e und b=(m+1/2)*2^e mit // möglichst kleinem Zähler und Nenner. (a,b einschließlich, aber da a,b // den Nenner 2^(|e|+1) haben, während x selbst den Nenner <=2^|e| hat, // können weder a noch b als Ergebnis herauskommen.) // Suche also bei gegebenem a,b (0=0 -> m*2^e*s als Ergebnis (darin ist x=0.0 inbegriffen). // Bilde a:=(2*m-1)*2^(e-1) und b:=(2*m+1)*2^(e-1), rationale Zahlen >0, // (unkürzbar, da Nenner Zweierpotenz und Zähler ungerade). // Starte Kettenbruchentwicklung (d.h. p[-1]:=0, p[0]:=1, q[-1]:=1, q[0]:=0, i:=0.) // Schleife: // c:=(ceiling a) // if c>=b then k:=c-1, "Ziffer k", (a,b) := (1/(b-k),1/(a-k)), goto Schleife // "Ziffer c". // (Dabei bedeutet "Ziffer a" die Iteration // i:=i+1, p[i]:=a*p[i-1]+p[i-2], q[i]:=a*q[i-1]+q[i-2].) // Ende, liefere s * (p[i]/q[i]), das ist wegen der Invarianten // p[i]*q[i-1]-p[i-1]*q[i]=(-1)^i ein bereits gekürzter Bruch. inline const cl_RA rationalize (const cl_RA& x) { // x rational -> x als Ergebnis. return x; } inline const cl_RA rationalize (const cl_F& x) { var cl_idecoded_float x_decoded = integer_decode_float(x); var cl_I& m = x_decoded.mantissa; var cl_I& e = x_decoded.exponent; var cl_I& s = x_decoded.sign; if (!minusp(e)) { // e>=0. var cl_I y = ash(m,e); if (minusp(s)) { y = -y; } return y; } // e<0. var cl_I m2 = ash(m,1); // 2*m var cl_I num1 = minus1(m2); // 2*m-1 var cl_I num2 = plus1(m2); // 2*m+1 var cl_I den = ash(1,plus1(-e)); // 2^(1-e) var cl_RA a = I_I_to_RT(num1,den); // a := (2*m-1)/(2^(1-e)) var cl_RA b = I_I_to_RT(num2,den); // b := (2*m+1)/(2^(1-e)) var cl_I p_iminus1 = 0; // p[i-1] var cl_I p_i = 1; // p[i] var cl_I q_iminus1 = 1; // q[i-1] var cl_I q_i = 0; // q[i] var cl_I c; for (;;) { c = ceiling1(a); if (c < b) break; var cl_I k = minus1(c); // k = c-1 { var cl_I p_iplus1 = k * p_i + p_iminus1; p_iminus1 = p_i; p_i = p_iplus1; } { var cl_I q_iplus1 = k * q_i + q_iminus1; q_iminus1 = q_i; q_i = q_iplus1; } { var cl_RA new_b = recip(a-k); // 1/(a-k) var cl_RA new_a = recip(b-k); // 1/(b-k) a = new_a; b = new_b; } } // letzte "Ziffer" k=c : var cl_I p_last = c * p_i + p_iminus1; var cl_I q_last = c * q_i + q_iminus1; if (minusp(s)) p_last = - p_last; return I_I_to_RA(p_last,q_last); // +-p[i] / q[i] bilden } const cl_RA rationalize (const cl_R& x) GEN_R_OP1_2(x, rationalize, return) } // namespace cln cln-1.3.3/src/real/misc/cl_R_contagion.cc0000644000000000000000000000152211201634740015052 0ustar // contagion(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "real/cl_R.h" // Implementation. #include "float/lfloat/cl_LF.h" namespace cln { const cl_R contagion (const cl_R& x, const cl_R& y) { #define X { return x; } #define Y { return y; } #if 0 if (R_rationalp(x)) Y elif (R_rationalp(y)) X else floattypecase(x , X // floattypecase(y, X,X,X,X) , floattypecase(y, Y,X,X,X) , floattypecase(y, Y,Y,X,X) , floattypecase(y, Y,Y,Y, if (TheLfloat(x)->len <= TheLfloat(y)->len) X else Y ) ); #else // faster type dispatch realtypecase(x , Y , Y , Y , X // realtypecase(y, X,X,X, X,X,X,X) , realtypecase(y, X,X,X, Y,X,X,X) , realtypecase(y, X,X,X, Y,Y,X,X) , realtypecase(y, X,X,X, Y,Y,Y, if (TheLfloat(x)->len <= TheLfloat(y)->len) X else Y ) ); #endif } } // namespace cln cln-1.3.3/src/real/misc/cl_R_expt_I.cc0000644000000000000000000000243211201634740014322 0ustar // expt(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "cln/integer.h" #include "integer/cl_I.h" namespace cln { // Methode: // Für y>0: // a:=x, b:=y. // Solange b gerade, setze a:=a*a, b:=b/2. [a^b bleibt invariant, = x^y.] // c:=a. // Solange b:=floor(b/2) >0 ist, // setze a:=a*a, und falls b ungerade, setze c:=a*c. // Ergebnis c. // Für y=0: Ergebnis 1. // Für y<0: (/ (expt x (- y))). // Assume y>0. inline const cl_R expt_pos (const cl_R& x, const cl_I& y) { if (rationalp(x)) { DeclareType(cl_RA,x); return expt(x,y); // x rational -> schnellere Routine } else { DeclareType(cl_F,x); var cl_F a = x; var cl_I b = y; while (!oddp(b)) { a = square(a); b = b >> 1; } var cl_F c = a; until (eq(b,1)) { b = b >> 1; a = square(a); if (oddp(b)) { c = a * c; } } return c; } } const cl_R expt (const cl_R& x, const cl_I& y) { if (eq(y,0)) { return 1; } // y=0 -> Ergebnis 1 var bool y_negative = minusp(y); var cl_I abs_y = (y_negative ? -y : y); // Betrag von y nehmen var cl_R z = expt_pos(x,abs_y); // (expt x (abs y)) return (y_negative ? recip(z) : z); // evtl. noch Kehrwert nehmen } } // namespace cln cln-1.3.3/src/real/misc/cl_R_abs.cc0000644000000000000000000000043511201634740013640 0ustar // abs(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. namespace cln { const cl_R abs (const cl_R& x) { // Methode: // Bei x<0: (- x), sonst x. if (minusp(x)) return -x; else return x; } } // namespace cln cln-1.3.3/src/real/format-output/0000755000000000000000000000000012173046201013514 5ustar cln-1.3.3/src/real/format-output/cl_format.h0000644000000000000000000000630111201634740015635 0ustar // Formatted output functions à la Common Lisp. #ifndef _CL_FORMAT_H #define _CL_FORMAT_H #include "cln/number.h" #include "cln/io.h" #include "cln/float.h" namespace cln { // gibt arg als römische Zahl auf stream aus, z.B. 4 als IIII. extern void format_old_roman (std::ostream& stream, const cl_I& arg); // gibt arg als römische Zahl auf stream aus, z.B. 4 als IV. extern void format_new_roman (std::ostream& stream, const cl_I& arg); extern const char * const cl_format_tens [10]; // gibt die ganze Zahl arg im Klartext auf englisch auf den Stream aus. extern void format_cardinal (std::ostream& stream, const cl_I& arg); // gibt eine ganze Zahl arg als Abzählnummer im Klartext auf englisch // auf den stream aus. extern void format_ordinal (std::ostream& stream, const cl_I& arg); // gibt count (>=0) Zeichen ch auf stream aus. inline void format_padding (std::ostream& stream, sintL count, char ch) { for (; count >= 0; count--) fprintchar(stream,ch); } // gibt auf den Stream stream aus: // den String str, eventuell aufgefüllt mit Padding characters padchar. // Und zwar so, daß die Breite mindestens mincol ist. Um das zu erreichen, // werden mindestens minpad Zeichen eingefügt, eventuelle weitere dann in // Blöcken à colinc Zeichen. Falls padleftflag, werden sie links eingefügt, // sonst rechts vom String. extern void format_padded_string (std::ostream& stream, sintL mincol, sintL colinc, sintL minpad, char padchar, bool padleftflag, const char * str); // gibt den Integer arg auf den Stream aus: // in Zahlenbasis base, mit Vorzeichen (+ nur falls >0 und positive-sign-flag), // bei commaflag alle drei Stellen unterbrochen durch ein Zeichen commachar. // Das Ganze links aufgefüllt mit padchar's, so daß die Gesamtbreite mindestens // mincol ist. extern void format_integer (std::ostream& stream, const cl_I& arg, unsigned int base, sintL mincol, char padchar, char commachar, uintL commainterval, bool commaflag, bool positive_sign_flag); // format_scale_exponent(arg) liefert zur Floating-Point-Zahl arg // drei Werte: mantissa und n, mit // ganzem n und mantissa floating-point, 0.1 <= mantissa < 1, // arg = mantissa * 10^n * sign (also 10^(n-1) <= abs(arg) < 10^n ). // (Bei arg=0.0: 0.0 und n=0.) extern const decoded_float format_scale_exponent (const cl_F& arg); // format_float_to_string(arg,width,d,k,dmin) // ergibt einen String zum Floating-point arg: // er hat den Wert von abs(arg)*expt(10,k), dabei mind. d Nachkommastellen // und höchstens die Länge width (width<=0 -> keine Einschränkung). // Trotzdem wird nicht auf weniger als dmin Stellen gerundet. struct digits_with_dot { char * string; // Mit malloc_hook() alloziert, mit free_hook() freizugeben. uintL length; // strlen(string) bool dot_comes_first; // string[0] == '.' ? bool dot_comes_last; // string[strlen(string)-1] == '.' ? uintL dot_position; // string[dot_position] is '.' // Constructor. digits_with_dot (char* s, uintL l, bool df, bool dl, uintL dp) : string(s), length(l), dot_comes_first(df), dot_comes_last(dl), dot_position(dp) {} }; extern const digits_with_dot format_float_to_string (const cl_F& arg, const sintL width, const sintL d, const sintL k, const sintL dmin); } // namespace cln #endif /* _CL_FORMAT_H */ cln-1.3.3/src/real/format-output/cl_fmt_oldroman.cc0000644000000000000000000000206211201634740017164 0ustar // format_old_roman(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "real/format-output/cl_format.h" // Implementation. #include #include "cln/integer.h" #include "cln/integer_io.h" #include "cln/exception.h" namespace cln { void format_old_roman (std::ostream& stream, const cl_I& arg) { if (!(0 < arg && arg < 5000)) { std::ostringstream buf; fprint(buf, "format_old_roman: argument should be in the range 1 - 4999, not "); fprint(buf, arg); fprint(buf, "\n"); throw runtime_exception(buf.str()); } var uintL value = cl_I_to_UL(arg); struct roman { char symbol; uintL value; }; static const roman scale[7] = { { 'I', 1 }, { 'V', 5 }, { 'X', 10 }, { 'L', 50 }, { 'C', 100 }, { 'D', 500 }, { 'M', 1000 }, }; for (int i = 6; value > 0 /* && i >= 0 */ ; i--) { var const roman * p = &scale[i]; var uintL multiplicity = floor(value,p->value); value = value % p->value; while (multiplicity > 0) { fprintchar(stream,p->symbol); multiplicity--; } } } } // namespace cln cln-1.3.3/src/real/format-output/cl_fmt_integer.cc0000644000000000000000000000413711201634740017013 0ustar // format_integer(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "real/format-output/cl_format.h" // Implementation. #include "cln/integer_io.h" #include #include "integer/cl_I.h" namespace cln { void format_integer (std::ostream& stream, const cl_I& arg, unsigned int base, sintL mincol, char padchar, char commachar, uintL commainterval, bool commaflag, bool positive_sign_flag) { if ((mincol == 0) && !commaflag && !positive_sign_flag) { // Normale Ausgabe tut's. print_integer(stream,base,arg); return; } var char* oldstring = print_integer_to_string(base,arg); var uintL oldstring_length = ::strlen(oldstring); var uintL number_of_digits = (minusp(arg) ? oldstring_length-1 : oldstring_length); var uintL number_of_commas = (commaflag ? floor(number_of_digits-1,commainterval) : 0); var bool positive_sign = positive_sign_flag && (arg > 0); var uintL newstring_length = (positive_sign ? 1 : 0) + oldstring_length + number_of_commas; var char* newstring = (char *) malloc_hook(newstring_length+1); newstring[newstring_length] = '\0'; // newstring termination // newstring füllen: { // Erst Vorzeichen +: if (positive_sign) newstring[0] = '+'; // Dann oldstring in newstring übertragen, dabei Kommata überspringen: var uintL oldpos = oldstring_length; var uintL oldpos_mod = 0; // = (oldstring_length - oldpos) % commainterval var uintL newpos = newstring_length; until (oldpos == 0) { newstring[--newpos] = oldstring[--oldpos]; if (number_of_commas > 0) { // Check whether ((oldstring_length - oldpos) % commainterval) == 0 if (++oldpos_mod == commainterval) { oldpos_mod = 0; // noch ein Komma einzufügen newstring[--newpos] = commachar; number_of_commas--; } } } } #if 0 format_padded_string(stream,mincol,1,0,padchar,true,newstring); #else // expand this special case of format_padded_string inline: if ((sintL)newstring_length < mincol) format_padding(stream,mincol-newstring_length,padchar); fprint(stream,newstring); #endif free_hook(newstring); free_hook(oldstring); } } // namespace cln cln-1.3.3/src/real/format-output/cl_fmt_ordinal.cc0000644000000000000000000000310711201634740017002 0ustar // format_ordinal(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "real/format-output/cl_format.h" // Implementation. #include "cln/integer.h" namespace cln { static const char * const cl_format_ordinal_ones [20] = { NULL, "first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "ninth", "tenth", "eleventh", "twelfth", "thirteenth", "fourteenth", "fifteenth", "sixteenth", "seventeenth", "eighteenth", "nineteenth", }; static const char * const cl_format_ordinal_tens [10] = { NULL, "tenth", "twentieth", "thirtieth", "fortieth", "fiftieth", "sixtieth", "seventieth", "eightieth", "ninetieth", }; void format_ordinal (std::ostream& stream, const cl_I& argument) { if (zerop(argument)) fprint(stream,"zeroth"); else { var cl_I arg = argument; if (minusp(arg)) { fprint(stream,"minus "); arg = -arg; } var cl_I_div_t div = floor2(arg,100); var const cl_I& hundreds = div.quotient; var uintL tens_and_ones = cl_I_to_UL(div.remainder); if (hundreds > 0) format_cardinal(stream,hundreds*100); if (tens_and_ones == 0) fprint(stream,"th"); else { var uintL tens = floor(tens_and_ones,10); var uintL ones = tens_and_ones % 10; if (hundreds > 0) fprintchar(stream,' '); if (tens < 2) fprint(stream,cl_format_ordinal_ones[tens_and_ones]); elif (ones == 0) fprint(stream,cl_format_ordinal_tens[tens]); else { fprint(stream,cl_format_tens[tens]); fprintchar(stream,'-'); fprint(stream,cl_format_ordinal_ones[ones]); } } } } } // namespace cln cln-1.3.3/src/real/format-output/cl_fmt_scaleexp.cc0000644000000000000000000000665111201634740017165 0ustar // format_scale_exponent(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "real/format-output/cl_format.h" // Implementation. #include "cln/real.h" #include "cln/integer.h" #include "cln/float.h" #include "float/cl_F.h" #include "float/sfloat/cl_SF.h" #include "float/ffloat/cl_FF.h" #include "float/dfloat/cl_DF.h" #include "float/lfloat/cl_LF.h" namespace cln { // NOTE: This may introduce roundoff-errors, through the use of *, /, expt. // But this doesn't matter since format_float_to_string() works with // exact integers, starting with integer_decode_float(). // For a floating point format f, five characteristic numbers: struct float_format_params { cl_F zero; // cl_float(0,f) cl_F one; // cl_float(1,f) cl_F ten; // cl_float(10,f) cl_F tenth; // cl_float(1/10,f) cl_F lg2; // log(10,2), as needed (max. 32 bits) // Constructor: float_format_params (cl_F a, cl_F b, cl_F c, cl_F d, cl_F e) : zero(a), one(b), ten(c), tenth(d), lg2(e) {} }; static const float_format_params get_float_params (const cl_F& arg) { static const cl_RA tenth = (cl_RA)"1/10"; static const cl_SF SF_zero = cl_RA_to_SF(0); static const cl_SF SF_one = cl_RA_to_SF(1); static const cl_SF SF_ten = cl_RA_to_SF(10); static const cl_SF SF_tenth = cl_RA_to_SF(tenth); static const cl_FF FF_zero = cl_RA_to_FF(0); static const cl_FF FF_one = cl_RA_to_FF(1); static const cl_FF FF_ten = cl_RA_to_FF(10); static const cl_FF FF_tenth = cl_RA_to_FF(tenth); static const cl_DF DF_zero = cl_RA_to_DF(0); static const cl_DF DF_one = cl_RA_to_DF(1); static const cl_DF DF_ten = cl_RA_to_DF(10); static const cl_DF DF_tenth = cl_RA_to_DF(tenth); static const cl_SF SF_lg2 = (cl_SF)"0.30103"; static const cl_DF DF_lg2 = (cl_DF)"0.30102999566"; floattypecase(arg , return float_format_params(SF_zero,SF_one,SF_ten,SF_tenth,SF_lg2); , return float_format_params(FF_zero,FF_one,FF_ten,FF_tenth,SF_lg2); , return float_format_params(DF_zero,DF_one,DF_ten,DF_tenth,SF_lg2); , var uintC len = TheLfloat(arg)->len; return float_format_params( cl_I_to_LF(0,len), cl_I_to_LF(1,len), cl_I_to_LF(10,len), cl_RA_to_LF(tenth,len), DF_lg2 // lg2 wird mit 32 Bit Genauigkeit gebraucht ); ); } const decoded_float format_scale_exponent (const cl_F& arg) { // Get float format parameters. var const float_format_params params = get_float_params(arg); var const cl_F& zero = params.zero; var const cl_F& one = params.one; var const cl_F& ten = params.ten; var const cl_F& tenth = params.tenth; var const cl_F& lg2 = params.lg2; // Decode arg. if (zerop(arg)) return decoded_float(zero,0,one); var cl_F abs_arg = abs(arg); var decoded_float decoded = decode_float(abs_arg); var cl_I& expon = decoded.exponent; var cl_I expon10a = truncate1(expon*lg2); // nicht round, um Überlauf zu vermeiden var cl_F signif10a = abs_arg / expt(ten,expon10a); // Maybe need to increment expon10. var cl_I expon10b = expon10a; var cl_F signif10b = signif10a; { var cl_F tenpow = ten; until (signif10b < one) { expon10b = expon10b + 1; signif10b = signif10a / tenpow; tenpow = tenpow * ten; } } // Maybe need to decrement expon10. var cl_I expon10c = expon10b; var cl_F signif10c = signif10b; { var cl_F tenpow = ten; until (signif10c >= tenth) { expon10c = expon10c - 1; signif10c = signif10b * tenpow; tenpow = tenpow * ten; } } return decoded_float(signif10c,expon10c,float_sign(arg)); } } // namespace cln cln-1.3.3/src/real/format-output/cl_fmt_tens.cc0000644000000000000000000000052011201634740016317 0ustar // cl_format_tens. // General includes. #include "base/cl_sysdep.h" // Specification. #include "real/format-output/cl_format.h" // Implementation. namespace cln { const char * const cl_format_tens [10] = { NULL, NULL, "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety", }; } // namespace cln cln-1.3.3/src/real/format-output/TODO-format0000644000000000000000000002337411201634740015505 0ustar - operator<< should respect and reset the istream flags - operator>> should respect and reset the ostream flags See ANSI/ISO C++ section 22.2.2.2 num_put see egcs-1.1b/libio/iostream.cc : write_int, uses stream.flags(), stream.width(0), stream.fill() ; (format-float-for-f w d k overflowchar padchar plus-sign-flag arg stream) ; gibt die Floating-Point-Zahl arg in Festkommadarstellung auf stream aus. (defun format-float-for-f (w d k overflowchar padchar plus-sign-flag arg stream) (let ((width (if w (if (or plus-sign-flag (minusp arg)) (1- w) w) nil))) ; width = zur Verfügung stehende Zeichen ohne Vorzeichen (multiple-value-bind (digits digitslength leadingpoint trailingpoint) (format-float-to-string arg width d k nil) (when (eql d 0) (setq trailingpoint nil)) ; d=0 -> keine Zusatz-Null hinten (when w (setq width (- width digitslength)) (when leadingpoint ; evtl. Zusatz-Null vorne einplanen (if (> width 0) (setq width (1- width)) (setq leadingpoint nil)) ) (when trailingpoint ; evtl. Zusatz-Null hinten einplanen (if (> width 0) (setq width (1- width)) (setq trailingpoint nil)) ) ) ; Es bleiben noch width Zeichen übrig. (if (and overflowchar w (minusp width)) (format-padding w overflowchar stream) ; Zu wenig Platz -> overflow (progn (when (and w (> width 0)) (format-padding width padchar stream)) (if (minusp arg) (write-char #\- stream) (if plus-sign-flag (write-char #\+ stream)) ) (when leadingpoint (write-char #\0 stream)) (write-string digits stream) (when trailingpoint (write-char #\0 stream)) ) ) ) ) ) ; (format-float-for-e w d e k overflowchar padchar exponentchar plus-sign-flag ; arg stream) ; gibt die Floating-point-Zahl arg in Exponentialdarstellung auf den stream aus. ; (vgl. CLTL S.392-394) ; Aufteilung der Mantisse: ; Falls k<=0, erst 1 Null (falls von der Breite her passend), dann der Punkt, ; dann |k| Nullen, dann d-|k| signifikante Stellen; ; zusammen also d Nachkommastellen. ; Falls k>0, erst k signifikante Stellen, dann der Punkt, ; dann weitere d-k+1 signifikante Stellen; ; zusammen also d+1 signifikante Stellen. Keine Nullen vorne. ; (Der Defaultwert in FORMAT-EXPONENTIAL-FLOAT ist k=1.) ; Vor der Mantisse das Vorzeichen (ein + nur falls arg>=0 und plus-sign-flag). ; Dann der Exponent, eingeleitet durch exponentchar, dann Vorzeichen des ; Exponenten (stets + oder -), dann e Stellen für den Exponenten. ; Dann wird das Ganze mit padchars auf w Zeichen Breite aufgefüllt. ; Sollte das (auch nach evtl. Unterdrückung einer führenden Null) mehr als ; w Zeichen ergeben, so werden statt dessen w overflowchars ausgegeben, oder ; (falls overflowchar = nil) die Zahl mit so vielen Stellen wie nötig ; ausgegeben. (defun format-float-for-e (w d e k overflowchar padchar exponentchar plus-sign-flag arg stream) (multiple-value-bind (mantissa oldexponent) (format-scale-exponent (abs arg)) (let* ((exponent (if (zerop arg) 0 (- oldexponent k))) ; auszugebender Exponent (expdigits (write-to-string (abs exponent) :base 10. :radix nil :readably nil)) (expdigitsneed (if e (max (length expdigits) e) (length expdigits))) ; expdigitsneed = Anzahl der Stellen, die für die Ziffern des ; Exponenten nötig sind. (mantd (if d (if (> k 0) (1+ (- d k)) d) nil)) ; mantd = Anzahl der Mantissenstellen hinter dem Punkt (dmin (if (minusp k) (- 1 k) nil)) ; nachher: fordere, daß ; nicht in die ersten (+ 1 (abs k)) Stellen hineingerundet wird. (mantwidth (if w (- w 2 expdigitsneed) nil)) ; mantwidth = Anzahl der für die Mantisse (inkl. Vorzeichen, Punkt) ; zur Verfügung stehenden Zeichen (oder nil) ) (declare (simple-string expdigits) (fixnum exponent expdigitsneed)) (if (and overflowchar w e (> expdigitsneed e)) ; Falls Overflowchar und w und e angegeben, Exponent mehr braucht: (format-padding w overflowchar stream) (progn (if w (if (or plus-sign-flag (minusp arg)) (setq mantwidth (1- mantwidth))) ) ; mantwidth = Anzahl der für die Mantisse (ohne Vorzeichen, ; inklusive Punkt) zur Verfügung stehenden Zeichen (oder nil) (multiple-value-bind (mantdigits mantdigitslength leadingpoint trailingpoint) (format-float-to-string mantissa mantwidth mantd k dmin) (when w (setq mantwidth (- mantwidth mantdigitslength)) (if trailingpoint (if (or (null mantd) (> mantd 0)) (setq mantwidth (- mantwidth 1)) (setq trailingpoint nil) ) ) (if leadingpoint (if (> mantwidth 0) (setq mantwidth (- mantwidth 1)) (setq leadingpoint nil) ) ) ) ; Es bleiben noch mantwidth Zeichen übrig. (if (and overflowchar w (minusp mantwidth)) (format-padding w overflowchar stream) ; Zu wenig Platz -> overflow (progn (when (and w (> mantwidth 0)) (format-padding mantwidth padchar stream) ) (if (minusp arg) (write-char #\- stream) (if plus-sign-flag (write-char #\+ stream)) ) (if leadingpoint (write-char #\0 stream)) (write-string mantdigits stream) (if trailingpoint (write-char #\0 stream)) (write-char (cond (exponentchar) ((and (not *PRINT-READABLY*) (typep arg *READ-DEFAULT-FLOAT-FORMAT*) ) #\E ) ((short-float-p arg) #\s) ((single-float-p arg) #\f) ((double-float-p arg) #\d) ((long-float-p arg) #\L) ) stream ) (write-char (if (minusp exponent) #\- #\+) stream) (when (and e (> e (length expdigits))) (format-padding (- e (length expdigits)) #\0 stream) ) (write-string expdigits stream) ) ) ) ) ) ) ) ) ; ~F, CLTL S.390-392, CLtL2 S. 588-590 (defformat-simple format-fixed-float (stream colon-modifier atsign-modifier (w nil) (d nil) (k 0) (overflowchar nil) (padchar #\Space)) (arg) (declare (ignore colon-modifier)) (when (rationalp arg) (setq arg (float arg))) (if (floatp arg) (format-float-for-f w d k overflowchar padchar atsign-modifier arg stream) (print_rational arg stream 10) ) ) ; ~E, CLTL S.392-395, CLtL2 S. 590-593 (defformat-simple format-exponential-float (stream colon-modifier atsign-modifier (w nil) (d nil) (e nil) (k 1) (overflowchar nil) (padchar #\Space) (exponentchar nil)) (arg) (declare (ignore colon-modifier)) (when (rationalp arg) (setq arg (float arg))) (if (floatp arg) (format-float-for-e w d e k overflowchar padchar exponentchar atsign-modifier arg stream ) (print_rational arg stream 10) ) ) ; ~G, CLTL S.395-396, CLtL2 S. 594-595 (defformat-simple format-general-float (stream colon-modifier atsign-modifier (w nil) (d nil) (e nil) (k 1) (overflowchar nil) (padchar #\Space) (exponentchar nil)) (arg) (declare (ignore colon-modifier)) (if (rationalp arg) (setq arg (float arg))) (if (floatp arg) (multiple-value-bind (mantissa n) (format-scale-exponent (abs arg)) (declare (ignore mantissa)) (if (null d) (setq d (multiple-value-bind (digits digitslength) (format-float-to-string (abs arg) nil nil nil nil) (declare (ignore digits)) (max (max (1- digitslength) 1) (min n 7)) ) ) ) (let* ((ee (if e (+ 2 e) 4)) (dd (- d n))) (if (<= 0 dd d) (progn (format-float-for-f (if w (- w ee) nil) dd 0 overflowchar padchar atsign-modifier arg stream ) (format-padding ee #\Space stream) ) (format-float-for-e w d e k overflowchar padchar exponentchar atsign-modifier arg stream ) ) ) ) (print_rational arg stream 10) ) ) ; ~$, CLTL S.396-397, CLtL2 S. 595-596 (defformat-simple format-dollars-float (stream colon-modifier atsign-modifier (d 2) (n 1) (w 0) (padchar #\Space)) (arg) (when (rationalp arg) (setq arg (float arg))) (if (floatp arg) (multiple-value-bind (digits digitslength leadingpoint trailingpoint leadings) (format-float-to-string arg nil d 0 nil) (declare (ignore digitslength leadingpoint trailingpoint)) (let* ((lefts (max leadings n)) (totalwidth (+ (if (or atsign-modifier (minusp arg)) 1 0) lefts 1 d ) ) (padcount (max (- w totalwidth) 0))) (if (not colon-modifier) (format-padding padcount padchar stream)) (if (minusp arg) (write-char #\- stream) (if atsign-modifier (write-char #\+ stream)) ) (if colon-modifier (format-padding padcount padchar stream)) (format-padding (- lefts leadings) #\0 stream) (write-string digits stream) ) ) (print_rational arg stream 10) ) ) cln-1.3.3/src/real/format-output/cl_fmt_cardinal.cc0000644000000000000000000000563111201634740017133 0ustar // format_cardinal(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "real/format-output/cl_format.h" // Implementation. #include #include "cln/integer.h" #include "cln/integer_io.h" #include "cln/exception.h" namespace cln { static const char * const cl_format_ones [20] = { NULL, "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen", }; // gibt eine ganze Zahl >0, <1000 im Klartext auf englisch auf den stream aus. // (arg=0 -> gibt nichts aus.) static void format_small_cardinal (std::ostream& stream, uintL arg) { var uintL hundreds = floor(arg,100); var uintL tens_and_ones = arg % 100; if (hundreds > 0) { fprint(stream,cl_format_ones[hundreds]); fprint(stream," hundred"); } if (tens_and_ones > 0) { if (hundreds > 0) fprint(stream," and "); var uintL tens = floor(tens_and_ones,10); var uintL ones = tens_and_ones % 10; if (tens < 2) fprint(stream,cl_format_ones[tens_and_ones]); else { fprint(stream,cl_format_tens[tens]); if (ones > 0) { fprintchar(stream,'-'); fprint(stream,cl_format_ones[ones]); } } } } void format_cardinal (std::ostream& stream, const cl_I& argument) { if (zerop(argument)) fprint(stream,"zero"); else { var cl_I arg = argument; if (minusp(arg)) { fprint(stream,"minus "); arg = -arg; } // amerikanisch (billion=10^9) static const char * const illions[] = { "", " thousand", " million", " billion", " trillion", " quadrillion", " quintillion", " sextillion", " septillion", " octillion", " nonillion", " decillion", " undecillion", " duodecillion", " tredecillion", " quattuordecillion", " quindecillion", " sexdecillion", " septendecillion", " octodecillion", " novemdecillion", " vigintillion", NULL }; var uintL small_pieces [sizeof(illions)/sizeof(illions[0])]; // Let the recursion begin. var const char * const * illion_ptr = &illions[0]; var uintL * small_piece_ptr = &small_pieces[0]; do { if (*illion_ptr == NULL) { std::ostringstream buf; fprint(buf, "format_cardinal: argument too large: "); fprint(buf, argument); throw runtime_exception(buf.str()); } var cl_I_div_t div = floor2(arg,1000); var const cl_I& thousands = div.quotient; var uintL small = cl_I_to_UL(div.remainder); illion_ptr++; *small_piece_ptr++ = small; arg = thousands; } while (arg > 0); // Roll back the recursion. var bool first_piece = true; do { var uintL small = *--small_piece_ptr; var const char * illion = *--illion_ptr; if (small > 0) { if (!first_piece) fprint(stream,", "); format_small_cardinal(stream,small); fprint(stream,illion); first_piece = false; } } until (illion_ptr == &illions[0]); } } } // namespace cln cln-1.3.3/src/real/format-output/cl_fmt_floatstring.cc0000644000000000000000000002114211201634740017705 0ustar // format_float_to_string(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "real/format-output/cl_format.h" // Implementation. // BUGS: // - This is slow. #include "cln/output.h" #include "cln/malloc.h" #include "cln/float.h" #include "cln/integer.h" #include "integer/cl_I.h" #include "base/string/cl_spushstring.h" namespace cln { // format_float_to_string(arg,width,d,k,dmin) // ergibt einen String zum Floating-point arg: // er hat den Wert von abs(arg)*expt(10,k), dabei mind. d Nachkommastellen // und höchstens die Länge width (width<=0 -> keine Einschränkung). // Trotzdem wird nicht auf weniger als dmin Stellen gerundet. const digits_with_dot format_float_to_string (const cl_F& arg, const sintL width, const sintL d, const sintL k, const sintL dmin) { // One pre-allocated buffer. This reduces the allocation/free cost. static cl_spushstring digitstring; if (zerop(arg)) { var sintL places = (d < dmin ? dmin : d); if (width > 0) // width angegeben -> places := min(places,width-1) if (places >= width) places = width-1; // ein Punkt und places Nullen var char* string = (char *) malloc_hook(1+places+1); string[0] = '.'; for (sintL i = 1; i <= places; i++) string[i] = '0'; string[1+places] = '\0'; return digits_with_dot(string, 1+places, true, (places==0), 0 ); } // significand : Integer >0 // expon : Integer // mantprec : Anzahl der echten Mantissenbits von significand // (also 2^mantprec <= significand < 2^(mantprec+1)) // width : Anzahl Stellen, die die Zahl (inklusive Punkt) nicht // überschreiten soll, oder 0 // d : Mindestanzahl Nachkommastellen oder 0 // k : Skalierungsfaktor (siehe CLTL S.394) // dmin : Mindestanzahl von Dezimaltellen, die (trotz Angabe von width // oder d) nicht gerundet werden dürfen. // (Nur interessant, falls d <= dmin <= (precision der Zahl).) // wandelt die Zahl significand*2^expon um in einen Dezimalstring um. // Es ist kein Exponent dabei. var cl_idecoded_float decoded = integer_decode_float(arg); var const cl_I& significand = decoded.mantissa; var const cl_I& expon = decoded.exponent; var uintC mantprec = float_digits(arg)-1; var cl_I numerator = significand; var cl_I denominator = 1; var cl_I abrund_einh = 1; // Abrundungseinheit: // Abrunden um 1 in der letzten abrundbaren Stelle entspricht // einer Erniedrigung von numerator um abrund_einh. var cl_I aufrund_einh = 1; // Aufrundungseinheit: // Aufrunden um 1 in der letzten aufrundbaren Stelle entspricht // einer Erhöhung von numerator um aufrund_einh. digitstring.reset(); if (expon > 0) { numerator = numerator << expon; aufrund_einh = abrund_einh = 1 << expon; } elif (expon < 0) { denominator = denominator << -expon; // aufrund_einh = abrund_einh = 1; } // Zahl = numerator/denominator if (significand == ash(1,mantprec)) { // Ist der Significand=2^mantprec, so ist abrund-einh zu halbieren. // Man kann stattdessen auch alle 3 anderen Grössen verdoppeln: aufrund_einh = aufrund_einh << 1; numerator = numerator << 1; denominator = denominator << 1; } // Defaultmäßig: Auf-/Abrunde-Einheit = eine Einheit in der letzten // BINÄRstelle. // Zahl = numerator/denominator // Skalierungsfaktor k in die Zahl mit einbeziehen (vgl. CLTL S.394) // k<0 -> Mantisse durch 10^|k| dividieren // k>0 -> Mantisse mit 10^k multiplizieren // Dabei aufrund-einh, abrund-einh im Verhältnis zu numerator beibehalten. if (k != 0) { if (k < 0) { var cl_I skal_faktor = expt_pos(10,-k); denominator = denominator * skal_faktor; } elif (k > 0) { var cl_I skal_faktor = expt_pos(10,k); numerator = numerator * skal_faktor; aufrund_einh = aufrund_einh * skal_faktor; abrund_einh = abrund_einh * skal_faktor; } } // Stellen: 0 = 1. Stelle vor dem Punkt, -1 = 1. Stelle nach dem Punkt. var sintL stelle = 0; // Stelle der als nächstes auszugebenden Ziffer // auf >= 1/10 adjustieren: // (jeweils numerator mit 10 multiplizieren, eine führende 0 mehr vorsehen) until (10*numerator >= denominator) { stelle = stelle-1; numerator = numerator * 10; aufrund_einh = aufrund_einh * 10; abrund_einh = abrund_einh * 10; } // stelle = Stelle der letzten führenden 0 // = 1 + Stelle der 1. signifikanten Ziffer // oder =0, falls k>=0 // Ausführung der Rundung: var bool letzte_stelle_p = false; // d oder width angegeben? var sintL letzte_stelle = 0; // falls d oder width angegeben waren: // Stelle der letzten signifikanten Ziffer var bool halbzahlig = false; // zeigt an, ob hinten genau ein 0.500000 wegfällt do { // Solange das Ergebnis auch nach Aufrundung >= 1 bliebe, // eine Vorkommastelle mehr einplanen: until (((numerator << 1) + aufrund_einh) < (denominator << 1)) { denominator = denominator * 10; stelle = stelle+1; } // Falls d oder width angegeben: // letzte_stelle ausrechnen if (d != 0) { // Falls dmin angegeben: min(-d,-dmin) = -max(d,dmin). // Sonst -d. letzte_stelle = -d; if (dmin > 0) if (letzte_stelle > -dmin) letzte_stelle = -dmin; letzte_stelle_p = true; } elif (width > 0) { // Falls nicht d, nur width angegeben: if (stelle < 0) // Es kommen führende Nullen nach dem Punkt -> d:=width-1 letzte_stelle = 1-width; else // Es kommen keine führenden Nullen nach dem Punkt -> // Es wird stelle Vorkommaziffern geben, d:=width-1-stelle letzte_stelle = 1+stelle-width; // also letzte_stelle = -(width-1 - max(stelle,0)) // wieder dmin berücksichtigen: if (dmin > 0) if (letzte_stelle > -dmin) letzte_stelle = -dmin; letzte_stelle_p = true; } if (letzte_stelle_p) { var sintL ziffernzahl = letzte_stelle - stelle; // ziffernzahl = - Zahl signifikanter Stellen oder >=0. var cl_I dezimal_einh = denominator; // dezimal-einh := ceiling(dezimal_einh*expt(10,ziffernzahl)) if (ziffernzahl > 0) dezimal_einh = dezimal_einh*expt_pos(10,ziffernzahl); elif (ziffernzahl < 0) dezimal_einh = ceiling1(dezimal_einh,expt_pos(10,-ziffernzahl)); // dezimal-einh = Um wieviel numerator erhöht bzw. erniedigt werden // müßte, damit sich die Dezimaldarstellung um genau 1 an der // Position letzte_stelle verändert. if (abrund_einh < dezimal_einh) abrund_einh = dezimal_einh; if (aufrund_einh < dezimal_einh) aufrund_einh = dezimal_einh; // Jetzt darf auch um eine (halbe) DEZIMAL-Einheit gerundet werden. if (aufrund_einh == dezimal_einh) halbzahlig = true; } } until (((numerator << 1) + aufrund_einh) < (denominator << 1)); // stelle = Position der ersten signifikanten Stelle + 1 var uintL digit_count = 0; // Zahl der bisher in digit-string // ausgegebenen Ziffern (exklusive den Punkt) var uintL point_pos = 0; // Punkt-Position = Zahl führender Stellen // = Zahl der Ziffern vor dem Punkt // Führenden Punkt und nachfolgende Nullen ausgeben: if (stelle < 0) { digitstring.push('.'); point_pos = digit_count; for (int i = -stelle; i >= 0; i--) { digitstring.push('0'); digit_count++; } } // Ziffern der Mantisse ausgeben: var uintL digit; // die laufende Ziffer, >=0, <10 var bool abrunden; // letzte Ziffer abzurunden? var bool aufrunden; // letzte Ziffer aufzurunden? for (;;) { if (stelle == 0) { digitstring.push('.'); point_pos = digit_count; } stelle = stelle-1; var cl_I_div_t div = cl_divide(numerator*10,denominator); digit = cl_I_to_UL(div.quotient); numerator = div.remainder; abrund_einh = abrund_einh*10; aufrund_einh = aufrund_einh*10; abrunden = ((numerator<<1) < abrund_einh); aufrunden = (halbzahlig ? (numerator<<1) >= (denominator<<1) - aufrund_einh : (numerator<<1) > (denominator<<1) - aufrund_einh ); if (abrunden || aufrunden || (letzte_stelle_p && (stelle <= letzte_stelle)) ) break; digitstring.push("0123456789"[digit]); digit_count++; } // letzte signifikante Ziffer ausgeben: if (letzte_stelle_p ? (stelle >= letzte_stelle) : true) { digit = (abrunden && !aufrunden ? digit : aufrunden && !abrunden ? digit+1 : (numerator<<1) <= denominator ? digit : digit+1); digitstring.push("0123456789"[digit]); digit_count++; } // Nachfolgende Nullen und Punkt ausgeben if (stelle >= 0) { for (int i = stelle; i >= 0; i--) { digitstring.push('0'); digit_count++; } digitstring.push('.'); point_pos = digit_count; } if (d != 0) for (int i = d - (digit_count - point_pos); i >= 0; i--) { digitstring.push('0'); digit_count++; } return digits_with_dot(digitstring.contents(), digit_count+1, point_pos==0, point_pos==digit_count, point_pos ); } } // namespace cln cln-1.3.3/src/real/format-output/cl_fmt_newroman.cc0000644000000000000000000000253711201634740017206 0ustar // format_new_roman(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "real/format-output/cl_format.h" // Implementation. #include #include "cln/integer.h" #include "cln/integer_io.h" #include "cln/exception.h" namespace cln { void format_new_roman (std::ostream& stream, const cl_I& arg) { if (!(0 < arg && arg < 4000)) { std::ostringstream buf; fprint(buf, "format_new_roman: argument should be in the range 1 - 3999, not "); fprint(buf, arg); fprint(buf, "."); throw runtime_exception(buf.str()); } var uintL value = cl_I_to_UL(arg); struct roman { char symbol; uintL value; }; static const roman scale[7] = { { 'I', 1 }, { 'V', 5 }, { 'X', 10 }, { 'L', 50 }, { 'C', 100 }, { 'D', 500 }, { 'M', 1000 }, }; for (int i = 6; value > 0 /* && i >= 0 */ ; i--) { var const roman * p = &scale[i]; var uintL multiplicity = floor(value,p->value); value = value % p->value; while (multiplicity > 0) { fprintchar(stream,p->symbol); multiplicity--; } if (value == 0) break; // Must have i > 0 here. var const roman * p_minor = &scale[(i-1) & ~1]; var uintL lowered_value = p->value - p_minor->value; if (value >= lowered_value) { fprintchar(stream,p_minor->symbol); fprintchar(stream,p->symbol); value = value - lowered_value; } } } } // namespace cln cln-1.3.3/src/real/format-output/cl_fmt_paddedstring.cc0000644000000000000000000000124511201634740020023 0ustar // format_padded_string(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "real/format-output/cl_format.h" // Implementation. #include namespace cln { void format_padded_string (std::ostream& stream, sintL mincol, sintL colinc, sintL minpad, char padchar, bool padleftflag, const char * str) { var sintL need = ::strlen(str) + minpad; // so viele Zeichen mindestens var uintL auxpad = (need < mincol ? ceiling((uintL)(mincol - need), colinc) * colinc : 0 ); if (!padleftflag) fprint(stream,str); format_padding(stream,minpad+auxpad,padchar); if (padleftflag) fprint(stream,str); } } // namespace cln cln-1.3.3/src/real/elem/0000755000000000000000000000000012173046201011610 5ustar cln-1.3.3/src/real/elem/cl_R_zerop.cc0000644000000000000000000000122311201634740014215 0ustar // zerop(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #define zerop zerop_inline #include "real/cl_R.h" #include "rational/cl_RA.h" #include "integer/cl_I.h" #undef zerop #include "float/cl_F.h" #include "base/cl_inline.h" #include "float/sfloat/elem/cl_SF_zerop.cc" #include "float/ffloat/elem/cl_FF_zerop.cc" #include "float/dfloat/elem/cl_DF_zerop.cc" #include "float/lfloat/elem/cl_LF_zerop.cc" namespace cln { bool CL_FLATTEN zerop (const cl_R& x) #if 0 GEN_R_OP1_2(x, zerop, return) #else // fully inlined, faster GEN_R_OP1_7(x, zerop_inline, return) #endif } // namespace cln cln-1.3.3/src/real/elem/cl_R_square.cc0000644000000000000000000000105011201634740014354 0ustar // square(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "cln/integer.h" #include "cln/float.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "rational/cl_RA.h" #include "integer/cl_I.h" namespace cln { const cl_R square (const cl_R& x) #if 0 GEN_R_OP1_2(x, square, return) #else // fully inlined, faster GEN_R_OP1_7(x, square, return) #endif } // namespace cln cln-1.3.3/src/real/elem/cl_R_div.cc0000644000000000000000000000527611201634740013654 0ustar // binary operator / // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "rational/cl_RA.h" #include "cln/integer.h" #include "integer/cl_I.h" #include "float/cl_F.h" #include "cln/sfloat.h" #include "float/sfloat/cl_SF.h" #include "cln/ffloat.h" #include "float/ffloat/cl_FF.h" #include "cln/dfloat.h" #include "float/dfloat/cl_DF.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" #include "base/cl_N.h" namespace cln { ALL_cl_LF_OPERATIONS_SAME_PRECISION() const cl_R operator/ (const cl_R& x, const cl_R& y) { if (eq(x,0)) // 0 / y = exakte 0, außer wenn y=0 { if (zerop(y)) { throw division_by_0_exception(); } else return 0; } else #define div(a,b) a/b realcase6(x , /* I */ realcase6(y , /* I */ return div(x,y); , /* RT */ return div(x,y); , /* SF */ return div(cl_I_to_SF(x),y); , /* FF */ return div(cl_I_to_FF(x),y); , /* DF */ return div(cl_I_to_DF(x),y); , /* LF */ return div(cl_I_to_LF(x,LFlen0(y)),y); // cf. cl_I_LF_div ); , /* RT */ realcase6(y , /* I */ return div(x,y); , /* RT */ return div(x,y); , /* SF */ return div(cl_RA_to_SF(x),y); , /* FF */ return div(cl_RA_to_FF(x),y); , /* DF */ return div(cl_RA_to_DF(x),y); , /* LF */ return cl_RA_LF_div(x,y); ); , /* SF */ realcase6(y , /* I */ return div(x,cl_I_to_SF(y)); , /* RT */ return div(x,cl_RA_to_SF(y)); , /* SF */ return div(x,y); , /* FF */ return cl_FF_to_SF(div(cl_SF_to_FF(x),y)); , /* DF */ return cl_DF_to_SF(div(cl_SF_to_DF(x),y)); , /* LF */ return cl_LF_to_SF(div(cl_SF_to_LF(x,LFlen0(y)),y)); ); , /* FF */ realcase6(y , /* I */ return div(x,cl_I_to_FF(y)); , /* RT */ return div(x,cl_RA_to_FF(y)); , /* SF */ return cl_FF_to_SF(div(x,cl_SF_to_FF(y))); , /* FF */ return div(x,y); , /* DF */ return cl_DF_to_FF(div(cl_FF_to_DF(x),y)); , /* LF */ return cl_LF_to_FF(div(cl_FF_to_LF(x,LFlen0(y)),y)); ); , /* DF */ realcase6(y , /* I */ return div(x,cl_I_to_DF(y)); , /* RT */ return div(x,cl_RA_to_DF(y)); , /* SF */ return cl_DF_to_SF(div(x,cl_SF_to_DF(y))); , /* FF */ return cl_DF_to_FF(div(x,cl_FF_to_DF(y))); , /* DF */ return div(x,y); , /* LF */ return cl_LF_to_DF(div(cl_DF_to_LF(x,LFlen0(y)),y)); ); , /* LF */ realcase6(y , /* I */ return cl_LF_I_div(x,y); , /* RT */ return cl_LF_RA_div(x,y); , /* SF */ return cl_LF_to_SF(div(x,cl_SF_to_LF(y,LFlen0(x)))); , /* FF */ return cl_LF_to_FF(div(x,cl_FF_to_LF(y,LFlen0(x)))); , /* DF */ return cl_LF_to_DF(div(x,cl_DF_to_LF(y,LFlen0(x)))); , /* LF */ return div(x,y); ); ); } } // namespace cln cln-1.3.3/src/real/elem/cl_R_mul.cc0000644000000000000000000000516611201634740013665 0ustar // binary operator * // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "rational/cl_RA.h" #include "cln/integer.h" #include "integer/cl_I.h" #include "float/cl_F.h" #include "cln/sfloat.h" #include "float/sfloat/cl_SF.h" #include "cln/ffloat.h" #include "float/ffloat/cl_FF.h" #include "cln/dfloat.h" #include "float/dfloat/cl_DF.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" #include "base/cl_N.h" namespace cln { ALL_cl_LF_OPERATIONS_SAME_PRECISION() const cl_R operator* (const cl_R& x, const cl_R& y) { if (eq(x,0)) { return 0; } // 0 * y = exakte 0 elif (eq(y,0)) { return 0; } // x * 0 = exakte 0 else #define mul(a,b) a*b realcase6(x , /* I */ realcase6(y , /* I */ return mul(x,y); , /* RT */ return mul(x,y); , /* SF */ return mul(cl_I_to_SF(x),y); , /* FF */ return mul(cl_I_to_FF(x),y); , /* DF */ return mul(cl_I_to_DF(x),y); , /* LF */ return cl_LF_I_mul(y,x); ); , /* RT */ realcase6(y , /* I */ return mul(x,y); , /* RT */ return mul(x,y); , /* SF */ return mul(cl_RA_to_SF(x),y); , /* FF */ return mul(cl_RA_to_FF(x),y); , /* DF */ return mul(cl_RA_to_DF(x),y); , /* LF */ return cl_LF_RA_mul(y,x); ); , /* SF */ realcase6(y , /* I */ return mul(x,cl_I_to_SF(y)); , /* RT */ return mul(x,cl_RA_to_SF(y)); , /* SF */ return mul(x,y); , /* FF */ return cl_FF_to_SF(mul(cl_SF_to_FF(x),y)); , /* DF */ return cl_DF_to_SF(mul(cl_SF_to_DF(x),y)); , /* LF */ return cl_LF_to_SF(mul(cl_SF_to_LF(x,LFlen0(y)),y)); ); , /* FF */ realcase6(y , /* I */ return mul(x,cl_I_to_FF(y)); , /* RT */ return mul(x,cl_RA_to_FF(y)); , /* SF */ return cl_FF_to_SF(mul(x,cl_SF_to_FF(y))); , /* FF */ return mul(x,y); , /* DF */ return cl_DF_to_FF(mul(cl_FF_to_DF(x),y)); , /* LF */ return cl_LF_to_FF(mul(cl_FF_to_LF(x,LFlen0(y)),y)); ); , /* DF */ realcase6(y , /* I */ return mul(x,cl_I_to_DF(y)); , /* RT */ return mul(x,cl_RA_to_DF(y)); , /* SF */ return cl_DF_to_SF(mul(x,cl_SF_to_DF(y))); , /* FF */ return cl_DF_to_FF(mul(x,cl_FF_to_DF(y))); , /* DF */ return mul(x,y); , /* LF */ return cl_LF_to_DF(mul(cl_DF_to_LF(x,LFlen0(y)),y)); ); , /* LF */ realcase6(y , /* I */ return cl_LF_I_mul(x,y); , /* RT */ return cl_LF_RA_mul(x,y); , /* SF */ return cl_LF_to_SF(mul(x,cl_SF_to_LF(y,LFlen0(x)))); , /* FF */ return cl_LF_to_FF(mul(x,cl_FF_to_LF(y,LFlen0(x)))); , /* DF */ return cl_LF_to_DF(mul(x,cl_DF_to_LF(y,LFlen0(x)))); , /* LF */ return mul(x,y); ); ); } } // namespace cln cln-1.3.3/src/real/elem/cl_R_minus.cc0000644000000000000000000000064511201634740014220 0ustar // binary operator - // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "cln/float.h" namespace cln { const cl_R operator- (const cl_R& x, const cl_R& y) { if (eq(y,0)) { return x; } elif (eq(x,0)) { return -y; } else #define minus(a,b) a-b GEN_R_OP2_2(x,y, minus, return) } } // namespace cln cln-1.3.3/src/real/elem/cl_R_uminus.cc0000644000000000000000000000110411201634740014374 0ustar // unary operator - // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "cln/integer.h" #include "cln/float.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "rational/cl_RA.h" #include "integer/cl_I.h" namespace cln { const cl_R operator- (const cl_R& x) #define minus(a) -a #if 0 GEN_R_OP1_2(x, minus, return) #else // fully inlined, faster GEN_R_OP1_7(x, minus, return) #endif } // namespace cln cln-1.3.3/src/real/elem/cl_R_minusp.cc0000644000000000000000000000123611201634740014375 0ustar // minusp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #define minusp minusp_inline #include "rational/cl_RA.h" #include "integer/cl_I.h" #undef minusp #include "float/cl_F.h" #include "base/cl_inline.h" #include "float/sfloat/elem/cl_SF_minusp.cc" #include "float/ffloat/elem/cl_FF_minusp.cc" #include "float/dfloat/elem/cl_DF_minusp.cc" #include "float/lfloat/elem/cl_LF_minusp.cc" namespace cln { bool CL_FLATTEN minusp (const cl_R& x) #if 0 GEN_R_OP1_2(x, minusp, return) #else // fully inlined, faster GEN_R_OP1_7(x, minusp_inline, return) #endif } // namespace cln cln-1.3.3/src/real/elem/cl_R_minus1.cc0000644000000000000000000000045611201634740014301 0ustar // minus1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "cln/float.h" namespace cln { const cl_R minus1 (const cl_R& x) GEN_R_OP1_2(x, minus1, return) } // namespace cln cln-1.3.3/src/real/elem/cl_R_plusp.cc0000644000000000000000000000051011201634740014217 0ustar // plusp(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. namespace cln { bool plusp (const cl_R& x) { if (minusp(x)) return false; // x<0 -> nein elif (zerop(x)) return false; // x=0 -> nein else return true; // sonst ist x>0. } } // namespace cln cln-1.3.3/src/real/elem/cl_R_plus.cc0000644000000000000000000000064211201634740014045 0ustar // binary operator + // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "cln/float.h" namespace cln { const cl_R operator+ (const cl_R& x, const cl_R& y) { if (eq(y,0)) { return x; } elif (eq(x,0)) { return y; } else #define plus(a,b) a+b GEN_R_OP2_2(x,y, plus, return) } } // namespace cln cln-1.3.3/src/real/elem/cl_R_plus1.cc0000644000000000000000000000045311201634740014126 0ustar // plus1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "cln/float.h" namespace cln { const cl_R plus1 (const cl_R& x) GEN_R_OP1_2(x, plus1, return) } // namespace cln cln-1.3.3/src/real/elem/cl_R_equal.cc0000644000000000000000000000230511201634740014167 0ustar // equal(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "rational/cl_RA.h" #include "cln/integer.h" namespace cln { inline bool equal (const cl_F& x, const cl_F& y) { return compare(x,y) == 0; } bool equal (const cl_R& x, const cl_R& y) { // Methode: // Beide rational oder beide Floats -> klar. // Eine rational, eine Float -> // Die rationale Zahl muß einen Zweierpotenz-Nenner haben, sonst verschieden. // Die rationale Zahl zum Float machen, vergleichen. // Verschieden -> Das war's. // Gleich -> Das Float mit RATIONAL rational machen, nochmals vergleichen. realcase2(x , realcase2(y , // beides rationale Zahlen return equal(x,y); , // x rational, y Float -> x in Float umwandeln if (!power2p(denominator(x))) return false; if (!equal(cl_float(x,y),y)) return false; return equal(x,rational(y)); ); , realcase2(y , // x Float, y rational -> y in Float umwandeln if (!power2p(denominator(y))) return false; if (!equal(x,cl_float(y,x))) return false; return equal(rational(x),y); , // beides Floats return equal(x,y); ); ); } } // namespace cln cln-1.3.3/src/real/elem/cl_R_compare.cc0000644000000000000000000000210111201634740014500 0ustar // compare(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "cln/float.h" namespace cln { cl_signean compare (const cl_R& x, const cl_R& y) { // Methode: // Beide rational oder beide Floats -> klar. // Eine rational, eine Float -> // Die rationale Zahl zum Float machen, vergleichen. // Verschieden -> Das war's. // Gleich -> Das Float mit RATIONAL rational machen, nochmals vergleichen. realcase2(x , realcase2(y , // beides rationale Zahlen return compare(x,y); , // x rational, y Float -> x in Float umwandeln var cl_signean result = compare(cl_float(x,y),y); if (result != signean_null) return result; return compare(x,rational(y)); ); , realcase2(y , // x Float, y rational -> y in Float umwandeln var cl_signean result = compare(x,cl_float(y,x)); if (result != signean_null) return result; return compare(rational(x),y); , // beides Floats return compare(x,y); ); ); } } // namespace cln cln-1.3.3/src/real/elem/cl_R_recip.cc0000644000000000000000000000045311201634740014164 0ustar // recip(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "cln/float.h" namespace cln { const cl_R recip (const cl_R& x) GEN_R_OP1_2(x, recip, return) } // namespace cln cln-1.3.3/src/real/output/0000755000000000000000000000000012173046201012226 5ustar cln-1.3.3/src/real/output/cl_R_aprint.cc0000644000000000000000000000052611201634740014776 0ustar // print_real(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real_io.h" // Implementation. #include "cln/output.h" namespace cln { void print_real (std::ostream& stream, const cl_print_flags& flags, const cl_R& z) { print_real(stream,(const cl_print_number_flags&)flags,z); } } // namespace cln cln-1.3.3/src/real/output/cl_R_bprint.cc0000644000000000000000000000053311201634740014775 0ustar // print_real(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real_io.h" // Implementation. #include "cln/output.h" namespace cln { void print_real (std::ostream& stream, const cl_print_number_flags& flags, const cl_R& z) { print_real(stream,(const cl_print_real_flags&)flags,z); } } // namespace cln cln-1.3.3/src/real/output/cl_R_cprint.cc0000644000000000000000000000103511201634740014774 0ustar // print_real(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real_io.h" // Implementation. #include "cln/real.h" #include "real/cl_R.h" #include "cln/rational_io.h" #include "cln/float_io.h" namespace cln { void print_real (std::ostream& stream, const cl_print_real_flags& flags, const cl_R& z) { if (rationalp(z)) { DeclareType(cl_RA,z); // rationale Zahl print_rational(stream,flags,z); } else { DeclareType(cl_F,z); // Float print_float(stream,flags,z); } } } // namespace cln cln-1.3.3/src/real/input/0000755000000000000000000000000012173046201012025 5ustar cln-1.3.3/src/real/input/cl_R_from_string.cc0000644000000000000000000000074611201634740015635 0ustar // cl_R (const char *) constructor. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real_class.h" // Implementation. #include "cln/input.h" #include "cln/real_io.h" namespace cln { cl_read_flags cl_R_read_flags = { syntax_real, lsyntax_all, 10, { float_format_ffloat, float_format_lfloat_min, true } }; cl_R::cl_R (const char * string) { pointer = as_cl_private_thing( read_real(cl_R_read_flags,string,NULL,NULL)); } } // namespace cln cln-1.3.3/src/real/input/cl_R_read.cc0000644000000000000000000002277011201634740014220 0ustar // read_real(). // This file contains a slimmed down version of read_complex(). // It does not pull in all the complex function code. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real_io.h" // Implementation. #include #include #include "cln/input.h" #include "cln/rational_io.h" #include "cln/integer_io.h" #include "cln/float_io.h" #include "cln/integer.h" #include "integer/cl_I.h" #include "float/cl_F.h" #include "cln/exception.h" #undef floor #include #define floor cln_floor namespace cln { // Step forward over all digits, to the end of string or to the next non-digit. static const char * skip_digits (const char * ptr, const char * string_limit, unsigned int base) { for ( ; ptr != string_limit; ptr++) { var char ch = *ptr; if ((ch >= '0') && (ch <= '9')) if (ch < '0' + (int)base) continue; else break; else { if (base <= 10) break; if (((ch >= 'A') && (ch < 'A'-10+(int)base)) || ((ch >= 'a') && (ch < 'a'-10+(int)base)) ) continue; else break; } } return ptr; } #define at_end_of_parse(ptr) \ if (end_of_parse) \ { *end_of_parse = (ptr); } \ else \ { if ((ptr) != string_limit) { throw read_number_junk_exception((ptr),string,string_limit); } } const cl_R read_real (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse) { ASSERT((flags.syntax & ~(syntax_real|syntax_maybe_bad)) == 0); // If no string_limit is given, it defaults to the end of the string. if (!string_limit) string_limit = string + ::strlen(string); if (flags.syntax & syntax_rational) { // Check for rational number syntax. var unsigned int rational_base = flags.rational_base; var const char * ptr = string; if (flags.lsyntax & lsyntax_commonlisp) { if (ptr == string_limit) goto not_rational_syntax; if (*ptr == '#') { // Check for #b, #o, #x, #nR syntax. ptr++; if (ptr == string_limit) goto not_rational_syntax; switch (*ptr) { case 'b': case 'B': rational_base = 2; break; case 'o': case 'O': rational_base = 8; break; case 'x': case 'X': rational_base = 16; break; default: var const char * base_end_ptr = skip_digits(ptr,string_limit,10); if (base_end_ptr == ptr) goto not_rational_syntax; if (base_end_ptr == string_limit) goto not_rational_syntax; if (!((*base_end_ptr == 'r') || (*base_end_ptr == 'R'))) goto not_rational_syntax; var cl_I base = read_integer(10,0,ptr,0,base_end_ptr-ptr); if (!((base >= 2) && (base <= 36))) { std::ostringstream buf; fprint(buf, "Base must be an integer in the range from 2 to 36, not "); fprint(buf, base); throw runtime_exception(buf.str()); } rational_base = FN_to_UV(base); ptr = base_end_ptr; break; } ptr++; } } var const char * ptr_after_prefix = ptr; var cl_signean sign = 0; if (ptr == string_limit) goto not_rational_syntax; switch (*ptr) { case '-': sign = ~sign; case '+': ptr++; default: break; } var const char * ptr_after_sign = ptr; if (flags.syntax & syntax_integer) { // Check for integer syntax: {'+'|'-'|} {digit}+ {'.'|} // Allow final dot only in Common Lisp syntax if there was no # prefix. if ((flags.lsyntax & lsyntax_commonlisp) && (ptr_after_prefix == string)) { ptr = skip_digits(ptr_after_sign,string_limit,10); if (ptr != ptr_after_sign) if (ptr != string_limit) if (*ptr == '.') { ptr++; if ((ptr == string_limit) || !(((*ptr >= '0') && (*ptr <= '9')) || ((*ptr >= 'A') && (*ptr <= 'Z') && (*ptr != 'I')) || ((*ptr >= 'a') && (*ptr <= 'z') && (*ptr != 'i')) || (*ptr == '.') || (*ptr == '_') || (*ptr == '/'))) { at_end_of_parse(ptr); return read_integer(10,sign,ptr_after_sign,0,ptr-ptr_after_sign); } } } ptr = skip_digits(ptr_after_sign,string_limit,rational_base); if ((ptr == string_limit) || !(((*ptr >= '0') && (*ptr <= '9')) || ((*ptr >= 'A') && (*ptr <= 'Z') && (*ptr != 'I')) || ((*ptr >= 'a') && (*ptr <= 'z') && (*ptr != 'i')) || (*ptr == '.') || (*ptr == '_') || (*ptr == '/'))) { at_end_of_parse(ptr); return read_integer(rational_base,sign,ptr_after_sign,0,ptr-ptr_after_sign); } } if (flags.syntax & syntax_ratio) { // Check for ratio syntax: {'+'|'-'|} {digit}+ '/' {digit}+ ptr = skip_digits(ptr_after_sign,string_limit,rational_base); if (ptr != ptr_after_sign) if (ptr != string_limit) if (*ptr == '/') { var const char * ptr_at_slash = ptr; ptr = skip_digits(ptr_at_slash+1,string_limit,rational_base); if (ptr != ptr_at_slash+1) if ((ptr == string_limit) || !(((*ptr >= '0') && (*ptr <= '9')) || ((*ptr >= 'A') && (*ptr <= 'Z') && (*ptr != 'I')) || ((*ptr >= 'a') && (*ptr <= 'z') && (*ptr != 'i')) || (*ptr == '.') || (*ptr == '_') || (*ptr == '/'))) { at_end_of_parse(ptr); return read_rational(rational_base,sign,ptr_after_sign,0,ptr_at_slash-ptr_after_sign,ptr-ptr_after_sign); } } } } not_rational_syntax: if (flags.syntax & syntax_float) { // Check for floating-point number syntax: // {'+'|'-'|} {digit}+ {'.' {digit}* | } expo {'+'|'-'|} {digit}+ // {'+'|'-'|} {digit}* '.' {digit}+ expo {'+'|'-'|} {digit}+ // {'+'|'-'|} {digit}* '.' {digit}+ var const char * ptr = string; var const unsigned int float_base = 10; var cl_signean sign = 0; if (ptr == string_limit) goto not_float_syntax; switch (*ptr) { case '-': sign = ~sign; case '+': ptr++; default: break; } var const char * ptr_after_sign = ptr; var const char * ptr_after_intpart = skip_digits(ptr_after_sign,string_limit,float_base); var bool have_dot = false; var const char * ptr_before_fracpart = ptr_after_intpart; var const char * ptr_after_fracpart = ptr_after_intpart; ptr = ptr_after_intpart; if (ptr != string_limit) if (*ptr == '.') { have_dot = true; ptr_before_fracpart = ptr+1; ptr_after_fracpart = skip_digits(ptr_before_fracpart,string_limit,float_base); } ptr = ptr_after_fracpart; var char exponent_marker; var bool have_exponent; var const char * ptr_in_exponent = ptr; var const char * ptr_after_exponent = ptr; if ((ptr == string_limit) || !(((*ptr >= '0') && (*ptr <= '9')) || ((*ptr >= 'A') && (*ptr <= 'Z') && (*ptr != 'I')) || ((*ptr >= 'a') && (*ptr <= 'z') && (*ptr != 'i')) || (*ptr == '.') || (*ptr == '/'))) { // No exponent. have_exponent = false; // Must have at least one fractional part digit. if (ptr_after_fracpart == ptr_before_fracpart) goto not_float_syntax; exponent_marker = 'E'; } else { have_exponent = true; // Must have at least one digit. if (ptr_after_sign == ptr_after_intpart) if (ptr_after_fracpart == ptr_before_fracpart) goto not_float_syntax; exponent_marker = ((*ptr >= 'a') && (*ptr <= 'z') ? *ptr - 'a' + 'A' : *ptr); switch (exponent_marker) { case 'E': case 'S': case 'F': case 'D': case 'L': break; default: goto not_float_syntax; } } if (have_exponent) { ptr++; if (ptr == string_limit) goto not_float_syntax; switch (*ptr) { case '-': case '+': ptr++; default: break; } ptr_in_exponent = ptr; ptr_after_exponent = skip_digits(ptr_in_exponent,string_limit,10); if (ptr_after_exponent == ptr_in_exponent) goto not_float_syntax; } ptr = ptr_after_exponent; var const char * ptr_after_prec = ptr; var float_format_t prec; if ((ptr != string_limit) && (*ptr == '_')) { ptr++; ptr_after_prec = skip_digits(ptr,string_limit,10); if (ptr_after_prec == ptr) goto not_float_syntax; var cl_I prec1 = digits_to_I(ptr,ptr_after_prec-ptr,10); var uintC prec2 = cl_I_to_ulong(prec1); prec = (float_base==10 ? float_format(prec2) : (float_format_t)((uintC)((1+prec2)*::log((double)float_base)*1.442695041)+1) ); } else { switch (exponent_marker) { case 'S': prec = float_format_sfloat; break; case 'F': prec = float_format_ffloat; break; case 'D': prec = float_format_dfloat; break; case 'L': prec = flags.float_flags.default_lfloat_format; break; case 'E': prec = flags.float_flags.default_float_format; break; default: NOTREACHED } if (flags.float_flags.mantissa_dependent_float_format) { // Count the number of significant digits. ptr = ptr_after_sign; while (ptr < ptr_after_fracpart && (*ptr == '0' || *ptr == '.')) ptr++; var uintC num_significant_digits = (ptr_after_fracpart - ptr) - (ptr_before_fracpart > ptr ? 1 : 0); var uintC prec2 = (num_significant_digits>=2 ? num_significant_digits-2 : 0); var float_format_t precx = (float_base==10 ? float_format(prec2) : (float_format_t)((uintC)((1+prec2)*::log((double)float_base)*1.442695041)+1) ); if ((uintC)precx > (uintC)prec) prec = precx; } } floatformatcase(prec , if (!(flags.syntax & syntax_sfloat)) goto not_float_syntax; , if (!(flags.syntax & syntax_ffloat)) goto not_float_syntax; , if (!(flags.syntax & syntax_dfloat)) goto not_float_syntax; , unused len; if (!(flags.syntax & syntax_lfloat)) goto not_float_syntax; ); at_end_of_parse(ptr_after_prec); return read_float(float_base,prec,sign,ptr_after_sign,0,ptr_after_fracpart-ptr_after_sign,ptr_after_exponent-ptr_after_sign,ptr_before_fracpart-ptr_after_sign); } not_float_syntax: if (flags.syntax & syntax_maybe_bad) { ASSERT(end_of_parse); *end_of_parse = string; return 0; // dummy return } throw read_number_bad_syntax_exception(string,string_limit); } } // namespace cln cln-1.3.3/src/real/input/cl_R_read_stream.cc0000644000000000000000000000471111731472024015571 0ustar // read_real(). // This file contains a slimmed down version of read_complex(). // It does not pull in all the complex function code. // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real_io.h" // Implementation. #include "cln/io.h" #include "base/string/cl_spushstring.h" #include "cln/input.h" namespace cln { // We read an entire token (or even more, if it begins with #C) into a // buffer and then call read_real() on the buffer. class pushstring_hack : public cl_spushstring { public: char* start_pointer (void) { return buffer; } char* end_pointer (void) { return buffer+index; } }; static bool number_char_p (char c) { if ((c >= '0') && (c <= '9')) return true; if (((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z'))) return true; switch (c) { case '+': case '-': case '.': case '_': case '/': return true; default: return false; } } const cl_R read_real (std::istream& stream, const cl_read_flags& flags) { // One pre-allocated buffer. This reduces the allocation/free cost. static pushstring_hack buffer; var int c; // Skip whitespace at the beginning. loop { c = stream.get(); if (stream.eof() || stream.fail()) goto eof; if ((c == ' ') || (c == '\t') || (c == '\n')) continue; else break; } // Found first non-whitespace character. // Numbers cannot cross lines. We can treat EOF and '\n' the same way. buffer.reset(); if (c == '#') { if (!(flags.lsyntax & lsyntax_commonlisp)) goto syntax1; buffer.push(c); // Read some digits, then a letter, then a token. loop { c = stream.get(); if (stream.eof() || stream.fail()) goto eof; buffer.push(c); if ((c >= '0') && (c <= '9')) continue; else break; } if (!(((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z')))) goto syntax1; c = stream.get(); if (stream.eof() || stream.fail()) goto eof; } // Read a number token. if (!number_char_p(c)) goto syntax1; loop { buffer.push(c); c = stream.peek(); // Avoid fail state on EOF. if (stream.eof() || stream.fail() || !number_char_p(c)) break; c = stream.get(); } // Parse the number. return read_real(flags, buffer.start_pointer(), buffer.end_pointer(), NULL ); // Handle syntax error. syntax1: buffer.push(c); throw read_number_bad_syntax_exception(buffer.start_pointer(),buffer.end_pointer()); // Handle premature EOF. eof: throw read_number_eof_exception(); } } // namespace cln cln-1.3.3/src/real/division/0000755000000000000000000000000012173046201012512 5ustar cln-1.3.3/src/real/division/cl_R_trunc1.cc0000644000000000000000000000046711201634740015205 0ustar // truncate1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "cln/float.h" namespace cln { const cl_I truncate1 (const cl_R& x) GEN_R_OP1_2(x, truncate1, return) } // namespace cln cln-1.3.3/src/real/division/cl_R_ffloor1.cc0000644000000000000000000000113611201634740015333 0ustar // ffloor(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "rational/cl_RA.h" #include "cln/integer.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" namespace cln { const cl_F ffloor (const cl_R& x) { realcase6(x , return cl_float(x); , var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); return cl_float(floor1(a,b)); , return ffloor(x); , return ffloor(x); , return ffloor(x); , return ffloor(x); ); } } // namespace cln cln-1.3.3/src/real/division/cl_R_trunc2.cc0000644000000000000000000000054311201634740015201 0ustar // truncate2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "cln/float.h" #include "real/division/cl_R_div_t.h" namespace cln { const cl_R_div_t truncate2 (const cl_R& x) GEN_R_OP1_2(x, truncate2, return) } // namespace cln cln-1.3.3/src/real/division/cl_R_floor1.cc0000644000000000000000000000045611201634740015171 0ustar // floor1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "cln/float.h" namespace cln { const cl_I floor1 (const cl_R& x) GEN_R_OP1_2(x, floor1, return) } // namespace cln cln-1.3.3/src/real/division/cl_R_ceil2.cc0000644000000000000000000000054011201634740014757 0ustar // ceiling2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "cln/float.h" #include "real/division/cl_R_div_t.h" namespace cln { const cl_R_div_t ceiling2 (const cl_R& x) GEN_R_OP1_2(x, ceiling2, return) } // namespace cln cln-1.3.3/src/real/division/cl_R_ftrunc1.cc0000644000000000000000000000116311201634740015345 0ustar // ftruncate(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "rational/cl_RA.h" #include "cln/integer.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" namespace cln { const cl_F ftruncate (const cl_R& x) { realcase6(x , return cl_float(x); , var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); return cl_float(truncate1(a,b)); , return ftruncate(x); , return ftruncate(x); , return ftruncate(x); , return ftruncate(x); ); } } // namespace cln cln-1.3.3/src/real/division/cl_R_ceil1.cc0000644000000000000000000000046411201634740014763 0ustar // ceiling1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "cln/float.h" namespace cln { const cl_I ceiling1 (const cl_R& x) GEN_R_OP1_2(x, ceiling1, return) } // namespace cln cln-1.3.3/src/real/division/cl_R_ffloor2.cc0000644000000000000000000000263711201634740015343 0ustar // ffloor2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "real/division/cl_R_div_t.h" #if 0 // 2 type dispatches #include "cln/rational.h" #include "cln/float.h" #include "real/division/cl_R_div_t.h" namespace cln { const cl_R_fdiv_t ffloor2 (const cl_R& x) { if (rationalp(x)) { DeclareType(cl_RA,x); var cl_RA_div_t q_r = floor2(x); var cl_I& q = q_r.quotient; var cl_RA& r = q_r.remainder; return cl_R_fdiv_t(cl_float(q),r); } else { DeclareType(cl_F,x); return ffloor2(x); } } } // namespace cln #else // 1 type dispatch #include "rational/cl_RA.h" #include "cln/integer.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_R_fdiv_t ffloor2 (const cl_R& x) { realcase6(x , return cl_R_fdiv_t(cl_float(x),0); , var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); var cl_I_div_t q_r = floor2(a,b); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_R_fdiv_t(cl_float(q),I_I_to_RT(r,b)); , var cl_SF q = ffloor(x); return cl_R_fdiv_t(q,x-q); , var cl_FF q = ffloor(x); return cl_R_fdiv_t(q,x-q); , var cl_DF q = ffloor(x); return cl_R_fdiv_t(q,x-q); , var cl_LF q = ffloor(x); return cl_R_fdiv_t(q,LF_LF_minus_LF(x,q)); ); } } // namespace cln #endif cln-1.3.3/src/real/division/cl_R_div_t.h0000644000000000000000000000130411201634740014727 0ustar // cl_R_div_t and cl_R_fdiv_t constructors #ifndef _CL_R_DIV_T_H #define _CL_R_DIV_T_H #include "cln/real.h" #include "rational/cl_RA.h" #include "cln/float.h" namespace cln { inline cl_R_div_t::cl_R_div_t (const cl_I_div_t& result) : quotient(result.quotient), remainder(result.remainder) {} inline cl_R_div_t::cl_R_div_t (const cl_RA_div_t& result) : quotient(result.quotient), remainder(result.remainder) {} inline cl_R_div_t::cl_R_div_t (const cl_F_div_t& result) : quotient(result.quotient), remainder(result.remainder) {} inline cl_R_fdiv_t::cl_R_fdiv_t (const cl_F_fdiv_t& result) : quotient(result.quotient), remainder(result.remainder) {} } // namespace cln #endif /* _CL_R_DIV_T_H */ cln-1.3.3/src/real/division/cl_R_ftrunc22.cc0000644000000000000000000000150611201634740015431 0ustar // ftruncate2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "real/division/cl_R_div_t.h" namespace cln { const cl_R_fdiv_t ftruncate2 (const cl_R& x, const cl_R& y) { // Methode: // x,y beide rational: truncate(x,y), Quotienten in Float umwandeln. // Sonst: ftruncate(x/y) -> q,r. Liefere die Werte q und x-y*q = y*r. if (rationalp(x)) if (rationalp(y)) { // beides rationale Zahlen DeclareType(cl_RA,x); DeclareType(cl_RA,y); var cl_R_div_t q_r = truncate2(x,y); var cl_I& q = q_r.quotient; var cl_R& r = q_r.remainder; return cl_R_fdiv_t(cl_float(q),r); } var cl_R_fdiv_t q_r = ftruncate2(x/y); var cl_F& q = q_r.quotient; var cl_R& r = q_r.remainder; return cl_R_fdiv_t(q,y*r); } } // namespace cln cln-1.3.3/src/real/division/cl_R_fceil12.cc0000644000000000000000000000102511201634740015205 0ustar // fceiling(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" namespace cln { const cl_F fceiling (const cl_R& x, const cl_R& y) { // Methode: // x,y beide rational: ceiling(x,y), Quotienten in Float umwandeln. // Sonst: fceiling(x/y). if (rationalp(x)) if (rationalp(y)) { // beides rationale Zahlen DeclareType(cl_RA,x); DeclareType(cl_RA,y); return cl_float(ceiling1(x,y)); } return fceiling(x/y); } } // namespace cln cln-1.3.3/src/real/division/cl_R_floor12.cc0000644000000000000000000000074411201634740015253 0ustar // floor1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" namespace cln { const cl_I floor1 (const cl_R& x, const cl_R& y) { // Methode: // Beides rationale Zahlen -> floor1(x,y). // Sonst: floor1(x/y). if (rationalp(x)) if (rationalp(y)) { DeclareType(cl_RA,x); DeclareType(cl_RA,y); return floor1(x,y); } return floor1(x/y); } } // namespace cln cln-1.3.3/src/real/division/cl_R_fceil22.cc0000644000000000000000000000150011201634740015204 0ustar // fceiling2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "real/division/cl_R_div_t.h" namespace cln { const cl_R_fdiv_t fceiling2 (const cl_R& x, const cl_R& y) { // Methode: // x,y beide rational: ceiling(x,y), Quotienten in Float umwandeln. // Sonst: fceiling(x/y) -> q,r. Liefere die Werte q und x-y*q = y*r. if (rationalp(x)) if (rationalp(y)) { // beides rationale Zahlen DeclareType(cl_RA,x); DeclareType(cl_RA,y); var cl_R_div_t q_r = ceiling2(x,y); var cl_I& q = q_r.quotient; var cl_R& r = q_r.remainder; return cl_R_fdiv_t(cl_float(q),r); } var cl_R_fdiv_t q_r = fceiling2(x/y); var cl_F& q = q_r.quotient; var cl_R& r = q_r.remainder; return cl_R_fdiv_t(q,y*r); } } // namespace cln cln-1.3.3/src/real/division/cl_R_trunc12.cc0000644000000000000000000000076611201634740015271 0ustar // truncate1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" namespace cln { const cl_I truncate1 (const cl_R& x, const cl_R& y) { // Methode: // Beides rationale Zahlen -> truncate1(x,y). // Sonst: truncate1(x/y). if (rationalp(x)) if (rationalp(y)) { DeclareType(cl_RA,x); DeclareType(cl_RA,y); return truncate1(x,y); } return truncate1(x/y); } } // namespace cln cln-1.3.3/src/real/division/cl_R_ceil12.cc0000644000000000000000000000076011201634740015044 0ustar // ceiling1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" namespace cln { const cl_I ceiling1 (const cl_R& x, const cl_R& y) { // Methode: // Beides rationale Zahlen -> ceiling1(x,y). // Sonst: ceiling1(x/y). if (rationalp(x)) if (rationalp(y)) { DeclareType(cl_RA,x); DeclareType(cl_RA,y); return ceiling1(x,y); } return ceiling1(x/y); } } // namespace cln cln-1.3.3/src/real/division/cl_R_rem.cc0000644000000000000000000000077311201634740014554 0ustar // rem(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/integer.h" namespace cln { const cl_R rem (const cl_R& x, const cl_R& y) { // Methode: // Beides Integers -> rem(x,y). // Sonst: truncate2(x/y) -> (q,r). Liefere x-y*q=y*r. if (integerp(x)) if (integerp(y)) { DeclareType(cl_I,x); DeclareType(cl_I,y); return rem(x,y); } return y * truncate2(x/y).remainder; } } // namespace cln cln-1.3.3/src/real/division/cl_R_round22.cc0000644000000000000000000000122611201634740015256 0ustar // round2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "real/division/cl_R_div_t.h" namespace cln { const cl_R_div_t round2 (const cl_R& x, const cl_R& y) { // Methode: // Beides rationale Zahlen -> round2(x,y). // Sonst: round2(x/y) -> (q,r). Liefere q und x-y*q=y*r. if (rationalp(x)) if (rationalp(y)) { DeclareType(cl_RA,x); DeclareType(cl_RA,y); return round2(x,y); } var cl_R_div_t q_r = round2(x/y); var cl_I& q = q_r.quotient; var cl_R& r = q_r.remainder; return cl_R_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/real/division/cl_R_ceil22.cc0000644000000000000000000000124211201634740015041 0ustar // ceiling2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "real/division/cl_R_div_t.h" namespace cln { const cl_R_div_t ceiling2 (const cl_R& x, const cl_R& y) { // Methode: // Beides rationale Zahlen -> ceiling2(x,y). // Sonst: ceiling2(x/y) -> (q,r). Liefere q und x-y*q=y*r. if (rationalp(x)) if (rationalp(y)) { DeclareType(cl_RA,x); DeclareType(cl_RA,y); return ceiling2(x,y); } var cl_R_div_t q_r = ceiling2(x/y); var cl_I& q = q_r.quotient; var cl_R& r = q_r.remainder; return cl_R_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/real/division/cl_R_ftrunc2.cc0000644000000000000000000000267511201634740015357 0ustar // ftruncate2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "real/division/cl_R_div_t.h" #if 0 // 2 type dispatches #include "cln/rational.h" #include "cln/float.h" #include "real/division/cl_R_div_t.h" namespace cln { const cl_R_fdiv_t ftruncate2 (const cl_R& x) { if (rationalp(x)) { DeclareType(cl_RA,x); var cl_RA_div_t q_r = truncate2(x); var cl_I& q = q_r.quotient; var cl_RA& r = q_r.remainder; return cl_R_fdiv_t(cl_float(q),r); } else { DeclareType(cl_F,x); return ftruncate2(x); } } } // namespace cln #else // 1 type dispatch #include "rational/cl_RA.h" #include "cln/integer.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_R_fdiv_t ftruncate2 (const cl_R& x) { realcase6(x , return cl_R_fdiv_t(cl_float(x),0); , var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); var cl_I_div_t q_r = truncate2(a,b); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_R_fdiv_t(cl_float(q),I_I_to_RT(r,b)); , var cl_SF q = ftruncate(x); return cl_R_fdiv_t(q,x-q); , var cl_FF q = ftruncate(x); return cl_R_fdiv_t(q,x-q); , var cl_DF q = ftruncate(x); return cl_R_fdiv_t(q,x-q); , var cl_LF q = ftruncate(x); return cl_R_fdiv_t(q,LF_LF_minus_LF(x,q)); ); } } // namespace cln #endif cln-1.3.3/src/real/division/cl_R_fceil1.cc0000644000000000000000000000115411201634740015126 0ustar // fceiling(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "rational/cl_RA.h" #include "cln/integer.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" namespace cln { const cl_F fceiling (const cl_R& x) { realcase6(x , return cl_float(x); , var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); return cl_float(ceiling1(a,b)); , return fceiling(x); , return fceiling(x); , return fceiling(x); , return fceiling(x); ); } } // namespace cln cln-1.3.3/src/real/division/cl_R_fround12.cc0000644000000000000000000000101111201634740015413 0ustar // fround(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" namespace cln { const cl_F fround (const cl_R& x, const cl_R& y) { // Methode: // x,y beide rational: round(x,y), Quotienten in Float umwandeln. // Sonst: fround(x/y). if (rationalp(x)) if (rationalp(y)) { // beides rationale Zahlen DeclareType(cl_RA,x); DeclareType(cl_RA,y); return cl_float(round1(x,y)); } return fround(x/y); } } // namespace cln cln-1.3.3/src/real/division/cl_R_round1.cc0000644000000000000000000000045611201634740015177 0ustar // round1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "cln/float.h" namespace cln { const cl_I round1 (const cl_R& x) GEN_R_OP1_2(x, round1, return) } // namespace cln cln-1.3.3/src/real/division/cl_R_round2.cc0000644000000000000000000000053211201634740015173 0ustar // round2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "cln/float.h" #include "real/division/cl_R_div_t.h" namespace cln { const cl_R_div_t round2 (const cl_R& x) GEN_R_OP1_2(x, round2, return) } // namespace cln cln-1.3.3/src/real/division/cl_R_ffloor22.cc0000644000000000000000000000146411201634740015422 0ustar // ffloor2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "real/division/cl_R_div_t.h" namespace cln { const cl_R_fdiv_t ffloor2 (const cl_R& x, const cl_R& y) { // Methode: // x,y beide rational: floor(x,y), Quotienten in Float umwandeln. // Sonst: ffloor(x/y) -> q,r. Liefere die Werte q und x-y*q = y*r. if (rationalp(x)) if (rationalp(y)) { // beides rationale Zahlen DeclareType(cl_RA,x); DeclareType(cl_RA,y); var cl_R_div_t q_r = floor2(x,y); var cl_I& q = q_r.quotient; var cl_R& r = q_r.remainder; return cl_R_fdiv_t(cl_float(q),r); } var cl_R_fdiv_t q_r = ffloor2(x/y); var cl_F& q = q_r.quotient; var cl_R& r = q_r.remainder; return cl_R_fdiv_t(q,y*r); } } // namespace cln cln-1.3.3/src/real/division/cl_R_mod.cc0000644000000000000000000000076511201634740014551 0ustar // mod(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/integer.h" namespace cln { const cl_R mod (const cl_R& x, const cl_R& y) { // Methode: // Beides Integers -> mod(x,y). // Sonst: floor2(x/y) -> (q,r). Liefere x-y*q=y*r. if (integerp(x)) if (integerp(y)) { DeclareType(cl_I,x); DeclareType(cl_I,y); return mod(x,y); } return y * floor2(x/y).remainder; } } // namespace cln cln-1.3.3/src/real/division/cl_R_round12.cc0000644000000000000000000000074411201634740015261 0ustar // round1(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" namespace cln { const cl_I round1 (const cl_R& x, const cl_R& y) { // Methode: // Beides rationale Zahlen -> round1(x,y). // Sonst: round1(x/y). if (rationalp(x)) if (rationalp(y)) { DeclareType(cl_RA,x); DeclareType(cl_RA,y); return round1(x,y); } return round1(x/y); } } // namespace cln cln-1.3.3/src/real/division/cl_R_fceil2.cc0000644000000000000000000000266311201634740015135 0ustar // fceiling2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "real/division/cl_R_div_t.h" #if 0 // 2 type dispatches #include "cln/rational.h" #include "cln/float.h" #include "real/division/cl_R_div_t.h" namespace cln { const cl_R_fdiv_t fceiling2 (const cl_R& x) { if (rationalp(x)) { DeclareType(cl_RA,x); var cl_RA_div_t q_r = ceiling2(x); var cl_I& q = q_r.quotient; var cl_RA& r = q_r.remainder; return cl_R_fdiv_t(cl_float(q),r); } else { DeclareType(cl_F,x); return fceiling2(x); } } } // namespace cln #else // 1 type dispatch #include "rational/cl_RA.h" #include "cln/integer.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_R_fdiv_t fceiling2 (const cl_R& x) { realcase6(x , return cl_R_fdiv_t(cl_float(x),0); , var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); var cl_I_div_t q_r = ceiling2(a,b); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_R_fdiv_t(cl_float(q),I_I_to_RT(r,b)); , var cl_SF q = fceiling(x); return cl_R_fdiv_t(q,x-q); , var cl_FF q = fceiling(x); return cl_R_fdiv_t(q,x-q); , var cl_DF q = fceiling(x); return cl_R_fdiv_t(q,x-q); , var cl_LF q = fceiling(x); return cl_R_fdiv_t(q,LF_LF_minus_LF(x,q)); ); } } // namespace cln #endif cln-1.3.3/src/real/division/cl_R_fround2.cc0000644000000000000000000000263711201634740015351 0ustar // fround2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "real/division/cl_R_div_t.h" #if 0 // 2 type dispatches #include "cln/rational.h" #include "cln/float.h" #include "real/division/cl_R_div_t.h" namespace cln { const cl_R_fdiv_t fround2 (const cl_R& x) { if (rationalp(x)) { DeclareType(cl_RA,x); var cl_RA_div_t q_r = round2(x); var cl_I& q = q_r.quotient; var cl_RA& r = q_r.remainder; return cl_R_fdiv_t(cl_float(q),r); } else { DeclareType(cl_F,x); return fround2(x); } } } // namespace cln #else // 1 type dispatch #include "rational/cl_RA.h" #include "cln/integer.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" #include "float/lfloat/cl_LF.h" namespace cln { const cl_R_fdiv_t fround2 (const cl_R& x) { realcase6(x , return cl_R_fdiv_t(cl_float(x),0); , var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); var cl_I_div_t q_r = round2(a,b); var cl_I& q = q_r.quotient; var cl_I& r = q_r.remainder; return cl_R_fdiv_t(cl_float(q),I_I_to_RT(r,b)); , var cl_SF q = fround(x); return cl_R_fdiv_t(q,x-q); , var cl_FF q = fround(x); return cl_R_fdiv_t(q,x-q); , var cl_DF q = fround(x); return cl_R_fdiv_t(q,x-q); , var cl_LF q = fround(x); return cl_R_fdiv_t(q,LF_LF_minus_LF(x,q)); ); } } // namespace cln #endif cln-1.3.3/src/real/division/cl_R_fround22.cc0000644000000000000000000000146411201634740015430 0ustar // fround2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "real/division/cl_R_div_t.h" namespace cln { const cl_R_fdiv_t fround2 (const cl_R& x, const cl_R& y) { // Methode: // x,y beide rational: round(x,y), Quotienten in Float umwandeln. // Sonst: fround(x/y) -> q,r. Liefere die Werte q und x-y*q = y*r. if (rationalp(x)) if (rationalp(y)) { // beides rationale Zahlen DeclareType(cl_RA,x); DeclareType(cl_RA,y); var cl_R_div_t q_r = round2(x,y); var cl_I& q = q_r.quotient; var cl_R& r = q_r.remainder; return cl_R_fdiv_t(cl_float(q),r); } var cl_R_fdiv_t q_r = fround2(x/y); var cl_F& q = q_r.quotient; var cl_R& r = q_r.remainder; return cl_R_fdiv_t(q,y*r); } } // namespace cln cln-1.3.3/src/real/division/cl_R_ffloor12.cc0000644000000000000000000000101111201634740015405 0ustar // ffloor(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" namespace cln { const cl_F ffloor (const cl_R& x, const cl_R& y) { // Methode: // x,y beide rational: floor(x,y), Quotienten in Float umwandeln. // Sonst: ffloor(x/y). if (rationalp(x)) if (rationalp(y)) { // beides rationale Zahlen DeclareType(cl_RA,x); DeclareType(cl_RA,y); return cl_float(floor1(x,y)); } return ffloor(x/y); } } // namespace cln cln-1.3.3/src/real/division/cl_R_floor2.cc0000644000000000000000000000053211201634740015165 0ustar // floor2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "cln/float.h" #include "real/division/cl_R_div_t.h" namespace cln { const cl_R_div_t floor2 (const cl_R& x) GEN_R_OP1_2(x, floor2, return) } // namespace cln cln-1.3.3/src/real/division/cl_R_trunc22.cc0000644000000000000000000000125011201634740015257 0ustar // truncate2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "real/division/cl_R_div_t.h" namespace cln { const cl_R_div_t truncate2 (const cl_R& x, const cl_R& y) { // Methode: // Beides rationale Zahlen -> truncate2(x,y). // Sonst: truncate2(x/y) -> (q,r). Liefere q und x-y*q=y*r. if (rationalp(x)) if (rationalp(y)) { DeclareType(cl_RA,x); DeclareType(cl_RA,y); return truncate2(x,y); } var cl_R_div_t q_r = truncate2(x/y); var cl_I& q = q_r.quotient; var cl_R& r = q_r.remainder; return cl_R_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/real/division/cl_R_ftrunc12.cc0000644000000000000000000000103311201634740015423 0ustar // ftruncate(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" namespace cln { const cl_F ftruncate (const cl_R& x, const cl_R& y) { // Methode: // x,y beide rational: truncate(x,y), Quotienten in Float umwandeln. // Sonst: ftruncate(x/y). if (rationalp(x)) if (rationalp(y)) { // beides rationale Zahlen DeclareType(cl_RA,x); DeclareType(cl_RA,y); return cl_float(truncate1(x,y)); } return ftruncate(x/y); } } // namespace cln cln-1.3.3/src/real/division/cl_R_fround1.cc0000644000000000000000000000113611201634740015341 0ustar // fround(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "rational/cl_RA.h" #include "cln/integer.h" #include "cln/sfloat.h" #include "cln/ffloat.h" #include "cln/dfloat.h" #include "cln/lfloat.h" namespace cln { const cl_F fround (const cl_R& x) { realcase6(x , return cl_float(x); , var const cl_I& a = numerator(x); var const cl_I& b = denominator(x); return cl_float(round1(a,b)); , return fround(x); , return fround(x); , return fround(x); , return fround(x); ); } } // namespace cln cln-1.3.3/src/real/division/cl_R_floor22.cc0000644000000000000000000000122611201634740015250 0ustar // floor2(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/real.h" // Implementation. #include "real/cl_R.h" #include "cln/rational.h" #include "real/division/cl_R_div_t.h" namespace cln { const cl_R_div_t floor2 (const cl_R& x, const cl_R& y) { // Methode: // Beides rationale Zahlen -> floor2(x,y). // Sonst: floor2(x/y) -> (q,r). Liefere q und x-y*q=y*r. if (rationalp(x)) if (rationalp(y)) { DeclareType(cl_RA,x); DeclareType(cl_RA,y); return floor2(x,y); } var cl_R_div_t q_r = floor2(x/y); var cl_I& q = q_r.quotient; var cl_R& r = q_r.remainder; return cl_R_div_t(q,y*r); } } // namespace cln cln-1.3.3/src/Makefile.in0000644000000000000000000411213412172603771012030 0ustar # Makefile.in generated by automake 1.13.3 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. @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 = src DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/autoconf/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/alloca.m4 \ $(top_srcdir)/m4/as-underscore.m4 $(top_srcdir)/m4/cc.m4 \ $(top_srcdir)/m4/floatparam.m4 $(top_srcdir)/m4/general.m4 \ $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gmp.m4 \ $(top_srcdir)/m4/intparam.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/longdouble.m4 \ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/param.m4 \ $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/proto.m4 \ $(top_srcdir)/m4/rusage.m4 $(top_srcdir)/m4/times.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/autoconf/cl_config.h \ $(top_builddir)/include/cln/config.h \ $(top_builddir)/include/cln/host_cpu.h \ $(top_builddir)/include/cln/version.h \ $(top_builddir)/src/base/cl_base_config.h \ $(top_builddir)/src/base/cl_gmpconfig.h \ $(top_builddir)/src/timing/cl_t_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)" LTLIBRARIES = $(lib_LTLIBRARIES) libcln_la_LIBADD = am_libcln_la_OBJECTS = cl_alloca.lo cl_as_exception.lo cl_condition.lo \ cl_d0_exception.lo cl_debug.lo cl_debugout.lo cl_free.lo \ cl_immclasses.lo cl_malloc.lo cl_notreached_exception.lo \ cl_version.lo cl_2D_div.lo cl_2D_exptpos.lo cl_2DS_div.lo \ cl_2DS_recip.lo cl_DS_div.lo cl_DS_mul.lo cl_DS_random.lo \ cl_DS_recip.lo cl_DS_recipsqrt.lo cl_DS_sqrt.lo \ cl_DS_trandom.lo cl_rcpointer2_hashweak_rcpointer.lo \ cl_rcpointer_hashweak_rcpointer.lo \ cl_read_bad_syntax_exception.lo cl_read_eof_exception.lo \ cl_read_junk_exception.lo cl_low_div.lo cl_low_isqrt.lo \ cl_low_isqrt2.lo cl_low_mul.lo cl_output_dec.lo \ cl_output_hex.lo cl_prin_globals.lo cl_pl_add.lo cl_pl_d.lo \ cl_pl_get.lo cl_UL_random.lo cl_random_def.lo \ cl_random_from.lo cl_no_ring.lo cl_ring_debug.lo \ cl_spushstring_append.lo cl_spushstring_push.lo cl_sstring.lo \ cl_st_c2.lo cl_st_concat1.lo cl_st_concat2.lo cl_st_concat3.lo \ cl_st_debug.lo cl_st_hashcode.lo cl_st_make0.lo cl_st_make1.lo \ cl_st_make2.lo cl_st_get1.lo cl_st_get2.lo cl_st_getline1.lo \ cl_st_getline2.lo cl_st_gettoken.lo cl_st_class.lo \ cl_st_print.lo cl_sy_hashcode.lo cl_symbol.lo cl_C_abs.lo \ cl_C_abs_aux.lo cl_C_signum.lo cl_C_sqrt.lo cl_DF_hypot.lo \ cl_FF_hypot.lo cl_LF_hypot.lo cl_R_hypot.lo cl_SF_hypot.lo \ cl_C_equal.lo cl_C_from_R_R_complex.lo \ cl_C_from_R_R_complex1.lo cl_C_imagpart.lo cl_C_minus.lo \ cl_C_minus1.lo cl_C_mul.lo cl_C_plus.lo cl_C_plus1.lo \ cl_C_realpart.lo cl_C_square.lo cl_C_uminus.lo cl_C_zerop.lo \ cl_C_DF_recip.lo cl_C_FF_recip.lo cl_C_LF_recip.lo \ cl_C_SF_recip.lo cl_C_div.lo cl_C_recip.lo cl_N_from_string.lo \ cl_N_read.lo cl_N_read_stream.lo cl_C_class.lo \ cl_C_conjugate.lo cl_C_debug.lo cl_C_eqhashcode.lo \ cl_C_expt.lo cl_C_expt_I.lo cl_N_as.lo cl_N_aprint.lo \ cl_N_bprint.lo cl_C_ring.lo cl_C_acos.lo cl_C_acosh.lo \ cl_C_asin.lo cl_C_asinh.lo cl_C_asinh_aux.lo cl_C_atan.lo \ cl_C_atanh.lo cl_C_atanh_aux.lo cl_C_cis.lo cl_C_cos.lo \ cl_C_cosh.lo cl_C_exp.lo cl_C_expt_C.lo cl_C_log.lo \ cl_C_log2.lo cl_C_phase.lo cl_C_sin.lo cl_C_sinh.lo \ cl_C_tan.lo cl_C_tanh.lo cl_R_cis.lo cl_F_sqrt.lo \ cl_F_globals.lo cl_F_nan_exception.lo \ cl_F_overflow_exception.lo cl_F_underflow_exception.lo \ cl_DF_to_FF.lo cl_DF_to_LF.lo cl_DF_to_SF.lo \ cl_DF_to_double.lo cl_DF_to_float.lo cl_FF_to_DF.lo \ cl_FF_to_LF.lo cl_FF_to_SF.lo cl_FF_to_double.lo \ cl_FF_to_float.lo cl_F_from_F.lo cl_F_from_F_f.lo \ cl_F_from_I.lo cl_F_from_I_def.lo cl_F_from_I_f.lo \ cl_F_from_RA.lo cl_F_from_RA_def.lo cl_F_from_RA_f.lo \ cl_F_to_DF.lo cl_F_to_FF.lo cl_F_to_LF.lo cl_F_to_SF.lo \ cl_F_to_double.lo cl_F_to_float.lo cl_LF_to_DF.lo \ cl_LF_to_FF.lo cl_LF_to_SF.lo cl_LF_to_double.lo \ cl_LF_to_float.lo cl_SF_to_DF.lo cl_SF_to_FF.lo cl_SF_to_LF.lo \ cl_SF_to_double.lo cl_SF_to_float.lo cl_DF_sqrt.lo \ cl_DF_from_double.lo cl_DF_to_doublej.lo cl_I_to_double.lo \ cl_RA_to_double.lo cl_DF_ceil22.lo cl_DF_fceil.lo \ cl_DF_floor22.lo cl_DF_recip.lo cl_DF_round22.lo \ cl_DF_trunc22.lo cl_DF_compare.lo cl_DF_div.lo cl_DF_ffloor.lo \ cl_DF_from_I.lo cl_DF_from_RA.lo cl_DF_fround.lo \ cl_DF_ftrunc.lo cl_DF_futrunc.lo cl_DF_globals.lo \ cl_DF_minus.lo cl_DF_minusp.lo cl_DF_mul.lo cl_DF_plus.lo \ cl_DF_plusp.lo cl_DF_scale.lo cl_DF_scale_I.lo cl_DF_to_I.lo \ cl_DF_uminus.lo cl_DF_zerop.lo cl_DF_from_string.lo \ cl_DF_abs.lo cl_DF_as.lo cl_DF_class.lo cl_DF_debug.lo \ cl_DF_decode.lo cl_DF_digits.lo cl_DF_eqhashcode.lo \ cl_DF_exponent.lo cl_DF_idecode.lo cl_DF_max.lo cl_DF_min.lo \ cl_DF_precision.lo cl_DF_sign.lo cl_DF_signum.lo cl_F_ceil1.lo \ cl_F_ceil2.lo cl_F_ceil22.lo cl_F_fceil1.lo cl_F_fceil2.lo \ cl_F_ffloor1.lo cl_F_ffloor2.lo cl_F_floor1.lo cl_F_floor2.lo \ cl_F_floor22.lo cl_F_fround1.lo cl_F_fround2.lo \ cl_F_ftrunc1.lo cl_F_ftrunc2.lo cl_F_round1.lo cl_F_round2.lo \ cl_F_round22.lo cl_F_trunc1.lo cl_F_trunc2.lo cl_F_trunc22.lo \ cl_F_I_div.lo cl_F_I_mul.lo cl_F_RA_div.lo cl_F_RA_mul.lo \ cl_F_compare.lo cl_F_div.lo cl_F_minus.lo cl_F_minusp.lo \ cl_F_mul.lo cl_F_plus.lo cl_F_plusp.lo cl_F_recip.lo \ cl_F_scale.lo cl_F_scale_I.lo cl_F_square.lo cl_F_uminus.lo \ cl_F_zerop.lo cl_I_F_div.lo cl_RA_F_div.lo cl_FF_sqrt.lo \ cl_FF_from_float.lo cl_FF_to_floatj.lo cl_I_to_float.lo \ cl_RA_to_float.lo cl_FF_ceil22.lo cl_FF_fceil.lo \ cl_FF_floor22.lo cl_FF_recip.lo cl_FF_round22.lo \ cl_FF_trunc22.lo cl_FF_compare.lo cl_FF_div.lo cl_FF_ffloor.lo \ cl_FF_from_I.lo cl_FF_from_RA.lo cl_FF_fround.lo \ cl_FF_ftrunc.lo cl_FF_futrunc.lo cl_FF_globals.lo \ cl_FF_minus.lo cl_FF_minusp.lo cl_FF_mul.lo cl_FF_plus.lo \ cl_FF_plusp.lo cl_FF_scale.lo cl_FF_scale_I.lo cl_FF_to_I.lo \ cl_FF_uminus.lo cl_FF_zerop.lo cl_FF_from_string.lo \ cl_FF_abs.lo cl_FF_as.lo cl_FF_class.lo cl_FF_debug.lo \ cl_FF_decode.lo cl_FF_digits.lo cl_FF_eqhashcode.lo \ cl_FF_exponent.lo cl_FF_idecode.lo cl_FF_max.lo cl_FF_min.lo \ cl_FF_precision.lo cl_FF_sign.lo cl_FF_signum.lo \ cl_F_from_string.lo cl_F_read.lo cl_F_read_stream.lo \ cl_F_readparsed.lo cl_LF_sqrt.lo cl_LF_ceil22.lo \ cl_LF_fceil.lo cl_LF_floor22.lo cl_LF_recip.lo \ cl_LF_round22.lo cl_LF_trunc22.lo cl_I_LF_div.lo \ cl_LF_1minus.lo cl_LF_1plus.lo cl_LF_2minus.lo cl_LF_2plus.lo \ cl_LF_I_div.lo cl_LF_I_mul.lo cl_LF_RA_div.lo cl_LF_RA_mul.lo \ cl_LF_compare.lo cl_LF_div.lo cl_LF_ffloor.lo cl_LF_from_I.lo \ cl_LF_from_RA.lo cl_LF_fround.lo cl_LF_ftrunc.lo \ cl_LF_futrunc.lo cl_LF_globals.lo cl_LF_minus1.lo \ cl_LF_minusp.lo cl_LF_mul.lo cl_LF_plus1.lo cl_LF_plusp.lo \ cl_LF_scale.lo cl_LF_scale_I.lo cl_LF_square.lo cl_LF_to_I.lo \ cl_LF_uminus.lo cl_LF_zerop.lo cl_RA_LF_div.lo \ cl_LF_from_string.lo cl_LF_abs.lo cl_LF_as.lo cl_LF_class.lo \ cl_LF_debug.lo cl_LF_decode.lo cl_LF_digits.lo \ cl_LF_eqhashcode.lo cl_LF_exponent.lo cl_LF_extend.lo \ cl_LF_idecode.lo cl_LF_leninc.lo cl_LF_lenincx.lo cl_LF_max.lo \ cl_LF_min.lo cl_LF_precision.lo cl_LF_shorten.lo \ cl_LF_shortenrel.lo cl_LF_shortenwith.lo cl_LF_sign.lo \ cl_LF_signum.lo cl_LF_to_LF.lo cl_F_abs.lo cl_F_as.lo \ cl_F_decode.lo cl_F_digits.lo cl_F_epsneg.lo cl_F_epspos.lo \ cl_F_eqhashcode.lo cl_F_exponent.lo cl_F_extendsqrt.lo \ cl_F_extendsqrtx.lo cl_F_idecode.lo cl_F_leastneg.lo \ cl_F_leastpos.lo cl_F_max.lo cl_F_min.lo cl_F_mostneg.lo \ cl_F_mostpos.lo cl_F_precision.lo cl_F_rational.lo \ cl_F_shortenrel.lo cl_F_sign.lo cl_F_sign2.lo cl_F_signum.lo \ cl_float_format.lo cl_F_aprint.lo cl_F_bprint.lo \ cl_F_cprint.lo cl_F_dprint.lo cl_F_printb.lo cl_F_random.lo \ cl_SF_sqrt.lo cl_SF_ceil22.lo cl_SF_fceil.lo cl_SF_ffloor.lo \ cl_SF_floor22.lo cl_SF_recip.lo cl_SF_round22.lo \ cl_SF_trunc22.lo cl_SF_compare.lo cl_SF_div.lo cl_SF_from_I.lo \ cl_SF_from_RA.lo cl_SF_fround.lo cl_SF_ftrunc.lo \ cl_SF_futrunc.lo cl_SF_minus.lo cl_SF_minusp.lo cl_SF_mul.lo \ cl_SF_plus.lo cl_SF_plusp.lo cl_SF_scale.lo cl_SF_scale_I.lo \ cl_SF_to_I.lo cl_SF_uminus.lo cl_SF_zerop.lo \ cl_SF_from_string.lo cl_SF_abs.lo cl_SF_as.lo cl_SF_class.lo \ cl_SF_debug.lo cl_SF_decode.lo cl_SF_digits.lo \ cl_SF_eqhashcode.lo cl_SF_exponent.lo cl_SF_idecode.lo \ cl_SF_max.lo cl_SF_min.lo cl_SF_precision.lo cl_SF_sign.lo \ cl_SF_signum.lo cl_F_atanhx.lo cl_F_atanx.lo \ cl_F_catalanconst.lo cl_F_catalanconst_def.lo \ cl_F_catalanconst_f.lo cl_F_catalanconst_var.lo cl_F_cos.lo \ cl_F_cosh.lo cl_F_coshsinh.lo cl_F_cossin.lo \ cl_F_eulerconst.lo cl_F_eulerconst_def.lo cl_F_eulerconst_f.lo \ cl_F_eulerconst_var.lo cl_F_exp.lo cl_F_exp1.lo \ cl_F_exp1_def.lo cl_F_exp1_f.lo cl_F_exp1_var.lo cl_F_expx.lo \ cl_F_ln.lo cl_F_ln10.lo cl_F_ln10_f.lo cl_F_ln10_var.lo \ cl_F_ln2.lo cl_F_ln2_f.lo cl_F_ln2_var.lo cl_F_lnx.lo \ cl_F_pi.lo cl_F_pi_def.lo cl_F_pi_f.lo cl_F_pi_var.lo \ cl_F_roundpi.lo cl_F_roundpi2.lo cl_F_sin.lo cl_F_sinh.lo \ cl_F_sinhx.lo cl_F_sinx.lo cl_F_tan.lo cl_F_tanh.lo \ cl_F_zeta_int.lo cl_F_zeta_int_def.lo cl_F_zeta_int_f.lo \ cl_LF_atan_recip.lo cl_LF_atanh_recip.lo cl_LF_catalanconst.lo \ cl_LF_coshsinh.lo cl_LF_coshsinh_aux.lo cl_LF_cossin.lo \ cl_LF_cossin_aux.lo cl_LF_eulerconst.lo cl_LF_exp1.lo \ cl_LF_exp_aux.lo cl_LF_ln10.lo cl_LF_ln2.lo cl_LF_pi.lo \ cl_LF_ratseries_.lo cl_LF_ratseries_a.lo cl_LF_ratseries_ab.lo \ cl_LF_ratseries_b.lo cl_LF_ratseries_p.lo \ cl_LF_ratseries_pa.lo cl_LF_ratseries_pab.lo \ cl_LF_ratseries_pb.lo cl_LF_ratseries_pq.lo \ cl_LF_ratseries_pqa.lo cl_LF_ratseries_pqab.lo \ cl_LF_ratseries_pqb.lo cl_LF_ratseries_q.lo \ cl_LF_ratseries_qa.lo cl_LF_ratseries_qab.lo \ cl_LF_ratseries_qb.lo cl_LF_ratsumseries_pqcd.lo \ cl_LF_ratsumseries_pqcd_aux.lo cl_LF_ratsumseries_pqd.lo \ cl_LF_ratsumseries_pqd_aux.lo cl_LF_zeta3.lo cl_LF_zeta_int.lo \ cl_I_2adic_div.lo cl_I_2adic_recip.lo cl_I_rootp.lo \ cl_I_rootp_I.lo cl_I_rootp_aux.lo cl_I_sqrt.lo cl_I_sqrtp.lo \ cl_I_ash.lo cl_I_ash_I.lo cl_I_ash_exception.lo cl_I_boole.lo \ cl_I_dpb.lo cl_I_dpf.lo cl_I_fullbyte.lo cl_I_ilength.lo \ cl_I_ldb.lo cl_I_ldbtest.lo cl_I_ldbx.lo cl_I_ldbxtest.lo \ cl_I_log_aux.lo cl_I_logand.lo cl_I_logandc2.lo \ cl_I_logbitp.lo cl_I_logbitp_I.lo cl_I_logcount.lo \ cl_I_logeqv.lo cl_I_logior.lo cl_I_lognand.lo cl_I_lognor.lo \ cl_I_lognot.lo cl_I_logorc2.lo cl_I_logtest.lo cl_I_logxor.lo \ cl_I_mkf.lo cl_I_mkfx.lo cl_I_cached_power.lo \ cl_I_digits_need.lo cl_I_from_DS.lo cl_I_from_L.lo \ cl_I_from_L2.lo cl_I_from_NDS.lo cl_I_from_NUDS.lo \ cl_I_from_Q.lo cl_I_from_Q2.lo cl_I_from_UDS.lo \ cl_I_from_UL.lo cl_I_from_UL2.lo cl_I_from_UQ.lo \ cl_I_from_digits.lo cl_I_mul10plus.lo cl_I_to_L.lo \ cl_I_to_Q.lo cl_I_to_UL.lo cl_I_to_UQ.lo cl_I_to_digits.lo \ cl_I_ceil1.lo cl_I_ceil2.lo cl_I_exquo.lo \ cl_I_exquo_exception.lo cl_I_exquopos.lo cl_I_floor1.lo \ cl_I_floor2.lo cl_I_mod.lo cl_I_rem.lo cl_I_round1.lo \ cl_I_round2.lo cl_I_trunc1.lo cl_I_trunc2.lo cl_I_compare.lo \ cl_I_div.lo cl_I_equal.lo cl_I_minus.lo cl_I_minus1.lo \ cl_I_minusp.lo cl_I_mul.lo cl_I_plus.lo cl_I_plus1.lo \ cl_I_plusp.lo cl_I_square.lo cl_I_uminus.lo cl_I_zerop.lo \ cl_I_gcd.lo cl_I_gcd_aux.lo cl_I_gcd_aux2.lo cl_I_lcm.lo \ cl_I_xgcd.lo cl_low_gcd.lo cl_I_hash_gcobject.lo \ cl_I_hash_gcpointer.lo cl_I_hash_pointer.lo \ cl_I_hash_rcobject.lo cl_I_hash_rcpointer.lo cl_I_hashcode.lo \ cl_I_hashweak_rcpointer.lo cl_I_from_string.lo cl_I_read.lo \ cl_I_read_stream.lo cl_I_readparsed.lo cl_BN_class.lo \ cl_FN_class.lo cl_I_abs.lo cl_I_as.lo cl_I_debug.lo \ cl_I_eqhashcode.lo cl_I_exptpos.lo cl_I_exptpos_I.lo \ cl_I_max.lo cl_I_min.lo cl_I_oddp.lo cl_I_ord2.lo \ cl_I_power2p.lo cl_I_signum.lo cl_I_binomial.lo \ cl_I_doublefactorial.lo cl_I_factorial.lo \ cl_I_factorial_aux.lo cl_I_aprint.lo cl_I_bprint.lo \ cl_I_cprint.lo cl_I_decstring.lo cl_I_dprint.lo cl_I_print.lo \ cl_I_print_string.lo cl_I_random.lo cl_I_trandom.lo \ cl_0_ring.lo cl_I_ring.lo cl_MI.lo cl_MI_cond_composite.lo \ cl_MI_debug.lo cl_MI_err_comp.lo cl_MI_lshift.lo \ cl_MI_rshift.lo cl_IF_millerrabin.lo cl_IF_smallprimes.lo \ cl_IF_trialdiv.lo cl_IF_trialdiv1.lo cl_IF_trialdiv2.lo \ cl_nt_cornacchia1.lo cl_nt_cornacchia4.lo cl_nt_isprobprime.lo \ cl_nt_jacobi.lo cl_nt_jacobi_low.lo cl_nt_nextprobprime.lo \ cl_nt_sqrtmodp.lo cl_UP.lo cl_UP_named.lo cl_UP_no_ring.lo \ cl_UP_unnamed.lo cl_UP_I_hermite.lo cl_UP_I_laguerre.lo \ cl_UP_I_tchebychev.lo cl_UP_RA_legendre.lo cl_UP_debug.lo \ cl_UP_deriv.lo cl_RA_rootp.lo cl_RA_rootp_I.lo cl_RA_sqrtp.lo \ cl_RA_ceil1.lo cl_RA_ceil12.lo cl_RA_ceil2.lo cl_RA_ceil22.lo \ cl_RA_floor1.lo cl_RA_floor12.lo cl_RA_floor2.lo \ cl_RA_floor22.lo cl_RA_round1.lo cl_RA_round12.lo \ cl_RA_round2.lo cl_RA_round22.lo cl_RA_trunc1.lo \ cl_RA_trunc12.lo cl_RA_trunc2.lo cl_RA_trunc22.lo \ cl_RA_compare.lo cl_RA_denominator.lo cl_RA_div.lo \ cl_RA_equal.lo cl_RA_from_I_I_div.lo cl_RA_from_I_posI.lo \ cl_RA_from_I_posI1.lo cl_RA_from_I_posI_div.lo cl_RA_minus.lo \ cl_RA_minus1.lo cl_RA_minusp.lo cl_RA_mul.lo \ cl_RA_numerator.lo cl_RA_plus.lo cl_RA_plus1.lo cl_RA_plusp.lo \ cl_RA_recip.lo cl_RA_square.lo cl_RA_uminus.lo cl_RA_zerop.lo \ cl_RA_from_string.lo cl_RA_read.lo cl_RA_read_stream.lo \ cl_RA_readparsed.lo cl_RA_abs.lo cl_RA_as.lo cl_RA_class.lo \ cl_RA_debug.lo cl_RA_eqhashcode.lo cl_RA_expt.lo \ cl_RA_expt_I.lo cl_RA_exptpos.lo cl_RA_exptpos_I.lo \ cl_RA_max.lo cl_RA_min.lo cl_RA_signum.lo cl_RA_aprint.lo \ cl_RA_bprint.lo cl_RA_cprint.lo cl_RA_dprint.lo cl_RA_print.lo \ cl_RA_ring.lo cl_I_logp.lo cl_RA_logp.lo cl_RA_sqrt.lo \ cl_R_sqrt.lo cl_F_from_R.lo cl_F_from_R_def.lo \ cl_F_from_R_f.lo cl_R_to_DF.lo cl_R_to_FF.lo cl_R_to_LF.lo \ cl_R_to_SF.lo cl_R_to_double.lo cl_R_to_float.lo cl_R_ceil1.lo \ cl_R_ceil12.lo cl_R_ceil2.lo cl_R_ceil22.lo cl_R_fceil1.lo \ cl_R_fceil12.lo cl_R_fceil2.lo cl_R_fceil22.lo cl_R_ffloor1.lo \ cl_R_ffloor12.lo cl_R_ffloor2.lo cl_R_ffloor22.lo \ cl_R_floor1.lo cl_R_floor12.lo cl_R_floor2.lo cl_R_floor22.lo \ cl_R_fround1.lo cl_R_fround12.lo cl_R_fround2.lo \ cl_R_fround22.lo cl_R_ftrunc1.lo cl_R_ftrunc12.lo \ cl_R_ftrunc2.lo cl_R_ftrunc22.lo cl_R_mod.lo cl_R_rem.lo \ cl_R_round1.lo cl_R_round12.lo cl_R_round2.lo cl_R_round22.lo \ cl_R_trunc1.lo cl_R_trunc12.lo cl_R_trunc2.lo cl_R_trunc22.lo \ cl_R_compare.lo cl_R_div.lo cl_R_equal.lo cl_R_minus.lo \ cl_R_minus1.lo cl_R_minusp.lo cl_R_mul.lo cl_R_plus.lo \ cl_R_plus1.lo cl_R_plusp.lo cl_R_recip.lo cl_R_square.lo \ cl_R_uminus.lo cl_R_zerop.lo cl_fmt_cardinal.lo \ cl_fmt_floatstring.lo cl_fmt_integer.lo cl_fmt_newroman.lo \ cl_fmt_oldroman.lo cl_fmt_ordinal.lo cl_fmt_paddedstring.lo \ cl_fmt_scaleexp.lo cl_fmt_tens.lo cl_R_from_string.lo \ cl_R_read.lo cl_R_read_stream.lo cl_R_abs.lo cl_R_as.lo \ cl_R_contagion.lo cl_R_debug.lo cl_R_eqhashcode.lo \ cl_R_expt.lo cl_R_expt_I.lo cl_R_max.lo cl_R_min.lo \ cl_R_rational.lo cl_R_rationalize.lo cl_R_signum.lo \ cl_R_aprint.lo cl_R_bprint.lo cl_R_cprint.lo cl_R_random.lo \ cl_R_ring.lo cl_R_atan.lo cl_R_atan2.lo cl_R_cos.lo \ cl_R_cosh.lo cl_R_coshsinh.lo cl_R_cossin.lo cl_R_exp.lo \ cl_R_ln.lo cl_R_log.lo cl_R_sin.lo cl_R_sinh.lo cl_R_tan.lo \ cl_R_tanh.lo cl_t_c1.lo cl_t_c2.lo cl_t_current.lo \ cl_t_current2.lo cl_t_d.lo cl_t_dec.lo cl_t_inc.lo \ cl_t_minus.lo cl_t_report.lo cl_t_td_minus.lo cl_t_td_plus.lo \ cl_GV_I.lo cl_GV_I_copy.lo cl_GV_I_debug.lo cl_GV_number.lo \ cl_GV_number_copy.lo cl_GV_number_debug.lo cl_SV_copy.lo \ cl_SV_number.lo cl_SV_number_debug.lo cl_SV_ringelt.lo \ cl_SV_ringelt_debug.lo cl_GV_number_aprint.lo cl_SV_aprint.lo \ cl_SV_number_aprint.lo nodist_libcln_la_OBJECTS = cl_asm.lo cl_asm_GF2.lo libcln_la_OBJECTS = $(am_libcln_la_OBJECTS) \ $(nodist_libcln_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libcln_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libcln_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) LTCPPASCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CCASFLAGS) $(CCASFLAGS) AM_V_CPPAS = $(am__v_CPPAS_@AM_V@) am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@) am__v_CPPAS_0 = @echo " CPPAS " $@; am__v_CPPAS_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libcln_la_SOURCES) $(nodist_libcln_la_SOURCES) DIST_SOURCES = $(libcln_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS_UNDERSCORE = @AS_UNDERSCORE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CLNLIB_RPATH = @CLNLIB_RPATH@ CL_VERSION = @CL_VERSION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GMP_RPATH_CFG = @GMP_RPATH_CFG@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_VERSION_INFO = @LT_VERSION_INFO@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ 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@ SED = @SED@ 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_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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_LTLIBRARIES = libcln.la AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_builddir)/include -I$(top_builddir)/src DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/autoconf libcln_la_LDFLAGS = -version-info $(LT_VERSION_INFO) libcln_la_SOURCES = \ base/cl_N.h \ base/cl_alloca.cc \ base/cl_alloca.h \ base/cl_as_exception.cc \ base/cl_condition.cc \ base/cl_d0_exception.cc \ base/cl_debug.cc \ base/cl_debugout.cc \ base/cl_free.cc \ base/cl_immclasses.cc \ base/cl_inline.h \ base/cl_inline2.h \ base/cl_iterator.h \ base/cl_low.h \ base/cl_macros.h \ base/cl_malloc.cc \ base/cl_maybe_inline.h \ base/cl_notreached_exception.cc \ base/cl_offsetof.h \ base/cl_sysdep.h \ base/cl_version.cc \ base/cl_xmacros.h \ base/digit/cl_2D.h \ base/digit/cl_2D_div.cc \ base/digit/cl_2D_exptpos.cc \ base/digit/cl_D.h \ base/digitseq/cl_2DS.h \ base/digitseq/cl_2DS_div.cc \ base/digitseq/cl_2DS_recip.cc \ base/digitseq/cl_DS.h \ base/digitseq/cl_DS_div.cc \ base/digitseq/cl_DS_endian.h \ base/digitseq/cl_DS_mul.cc \ base/digitseq/cl_DS_mul_fftc.h \ base/digitseq/cl_DS_mul_fftcs.h \ base/digitseq/cl_DS_mul_fftm.h \ base/digitseq/cl_DS_mul_fftp.h \ base/digitseq/cl_DS_mul_fftp3.h \ base/digitseq/cl_DS_mul_fftp3m.h \ base/digitseq/cl_DS_mul_fftr.h \ base/digitseq/cl_DS_mul_kara.h \ base/digitseq/cl_DS_mul_kara_sqr.h \ base/digitseq/cl_DS_mul_nuss.h \ base/digitseq/cl_DS_random.cc \ base/digitseq/cl_DS_recip.cc \ base/digitseq/cl_DS_recipsqrt.cc \ base/digitseq/cl_DS_sqrt.cc \ base/digitseq/cl_DS_trandom.cc \ base/digitseq/cl_asm.h \ base/hash/cl_hash.h \ base/hash/cl_hash1.h \ base/hash/cl_hash1weak.h \ base/hash/cl_hash2.h \ base/hash/cl_hash2weak.h \ base/hash/cl_hashset.h \ base/hash/cl_hashuniq.h \ base/hash/cl_hashuniqweak.h \ base/hash/cl_rcpointer2_hashweak_rcpointer.cc \ base/hash/cl_rcpointer2_hashweak_rcpointer.h \ base/hash/cl_rcpointer_hashweak_rcpointer.cc \ base/hash/cl_rcpointer_hashweak_rcpointer.h \ base/input/cl_read_bad_syntax_exception.cc \ base/input/cl_read_eof_exception.cc \ base/input/cl_read_junk_exception.cc \ base/low/cl_low_div.cc \ base/low/cl_low_isqrt.cc \ base/low/cl_low_isqrt2.cc \ base/low/cl_low_mul.cc \ base/output/cl_output_dec.cc \ base/output/cl_output_hex.cc \ base/output/cl_prin_globals.cc \ base/proplist/cl_pl_add.cc \ base/proplist/cl_pl_d.cc \ base/proplist/cl_pl_get.cc \ base/random/cl_UL_random.cc \ base/random/cl_random_def.cc \ base/random/cl_random_from.cc \ base/random/cl_random_impl.h \ base/ring/cl_no_ring.cc \ base/ring/cl_ring_debug.cc \ base/string/cl_spushstring.h \ base/string/cl_spushstring_append.cc \ base/string/cl_spushstring_push.cc \ base/string/cl_sstring.cc \ base/string/cl_sstring.h \ base/string/cl_st_c2.cc \ base/string/cl_st_concat1.cc \ base/string/cl_st_concat2.cc \ base/string/cl_st_concat3.cc \ base/string/cl_st_debug.cc \ base/string/cl_st_hashcode.cc \ base/string/cl_st_make0.cc \ base/string/cl_st_make0.h \ base/string/cl_st_make1.cc \ base/string/cl_st_make2.cc \ base/string/input/cl_st_get1.cc \ base/string/input/cl_st_get2.cc \ base/string/input/cl_st_getline1.cc \ base/string/input/cl_st_getline2.cc \ base/string/input/cl_st_gettoken.cc \ base/string/misc/cl_st_class.cc \ base/string/output/cl_st_print.cc \ base/symbol/cl_sy_hashcode.cc \ base/symbol/cl_symbol.cc \ complex/algebraic/cl_C_abs.cc \ complex/algebraic/cl_C_abs_aux.cc \ complex/algebraic/cl_C_signum.cc \ complex/algebraic/cl_C_sqrt.cc \ complex/algebraic/cl_DF_hypot.cc \ complex/algebraic/cl_FF_hypot.cc \ complex/algebraic/cl_LF_hypot.cc \ complex/algebraic/cl_R_hypot.cc \ complex/algebraic/cl_SF_hypot.cc \ complex/cl_C.h \ complex/elem/cl_C_equal.cc \ complex/elem/cl_C_from_R_R_complex.cc \ complex/elem/cl_C_from_R_R_complex1.cc \ complex/elem/cl_C_imagpart.cc \ complex/elem/cl_C_minus.cc \ complex/elem/cl_C_minus1.cc \ complex/elem/cl_C_mul.cc \ complex/elem/cl_C_plus.cc \ complex/elem/cl_C_plus1.cc \ complex/elem/cl_C_realpart.cc \ complex/elem/cl_C_square.cc \ complex/elem/cl_C_uminus.cc \ complex/elem/cl_C_zerop.cc \ complex/elem/division/cl_C_DF_recip.cc \ complex/elem/division/cl_C_FF_recip.cc \ complex/elem/division/cl_C_LF_recip.cc \ complex/elem/division/cl_C_SF_recip.cc \ complex/elem/division/cl_C_div.cc \ complex/elem/division/cl_C_recip.cc \ complex/input/cl_N_from_string.cc \ complex/input/cl_N_read.cc \ complex/input/cl_N_read_stream.cc \ complex/misc/cl_C_class.cc \ complex/misc/cl_C_conjugate.cc \ complex/misc/cl_C_debug.cc \ complex/misc/cl_C_eqhashcode.cc \ complex/misc/cl_C_expt.cc \ complex/misc/cl_C_expt_I.cc \ complex/misc/cl_N_as.cc \ complex/output/cl_N_aprint.cc \ complex/output/cl_N_bprint.cc \ complex/ring/cl_C_ring.cc \ complex/transcendental/cl_C_acos.cc \ complex/transcendental/cl_C_acosh.cc \ complex/transcendental/cl_C_asin.cc \ complex/transcendental/cl_C_asinh.cc \ complex/transcendental/cl_C_asinh_aux.cc \ complex/transcendental/cl_C_atan.cc \ complex/transcendental/cl_C_atanh.cc \ complex/transcendental/cl_C_atanh_aux.cc \ complex/transcendental/cl_C_cis.cc \ complex/transcendental/cl_C_cos.cc \ complex/transcendental/cl_C_cosh.cc \ complex/transcendental/cl_C_exp.cc \ complex/transcendental/cl_C_expt_C.cc \ complex/transcendental/cl_C_log.cc \ complex/transcendental/cl_C_log2.cc \ complex/transcendental/cl_C_phase.cc \ complex/transcendental/cl_C_sin.cc \ complex/transcendental/cl_C_sinh.cc \ complex/transcendental/cl_C_tan.cc \ complex/transcendental/cl_C_tanh.cc \ complex/transcendental/cl_R_cis.cc \ float/algebraic/cl_F_sqrt.cc \ float/base/cl_F_globals.cc \ float/base/cl_F_nan_exception.cc \ float/base/cl_F_overflow_exception.cc \ float/base/cl_F_underflow_exception.cc \ float/cl_F.h \ float/conv/cl_DF_to_FF.cc \ float/conv/cl_DF_to_LF.cc \ float/conv/cl_DF_to_SF.cc \ float/conv/cl_DF_to_double.cc \ float/conv/cl_DF_to_float.cc \ float/conv/cl_FF_to_DF.cc \ float/conv/cl_FF_to_LF.cc \ float/conv/cl_FF_to_SF.cc \ float/conv/cl_FF_to_double.cc \ float/conv/cl_FF_to_float.cc \ float/conv/cl_F_from_F.cc \ float/conv/cl_F_from_F_f.cc \ float/conv/cl_F_from_I.cc \ float/conv/cl_F_from_I_def.cc \ float/conv/cl_F_from_I_f.cc \ float/conv/cl_F_from_RA.cc \ float/conv/cl_F_from_RA_def.cc \ float/conv/cl_F_from_RA_f.cc \ float/conv/cl_F_to_DF.cc \ float/conv/cl_F_to_FF.cc \ float/conv/cl_F_to_LF.cc \ float/conv/cl_F_to_SF.cc \ float/conv/cl_F_to_double.cc \ float/conv/cl_F_to_float.cc \ float/conv/cl_LF_to_DF.cc \ float/conv/cl_LF_to_FF.cc \ float/conv/cl_LF_to_SF.cc \ float/conv/cl_LF_to_double.cc \ float/conv/cl_LF_to_float.cc \ float/conv/cl_SF_to_DF.cc \ float/conv/cl_SF_to_FF.cc \ float/conv/cl_SF_to_LF.cc \ float/conv/cl_SF_to_double.cc \ float/conv/cl_SF_to_float.cc \ float/dfloat/algebraic/cl_DF_sqrt.cc \ float/dfloat/cl_DF.h \ float/dfloat/conv/cl_DF_from_double.cc \ float/dfloat/conv/cl_DF_to_doublej.cc \ float/dfloat/conv/cl_I_to_double.cc \ float/dfloat/conv/cl_RA_to_double.cc \ float/dfloat/division/cl_DF_ceil22.cc \ float/dfloat/division/cl_DF_fceil.cc \ float/dfloat/division/cl_DF_floor22.cc \ float/dfloat/division/cl_DF_recip.cc \ float/dfloat/division/cl_DF_round22.cc \ float/dfloat/division/cl_DF_trunc22.cc \ float/dfloat/elem/cl_DF_compare.cc \ float/dfloat/elem/cl_DF_div.cc \ float/dfloat/elem/cl_DF_ffloor.cc \ float/dfloat/elem/cl_DF_from_I.cc \ float/dfloat/elem/cl_DF_from_RA.cc \ float/dfloat/elem/cl_DF_fround.cc \ float/dfloat/elem/cl_DF_ftrunc.cc \ float/dfloat/elem/cl_DF_futrunc.cc \ float/dfloat/elem/cl_DF_globals.cc \ float/dfloat/elem/cl_DF_minus.cc \ float/dfloat/elem/cl_DF_minusp.cc \ float/dfloat/elem/cl_DF_mul.cc \ float/dfloat/elem/cl_DF_plus.cc \ float/dfloat/elem/cl_DF_plusp.cc \ float/dfloat/elem/cl_DF_scale.cc \ float/dfloat/elem/cl_DF_scale_I.cc \ float/dfloat/elem/cl_DF_to_I.cc \ float/dfloat/elem/cl_DF_uminus.cc \ float/dfloat/elem/cl_DF_zerop.cc \ float/dfloat/input/cl_DF_from_string.cc \ float/dfloat/misc/cl_DF_abs.cc \ float/dfloat/misc/cl_DF_as.cc \ float/dfloat/misc/cl_DF_class.cc \ float/dfloat/misc/cl_DF_debug.cc \ float/dfloat/misc/cl_DF_decode.cc \ float/dfloat/misc/cl_DF_digits.cc \ float/dfloat/misc/cl_DF_eqhashcode.cc \ float/dfloat/misc/cl_DF_exponent.cc \ float/dfloat/misc/cl_DF_idecode.cc \ float/dfloat/misc/cl_DF_max.cc \ float/dfloat/misc/cl_DF_min.cc \ float/dfloat/misc/cl_DF_precision.cc \ float/dfloat/misc/cl_DF_sign.cc \ float/dfloat/misc/cl_DF_signum.cc \ float/division/cl_F_ceil1.cc \ float/division/cl_F_ceil2.cc \ float/division/cl_F_ceil22.cc \ float/division/cl_F_fceil1.cc \ float/division/cl_F_fceil2.cc \ float/division/cl_F_ffloor1.cc \ float/division/cl_F_ffloor2.cc \ float/division/cl_F_floor1.cc \ float/division/cl_F_floor2.cc \ float/division/cl_F_floor22.cc \ float/division/cl_F_fround1.cc \ float/division/cl_F_fround2.cc \ float/division/cl_F_ftrunc1.cc \ float/division/cl_F_ftrunc2.cc \ float/division/cl_F_round1.cc \ float/division/cl_F_round2.cc \ float/division/cl_F_round22.cc \ float/division/cl_F_trunc1.cc \ float/division/cl_F_trunc2.cc \ float/division/cl_F_trunc22.cc \ float/elem/cl_F_I_div.cc \ float/elem/cl_F_I_mul.cc \ float/elem/cl_F_RA_div.cc \ float/elem/cl_F_RA_mul.cc \ float/elem/cl_F_compare.cc \ float/elem/cl_F_div.cc \ float/elem/cl_F_minus.cc \ float/elem/cl_F_minusp.cc \ float/elem/cl_F_mul.cc \ float/elem/cl_F_plus.cc \ float/elem/cl_F_plusp.cc \ float/elem/cl_F_recip.cc \ float/elem/cl_F_scale.cc \ float/elem/cl_F_scale_I.cc \ float/elem/cl_F_square.cc \ float/elem/cl_F_uminus.cc \ float/elem/cl_F_zerop.cc \ float/elem/cl_I_F_div.cc \ float/elem/cl_RA_F_div.cc \ float/ffloat/algebraic/cl_FF_sqrt.cc \ float/ffloat/cl_FF.h \ float/ffloat/conv/cl_FF_from_float.cc \ float/ffloat/conv/cl_FF_to_floatj.cc \ float/ffloat/conv/cl_I_to_float.cc \ float/ffloat/conv/cl_RA_to_float.cc \ float/ffloat/division/cl_FF_ceil22.cc \ float/ffloat/division/cl_FF_fceil.cc \ float/ffloat/division/cl_FF_floor22.cc \ float/ffloat/division/cl_FF_recip.cc \ float/ffloat/division/cl_FF_round22.cc \ float/ffloat/division/cl_FF_trunc22.cc \ float/ffloat/elem/cl_FF_compare.cc \ float/ffloat/elem/cl_FF_div.cc \ float/ffloat/elem/cl_FF_ffloor.cc \ float/ffloat/elem/cl_FF_from_I.cc \ float/ffloat/elem/cl_FF_from_RA.cc \ float/ffloat/elem/cl_FF_fround.cc \ float/ffloat/elem/cl_FF_ftrunc.cc \ float/ffloat/elem/cl_FF_futrunc.cc \ float/ffloat/elem/cl_FF_globals.cc \ float/ffloat/elem/cl_FF_minus.cc \ float/ffloat/elem/cl_FF_minusp.cc \ float/ffloat/elem/cl_FF_mul.cc \ float/ffloat/elem/cl_FF_plus.cc \ float/ffloat/elem/cl_FF_plusp.cc \ float/ffloat/elem/cl_FF_scale.cc \ float/ffloat/elem/cl_FF_scale_I.cc \ float/ffloat/elem/cl_FF_to_I.cc \ float/ffloat/elem/cl_FF_uminus.cc \ float/ffloat/elem/cl_FF_zerop.cc \ float/ffloat/input/cl_FF_from_string.cc \ float/ffloat/misc/cl_FF_abs.cc \ float/ffloat/misc/cl_FF_as.cc \ float/ffloat/misc/cl_FF_class.cc \ float/ffloat/misc/cl_FF_debug.cc \ float/ffloat/misc/cl_FF_decode.cc \ float/ffloat/misc/cl_FF_digits.cc \ float/ffloat/misc/cl_FF_eqhashcode.cc \ float/ffloat/misc/cl_FF_exponent.cc \ float/ffloat/misc/cl_FF_idecode.cc \ float/ffloat/misc/cl_FF_max.cc \ float/ffloat/misc/cl_FF_min.cc \ float/ffloat/misc/cl_FF_precision.cc \ float/ffloat/misc/cl_FF_sign.cc \ float/ffloat/misc/cl_FF_signum.cc \ float/input/cl_F_from_string.cc \ float/input/cl_F_read.cc \ float/input/cl_F_read_stream.cc \ float/input/cl_F_readparsed.cc \ float/lfloat/algebraic/cl_LF_sqrt.cc \ float/lfloat/cl_LF.h \ float/lfloat/cl_LF_impl.h \ float/lfloat/division/cl_LF_ceil22.cc \ float/lfloat/division/cl_LF_fceil.cc \ float/lfloat/division/cl_LF_floor22.cc \ float/lfloat/division/cl_LF_recip.cc \ float/lfloat/division/cl_LF_round22.cc \ float/lfloat/division/cl_LF_trunc22.cc \ float/lfloat/elem/cl_I_LF_div.cc \ float/lfloat/elem/cl_LF_1minus.cc \ float/lfloat/elem/cl_LF_1plus.cc \ float/lfloat/elem/cl_LF_2minus.cc \ float/lfloat/elem/cl_LF_2plus.cc \ float/lfloat/elem/cl_LF_I_div.cc \ float/lfloat/elem/cl_LF_I_mul.cc \ float/lfloat/elem/cl_LF_RA_div.cc \ float/lfloat/elem/cl_LF_RA_mul.cc \ float/lfloat/elem/cl_LF_compare.cc \ float/lfloat/elem/cl_LF_div.cc \ float/lfloat/elem/cl_LF_ffloor.cc \ float/lfloat/elem/cl_LF_from_I.cc \ float/lfloat/elem/cl_LF_from_RA.cc \ float/lfloat/elem/cl_LF_fround.cc \ float/lfloat/elem/cl_LF_ftrunc.cc \ float/lfloat/elem/cl_LF_futrunc.cc \ float/lfloat/elem/cl_LF_globals.cc \ float/lfloat/elem/cl_LF_minus1.cc \ float/lfloat/elem/cl_LF_minusp.cc \ float/lfloat/elem/cl_LF_mul.cc \ float/lfloat/elem/cl_LF_plus1.cc \ float/lfloat/elem/cl_LF_plusp.cc \ float/lfloat/elem/cl_LF_scale.cc \ float/lfloat/elem/cl_LF_scale_I.cc \ float/lfloat/elem/cl_LF_square.cc \ float/lfloat/elem/cl_LF_to_I.cc \ float/lfloat/elem/cl_LF_uminus.cc \ float/lfloat/elem/cl_LF_zerop.cc \ float/lfloat/elem/cl_RA_LF_div.cc \ float/lfloat/input/cl_LF_from_string.cc \ float/lfloat/misc/cl_LF_abs.cc \ float/lfloat/misc/cl_LF_as.cc \ float/lfloat/misc/cl_LF_class.cc \ float/lfloat/misc/cl_LF_debug.cc \ float/lfloat/misc/cl_LF_decode.cc \ float/lfloat/misc/cl_LF_digits.cc \ float/lfloat/misc/cl_LF_eqhashcode.cc \ float/lfloat/misc/cl_LF_exponent.cc \ float/lfloat/misc/cl_LF_extend.cc \ float/lfloat/misc/cl_LF_idecode.cc \ float/lfloat/misc/cl_LF_leninc.cc \ float/lfloat/misc/cl_LF_lenincx.cc \ float/lfloat/misc/cl_LF_max.cc \ float/lfloat/misc/cl_LF_min.cc \ float/lfloat/misc/cl_LF_precision.cc \ float/lfloat/misc/cl_LF_shorten.cc \ float/lfloat/misc/cl_LF_shortenrel.cc \ float/lfloat/misc/cl_LF_shortenwith.cc \ float/lfloat/misc/cl_LF_sign.cc \ float/lfloat/misc/cl_LF_signum.cc \ float/lfloat/misc/cl_LF_to_LF.cc \ float/misc/cl_F_abs.cc \ float/misc/cl_F_as.cc \ float/misc/cl_F_decode.cc \ float/misc/cl_F_digits.cc \ float/misc/cl_F_epsneg.cc \ float/misc/cl_F_epspos.cc \ float/misc/cl_F_eqhashcode.cc \ float/misc/cl_F_exponent.cc \ float/misc/cl_F_extendsqrt.cc \ float/misc/cl_F_extendsqrtx.cc \ float/misc/cl_F_idecode.cc \ float/misc/cl_F_leastneg.cc \ float/misc/cl_F_leastpos.cc \ float/misc/cl_F_max.cc \ float/misc/cl_F_min.cc \ float/misc/cl_F_mostneg.cc \ float/misc/cl_F_mostpos.cc \ float/misc/cl_F_precision.cc \ float/misc/cl_F_rational.cc \ float/misc/cl_F_shortenrel.cc \ float/misc/cl_F_sign.cc \ float/misc/cl_F_sign2.cc \ float/misc/cl_F_signum.cc \ float/misc/cl_float_format.cc \ float/output/cl_F_aprint.cc \ float/output/cl_F_bprint.cc \ float/output/cl_F_cprint.cc \ float/output/cl_F_dprint.cc \ float/output/cl_F_printb.cc \ float/random/cl_F_random.cc \ float/sfloat/algebraic/cl_SF_sqrt.cc \ float/sfloat/cl_SF.h \ float/sfloat/division/cl_SF_ceil22.cc \ float/sfloat/division/cl_SF_fceil.cc \ float/sfloat/division/cl_SF_ffloor.cc \ float/sfloat/division/cl_SF_floor22.cc \ float/sfloat/division/cl_SF_recip.cc \ float/sfloat/division/cl_SF_round22.cc \ float/sfloat/division/cl_SF_trunc22.cc \ float/sfloat/elem/cl_SF_compare.cc \ float/sfloat/elem/cl_SF_div.cc \ float/sfloat/elem/cl_SF_from_I.cc \ float/sfloat/elem/cl_SF_from_RA.cc \ float/sfloat/elem/cl_SF_fround.cc \ float/sfloat/elem/cl_SF_ftrunc.cc \ float/sfloat/elem/cl_SF_futrunc.cc \ float/sfloat/elem/cl_SF_minus.cc \ float/sfloat/elem/cl_SF_minusp.cc \ float/sfloat/elem/cl_SF_mul.cc \ float/sfloat/elem/cl_SF_plus.cc \ float/sfloat/elem/cl_SF_plusp.cc \ float/sfloat/elem/cl_SF_scale.cc \ float/sfloat/elem/cl_SF_scale_I.cc \ float/sfloat/elem/cl_SF_to_I.cc \ float/sfloat/elem/cl_SF_uminus.cc \ float/sfloat/elem/cl_SF_zerop.cc \ float/sfloat/input/cl_SF_from_string.cc \ float/sfloat/misc/cl_SF_abs.cc \ float/sfloat/misc/cl_SF_as.cc \ float/sfloat/misc/cl_SF_class.cc \ float/sfloat/misc/cl_SF_debug.cc \ float/sfloat/misc/cl_SF_decode.cc \ float/sfloat/misc/cl_SF_digits.cc \ float/sfloat/misc/cl_SF_eqhashcode.cc \ float/sfloat/misc/cl_SF_exponent.cc \ float/sfloat/misc/cl_SF_idecode.cc \ float/sfloat/misc/cl_SF_max.cc \ float/sfloat/misc/cl_SF_min.cc \ float/sfloat/misc/cl_SF_precision.cc \ float/sfloat/misc/cl_SF_sign.cc \ float/sfloat/misc/cl_SF_signum.cc \ float/transcendental/Makefile.devel \ float/transcendental/cl_F_atanhx.cc \ float/transcendental/cl_F_atanx.cc \ float/transcendental/cl_F_catalanconst.cc \ float/transcendental/cl_F_catalanconst_def.cc \ float/transcendental/cl_F_catalanconst_f.cc \ float/transcendental/cl_F_catalanconst_var.cc \ float/transcendental/cl_F_catalanconst_var.h \ float/transcendental/cl_F_cos.cc \ float/transcendental/cl_F_cosh.cc \ float/transcendental/cl_F_coshsinh.cc \ float/transcendental/cl_F_cossin.cc \ float/transcendental/cl_F_eulerconst.cc \ float/transcendental/cl_F_eulerconst_def.cc \ float/transcendental/cl_F_eulerconst_f.cc \ float/transcendental/cl_F_eulerconst_var.cc \ float/transcendental/cl_F_eulerconst_var.h \ float/transcendental/cl_F_exp.cc \ float/transcendental/cl_F_exp1.cc \ float/transcendental/cl_F_exp1_def.cc \ float/transcendental/cl_F_exp1_f.cc \ float/transcendental/cl_F_exp1_var.cc \ float/transcendental/cl_F_exp1_var.h \ float/transcendental/cl_F_expx.cc \ float/transcendental/cl_F_ln.cc \ float/transcendental/cl_F_ln10.cc \ float/transcendental/cl_F_ln10_f.cc \ float/transcendental/cl_F_ln10_var.cc \ float/transcendental/cl_F_ln10_var.h \ float/transcendental/cl_F_ln2.cc \ float/transcendental/cl_F_ln2_f.cc \ float/transcendental/cl_F_ln2_var.cc \ float/transcendental/cl_F_ln2_var.h \ float/transcendental/cl_F_lnx.cc \ float/transcendental/cl_F_pi.cc \ float/transcendental/cl_F_pi_def.cc \ float/transcendental/cl_F_pi_f.cc \ float/transcendental/cl_F_pi_var.cc \ float/transcendental/cl_F_pi_var.h \ float/transcendental/cl_F_roundpi.cc \ float/transcendental/cl_F_roundpi2.cc \ float/transcendental/cl_F_sin.cc \ float/transcendental/cl_F_sinh.cc \ float/transcendental/cl_F_sinhx.cc \ float/transcendental/cl_F_sinx.cc \ float/transcendental/cl_F_tan.cc \ float/transcendental/cl_F_tanh.cc \ float/transcendental/cl_F_tran.h \ float/transcendental/cl_F_zeta_int.cc \ float/transcendental/cl_F_zeta_int_def.cc \ float/transcendental/cl_F_zeta_int_f.cc \ float/transcendental/cl_LF_atan_recip.cc \ float/transcendental/cl_LF_atanh_recip.cc \ float/transcendental/cl_LF_catalanconst.cc \ float/transcendental/cl_LF_coshsinh.cc \ float/transcendental/cl_LF_coshsinh_aux.cc \ float/transcendental/cl_LF_cossin.cc \ float/transcendental/cl_LF_cossin_aux.cc \ float/transcendental/cl_LF_eulerconst.cc \ float/transcendental/cl_LF_exp1.cc \ float/transcendental/cl_LF_exp_aux.cc \ float/transcendental/cl_LF_ln10.cc \ float/transcendental/cl_LF_ln2.cc \ float/transcendental/cl_LF_pi.cc \ float/transcendental/cl_LF_ratseries_.cc \ float/transcendental/cl_LF_ratseries_a.cc \ float/transcendental/cl_LF_ratseries_ab.cc \ float/transcendental/cl_LF_ratseries_b.cc \ float/transcendental/cl_LF_ratseries_p.cc \ float/transcendental/cl_LF_ratseries_pa.cc \ float/transcendental/cl_LF_ratseries_pab.cc \ float/transcendental/cl_LF_ratseries_pb.cc \ float/transcendental/cl_LF_ratseries_pq.cc \ float/transcendental/cl_LF_ratseries_pqa.cc \ float/transcendental/cl_LF_ratseries_pqab.cc \ float/transcendental/cl_LF_ratseries_pqb.cc \ float/transcendental/cl_LF_ratseries_q.cc \ float/transcendental/cl_LF_ratseries_qa.cc \ float/transcendental/cl_LF_ratseries_qab.cc \ float/transcendental/cl_LF_ratseries_qb.cc \ float/transcendental/cl_LF_ratsumseries_pqcd.cc \ float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc \ float/transcendental/cl_LF_ratsumseries_pqd.cc \ float/transcendental/cl_LF_ratsumseries_pqd_aux.cc \ float/transcendental/cl_LF_tran.h \ float/transcendental/cl_LF_zeta3.cc \ float/transcendental/cl_LF_zeta_int.cc \ integer/2adic/cl_I_2adic_div.cc \ integer/2adic/cl_I_2adic_recip.cc \ integer/algebraic/cl_I_rootp.cc \ integer/algebraic/cl_I_rootp_I.cc \ integer/algebraic/cl_I_rootp_aux.cc \ integer/algebraic/cl_I_sqrt.cc \ integer/algebraic/cl_I_sqrtp.cc \ integer/bitwise/cl_I_ash.cc \ integer/bitwise/cl_I_ash_I.cc \ integer/bitwise/cl_I_ash_exception.cc \ integer/bitwise/cl_I_boole.cc \ integer/bitwise/cl_I_byte.h \ integer/bitwise/cl_I_dpb.cc \ integer/bitwise/cl_I_dpf.cc \ integer/bitwise/cl_I_fullbyte.cc \ integer/bitwise/cl_I_ilength.cc \ integer/bitwise/cl_I_ldb.cc \ integer/bitwise/cl_I_ldbtest.cc \ integer/bitwise/cl_I_ldbx.cc \ integer/bitwise/cl_I_ldbxtest.cc \ integer/bitwise/cl_I_log.h \ integer/bitwise/cl_I_log_aux.cc \ integer/bitwise/cl_I_logand.cc \ integer/bitwise/cl_I_logandc2.cc \ integer/bitwise/cl_I_logbitp.cc \ integer/bitwise/cl_I_logbitp_I.cc \ integer/bitwise/cl_I_logcount.cc \ integer/bitwise/cl_I_logeqv.cc \ integer/bitwise/cl_I_logior.cc \ integer/bitwise/cl_I_lognand.cc \ integer/bitwise/cl_I_lognor.cc \ integer/bitwise/cl_I_lognot.cc \ integer/bitwise/cl_I_logorc2.cc \ integer/bitwise/cl_I_logtest.cc \ integer/bitwise/cl_I_logxor.cc \ integer/bitwise/cl_I_mkf.cc \ integer/bitwise/cl_I_mkfx.cc \ integer/cl_I.h \ integer/conv/cl_I_cached_power.cc \ integer/conv/cl_I_cached_power.h \ integer/conv/cl_I_digits_need.cc \ integer/conv/cl_I_from_DS.cc \ integer/conv/cl_I_from_L.cc \ integer/conv/cl_I_from_L2.cc \ integer/conv/cl_I_from_NDS.cc \ integer/conv/cl_I_from_NUDS.cc \ integer/conv/cl_I_from_Q.cc \ integer/conv/cl_I_from_Q2.cc \ integer/conv/cl_I_from_UDS.cc \ integer/conv/cl_I_from_UL.cc \ integer/conv/cl_I_from_UL2.cc \ integer/conv/cl_I_from_UQ.cc \ integer/conv/cl_I_from_digits.cc \ integer/conv/cl_I_mul10plus.cc \ integer/conv/cl_I_to_L.cc \ integer/conv/cl_I_to_Q.cc \ integer/conv/cl_I_to_UL.cc \ integer/conv/cl_I_to_UQ.cc \ integer/conv/cl_I_to_digits.cc \ integer/division/cl_I_ceil1.cc \ integer/division/cl_I_ceil2.cc \ integer/division/cl_I_exquo.cc \ integer/division/cl_I_exquo_exception.cc \ integer/division/cl_I_exquopos.cc \ integer/division/cl_I_floor1.cc \ integer/division/cl_I_floor2.cc \ integer/division/cl_I_mod.cc \ integer/division/cl_I_rem.cc \ integer/division/cl_I_round1.cc \ integer/division/cl_I_round2.cc \ integer/division/cl_I_trunc1.cc \ integer/division/cl_I_trunc2.cc \ integer/elem/cl_I_compare.cc \ integer/elem/cl_I_div.cc \ integer/elem/cl_I_equal.cc \ integer/elem/cl_I_minus.cc \ integer/elem/cl_I_minus1.cc \ integer/elem/cl_I_minusp.cc \ integer/elem/cl_I_mul.cc \ integer/elem/cl_I_plus.cc \ integer/elem/cl_I_plus1.cc \ integer/elem/cl_I_plusp.cc \ integer/elem/cl_I_square.cc \ integer/elem/cl_I_uminus.cc \ integer/elem/cl_I_zerop.cc \ integer/gcd/cl_I_gcd.cc \ integer/gcd/cl_I_gcd_aux.cc \ integer/gcd/cl_I_gcd_aux2.cc \ integer/gcd/cl_I_lcm.cc \ integer/gcd/cl_I_xgcd.cc \ integer/gcd/cl_low_gcd.cc \ integer/hash/cl_I_hash_gcobject.cc \ integer/hash/cl_I_hash_gcobject.h \ integer/hash/cl_I_hash_gcpointer.cc \ integer/hash/cl_I_hash_gcpointer.h \ integer/hash/cl_I_hash_pointer.cc \ integer/hash/cl_I_hash_pointer.h \ integer/hash/cl_I_hash_rcobject.cc \ integer/hash/cl_I_hash_rcobject.h \ integer/hash/cl_I_hash_rcpointer.cc \ integer/hash/cl_I_hash_rcpointer.h \ integer/hash/cl_I_hashcode.cc \ integer/hash/cl_I_hashweak_rcpointer.cc \ integer/hash/cl_I_hashweak_rcpointer.h \ integer/input/cl_I_from_string.cc \ integer/input/cl_I_read.cc \ integer/input/cl_I_read_stream.cc \ integer/input/cl_I_readparsed.cc \ integer/misc/cl_BN_class.cc \ integer/misc/cl_FN_class.cc \ integer/misc/cl_I_abs.cc \ integer/misc/cl_I_as.cc \ integer/misc/cl_I_debug.cc \ integer/misc/cl_I_eqhashcode.cc \ integer/misc/cl_I_exptpos.cc \ integer/misc/cl_I_exptpos_I.cc \ integer/misc/cl_I_max.cc \ integer/misc/cl_I_min.cc \ integer/misc/cl_I_oddp.cc \ integer/misc/cl_I_ord2.cc \ integer/misc/cl_I_power2p.cc \ integer/misc/cl_I_signum.cc \ integer/misc/combin/cl_I_binomial.cc \ integer/misc/combin/cl_I_combin.h \ integer/misc/combin/cl_I_doublefactorial.cc \ integer/misc/combin/cl_I_factorial.cc \ integer/misc/combin/cl_I_factorial_aux.cc \ integer/output/cl_I_aprint.cc \ integer/output/cl_I_bprint.cc \ integer/output/cl_I_cprint.cc \ integer/output/cl_I_decstring.cc \ integer/output/cl_I_dprint.cc \ integer/output/cl_I_print.cc \ integer/output/cl_I_print_string.cc \ integer/random/cl_I_random.cc \ integer/random/cl_I_trandom.cc \ integer/ring/cl_0_ring.cc \ integer/ring/cl_I_ring.cc \ modinteger/cl_MI.cc \ modinteger/cl_MI.h \ modinteger/cl_MI_cond_composite.cc \ modinteger/cl_MI_debug.cc \ modinteger/cl_MI_err_comp.cc \ modinteger/cl_MI_fix16.h \ modinteger/cl_MI_fix29.h \ modinteger/cl_MI_fix32.h \ modinteger/cl_MI_int.h \ modinteger/cl_MI_int32.h \ modinteger/cl_MI_lshift.cc \ modinteger/cl_MI_montgom.h \ modinteger/cl_MI_pow2.h \ modinteger/cl_MI_pow2m1.h \ modinteger/cl_MI_pow2p1.h \ modinteger/cl_MI_rshift.cc \ modinteger/cl_MI_std.h \ numtheory/cl_IF.h \ numtheory/cl_IF_millerrabin.cc \ numtheory/cl_IF_smallprimes.cc \ numtheory/cl_IF_trialdiv.cc \ numtheory/cl_IF_trialdiv1.cc \ numtheory/cl_IF_trialdiv2.cc \ numtheory/cl_nt_cornacchia1.cc \ numtheory/cl_nt_cornacchia4.cc \ numtheory/cl_nt_isprobprime.cc \ numtheory/cl_nt_jacobi.cc \ numtheory/cl_nt_jacobi_low.cc \ numtheory/cl_nt_nextprobprime.cc \ numtheory/cl_nt_sqrtmodp.cc \ polynomial/cl_UP.h \ polynomial/elem/cl_UP.cc \ polynomial/elem/cl_UP_GF2.h \ polynomial/elem/cl_UP_MI.h \ polynomial/elem/cl_UP_gen.h \ polynomial/elem/cl_UP_named.cc \ polynomial/elem/cl_UP_no_ring.cc \ polynomial/elem/cl_UP_number.h \ polynomial/elem/cl_UP_unnamed.cc \ polynomial/misc/cl_UP_I_hermite.cc \ polynomial/misc/cl_UP_I_laguerre.cc \ polynomial/misc/cl_UP_I_tchebychev.cc \ polynomial/misc/cl_UP_RA_legendre.cc \ polynomial/misc/cl_UP_debug.cc \ polynomial/misc/cl_UP_deriv.cc \ rational/algebraic/cl_RA_rootp.cc \ rational/algebraic/cl_RA_rootp_I.cc \ rational/algebraic/cl_RA_sqrtp.cc \ rational/cl_RA.h \ rational/division/cl_RA_ceil1.cc \ rational/division/cl_RA_ceil12.cc \ rational/division/cl_RA_ceil2.cc \ rational/division/cl_RA_ceil22.cc \ rational/division/cl_RA_floor1.cc \ rational/division/cl_RA_floor12.cc \ rational/division/cl_RA_floor2.cc \ rational/division/cl_RA_floor22.cc \ rational/division/cl_RA_round1.cc \ rational/division/cl_RA_round12.cc \ rational/division/cl_RA_round2.cc \ rational/division/cl_RA_round22.cc \ rational/division/cl_RA_trunc1.cc \ rational/division/cl_RA_trunc12.cc \ rational/division/cl_RA_trunc2.cc \ rational/division/cl_RA_trunc22.cc \ rational/elem/cl_RA_compare.cc \ rational/elem/cl_RA_denominator.cc \ rational/elem/cl_RA_div.cc \ rational/elem/cl_RA_equal.cc \ rational/elem/cl_RA_from_I_I_div.cc \ rational/elem/cl_RA_from_I_posI.cc \ rational/elem/cl_RA_from_I_posI1.cc \ rational/elem/cl_RA_from_I_posI_div.cc \ rational/elem/cl_RA_minus.cc \ rational/elem/cl_RA_minus1.cc \ rational/elem/cl_RA_minusp.cc \ rational/elem/cl_RA_mul.cc \ rational/elem/cl_RA_numerator.cc \ rational/elem/cl_RA_plus.cc \ rational/elem/cl_RA_plus1.cc \ rational/elem/cl_RA_plusp.cc \ rational/elem/cl_RA_recip.cc \ rational/elem/cl_RA_square.cc \ rational/elem/cl_RA_uminus.cc \ rational/elem/cl_RA_zerop.cc \ rational/input/cl_RA_from_string.cc \ rational/input/cl_RA_read.cc \ rational/input/cl_RA_read_stream.cc \ rational/input/cl_RA_readparsed.cc \ rational/misc/cl_RA_abs.cc \ rational/misc/cl_RA_as.cc \ rational/misc/cl_RA_class.cc \ rational/misc/cl_RA_debug.cc \ rational/misc/cl_RA_eqhashcode.cc \ rational/misc/cl_RA_expt.cc \ rational/misc/cl_RA_expt_I.cc \ rational/misc/cl_RA_exptpos.cc \ rational/misc/cl_RA_exptpos_I.cc \ rational/misc/cl_RA_max.cc \ rational/misc/cl_RA_min.cc \ rational/misc/cl_RA_signum.cc \ rational/output/cl_RA_aprint.cc \ rational/output/cl_RA_bprint.cc \ rational/output/cl_RA_cprint.cc \ rational/output/cl_RA_dprint.cc \ rational/output/cl_RA_print.cc \ rational/ring/cl_RA_ring.cc \ rational/transcendental/cl_I_logp.cc \ rational/transcendental/cl_RA_logp.cc \ real/algebraic/cl_RA_sqrt.cc \ real/algebraic/cl_R_sqrt.cc \ real/cl_R.h \ real/conv/cl_F_from_R.cc \ real/conv/cl_F_from_R_def.cc \ real/conv/cl_F_from_R_f.cc \ real/conv/cl_R_to_DF.cc \ real/conv/cl_R_to_FF.cc \ real/conv/cl_R_to_LF.cc \ real/conv/cl_R_to_SF.cc \ real/conv/cl_R_to_double.cc \ real/conv/cl_R_to_float.cc \ real/division/cl_R_ceil1.cc \ real/division/cl_R_ceil12.cc \ real/division/cl_R_ceil2.cc \ real/division/cl_R_ceil22.cc \ real/division/cl_R_div_t.h \ real/division/cl_R_fceil1.cc \ real/division/cl_R_fceil12.cc \ real/division/cl_R_fceil2.cc \ real/division/cl_R_fceil22.cc \ real/division/cl_R_ffloor1.cc \ real/division/cl_R_ffloor12.cc \ real/division/cl_R_ffloor2.cc \ real/division/cl_R_ffloor22.cc \ real/division/cl_R_floor1.cc \ real/division/cl_R_floor12.cc \ real/division/cl_R_floor2.cc \ real/division/cl_R_floor22.cc \ real/division/cl_R_fround1.cc \ real/division/cl_R_fround12.cc \ real/division/cl_R_fround2.cc \ real/division/cl_R_fround22.cc \ real/division/cl_R_ftrunc1.cc \ real/division/cl_R_ftrunc12.cc \ real/division/cl_R_ftrunc2.cc \ real/division/cl_R_ftrunc22.cc \ real/division/cl_R_mod.cc \ real/division/cl_R_rem.cc \ real/division/cl_R_round1.cc \ real/division/cl_R_round12.cc \ real/division/cl_R_round2.cc \ real/division/cl_R_round22.cc \ real/division/cl_R_trunc1.cc \ real/division/cl_R_trunc12.cc \ real/division/cl_R_trunc2.cc \ real/division/cl_R_trunc22.cc \ real/elem/cl_R_compare.cc \ real/elem/cl_R_div.cc \ real/elem/cl_R_equal.cc \ real/elem/cl_R_minus.cc \ real/elem/cl_R_minus1.cc \ real/elem/cl_R_minusp.cc \ real/elem/cl_R_mul.cc \ real/elem/cl_R_plus.cc \ real/elem/cl_R_plus1.cc \ real/elem/cl_R_plusp.cc \ real/elem/cl_R_recip.cc \ real/elem/cl_R_square.cc \ real/elem/cl_R_uminus.cc \ real/elem/cl_R_zerop.cc \ real/format-output/TODO-format \ real/format-output/cl_fmt_cardinal.cc \ real/format-output/cl_fmt_floatstring.cc \ real/format-output/cl_fmt_integer.cc \ real/format-output/cl_fmt_newroman.cc \ real/format-output/cl_fmt_oldroman.cc \ real/format-output/cl_fmt_ordinal.cc \ real/format-output/cl_fmt_paddedstring.cc \ real/format-output/cl_fmt_scaleexp.cc \ real/format-output/cl_fmt_tens.cc \ real/format-output/cl_format.h \ real/input/cl_R_from_string.cc \ real/input/cl_R_read.cc \ real/input/cl_R_read_stream.cc \ real/misc/cl_R_abs.cc \ real/misc/cl_R_as.cc \ real/misc/cl_R_contagion.cc \ real/misc/cl_R_debug.cc \ real/misc/cl_R_eqhashcode.cc \ real/misc/cl_R_expt.cc \ real/misc/cl_R_expt_I.cc \ real/misc/cl_R_max.cc \ real/misc/cl_R_min.cc \ real/misc/cl_R_rational.cc \ real/misc/cl_R_rationalize.cc \ real/misc/cl_R_signum.cc \ real/output/cl_R_aprint.cc \ real/output/cl_R_bprint.cc \ real/output/cl_R_cprint.cc \ real/random/cl_R_random.cc \ real/ring/cl_R_ring.cc \ real/transcendental/cl_R_atan.cc \ real/transcendental/cl_R_atan2.cc \ real/transcendental/cl_R_cos.cc \ real/transcendental/cl_R_cosh.cc \ real/transcendental/cl_R_coshsinh.cc \ real/transcendental/cl_R_cossin.cc \ real/transcendental/cl_R_exp.cc \ real/transcendental/cl_R_ln.cc \ real/transcendental/cl_R_log.cc \ real/transcendental/cl_R_sin.cc \ real/transcendental/cl_R_sinh.cc \ real/transcendental/cl_R_tan.cc \ real/transcendental/cl_R_tanh.cc \ timing/cl_t_c1.cc \ timing/cl_t_c2.cc \ timing/cl_t_current.cc \ timing/cl_t_current2.cc \ timing/cl_t_d.cc \ timing/cl_t_dec.cc \ timing/cl_t_inc.cc \ timing/cl_t_minus.cc \ timing/cl_t_report.cc \ timing/cl_t_td_minus.cc \ timing/cl_t_td_plus.cc \ vector/cl_GV_I.cc \ vector/cl_GV_I_copy.cc \ vector/cl_GV_I_debug.cc \ vector/cl_GV_io.h \ vector/cl_GV_number.cc \ vector/cl_GV_number_copy.cc \ vector/cl_GV_number_debug.cc \ vector/cl_SV_copy.cc \ vector/cl_SV_io.h \ vector/cl_SV_number.cc \ vector/cl_SV_number_debug.cc \ vector/cl_SV_ringelt.cc \ vector/cl_SV_ringelt_debug.cc \ vector/output/cl_GV_number_aprint.cc \ vector/output/cl_SV_aprint.cc \ vector/output/cl_SV_number_aprint.cc nodist_libcln_la_SOURCES = \ base/digitseq/cl_asm.S \ polynomial/elem/cl_asm_GF2.S ASMFILES = \ base/digitseq/cl_asm_.cc \ base/digitseq/cl_asm_arm.h \ base/digitseq/cl_asm_arm_.cc \ base/digitseq/cl_asm_hppa.h \ base/digitseq/cl_asm_hppa_.cc \ base/digitseq/cl_asm_i386.h \ base/digitseq/cl_asm_i386_.cc \ base/digitseq/cl_asm_m68k.h \ base/digitseq/cl_asm_m68k_.cc \ base/digitseq/cl_asm_mips.h \ base/digitseq/cl_asm_mips_.cc \ base/digitseq/cl_asm_mipsel_.cc \ base/digitseq/cl_asm_sparc.h \ base/digitseq/cl_asm_sparc64.h \ base/digitseq/cl_asm_sparc64_.cc \ base/digitseq/cl_asm_sparc_.cc MORE_ASMFILES = \ polynomial/elem/cl_asm_GF2.cc \ polynomial/elem/cl_asm_sparc_GF2.cc EXTRA_DIST = $(ASMFILES) $(MORE_ASMFILES) DISTCLEANFILES = \ base/digitseq/cl_asm.S \ polynomial/elem/cl_asm_GF2.S all: all-am .SUFFIXES: .SUFFIXES: .S .cc .lo .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) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/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-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; 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 " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libcln.la: $(libcln_la_OBJECTS) $(libcln_la_DEPENDENCIES) $(EXTRA_libcln_la_DEPENDENCIES) $(AM_V_CXXLD)$(libcln_la_LINK) -rpath $(libdir) $(libcln_la_OBJECTS) $(libcln_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_0_ring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_2DS_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_2DS_recip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_2D_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_2D_exptpos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_BN_class.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_DF_recip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_FF_recip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_LF_recip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_SF_recip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_abs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_abs_aux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_acos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_acosh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_asin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_asinh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_asinh_aux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_atan.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_atanh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_atanh_aux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_cis.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_class.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_conjugate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_cos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_cosh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_eqhashcode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_equal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_exp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_expt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_expt_C.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_expt_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_from_R_R_complex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_from_R_R_complex1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_imagpart.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_log.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_log2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_minus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_minus1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_mul.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_phase.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_plus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_plus1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_realpart.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_recip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_ring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_signum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_sin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_sinh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_sqrt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_square.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_tan.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_tanh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_uminus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_C_zerop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_abs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_as.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_ceil22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_class.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_compare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_decode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_digits.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_eqhashcode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_exponent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_fceil.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_ffloor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_floor22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_from_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_from_RA.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_from_double.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_from_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_fround.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_ftrunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_futrunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_globals.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_hypot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_idecode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_max.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_min.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_minus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_minusp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_mul.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_plus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_plusp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_precision.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_recip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_round22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_scale.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_scale_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_sign.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_signum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_sqrt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_to_FF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_to_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_to_LF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_to_SF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_to_double.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_to_doublej.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_to_float.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_trunc22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_uminus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DF_zerop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DS_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DS_mul.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DS_random.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DS_recip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DS_recipsqrt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DS_sqrt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_DS_trandom.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_abs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_as.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_ceil22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_class.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_compare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_decode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_digits.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_eqhashcode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_exponent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_fceil.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_ffloor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_floor22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_from_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_from_RA.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_from_float.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_from_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_fround.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_ftrunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_futrunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_globals.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_hypot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_idecode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_max.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_min.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_minus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_minusp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_mul.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_plus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_plusp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_precision.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_recip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_round22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_scale.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_scale_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_sign.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_signum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_sqrt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_to_DF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_to_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_to_LF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_to_SF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_to_double.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_to_float.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_to_floatj.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_trunc22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_uminus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FF_zerop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_FN_class.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_I_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_I_mul.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_RA_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_RA_mul.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_abs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_aprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_as.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_atanhx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_atanx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_bprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_catalanconst.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_catalanconst_def.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_catalanconst_f.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_catalanconst_var.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_ceil1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_ceil2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_ceil22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_compare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_cos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_cosh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_coshsinh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_cossin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_cprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_decode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_digits.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_dprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_epsneg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_epspos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_eqhashcode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_eulerconst.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_eulerconst_def.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_eulerconst_f.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_eulerconst_var.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_exp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_exp1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_exp1_def.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_exp1_f.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_exp1_var.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_exponent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_expx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_extendsqrt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_extendsqrtx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_fceil1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_fceil2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_ffloor1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_ffloor2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_floor1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_floor2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_floor22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_from_F.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_from_F_f.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_from_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_from_I_def.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_from_I_f.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_from_R.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_from_RA.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_from_RA_def.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_from_RA_f.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_from_R_def.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_from_R_f.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_from_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_fround1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_fround2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_ftrunc1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_ftrunc2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_globals.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_idecode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_leastneg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_leastpos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_ln.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_ln10.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_ln10_f.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_ln10_var.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_ln2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_ln2_f.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_ln2_var.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_lnx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_max.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_min.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_minus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_minusp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_mostneg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_mostpos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_mul.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_nan_exception.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_overflow_exception.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_pi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_pi_def.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_pi_f.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_pi_var.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_plus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_plusp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_precision.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_printb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_random.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_rational.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_read.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_read_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_readparsed.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_recip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_round1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_round2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_round22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_roundpi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_roundpi2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_scale.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_scale_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_shortenrel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_sign.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_sign2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_signum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_sin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_sinh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_sinhx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_sinx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_sqrt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_square.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_tan.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_tanh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_to_DF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_to_FF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_to_LF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_to_SF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_to_double.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_to_float.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_trunc1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_trunc2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_trunc22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_uminus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_underflow_exception.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_zerop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_zeta_int.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_zeta_int_def.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_F_zeta_int_f.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_GV_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_GV_I_copy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_GV_I_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_GV_number.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_GV_number_aprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_GV_number_copy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_GV_number_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_IF_millerrabin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_IF_smallprimes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_IF_trialdiv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_IF_trialdiv1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_IF_trialdiv2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_2adic_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_2adic_recip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_F_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_LF_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_abs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_aprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_as.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_ash.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_ash_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_ash_exception.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_binomial.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_boole.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_bprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_cached_power.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_ceil1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_ceil2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_compare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_cprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_decstring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_digits_need.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_doublefactorial.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_dpb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_dpf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_dprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_eqhashcode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_equal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_exptpos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_exptpos_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_exquo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_exquo_exception.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_exquopos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_factorial.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_factorial_aux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_floor1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_floor2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_from_DS.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_from_L.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_from_L2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_from_NDS.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_from_NUDS.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_from_Q.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_from_Q2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_from_UDS.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_from_UL.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_from_UL2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_from_UQ.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_from_digits.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_from_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_fullbyte.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_gcd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_gcd_aux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_gcd_aux2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_hash_gcobject.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_hash_gcpointer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_hash_pointer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_hash_rcobject.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_hash_rcpointer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_hashcode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_hashweak_rcpointer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_ilength.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_lcm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_ldb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_ldbtest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_ldbx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_ldbxtest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_log_aux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_logand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_logandc2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_logbitp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_logbitp_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_logcount.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_logeqv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_logior.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_lognand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_lognor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_lognot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_logorc2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_logp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_logtest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_logxor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_max.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_min.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_minus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_minus1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_minusp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_mkf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_mkfx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_mod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_mul.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_mul10plus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_oddp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_ord2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_plus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_plus1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_plusp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_power2p.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_print.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_print_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_random.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_read.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_read_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_readparsed.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_rem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_ring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_rootp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_rootp_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_rootp_aux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_round1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_round2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_signum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_sqrt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_sqrtp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_square.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_to_L.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_to_Q.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_to_UL.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_to_UQ.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_to_digits.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_to_double.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_to_float.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_trandom.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_trunc1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_trunc2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_uminus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_xgcd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_I_zerop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_1minus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_1plus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_2minus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_2plus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_I_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_I_mul.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_RA_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_RA_mul.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_abs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_as.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_atan_recip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_atanh_recip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_catalanconst.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ceil22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_class.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_compare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_coshsinh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_coshsinh_aux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_cossin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_cossin_aux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_decode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_digits.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_eqhashcode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_eulerconst.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_exp1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_exp_aux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_exponent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_extend.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_fceil.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ffloor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_floor22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_from_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_from_RA.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_from_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_fround.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ftrunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_futrunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_globals.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_hypot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_idecode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_leninc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_lenincx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ln10.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ln2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_max.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_min.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_minus1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_minusp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_mul.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_pi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_plus1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_plusp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_precision.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ratseries_.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ratseries_a.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ratseries_ab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ratseries_b.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ratseries_p.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ratseries_pa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ratseries_pab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ratseries_pb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ratseries_pq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ratseries_pqa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ratseries_pqab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ratseries_pqb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ratseries_q.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ratseries_qa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ratseries_qab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ratseries_qb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ratsumseries_pqcd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ratsumseries_pqcd_aux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ratsumseries_pqd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_ratsumseries_pqd_aux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_recip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_round22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_scale.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_scale_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_shorten.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_shortenrel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_shortenwith.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_sign.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_signum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_sqrt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_square.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_to_DF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_to_FF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_to_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_to_LF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_to_SF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_to_double.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_to_float.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_trunc22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_uminus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_zerop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_zeta3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_LF_zeta_int.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_MI.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_MI_cond_composite.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_MI_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_MI_err_comp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_MI_lshift.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_MI_rshift.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_N_aprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_N_as.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_N_bprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_N_from_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_N_read.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_N_read_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_F_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_LF_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_abs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_aprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_as.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_bprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_ceil1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_ceil12.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_ceil2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_ceil22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_class.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_compare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_cprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_denominator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_dprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_eqhashcode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_equal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_expt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_expt_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_exptpos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_exptpos_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_floor1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_floor12.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_floor2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_floor22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_from_I_I_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_from_I_posI.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_from_I_posI1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_from_I_posI_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_from_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_logp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_max.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_min.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_minus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_minus1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_minusp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_mul.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_numerator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_plus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_plus1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_plusp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_print.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_read.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_read_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_readparsed.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_recip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_ring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_rootp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_rootp_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_round1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_round12.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_round2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_round22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_signum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_sqrt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_sqrtp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_square.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_to_double.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_to_float.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_trunc1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_trunc12.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_trunc2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_trunc22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_uminus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_RA_zerop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_abs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_aprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_as.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_atan.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_atan2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_bprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_ceil1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_ceil12.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_ceil2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_ceil22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_cis.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_compare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_contagion.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_cos.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_cosh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_coshsinh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_cossin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_cprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_eqhashcode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_equal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_exp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_expt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_expt_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_fceil1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_fceil12.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_fceil2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_fceil22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_ffloor1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_ffloor12.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_ffloor2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_ffloor22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_floor1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_floor12.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_floor2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_floor22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_from_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_fround1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_fround12.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_fround2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_fround22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_ftrunc1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_ftrunc12.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_ftrunc2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_ftrunc22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_hypot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_ln.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_log.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_max.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_min.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_minus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_minus1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_minusp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_mod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_mul.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_plus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_plus1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_plusp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_random.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_rational.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_rationalize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_read.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_read_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_recip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_rem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_ring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_round1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_round12.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_round2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_round22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_signum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_sin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_sinh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_sqrt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_square.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_tan.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_tanh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_to_DF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_to_FF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_to_LF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_to_SF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_to_double.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_to_float.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_trunc1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_trunc12.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_trunc2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_trunc22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_uminus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_R_zerop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_abs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_as.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_ceil22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_class.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_compare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_decode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_digits.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_eqhashcode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_exponent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_fceil.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_ffloor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_floor22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_from_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_from_RA.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_from_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_fround.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_ftrunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_futrunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_hypot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_idecode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_max.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_min.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_minus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_minusp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_mul.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_plus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_plusp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_precision.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_recip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_round22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_scale.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_scale_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_sign.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_signum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_sqrt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_to_DF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_to_FF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_to_I.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_to_LF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_to_double.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_to_float.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_trunc22.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_uminus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SF_zerop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SV_aprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SV_copy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SV_number.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SV_number_aprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SV_number_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SV_ringelt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_SV_ringelt_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_UL_random.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_UP.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_UP_I_hermite.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_UP_I_laguerre.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_UP_I_tchebychev.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_UP_RA_legendre.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_UP_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_UP_deriv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_UP_named.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_UP_no_ring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_UP_unnamed.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_alloca.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_as_exception.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_asm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_asm_GF2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_condition.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_d0_exception.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_debugout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_float_format.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_fmt_cardinal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_fmt_floatstring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_fmt_integer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_fmt_newroman.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_fmt_oldroman.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_fmt_ordinal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_fmt_paddedstring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_fmt_scaleexp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_fmt_tens.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_free.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_immclasses.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_low_div.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_low_gcd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_low_isqrt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_low_isqrt2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_low_mul.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_malloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_no_ring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_notreached_exception.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_nt_cornacchia1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_nt_cornacchia4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_nt_isprobprime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_nt_jacobi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_nt_jacobi_low.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_nt_nextprobprime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_nt_sqrtmodp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_output_dec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_output_hex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_pl_add.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_pl_d.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_pl_get.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_prin_globals.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_random_def.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_random_from.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_rcpointer2_hashweak_rcpointer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_rcpointer_hashweak_rcpointer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_read_bad_syntax_exception.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_read_eof_exception.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_read_junk_exception.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_ring_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_spushstring_append.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_spushstring_push.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_sstring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_st_c2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_st_class.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_st_concat1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_st_concat2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_st_concat3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_st_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_st_get1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_st_get2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_st_getline1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_st_getline2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_st_gettoken.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_st_hashcode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_st_make0.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_st_make1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_st_make2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_st_print.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_sy_hashcode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_symbol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_t_c1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_t_c2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_t_current.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_t_current2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_t_d.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_t_dec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_t_inc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_t_minus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_t_report.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_t_td_minus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_t_td_plus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cl_version.Plo@am__quote@ .S.o: @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $< .S.obj: @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .S.lo: @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LTCPPASCOMPILE) -c -o $@ $< cl_asm.lo: base/digitseq/cl_asm.S @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT cl_asm.lo -MD -MP -MF $(DEPDIR)/cl_asm.Tpo -c -o cl_asm.lo `test -f 'base/digitseq/cl_asm.S' || echo '$(srcdir)/'`base/digitseq/cl_asm.S @am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_asm.Tpo $(DEPDIR)/cl_asm.Plo @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='base/digitseq/cl_asm.S' object='cl_asm.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o cl_asm.lo `test -f 'base/digitseq/cl_asm.S' || echo '$(srcdir)/'`base/digitseq/cl_asm.S cl_asm_GF2.lo: polynomial/elem/cl_asm_GF2.S @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT cl_asm_GF2.lo -MD -MP -MF $(DEPDIR)/cl_asm_GF2.Tpo -c -o cl_asm_GF2.lo `test -f 'polynomial/elem/cl_asm_GF2.S' || echo '$(srcdir)/'`polynomial/elem/cl_asm_GF2.S @am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_asm_GF2.Tpo $(DEPDIR)/cl_asm_GF2.Plo @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='polynomial/elem/cl_asm_GF2.S' object='cl_asm_GF2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o cl_asm_GF2.lo `test -f 'polynomial/elem/cl_asm_GF2.S' || echo '$(srcdir)/'`polynomial/elem/cl_asm_GF2.S .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< cl_alloca.lo: base/cl_alloca.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_alloca.lo -MD -MP -MF $(DEPDIR)/cl_alloca.Tpo -c -o cl_alloca.lo `test -f 'base/cl_alloca.cc' || echo '$(srcdir)/'`base/cl_alloca.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_alloca.Tpo $(DEPDIR)/cl_alloca.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/cl_alloca.cc' object='cl_alloca.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_alloca.lo `test -f 'base/cl_alloca.cc' || echo '$(srcdir)/'`base/cl_alloca.cc cl_as_exception.lo: base/cl_as_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_as_exception.lo -MD -MP -MF $(DEPDIR)/cl_as_exception.Tpo -c -o cl_as_exception.lo `test -f 'base/cl_as_exception.cc' || echo '$(srcdir)/'`base/cl_as_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_as_exception.Tpo $(DEPDIR)/cl_as_exception.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/cl_as_exception.cc' object='cl_as_exception.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_as_exception.lo `test -f 'base/cl_as_exception.cc' || echo '$(srcdir)/'`base/cl_as_exception.cc cl_condition.lo: base/cl_condition.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_condition.lo -MD -MP -MF $(DEPDIR)/cl_condition.Tpo -c -o cl_condition.lo `test -f 'base/cl_condition.cc' || echo '$(srcdir)/'`base/cl_condition.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_condition.Tpo $(DEPDIR)/cl_condition.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/cl_condition.cc' object='cl_condition.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_condition.lo `test -f 'base/cl_condition.cc' || echo '$(srcdir)/'`base/cl_condition.cc cl_d0_exception.lo: base/cl_d0_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_d0_exception.lo -MD -MP -MF $(DEPDIR)/cl_d0_exception.Tpo -c -o cl_d0_exception.lo `test -f 'base/cl_d0_exception.cc' || echo '$(srcdir)/'`base/cl_d0_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_d0_exception.Tpo $(DEPDIR)/cl_d0_exception.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/cl_d0_exception.cc' object='cl_d0_exception.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_d0_exception.lo `test -f 'base/cl_d0_exception.cc' || echo '$(srcdir)/'`base/cl_d0_exception.cc cl_debug.lo: base/cl_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_debug.lo -MD -MP -MF $(DEPDIR)/cl_debug.Tpo -c -o cl_debug.lo `test -f 'base/cl_debug.cc' || echo '$(srcdir)/'`base/cl_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_debug.Tpo $(DEPDIR)/cl_debug.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/cl_debug.cc' object='cl_debug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_debug.lo `test -f 'base/cl_debug.cc' || echo '$(srcdir)/'`base/cl_debug.cc cl_debugout.lo: base/cl_debugout.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_debugout.lo -MD -MP -MF $(DEPDIR)/cl_debugout.Tpo -c -o cl_debugout.lo `test -f 'base/cl_debugout.cc' || echo '$(srcdir)/'`base/cl_debugout.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_debugout.Tpo $(DEPDIR)/cl_debugout.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/cl_debugout.cc' object='cl_debugout.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_debugout.lo `test -f 'base/cl_debugout.cc' || echo '$(srcdir)/'`base/cl_debugout.cc cl_free.lo: base/cl_free.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_free.lo -MD -MP -MF $(DEPDIR)/cl_free.Tpo -c -o cl_free.lo `test -f 'base/cl_free.cc' || echo '$(srcdir)/'`base/cl_free.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_free.Tpo $(DEPDIR)/cl_free.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/cl_free.cc' object='cl_free.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_free.lo `test -f 'base/cl_free.cc' || echo '$(srcdir)/'`base/cl_free.cc cl_immclasses.lo: base/cl_immclasses.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_immclasses.lo -MD -MP -MF $(DEPDIR)/cl_immclasses.Tpo -c -o cl_immclasses.lo `test -f 'base/cl_immclasses.cc' || echo '$(srcdir)/'`base/cl_immclasses.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_immclasses.Tpo $(DEPDIR)/cl_immclasses.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/cl_immclasses.cc' object='cl_immclasses.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_immclasses.lo `test -f 'base/cl_immclasses.cc' || echo '$(srcdir)/'`base/cl_immclasses.cc cl_malloc.lo: base/cl_malloc.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_malloc.lo -MD -MP -MF $(DEPDIR)/cl_malloc.Tpo -c -o cl_malloc.lo `test -f 'base/cl_malloc.cc' || echo '$(srcdir)/'`base/cl_malloc.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_malloc.Tpo $(DEPDIR)/cl_malloc.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/cl_malloc.cc' object='cl_malloc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_malloc.lo `test -f 'base/cl_malloc.cc' || echo '$(srcdir)/'`base/cl_malloc.cc cl_notreached_exception.lo: base/cl_notreached_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_notreached_exception.lo -MD -MP -MF $(DEPDIR)/cl_notreached_exception.Tpo -c -o cl_notreached_exception.lo `test -f 'base/cl_notreached_exception.cc' || echo '$(srcdir)/'`base/cl_notreached_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_notreached_exception.Tpo $(DEPDIR)/cl_notreached_exception.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/cl_notreached_exception.cc' object='cl_notreached_exception.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_notreached_exception.lo `test -f 'base/cl_notreached_exception.cc' || echo '$(srcdir)/'`base/cl_notreached_exception.cc cl_version.lo: base/cl_version.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_version.lo -MD -MP -MF $(DEPDIR)/cl_version.Tpo -c -o cl_version.lo `test -f 'base/cl_version.cc' || echo '$(srcdir)/'`base/cl_version.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_version.Tpo $(DEPDIR)/cl_version.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/cl_version.cc' object='cl_version.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_version.lo `test -f 'base/cl_version.cc' || echo '$(srcdir)/'`base/cl_version.cc cl_2D_div.lo: base/digit/cl_2D_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_2D_div.lo -MD -MP -MF $(DEPDIR)/cl_2D_div.Tpo -c -o cl_2D_div.lo `test -f 'base/digit/cl_2D_div.cc' || echo '$(srcdir)/'`base/digit/cl_2D_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_2D_div.Tpo $(DEPDIR)/cl_2D_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/digit/cl_2D_div.cc' object='cl_2D_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_2D_div.lo `test -f 'base/digit/cl_2D_div.cc' || echo '$(srcdir)/'`base/digit/cl_2D_div.cc cl_2D_exptpos.lo: base/digit/cl_2D_exptpos.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_2D_exptpos.lo -MD -MP -MF $(DEPDIR)/cl_2D_exptpos.Tpo -c -o cl_2D_exptpos.lo `test -f 'base/digit/cl_2D_exptpos.cc' || echo '$(srcdir)/'`base/digit/cl_2D_exptpos.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_2D_exptpos.Tpo $(DEPDIR)/cl_2D_exptpos.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/digit/cl_2D_exptpos.cc' object='cl_2D_exptpos.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_2D_exptpos.lo `test -f 'base/digit/cl_2D_exptpos.cc' || echo '$(srcdir)/'`base/digit/cl_2D_exptpos.cc cl_2DS_div.lo: base/digitseq/cl_2DS_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_2DS_div.lo -MD -MP -MF $(DEPDIR)/cl_2DS_div.Tpo -c -o cl_2DS_div.lo `test -f 'base/digitseq/cl_2DS_div.cc' || echo '$(srcdir)/'`base/digitseq/cl_2DS_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_2DS_div.Tpo $(DEPDIR)/cl_2DS_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/digitseq/cl_2DS_div.cc' object='cl_2DS_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_2DS_div.lo `test -f 'base/digitseq/cl_2DS_div.cc' || echo '$(srcdir)/'`base/digitseq/cl_2DS_div.cc cl_2DS_recip.lo: base/digitseq/cl_2DS_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_2DS_recip.lo -MD -MP -MF $(DEPDIR)/cl_2DS_recip.Tpo -c -o cl_2DS_recip.lo `test -f 'base/digitseq/cl_2DS_recip.cc' || echo '$(srcdir)/'`base/digitseq/cl_2DS_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_2DS_recip.Tpo $(DEPDIR)/cl_2DS_recip.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/digitseq/cl_2DS_recip.cc' object='cl_2DS_recip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_2DS_recip.lo `test -f 'base/digitseq/cl_2DS_recip.cc' || echo '$(srcdir)/'`base/digitseq/cl_2DS_recip.cc cl_DS_div.lo: base/digitseq/cl_DS_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DS_div.lo -MD -MP -MF $(DEPDIR)/cl_DS_div.Tpo -c -o cl_DS_div.lo `test -f 'base/digitseq/cl_DS_div.cc' || echo '$(srcdir)/'`base/digitseq/cl_DS_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DS_div.Tpo $(DEPDIR)/cl_DS_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/digitseq/cl_DS_div.cc' object='cl_DS_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DS_div.lo `test -f 'base/digitseq/cl_DS_div.cc' || echo '$(srcdir)/'`base/digitseq/cl_DS_div.cc cl_DS_mul.lo: base/digitseq/cl_DS_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DS_mul.lo -MD -MP -MF $(DEPDIR)/cl_DS_mul.Tpo -c -o cl_DS_mul.lo `test -f 'base/digitseq/cl_DS_mul.cc' || echo '$(srcdir)/'`base/digitseq/cl_DS_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DS_mul.Tpo $(DEPDIR)/cl_DS_mul.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/digitseq/cl_DS_mul.cc' object='cl_DS_mul.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DS_mul.lo `test -f 'base/digitseq/cl_DS_mul.cc' || echo '$(srcdir)/'`base/digitseq/cl_DS_mul.cc cl_DS_random.lo: base/digitseq/cl_DS_random.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DS_random.lo -MD -MP -MF $(DEPDIR)/cl_DS_random.Tpo -c -o cl_DS_random.lo `test -f 'base/digitseq/cl_DS_random.cc' || echo '$(srcdir)/'`base/digitseq/cl_DS_random.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DS_random.Tpo $(DEPDIR)/cl_DS_random.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/digitseq/cl_DS_random.cc' object='cl_DS_random.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DS_random.lo `test -f 'base/digitseq/cl_DS_random.cc' || echo '$(srcdir)/'`base/digitseq/cl_DS_random.cc cl_DS_recip.lo: base/digitseq/cl_DS_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DS_recip.lo -MD -MP -MF $(DEPDIR)/cl_DS_recip.Tpo -c -o cl_DS_recip.lo `test -f 'base/digitseq/cl_DS_recip.cc' || echo '$(srcdir)/'`base/digitseq/cl_DS_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DS_recip.Tpo $(DEPDIR)/cl_DS_recip.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/digitseq/cl_DS_recip.cc' object='cl_DS_recip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DS_recip.lo `test -f 'base/digitseq/cl_DS_recip.cc' || echo '$(srcdir)/'`base/digitseq/cl_DS_recip.cc cl_DS_recipsqrt.lo: base/digitseq/cl_DS_recipsqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DS_recipsqrt.lo -MD -MP -MF $(DEPDIR)/cl_DS_recipsqrt.Tpo -c -o cl_DS_recipsqrt.lo `test -f 'base/digitseq/cl_DS_recipsqrt.cc' || echo '$(srcdir)/'`base/digitseq/cl_DS_recipsqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DS_recipsqrt.Tpo $(DEPDIR)/cl_DS_recipsqrt.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/digitseq/cl_DS_recipsqrt.cc' object='cl_DS_recipsqrt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DS_recipsqrt.lo `test -f 'base/digitseq/cl_DS_recipsqrt.cc' || echo '$(srcdir)/'`base/digitseq/cl_DS_recipsqrt.cc cl_DS_sqrt.lo: base/digitseq/cl_DS_sqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DS_sqrt.lo -MD -MP -MF $(DEPDIR)/cl_DS_sqrt.Tpo -c -o cl_DS_sqrt.lo `test -f 'base/digitseq/cl_DS_sqrt.cc' || echo '$(srcdir)/'`base/digitseq/cl_DS_sqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DS_sqrt.Tpo $(DEPDIR)/cl_DS_sqrt.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/digitseq/cl_DS_sqrt.cc' object='cl_DS_sqrt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DS_sqrt.lo `test -f 'base/digitseq/cl_DS_sqrt.cc' || echo '$(srcdir)/'`base/digitseq/cl_DS_sqrt.cc cl_DS_trandom.lo: base/digitseq/cl_DS_trandom.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DS_trandom.lo -MD -MP -MF $(DEPDIR)/cl_DS_trandom.Tpo -c -o cl_DS_trandom.lo `test -f 'base/digitseq/cl_DS_trandom.cc' || echo '$(srcdir)/'`base/digitseq/cl_DS_trandom.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DS_trandom.Tpo $(DEPDIR)/cl_DS_trandom.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/digitseq/cl_DS_trandom.cc' object='cl_DS_trandom.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DS_trandom.lo `test -f 'base/digitseq/cl_DS_trandom.cc' || echo '$(srcdir)/'`base/digitseq/cl_DS_trandom.cc cl_rcpointer2_hashweak_rcpointer.lo: base/hash/cl_rcpointer2_hashweak_rcpointer.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_rcpointer2_hashweak_rcpointer.lo -MD -MP -MF $(DEPDIR)/cl_rcpointer2_hashweak_rcpointer.Tpo -c -o cl_rcpointer2_hashweak_rcpointer.lo `test -f 'base/hash/cl_rcpointer2_hashweak_rcpointer.cc' || echo '$(srcdir)/'`base/hash/cl_rcpointer2_hashweak_rcpointer.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_rcpointer2_hashweak_rcpointer.Tpo $(DEPDIR)/cl_rcpointer2_hashweak_rcpointer.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/hash/cl_rcpointer2_hashweak_rcpointer.cc' object='cl_rcpointer2_hashweak_rcpointer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_rcpointer2_hashweak_rcpointer.lo `test -f 'base/hash/cl_rcpointer2_hashweak_rcpointer.cc' || echo '$(srcdir)/'`base/hash/cl_rcpointer2_hashweak_rcpointer.cc cl_rcpointer_hashweak_rcpointer.lo: base/hash/cl_rcpointer_hashweak_rcpointer.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_rcpointer_hashweak_rcpointer.lo -MD -MP -MF $(DEPDIR)/cl_rcpointer_hashweak_rcpointer.Tpo -c -o cl_rcpointer_hashweak_rcpointer.lo `test -f 'base/hash/cl_rcpointer_hashweak_rcpointer.cc' || echo '$(srcdir)/'`base/hash/cl_rcpointer_hashweak_rcpointer.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_rcpointer_hashweak_rcpointer.Tpo $(DEPDIR)/cl_rcpointer_hashweak_rcpointer.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/hash/cl_rcpointer_hashweak_rcpointer.cc' object='cl_rcpointer_hashweak_rcpointer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_rcpointer_hashweak_rcpointer.lo `test -f 'base/hash/cl_rcpointer_hashweak_rcpointer.cc' || echo '$(srcdir)/'`base/hash/cl_rcpointer_hashweak_rcpointer.cc cl_read_bad_syntax_exception.lo: base/input/cl_read_bad_syntax_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_read_bad_syntax_exception.lo -MD -MP -MF $(DEPDIR)/cl_read_bad_syntax_exception.Tpo -c -o cl_read_bad_syntax_exception.lo `test -f 'base/input/cl_read_bad_syntax_exception.cc' || echo '$(srcdir)/'`base/input/cl_read_bad_syntax_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_read_bad_syntax_exception.Tpo $(DEPDIR)/cl_read_bad_syntax_exception.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/input/cl_read_bad_syntax_exception.cc' object='cl_read_bad_syntax_exception.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_read_bad_syntax_exception.lo `test -f 'base/input/cl_read_bad_syntax_exception.cc' || echo '$(srcdir)/'`base/input/cl_read_bad_syntax_exception.cc cl_read_eof_exception.lo: base/input/cl_read_eof_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_read_eof_exception.lo -MD -MP -MF $(DEPDIR)/cl_read_eof_exception.Tpo -c -o cl_read_eof_exception.lo `test -f 'base/input/cl_read_eof_exception.cc' || echo '$(srcdir)/'`base/input/cl_read_eof_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_read_eof_exception.Tpo $(DEPDIR)/cl_read_eof_exception.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/input/cl_read_eof_exception.cc' object='cl_read_eof_exception.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_read_eof_exception.lo `test -f 'base/input/cl_read_eof_exception.cc' || echo '$(srcdir)/'`base/input/cl_read_eof_exception.cc cl_read_junk_exception.lo: base/input/cl_read_junk_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_read_junk_exception.lo -MD -MP -MF $(DEPDIR)/cl_read_junk_exception.Tpo -c -o cl_read_junk_exception.lo `test -f 'base/input/cl_read_junk_exception.cc' || echo '$(srcdir)/'`base/input/cl_read_junk_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_read_junk_exception.Tpo $(DEPDIR)/cl_read_junk_exception.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/input/cl_read_junk_exception.cc' object='cl_read_junk_exception.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_read_junk_exception.lo `test -f 'base/input/cl_read_junk_exception.cc' || echo '$(srcdir)/'`base/input/cl_read_junk_exception.cc cl_low_div.lo: base/low/cl_low_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_low_div.lo -MD -MP -MF $(DEPDIR)/cl_low_div.Tpo -c -o cl_low_div.lo `test -f 'base/low/cl_low_div.cc' || echo '$(srcdir)/'`base/low/cl_low_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_low_div.Tpo $(DEPDIR)/cl_low_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/low/cl_low_div.cc' object='cl_low_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_low_div.lo `test -f 'base/low/cl_low_div.cc' || echo '$(srcdir)/'`base/low/cl_low_div.cc cl_low_isqrt.lo: base/low/cl_low_isqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_low_isqrt.lo -MD -MP -MF $(DEPDIR)/cl_low_isqrt.Tpo -c -o cl_low_isqrt.lo `test -f 'base/low/cl_low_isqrt.cc' || echo '$(srcdir)/'`base/low/cl_low_isqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_low_isqrt.Tpo $(DEPDIR)/cl_low_isqrt.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/low/cl_low_isqrt.cc' object='cl_low_isqrt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_low_isqrt.lo `test -f 'base/low/cl_low_isqrt.cc' || echo '$(srcdir)/'`base/low/cl_low_isqrt.cc cl_low_isqrt2.lo: base/low/cl_low_isqrt2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_low_isqrt2.lo -MD -MP -MF $(DEPDIR)/cl_low_isqrt2.Tpo -c -o cl_low_isqrt2.lo `test -f 'base/low/cl_low_isqrt2.cc' || echo '$(srcdir)/'`base/low/cl_low_isqrt2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_low_isqrt2.Tpo $(DEPDIR)/cl_low_isqrt2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/low/cl_low_isqrt2.cc' object='cl_low_isqrt2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_low_isqrt2.lo `test -f 'base/low/cl_low_isqrt2.cc' || echo '$(srcdir)/'`base/low/cl_low_isqrt2.cc cl_low_mul.lo: base/low/cl_low_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_low_mul.lo -MD -MP -MF $(DEPDIR)/cl_low_mul.Tpo -c -o cl_low_mul.lo `test -f 'base/low/cl_low_mul.cc' || echo '$(srcdir)/'`base/low/cl_low_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_low_mul.Tpo $(DEPDIR)/cl_low_mul.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/low/cl_low_mul.cc' object='cl_low_mul.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_low_mul.lo `test -f 'base/low/cl_low_mul.cc' || echo '$(srcdir)/'`base/low/cl_low_mul.cc cl_output_dec.lo: base/output/cl_output_dec.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_output_dec.lo -MD -MP -MF $(DEPDIR)/cl_output_dec.Tpo -c -o cl_output_dec.lo `test -f 'base/output/cl_output_dec.cc' || echo '$(srcdir)/'`base/output/cl_output_dec.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_output_dec.Tpo $(DEPDIR)/cl_output_dec.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/output/cl_output_dec.cc' object='cl_output_dec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_output_dec.lo `test -f 'base/output/cl_output_dec.cc' || echo '$(srcdir)/'`base/output/cl_output_dec.cc cl_output_hex.lo: base/output/cl_output_hex.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_output_hex.lo -MD -MP -MF $(DEPDIR)/cl_output_hex.Tpo -c -o cl_output_hex.lo `test -f 'base/output/cl_output_hex.cc' || echo '$(srcdir)/'`base/output/cl_output_hex.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_output_hex.Tpo $(DEPDIR)/cl_output_hex.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/output/cl_output_hex.cc' object='cl_output_hex.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_output_hex.lo `test -f 'base/output/cl_output_hex.cc' || echo '$(srcdir)/'`base/output/cl_output_hex.cc cl_prin_globals.lo: base/output/cl_prin_globals.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_prin_globals.lo -MD -MP -MF $(DEPDIR)/cl_prin_globals.Tpo -c -o cl_prin_globals.lo `test -f 'base/output/cl_prin_globals.cc' || echo '$(srcdir)/'`base/output/cl_prin_globals.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_prin_globals.Tpo $(DEPDIR)/cl_prin_globals.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/output/cl_prin_globals.cc' object='cl_prin_globals.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_prin_globals.lo `test -f 'base/output/cl_prin_globals.cc' || echo '$(srcdir)/'`base/output/cl_prin_globals.cc cl_pl_add.lo: base/proplist/cl_pl_add.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_pl_add.lo -MD -MP -MF $(DEPDIR)/cl_pl_add.Tpo -c -o cl_pl_add.lo `test -f 'base/proplist/cl_pl_add.cc' || echo '$(srcdir)/'`base/proplist/cl_pl_add.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_pl_add.Tpo $(DEPDIR)/cl_pl_add.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/proplist/cl_pl_add.cc' object='cl_pl_add.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_pl_add.lo `test -f 'base/proplist/cl_pl_add.cc' || echo '$(srcdir)/'`base/proplist/cl_pl_add.cc cl_pl_d.lo: base/proplist/cl_pl_d.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_pl_d.lo -MD -MP -MF $(DEPDIR)/cl_pl_d.Tpo -c -o cl_pl_d.lo `test -f 'base/proplist/cl_pl_d.cc' || echo '$(srcdir)/'`base/proplist/cl_pl_d.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_pl_d.Tpo $(DEPDIR)/cl_pl_d.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/proplist/cl_pl_d.cc' object='cl_pl_d.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_pl_d.lo `test -f 'base/proplist/cl_pl_d.cc' || echo '$(srcdir)/'`base/proplist/cl_pl_d.cc cl_pl_get.lo: base/proplist/cl_pl_get.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_pl_get.lo -MD -MP -MF $(DEPDIR)/cl_pl_get.Tpo -c -o cl_pl_get.lo `test -f 'base/proplist/cl_pl_get.cc' || echo '$(srcdir)/'`base/proplist/cl_pl_get.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_pl_get.Tpo $(DEPDIR)/cl_pl_get.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/proplist/cl_pl_get.cc' object='cl_pl_get.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_pl_get.lo `test -f 'base/proplist/cl_pl_get.cc' || echo '$(srcdir)/'`base/proplist/cl_pl_get.cc cl_UL_random.lo: base/random/cl_UL_random.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_UL_random.lo -MD -MP -MF $(DEPDIR)/cl_UL_random.Tpo -c -o cl_UL_random.lo `test -f 'base/random/cl_UL_random.cc' || echo '$(srcdir)/'`base/random/cl_UL_random.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_UL_random.Tpo $(DEPDIR)/cl_UL_random.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/random/cl_UL_random.cc' object='cl_UL_random.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_UL_random.lo `test -f 'base/random/cl_UL_random.cc' || echo '$(srcdir)/'`base/random/cl_UL_random.cc cl_random_def.lo: base/random/cl_random_def.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_random_def.lo -MD -MP -MF $(DEPDIR)/cl_random_def.Tpo -c -o cl_random_def.lo `test -f 'base/random/cl_random_def.cc' || echo '$(srcdir)/'`base/random/cl_random_def.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_random_def.Tpo $(DEPDIR)/cl_random_def.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/random/cl_random_def.cc' object='cl_random_def.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_random_def.lo `test -f 'base/random/cl_random_def.cc' || echo '$(srcdir)/'`base/random/cl_random_def.cc cl_random_from.lo: base/random/cl_random_from.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_random_from.lo -MD -MP -MF $(DEPDIR)/cl_random_from.Tpo -c -o cl_random_from.lo `test -f 'base/random/cl_random_from.cc' || echo '$(srcdir)/'`base/random/cl_random_from.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_random_from.Tpo $(DEPDIR)/cl_random_from.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/random/cl_random_from.cc' object='cl_random_from.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_random_from.lo `test -f 'base/random/cl_random_from.cc' || echo '$(srcdir)/'`base/random/cl_random_from.cc cl_no_ring.lo: base/ring/cl_no_ring.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_no_ring.lo -MD -MP -MF $(DEPDIR)/cl_no_ring.Tpo -c -o cl_no_ring.lo `test -f 'base/ring/cl_no_ring.cc' || echo '$(srcdir)/'`base/ring/cl_no_ring.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_no_ring.Tpo $(DEPDIR)/cl_no_ring.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/ring/cl_no_ring.cc' object='cl_no_ring.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_no_ring.lo `test -f 'base/ring/cl_no_ring.cc' || echo '$(srcdir)/'`base/ring/cl_no_ring.cc cl_ring_debug.lo: base/ring/cl_ring_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_ring_debug.lo -MD -MP -MF $(DEPDIR)/cl_ring_debug.Tpo -c -o cl_ring_debug.lo `test -f 'base/ring/cl_ring_debug.cc' || echo '$(srcdir)/'`base/ring/cl_ring_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_ring_debug.Tpo $(DEPDIR)/cl_ring_debug.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/ring/cl_ring_debug.cc' object='cl_ring_debug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_ring_debug.lo `test -f 'base/ring/cl_ring_debug.cc' || echo '$(srcdir)/'`base/ring/cl_ring_debug.cc cl_spushstring_append.lo: base/string/cl_spushstring_append.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_spushstring_append.lo -MD -MP -MF $(DEPDIR)/cl_spushstring_append.Tpo -c -o cl_spushstring_append.lo `test -f 'base/string/cl_spushstring_append.cc' || echo '$(srcdir)/'`base/string/cl_spushstring_append.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_spushstring_append.Tpo $(DEPDIR)/cl_spushstring_append.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/string/cl_spushstring_append.cc' object='cl_spushstring_append.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_spushstring_append.lo `test -f 'base/string/cl_spushstring_append.cc' || echo '$(srcdir)/'`base/string/cl_spushstring_append.cc cl_spushstring_push.lo: base/string/cl_spushstring_push.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_spushstring_push.lo -MD -MP -MF $(DEPDIR)/cl_spushstring_push.Tpo -c -o cl_spushstring_push.lo `test -f 'base/string/cl_spushstring_push.cc' || echo '$(srcdir)/'`base/string/cl_spushstring_push.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_spushstring_push.Tpo $(DEPDIR)/cl_spushstring_push.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/string/cl_spushstring_push.cc' object='cl_spushstring_push.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_spushstring_push.lo `test -f 'base/string/cl_spushstring_push.cc' || echo '$(srcdir)/'`base/string/cl_spushstring_push.cc cl_sstring.lo: base/string/cl_sstring.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_sstring.lo -MD -MP -MF $(DEPDIR)/cl_sstring.Tpo -c -o cl_sstring.lo `test -f 'base/string/cl_sstring.cc' || echo '$(srcdir)/'`base/string/cl_sstring.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_sstring.Tpo $(DEPDIR)/cl_sstring.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/string/cl_sstring.cc' object='cl_sstring.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_sstring.lo `test -f 'base/string/cl_sstring.cc' || echo '$(srcdir)/'`base/string/cl_sstring.cc cl_st_c2.lo: base/string/cl_st_c2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_st_c2.lo -MD -MP -MF $(DEPDIR)/cl_st_c2.Tpo -c -o cl_st_c2.lo `test -f 'base/string/cl_st_c2.cc' || echo '$(srcdir)/'`base/string/cl_st_c2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_st_c2.Tpo $(DEPDIR)/cl_st_c2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/string/cl_st_c2.cc' object='cl_st_c2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_st_c2.lo `test -f 'base/string/cl_st_c2.cc' || echo '$(srcdir)/'`base/string/cl_st_c2.cc cl_st_concat1.lo: base/string/cl_st_concat1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_st_concat1.lo -MD -MP -MF $(DEPDIR)/cl_st_concat1.Tpo -c -o cl_st_concat1.lo `test -f 'base/string/cl_st_concat1.cc' || echo '$(srcdir)/'`base/string/cl_st_concat1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_st_concat1.Tpo $(DEPDIR)/cl_st_concat1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/string/cl_st_concat1.cc' object='cl_st_concat1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_st_concat1.lo `test -f 'base/string/cl_st_concat1.cc' || echo '$(srcdir)/'`base/string/cl_st_concat1.cc cl_st_concat2.lo: base/string/cl_st_concat2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_st_concat2.lo -MD -MP -MF $(DEPDIR)/cl_st_concat2.Tpo -c -o cl_st_concat2.lo `test -f 'base/string/cl_st_concat2.cc' || echo '$(srcdir)/'`base/string/cl_st_concat2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_st_concat2.Tpo $(DEPDIR)/cl_st_concat2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/string/cl_st_concat2.cc' object='cl_st_concat2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_st_concat2.lo `test -f 'base/string/cl_st_concat2.cc' || echo '$(srcdir)/'`base/string/cl_st_concat2.cc cl_st_concat3.lo: base/string/cl_st_concat3.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_st_concat3.lo -MD -MP -MF $(DEPDIR)/cl_st_concat3.Tpo -c -o cl_st_concat3.lo `test -f 'base/string/cl_st_concat3.cc' || echo '$(srcdir)/'`base/string/cl_st_concat3.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_st_concat3.Tpo $(DEPDIR)/cl_st_concat3.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/string/cl_st_concat3.cc' object='cl_st_concat3.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_st_concat3.lo `test -f 'base/string/cl_st_concat3.cc' || echo '$(srcdir)/'`base/string/cl_st_concat3.cc cl_st_debug.lo: base/string/cl_st_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_st_debug.lo -MD -MP -MF $(DEPDIR)/cl_st_debug.Tpo -c -o cl_st_debug.lo `test -f 'base/string/cl_st_debug.cc' || echo '$(srcdir)/'`base/string/cl_st_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_st_debug.Tpo $(DEPDIR)/cl_st_debug.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/string/cl_st_debug.cc' object='cl_st_debug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_st_debug.lo `test -f 'base/string/cl_st_debug.cc' || echo '$(srcdir)/'`base/string/cl_st_debug.cc cl_st_hashcode.lo: base/string/cl_st_hashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_st_hashcode.lo -MD -MP -MF $(DEPDIR)/cl_st_hashcode.Tpo -c -o cl_st_hashcode.lo `test -f 'base/string/cl_st_hashcode.cc' || echo '$(srcdir)/'`base/string/cl_st_hashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_st_hashcode.Tpo $(DEPDIR)/cl_st_hashcode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/string/cl_st_hashcode.cc' object='cl_st_hashcode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_st_hashcode.lo `test -f 'base/string/cl_st_hashcode.cc' || echo '$(srcdir)/'`base/string/cl_st_hashcode.cc cl_st_make0.lo: base/string/cl_st_make0.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_st_make0.lo -MD -MP -MF $(DEPDIR)/cl_st_make0.Tpo -c -o cl_st_make0.lo `test -f 'base/string/cl_st_make0.cc' || echo '$(srcdir)/'`base/string/cl_st_make0.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_st_make0.Tpo $(DEPDIR)/cl_st_make0.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/string/cl_st_make0.cc' object='cl_st_make0.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_st_make0.lo `test -f 'base/string/cl_st_make0.cc' || echo '$(srcdir)/'`base/string/cl_st_make0.cc cl_st_make1.lo: base/string/cl_st_make1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_st_make1.lo -MD -MP -MF $(DEPDIR)/cl_st_make1.Tpo -c -o cl_st_make1.lo `test -f 'base/string/cl_st_make1.cc' || echo '$(srcdir)/'`base/string/cl_st_make1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_st_make1.Tpo $(DEPDIR)/cl_st_make1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/string/cl_st_make1.cc' object='cl_st_make1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_st_make1.lo `test -f 'base/string/cl_st_make1.cc' || echo '$(srcdir)/'`base/string/cl_st_make1.cc cl_st_make2.lo: base/string/cl_st_make2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_st_make2.lo -MD -MP -MF $(DEPDIR)/cl_st_make2.Tpo -c -o cl_st_make2.lo `test -f 'base/string/cl_st_make2.cc' || echo '$(srcdir)/'`base/string/cl_st_make2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_st_make2.Tpo $(DEPDIR)/cl_st_make2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/string/cl_st_make2.cc' object='cl_st_make2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_st_make2.lo `test -f 'base/string/cl_st_make2.cc' || echo '$(srcdir)/'`base/string/cl_st_make2.cc cl_st_get1.lo: base/string/input/cl_st_get1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_st_get1.lo -MD -MP -MF $(DEPDIR)/cl_st_get1.Tpo -c -o cl_st_get1.lo `test -f 'base/string/input/cl_st_get1.cc' || echo '$(srcdir)/'`base/string/input/cl_st_get1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_st_get1.Tpo $(DEPDIR)/cl_st_get1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/string/input/cl_st_get1.cc' object='cl_st_get1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_st_get1.lo `test -f 'base/string/input/cl_st_get1.cc' || echo '$(srcdir)/'`base/string/input/cl_st_get1.cc cl_st_get2.lo: base/string/input/cl_st_get2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_st_get2.lo -MD -MP -MF $(DEPDIR)/cl_st_get2.Tpo -c -o cl_st_get2.lo `test -f 'base/string/input/cl_st_get2.cc' || echo '$(srcdir)/'`base/string/input/cl_st_get2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_st_get2.Tpo $(DEPDIR)/cl_st_get2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/string/input/cl_st_get2.cc' object='cl_st_get2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_st_get2.lo `test -f 'base/string/input/cl_st_get2.cc' || echo '$(srcdir)/'`base/string/input/cl_st_get2.cc cl_st_getline1.lo: base/string/input/cl_st_getline1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_st_getline1.lo -MD -MP -MF $(DEPDIR)/cl_st_getline1.Tpo -c -o cl_st_getline1.lo `test -f 'base/string/input/cl_st_getline1.cc' || echo '$(srcdir)/'`base/string/input/cl_st_getline1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_st_getline1.Tpo $(DEPDIR)/cl_st_getline1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/string/input/cl_st_getline1.cc' object='cl_st_getline1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_st_getline1.lo `test -f 'base/string/input/cl_st_getline1.cc' || echo '$(srcdir)/'`base/string/input/cl_st_getline1.cc cl_st_getline2.lo: base/string/input/cl_st_getline2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_st_getline2.lo -MD -MP -MF $(DEPDIR)/cl_st_getline2.Tpo -c -o cl_st_getline2.lo `test -f 'base/string/input/cl_st_getline2.cc' || echo '$(srcdir)/'`base/string/input/cl_st_getline2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_st_getline2.Tpo $(DEPDIR)/cl_st_getline2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/string/input/cl_st_getline2.cc' object='cl_st_getline2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_st_getline2.lo `test -f 'base/string/input/cl_st_getline2.cc' || echo '$(srcdir)/'`base/string/input/cl_st_getline2.cc cl_st_gettoken.lo: base/string/input/cl_st_gettoken.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_st_gettoken.lo -MD -MP -MF $(DEPDIR)/cl_st_gettoken.Tpo -c -o cl_st_gettoken.lo `test -f 'base/string/input/cl_st_gettoken.cc' || echo '$(srcdir)/'`base/string/input/cl_st_gettoken.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_st_gettoken.Tpo $(DEPDIR)/cl_st_gettoken.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/string/input/cl_st_gettoken.cc' object='cl_st_gettoken.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_st_gettoken.lo `test -f 'base/string/input/cl_st_gettoken.cc' || echo '$(srcdir)/'`base/string/input/cl_st_gettoken.cc cl_st_class.lo: base/string/misc/cl_st_class.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_st_class.lo -MD -MP -MF $(DEPDIR)/cl_st_class.Tpo -c -o cl_st_class.lo `test -f 'base/string/misc/cl_st_class.cc' || echo '$(srcdir)/'`base/string/misc/cl_st_class.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_st_class.Tpo $(DEPDIR)/cl_st_class.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/string/misc/cl_st_class.cc' object='cl_st_class.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_st_class.lo `test -f 'base/string/misc/cl_st_class.cc' || echo '$(srcdir)/'`base/string/misc/cl_st_class.cc cl_st_print.lo: base/string/output/cl_st_print.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_st_print.lo -MD -MP -MF $(DEPDIR)/cl_st_print.Tpo -c -o cl_st_print.lo `test -f 'base/string/output/cl_st_print.cc' || echo '$(srcdir)/'`base/string/output/cl_st_print.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_st_print.Tpo $(DEPDIR)/cl_st_print.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/string/output/cl_st_print.cc' object='cl_st_print.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_st_print.lo `test -f 'base/string/output/cl_st_print.cc' || echo '$(srcdir)/'`base/string/output/cl_st_print.cc cl_sy_hashcode.lo: base/symbol/cl_sy_hashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_sy_hashcode.lo -MD -MP -MF $(DEPDIR)/cl_sy_hashcode.Tpo -c -o cl_sy_hashcode.lo `test -f 'base/symbol/cl_sy_hashcode.cc' || echo '$(srcdir)/'`base/symbol/cl_sy_hashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_sy_hashcode.Tpo $(DEPDIR)/cl_sy_hashcode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/symbol/cl_sy_hashcode.cc' object='cl_sy_hashcode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_sy_hashcode.lo `test -f 'base/symbol/cl_sy_hashcode.cc' || echo '$(srcdir)/'`base/symbol/cl_sy_hashcode.cc cl_symbol.lo: base/symbol/cl_symbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_symbol.lo -MD -MP -MF $(DEPDIR)/cl_symbol.Tpo -c -o cl_symbol.lo `test -f 'base/symbol/cl_symbol.cc' || echo '$(srcdir)/'`base/symbol/cl_symbol.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_symbol.Tpo $(DEPDIR)/cl_symbol.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='base/symbol/cl_symbol.cc' object='cl_symbol.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_symbol.lo `test -f 'base/symbol/cl_symbol.cc' || echo '$(srcdir)/'`base/symbol/cl_symbol.cc cl_C_abs.lo: complex/algebraic/cl_C_abs.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_abs.lo -MD -MP -MF $(DEPDIR)/cl_C_abs.Tpo -c -o cl_C_abs.lo `test -f 'complex/algebraic/cl_C_abs.cc' || echo '$(srcdir)/'`complex/algebraic/cl_C_abs.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_abs.Tpo $(DEPDIR)/cl_C_abs.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/algebraic/cl_C_abs.cc' object='cl_C_abs.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_abs.lo `test -f 'complex/algebraic/cl_C_abs.cc' || echo '$(srcdir)/'`complex/algebraic/cl_C_abs.cc cl_C_abs_aux.lo: complex/algebraic/cl_C_abs_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_abs_aux.lo -MD -MP -MF $(DEPDIR)/cl_C_abs_aux.Tpo -c -o cl_C_abs_aux.lo `test -f 'complex/algebraic/cl_C_abs_aux.cc' || echo '$(srcdir)/'`complex/algebraic/cl_C_abs_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_abs_aux.Tpo $(DEPDIR)/cl_C_abs_aux.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/algebraic/cl_C_abs_aux.cc' object='cl_C_abs_aux.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_abs_aux.lo `test -f 'complex/algebraic/cl_C_abs_aux.cc' || echo '$(srcdir)/'`complex/algebraic/cl_C_abs_aux.cc cl_C_signum.lo: complex/algebraic/cl_C_signum.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_signum.lo -MD -MP -MF $(DEPDIR)/cl_C_signum.Tpo -c -o cl_C_signum.lo `test -f 'complex/algebraic/cl_C_signum.cc' || echo '$(srcdir)/'`complex/algebraic/cl_C_signum.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_signum.Tpo $(DEPDIR)/cl_C_signum.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/algebraic/cl_C_signum.cc' object='cl_C_signum.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_signum.lo `test -f 'complex/algebraic/cl_C_signum.cc' || echo '$(srcdir)/'`complex/algebraic/cl_C_signum.cc cl_C_sqrt.lo: complex/algebraic/cl_C_sqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_sqrt.lo -MD -MP -MF $(DEPDIR)/cl_C_sqrt.Tpo -c -o cl_C_sqrt.lo `test -f 'complex/algebraic/cl_C_sqrt.cc' || echo '$(srcdir)/'`complex/algebraic/cl_C_sqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_sqrt.Tpo $(DEPDIR)/cl_C_sqrt.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/algebraic/cl_C_sqrt.cc' object='cl_C_sqrt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_sqrt.lo `test -f 'complex/algebraic/cl_C_sqrt.cc' || echo '$(srcdir)/'`complex/algebraic/cl_C_sqrt.cc cl_DF_hypot.lo: complex/algebraic/cl_DF_hypot.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_hypot.lo -MD -MP -MF $(DEPDIR)/cl_DF_hypot.Tpo -c -o cl_DF_hypot.lo `test -f 'complex/algebraic/cl_DF_hypot.cc' || echo '$(srcdir)/'`complex/algebraic/cl_DF_hypot.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_hypot.Tpo $(DEPDIR)/cl_DF_hypot.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/algebraic/cl_DF_hypot.cc' object='cl_DF_hypot.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_hypot.lo `test -f 'complex/algebraic/cl_DF_hypot.cc' || echo '$(srcdir)/'`complex/algebraic/cl_DF_hypot.cc cl_FF_hypot.lo: complex/algebraic/cl_FF_hypot.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_hypot.lo -MD -MP -MF $(DEPDIR)/cl_FF_hypot.Tpo -c -o cl_FF_hypot.lo `test -f 'complex/algebraic/cl_FF_hypot.cc' || echo '$(srcdir)/'`complex/algebraic/cl_FF_hypot.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_hypot.Tpo $(DEPDIR)/cl_FF_hypot.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/algebraic/cl_FF_hypot.cc' object='cl_FF_hypot.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_hypot.lo `test -f 'complex/algebraic/cl_FF_hypot.cc' || echo '$(srcdir)/'`complex/algebraic/cl_FF_hypot.cc cl_LF_hypot.lo: complex/algebraic/cl_LF_hypot.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_hypot.lo -MD -MP -MF $(DEPDIR)/cl_LF_hypot.Tpo -c -o cl_LF_hypot.lo `test -f 'complex/algebraic/cl_LF_hypot.cc' || echo '$(srcdir)/'`complex/algebraic/cl_LF_hypot.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_hypot.Tpo $(DEPDIR)/cl_LF_hypot.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/algebraic/cl_LF_hypot.cc' object='cl_LF_hypot.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_hypot.lo `test -f 'complex/algebraic/cl_LF_hypot.cc' || echo '$(srcdir)/'`complex/algebraic/cl_LF_hypot.cc cl_R_hypot.lo: complex/algebraic/cl_R_hypot.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_hypot.lo -MD -MP -MF $(DEPDIR)/cl_R_hypot.Tpo -c -o cl_R_hypot.lo `test -f 'complex/algebraic/cl_R_hypot.cc' || echo '$(srcdir)/'`complex/algebraic/cl_R_hypot.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_hypot.Tpo $(DEPDIR)/cl_R_hypot.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/algebraic/cl_R_hypot.cc' object='cl_R_hypot.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_hypot.lo `test -f 'complex/algebraic/cl_R_hypot.cc' || echo '$(srcdir)/'`complex/algebraic/cl_R_hypot.cc cl_SF_hypot.lo: complex/algebraic/cl_SF_hypot.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_hypot.lo -MD -MP -MF $(DEPDIR)/cl_SF_hypot.Tpo -c -o cl_SF_hypot.lo `test -f 'complex/algebraic/cl_SF_hypot.cc' || echo '$(srcdir)/'`complex/algebraic/cl_SF_hypot.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_hypot.Tpo $(DEPDIR)/cl_SF_hypot.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/algebraic/cl_SF_hypot.cc' object='cl_SF_hypot.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_hypot.lo `test -f 'complex/algebraic/cl_SF_hypot.cc' || echo '$(srcdir)/'`complex/algebraic/cl_SF_hypot.cc cl_C_equal.lo: complex/elem/cl_C_equal.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_equal.lo -MD -MP -MF $(DEPDIR)/cl_C_equal.Tpo -c -o cl_C_equal.lo `test -f 'complex/elem/cl_C_equal.cc' || echo '$(srcdir)/'`complex/elem/cl_C_equal.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_equal.Tpo $(DEPDIR)/cl_C_equal.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/elem/cl_C_equal.cc' object='cl_C_equal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_equal.lo `test -f 'complex/elem/cl_C_equal.cc' || echo '$(srcdir)/'`complex/elem/cl_C_equal.cc cl_C_from_R_R_complex.lo: complex/elem/cl_C_from_R_R_complex.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_from_R_R_complex.lo -MD -MP -MF $(DEPDIR)/cl_C_from_R_R_complex.Tpo -c -o cl_C_from_R_R_complex.lo `test -f 'complex/elem/cl_C_from_R_R_complex.cc' || echo '$(srcdir)/'`complex/elem/cl_C_from_R_R_complex.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_from_R_R_complex.Tpo $(DEPDIR)/cl_C_from_R_R_complex.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/elem/cl_C_from_R_R_complex.cc' object='cl_C_from_R_R_complex.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_from_R_R_complex.lo `test -f 'complex/elem/cl_C_from_R_R_complex.cc' || echo '$(srcdir)/'`complex/elem/cl_C_from_R_R_complex.cc cl_C_from_R_R_complex1.lo: complex/elem/cl_C_from_R_R_complex1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_from_R_R_complex1.lo -MD -MP -MF $(DEPDIR)/cl_C_from_R_R_complex1.Tpo -c -o cl_C_from_R_R_complex1.lo `test -f 'complex/elem/cl_C_from_R_R_complex1.cc' || echo '$(srcdir)/'`complex/elem/cl_C_from_R_R_complex1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_from_R_R_complex1.Tpo $(DEPDIR)/cl_C_from_R_R_complex1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/elem/cl_C_from_R_R_complex1.cc' object='cl_C_from_R_R_complex1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_from_R_R_complex1.lo `test -f 'complex/elem/cl_C_from_R_R_complex1.cc' || echo '$(srcdir)/'`complex/elem/cl_C_from_R_R_complex1.cc cl_C_imagpart.lo: complex/elem/cl_C_imagpart.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_imagpart.lo -MD -MP -MF $(DEPDIR)/cl_C_imagpart.Tpo -c -o cl_C_imagpart.lo `test -f 'complex/elem/cl_C_imagpart.cc' || echo '$(srcdir)/'`complex/elem/cl_C_imagpart.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_imagpart.Tpo $(DEPDIR)/cl_C_imagpart.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/elem/cl_C_imagpart.cc' object='cl_C_imagpart.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_imagpart.lo `test -f 'complex/elem/cl_C_imagpart.cc' || echo '$(srcdir)/'`complex/elem/cl_C_imagpart.cc cl_C_minus.lo: complex/elem/cl_C_minus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_minus.lo -MD -MP -MF $(DEPDIR)/cl_C_minus.Tpo -c -o cl_C_minus.lo `test -f 'complex/elem/cl_C_minus.cc' || echo '$(srcdir)/'`complex/elem/cl_C_minus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_minus.Tpo $(DEPDIR)/cl_C_minus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/elem/cl_C_minus.cc' object='cl_C_minus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_minus.lo `test -f 'complex/elem/cl_C_minus.cc' || echo '$(srcdir)/'`complex/elem/cl_C_minus.cc cl_C_minus1.lo: complex/elem/cl_C_minus1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_minus1.lo -MD -MP -MF $(DEPDIR)/cl_C_minus1.Tpo -c -o cl_C_minus1.lo `test -f 'complex/elem/cl_C_minus1.cc' || echo '$(srcdir)/'`complex/elem/cl_C_minus1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_minus1.Tpo $(DEPDIR)/cl_C_minus1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/elem/cl_C_minus1.cc' object='cl_C_minus1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_minus1.lo `test -f 'complex/elem/cl_C_minus1.cc' || echo '$(srcdir)/'`complex/elem/cl_C_minus1.cc cl_C_mul.lo: complex/elem/cl_C_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_mul.lo -MD -MP -MF $(DEPDIR)/cl_C_mul.Tpo -c -o cl_C_mul.lo `test -f 'complex/elem/cl_C_mul.cc' || echo '$(srcdir)/'`complex/elem/cl_C_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_mul.Tpo $(DEPDIR)/cl_C_mul.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/elem/cl_C_mul.cc' object='cl_C_mul.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_mul.lo `test -f 'complex/elem/cl_C_mul.cc' || echo '$(srcdir)/'`complex/elem/cl_C_mul.cc cl_C_plus.lo: complex/elem/cl_C_plus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_plus.lo -MD -MP -MF $(DEPDIR)/cl_C_plus.Tpo -c -o cl_C_plus.lo `test -f 'complex/elem/cl_C_plus.cc' || echo '$(srcdir)/'`complex/elem/cl_C_plus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_plus.Tpo $(DEPDIR)/cl_C_plus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/elem/cl_C_plus.cc' object='cl_C_plus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_plus.lo `test -f 'complex/elem/cl_C_plus.cc' || echo '$(srcdir)/'`complex/elem/cl_C_plus.cc cl_C_plus1.lo: complex/elem/cl_C_plus1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_plus1.lo -MD -MP -MF $(DEPDIR)/cl_C_plus1.Tpo -c -o cl_C_plus1.lo `test -f 'complex/elem/cl_C_plus1.cc' || echo '$(srcdir)/'`complex/elem/cl_C_plus1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_plus1.Tpo $(DEPDIR)/cl_C_plus1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/elem/cl_C_plus1.cc' object='cl_C_plus1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_plus1.lo `test -f 'complex/elem/cl_C_plus1.cc' || echo '$(srcdir)/'`complex/elem/cl_C_plus1.cc cl_C_realpart.lo: complex/elem/cl_C_realpart.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_realpart.lo -MD -MP -MF $(DEPDIR)/cl_C_realpart.Tpo -c -o cl_C_realpart.lo `test -f 'complex/elem/cl_C_realpart.cc' || echo '$(srcdir)/'`complex/elem/cl_C_realpart.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_realpart.Tpo $(DEPDIR)/cl_C_realpart.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/elem/cl_C_realpart.cc' object='cl_C_realpart.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_realpart.lo `test -f 'complex/elem/cl_C_realpart.cc' || echo '$(srcdir)/'`complex/elem/cl_C_realpart.cc cl_C_square.lo: complex/elem/cl_C_square.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_square.lo -MD -MP -MF $(DEPDIR)/cl_C_square.Tpo -c -o cl_C_square.lo `test -f 'complex/elem/cl_C_square.cc' || echo '$(srcdir)/'`complex/elem/cl_C_square.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_square.Tpo $(DEPDIR)/cl_C_square.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/elem/cl_C_square.cc' object='cl_C_square.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_square.lo `test -f 'complex/elem/cl_C_square.cc' || echo '$(srcdir)/'`complex/elem/cl_C_square.cc cl_C_uminus.lo: complex/elem/cl_C_uminus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_uminus.lo -MD -MP -MF $(DEPDIR)/cl_C_uminus.Tpo -c -o cl_C_uminus.lo `test -f 'complex/elem/cl_C_uminus.cc' || echo '$(srcdir)/'`complex/elem/cl_C_uminus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_uminus.Tpo $(DEPDIR)/cl_C_uminus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/elem/cl_C_uminus.cc' object='cl_C_uminus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_uminus.lo `test -f 'complex/elem/cl_C_uminus.cc' || echo '$(srcdir)/'`complex/elem/cl_C_uminus.cc cl_C_zerop.lo: complex/elem/cl_C_zerop.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_zerop.lo -MD -MP -MF $(DEPDIR)/cl_C_zerop.Tpo -c -o cl_C_zerop.lo `test -f 'complex/elem/cl_C_zerop.cc' || echo '$(srcdir)/'`complex/elem/cl_C_zerop.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_zerop.Tpo $(DEPDIR)/cl_C_zerop.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/elem/cl_C_zerop.cc' object='cl_C_zerop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_zerop.lo `test -f 'complex/elem/cl_C_zerop.cc' || echo '$(srcdir)/'`complex/elem/cl_C_zerop.cc cl_C_DF_recip.lo: complex/elem/division/cl_C_DF_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_DF_recip.lo -MD -MP -MF $(DEPDIR)/cl_C_DF_recip.Tpo -c -o cl_C_DF_recip.lo `test -f 'complex/elem/division/cl_C_DF_recip.cc' || echo '$(srcdir)/'`complex/elem/division/cl_C_DF_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_DF_recip.Tpo $(DEPDIR)/cl_C_DF_recip.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/elem/division/cl_C_DF_recip.cc' object='cl_C_DF_recip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_DF_recip.lo `test -f 'complex/elem/division/cl_C_DF_recip.cc' || echo '$(srcdir)/'`complex/elem/division/cl_C_DF_recip.cc cl_C_FF_recip.lo: complex/elem/division/cl_C_FF_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_FF_recip.lo -MD -MP -MF $(DEPDIR)/cl_C_FF_recip.Tpo -c -o cl_C_FF_recip.lo `test -f 'complex/elem/division/cl_C_FF_recip.cc' || echo '$(srcdir)/'`complex/elem/division/cl_C_FF_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_FF_recip.Tpo $(DEPDIR)/cl_C_FF_recip.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/elem/division/cl_C_FF_recip.cc' object='cl_C_FF_recip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_FF_recip.lo `test -f 'complex/elem/division/cl_C_FF_recip.cc' || echo '$(srcdir)/'`complex/elem/division/cl_C_FF_recip.cc cl_C_LF_recip.lo: complex/elem/division/cl_C_LF_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_LF_recip.lo -MD -MP -MF $(DEPDIR)/cl_C_LF_recip.Tpo -c -o cl_C_LF_recip.lo `test -f 'complex/elem/division/cl_C_LF_recip.cc' || echo '$(srcdir)/'`complex/elem/division/cl_C_LF_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_LF_recip.Tpo $(DEPDIR)/cl_C_LF_recip.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/elem/division/cl_C_LF_recip.cc' object='cl_C_LF_recip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_LF_recip.lo `test -f 'complex/elem/division/cl_C_LF_recip.cc' || echo '$(srcdir)/'`complex/elem/division/cl_C_LF_recip.cc cl_C_SF_recip.lo: complex/elem/division/cl_C_SF_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_SF_recip.lo -MD -MP -MF $(DEPDIR)/cl_C_SF_recip.Tpo -c -o cl_C_SF_recip.lo `test -f 'complex/elem/division/cl_C_SF_recip.cc' || echo '$(srcdir)/'`complex/elem/division/cl_C_SF_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_SF_recip.Tpo $(DEPDIR)/cl_C_SF_recip.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/elem/division/cl_C_SF_recip.cc' object='cl_C_SF_recip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_SF_recip.lo `test -f 'complex/elem/division/cl_C_SF_recip.cc' || echo '$(srcdir)/'`complex/elem/division/cl_C_SF_recip.cc cl_C_div.lo: complex/elem/division/cl_C_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_div.lo -MD -MP -MF $(DEPDIR)/cl_C_div.Tpo -c -o cl_C_div.lo `test -f 'complex/elem/division/cl_C_div.cc' || echo '$(srcdir)/'`complex/elem/division/cl_C_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_div.Tpo $(DEPDIR)/cl_C_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/elem/division/cl_C_div.cc' object='cl_C_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_div.lo `test -f 'complex/elem/division/cl_C_div.cc' || echo '$(srcdir)/'`complex/elem/division/cl_C_div.cc cl_C_recip.lo: complex/elem/division/cl_C_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_recip.lo -MD -MP -MF $(DEPDIR)/cl_C_recip.Tpo -c -o cl_C_recip.lo `test -f 'complex/elem/division/cl_C_recip.cc' || echo '$(srcdir)/'`complex/elem/division/cl_C_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_recip.Tpo $(DEPDIR)/cl_C_recip.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/elem/division/cl_C_recip.cc' object='cl_C_recip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_recip.lo `test -f 'complex/elem/division/cl_C_recip.cc' || echo '$(srcdir)/'`complex/elem/division/cl_C_recip.cc cl_N_from_string.lo: complex/input/cl_N_from_string.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_N_from_string.lo -MD -MP -MF $(DEPDIR)/cl_N_from_string.Tpo -c -o cl_N_from_string.lo `test -f 'complex/input/cl_N_from_string.cc' || echo '$(srcdir)/'`complex/input/cl_N_from_string.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_N_from_string.Tpo $(DEPDIR)/cl_N_from_string.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/input/cl_N_from_string.cc' object='cl_N_from_string.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_N_from_string.lo `test -f 'complex/input/cl_N_from_string.cc' || echo '$(srcdir)/'`complex/input/cl_N_from_string.cc cl_N_read.lo: complex/input/cl_N_read.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_N_read.lo -MD -MP -MF $(DEPDIR)/cl_N_read.Tpo -c -o cl_N_read.lo `test -f 'complex/input/cl_N_read.cc' || echo '$(srcdir)/'`complex/input/cl_N_read.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_N_read.Tpo $(DEPDIR)/cl_N_read.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/input/cl_N_read.cc' object='cl_N_read.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_N_read.lo `test -f 'complex/input/cl_N_read.cc' || echo '$(srcdir)/'`complex/input/cl_N_read.cc cl_N_read_stream.lo: complex/input/cl_N_read_stream.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_N_read_stream.lo -MD -MP -MF $(DEPDIR)/cl_N_read_stream.Tpo -c -o cl_N_read_stream.lo `test -f 'complex/input/cl_N_read_stream.cc' || echo '$(srcdir)/'`complex/input/cl_N_read_stream.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_N_read_stream.Tpo $(DEPDIR)/cl_N_read_stream.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/input/cl_N_read_stream.cc' object='cl_N_read_stream.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_N_read_stream.lo `test -f 'complex/input/cl_N_read_stream.cc' || echo '$(srcdir)/'`complex/input/cl_N_read_stream.cc cl_C_class.lo: complex/misc/cl_C_class.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_class.lo -MD -MP -MF $(DEPDIR)/cl_C_class.Tpo -c -o cl_C_class.lo `test -f 'complex/misc/cl_C_class.cc' || echo '$(srcdir)/'`complex/misc/cl_C_class.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_class.Tpo $(DEPDIR)/cl_C_class.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/misc/cl_C_class.cc' object='cl_C_class.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_class.lo `test -f 'complex/misc/cl_C_class.cc' || echo '$(srcdir)/'`complex/misc/cl_C_class.cc cl_C_conjugate.lo: complex/misc/cl_C_conjugate.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_conjugate.lo -MD -MP -MF $(DEPDIR)/cl_C_conjugate.Tpo -c -o cl_C_conjugate.lo `test -f 'complex/misc/cl_C_conjugate.cc' || echo '$(srcdir)/'`complex/misc/cl_C_conjugate.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_conjugate.Tpo $(DEPDIR)/cl_C_conjugate.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/misc/cl_C_conjugate.cc' object='cl_C_conjugate.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_conjugate.lo `test -f 'complex/misc/cl_C_conjugate.cc' || echo '$(srcdir)/'`complex/misc/cl_C_conjugate.cc cl_C_debug.lo: complex/misc/cl_C_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_debug.lo -MD -MP -MF $(DEPDIR)/cl_C_debug.Tpo -c -o cl_C_debug.lo `test -f 'complex/misc/cl_C_debug.cc' || echo '$(srcdir)/'`complex/misc/cl_C_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_debug.Tpo $(DEPDIR)/cl_C_debug.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/misc/cl_C_debug.cc' object='cl_C_debug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_debug.lo `test -f 'complex/misc/cl_C_debug.cc' || echo '$(srcdir)/'`complex/misc/cl_C_debug.cc cl_C_eqhashcode.lo: complex/misc/cl_C_eqhashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_eqhashcode.lo -MD -MP -MF $(DEPDIR)/cl_C_eqhashcode.Tpo -c -o cl_C_eqhashcode.lo `test -f 'complex/misc/cl_C_eqhashcode.cc' || echo '$(srcdir)/'`complex/misc/cl_C_eqhashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_eqhashcode.Tpo $(DEPDIR)/cl_C_eqhashcode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/misc/cl_C_eqhashcode.cc' object='cl_C_eqhashcode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_eqhashcode.lo `test -f 'complex/misc/cl_C_eqhashcode.cc' || echo '$(srcdir)/'`complex/misc/cl_C_eqhashcode.cc cl_C_expt.lo: complex/misc/cl_C_expt.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_expt.lo -MD -MP -MF $(DEPDIR)/cl_C_expt.Tpo -c -o cl_C_expt.lo `test -f 'complex/misc/cl_C_expt.cc' || echo '$(srcdir)/'`complex/misc/cl_C_expt.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_expt.Tpo $(DEPDIR)/cl_C_expt.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/misc/cl_C_expt.cc' object='cl_C_expt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_expt.lo `test -f 'complex/misc/cl_C_expt.cc' || echo '$(srcdir)/'`complex/misc/cl_C_expt.cc cl_C_expt_I.lo: complex/misc/cl_C_expt_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_expt_I.lo -MD -MP -MF $(DEPDIR)/cl_C_expt_I.Tpo -c -o cl_C_expt_I.lo `test -f 'complex/misc/cl_C_expt_I.cc' || echo '$(srcdir)/'`complex/misc/cl_C_expt_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_expt_I.Tpo $(DEPDIR)/cl_C_expt_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/misc/cl_C_expt_I.cc' object='cl_C_expt_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_expt_I.lo `test -f 'complex/misc/cl_C_expt_I.cc' || echo '$(srcdir)/'`complex/misc/cl_C_expt_I.cc cl_N_as.lo: complex/misc/cl_N_as.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_N_as.lo -MD -MP -MF $(DEPDIR)/cl_N_as.Tpo -c -o cl_N_as.lo `test -f 'complex/misc/cl_N_as.cc' || echo '$(srcdir)/'`complex/misc/cl_N_as.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_N_as.Tpo $(DEPDIR)/cl_N_as.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/misc/cl_N_as.cc' object='cl_N_as.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_N_as.lo `test -f 'complex/misc/cl_N_as.cc' || echo '$(srcdir)/'`complex/misc/cl_N_as.cc cl_N_aprint.lo: complex/output/cl_N_aprint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_N_aprint.lo -MD -MP -MF $(DEPDIR)/cl_N_aprint.Tpo -c -o cl_N_aprint.lo `test -f 'complex/output/cl_N_aprint.cc' || echo '$(srcdir)/'`complex/output/cl_N_aprint.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_N_aprint.Tpo $(DEPDIR)/cl_N_aprint.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/output/cl_N_aprint.cc' object='cl_N_aprint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_N_aprint.lo `test -f 'complex/output/cl_N_aprint.cc' || echo '$(srcdir)/'`complex/output/cl_N_aprint.cc cl_N_bprint.lo: complex/output/cl_N_bprint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_N_bprint.lo -MD -MP -MF $(DEPDIR)/cl_N_bprint.Tpo -c -o cl_N_bprint.lo `test -f 'complex/output/cl_N_bprint.cc' || echo '$(srcdir)/'`complex/output/cl_N_bprint.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_N_bprint.Tpo $(DEPDIR)/cl_N_bprint.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/output/cl_N_bprint.cc' object='cl_N_bprint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_N_bprint.lo `test -f 'complex/output/cl_N_bprint.cc' || echo '$(srcdir)/'`complex/output/cl_N_bprint.cc cl_C_ring.lo: complex/ring/cl_C_ring.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_ring.lo -MD -MP -MF $(DEPDIR)/cl_C_ring.Tpo -c -o cl_C_ring.lo `test -f 'complex/ring/cl_C_ring.cc' || echo '$(srcdir)/'`complex/ring/cl_C_ring.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_ring.Tpo $(DEPDIR)/cl_C_ring.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/ring/cl_C_ring.cc' object='cl_C_ring.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_ring.lo `test -f 'complex/ring/cl_C_ring.cc' || echo '$(srcdir)/'`complex/ring/cl_C_ring.cc cl_C_acos.lo: complex/transcendental/cl_C_acos.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_acos.lo -MD -MP -MF $(DEPDIR)/cl_C_acos.Tpo -c -o cl_C_acos.lo `test -f 'complex/transcendental/cl_C_acos.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_acos.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_acos.Tpo $(DEPDIR)/cl_C_acos.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/transcendental/cl_C_acos.cc' object='cl_C_acos.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_acos.lo `test -f 'complex/transcendental/cl_C_acos.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_acos.cc cl_C_acosh.lo: complex/transcendental/cl_C_acosh.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_acosh.lo -MD -MP -MF $(DEPDIR)/cl_C_acosh.Tpo -c -o cl_C_acosh.lo `test -f 'complex/transcendental/cl_C_acosh.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_acosh.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_acosh.Tpo $(DEPDIR)/cl_C_acosh.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/transcendental/cl_C_acosh.cc' object='cl_C_acosh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_acosh.lo `test -f 'complex/transcendental/cl_C_acosh.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_acosh.cc cl_C_asin.lo: complex/transcendental/cl_C_asin.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_asin.lo -MD -MP -MF $(DEPDIR)/cl_C_asin.Tpo -c -o cl_C_asin.lo `test -f 'complex/transcendental/cl_C_asin.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_asin.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_asin.Tpo $(DEPDIR)/cl_C_asin.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/transcendental/cl_C_asin.cc' object='cl_C_asin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_asin.lo `test -f 'complex/transcendental/cl_C_asin.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_asin.cc cl_C_asinh.lo: complex/transcendental/cl_C_asinh.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_asinh.lo -MD -MP -MF $(DEPDIR)/cl_C_asinh.Tpo -c -o cl_C_asinh.lo `test -f 'complex/transcendental/cl_C_asinh.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_asinh.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_asinh.Tpo $(DEPDIR)/cl_C_asinh.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/transcendental/cl_C_asinh.cc' object='cl_C_asinh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_asinh.lo `test -f 'complex/transcendental/cl_C_asinh.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_asinh.cc cl_C_asinh_aux.lo: complex/transcendental/cl_C_asinh_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_asinh_aux.lo -MD -MP -MF $(DEPDIR)/cl_C_asinh_aux.Tpo -c -o cl_C_asinh_aux.lo `test -f 'complex/transcendental/cl_C_asinh_aux.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_asinh_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_asinh_aux.Tpo $(DEPDIR)/cl_C_asinh_aux.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/transcendental/cl_C_asinh_aux.cc' object='cl_C_asinh_aux.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_asinh_aux.lo `test -f 'complex/transcendental/cl_C_asinh_aux.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_asinh_aux.cc cl_C_atan.lo: complex/transcendental/cl_C_atan.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_atan.lo -MD -MP -MF $(DEPDIR)/cl_C_atan.Tpo -c -o cl_C_atan.lo `test -f 'complex/transcendental/cl_C_atan.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_atan.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_atan.Tpo $(DEPDIR)/cl_C_atan.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/transcendental/cl_C_atan.cc' object='cl_C_atan.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_atan.lo `test -f 'complex/transcendental/cl_C_atan.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_atan.cc cl_C_atanh.lo: complex/transcendental/cl_C_atanh.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_atanh.lo -MD -MP -MF $(DEPDIR)/cl_C_atanh.Tpo -c -o cl_C_atanh.lo `test -f 'complex/transcendental/cl_C_atanh.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_atanh.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_atanh.Tpo $(DEPDIR)/cl_C_atanh.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/transcendental/cl_C_atanh.cc' object='cl_C_atanh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_atanh.lo `test -f 'complex/transcendental/cl_C_atanh.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_atanh.cc cl_C_atanh_aux.lo: complex/transcendental/cl_C_atanh_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_atanh_aux.lo -MD -MP -MF $(DEPDIR)/cl_C_atanh_aux.Tpo -c -o cl_C_atanh_aux.lo `test -f 'complex/transcendental/cl_C_atanh_aux.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_atanh_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_atanh_aux.Tpo $(DEPDIR)/cl_C_atanh_aux.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/transcendental/cl_C_atanh_aux.cc' object='cl_C_atanh_aux.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_atanh_aux.lo `test -f 'complex/transcendental/cl_C_atanh_aux.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_atanh_aux.cc cl_C_cis.lo: complex/transcendental/cl_C_cis.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_cis.lo -MD -MP -MF $(DEPDIR)/cl_C_cis.Tpo -c -o cl_C_cis.lo `test -f 'complex/transcendental/cl_C_cis.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_cis.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_cis.Tpo $(DEPDIR)/cl_C_cis.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/transcendental/cl_C_cis.cc' object='cl_C_cis.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_cis.lo `test -f 'complex/transcendental/cl_C_cis.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_cis.cc cl_C_cos.lo: complex/transcendental/cl_C_cos.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_cos.lo -MD -MP -MF $(DEPDIR)/cl_C_cos.Tpo -c -o cl_C_cos.lo `test -f 'complex/transcendental/cl_C_cos.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_cos.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_cos.Tpo $(DEPDIR)/cl_C_cos.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/transcendental/cl_C_cos.cc' object='cl_C_cos.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_cos.lo `test -f 'complex/transcendental/cl_C_cos.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_cos.cc cl_C_cosh.lo: complex/transcendental/cl_C_cosh.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_cosh.lo -MD -MP -MF $(DEPDIR)/cl_C_cosh.Tpo -c -o cl_C_cosh.lo `test -f 'complex/transcendental/cl_C_cosh.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_cosh.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_cosh.Tpo $(DEPDIR)/cl_C_cosh.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/transcendental/cl_C_cosh.cc' object='cl_C_cosh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_cosh.lo `test -f 'complex/transcendental/cl_C_cosh.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_cosh.cc cl_C_exp.lo: complex/transcendental/cl_C_exp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_exp.lo -MD -MP -MF $(DEPDIR)/cl_C_exp.Tpo -c -o cl_C_exp.lo `test -f 'complex/transcendental/cl_C_exp.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_exp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_exp.Tpo $(DEPDIR)/cl_C_exp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/transcendental/cl_C_exp.cc' object='cl_C_exp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_exp.lo `test -f 'complex/transcendental/cl_C_exp.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_exp.cc cl_C_expt_C.lo: complex/transcendental/cl_C_expt_C.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_expt_C.lo -MD -MP -MF $(DEPDIR)/cl_C_expt_C.Tpo -c -o cl_C_expt_C.lo `test -f 'complex/transcendental/cl_C_expt_C.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_expt_C.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_expt_C.Tpo $(DEPDIR)/cl_C_expt_C.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/transcendental/cl_C_expt_C.cc' object='cl_C_expt_C.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_expt_C.lo `test -f 'complex/transcendental/cl_C_expt_C.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_expt_C.cc cl_C_log.lo: complex/transcendental/cl_C_log.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_log.lo -MD -MP -MF $(DEPDIR)/cl_C_log.Tpo -c -o cl_C_log.lo `test -f 'complex/transcendental/cl_C_log.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_log.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_log.Tpo $(DEPDIR)/cl_C_log.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/transcendental/cl_C_log.cc' object='cl_C_log.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_log.lo `test -f 'complex/transcendental/cl_C_log.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_log.cc cl_C_log2.lo: complex/transcendental/cl_C_log2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_log2.lo -MD -MP -MF $(DEPDIR)/cl_C_log2.Tpo -c -o cl_C_log2.lo `test -f 'complex/transcendental/cl_C_log2.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_log2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_log2.Tpo $(DEPDIR)/cl_C_log2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/transcendental/cl_C_log2.cc' object='cl_C_log2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_log2.lo `test -f 'complex/transcendental/cl_C_log2.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_log2.cc cl_C_phase.lo: complex/transcendental/cl_C_phase.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_phase.lo -MD -MP -MF $(DEPDIR)/cl_C_phase.Tpo -c -o cl_C_phase.lo `test -f 'complex/transcendental/cl_C_phase.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_phase.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_phase.Tpo $(DEPDIR)/cl_C_phase.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/transcendental/cl_C_phase.cc' object='cl_C_phase.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_phase.lo `test -f 'complex/transcendental/cl_C_phase.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_phase.cc cl_C_sin.lo: complex/transcendental/cl_C_sin.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_sin.lo -MD -MP -MF $(DEPDIR)/cl_C_sin.Tpo -c -o cl_C_sin.lo `test -f 'complex/transcendental/cl_C_sin.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_sin.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_sin.Tpo $(DEPDIR)/cl_C_sin.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/transcendental/cl_C_sin.cc' object='cl_C_sin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_sin.lo `test -f 'complex/transcendental/cl_C_sin.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_sin.cc cl_C_sinh.lo: complex/transcendental/cl_C_sinh.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_sinh.lo -MD -MP -MF $(DEPDIR)/cl_C_sinh.Tpo -c -o cl_C_sinh.lo `test -f 'complex/transcendental/cl_C_sinh.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_sinh.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_sinh.Tpo $(DEPDIR)/cl_C_sinh.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/transcendental/cl_C_sinh.cc' object='cl_C_sinh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_sinh.lo `test -f 'complex/transcendental/cl_C_sinh.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_sinh.cc cl_C_tan.lo: complex/transcendental/cl_C_tan.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_tan.lo -MD -MP -MF $(DEPDIR)/cl_C_tan.Tpo -c -o cl_C_tan.lo `test -f 'complex/transcendental/cl_C_tan.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_tan.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_tan.Tpo $(DEPDIR)/cl_C_tan.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/transcendental/cl_C_tan.cc' object='cl_C_tan.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_tan.lo `test -f 'complex/transcendental/cl_C_tan.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_tan.cc cl_C_tanh.lo: complex/transcendental/cl_C_tanh.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_C_tanh.lo -MD -MP -MF $(DEPDIR)/cl_C_tanh.Tpo -c -o cl_C_tanh.lo `test -f 'complex/transcendental/cl_C_tanh.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_tanh.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_C_tanh.Tpo $(DEPDIR)/cl_C_tanh.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/transcendental/cl_C_tanh.cc' object='cl_C_tanh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_C_tanh.lo `test -f 'complex/transcendental/cl_C_tanh.cc' || echo '$(srcdir)/'`complex/transcendental/cl_C_tanh.cc cl_R_cis.lo: complex/transcendental/cl_R_cis.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_cis.lo -MD -MP -MF $(DEPDIR)/cl_R_cis.Tpo -c -o cl_R_cis.lo `test -f 'complex/transcendental/cl_R_cis.cc' || echo '$(srcdir)/'`complex/transcendental/cl_R_cis.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_cis.Tpo $(DEPDIR)/cl_R_cis.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='complex/transcendental/cl_R_cis.cc' object='cl_R_cis.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_cis.lo `test -f 'complex/transcendental/cl_R_cis.cc' || echo '$(srcdir)/'`complex/transcendental/cl_R_cis.cc cl_F_sqrt.lo: float/algebraic/cl_F_sqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_sqrt.lo -MD -MP -MF $(DEPDIR)/cl_F_sqrt.Tpo -c -o cl_F_sqrt.lo `test -f 'float/algebraic/cl_F_sqrt.cc' || echo '$(srcdir)/'`float/algebraic/cl_F_sqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_sqrt.Tpo $(DEPDIR)/cl_F_sqrt.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/algebraic/cl_F_sqrt.cc' object='cl_F_sqrt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_sqrt.lo `test -f 'float/algebraic/cl_F_sqrt.cc' || echo '$(srcdir)/'`float/algebraic/cl_F_sqrt.cc cl_F_globals.lo: float/base/cl_F_globals.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_globals.lo -MD -MP -MF $(DEPDIR)/cl_F_globals.Tpo -c -o cl_F_globals.lo `test -f 'float/base/cl_F_globals.cc' || echo '$(srcdir)/'`float/base/cl_F_globals.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_globals.Tpo $(DEPDIR)/cl_F_globals.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/base/cl_F_globals.cc' object='cl_F_globals.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_globals.lo `test -f 'float/base/cl_F_globals.cc' || echo '$(srcdir)/'`float/base/cl_F_globals.cc cl_F_nan_exception.lo: float/base/cl_F_nan_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_nan_exception.lo -MD -MP -MF $(DEPDIR)/cl_F_nan_exception.Tpo -c -o cl_F_nan_exception.lo `test -f 'float/base/cl_F_nan_exception.cc' || echo '$(srcdir)/'`float/base/cl_F_nan_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_nan_exception.Tpo $(DEPDIR)/cl_F_nan_exception.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/base/cl_F_nan_exception.cc' object='cl_F_nan_exception.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_nan_exception.lo `test -f 'float/base/cl_F_nan_exception.cc' || echo '$(srcdir)/'`float/base/cl_F_nan_exception.cc cl_F_overflow_exception.lo: float/base/cl_F_overflow_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_overflow_exception.lo -MD -MP -MF $(DEPDIR)/cl_F_overflow_exception.Tpo -c -o cl_F_overflow_exception.lo `test -f 'float/base/cl_F_overflow_exception.cc' || echo '$(srcdir)/'`float/base/cl_F_overflow_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_overflow_exception.Tpo $(DEPDIR)/cl_F_overflow_exception.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/base/cl_F_overflow_exception.cc' object='cl_F_overflow_exception.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_overflow_exception.lo `test -f 'float/base/cl_F_overflow_exception.cc' || echo '$(srcdir)/'`float/base/cl_F_overflow_exception.cc cl_F_underflow_exception.lo: float/base/cl_F_underflow_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_underflow_exception.lo -MD -MP -MF $(DEPDIR)/cl_F_underflow_exception.Tpo -c -o cl_F_underflow_exception.lo `test -f 'float/base/cl_F_underflow_exception.cc' || echo '$(srcdir)/'`float/base/cl_F_underflow_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_underflow_exception.Tpo $(DEPDIR)/cl_F_underflow_exception.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/base/cl_F_underflow_exception.cc' object='cl_F_underflow_exception.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_underflow_exception.lo `test -f 'float/base/cl_F_underflow_exception.cc' || echo '$(srcdir)/'`float/base/cl_F_underflow_exception.cc cl_DF_to_FF.lo: float/conv/cl_DF_to_FF.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_to_FF.lo -MD -MP -MF $(DEPDIR)/cl_DF_to_FF.Tpo -c -o cl_DF_to_FF.lo `test -f 'float/conv/cl_DF_to_FF.cc' || echo '$(srcdir)/'`float/conv/cl_DF_to_FF.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_to_FF.Tpo $(DEPDIR)/cl_DF_to_FF.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_DF_to_FF.cc' object='cl_DF_to_FF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_to_FF.lo `test -f 'float/conv/cl_DF_to_FF.cc' || echo '$(srcdir)/'`float/conv/cl_DF_to_FF.cc cl_DF_to_LF.lo: float/conv/cl_DF_to_LF.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_to_LF.lo -MD -MP -MF $(DEPDIR)/cl_DF_to_LF.Tpo -c -o cl_DF_to_LF.lo `test -f 'float/conv/cl_DF_to_LF.cc' || echo '$(srcdir)/'`float/conv/cl_DF_to_LF.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_to_LF.Tpo $(DEPDIR)/cl_DF_to_LF.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_DF_to_LF.cc' object='cl_DF_to_LF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_to_LF.lo `test -f 'float/conv/cl_DF_to_LF.cc' || echo '$(srcdir)/'`float/conv/cl_DF_to_LF.cc cl_DF_to_SF.lo: float/conv/cl_DF_to_SF.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_to_SF.lo -MD -MP -MF $(DEPDIR)/cl_DF_to_SF.Tpo -c -o cl_DF_to_SF.lo `test -f 'float/conv/cl_DF_to_SF.cc' || echo '$(srcdir)/'`float/conv/cl_DF_to_SF.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_to_SF.Tpo $(DEPDIR)/cl_DF_to_SF.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_DF_to_SF.cc' object='cl_DF_to_SF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_to_SF.lo `test -f 'float/conv/cl_DF_to_SF.cc' || echo '$(srcdir)/'`float/conv/cl_DF_to_SF.cc cl_DF_to_double.lo: float/conv/cl_DF_to_double.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_to_double.lo -MD -MP -MF $(DEPDIR)/cl_DF_to_double.Tpo -c -o cl_DF_to_double.lo `test -f 'float/conv/cl_DF_to_double.cc' || echo '$(srcdir)/'`float/conv/cl_DF_to_double.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_to_double.Tpo $(DEPDIR)/cl_DF_to_double.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_DF_to_double.cc' object='cl_DF_to_double.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_to_double.lo `test -f 'float/conv/cl_DF_to_double.cc' || echo '$(srcdir)/'`float/conv/cl_DF_to_double.cc cl_DF_to_float.lo: float/conv/cl_DF_to_float.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_to_float.lo -MD -MP -MF $(DEPDIR)/cl_DF_to_float.Tpo -c -o cl_DF_to_float.lo `test -f 'float/conv/cl_DF_to_float.cc' || echo '$(srcdir)/'`float/conv/cl_DF_to_float.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_to_float.Tpo $(DEPDIR)/cl_DF_to_float.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_DF_to_float.cc' object='cl_DF_to_float.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_to_float.lo `test -f 'float/conv/cl_DF_to_float.cc' || echo '$(srcdir)/'`float/conv/cl_DF_to_float.cc cl_FF_to_DF.lo: float/conv/cl_FF_to_DF.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_to_DF.lo -MD -MP -MF $(DEPDIR)/cl_FF_to_DF.Tpo -c -o cl_FF_to_DF.lo `test -f 'float/conv/cl_FF_to_DF.cc' || echo '$(srcdir)/'`float/conv/cl_FF_to_DF.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_to_DF.Tpo $(DEPDIR)/cl_FF_to_DF.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_FF_to_DF.cc' object='cl_FF_to_DF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_to_DF.lo `test -f 'float/conv/cl_FF_to_DF.cc' || echo '$(srcdir)/'`float/conv/cl_FF_to_DF.cc cl_FF_to_LF.lo: float/conv/cl_FF_to_LF.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_to_LF.lo -MD -MP -MF $(DEPDIR)/cl_FF_to_LF.Tpo -c -o cl_FF_to_LF.lo `test -f 'float/conv/cl_FF_to_LF.cc' || echo '$(srcdir)/'`float/conv/cl_FF_to_LF.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_to_LF.Tpo $(DEPDIR)/cl_FF_to_LF.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_FF_to_LF.cc' object='cl_FF_to_LF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_to_LF.lo `test -f 'float/conv/cl_FF_to_LF.cc' || echo '$(srcdir)/'`float/conv/cl_FF_to_LF.cc cl_FF_to_SF.lo: float/conv/cl_FF_to_SF.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_to_SF.lo -MD -MP -MF $(DEPDIR)/cl_FF_to_SF.Tpo -c -o cl_FF_to_SF.lo `test -f 'float/conv/cl_FF_to_SF.cc' || echo '$(srcdir)/'`float/conv/cl_FF_to_SF.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_to_SF.Tpo $(DEPDIR)/cl_FF_to_SF.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_FF_to_SF.cc' object='cl_FF_to_SF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_to_SF.lo `test -f 'float/conv/cl_FF_to_SF.cc' || echo '$(srcdir)/'`float/conv/cl_FF_to_SF.cc cl_FF_to_double.lo: float/conv/cl_FF_to_double.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_to_double.lo -MD -MP -MF $(DEPDIR)/cl_FF_to_double.Tpo -c -o cl_FF_to_double.lo `test -f 'float/conv/cl_FF_to_double.cc' || echo '$(srcdir)/'`float/conv/cl_FF_to_double.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_to_double.Tpo $(DEPDIR)/cl_FF_to_double.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_FF_to_double.cc' object='cl_FF_to_double.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_to_double.lo `test -f 'float/conv/cl_FF_to_double.cc' || echo '$(srcdir)/'`float/conv/cl_FF_to_double.cc cl_FF_to_float.lo: float/conv/cl_FF_to_float.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_to_float.lo -MD -MP -MF $(DEPDIR)/cl_FF_to_float.Tpo -c -o cl_FF_to_float.lo `test -f 'float/conv/cl_FF_to_float.cc' || echo '$(srcdir)/'`float/conv/cl_FF_to_float.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_to_float.Tpo $(DEPDIR)/cl_FF_to_float.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_FF_to_float.cc' object='cl_FF_to_float.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_to_float.lo `test -f 'float/conv/cl_FF_to_float.cc' || echo '$(srcdir)/'`float/conv/cl_FF_to_float.cc cl_F_from_F.lo: float/conv/cl_F_from_F.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_from_F.lo -MD -MP -MF $(DEPDIR)/cl_F_from_F.Tpo -c -o cl_F_from_F.lo `test -f 'float/conv/cl_F_from_F.cc' || echo '$(srcdir)/'`float/conv/cl_F_from_F.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_from_F.Tpo $(DEPDIR)/cl_F_from_F.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_F_from_F.cc' object='cl_F_from_F.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_from_F.lo `test -f 'float/conv/cl_F_from_F.cc' || echo '$(srcdir)/'`float/conv/cl_F_from_F.cc cl_F_from_F_f.lo: float/conv/cl_F_from_F_f.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_from_F_f.lo -MD -MP -MF $(DEPDIR)/cl_F_from_F_f.Tpo -c -o cl_F_from_F_f.lo `test -f 'float/conv/cl_F_from_F_f.cc' || echo '$(srcdir)/'`float/conv/cl_F_from_F_f.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_from_F_f.Tpo $(DEPDIR)/cl_F_from_F_f.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_F_from_F_f.cc' object='cl_F_from_F_f.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_from_F_f.lo `test -f 'float/conv/cl_F_from_F_f.cc' || echo '$(srcdir)/'`float/conv/cl_F_from_F_f.cc cl_F_from_I.lo: float/conv/cl_F_from_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_from_I.lo -MD -MP -MF $(DEPDIR)/cl_F_from_I.Tpo -c -o cl_F_from_I.lo `test -f 'float/conv/cl_F_from_I.cc' || echo '$(srcdir)/'`float/conv/cl_F_from_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_from_I.Tpo $(DEPDIR)/cl_F_from_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_F_from_I.cc' object='cl_F_from_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_from_I.lo `test -f 'float/conv/cl_F_from_I.cc' || echo '$(srcdir)/'`float/conv/cl_F_from_I.cc cl_F_from_I_def.lo: float/conv/cl_F_from_I_def.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_from_I_def.lo -MD -MP -MF $(DEPDIR)/cl_F_from_I_def.Tpo -c -o cl_F_from_I_def.lo `test -f 'float/conv/cl_F_from_I_def.cc' || echo '$(srcdir)/'`float/conv/cl_F_from_I_def.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_from_I_def.Tpo $(DEPDIR)/cl_F_from_I_def.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_F_from_I_def.cc' object='cl_F_from_I_def.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_from_I_def.lo `test -f 'float/conv/cl_F_from_I_def.cc' || echo '$(srcdir)/'`float/conv/cl_F_from_I_def.cc cl_F_from_I_f.lo: float/conv/cl_F_from_I_f.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_from_I_f.lo -MD -MP -MF $(DEPDIR)/cl_F_from_I_f.Tpo -c -o cl_F_from_I_f.lo `test -f 'float/conv/cl_F_from_I_f.cc' || echo '$(srcdir)/'`float/conv/cl_F_from_I_f.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_from_I_f.Tpo $(DEPDIR)/cl_F_from_I_f.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_F_from_I_f.cc' object='cl_F_from_I_f.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_from_I_f.lo `test -f 'float/conv/cl_F_from_I_f.cc' || echo '$(srcdir)/'`float/conv/cl_F_from_I_f.cc cl_F_from_RA.lo: float/conv/cl_F_from_RA.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_from_RA.lo -MD -MP -MF $(DEPDIR)/cl_F_from_RA.Tpo -c -o cl_F_from_RA.lo `test -f 'float/conv/cl_F_from_RA.cc' || echo '$(srcdir)/'`float/conv/cl_F_from_RA.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_from_RA.Tpo $(DEPDIR)/cl_F_from_RA.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_F_from_RA.cc' object='cl_F_from_RA.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_from_RA.lo `test -f 'float/conv/cl_F_from_RA.cc' || echo '$(srcdir)/'`float/conv/cl_F_from_RA.cc cl_F_from_RA_def.lo: float/conv/cl_F_from_RA_def.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_from_RA_def.lo -MD -MP -MF $(DEPDIR)/cl_F_from_RA_def.Tpo -c -o cl_F_from_RA_def.lo `test -f 'float/conv/cl_F_from_RA_def.cc' || echo '$(srcdir)/'`float/conv/cl_F_from_RA_def.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_from_RA_def.Tpo $(DEPDIR)/cl_F_from_RA_def.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_F_from_RA_def.cc' object='cl_F_from_RA_def.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_from_RA_def.lo `test -f 'float/conv/cl_F_from_RA_def.cc' || echo '$(srcdir)/'`float/conv/cl_F_from_RA_def.cc cl_F_from_RA_f.lo: float/conv/cl_F_from_RA_f.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_from_RA_f.lo -MD -MP -MF $(DEPDIR)/cl_F_from_RA_f.Tpo -c -o cl_F_from_RA_f.lo `test -f 'float/conv/cl_F_from_RA_f.cc' || echo '$(srcdir)/'`float/conv/cl_F_from_RA_f.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_from_RA_f.Tpo $(DEPDIR)/cl_F_from_RA_f.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_F_from_RA_f.cc' object='cl_F_from_RA_f.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_from_RA_f.lo `test -f 'float/conv/cl_F_from_RA_f.cc' || echo '$(srcdir)/'`float/conv/cl_F_from_RA_f.cc cl_F_to_DF.lo: float/conv/cl_F_to_DF.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_to_DF.lo -MD -MP -MF $(DEPDIR)/cl_F_to_DF.Tpo -c -o cl_F_to_DF.lo `test -f 'float/conv/cl_F_to_DF.cc' || echo '$(srcdir)/'`float/conv/cl_F_to_DF.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_to_DF.Tpo $(DEPDIR)/cl_F_to_DF.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_F_to_DF.cc' object='cl_F_to_DF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_to_DF.lo `test -f 'float/conv/cl_F_to_DF.cc' || echo '$(srcdir)/'`float/conv/cl_F_to_DF.cc cl_F_to_FF.lo: float/conv/cl_F_to_FF.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_to_FF.lo -MD -MP -MF $(DEPDIR)/cl_F_to_FF.Tpo -c -o cl_F_to_FF.lo `test -f 'float/conv/cl_F_to_FF.cc' || echo '$(srcdir)/'`float/conv/cl_F_to_FF.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_to_FF.Tpo $(DEPDIR)/cl_F_to_FF.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_F_to_FF.cc' object='cl_F_to_FF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_to_FF.lo `test -f 'float/conv/cl_F_to_FF.cc' || echo '$(srcdir)/'`float/conv/cl_F_to_FF.cc cl_F_to_LF.lo: float/conv/cl_F_to_LF.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_to_LF.lo -MD -MP -MF $(DEPDIR)/cl_F_to_LF.Tpo -c -o cl_F_to_LF.lo `test -f 'float/conv/cl_F_to_LF.cc' || echo '$(srcdir)/'`float/conv/cl_F_to_LF.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_to_LF.Tpo $(DEPDIR)/cl_F_to_LF.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_F_to_LF.cc' object='cl_F_to_LF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_to_LF.lo `test -f 'float/conv/cl_F_to_LF.cc' || echo '$(srcdir)/'`float/conv/cl_F_to_LF.cc cl_F_to_SF.lo: float/conv/cl_F_to_SF.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_to_SF.lo -MD -MP -MF $(DEPDIR)/cl_F_to_SF.Tpo -c -o cl_F_to_SF.lo `test -f 'float/conv/cl_F_to_SF.cc' || echo '$(srcdir)/'`float/conv/cl_F_to_SF.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_to_SF.Tpo $(DEPDIR)/cl_F_to_SF.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_F_to_SF.cc' object='cl_F_to_SF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_to_SF.lo `test -f 'float/conv/cl_F_to_SF.cc' || echo '$(srcdir)/'`float/conv/cl_F_to_SF.cc cl_F_to_double.lo: float/conv/cl_F_to_double.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_to_double.lo -MD -MP -MF $(DEPDIR)/cl_F_to_double.Tpo -c -o cl_F_to_double.lo `test -f 'float/conv/cl_F_to_double.cc' || echo '$(srcdir)/'`float/conv/cl_F_to_double.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_to_double.Tpo $(DEPDIR)/cl_F_to_double.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_F_to_double.cc' object='cl_F_to_double.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_to_double.lo `test -f 'float/conv/cl_F_to_double.cc' || echo '$(srcdir)/'`float/conv/cl_F_to_double.cc cl_F_to_float.lo: float/conv/cl_F_to_float.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_to_float.lo -MD -MP -MF $(DEPDIR)/cl_F_to_float.Tpo -c -o cl_F_to_float.lo `test -f 'float/conv/cl_F_to_float.cc' || echo '$(srcdir)/'`float/conv/cl_F_to_float.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_to_float.Tpo $(DEPDIR)/cl_F_to_float.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_F_to_float.cc' object='cl_F_to_float.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_to_float.lo `test -f 'float/conv/cl_F_to_float.cc' || echo '$(srcdir)/'`float/conv/cl_F_to_float.cc cl_LF_to_DF.lo: float/conv/cl_LF_to_DF.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_to_DF.lo -MD -MP -MF $(DEPDIR)/cl_LF_to_DF.Tpo -c -o cl_LF_to_DF.lo `test -f 'float/conv/cl_LF_to_DF.cc' || echo '$(srcdir)/'`float/conv/cl_LF_to_DF.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_to_DF.Tpo $(DEPDIR)/cl_LF_to_DF.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_LF_to_DF.cc' object='cl_LF_to_DF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_to_DF.lo `test -f 'float/conv/cl_LF_to_DF.cc' || echo '$(srcdir)/'`float/conv/cl_LF_to_DF.cc cl_LF_to_FF.lo: float/conv/cl_LF_to_FF.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_to_FF.lo -MD -MP -MF $(DEPDIR)/cl_LF_to_FF.Tpo -c -o cl_LF_to_FF.lo `test -f 'float/conv/cl_LF_to_FF.cc' || echo '$(srcdir)/'`float/conv/cl_LF_to_FF.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_to_FF.Tpo $(DEPDIR)/cl_LF_to_FF.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_LF_to_FF.cc' object='cl_LF_to_FF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_to_FF.lo `test -f 'float/conv/cl_LF_to_FF.cc' || echo '$(srcdir)/'`float/conv/cl_LF_to_FF.cc cl_LF_to_SF.lo: float/conv/cl_LF_to_SF.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_to_SF.lo -MD -MP -MF $(DEPDIR)/cl_LF_to_SF.Tpo -c -o cl_LF_to_SF.lo `test -f 'float/conv/cl_LF_to_SF.cc' || echo '$(srcdir)/'`float/conv/cl_LF_to_SF.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_to_SF.Tpo $(DEPDIR)/cl_LF_to_SF.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_LF_to_SF.cc' object='cl_LF_to_SF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_to_SF.lo `test -f 'float/conv/cl_LF_to_SF.cc' || echo '$(srcdir)/'`float/conv/cl_LF_to_SF.cc cl_LF_to_double.lo: float/conv/cl_LF_to_double.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_to_double.lo -MD -MP -MF $(DEPDIR)/cl_LF_to_double.Tpo -c -o cl_LF_to_double.lo `test -f 'float/conv/cl_LF_to_double.cc' || echo '$(srcdir)/'`float/conv/cl_LF_to_double.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_to_double.Tpo $(DEPDIR)/cl_LF_to_double.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_LF_to_double.cc' object='cl_LF_to_double.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_to_double.lo `test -f 'float/conv/cl_LF_to_double.cc' || echo '$(srcdir)/'`float/conv/cl_LF_to_double.cc cl_LF_to_float.lo: float/conv/cl_LF_to_float.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_to_float.lo -MD -MP -MF $(DEPDIR)/cl_LF_to_float.Tpo -c -o cl_LF_to_float.lo `test -f 'float/conv/cl_LF_to_float.cc' || echo '$(srcdir)/'`float/conv/cl_LF_to_float.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_to_float.Tpo $(DEPDIR)/cl_LF_to_float.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_LF_to_float.cc' object='cl_LF_to_float.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_to_float.lo `test -f 'float/conv/cl_LF_to_float.cc' || echo '$(srcdir)/'`float/conv/cl_LF_to_float.cc cl_SF_to_DF.lo: float/conv/cl_SF_to_DF.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_to_DF.lo -MD -MP -MF $(DEPDIR)/cl_SF_to_DF.Tpo -c -o cl_SF_to_DF.lo `test -f 'float/conv/cl_SF_to_DF.cc' || echo '$(srcdir)/'`float/conv/cl_SF_to_DF.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_to_DF.Tpo $(DEPDIR)/cl_SF_to_DF.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_SF_to_DF.cc' object='cl_SF_to_DF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_to_DF.lo `test -f 'float/conv/cl_SF_to_DF.cc' || echo '$(srcdir)/'`float/conv/cl_SF_to_DF.cc cl_SF_to_FF.lo: float/conv/cl_SF_to_FF.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_to_FF.lo -MD -MP -MF $(DEPDIR)/cl_SF_to_FF.Tpo -c -o cl_SF_to_FF.lo `test -f 'float/conv/cl_SF_to_FF.cc' || echo '$(srcdir)/'`float/conv/cl_SF_to_FF.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_to_FF.Tpo $(DEPDIR)/cl_SF_to_FF.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_SF_to_FF.cc' object='cl_SF_to_FF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_to_FF.lo `test -f 'float/conv/cl_SF_to_FF.cc' || echo '$(srcdir)/'`float/conv/cl_SF_to_FF.cc cl_SF_to_LF.lo: float/conv/cl_SF_to_LF.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_to_LF.lo -MD -MP -MF $(DEPDIR)/cl_SF_to_LF.Tpo -c -o cl_SF_to_LF.lo `test -f 'float/conv/cl_SF_to_LF.cc' || echo '$(srcdir)/'`float/conv/cl_SF_to_LF.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_to_LF.Tpo $(DEPDIR)/cl_SF_to_LF.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_SF_to_LF.cc' object='cl_SF_to_LF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_to_LF.lo `test -f 'float/conv/cl_SF_to_LF.cc' || echo '$(srcdir)/'`float/conv/cl_SF_to_LF.cc cl_SF_to_double.lo: float/conv/cl_SF_to_double.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_to_double.lo -MD -MP -MF $(DEPDIR)/cl_SF_to_double.Tpo -c -o cl_SF_to_double.lo `test -f 'float/conv/cl_SF_to_double.cc' || echo '$(srcdir)/'`float/conv/cl_SF_to_double.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_to_double.Tpo $(DEPDIR)/cl_SF_to_double.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_SF_to_double.cc' object='cl_SF_to_double.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_to_double.lo `test -f 'float/conv/cl_SF_to_double.cc' || echo '$(srcdir)/'`float/conv/cl_SF_to_double.cc cl_SF_to_float.lo: float/conv/cl_SF_to_float.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_to_float.lo -MD -MP -MF $(DEPDIR)/cl_SF_to_float.Tpo -c -o cl_SF_to_float.lo `test -f 'float/conv/cl_SF_to_float.cc' || echo '$(srcdir)/'`float/conv/cl_SF_to_float.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_to_float.Tpo $(DEPDIR)/cl_SF_to_float.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/conv/cl_SF_to_float.cc' object='cl_SF_to_float.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_to_float.lo `test -f 'float/conv/cl_SF_to_float.cc' || echo '$(srcdir)/'`float/conv/cl_SF_to_float.cc cl_DF_sqrt.lo: float/dfloat/algebraic/cl_DF_sqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_sqrt.lo -MD -MP -MF $(DEPDIR)/cl_DF_sqrt.Tpo -c -o cl_DF_sqrt.lo `test -f 'float/dfloat/algebraic/cl_DF_sqrt.cc' || echo '$(srcdir)/'`float/dfloat/algebraic/cl_DF_sqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_sqrt.Tpo $(DEPDIR)/cl_DF_sqrt.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/algebraic/cl_DF_sqrt.cc' object='cl_DF_sqrt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_sqrt.lo `test -f 'float/dfloat/algebraic/cl_DF_sqrt.cc' || echo '$(srcdir)/'`float/dfloat/algebraic/cl_DF_sqrt.cc cl_DF_from_double.lo: float/dfloat/conv/cl_DF_from_double.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_from_double.lo -MD -MP -MF $(DEPDIR)/cl_DF_from_double.Tpo -c -o cl_DF_from_double.lo `test -f 'float/dfloat/conv/cl_DF_from_double.cc' || echo '$(srcdir)/'`float/dfloat/conv/cl_DF_from_double.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_from_double.Tpo $(DEPDIR)/cl_DF_from_double.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/conv/cl_DF_from_double.cc' object='cl_DF_from_double.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_from_double.lo `test -f 'float/dfloat/conv/cl_DF_from_double.cc' || echo '$(srcdir)/'`float/dfloat/conv/cl_DF_from_double.cc cl_DF_to_doublej.lo: float/dfloat/conv/cl_DF_to_doublej.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_to_doublej.lo -MD -MP -MF $(DEPDIR)/cl_DF_to_doublej.Tpo -c -o cl_DF_to_doublej.lo `test -f 'float/dfloat/conv/cl_DF_to_doublej.cc' || echo '$(srcdir)/'`float/dfloat/conv/cl_DF_to_doublej.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_to_doublej.Tpo $(DEPDIR)/cl_DF_to_doublej.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/conv/cl_DF_to_doublej.cc' object='cl_DF_to_doublej.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_to_doublej.lo `test -f 'float/dfloat/conv/cl_DF_to_doublej.cc' || echo '$(srcdir)/'`float/dfloat/conv/cl_DF_to_doublej.cc cl_I_to_double.lo: float/dfloat/conv/cl_I_to_double.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_to_double.lo -MD -MP -MF $(DEPDIR)/cl_I_to_double.Tpo -c -o cl_I_to_double.lo `test -f 'float/dfloat/conv/cl_I_to_double.cc' || echo '$(srcdir)/'`float/dfloat/conv/cl_I_to_double.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_to_double.Tpo $(DEPDIR)/cl_I_to_double.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/conv/cl_I_to_double.cc' object='cl_I_to_double.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_to_double.lo `test -f 'float/dfloat/conv/cl_I_to_double.cc' || echo '$(srcdir)/'`float/dfloat/conv/cl_I_to_double.cc cl_RA_to_double.lo: float/dfloat/conv/cl_RA_to_double.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_to_double.lo -MD -MP -MF $(DEPDIR)/cl_RA_to_double.Tpo -c -o cl_RA_to_double.lo `test -f 'float/dfloat/conv/cl_RA_to_double.cc' || echo '$(srcdir)/'`float/dfloat/conv/cl_RA_to_double.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_to_double.Tpo $(DEPDIR)/cl_RA_to_double.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/conv/cl_RA_to_double.cc' object='cl_RA_to_double.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_to_double.lo `test -f 'float/dfloat/conv/cl_RA_to_double.cc' || echo '$(srcdir)/'`float/dfloat/conv/cl_RA_to_double.cc cl_DF_ceil22.lo: float/dfloat/division/cl_DF_ceil22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_ceil22.lo -MD -MP -MF $(DEPDIR)/cl_DF_ceil22.Tpo -c -o cl_DF_ceil22.lo `test -f 'float/dfloat/division/cl_DF_ceil22.cc' || echo '$(srcdir)/'`float/dfloat/division/cl_DF_ceil22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_ceil22.Tpo $(DEPDIR)/cl_DF_ceil22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/division/cl_DF_ceil22.cc' object='cl_DF_ceil22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_ceil22.lo `test -f 'float/dfloat/division/cl_DF_ceil22.cc' || echo '$(srcdir)/'`float/dfloat/division/cl_DF_ceil22.cc cl_DF_fceil.lo: float/dfloat/division/cl_DF_fceil.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_fceil.lo -MD -MP -MF $(DEPDIR)/cl_DF_fceil.Tpo -c -o cl_DF_fceil.lo `test -f 'float/dfloat/division/cl_DF_fceil.cc' || echo '$(srcdir)/'`float/dfloat/division/cl_DF_fceil.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_fceil.Tpo $(DEPDIR)/cl_DF_fceil.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/division/cl_DF_fceil.cc' object='cl_DF_fceil.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_fceil.lo `test -f 'float/dfloat/division/cl_DF_fceil.cc' || echo '$(srcdir)/'`float/dfloat/division/cl_DF_fceil.cc cl_DF_floor22.lo: float/dfloat/division/cl_DF_floor22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_floor22.lo -MD -MP -MF $(DEPDIR)/cl_DF_floor22.Tpo -c -o cl_DF_floor22.lo `test -f 'float/dfloat/division/cl_DF_floor22.cc' || echo '$(srcdir)/'`float/dfloat/division/cl_DF_floor22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_floor22.Tpo $(DEPDIR)/cl_DF_floor22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/division/cl_DF_floor22.cc' object='cl_DF_floor22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_floor22.lo `test -f 'float/dfloat/division/cl_DF_floor22.cc' || echo '$(srcdir)/'`float/dfloat/division/cl_DF_floor22.cc cl_DF_recip.lo: float/dfloat/division/cl_DF_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_recip.lo -MD -MP -MF $(DEPDIR)/cl_DF_recip.Tpo -c -o cl_DF_recip.lo `test -f 'float/dfloat/division/cl_DF_recip.cc' || echo '$(srcdir)/'`float/dfloat/division/cl_DF_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_recip.Tpo $(DEPDIR)/cl_DF_recip.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/division/cl_DF_recip.cc' object='cl_DF_recip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_recip.lo `test -f 'float/dfloat/division/cl_DF_recip.cc' || echo '$(srcdir)/'`float/dfloat/division/cl_DF_recip.cc cl_DF_round22.lo: float/dfloat/division/cl_DF_round22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_round22.lo -MD -MP -MF $(DEPDIR)/cl_DF_round22.Tpo -c -o cl_DF_round22.lo `test -f 'float/dfloat/division/cl_DF_round22.cc' || echo '$(srcdir)/'`float/dfloat/division/cl_DF_round22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_round22.Tpo $(DEPDIR)/cl_DF_round22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/division/cl_DF_round22.cc' object='cl_DF_round22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_round22.lo `test -f 'float/dfloat/division/cl_DF_round22.cc' || echo '$(srcdir)/'`float/dfloat/division/cl_DF_round22.cc cl_DF_trunc22.lo: float/dfloat/division/cl_DF_trunc22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_trunc22.lo -MD -MP -MF $(DEPDIR)/cl_DF_trunc22.Tpo -c -o cl_DF_trunc22.lo `test -f 'float/dfloat/division/cl_DF_trunc22.cc' || echo '$(srcdir)/'`float/dfloat/division/cl_DF_trunc22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_trunc22.Tpo $(DEPDIR)/cl_DF_trunc22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/division/cl_DF_trunc22.cc' object='cl_DF_trunc22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_trunc22.lo `test -f 'float/dfloat/division/cl_DF_trunc22.cc' || echo '$(srcdir)/'`float/dfloat/division/cl_DF_trunc22.cc cl_DF_compare.lo: float/dfloat/elem/cl_DF_compare.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_compare.lo -MD -MP -MF $(DEPDIR)/cl_DF_compare.Tpo -c -o cl_DF_compare.lo `test -f 'float/dfloat/elem/cl_DF_compare.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_compare.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_compare.Tpo $(DEPDIR)/cl_DF_compare.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/elem/cl_DF_compare.cc' object='cl_DF_compare.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_compare.lo `test -f 'float/dfloat/elem/cl_DF_compare.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_compare.cc cl_DF_div.lo: float/dfloat/elem/cl_DF_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_div.lo -MD -MP -MF $(DEPDIR)/cl_DF_div.Tpo -c -o cl_DF_div.lo `test -f 'float/dfloat/elem/cl_DF_div.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_div.Tpo $(DEPDIR)/cl_DF_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/elem/cl_DF_div.cc' object='cl_DF_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_div.lo `test -f 'float/dfloat/elem/cl_DF_div.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_div.cc cl_DF_ffloor.lo: float/dfloat/elem/cl_DF_ffloor.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_ffloor.lo -MD -MP -MF $(DEPDIR)/cl_DF_ffloor.Tpo -c -o cl_DF_ffloor.lo `test -f 'float/dfloat/elem/cl_DF_ffloor.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_ffloor.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_ffloor.Tpo $(DEPDIR)/cl_DF_ffloor.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/elem/cl_DF_ffloor.cc' object='cl_DF_ffloor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_ffloor.lo `test -f 'float/dfloat/elem/cl_DF_ffloor.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_ffloor.cc cl_DF_from_I.lo: float/dfloat/elem/cl_DF_from_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_from_I.lo -MD -MP -MF $(DEPDIR)/cl_DF_from_I.Tpo -c -o cl_DF_from_I.lo `test -f 'float/dfloat/elem/cl_DF_from_I.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_from_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_from_I.Tpo $(DEPDIR)/cl_DF_from_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/elem/cl_DF_from_I.cc' object='cl_DF_from_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_from_I.lo `test -f 'float/dfloat/elem/cl_DF_from_I.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_from_I.cc cl_DF_from_RA.lo: float/dfloat/elem/cl_DF_from_RA.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_from_RA.lo -MD -MP -MF $(DEPDIR)/cl_DF_from_RA.Tpo -c -o cl_DF_from_RA.lo `test -f 'float/dfloat/elem/cl_DF_from_RA.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_from_RA.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_from_RA.Tpo $(DEPDIR)/cl_DF_from_RA.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/elem/cl_DF_from_RA.cc' object='cl_DF_from_RA.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_from_RA.lo `test -f 'float/dfloat/elem/cl_DF_from_RA.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_from_RA.cc cl_DF_fround.lo: float/dfloat/elem/cl_DF_fround.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_fround.lo -MD -MP -MF $(DEPDIR)/cl_DF_fround.Tpo -c -o cl_DF_fround.lo `test -f 'float/dfloat/elem/cl_DF_fround.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_fround.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_fround.Tpo $(DEPDIR)/cl_DF_fround.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/elem/cl_DF_fround.cc' object='cl_DF_fround.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_fround.lo `test -f 'float/dfloat/elem/cl_DF_fround.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_fround.cc cl_DF_ftrunc.lo: float/dfloat/elem/cl_DF_ftrunc.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_ftrunc.lo -MD -MP -MF $(DEPDIR)/cl_DF_ftrunc.Tpo -c -o cl_DF_ftrunc.lo `test -f 'float/dfloat/elem/cl_DF_ftrunc.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_ftrunc.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_ftrunc.Tpo $(DEPDIR)/cl_DF_ftrunc.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/elem/cl_DF_ftrunc.cc' object='cl_DF_ftrunc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_ftrunc.lo `test -f 'float/dfloat/elem/cl_DF_ftrunc.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_ftrunc.cc cl_DF_futrunc.lo: float/dfloat/elem/cl_DF_futrunc.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_futrunc.lo -MD -MP -MF $(DEPDIR)/cl_DF_futrunc.Tpo -c -o cl_DF_futrunc.lo `test -f 'float/dfloat/elem/cl_DF_futrunc.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_futrunc.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_futrunc.Tpo $(DEPDIR)/cl_DF_futrunc.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/elem/cl_DF_futrunc.cc' object='cl_DF_futrunc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_futrunc.lo `test -f 'float/dfloat/elem/cl_DF_futrunc.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_futrunc.cc cl_DF_globals.lo: float/dfloat/elem/cl_DF_globals.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_globals.lo -MD -MP -MF $(DEPDIR)/cl_DF_globals.Tpo -c -o cl_DF_globals.lo `test -f 'float/dfloat/elem/cl_DF_globals.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_globals.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_globals.Tpo $(DEPDIR)/cl_DF_globals.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/elem/cl_DF_globals.cc' object='cl_DF_globals.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_globals.lo `test -f 'float/dfloat/elem/cl_DF_globals.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_globals.cc cl_DF_minus.lo: float/dfloat/elem/cl_DF_minus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_minus.lo -MD -MP -MF $(DEPDIR)/cl_DF_minus.Tpo -c -o cl_DF_minus.lo `test -f 'float/dfloat/elem/cl_DF_minus.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_minus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_minus.Tpo $(DEPDIR)/cl_DF_minus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/elem/cl_DF_minus.cc' object='cl_DF_minus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_minus.lo `test -f 'float/dfloat/elem/cl_DF_minus.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_minus.cc cl_DF_minusp.lo: float/dfloat/elem/cl_DF_minusp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_minusp.lo -MD -MP -MF $(DEPDIR)/cl_DF_minusp.Tpo -c -o cl_DF_minusp.lo `test -f 'float/dfloat/elem/cl_DF_minusp.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_minusp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_minusp.Tpo $(DEPDIR)/cl_DF_minusp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/elem/cl_DF_minusp.cc' object='cl_DF_minusp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_minusp.lo `test -f 'float/dfloat/elem/cl_DF_minusp.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_minusp.cc cl_DF_mul.lo: float/dfloat/elem/cl_DF_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_mul.lo -MD -MP -MF $(DEPDIR)/cl_DF_mul.Tpo -c -o cl_DF_mul.lo `test -f 'float/dfloat/elem/cl_DF_mul.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_mul.Tpo $(DEPDIR)/cl_DF_mul.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/elem/cl_DF_mul.cc' object='cl_DF_mul.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_mul.lo `test -f 'float/dfloat/elem/cl_DF_mul.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_mul.cc cl_DF_plus.lo: float/dfloat/elem/cl_DF_plus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_plus.lo -MD -MP -MF $(DEPDIR)/cl_DF_plus.Tpo -c -o cl_DF_plus.lo `test -f 'float/dfloat/elem/cl_DF_plus.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_plus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_plus.Tpo $(DEPDIR)/cl_DF_plus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/elem/cl_DF_plus.cc' object='cl_DF_plus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_plus.lo `test -f 'float/dfloat/elem/cl_DF_plus.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_plus.cc cl_DF_plusp.lo: float/dfloat/elem/cl_DF_plusp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_plusp.lo -MD -MP -MF $(DEPDIR)/cl_DF_plusp.Tpo -c -o cl_DF_plusp.lo `test -f 'float/dfloat/elem/cl_DF_plusp.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_plusp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_plusp.Tpo $(DEPDIR)/cl_DF_plusp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/elem/cl_DF_plusp.cc' object='cl_DF_plusp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_plusp.lo `test -f 'float/dfloat/elem/cl_DF_plusp.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_plusp.cc cl_DF_scale.lo: float/dfloat/elem/cl_DF_scale.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_scale.lo -MD -MP -MF $(DEPDIR)/cl_DF_scale.Tpo -c -o cl_DF_scale.lo `test -f 'float/dfloat/elem/cl_DF_scale.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_scale.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_scale.Tpo $(DEPDIR)/cl_DF_scale.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/elem/cl_DF_scale.cc' object='cl_DF_scale.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_scale.lo `test -f 'float/dfloat/elem/cl_DF_scale.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_scale.cc cl_DF_scale_I.lo: float/dfloat/elem/cl_DF_scale_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_scale_I.lo -MD -MP -MF $(DEPDIR)/cl_DF_scale_I.Tpo -c -o cl_DF_scale_I.lo `test -f 'float/dfloat/elem/cl_DF_scale_I.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_scale_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_scale_I.Tpo $(DEPDIR)/cl_DF_scale_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/elem/cl_DF_scale_I.cc' object='cl_DF_scale_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_scale_I.lo `test -f 'float/dfloat/elem/cl_DF_scale_I.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_scale_I.cc cl_DF_to_I.lo: float/dfloat/elem/cl_DF_to_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_to_I.lo -MD -MP -MF $(DEPDIR)/cl_DF_to_I.Tpo -c -o cl_DF_to_I.lo `test -f 'float/dfloat/elem/cl_DF_to_I.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_to_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_to_I.Tpo $(DEPDIR)/cl_DF_to_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/elem/cl_DF_to_I.cc' object='cl_DF_to_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_to_I.lo `test -f 'float/dfloat/elem/cl_DF_to_I.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_to_I.cc cl_DF_uminus.lo: float/dfloat/elem/cl_DF_uminus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_uminus.lo -MD -MP -MF $(DEPDIR)/cl_DF_uminus.Tpo -c -o cl_DF_uminus.lo `test -f 'float/dfloat/elem/cl_DF_uminus.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_uminus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_uminus.Tpo $(DEPDIR)/cl_DF_uminus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/elem/cl_DF_uminus.cc' object='cl_DF_uminus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_uminus.lo `test -f 'float/dfloat/elem/cl_DF_uminus.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_uminus.cc cl_DF_zerop.lo: float/dfloat/elem/cl_DF_zerop.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_zerop.lo -MD -MP -MF $(DEPDIR)/cl_DF_zerop.Tpo -c -o cl_DF_zerop.lo `test -f 'float/dfloat/elem/cl_DF_zerop.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_zerop.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_zerop.Tpo $(DEPDIR)/cl_DF_zerop.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/elem/cl_DF_zerop.cc' object='cl_DF_zerop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_zerop.lo `test -f 'float/dfloat/elem/cl_DF_zerop.cc' || echo '$(srcdir)/'`float/dfloat/elem/cl_DF_zerop.cc cl_DF_from_string.lo: float/dfloat/input/cl_DF_from_string.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_from_string.lo -MD -MP -MF $(DEPDIR)/cl_DF_from_string.Tpo -c -o cl_DF_from_string.lo `test -f 'float/dfloat/input/cl_DF_from_string.cc' || echo '$(srcdir)/'`float/dfloat/input/cl_DF_from_string.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_from_string.Tpo $(DEPDIR)/cl_DF_from_string.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/input/cl_DF_from_string.cc' object='cl_DF_from_string.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_from_string.lo `test -f 'float/dfloat/input/cl_DF_from_string.cc' || echo '$(srcdir)/'`float/dfloat/input/cl_DF_from_string.cc cl_DF_abs.lo: float/dfloat/misc/cl_DF_abs.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_abs.lo -MD -MP -MF $(DEPDIR)/cl_DF_abs.Tpo -c -o cl_DF_abs.lo `test -f 'float/dfloat/misc/cl_DF_abs.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_abs.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_abs.Tpo $(DEPDIR)/cl_DF_abs.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/misc/cl_DF_abs.cc' object='cl_DF_abs.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_abs.lo `test -f 'float/dfloat/misc/cl_DF_abs.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_abs.cc cl_DF_as.lo: float/dfloat/misc/cl_DF_as.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_as.lo -MD -MP -MF $(DEPDIR)/cl_DF_as.Tpo -c -o cl_DF_as.lo `test -f 'float/dfloat/misc/cl_DF_as.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_as.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_as.Tpo $(DEPDIR)/cl_DF_as.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/misc/cl_DF_as.cc' object='cl_DF_as.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_as.lo `test -f 'float/dfloat/misc/cl_DF_as.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_as.cc cl_DF_class.lo: float/dfloat/misc/cl_DF_class.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_class.lo -MD -MP -MF $(DEPDIR)/cl_DF_class.Tpo -c -o cl_DF_class.lo `test -f 'float/dfloat/misc/cl_DF_class.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_class.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_class.Tpo $(DEPDIR)/cl_DF_class.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/misc/cl_DF_class.cc' object='cl_DF_class.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_class.lo `test -f 'float/dfloat/misc/cl_DF_class.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_class.cc cl_DF_debug.lo: float/dfloat/misc/cl_DF_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_debug.lo -MD -MP -MF $(DEPDIR)/cl_DF_debug.Tpo -c -o cl_DF_debug.lo `test -f 'float/dfloat/misc/cl_DF_debug.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_debug.Tpo $(DEPDIR)/cl_DF_debug.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/misc/cl_DF_debug.cc' object='cl_DF_debug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_debug.lo `test -f 'float/dfloat/misc/cl_DF_debug.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_debug.cc cl_DF_decode.lo: float/dfloat/misc/cl_DF_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_decode.lo -MD -MP -MF $(DEPDIR)/cl_DF_decode.Tpo -c -o cl_DF_decode.lo `test -f 'float/dfloat/misc/cl_DF_decode.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_decode.Tpo $(DEPDIR)/cl_DF_decode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/misc/cl_DF_decode.cc' object='cl_DF_decode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_decode.lo `test -f 'float/dfloat/misc/cl_DF_decode.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_decode.cc cl_DF_digits.lo: float/dfloat/misc/cl_DF_digits.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_digits.lo -MD -MP -MF $(DEPDIR)/cl_DF_digits.Tpo -c -o cl_DF_digits.lo `test -f 'float/dfloat/misc/cl_DF_digits.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_digits.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_digits.Tpo $(DEPDIR)/cl_DF_digits.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/misc/cl_DF_digits.cc' object='cl_DF_digits.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_digits.lo `test -f 'float/dfloat/misc/cl_DF_digits.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_digits.cc cl_DF_eqhashcode.lo: float/dfloat/misc/cl_DF_eqhashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_eqhashcode.lo -MD -MP -MF $(DEPDIR)/cl_DF_eqhashcode.Tpo -c -o cl_DF_eqhashcode.lo `test -f 'float/dfloat/misc/cl_DF_eqhashcode.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_eqhashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_eqhashcode.Tpo $(DEPDIR)/cl_DF_eqhashcode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/misc/cl_DF_eqhashcode.cc' object='cl_DF_eqhashcode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_eqhashcode.lo `test -f 'float/dfloat/misc/cl_DF_eqhashcode.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_eqhashcode.cc cl_DF_exponent.lo: float/dfloat/misc/cl_DF_exponent.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_exponent.lo -MD -MP -MF $(DEPDIR)/cl_DF_exponent.Tpo -c -o cl_DF_exponent.lo `test -f 'float/dfloat/misc/cl_DF_exponent.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_exponent.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_exponent.Tpo $(DEPDIR)/cl_DF_exponent.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/misc/cl_DF_exponent.cc' object='cl_DF_exponent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_exponent.lo `test -f 'float/dfloat/misc/cl_DF_exponent.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_exponent.cc cl_DF_idecode.lo: float/dfloat/misc/cl_DF_idecode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_idecode.lo -MD -MP -MF $(DEPDIR)/cl_DF_idecode.Tpo -c -o cl_DF_idecode.lo `test -f 'float/dfloat/misc/cl_DF_idecode.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_idecode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_idecode.Tpo $(DEPDIR)/cl_DF_idecode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/misc/cl_DF_idecode.cc' object='cl_DF_idecode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_idecode.lo `test -f 'float/dfloat/misc/cl_DF_idecode.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_idecode.cc cl_DF_max.lo: float/dfloat/misc/cl_DF_max.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_max.lo -MD -MP -MF $(DEPDIR)/cl_DF_max.Tpo -c -o cl_DF_max.lo `test -f 'float/dfloat/misc/cl_DF_max.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_max.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_max.Tpo $(DEPDIR)/cl_DF_max.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/misc/cl_DF_max.cc' object='cl_DF_max.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_max.lo `test -f 'float/dfloat/misc/cl_DF_max.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_max.cc cl_DF_min.lo: float/dfloat/misc/cl_DF_min.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_min.lo -MD -MP -MF $(DEPDIR)/cl_DF_min.Tpo -c -o cl_DF_min.lo `test -f 'float/dfloat/misc/cl_DF_min.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_min.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_min.Tpo $(DEPDIR)/cl_DF_min.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/misc/cl_DF_min.cc' object='cl_DF_min.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_min.lo `test -f 'float/dfloat/misc/cl_DF_min.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_min.cc cl_DF_precision.lo: float/dfloat/misc/cl_DF_precision.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_precision.lo -MD -MP -MF $(DEPDIR)/cl_DF_precision.Tpo -c -o cl_DF_precision.lo `test -f 'float/dfloat/misc/cl_DF_precision.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_precision.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_precision.Tpo $(DEPDIR)/cl_DF_precision.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/misc/cl_DF_precision.cc' object='cl_DF_precision.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_precision.lo `test -f 'float/dfloat/misc/cl_DF_precision.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_precision.cc cl_DF_sign.lo: float/dfloat/misc/cl_DF_sign.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_sign.lo -MD -MP -MF $(DEPDIR)/cl_DF_sign.Tpo -c -o cl_DF_sign.lo `test -f 'float/dfloat/misc/cl_DF_sign.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_sign.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_sign.Tpo $(DEPDIR)/cl_DF_sign.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/misc/cl_DF_sign.cc' object='cl_DF_sign.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_sign.lo `test -f 'float/dfloat/misc/cl_DF_sign.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_sign.cc cl_DF_signum.lo: float/dfloat/misc/cl_DF_signum.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_DF_signum.lo -MD -MP -MF $(DEPDIR)/cl_DF_signum.Tpo -c -o cl_DF_signum.lo `test -f 'float/dfloat/misc/cl_DF_signum.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_signum.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_DF_signum.Tpo $(DEPDIR)/cl_DF_signum.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/dfloat/misc/cl_DF_signum.cc' object='cl_DF_signum.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_DF_signum.lo `test -f 'float/dfloat/misc/cl_DF_signum.cc' || echo '$(srcdir)/'`float/dfloat/misc/cl_DF_signum.cc cl_F_ceil1.lo: float/division/cl_F_ceil1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_ceil1.lo -MD -MP -MF $(DEPDIR)/cl_F_ceil1.Tpo -c -o cl_F_ceil1.lo `test -f 'float/division/cl_F_ceil1.cc' || echo '$(srcdir)/'`float/division/cl_F_ceil1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_ceil1.Tpo $(DEPDIR)/cl_F_ceil1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/division/cl_F_ceil1.cc' object='cl_F_ceil1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_ceil1.lo `test -f 'float/division/cl_F_ceil1.cc' || echo '$(srcdir)/'`float/division/cl_F_ceil1.cc cl_F_ceil2.lo: float/division/cl_F_ceil2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_ceil2.lo -MD -MP -MF $(DEPDIR)/cl_F_ceil2.Tpo -c -o cl_F_ceil2.lo `test -f 'float/division/cl_F_ceil2.cc' || echo '$(srcdir)/'`float/division/cl_F_ceil2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_ceil2.Tpo $(DEPDIR)/cl_F_ceil2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/division/cl_F_ceil2.cc' object='cl_F_ceil2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_ceil2.lo `test -f 'float/division/cl_F_ceil2.cc' || echo '$(srcdir)/'`float/division/cl_F_ceil2.cc cl_F_ceil22.lo: float/division/cl_F_ceil22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_ceil22.lo -MD -MP -MF $(DEPDIR)/cl_F_ceil22.Tpo -c -o cl_F_ceil22.lo `test -f 'float/division/cl_F_ceil22.cc' || echo '$(srcdir)/'`float/division/cl_F_ceil22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_ceil22.Tpo $(DEPDIR)/cl_F_ceil22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/division/cl_F_ceil22.cc' object='cl_F_ceil22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_ceil22.lo `test -f 'float/division/cl_F_ceil22.cc' || echo '$(srcdir)/'`float/division/cl_F_ceil22.cc cl_F_fceil1.lo: float/division/cl_F_fceil1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_fceil1.lo -MD -MP -MF $(DEPDIR)/cl_F_fceil1.Tpo -c -o cl_F_fceil1.lo `test -f 'float/division/cl_F_fceil1.cc' || echo '$(srcdir)/'`float/division/cl_F_fceil1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_fceil1.Tpo $(DEPDIR)/cl_F_fceil1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/division/cl_F_fceil1.cc' object='cl_F_fceil1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_fceil1.lo `test -f 'float/division/cl_F_fceil1.cc' || echo '$(srcdir)/'`float/division/cl_F_fceil1.cc cl_F_fceil2.lo: float/division/cl_F_fceil2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_fceil2.lo -MD -MP -MF $(DEPDIR)/cl_F_fceil2.Tpo -c -o cl_F_fceil2.lo `test -f 'float/division/cl_F_fceil2.cc' || echo '$(srcdir)/'`float/division/cl_F_fceil2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_fceil2.Tpo $(DEPDIR)/cl_F_fceil2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/division/cl_F_fceil2.cc' object='cl_F_fceil2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_fceil2.lo `test -f 'float/division/cl_F_fceil2.cc' || echo '$(srcdir)/'`float/division/cl_F_fceil2.cc cl_F_ffloor1.lo: float/division/cl_F_ffloor1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_ffloor1.lo -MD -MP -MF $(DEPDIR)/cl_F_ffloor1.Tpo -c -o cl_F_ffloor1.lo `test -f 'float/division/cl_F_ffloor1.cc' || echo '$(srcdir)/'`float/division/cl_F_ffloor1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_ffloor1.Tpo $(DEPDIR)/cl_F_ffloor1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/division/cl_F_ffloor1.cc' object='cl_F_ffloor1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_ffloor1.lo `test -f 'float/division/cl_F_ffloor1.cc' || echo '$(srcdir)/'`float/division/cl_F_ffloor1.cc cl_F_ffloor2.lo: float/division/cl_F_ffloor2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_ffloor2.lo -MD -MP -MF $(DEPDIR)/cl_F_ffloor2.Tpo -c -o cl_F_ffloor2.lo `test -f 'float/division/cl_F_ffloor2.cc' || echo '$(srcdir)/'`float/division/cl_F_ffloor2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_ffloor2.Tpo $(DEPDIR)/cl_F_ffloor2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/division/cl_F_ffloor2.cc' object='cl_F_ffloor2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_ffloor2.lo `test -f 'float/division/cl_F_ffloor2.cc' || echo '$(srcdir)/'`float/division/cl_F_ffloor2.cc cl_F_floor1.lo: float/division/cl_F_floor1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_floor1.lo -MD -MP -MF $(DEPDIR)/cl_F_floor1.Tpo -c -o cl_F_floor1.lo `test -f 'float/division/cl_F_floor1.cc' || echo '$(srcdir)/'`float/division/cl_F_floor1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_floor1.Tpo $(DEPDIR)/cl_F_floor1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/division/cl_F_floor1.cc' object='cl_F_floor1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_floor1.lo `test -f 'float/division/cl_F_floor1.cc' || echo '$(srcdir)/'`float/division/cl_F_floor1.cc cl_F_floor2.lo: float/division/cl_F_floor2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_floor2.lo -MD -MP -MF $(DEPDIR)/cl_F_floor2.Tpo -c -o cl_F_floor2.lo `test -f 'float/division/cl_F_floor2.cc' || echo '$(srcdir)/'`float/division/cl_F_floor2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_floor2.Tpo $(DEPDIR)/cl_F_floor2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/division/cl_F_floor2.cc' object='cl_F_floor2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_floor2.lo `test -f 'float/division/cl_F_floor2.cc' || echo '$(srcdir)/'`float/division/cl_F_floor2.cc cl_F_floor22.lo: float/division/cl_F_floor22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_floor22.lo -MD -MP -MF $(DEPDIR)/cl_F_floor22.Tpo -c -o cl_F_floor22.lo `test -f 'float/division/cl_F_floor22.cc' || echo '$(srcdir)/'`float/division/cl_F_floor22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_floor22.Tpo $(DEPDIR)/cl_F_floor22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/division/cl_F_floor22.cc' object='cl_F_floor22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_floor22.lo `test -f 'float/division/cl_F_floor22.cc' || echo '$(srcdir)/'`float/division/cl_F_floor22.cc cl_F_fround1.lo: float/division/cl_F_fround1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_fround1.lo -MD -MP -MF $(DEPDIR)/cl_F_fround1.Tpo -c -o cl_F_fround1.lo `test -f 'float/division/cl_F_fround1.cc' || echo '$(srcdir)/'`float/division/cl_F_fround1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_fround1.Tpo $(DEPDIR)/cl_F_fround1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/division/cl_F_fround1.cc' object='cl_F_fround1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_fround1.lo `test -f 'float/division/cl_F_fround1.cc' || echo '$(srcdir)/'`float/division/cl_F_fround1.cc cl_F_fround2.lo: float/division/cl_F_fround2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_fround2.lo -MD -MP -MF $(DEPDIR)/cl_F_fround2.Tpo -c -o cl_F_fround2.lo `test -f 'float/division/cl_F_fround2.cc' || echo '$(srcdir)/'`float/division/cl_F_fround2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_fround2.Tpo $(DEPDIR)/cl_F_fround2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/division/cl_F_fround2.cc' object='cl_F_fround2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_fround2.lo `test -f 'float/division/cl_F_fround2.cc' || echo '$(srcdir)/'`float/division/cl_F_fround2.cc cl_F_ftrunc1.lo: float/division/cl_F_ftrunc1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_ftrunc1.lo -MD -MP -MF $(DEPDIR)/cl_F_ftrunc1.Tpo -c -o cl_F_ftrunc1.lo `test -f 'float/division/cl_F_ftrunc1.cc' || echo '$(srcdir)/'`float/division/cl_F_ftrunc1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_ftrunc1.Tpo $(DEPDIR)/cl_F_ftrunc1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/division/cl_F_ftrunc1.cc' object='cl_F_ftrunc1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_ftrunc1.lo `test -f 'float/division/cl_F_ftrunc1.cc' || echo '$(srcdir)/'`float/division/cl_F_ftrunc1.cc cl_F_ftrunc2.lo: float/division/cl_F_ftrunc2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_ftrunc2.lo -MD -MP -MF $(DEPDIR)/cl_F_ftrunc2.Tpo -c -o cl_F_ftrunc2.lo `test -f 'float/division/cl_F_ftrunc2.cc' || echo '$(srcdir)/'`float/division/cl_F_ftrunc2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_ftrunc2.Tpo $(DEPDIR)/cl_F_ftrunc2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/division/cl_F_ftrunc2.cc' object='cl_F_ftrunc2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_ftrunc2.lo `test -f 'float/division/cl_F_ftrunc2.cc' || echo '$(srcdir)/'`float/division/cl_F_ftrunc2.cc cl_F_round1.lo: float/division/cl_F_round1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_round1.lo -MD -MP -MF $(DEPDIR)/cl_F_round1.Tpo -c -o cl_F_round1.lo `test -f 'float/division/cl_F_round1.cc' || echo '$(srcdir)/'`float/division/cl_F_round1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_round1.Tpo $(DEPDIR)/cl_F_round1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/division/cl_F_round1.cc' object='cl_F_round1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_round1.lo `test -f 'float/division/cl_F_round1.cc' || echo '$(srcdir)/'`float/division/cl_F_round1.cc cl_F_round2.lo: float/division/cl_F_round2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_round2.lo -MD -MP -MF $(DEPDIR)/cl_F_round2.Tpo -c -o cl_F_round2.lo `test -f 'float/division/cl_F_round2.cc' || echo '$(srcdir)/'`float/division/cl_F_round2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_round2.Tpo $(DEPDIR)/cl_F_round2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/division/cl_F_round2.cc' object='cl_F_round2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_round2.lo `test -f 'float/division/cl_F_round2.cc' || echo '$(srcdir)/'`float/division/cl_F_round2.cc cl_F_round22.lo: float/division/cl_F_round22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_round22.lo -MD -MP -MF $(DEPDIR)/cl_F_round22.Tpo -c -o cl_F_round22.lo `test -f 'float/division/cl_F_round22.cc' || echo '$(srcdir)/'`float/division/cl_F_round22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_round22.Tpo $(DEPDIR)/cl_F_round22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/division/cl_F_round22.cc' object='cl_F_round22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_round22.lo `test -f 'float/division/cl_F_round22.cc' || echo '$(srcdir)/'`float/division/cl_F_round22.cc cl_F_trunc1.lo: float/division/cl_F_trunc1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_trunc1.lo -MD -MP -MF $(DEPDIR)/cl_F_trunc1.Tpo -c -o cl_F_trunc1.lo `test -f 'float/division/cl_F_trunc1.cc' || echo '$(srcdir)/'`float/division/cl_F_trunc1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_trunc1.Tpo $(DEPDIR)/cl_F_trunc1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/division/cl_F_trunc1.cc' object='cl_F_trunc1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_trunc1.lo `test -f 'float/division/cl_F_trunc1.cc' || echo '$(srcdir)/'`float/division/cl_F_trunc1.cc cl_F_trunc2.lo: float/division/cl_F_trunc2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_trunc2.lo -MD -MP -MF $(DEPDIR)/cl_F_trunc2.Tpo -c -o cl_F_trunc2.lo `test -f 'float/division/cl_F_trunc2.cc' || echo '$(srcdir)/'`float/division/cl_F_trunc2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_trunc2.Tpo $(DEPDIR)/cl_F_trunc2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/division/cl_F_trunc2.cc' object='cl_F_trunc2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_trunc2.lo `test -f 'float/division/cl_F_trunc2.cc' || echo '$(srcdir)/'`float/division/cl_F_trunc2.cc cl_F_trunc22.lo: float/division/cl_F_trunc22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_trunc22.lo -MD -MP -MF $(DEPDIR)/cl_F_trunc22.Tpo -c -o cl_F_trunc22.lo `test -f 'float/division/cl_F_trunc22.cc' || echo '$(srcdir)/'`float/division/cl_F_trunc22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_trunc22.Tpo $(DEPDIR)/cl_F_trunc22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/division/cl_F_trunc22.cc' object='cl_F_trunc22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_trunc22.lo `test -f 'float/division/cl_F_trunc22.cc' || echo '$(srcdir)/'`float/division/cl_F_trunc22.cc cl_F_I_div.lo: float/elem/cl_F_I_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_I_div.lo -MD -MP -MF $(DEPDIR)/cl_F_I_div.Tpo -c -o cl_F_I_div.lo `test -f 'float/elem/cl_F_I_div.cc' || echo '$(srcdir)/'`float/elem/cl_F_I_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_I_div.Tpo $(DEPDIR)/cl_F_I_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/elem/cl_F_I_div.cc' object='cl_F_I_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_I_div.lo `test -f 'float/elem/cl_F_I_div.cc' || echo '$(srcdir)/'`float/elem/cl_F_I_div.cc cl_F_I_mul.lo: float/elem/cl_F_I_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_I_mul.lo -MD -MP -MF $(DEPDIR)/cl_F_I_mul.Tpo -c -o cl_F_I_mul.lo `test -f 'float/elem/cl_F_I_mul.cc' || echo '$(srcdir)/'`float/elem/cl_F_I_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_I_mul.Tpo $(DEPDIR)/cl_F_I_mul.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/elem/cl_F_I_mul.cc' object='cl_F_I_mul.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_I_mul.lo `test -f 'float/elem/cl_F_I_mul.cc' || echo '$(srcdir)/'`float/elem/cl_F_I_mul.cc cl_F_RA_div.lo: float/elem/cl_F_RA_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_RA_div.lo -MD -MP -MF $(DEPDIR)/cl_F_RA_div.Tpo -c -o cl_F_RA_div.lo `test -f 'float/elem/cl_F_RA_div.cc' || echo '$(srcdir)/'`float/elem/cl_F_RA_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_RA_div.Tpo $(DEPDIR)/cl_F_RA_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/elem/cl_F_RA_div.cc' object='cl_F_RA_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_RA_div.lo `test -f 'float/elem/cl_F_RA_div.cc' || echo '$(srcdir)/'`float/elem/cl_F_RA_div.cc cl_F_RA_mul.lo: float/elem/cl_F_RA_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_RA_mul.lo -MD -MP -MF $(DEPDIR)/cl_F_RA_mul.Tpo -c -o cl_F_RA_mul.lo `test -f 'float/elem/cl_F_RA_mul.cc' || echo '$(srcdir)/'`float/elem/cl_F_RA_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_RA_mul.Tpo $(DEPDIR)/cl_F_RA_mul.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/elem/cl_F_RA_mul.cc' object='cl_F_RA_mul.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_RA_mul.lo `test -f 'float/elem/cl_F_RA_mul.cc' || echo '$(srcdir)/'`float/elem/cl_F_RA_mul.cc cl_F_compare.lo: float/elem/cl_F_compare.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_compare.lo -MD -MP -MF $(DEPDIR)/cl_F_compare.Tpo -c -o cl_F_compare.lo `test -f 'float/elem/cl_F_compare.cc' || echo '$(srcdir)/'`float/elem/cl_F_compare.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_compare.Tpo $(DEPDIR)/cl_F_compare.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/elem/cl_F_compare.cc' object='cl_F_compare.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_compare.lo `test -f 'float/elem/cl_F_compare.cc' || echo '$(srcdir)/'`float/elem/cl_F_compare.cc cl_F_div.lo: float/elem/cl_F_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_div.lo -MD -MP -MF $(DEPDIR)/cl_F_div.Tpo -c -o cl_F_div.lo `test -f 'float/elem/cl_F_div.cc' || echo '$(srcdir)/'`float/elem/cl_F_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_div.Tpo $(DEPDIR)/cl_F_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/elem/cl_F_div.cc' object='cl_F_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_div.lo `test -f 'float/elem/cl_F_div.cc' || echo '$(srcdir)/'`float/elem/cl_F_div.cc cl_F_minus.lo: float/elem/cl_F_minus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_minus.lo -MD -MP -MF $(DEPDIR)/cl_F_minus.Tpo -c -o cl_F_minus.lo `test -f 'float/elem/cl_F_minus.cc' || echo '$(srcdir)/'`float/elem/cl_F_minus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_minus.Tpo $(DEPDIR)/cl_F_minus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/elem/cl_F_minus.cc' object='cl_F_minus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_minus.lo `test -f 'float/elem/cl_F_minus.cc' || echo '$(srcdir)/'`float/elem/cl_F_minus.cc cl_F_minusp.lo: float/elem/cl_F_minusp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_minusp.lo -MD -MP -MF $(DEPDIR)/cl_F_minusp.Tpo -c -o cl_F_minusp.lo `test -f 'float/elem/cl_F_minusp.cc' || echo '$(srcdir)/'`float/elem/cl_F_minusp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_minusp.Tpo $(DEPDIR)/cl_F_minusp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/elem/cl_F_minusp.cc' object='cl_F_minusp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_minusp.lo `test -f 'float/elem/cl_F_minusp.cc' || echo '$(srcdir)/'`float/elem/cl_F_minusp.cc cl_F_mul.lo: float/elem/cl_F_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_mul.lo -MD -MP -MF $(DEPDIR)/cl_F_mul.Tpo -c -o cl_F_mul.lo `test -f 'float/elem/cl_F_mul.cc' || echo '$(srcdir)/'`float/elem/cl_F_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_mul.Tpo $(DEPDIR)/cl_F_mul.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/elem/cl_F_mul.cc' object='cl_F_mul.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_mul.lo `test -f 'float/elem/cl_F_mul.cc' || echo '$(srcdir)/'`float/elem/cl_F_mul.cc cl_F_plus.lo: float/elem/cl_F_plus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_plus.lo -MD -MP -MF $(DEPDIR)/cl_F_plus.Tpo -c -o cl_F_plus.lo `test -f 'float/elem/cl_F_plus.cc' || echo '$(srcdir)/'`float/elem/cl_F_plus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_plus.Tpo $(DEPDIR)/cl_F_plus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/elem/cl_F_plus.cc' object='cl_F_plus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_plus.lo `test -f 'float/elem/cl_F_plus.cc' || echo '$(srcdir)/'`float/elem/cl_F_plus.cc cl_F_plusp.lo: float/elem/cl_F_plusp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_plusp.lo -MD -MP -MF $(DEPDIR)/cl_F_plusp.Tpo -c -o cl_F_plusp.lo `test -f 'float/elem/cl_F_plusp.cc' || echo '$(srcdir)/'`float/elem/cl_F_plusp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_plusp.Tpo $(DEPDIR)/cl_F_plusp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/elem/cl_F_plusp.cc' object='cl_F_plusp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_plusp.lo `test -f 'float/elem/cl_F_plusp.cc' || echo '$(srcdir)/'`float/elem/cl_F_plusp.cc cl_F_recip.lo: float/elem/cl_F_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_recip.lo -MD -MP -MF $(DEPDIR)/cl_F_recip.Tpo -c -o cl_F_recip.lo `test -f 'float/elem/cl_F_recip.cc' || echo '$(srcdir)/'`float/elem/cl_F_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_recip.Tpo $(DEPDIR)/cl_F_recip.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/elem/cl_F_recip.cc' object='cl_F_recip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_recip.lo `test -f 'float/elem/cl_F_recip.cc' || echo '$(srcdir)/'`float/elem/cl_F_recip.cc cl_F_scale.lo: float/elem/cl_F_scale.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_scale.lo -MD -MP -MF $(DEPDIR)/cl_F_scale.Tpo -c -o cl_F_scale.lo `test -f 'float/elem/cl_F_scale.cc' || echo '$(srcdir)/'`float/elem/cl_F_scale.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_scale.Tpo $(DEPDIR)/cl_F_scale.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/elem/cl_F_scale.cc' object='cl_F_scale.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_scale.lo `test -f 'float/elem/cl_F_scale.cc' || echo '$(srcdir)/'`float/elem/cl_F_scale.cc cl_F_scale_I.lo: float/elem/cl_F_scale_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_scale_I.lo -MD -MP -MF $(DEPDIR)/cl_F_scale_I.Tpo -c -o cl_F_scale_I.lo `test -f 'float/elem/cl_F_scale_I.cc' || echo '$(srcdir)/'`float/elem/cl_F_scale_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_scale_I.Tpo $(DEPDIR)/cl_F_scale_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/elem/cl_F_scale_I.cc' object='cl_F_scale_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_scale_I.lo `test -f 'float/elem/cl_F_scale_I.cc' || echo '$(srcdir)/'`float/elem/cl_F_scale_I.cc cl_F_square.lo: float/elem/cl_F_square.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_square.lo -MD -MP -MF $(DEPDIR)/cl_F_square.Tpo -c -o cl_F_square.lo `test -f 'float/elem/cl_F_square.cc' || echo '$(srcdir)/'`float/elem/cl_F_square.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_square.Tpo $(DEPDIR)/cl_F_square.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/elem/cl_F_square.cc' object='cl_F_square.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_square.lo `test -f 'float/elem/cl_F_square.cc' || echo '$(srcdir)/'`float/elem/cl_F_square.cc cl_F_uminus.lo: float/elem/cl_F_uminus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_uminus.lo -MD -MP -MF $(DEPDIR)/cl_F_uminus.Tpo -c -o cl_F_uminus.lo `test -f 'float/elem/cl_F_uminus.cc' || echo '$(srcdir)/'`float/elem/cl_F_uminus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_uminus.Tpo $(DEPDIR)/cl_F_uminus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/elem/cl_F_uminus.cc' object='cl_F_uminus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_uminus.lo `test -f 'float/elem/cl_F_uminus.cc' || echo '$(srcdir)/'`float/elem/cl_F_uminus.cc cl_F_zerop.lo: float/elem/cl_F_zerop.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_zerop.lo -MD -MP -MF $(DEPDIR)/cl_F_zerop.Tpo -c -o cl_F_zerop.lo `test -f 'float/elem/cl_F_zerop.cc' || echo '$(srcdir)/'`float/elem/cl_F_zerop.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_zerop.Tpo $(DEPDIR)/cl_F_zerop.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/elem/cl_F_zerop.cc' object='cl_F_zerop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_zerop.lo `test -f 'float/elem/cl_F_zerop.cc' || echo '$(srcdir)/'`float/elem/cl_F_zerop.cc cl_I_F_div.lo: float/elem/cl_I_F_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_F_div.lo -MD -MP -MF $(DEPDIR)/cl_I_F_div.Tpo -c -o cl_I_F_div.lo `test -f 'float/elem/cl_I_F_div.cc' || echo '$(srcdir)/'`float/elem/cl_I_F_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_F_div.Tpo $(DEPDIR)/cl_I_F_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/elem/cl_I_F_div.cc' object='cl_I_F_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_F_div.lo `test -f 'float/elem/cl_I_F_div.cc' || echo '$(srcdir)/'`float/elem/cl_I_F_div.cc cl_RA_F_div.lo: float/elem/cl_RA_F_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_F_div.lo -MD -MP -MF $(DEPDIR)/cl_RA_F_div.Tpo -c -o cl_RA_F_div.lo `test -f 'float/elem/cl_RA_F_div.cc' || echo '$(srcdir)/'`float/elem/cl_RA_F_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_F_div.Tpo $(DEPDIR)/cl_RA_F_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/elem/cl_RA_F_div.cc' object='cl_RA_F_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_F_div.lo `test -f 'float/elem/cl_RA_F_div.cc' || echo '$(srcdir)/'`float/elem/cl_RA_F_div.cc cl_FF_sqrt.lo: float/ffloat/algebraic/cl_FF_sqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_sqrt.lo -MD -MP -MF $(DEPDIR)/cl_FF_sqrt.Tpo -c -o cl_FF_sqrt.lo `test -f 'float/ffloat/algebraic/cl_FF_sqrt.cc' || echo '$(srcdir)/'`float/ffloat/algebraic/cl_FF_sqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_sqrt.Tpo $(DEPDIR)/cl_FF_sqrt.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/algebraic/cl_FF_sqrt.cc' object='cl_FF_sqrt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_sqrt.lo `test -f 'float/ffloat/algebraic/cl_FF_sqrt.cc' || echo '$(srcdir)/'`float/ffloat/algebraic/cl_FF_sqrt.cc cl_FF_from_float.lo: float/ffloat/conv/cl_FF_from_float.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_from_float.lo -MD -MP -MF $(DEPDIR)/cl_FF_from_float.Tpo -c -o cl_FF_from_float.lo `test -f 'float/ffloat/conv/cl_FF_from_float.cc' || echo '$(srcdir)/'`float/ffloat/conv/cl_FF_from_float.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_from_float.Tpo $(DEPDIR)/cl_FF_from_float.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/conv/cl_FF_from_float.cc' object='cl_FF_from_float.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_from_float.lo `test -f 'float/ffloat/conv/cl_FF_from_float.cc' || echo '$(srcdir)/'`float/ffloat/conv/cl_FF_from_float.cc cl_FF_to_floatj.lo: float/ffloat/conv/cl_FF_to_floatj.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_to_floatj.lo -MD -MP -MF $(DEPDIR)/cl_FF_to_floatj.Tpo -c -o cl_FF_to_floatj.lo `test -f 'float/ffloat/conv/cl_FF_to_floatj.cc' || echo '$(srcdir)/'`float/ffloat/conv/cl_FF_to_floatj.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_to_floatj.Tpo $(DEPDIR)/cl_FF_to_floatj.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/conv/cl_FF_to_floatj.cc' object='cl_FF_to_floatj.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_to_floatj.lo `test -f 'float/ffloat/conv/cl_FF_to_floatj.cc' || echo '$(srcdir)/'`float/ffloat/conv/cl_FF_to_floatj.cc cl_I_to_float.lo: float/ffloat/conv/cl_I_to_float.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_to_float.lo -MD -MP -MF $(DEPDIR)/cl_I_to_float.Tpo -c -o cl_I_to_float.lo `test -f 'float/ffloat/conv/cl_I_to_float.cc' || echo '$(srcdir)/'`float/ffloat/conv/cl_I_to_float.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_to_float.Tpo $(DEPDIR)/cl_I_to_float.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/conv/cl_I_to_float.cc' object='cl_I_to_float.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_to_float.lo `test -f 'float/ffloat/conv/cl_I_to_float.cc' || echo '$(srcdir)/'`float/ffloat/conv/cl_I_to_float.cc cl_RA_to_float.lo: float/ffloat/conv/cl_RA_to_float.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_to_float.lo -MD -MP -MF $(DEPDIR)/cl_RA_to_float.Tpo -c -o cl_RA_to_float.lo `test -f 'float/ffloat/conv/cl_RA_to_float.cc' || echo '$(srcdir)/'`float/ffloat/conv/cl_RA_to_float.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_to_float.Tpo $(DEPDIR)/cl_RA_to_float.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/conv/cl_RA_to_float.cc' object='cl_RA_to_float.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_to_float.lo `test -f 'float/ffloat/conv/cl_RA_to_float.cc' || echo '$(srcdir)/'`float/ffloat/conv/cl_RA_to_float.cc cl_FF_ceil22.lo: float/ffloat/division/cl_FF_ceil22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_ceil22.lo -MD -MP -MF $(DEPDIR)/cl_FF_ceil22.Tpo -c -o cl_FF_ceil22.lo `test -f 'float/ffloat/division/cl_FF_ceil22.cc' || echo '$(srcdir)/'`float/ffloat/division/cl_FF_ceil22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_ceil22.Tpo $(DEPDIR)/cl_FF_ceil22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/division/cl_FF_ceil22.cc' object='cl_FF_ceil22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_ceil22.lo `test -f 'float/ffloat/division/cl_FF_ceil22.cc' || echo '$(srcdir)/'`float/ffloat/division/cl_FF_ceil22.cc cl_FF_fceil.lo: float/ffloat/division/cl_FF_fceil.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_fceil.lo -MD -MP -MF $(DEPDIR)/cl_FF_fceil.Tpo -c -o cl_FF_fceil.lo `test -f 'float/ffloat/division/cl_FF_fceil.cc' || echo '$(srcdir)/'`float/ffloat/division/cl_FF_fceil.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_fceil.Tpo $(DEPDIR)/cl_FF_fceil.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/division/cl_FF_fceil.cc' object='cl_FF_fceil.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_fceil.lo `test -f 'float/ffloat/division/cl_FF_fceil.cc' || echo '$(srcdir)/'`float/ffloat/division/cl_FF_fceil.cc cl_FF_floor22.lo: float/ffloat/division/cl_FF_floor22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_floor22.lo -MD -MP -MF $(DEPDIR)/cl_FF_floor22.Tpo -c -o cl_FF_floor22.lo `test -f 'float/ffloat/division/cl_FF_floor22.cc' || echo '$(srcdir)/'`float/ffloat/division/cl_FF_floor22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_floor22.Tpo $(DEPDIR)/cl_FF_floor22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/division/cl_FF_floor22.cc' object='cl_FF_floor22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_floor22.lo `test -f 'float/ffloat/division/cl_FF_floor22.cc' || echo '$(srcdir)/'`float/ffloat/division/cl_FF_floor22.cc cl_FF_recip.lo: float/ffloat/division/cl_FF_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_recip.lo -MD -MP -MF $(DEPDIR)/cl_FF_recip.Tpo -c -o cl_FF_recip.lo `test -f 'float/ffloat/division/cl_FF_recip.cc' || echo '$(srcdir)/'`float/ffloat/division/cl_FF_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_recip.Tpo $(DEPDIR)/cl_FF_recip.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/division/cl_FF_recip.cc' object='cl_FF_recip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_recip.lo `test -f 'float/ffloat/division/cl_FF_recip.cc' || echo '$(srcdir)/'`float/ffloat/division/cl_FF_recip.cc cl_FF_round22.lo: float/ffloat/division/cl_FF_round22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_round22.lo -MD -MP -MF $(DEPDIR)/cl_FF_round22.Tpo -c -o cl_FF_round22.lo `test -f 'float/ffloat/division/cl_FF_round22.cc' || echo '$(srcdir)/'`float/ffloat/division/cl_FF_round22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_round22.Tpo $(DEPDIR)/cl_FF_round22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/division/cl_FF_round22.cc' object='cl_FF_round22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_round22.lo `test -f 'float/ffloat/division/cl_FF_round22.cc' || echo '$(srcdir)/'`float/ffloat/division/cl_FF_round22.cc cl_FF_trunc22.lo: float/ffloat/division/cl_FF_trunc22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_trunc22.lo -MD -MP -MF $(DEPDIR)/cl_FF_trunc22.Tpo -c -o cl_FF_trunc22.lo `test -f 'float/ffloat/division/cl_FF_trunc22.cc' || echo '$(srcdir)/'`float/ffloat/division/cl_FF_trunc22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_trunc22.Tpo $(DEPDIR)/cl_FF_trunc22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/division/cl_FF_trunc22.cc' object='cl_FF_trunc22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_trunc22.lo `test -f 'float/ffloat/division/cl_FF_trunc22.cc' || echo '$(srcdir)/'`float/ffloat/division/cl_FF_trunc22.cc cl_FF_compare.lo: float/ffloat/elem/cl_FF_compare.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_compare.lo -MD -MP -MF $(DEPDIR)/cl_FF_compare.Tpo -c -o cl_FF_compare.lo `test -f 'float/ffloat/elem/cl_FF_compare.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_compare.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_compare.Tpo $(DEPDIR)/cl_FF_compare.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/elem/cl_FF_compare.cc' object='cl_FF_compare.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_compare.lo `test -f 'float/ffloat/elem/cl_FF_compare.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_compare.cc cl_FF_div.lo: float/ffloat/elem/cl_FF_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_div.lo -MD -MP -MF $(DEPDIR)/cl_FF_div.Tpo -c -o cl_FF_div.lo `test -f 'float/ffloat/elem/cl_FF_div.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_div.Tpo $(DEPDIR)/cl_FF_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/elem/cl_FF_div.cc' object='cl_FF_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_div.lo `test -f 'float/ffloat/elem/cl_FF_div.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_div.cc cl_FF_ffloor.lo: float/ffloat/elem/cl_FF_ffloor.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_ffloor.lo -MD -MP -MF $(DEPDIR)/cl_FF_ffloor.Tpo -c -o cl_FF_ffloor.lo `test -f 'float/ffloat/elem/cl_FF_ffloor.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_ffloor.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_ffloor.Tpo $(DEPDIR)/cl_FF_ffloor.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/elem/cl_FF_ffloor.cc' object='cl_FF_ffloor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_ffloor.lo `test -f 'float/ffloat/elem/cl_FF_ffloor.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_ffloor.cc cl_FF_from_I.lo: float/ffloat/elem/cl_FF_from_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_from_I.lo -MD -MP -MF $(DEPDIR)/cl_FF_from_I.Tpo -c -o cl_FF_from_I.lo `test -f 'float/ffloat/elem/cl_FF_from_I.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_from_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_from_I.Tpo $(DEPDIR)/cl_FF_from_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/elem/cl_FF_from_I.cc' object='cl_FF_from_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_from_I.lo `test -f 'float/ffloat/elem/cl_FF_from_I.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_from_I.cc cl_FF_from_RA.lo: float/ffloat/elem/cl_FF_from_RA.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_from_RA.lo -MD -MP -MF $(DEPDIR)/cl_FF_from_RA.Tpo -c -o cl_FF_from_RA.lo `test -f 'float/ffloat/elem/cl_FF_from_RA.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_from_RA.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_from_RA.Tpo $(DEPDIR)/cl_FF_from_RA.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/elem/cl_FF_from_RA.cc' object='cl_FF_from_RA.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_from_RA.lo `test -f 'float/ffloat/elem/cl_FF_from_RA.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_from_RA.cc cl_FF_fround.lo: float/ffloat/elem/cl_FF_fround.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_fround.lo -MD -MP -MF $(DEPDIR)/cl_FF_fround.Tpo -c -o cl_FF_fround.lo `test -f 'float/ffloat/elem/cl_FF_fround.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_fround.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_fround.Tpo $(DEPDIR)/cl_FF_fround.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/elem/cl_FF_fround.cc' object='cl_FF_fround.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_fround.lo `test -f 'float/ffloat/elem/cl_FF_fround.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_fround.cc cl_FF_ftrunc.lo: float/ffloat/elem/cl_FF_ftrunc.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_ftrunc.lo -MD -MP -MF $(DEPDIR)/cl_FF_ftrunc.Tpo -c -o cl_FF_ftrunc.lo `test -f 'float/ffloat/elem/cl_FF_ftrunc.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_ftrunc.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_ftrunc.Tpo $(DEPDIR)/cl_FF_ftrunc.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/elem/cl_FF_ftrunc.cc' object='cl_FF_ftrunc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_ftrunc.lo `test -f 'float/ffloat/elem/cl_FF_ftrunc.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_ftrunc.cc cl_FF_futrunc.lo: float/ffloat/elem/cl_FF_futrunc.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_futrunc.lo -MD -MP -MF $(DEPDIR)/cl_FF_futrunc.Tpo -c -o cl_FF_futrunc.lo `test -f 'float/ffloat/elem/cl_FF_futrunc.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_futrunc.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_futrunc.Tpo $(DEPDIR)/cl_FF_futrunc.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/elem/cl_FF_futrunc.cc' object='cl_FF_futrunc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_futrunc.lo `test -f 'float/ffloat/elem/cl_FF_futrunc.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_futrunc.cc cl_FF_globals.lo: float/ffloat/elem/cl_FF_globals.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_globals.lo -MD -MP -MF $(DEPDIR)/cl_FF_globals.Tpo -c -o cl_FF_globals.lo `test -f 'float/ffloat/elem/cl_FF_globals.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_globals.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_globals.Tpo $(DEPDIR)/cl_FF_globals.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/elem/cl_FF_globals.cc' object='cl_FF_globals.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_globals.lo `test -f 'float/ffloat/elem/cl_FF_globals.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_globals.cc cl_FF_minus.lo: float/ffloat/elem/cl_FF_minus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_minus.lo -MD -MP -MF $(DEPDIR)/cl_FF_minus.Tpo -c -o cl_FF_minus.lo `test -f 'float/ffloat/elem/cl_FF_minus.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_minus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_minus.Tpo $(DEPDIR)/cl_FF_minus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/elem/cl_FF_minus.cc' object='cl_FF_minus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_minus.lo `test -f 'float/ffloat/elem/cl_FF_minus.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_minus.cc cl_FF_minusp.lo: float/ffloat/elem/cl_FF_minusp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_minusp.lo -MD -MP -MF $(DEPDIR)/cl_FF_minusp.Tpo -c -o cl_FF_minusp.lo `test -f 'float/ffloat/elem/cl_FF_minusp.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_minusp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_minusp.Tpo $(DEPDIR)/cl_FF_minusp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/elem/cl_FF_minusp.cc' object='cl_FF_minusp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_minusp.lo `test -f 'float/ffloat/elem/cl_FF_minusp.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_minusp.cc cl_FF_mul.lo: float/ffloat/elem/cl_FF_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_mul.lo -MD -MP -MF $(DEPDIR)/cl_FF_mul.Tpo -c -o cl_FF_mul.lo `test -f 'float/ffloat/elem/cl_FF_mul.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_mul.Tpo $(DEPDIR)/cl_FF_mul.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/elem/cl_FF_mul.cc' object='cl_FF_mul.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_mul.lo `test -f 'float/ffloat/elem/cl_FF_mul.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_mul.cc cl_FF_plus.lo: float/ffloat/elem/cl_FF_plus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_plus.lo -MD -MP -MF $(DEPDIR)/cl_FF_plus.Tpo -c -o cl_FF_plus.lo `test -f 'float/ffloat/elem/cl_FF_plus.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_plus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_plus.Tpo $(DEPDIR)/cl_FF_plus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/elem/cl_FF_plus.cc' object='cl_FF_plus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_plus.lo `test -f 'float/ffloat/elem/cl_FF_plus.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_plus.cc cl_FF_plusp.lo: float/ffloat/elem/cl_FF_plusp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_plusp.lo -MD -MP -MF $(DEPDIR)/cl_FF_plusp.Tpo -c -o cl_FF_plusp.lo `test -f 'float/ffloat/elem/cl_FF_plusp.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_plusp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_plusp.Tpo $(DEPDIR)/cl_FF_plusp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/elem/cl_FF_plusp.cc' object='cl_FF_plusp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_plusp.lo `test -f 'float/ffloat/elem/cl_FF_plusp.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_plusp.cc cl_FF_scale.lo: float/ffloat/elem/cl_FF_scale.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_scale.lo -MD -MP -MF $(DEPDIR)/cl_FF_scale.Tpo -c -o cl_FF_scale.lo `test -f 'float/ffloat/elem/cl_FF_scale.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_scale.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_scale.Tpo $(DEPDIR)/cl_FF_scale.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/elem/cl_FF_scale.cc' object='cl_FF_scale.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_scale.lo `test -f 'float/ffloat/elem/cl_FF_scale.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_scale.cc cl_FF_scale_I.lo: float/ffloat/elem/cl_FF_scale_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_scale_I.lo -MD -MP -MF $(DEPDIR)/cl_FF_scale_I.Tpo -c -o cl_FF_scale_I.lo `test -f 'float/ffloat/elem/cl_FF_scale_I.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_scale_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_scale_I.Tpo $(DEPDIR)/cl_FF_scale_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/elem/cl_FF_scale_I.cc' object='cl_FF_scale_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_scale_I.lo `test -f 'float/ffloat/elem/cl_FF_scale_I.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_scale_I.cc cl_FF_to_I.lo: float/ffloat/elem/cl_FF_to_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_to_I.lo -MD -MP -MF $(DEPDIR)/cl_FF_to_I.Tpo -c -o cl_FF_to_I.lo `test -f 'float/ffloat/elem/cl_FF_to_I.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_to_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_to_I.Tpo $(DEPDIR)/cl_FF_to_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/elem/cl_FF_to_I.cc' object='cl_FF_to_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_to_I.lo `test -f 'float/ffloat/elem/cl_FF_to_I.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_to_I.cc cl_FF_uminus.lo: float/ffloat/elem/cl_FF_uminus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_uminus.lo -MD -MP -MF $(DEPDIR)/cl_FF_uminus.Tpo -c -o cl_FF_uminus.lo `test -f 'float/ffloat/elem/cl_FF_uminus.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_uminus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_uminus.Tpo $(DEPDIR)/cl_FF_uminus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/elem/cl_FF_uminus.cc' object='cl_FF_uminus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_uminus.lo `test -f 'float/ffloat/elem/cl_FF_uminus.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_uminus.cc cl_FF_zerop.lo: float/ffloat/elem/cl_FF_zerop.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_zerop.lo -MD -MP -MF $(DEPDIR)/cl_FF_zerop.Tpo -c -o cl_FF_zerop.lo `test -f 'float/ffloat/elem/cl_FF_zerop.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_zerop.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_zerop.Tpo $(DEPDIR)/cl_FF_zerop.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/elem/cl_FF_zerop.cc' object='cl_FF_zerop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_zerop.lo `test -f 'float/ffloat/elem/cl_FF_zerop.cc' || echo '$(srcdir)/'`float/ffloat/elem/cl_FF_zerop.cc cl_FF_from_string.lo: float/ffloat/input/cl_FF_from_string.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_from_string.lo -MD -MP -MF $(DEPDIR)/cl_FF_from_string.Tpo -c -o cl_FF_from_string.lo `test -f 'float/ffloat/input/cl_FF_from_string.cc' || echo '$(srcdir)/'`float/ffloat/input/cl_FF_from_string.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_from_string.Tpo $(DEPDIR)/cl_FF_from_string.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/input/cl_FF_from_string.cc' object='cl_FF_from_string.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_from_string.lo `test -f 'float/ffloat/input/cl_FF_from_string.cc' || echo '$(srcdir)/'`float/ffloat/input/cl_FF_from_string.cc cl_FF_abs.lo: float/ffloat/misc/cl_FF_abs.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_abs.lo -MD -MP -MF $(DEPDIR)/cl_FF_abs.Tpo -c -o cl_FF_abs.lo `test -f 'float/ffloat/misc/cl_FF_abs.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_abs.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_abs.Tpo $(DEPDIR)/cl_FF_abs.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/misc/cl_FF_abs.cc' object='cl_FF_abs.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_abs.lo `test -f 'float/ffloat/misc/cl_FF_abs.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_abs.cc cl_FF_as.lo: float/ffloat/misc/cl_FF_as.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_as.lo -MD -MP -MF $(DEPDIR)/cl_FF_as.Tpo -c -o cl_FF_as.lo `test -f 'float/ffloat/misc/cl_FF_as.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_as.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_as.Tpo $(DEPDIR)/cl_FF_as.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/misc/cl_FF_as.cc' object='cl_FF_as.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_as.lo `test -f 'float/ffloat/misc/cl_FF_as.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_as.cc cl_FF_class.lo: float/ffloat/misc/cl_FF_class.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_class.lo -MD -MP -MF $(DEPDIR)/cl_FF_class.Tpo -c -o cl_FF_class.lo `test -f 'float/ffloat/misc/cl_FF_class.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_class.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_class.Tpo $(DEPDIR)/cl_FF_class.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/misc/cl_FF_class.cc' object='cl_FF_class.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_class.lo `test -f 'float/ffloat/misc/cl_FF_class.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_class.cc cl_FF_debug.lo: float/ffloat/misc/cl_FF_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_debug.lo -MD -MP -MF $(DEPDIR)/cl_FF_debug.Tpo -c -o cl_FF_debug.lo `test -f 'float/ffloat/misc/cl_FF_debug.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_debug.Tpo $(DEPDIR)/cl_FF_debug.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/misc/cl_FF_debug.cc' object='cl_FF_debug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_debug.lo `test -f 'float/ffloat/misc/cl_FF_debug.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_debug.cc cl_FF_decode.lo: float/ffloat/misc/cl_FF_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_decode.lo -MD -MP -MF $(DEPDIR)/cl_FF_decode.Tpo -c -o cl_FF_decode.lo `test -f 'float/ffloat/misc/cl_FF_decode.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_decode.Tpo $(DEPDIR)/cl_FF_decode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/misc/cl_FF_decode.cc' object='cl_FF_decode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_decode.lo `test -f 'float/ffloat/misc/cl_FF_decode.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_decode.cc cl_FF_digits.lo: float/ffloat/misc/cl_FF_digits.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_digits.lo -MD -MP -MF $(DEPDIR)/cl_FF_digits.Tpo -c -o cl_FF_digits.lo `test -f 'float/ffloat/misc/cl_FF_digits.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_digits.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_digits.Tpo $(DEPDIR)/cl_FF_digits.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/misc/cl_FF_digits.cc' object='cl_FF_digits.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_digits.lo `test -f 'float/ffloat/misc/cl_FF_digits.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_digits.cc cl_FF_eqhashcode.lo: float/ffloat/misc/cl_FF_eqhashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_eqhashcode.lo -MD -MP -MF $(DEPDIR)/cl_FF_eqhashcode.Tpo -c -o cl_FF_eqhashcode.lo `test -f 'float/ffloat/misc/cl_FF_eqhashcode.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_eqhashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_eqhashcode.Tpo $(DEPDIR)/cl_FF_eqhashcode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/misc/cl_FF_eqhashcode.cc' object='cl_FF_eqhashcode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_eqhashcode.lo `test -f 'float/ffloat/misc/cl_FF_eqhashcode.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_eqhashcode.cc cl_FF_exponent.lo: float/ffloat/misc/cl_FF_exponent.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_exponent.lo -MD -MP -MF $(DEPDIR)/cl_FF_exponent.Tpo -c -o cl_FF_exponent.lo `test -f 'float/ffloat/misc/cl_FF_exponent.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_exponent.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_exponent.Tpo $(DEPDIR)/cl_FF_exponent.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/misc/cl_FF_exponent.cc' object='cl_FF_exponent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_exponent.lo `test -f 'float/ffloat/misc/cl_FF_exponent.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_exponent.cc cl_FF_idecode.lo: float/ffloat/misc/cl_FF_idecode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_idecode.lo -MD -MP -MF $(DEPDIR)/cl_FF_idecode.Tpo -c -o cl_FF_idecode.lo `test -f 'float/ffloat/misc/cl_FF_idecode.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_idecode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_idecode.Tpo $(DEPDIR)/cl_FF_idecode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/misc/cl_FF_idecode.cc' object='cl_FF_idecode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_idecode.lo `test -f 'float/ffloat/misc/cl_FF_idecode.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_idecode.cc cl_FF_max.lo: float/ffloat/misc/cl_FF_max.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_max.lo -MD -MP -MF $(DEPDIR)/cl_FF_max.Tpo -c -o cl_FF_max.lo `test -f 'float/ffloat/misc/cl_FF_max.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_max.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_max.Tpo $(DEPDIR)/cl_FF_max.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/misc/cl_FF_max.cc' object='cl_FF_max.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_max.lo `test -f 'float/ffloat/misc/cl_FF_max.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_max.cc cl_FF_min.lo: float/ffloat/misc/cl_FF_min.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_min.lo -MD -MP -MF $(DEPDIR)/cl_FF_min.Tpo -c -o cl_FF_min.lo `test -f 'float/ffloat/misc/cl_FF_min.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_min.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_min.Tpo $(DEPDIR)/cl_FF_min.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/misc/cl_FF_min.cc' object='cl_FF_min.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_min.lo `test -f 'float/ffloat/misc/cl_FF_min.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_min.cc cl_FF_precision.lo: float/ffloat/misc/cl_FF_precision.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_precision.lo -MD -MP -MF $(DEPDIR)/cl_FF_precision.Tpo -c -o cl_FF_precision.lo `test -f 'float/ffloat/misc/cl_FF_precision.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_precision.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_precision.Tpo $(DEPDIR)/cl_FF_precision.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/misc/cl_FF_precision.cc' object='cl_FF_precision.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_precision.lo `test -f 'float/ffloat/misc/cl_FF_precision.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_precision.cc cl_FF_sign.lo: float/ffloat/misc/cl_FF_sign.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_sign.lo -MD -MP -MF $(DEPDIR)/cl_FF_sign.Tpo -c -o cl_FF_sign.lo `test -f 'float/ffloat/misc/cl_FF_sign.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_sign.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_sign.Tpo $(DEPDIR)/cl_FF_sign.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/misc/cl_FF_sign.cc' object='cl_FF_sign.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_sign.lo `test -f 'float/ffloat/misc/cl_FF_sign.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_sign.cc cl_FF_signum.lo: float/ffloat/misc/cl_FF_signum.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FF_signum.lo -MD -MP -MF $(DEPDIR)/cl_FF_signum.Tpo -c -o cl_FF_signum.lo `test -f 'float/ffloat/misc/cl_FF_signum.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_signum.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FF_signum.Tpo $(DEPDIR)/cl_FF_signum.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/ffloat/misc/cl_FF_signum.cc' object='cl_FF_signum.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FF_signum.lo `test -f 'float/ffloat/misc/cl_FF_signum.cc' || echo '$(srcdir)/'`float/ffloat/misc/cl_FF_signum.cc cl_F_from_string.lo: float/input/cl_F_from_string.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_from_string.lo -MD -MP -MF $(DEPDIR)/cl_F_from_string.Tpo -c -o cl_F_from_string.lo `test -f 'float/input/cl_F_from_string.cc' || echo '$(srcdir)/'`float/input/cl_F_from_string.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_from_string.Tpo $(DEPDIR)/cl_F_from_string.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/input/cl_F_from_string.cc' object='cl_F_from_string.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_from_string.lo `test -f 'float/input/cl_F_from_string.cc' || echo '$(srcdir)/'`float/input/cl_F_from_string.cc cl_F_read.lo: float/input/cl_F_read.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_read.lo -MD -MP -MF $(DEPDIR)/cl_F_read.Tpo -c -o cl_F_read.lo `test -f 'float/input/cl_F_read.cc' || echo '$(srcdir)/'`float/input/cl_F_read.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_read.Tpo $(DEPDIR)/cl_F_read.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/input/cl_F_read.cc' object='cl_F_read.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_read.lo `test -f 'float/input/cl_F_read.cc' || echo '$(srcdir)/'`float/input/cl_F_read.cc cl_F_read_stream.lo: float/input/cl_F_read_stream.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_read_stream.lo -MD -MP -MF $(DEPDIR)/cl_F_read_stream.Tpo -c -o cl_F_read_stream.lo `test -f 'float/input/cl_F_read_stream.cc' || echo '$(srcdir)/'`float/input/cl_F_read_stream.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_read_stream.Tpo $(DEPDIR)/cl_F_read_stream.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/input/cl_F_read_stream.cc' object='cl_F_read_stream.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_read_stream.lo `test -f 'float/input/cl_F_read_stream.cc' || echo '$(srcdir)/'`float/input/cl_F_read_stream.cc cl_F_readparsed.lo: float/input/cl_F_readparsed.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_readparsed.lo -MD -MP -MF $(DEPDIR)/cl_F_readparsed.Tpo -c -o cl_F_readparsed.lo `test -f 'float/input/cl_F_readparsed.cc' || echo '$(srcdir)/'`float/input/cl_F_readparsed.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_readparsed.Tpo $(DEPDIR)/cl_F_readparsed.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/input/cl_F_readparsed.cc' object='cl_F_readparsed.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_readparsed.lo `test -f 'float/input/cl_F_readparsed.cc' || echo '$(srcdir)/'`float/input/cl_F_readparsed.cc cl_LF_sqrt.lo: float/lfloat/algebraic/cl_LF_sqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_sqrt.lo -MD -MP -MF $(DEPDIR)/cl_LF_sqrt.Tpo -c -o cl_LF_sqrt.lo `test -f 'float/lfloat/algebraic/cl_LF_sqrt.cc' || echo '$(srcdir)/'`float/lfloat/algebraic/cl_LF_sqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_sqrt.Tpo $(DEPDIR)/cl_LF_sqrt.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/algebraic/cl_LF_sqrt.cc' object='cl_LF_sqrt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_sqrt.lo `test -f 'float/lfloat/algebraic/cl_LF_sqrt.cc' || echo '$(srcdir)/'`float/lfloat/algebraic/cl_LF_sqrt.cc cl_LF_ceil22.lo: float/lfloat/division/cl_LF_ceil22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ceil22.lo -MD -MP -MF $(DEPDIR)/cl_LF_ceil22.Tpo -c -o cl_LF_ceil22.lo `test -f 'float/lfloat/division/cl_LF_ceil22.cc' || echo '$(srcdir)/'`float/lfloat/division/cl_LF_ceil22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ceil22.Tpo $(DEPDIR)/cl_LF_ceil22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/division/cl_LF_ceil22.cc' object='cl_LF_ceil22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ceil22.lo `test -f 'float/lfloat/division/cl_LF_ceil22.cc' || echo '$(srcdir)/'`float/lfloat/division/cl_LF_ceil22.cc cl_LF_fceil.lo: float/lfloat/division/cl_LF_fceil.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_fceil.lo -MD -MP -MF $(DEPDIR)/cl_LF_fceil.Tpo -c -o cl_LF_fceil.lo `test -f 'float/lfloat/division/cl_LF_fceil.cc' || echo '$(srcdir)/'`float/lfloat/division/cl_LF_fceil.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_fceil.Tpo $(DEPDIR)/cl_LF_fceil.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/division/cl_LF_fceil.cc' object='cl_LF_fceil.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_fceil.lo `test -f 'float/lfloat/division/cl_LF_fceil.cc' || echo '$(srcdir)/'`float/lfloat/division/cl_LF_fceil.cc cl_LF_floor22.lo: float/lfloat/division/cl_LF_floor22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_floor22.lo -MD -MP -MF $(DEPDIR)/cl_LF_floor22.Tpo -c -o cl_LF_floor22.lo `test -f 'float/lfloat/division/cl_LF_floor22.cc' || echo '$(srcdir)/'`float/lfloat/division/cl_LF_floor22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_floor22.Tpo $(DEPDIR)/cl_LF_floor22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/division/cl_LF_floor22.cc' object='cl_LF_floor22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_floor22.lo `test -f 'float/lfloat/division/cl_LF_floor22.cc' || echo '$(srcdir)/'`float/lfloat/division/cl_LF_floor22.cc cl_LF_recip.lo: float/lfloat/division/cl_LF_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_recip.lo -MD -MP -MF $(DEPDIR)/cl_LF_recip.Tpo -c -o cl_LF_recip.lo `test -f 'float/lfloat/division/cl_LF_recip.cc' || echo '$(srcdir)/'`float/lfloat/division/cl_LF_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_recip.Tpo $(DEPDIR)/cl_LF_recip.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/division/cl_LF_recip.cc' object='cl_LF_recip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_recip.lo `test -f 'float/lfloat/division/cl_LF_recip.cc' || echo '$(srcdir)/'`float/lfloat/division/cl_LF_recip.cc cl_LF_round22.lo: float/lfloat/division/cl_LF_round22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_round22.lo -MD -MP -MF $(DEPDIR)/cl_LF_round22.Tpo -c -o cl_LF_round22.lo `test -f 'float/lfloat/division/cl_LF_round22.cc' || echo '$(srcdir)/'`float/lfloat/division/cl_LF_round22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_round22.Tpo $(DEPDIR)/cl_LF_round22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/division/cl_LF_round22.cc' object='cl_LF_round22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_round22.lo `test -f 'float/lfloat/division/cl_LF_round22.cc' || echo '$(srcdir)/'`float/lfloat/division/cl_LF_round22.cc cl_LF_trunc22.lo: float/lfloat/division/cl_LF_trunc22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_trunc22.lo -MD -MP -MF $(DEPDIR)/cl_LF_trunc22.Tpo -c -o cl_LF_trunc22.lo `test -f 'float/lfloat/division/cl_LF_trunc22.cc' || echo '$(srcdir)/'`float/lfloat/division/cl_LF_trunc22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_trunc22.Tpo $(DEPDIR)/cl_LF_trunc22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/division/cl_LF_trunc22.cc' object='cl_LF_trunc22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_trunc22.lo `test -f 'float/lfloat/division/cl_LF_trunc22.cc' || echo '$(srcdir)/'`float/lfloat/division/cl_LF_trunc22.cc cl_I_LF_div.lo: float/lfloat/elem/cl_I_LF_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_LF_div.lo -MD -MP -MF $(DEPDIR)/cl_I_LF_div.Tpo -c -o cl_I_LF_div.lo `test -f 'float/lfloat/elem/cl_I_LF_div.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_I_LF_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_LF_div.Tpo $(DEPDIR)/cl_I_LF_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_I_LF_div.cc' object='cl_I_LF_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_LF_div.lo `test -f 'float/lfloat/elem/cl_I_LF_div.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_I_LF_div.cc cl_LF_1minus.lo: float/lfloat/elem/cl_LF_1minus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_1minus.lo -MD -MP -MF $(DEPDIR)/cl_LF_1minus.Tpo -c -o cl_LF_1minus.lo `test -f 'float/lfloat/elem/cl_LF_1minus.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_1minus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_1minus.Tpo $(DEPDIR)/cl_LF_1minus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_1minus.cc' object='cl_LF_1minus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_1minus.lo `test -f 'float/lfloat/elem/cl_LF_1minus.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_1minus.cc cl_LF_1plus.lo: float/lfloat/elem/cl_LF_1plus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_1plus.lo -MD -MP -MF $(DEPDIR)/cl_LF_1plus.Tpo -c -o cl_LF_1plus.lo `test -f 'float/lfloat/elem/cl_LF_1plus.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_1plus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_1plus.Tpo $(DEPDIR)/cl_LF_1plus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_1plus.cc' object='cl_LF_1plus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_1plus.lo `test -f 'float/lfloat/elem/cl_LF_1plus.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_1plus.cc cl_LF_2minus.lo: float/lfloat/elem/cl_LF_2minus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_2minus.lo -MD -MP -MF $(DEPDIR)/cl_LF_2minus.Tpo -c -o cl_LF_2minus.lo `test -f 'float/lfloat/elem/cl_LF_2minus.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_2minus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_2minus.Tpo $(DEPDIR)/cl_LF_2minus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_2minus.cc' object='cl_LF_2minus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_2minus.lo `test -f 'float/lfloat/elem/cl_LF_2minus.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_2minus.cc cl_LF_2plus.lo: float/lfloat/elem/cl_LF_2plus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_2plus.lo -MD -MP -MF $(DEPDIR)/cl_LF_2plus.Tpo -c -o cl_LF_2plus.lo `test -f 'float/lfloat/elem/cl_LF_2plus.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_2plus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_2plus.Tpo $(DEPDIR)/cl_LF_2plus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_2plus.cc' object='cl_LF_2plus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_2plus.lo `test -f 'float/lfloat/elem/cl_LF_2plus.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_2plus.cc cl_LF_I_div.lo: float/lfloat/elem/cl_LF_I_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_I_div.lo -MD -MP -MF $(DEPDIR)/cl_LF_I_div.Tpo -c -o cl_LF_I_div.lo `test -f 'float/lfloat/elem/cl_LF_I_div.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_I_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_I_div.Tpo $(DEPDIR)/cl_LF_I_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_I_div.cc' object='cl_LF_I_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_I_div.lo `test -f 'float/lfloat/elem/cl_LF_I_div.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_I_div.cc cl_LF_I_mul.lo: float/lfloat/elem/cl_LF_I_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_I_mul.lo -MD -MP -MF $(DEPDIR)/cl_LF_I_mul.Tpo -c -o cl_LF_I_mul.lo `test -f 'float/lfloat/elem/cl_LF_I_mul.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_I_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_I_mul.Tpo $(DEPDIR)/cl_LF_I_mul.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_I_mul.cc' object='cl_LF_I_mul.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_I_mul.lo `test -f 'float/lfloat/elem/cl_LF_I_mul.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_I_mul.cc cl_LF_RA_div.lo: float/lfloat/elem/cl_LF_RA_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_RA_div.lo -MD -MP -MF $(DEPDIR)/cl_LF_RA_div.Tpo -c -o cl_LF_RA_div.lo `test -f 'float/lfloat/elem/cl_LF_RA_div.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_RA_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_RA_div.Tpo $(DEPDIR)/cl_LF_RA_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_RA_div.cc' object='cl_LF_RA_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_RA_div.lo `test -f 'float/lfloat/elem/cl_LF_RA_div.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_RA_div.cc cl_LF_RA_mul.lo: float/lfloat/elem/cl_LF_RA_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_RA_mul.lo -MD -MP -MF $(DEPDIR)/cl_LF_RA_mul.Tpo -c -o cl_LF_RA_mul.lo `test -f 'float/lfloat/elem/cl_LF_RA_mul.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_RA_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_RA_mul.Tpo $(DEPDIR)/cl_LF_RA_mul.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_RA_mul.cc' object='cl_LF_RA_mul.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_RA_mul.lo `test -f 'float/lfloat/elem/cl_LF_RA_mul.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_RA_mul.cc cl_LF_compare.lo: float/lfloat/elem/cl_LF_compare.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_compare.lo -MD -MP -MF $(DEPDIR)/cl_LF_compare.Tpo -c -o cl_LF_compare.lo `test -f 'float/lfloat/elem/cl_LF_compare.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_compare.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_compare.Tpo $(DEPDIR)/cl_LF_compare.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_compare.cc' object='cl_LF_compare.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_compare.lo `test -f 'float/lfloat/elem/cl_LF_compare.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_compare.cc cl_LF_div.lo: float/lfloat/elem/cl_LF_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_div.lo -MD -MP -MF $(DEPDIR)/cl_LF_div.Tpo -c -o cl_LF_div.lo `test -f 'float/lfloat/elem/cl_LF_div.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_div.Tpo $(DEPDIR)/cl_LF_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_div.cc' object='cl_LF_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_div.lo `test -f 'float/lfloat/elem/cl_LF_div.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_div.cc cl_LF_ffloor.lo: float/lfloat/elem/cl_LF_ffloor.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ffloor.lo -MD -MP -MF $(DEPDIR)/cl_LF_ffloor.Tpo -c -o cl_LF_ffloor.lo `test -f 'float/lfloat/elem/cl_LF_ffloor.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_ffloor.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ffloor.Tpo $(DEPDIR)/cl_LF_ffloor.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_ffloor.cc' object='cl_LF_ffloor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ffloor.lo `test -f 'float/lfloat/elem/cl_LF_ffloor.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_ffloor.cc cl_LF_from_I.lo: float/lfloat/elem/cl_LF_from_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_from_I.lo -MD -MP -MF $(DEPDIR)/cl_LF_from_I.Tpo -c -o cl_LF_from_I.lo `test -f 'float/lfloat/elem/cl_LF_from_I.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_from_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_from_I.Tpo $(DEPDIR)/cl_LF_from_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_from_I.cc' object='cl_LF_from_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_from_I.lo `test -f 'float/lfloat/elem/cl_LF_from_I.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_from_I.cc cl_LF_from_RA.lo: float/lfloat/elem/cl_LF_from_RA.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_from_RA.lo -MD -MP -MF $(DEPDIR)/cl_LF_from_RA.Tpo -c -o cl_LF_from_RA.lo `test -f 'float/lfloat/elem/cl_LF_from_RA.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_from_RA.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_from_RA.Tpo $(DEPDIR)/cl_LF_from_RA.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_from_RA.cc' object='cl_LF_from_RA.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_from_RA.lo `test -f 'float/lfloat/elem/cl_LF_from_RA.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_from_RA.cc cl_LF_fround.lo: float/lfloat/elem/cl_LF_fround.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_fround.lo -MD -MP -MF $(DEPDIR)/cl_LF_fround.Tpo -c -o cl_LF_fround.lo `test -f 'float/lfloat/elem/cl_LF_fround.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_fround.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_fround.Tpo $(DEPDIR)/cl_LF_fround.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_fround.cc' object='cl_LF_fround.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_fround.lo `test -f 'float/lfloat/elem/cl_LF_fround.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_fround.cc cl_LF_ftrunc.lo: float/lfloat/elem/cl_LF_ftrunc.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ftrunc.lo -MD -MP -MF $(DEPDIR)/cl_LF_ftrunc.Tpo -c -o cl_LF_ftrunc.lo `test -f 'float/lfloat/elem/cl_LF_ftrunc.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_ftrunc.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ftrunc.Tpo $(DEPDIR)/cl_LF_ftrunc.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_ftrunc.cc' object='cl_LF_ftrunc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ftrunc.lo `test -f 'float/lfloat/elem/cl_LF_ftrunc.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_ftrunc.cc cl_LF_futrunc.lo: float/lfloat/elem/cl_LF_futrunc.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_futrunc.lo -MD -MP -MF $(DEPDIR)/cl_LF_futrunc.Tpo -c -o cl_LF_futrunc.lo `test -f 'float/lfloat/elem/cl_LF_futrunc.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_futrunc.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_futrunc.Tpo $(DEPDIR)/cl_LF_futrunc.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_futrunc.cc' object='cl_LF_futrunc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_futrunc.lo `test -f 'float/lfloat/elem/cl_LF_futrunc.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_futrunc.cc cl_LF_globals.lo: float/lfloat/elem/cl_LF_globals.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_globals.lo -MD -MP -MF $(DEPDIR)/cl_LF_globals.Tpo -c -o cl_LF_globals.lo `test -f 'float/lfloat/elem/cl_LF_globals.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_globals.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_globals.Tpo $(DEPDIR)/cl_LF_globals.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_globals.cc' object='cl_LF_globals.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_globals.lo `test -f 'float/lfloat/elem/cl_LF_globals.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_globals.cc cl_LF_minus1.lo: float/lfloat/elem/cl_LF_minus1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_minus1.lo -MD -MP -MF $(DEPDIR)/cl_LF_minus1.Tpo -c -o cl_LF_minus1.lo `test -f 'float/lfloat/elem/cl_LF_minus1.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_minus1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_minus1.Tpo $(DEPDIR)/cl_LF_minus1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_minus1.cc' object='cl_LF_minus1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_minus1.lo `test -f 'float/lfloat/elem/cl_LF_minus1.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_minus1.cc cl_LF_minusp.lo: float/lfloat/elem/cl_LF_minusp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_minusp.lo -MD -MP -MF $(DEPDIR)/cl_LF_minusp.Tpo -c -o cl_LF_minusp.lo `test -f 'float/lfloat/elem/cl_LF_minusp.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_minusp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_minusp.Tpo $(DEPDIR)/cl_LF_minusp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_minusp.cc' object='cl_LF_minusp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_minusp.lo `test -f 'float/lfloat/elem/cl_LF_minusp.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_minusp.cc cl_LF_mul.lo: float/lfloat/elem/cl_LF_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_mul.lo -MD -MP -MF $(DEPDIR)/cl_LF_mul.Tpo -c -o cl_LF_mul.lo `test -f 'float/lfloat/elem/cl_LF_mul.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_mul.Tpo $(DEPDIR)/cl_LF_mul.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_mul.cc' object='cl_LF_mul.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_mul.lo `test -f 'float/lfloat/elem/cl_LF_mul.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_mul.cc cl_LF_plus1.lo: float/lfloat/elem/cl_LF_plus1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_plus1.lo -MD -MP -MF $(DEPDIR)/cl_LF_plus1.Tpo -c -o cl_LF_plus1.lo `test -f 'float/lfloat/elem/cl_LF_plus1.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_plus1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_plus1.Tpo $(DEPDIR)/cl_LF_plus1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_plus1.cc' object='cl_LF_plus1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_plus1.lo `test -f 'float/lfloat/elem/cl_LF_plus1.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_plus1.cc cl_LF_plusp.lo: float/lfloat/elem/cl_LF_plusp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_plusp.lo -MD -MP -MF $(DEPDIR)/cl_LF_plusp.Tpo -c -o cl_LF_plusp.lo `test -f 'float/lfloat/elem/cl_LF_plusp.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_plusp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_plusp.Tpo $(DEPDIR)/cl_LF_plusp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_plusp.cc' object='cl_LF_plusp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_plusp.lo `test -f 'float/lfloat/elem/cl_LF_plusp.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_plusp.cc cl_LF_scale.lo: float/lfloat/elem/cl_LF_scale.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_scale.lo -MD -MP -MF $(DEPDIR)/cl_LF_scale.Tpo -c -o cl_LF_scale.lo `test -f 'float/lfloat/elem/cl_LF_scale.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_scale.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_scale.Tpo $(DEPDIR)/cl_LF_scale.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_scale.cc' object='cl_LF_scale.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_scale.lo `test -f 'float/lfloat/elem/cl_LF_scale.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_scale.cc cl_LF_scale_I.lo: float/lfloat/elem/cl_LF_scale_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_scale_I.lo -MD -MP -MF $(DEPDIR)/cl_LF_scale_I.Tpo -c -o cl_LF_scale_I.lo `test -f 'float/lfloat/elem/cl_LF_scale_I.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_scale_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_scale_I.Tpo $(DEPDIR)/cl_LF_scale_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_scale_I.cc' object='cl_LF_scale_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_scale_I.lo `test -f 'float/lfloat/elem/cl_LF_scale_I.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_scale_I.cc cl_LF_square.lo: float/lfloat/elem/cl_LF_square.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_square.lo -MD -MP -MF $(DEPDIR)/cl_LF_square.Tpo -c -o cl_LF_square.lo `test -f 'float/lfloat/elem/cl_LF_square.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_square.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_square.Tpo $(DEPDIR)/cl_LF_square.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_square.cc' object='cl_LF_square.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_square.lo `test -f 'float/lfloat/elem/cl_LF_square.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_square.cc cl_LF_to_I.lo: float/lfloat/elem/cl_LF_to_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_to_I.lo -MD -MP -MF $(DEPDIR)/cl_LF_to_I.Tpo -c -o cl_LF_to_I.lo `test -f 'float/lfloat/elem/cl_LF_to_I.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_to_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_to_I.Tpo $(DEPDIR)/cl_LF_to_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_to_I.cc' object='cl_LF_to_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_to_I.lo `test -f 'float/lfloat/elem/cl_LF_to_I.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_to_I.cc cl_LF_uminus.lo: float/lfloat/elem/cl_LF_uminus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_uminus.lo -MD -MP -MF $(DEPDIR)/cl_LF_uminus.Tpo -c -o cl_LF_uminus.lo `test -f 'float/lfloat/elem/cl_LF_uminus.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_uminus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_uminus.Tpo $(DEPDIR)/cl_LF_uminus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_uminus.cc' object='cl_LF_uminus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_uminus.lo `test -f 'float/lfloat/elem/cl_LF_uminus.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_uminus.cc cl_LF_zerop.lo: float/lfloat/elem/cl_LF_zerop.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_zerop.lo -MD -MP -MF $(DEPDIR)/cl_LF_zerop.Tpo -c -o cl_LF_zerop.lo `test -f 'float/lfloat/elem/cl_LF_zerop.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_zerop.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_zerop.Tpo $(DEPDIR)/cl_LF_zerop.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_LF_zerop.cc' object='cl_LF_zerop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_zerop.lo `test -f 'float/lfloat/elem/cl_LF_zerop.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_LF_zerop.cc cl_RA_LF_div.lo: float/lfloat/elem/cl_RA_LF_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_LF_div.lo -MD -MP -MF $(DEPDIR)/cl_RA_LF_div.Tpo -c -o cl_RA_LF_div.lo `test -f 'float/lfloat/elem/cl_RA_LF_div.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_RA_LF_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_LF_div.Tpo $(DEPDIR)/cl_RA_LF_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/elem/cl_RA_LF_div.cc' object='cl_RA_LF_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_LF_div.lo `test -f 'float/lfloat/elem/cl_RA_LF_div.cc' || echo '$(srcdir)/'`float/lfloat/elem/cl_RA_LF_div.cc cl_LF_from_string.lo: float/lfloat/input/cl_LF_from_string.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_from_string.lo -MD -MP -MF $(DEPDIR)/cl_LF_from_string.Tpo -c -o cl_LF_from_string.lo `test -f 'float/lfloat/input/cl_LF_from_string.cc' || echo '$(srcdir)/'`float/lfloat/input/cl_LF_from_string.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_from_string.Tpo $(DEPDIR)/cl_LF_from_string.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/input/cl_LF_from_string.cc' object='cl_LF_from_string.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_from_string.lo `test -f 'float/lfloat/input/cl_LF_from_string.cc' || echo '$(srcdir)/'`float/lfloat/input/cl_LF_from_string.cc cl_LF_abs.lo: float/lfloat/misc/cl_LF_abs.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_abs.lo -MD -MP -MF $(DEPDIR)/cl_LF_abs.Tpo -c -o cl_LF_abs.lo `test -f 'float/lfloat/misc/cl_LF_abs.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_abs.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_abs.Tpo $(DEPDIR)/cl_LF_abs.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/misc/cl_LF_abs.cc' object='cl_LF_abs.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_abs.lo `test -f 'float/lfloat/misc/cl_LF_abs.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_abs.cc cl_LF_as.lo: float/lfloat/misc/cl_LF_as.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_as.lo -MD -MP -MF $(DEPDIR)/cl_LF_as.Tpo -c -o cl_LF_as.lo `test -f 'float/lfloat/misc/cl_LF_as.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_as.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_as.Tpo $(DEPDIR)/cl_LF_as.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/misc/cl_LF_as.cc' object='cl_LF_as.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_as.lo `test -f 'float/lfloat/misc/cl_LF_as.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_as.cc cl_LF_class.lo: float/lfloat/misc/cl_LF_class.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_class.lo -MD -MP -MF $(DEPDIR)/cl_LF_class.Tpo -c -o cl_LF_class.lo `test -f 'float/lfloat/misc/cl_LF_class.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_class.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_class.Tpo $(DEPDIR)/cl_LF_class.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/misc/cl_LF_class.cc' object='cl_LF_class.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_class.lo `test -f 'float/lfloat/misc/cl_LF_class.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_class.cc cl_LF_debug.lo: float/lfloat/misc/cl_LF_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_debug.lo -MD -MP -MF $(DEPDIR)/cl_LF_debug.Tpo -c -o cl_LF_debug.lo `test -f 'float/lfloat/misc/cl_LF_debug.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_debug.Tpo $(DEPDIR)/cl_LF_debug.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/misc/cl_LF_debug.cc' object='cl_LF_debug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_debug.lo `test -f 'float/lfloat/misc/cl_LF_debug.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_debug.cc cl_LF_decode.lo: float/lfloat/misc/cl_LF_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_decode.lo -MD -MP -MF $(DEPDIR)/cl_LF_decode.Tpo -c -o cl_LF_decode.lo `test -f 'float/lfloat/misc/cl_LF_decode.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_decode.Tpo $(DEPDIR)/cl_LF_decode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/misc/cl_LF_decode.cc' object='cl_LF_decode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_decode.lo `test -f 'float/lfloat/misc/cl_LF_decode.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_decode.cc cl_LF_digits.lo: float/lfloat/misc/cl_LF_digits.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_digits.lo -MD -MP -MF $(DEPDIR)/cl_LF_digits.Tpo -c -o cl_LF_digits.lo `test -f 'float/lfloat/misc/cl_LF_digits.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_digits.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_digits.Tpo $(DEPDIR)/cl_LF_digits.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/misc/cl_LF_digits.cc' object='cl_LF_digits.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_digits.lo `test -f 'float/lfloat/misc/cl_LF_digits.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_digits.cc cl_LF_eqhashcode.lo: float/lfloat/misc/cl_LF_eqhashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_eqhashcode.lo -MD -MP -MF $(DEPDIR)/cl_LF_eqhashcode.Tpo -c -o cl_LF_eqhashcode.lo `test -f 'float/lfloat/misc/cl_LF_eqhashcode.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_eqhashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_eqhashcode.Tpo $(DEPDIR)/cl_LF_eqhashcode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/misc/cl_LF_eqhashcode.cc' object='cl_LF_eqhashcode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_eqhashcode.lo `test -f 'float/lfloat/misc/cl_LF_eqhashcode.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_eqhashcode.cc cl_LF_exponent.lo: float/lfloat/misc/cl_LF_exponent.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_exponent.lo -MD -MP -MF $(DEPDIR)/cl_LF_exponent.Tpo -c -o cl_LF_exponent.lo `test -f 'float/lfloat/misc/cl_LF_exponent.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_exponent.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_exponent.Tpo $(DEPDIR)/cl_LF_exponent.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/misc/cl_LF_exponent.cc' object='cl_LF_exponent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_exponent.lo `test -f 'float/lfloat/misc/cl_LF_exponent.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_exponent.cc cl_LF_extend.lo: float/lfloat/misc/cl_LF_extend.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_extend.lo -MD -MP -MF $(DEPDIR)/cl_LF_extend.Tpo -c -o cl_LF_extend.lo `test -f 'float/lfloat/misc/cl_LF_extend.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_extend.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_extend.Tpo $(DEPDIR)/cl_LF_extend.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/misc/cl_LF_extend.cc' object='cl_LF_extend.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_extend.lo `test -f 'float/lfloat/misc/cl_LF_extend.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_extend.cc cl_LF_idecode.lo: float/lfloat/misc/cl_LF_idecode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_idecode.lo -MD -MP -MF $(DEPDIR)/cl_LF_idecode.Tpo -c -o cl_LF_idecode.lo `test -f 'float/lfloat/misc/cl_LF_idecode.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_idecode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_idecode.Tpo $(DEPDIR)/cl_LF_idecode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/misc/cl_LF_idecode.cc' object='cl_LF_idecode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_idecode.lo `test -f 'float/lfloat/misc/cl_LF_idecode.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_idecode.cc cl_LF_leninc.lo: float/lfloat/misc/cl_LF_leninc.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_leninc.lo -MD -MP -MF $(DEPDIR)/cl_LF_leninc.Tpo -c -o cl_LF_leninc.lo `test -f 'float/lfloat/misc/cl_LF_leninc.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_leninc.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_leninc.Tpo $(DEPDIR)/cl_LF_leninc.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/misc/cl_LF_leninc.cc' object='cl_LF_leninc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_leninc.lo `test -f 'float/lfloat/misc/cl_LF_leninc.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_leninc.cc cl_LF_lenincx.lo: float/lfloat/misc/cl_LF_lenincx.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_lenincx.lo -MD -MP -MF $(DEPDIR)/cl_LF_lenincx.Tpo -c -o cl_LF_lenincx.lo `test -f 'float/lfloat/misc/cl_LF_lenincx.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_lenincx.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_lenincx.Tpo $(DEPDIR)/cl_LF_lenincx.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/misc/cl_LF_lenincx.cc' object='cl_LF_lenincx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_lenincx.lo `test -f 'float/lfloat/misc/cl_LF_lenincx.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_lenincx.cc cl_LF_max.lo: float/lfloat/misc/cl_LF_max.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_max.lo -MD -MP -MF $(DEPDIR)/cl_LF_max.Tpo -c -o cl_LF_max.lo `test -f 'float/lfloat/misc/cl_LF_max.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_max.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_max.Tpo $(DEPDIR)/cl_LF_max.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/misc/cl_LF_max.cc' object='cl_LF_max.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_max.lo `test -f 'float/lfloat/misc/cl_LF_max.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_max.cc cl_LF_min.lo: float/lfloat/misc/cl_LF_min.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_min.lo -MD -MP -MF $(DEPDIR)/cl_LF_min.Tpo -c -o cl_LF_min.lo `test -f 'float/lfloat/misc/cl_LF_min.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_min.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_min.Tpo $(DEPDIR)/cl_LF_min.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/misc/cl_LF_min.cc' object='cl_LF_min.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_min.lo `test -f 'float/lfloat/misc/cl_LF_min.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_min.cc cl_LF_precision.lo: float/lfloat/misc/cl_LF_precision.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_precision.lo -MD -MP -MF $(DEPDIR)/cl_LF_precision.Tpo -c -o cl_LF_precision.lo `test -f 'float/lfloat/misc/cl_LF_precision.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_precision.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_precision.Tpo $(DEPDIR)/cl_LF_precision.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/misc/cl_LF_precision.cc' object='cl_LF_precision.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_precision.lo `test -f 'float/lfloat/misc/cl_LF_precision.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_precision.cc cl_LF_shorten.lo: float/lfloat/misc/cl_LF_shorten.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_shorten.lo -MD -MP -MF $(DEPDIR)/cl_LF_shorten.Tpo -c -o cl_LF_shorten.lo `test -f 'float/lfloat/misc/cl_LF_shorten.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_shorten.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_shorten.Tpo $(DEPDIR)/cl_LF_shorten.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/misc/cl_LF_shorten.cc' object='cl_LF_shorten.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_shorten.lo `test -f 'float/lfloat/misc/cl_LF_shorten.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_shorten.cc cl_LF_shortenrel.lo: float/lfloat/misc/cl_LF_shortenrel.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_shortenrel.lo -MD -MP -MF $(DEPDIR)/cl_LF_shortenrel.Tpo -c -o cl_LF_shortenrel.lo `test -f 'float/lfloat/misc/cl_LF_shortenrel.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_shortenrel.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_shortenrel.Tpo $(DEPDIR)/cl_LF_shortenrel.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/misc/cl_LF_shortenrel.cc' object='cl_LF_shortenrel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_shortenrel.lo `test -f 'float/lfloat/misc/cl_LF_shortenrel.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_shortenrel.cc cl_LF_shortenwith.lo: float/lfloat/misc/cl_LF_shortenwith.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_shortenwith.lo -MD -MP -MF $(DEPDIR)/cl_LF_shortenwith.Tpo -c -o cl_LF_shortenwith.lo `test -f 'float/lfloat/misc/cl_LF_shortenwith.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_shortenwith.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_shortenwith.Tpo $(DEPDIR)/cl_LF_shortenwith.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/misc/cl_LF_shortenwith.cc' object='cl_LF_shortenwith.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_shortenwith.lo `test -f 'float/lfloat/misc/cl_LF_shortenwith.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_shortenwith.cc cl_LF_sign.lo: float/lfloat/misc/cl_LF_sign.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_sign.lo -MD -MP -MF $(DEPDIR)/cl_LF_sign.Tpo -c -o cl_LF_sign.lo `test -f 'float/lfloat/misc/cl_LF_sign.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_sign.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_sign.Tpo $(DEPDIR)/cl_LF_sign.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/misc/cl_LF_sign.cc' object='cl_LF_sign.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_sign.lo `test -f 'float/lfloat/misc/cl_LF_sign.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_sign.cc cl_LF_signum.lo: float/lfloat/misc/cl_LF_signum.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_signum.lo -MD -MP -MF $(DEPDIR)/cl_LF_signum.Tpo -c -o cl_LF_signum.lo `test -f 'float/lfloat/misc/cl_LF_signum.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_signum.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_signum.Tpo $(DEPDIR)/cl_LF_signum.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/misc/cl_LF_signum.cc' object='cl_LF_signum.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_signum.lo `test -f 'float/lfloat/misc/cl_LF_signum.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_signum.cc cl_LF_to_LF.lo: float/lfloat/misc/cl_LF_to_LF.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_to_LF.lo -MD -MP -MF $(DEPDIR)/cl_LF_to_LF.Tpo -c -o cl_LF_to_LF.lo `test -f 'float/lfloat/misc/cl_LF_to_LF.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_to_LF.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_to_LF.Tpo $(DEPDIR)/cl_LF_to_LF.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/lfloat/misc/cl_LF_to_LF.cc' object='cl_LF_to_LF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_to_LF.lo `test -f 'float/lfloat/misc/cl_LF_to_LF.cc' || echo '$(srcdir)/'`float/lfloat/misc/cl_LF_to_LF.cc cl_F_abs.lo: float/misc/cl_F_abs.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_abs.lo -MD -MP -MF $(DEPDIR)/cl_F_abs.Tpo -c -o cl_F_abs.lo `test -f 'float/misc/cl_F_abs.cc' || echo '$(srcdir)/'`float/misc/cl_F_abs.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_abs.Tpo $(DEPDIR)/cl_F_abs.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_abs.cc' object='cl_F_abs.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_abs.lo `test -f 'float/misc/cl_F_abs.cc' || echo '$(srcdir)/'`float/misc/cl_F_abs.cc cl_F_as.lo: float/misc/cl_F_as.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_as.lo -MD -MP -MF $(DEPDIR)/cl_F_as.Tpo -c -o cl_F_as.lo `test -f 'float/misc/cl_F_as.cc' || echo '$(srcdir)/'`float/misc/cl_F_as.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_as.Tpo $(DEPDIR)/cl_F_as.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_as.cc' object='cl_F_as.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_as.lo `test -f 'float/misc/cl_F_as.cc' || echo '$(srcdir)/'`float/misc/cl_F_as.cc cl_F_decode.lo: float/misc/cl_F_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_decode.lo -MD -MP -MF $(DEPDIR)/cl_F_decode.Tpo -c -o cl_F_decode.lo `test -f 'float/misc/cl_F_decode.cc' || echo '$(srcdir)/'`float/misc/cl_F_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_decode.Tpo $(DEPDIR)/cl_F_decode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_decode.cc' object='cl_F_decode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_decode.lo `test -f 'float/misc/cl_F_decode.cc' || echo '$(srcdir)/'`float/misc/cl_F_decode.cc cl_F_digits.lo: float/misc/cl_F_digits.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_digits.lo -MD -MP -MF $(DEPDIR)/cl_F_digits.Tpo -c -o cl_F_digits.lo `test -f 'float/misc/cl_F_digits.cc' || echo '$(srcdir)/'`float/misc/cl_F_digits.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_digits.Tpo $(DEPDIR)/cl_F_digits.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_digits.cc' object='cl_F_digits.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_digits.lo `test -f 'float/misc/cl_F_digits.cc' || echo '$(srcdir)/'`float/misc/cl_F_digits.cc cl_F_epsneg.lo: float/misc/cl_F_epsneg.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_epsneg.lo -MD -MP -MF $(DEPDIR)/cl_F_epsneg.Tpo -c -o cl_F_epsneg.lo `test -f 'float/misc/cl_F_epsneg.cc' || echo '$(srcdir)/'`float/misc/cl_F_epsneg.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_epsneg.Tpo $(DEPDIR)/cl_F_epsneg.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_epsneg.cc' object='cl_F_epsneg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_epsneg.lo `test -f 'float/misc/cl_F_epsneg.cc' || echo '$(srcdir)/'`float/misc/cl_F_epsneg.cc cl_F_epspos.lo: float/misc/cl_F_epspos.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_epspos.lo -MD -MP -MF $(DEPDIR)/cl_F_epspos.Tpo -c -o cl_F_epspos.lo `test -f 'float/misc/cl_F_epspos.cc' || echo '$(srcdir)/'`float/misc/cl_F_epspos.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_epspos.Tpo $(DEPDIR)/cl_F_epspos.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_epspos.cc' object='cl_F_epspos.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_epspos.lo `test -f 'float/misc/cl_F_epspos.cc' || echo '$(srcdir)/'`float/misc/cl_F_epspos.cc cl_F_eqhashcode.lo: float/misc/cl_F_eqhashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_eqhashcode.lo -MD -MP -MF $(DEPDIR)/cl_F_eqhashcode.Tpo -c -o cl_F_eqhashcode.lo `test -f 'float/misc/cl_F_eqhashcode.cc' || echo '$(srcdir)/'`float/misc/cl_F_eqhashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_eqhashcode.Tpo $(DEPDIR)/cl_F_eqhashcode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_eqhashcode.cc' object='cl_F_eqhashcode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_eqhashcode.lo `test -f 'float/misc/cl_F_eqhashcode.cc' || echo '$(srcdir)/'`float/misc/cl_F_eqhashcode.cc cl_F_exponent.lo: float/misc/cl_F_exponent.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_exponent.lo -MD -MP -MF $(DEPDIR)/cl_F_exponent.Tpo -c -o cl_F_exponent.lo `test -f 'float/misc/cl_F_exponent.cc' || echo '$(srcdir)/'`float/misc/cl_F_exponent.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_exponent.Tpo $(DEPDIR)/cl_F_exponent.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_exponent.cc' object='cl_F_exponent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_exponent.lo `test -f 'float/misc/cl_F_exponent.cc' || echo '$(srcdir)/'`float/misc/cl_F_exponent.cc cl_F_extendsqrt.lo: float/misc/cl_F_extendsqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_extendsqrt.lo -MD -MP -MF $(DEPDIR)/cl_F_extendsqrt.Tpo -c -o cl_F_extendsqrt.lo `test -f 'float/misc/cl_F_extendsqrt.cc' || echo '$(srcdir)/'`float/misc/cl_F_extendsqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_extendsqrt.Tpo $(DEPDIR)/cl_F_extendsqrt.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_extendsqrt.cc' object='cl_F_extendsqrt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_extendsqrt.lo `test -f 'float/misc/cl_F_extendsqrt.cc' || echo '$(srcdir)/'`float/misc/cl_F_extendsqrt.cc cl_F_extendsqrtx.lo: float/misc/cl_F_extendsqrtx.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_extendsqrtx.lo -MD -MP -MF $(DEPDIR)/cl_F_extendsqrtx.Tpo -c -o cl_F_extendsqrtx.lo `test -f 'float/misc/cl_F_extendsqrtx.cc' || echo '$(srcdir)/'`float/misc/cl_F_extendsqrtx.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_extendsqrtx.Tpo $(DEPDIR)/cl_F_extendsqrtx.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_extendsqrtx.cc' object='cl_F_extendsqrtx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_extendsqrtx.lo `test -f 'float/misc/cl_F_extendsqrtx.cc' || echo '$(srcdir)/'`float/misc/cl_F_extendsqrtx.cc cl_F_idecode.lo: float/misc/cl_F_idecode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_idecode.lo -MD -MP -MF $(DEPDIR)/cl_F_idecode.Tpo -c -o cl_F_idecode.lo `test -f 'float/misc/cl_F_idecode.cc' || echo '$(srcdir)/'`float/misc/cl_F_idecode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_idecode.Tpo $(DEPDIR)/cl_F_idecode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_idecode.cc' object='cl_F_idecode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_idecode.lo `test -f 'float/misc/cl_F_idecode.cc' || echo '$(srcdir)/'`float/misc/cl_F_idecode.cc cl_F_leastneg.lo: float/misc/cl_F_leastneg.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_leastneg.lo -MD -MP -MF $(DEPDIR)/cl_F_leastneg.Tpo -c -o cl_F_leastneg.lo `test -f 'float/misc/cl_F_leastneg.cc' || echo '$(srcdir)/'`float/misc/cl_F_leastneg.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_leastneg.Tpo $(DEPDIR)/cl_F_leastneg.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_leastneg.cc' object='cl_F_leastneg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_leastneg.lo `test -f 'float/misc/cl_F_leastneg.cc' || echo '$(srcdir)/'`float/misc/cl_F_leastneg.cc cl_F_leastpos.lo: float/misc/cl_F_leastpos.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_leastpos.lo -MD -MP -MF $(DEPDIR)/cl_F_leastpos.Tpo -c -o cl_F_leastpos.lo `test -f 'float/misc/cl_F_leastpos.cc' || echo '$(srcdir)/'`float/misc/cl_F_leastpos.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_leastpos.Tpo $(DEPDIR)/cl_F_leastpos.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_leastpos.cc' object='cl_F_leastpos.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_leastpos.lo `test -f 'float/misc/cl_F_leastpos.cc' || echo '$(srcdir)/'`float/misc/cl_F_leastpos.cc cl_F_max.lo: float/misc/cl_F_max.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_max.lo -MD -MP -MF $(DEPDIR)/cl_F_max.Tpo -c -o cl_F_max.lo `test -f 'float/misc/cl_F_max.cc' || echo '$(srcdir)/'`float/misc/cl_F_max.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_max.Tpo $(DEPDIR)/cl_F_max.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_max.cc' object='cl_F_max.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_max.lo `test -f 'float/misc/cl_F_max.cc' || echo '$(srcdir)/'`float/misc/cl_F_max.cc cl_F_min.lo: float/misc/cl_F_min.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_min.lo -MD -MP -MF $(DEPDIR)/cl_F_min.Tpo -c -o cl_F_min.lo `test -f 'float/misc/cl_F_min.cc' || echo '$(srcdir)/'`float/misc/cl_F_min.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_min.Tpo $(DEPDIR)/cl_F_min.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_min.cc' object='cl_F_min.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_min.lo `test -f 'float/misc/cl_F_min.cc' || echo '$(srcdir)/'`float/misc/cl_F_min.cc cl_F_mostneg.lo: float/misc/cl_F_mostneg.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_mostneg.lo -MD -MP -MF $(DEPDIR)/cl_F_mostneg.Tpo -c -o cl_F_mostneg.lo `test -f 'float/misc/cl_F_mostneg.cc' || echo '$(srcdir)/'`float/misc/cl_F_mostneg.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_mostneg.Tpo $(DEPDIR)/cl_F_mostneg.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_mostneg.cc' object='cl_F_mostneg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_mostneg.lo `test -f 'float/misc/cl_F_mostneg.cc' || echo '$(srcdir)/'`float/misc/cl_F_mostneg.cc cl_F_mostpos.lo: float/misc/cl_F_mostpos.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_mostpos.lo -MD -MP -MF $(DEPDIR)/cl_F_mostpos.Tpo -c -o cl_F_mostpos.lo `test -f 'float/misc/cl_F_mostpos.cc' || echo '$(srcdir)/'`float/misc/cl_F_mostpos.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_mostpos.Tpo $(DEPDIR)/cl_F_mostpos.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_mostpos.cc' object='cl_F_mostpos.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_mostpos.lo `test -f 'float/misc/cl_F_mostpos.cc' || echo '$(srcdir)/'`float/misc/cl_F_mostpos.cc cl_F_precision.lo: float/misc/cl_F_precision.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_precision.lo -MD -MP -MF $(DEPDIR)/cl_F_precision.Tpo -c -o cl_F_precision.lo `test -f 'float/misc/cl_F_precision.cc' || echo '$(srcdir)/'`float/misc/cl_F_precision.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_precision.Tpo $(DEPDIR)/cl_F_precision.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_precision.cc' object='cl_F_precision.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_precision.lo `test -f 'float/misc/cl_F_precision.cc' || echo '$(srcdir)/'`float/misc/cl_F_precision.cc cl_F_rational.lo: float/misc/cl_F_rational.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_rational.lo -MD -MP -MF $(DEPDIR)/cl_F_rational.Tpo -c -o cl_F_rational.lo `test -f 'float/misc/cl_F_rational.cc' || echo '$(srcdir)/'`float/misc/cl_F_rational.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_rational.Tpo $(DEPDIR)/cl_F_rational.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_rational.cc' object='cl_F_rational.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_rational.lo `test -f 'float/misc/cl_F_rational.cc' || echo '$(srcdir)/'`float/misc/cl_F_rational.cc cl_F_shortenrel.lo: float/misc/cl_F_shortenrel.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_shortenrel.lo -MD -MP -MF $(DEPDIR)/cl_F_shortenrel.Tpo -c -o cl_F_shortenrel.lo `test -f 'float/misc/cl_F_shortenrel.cc' || echo '$(srcdir)/'`float/misc/cl_F_shortenrel.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_shortenrel.Tpo $(DEPDIR)/cl_F_shortenrel.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_shortenrel.cc' object='cl_F_shortenrel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_shortenrel.lo `test -f 'float/misc/cl_F_shortenrel.cc' || echo '$(srcdir)/'`float/misc/cl_F_shortenrel.cc cl_F_sign.lo: float/misc/cl_F_sign.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_sign.lo -MD -MP -MF $(DEPDIR)/cl_F_sign.Tpo -c -o cl_F_sign.lo `test -f 'float/misc/cl_F_sign.cc' || echo '$(srcdir)/'`float/misc/cl_F_sign.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_sign.Tpo $(DEPDIR)/cl_F_sign.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_sign.cc' object='cl_F_sign.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_sign.lo `test -f 'float/misc/cl_F_sign.cc' || echo '$(srcdir)/'`float/misc/cl_F_sign.cc cl_F_sign2.lo: float/misc/cl_F_sign2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_sign2.lo -MD -MP -MF $(DEPDIR)/cl_F_sign2.Tpo -c -o cl_F_sign2.lo `test -f 'float/misc/cl_F_sign2.cc' || echo '$(srcdir)/'`float/misc/cl_F_sign2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_sign2.Tpo $(DEPDIR)/cl_F_sign2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_sign2.cc' object='cl_F_sign2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_sign2.lo `test -f 'float/misc/cl_F_sign2.cc' || echo '$(srcdir)/'`float/misc/cl_F_sign2.cc cl_F_signum.lo: float/misc/cl_F_signum.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_signum.lo -MD -MP -MF $(DEPDIR)/cl_F_signum.Tpo -c -o cl_F_signum.lo `test -f 'float/misc/cl_F_signum.cc' || echo '$(srcdir)/'`float/misc/cl_F_signum.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_signum.Tpo $(DEPDIR)/cl_F_signum.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_F_signum.cc' object='cl_F_signum.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_signum.lo `test -f 'float/misc/cl_F_signum.cc' || echo '$(srcdir)/'`float/misc/cl_F_signum.cc cl_float_format.lo: float/misc/cl_float_format.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_float_format.lo -MD -MP -MF $(DEPDIR)/cl_float_format.Tpo -c -o cl_float_format.lo `test -f 'float/misc/cl_float_format.cc' || echo '$(srcdir)/'`float/misc/cl_float_format.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_float_format.Tpo $(DEPDIR)/cl_float_format.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/misc/cl_float_format.cc' object='cl_float_format.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_float_format.lo `test -f 'float/misc/cl_float_format.cc' || echo '$(srcdir)/'`float/misc/cl_float_format.cc cl_F_aprint.lo: float/output/cl_F_aprint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_aprint.lo -MD -MP -MF $(DEPDIR)/cl_F_aprint.Tpo -c -o cl_F_aprint.lo `test -f 'float/output/cl_F_aprint.cc' || echo '$(srcdir)/'`float/output/cl_F_aprint.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_aprint.Tpo $(DEPDIR)/cl_F_aprint.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/output/cl_F_aprint.cc' object='cl_F_aprint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_aprint.lo `test -f 'float/output/cl_F_aprint.cc' || echo '$(srcdir)/'`float/output/cl_F_aprint.cc cl_F_bprint.lo: float/output/cl_F_bprint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_bprint.lo -MD -MP -MF $(DEPDIR)/cl_F_bprint.Tpo -c -o cl_F_bprint.lo `test -f 'float/output/cl_F_bprint.cc' || echo '$(srcdir)/'`float/output/cl_F_bprint.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_bprint.Tpo $(DEPDIR)/cl_F_bprint.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/output/cl_F_bprint.cc' object='cl_F_bprint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_bprint.lo `test -f 'float/output/cl_F_bprint.cc' || echo '$(srcdir)/'`float/output/cl_F_bprint.cc cl_F_cprint.lo: float/output/cl_F_cprint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_cprint.lo -MD -MP -MF $(DEPDIR)/cl_F_cprint.Tpo -c -o cl_F_cprint.lo `test -f 'float/output/cl_F_cprint.cc' || echo '$(srcdir)/'`float/output/cl_F_cprint.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_cprint.Tpo $(DEPDIR)/cl_F_cprint.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/output/cl_F_cprint.cc' object='cl_F_cprint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_cprint.lo `test -f 'float/output/cl_F_cprint.cc' || echo '$(srcdir)/'`float/output/cl_F_cprint.cc cl_F_dprint.lo: float/output/cl_F_dprint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_dprint.lo -MD -MP -MF $(DEPDIR)/cl_F_dprint.Tpo -c -o cl_F_dprint.lo `test -f 'float/output/cl_F_dprint.cc' || echo '$(srcdir)/'`float/output/cl_F_dprint.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_dprint.Tpo $(DEPDIR)/cl_F_dprint.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/output/cl_F_dprint.cc' object='cl_F_dprint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_dprint.lo `test -f 'float/output/cl_F_dprint.cc' || echo '$(srcdir)/'`float/output/cl_F_dprint.cc cl_F_printb.lo: float/output/cl_F_printb.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_printb.lo -MD -MP -MF $(DEPDIR)/cl_F_printb.Tpo -c -o cl_F_printb.lo `test -f 'float/output/cl_F_printb.cc' || echo '$(srcdir)/'`float/output/cl_F_printb.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_printb.Tpo $(DEPDIR)/cl_F_printb.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/output/cl_F_printb.cc' object='cl_F_printb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_printb.lo `test -f 'float/output/cl_F_printb.cc' || echo '$(srcdir)/'`float/output/cl_F_printb.cc cl_F_random.lo: float/random/cl_F_random.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_random.lo -MD -MP -MF $(DEPDIR)/cl_F_random.Tpo -c -o cl_F_random.lo `test -f 'float/random/cl_F_random.cc' || echo '$(srcdir)/'`float/random/cl_F_random.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_random.Tpo $(DEPDIR)/cl_F_random.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/random/cl_F_random.cc' object='cl_F_random.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_random.lo `test -f 'float/random/cl_F_random.cc' || echo '$(srcdir)/'`float/random/cl_F_random.cc cl_SF_sqrt.lo: float/sfloat/algebraic/cl_SF_sqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_sqrt.lo -MD -MP -MF $(DEPDIR)/cl_SF_sqrt.Tpo -c -o cl_SF_sqrt.lo `test -f 'float/sfloat/algebraic/cl_SF_sqrt.cc' || echo '$(srcdir)/'`float/sfloat/algebraic/cl_SF_sqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_sqrt.Tpo $(DEPDIR)/cl_SF_sqrt.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/algebraic/cl_SF_sqrt.cc' object='cl_SF_sqrt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_sqrt.lo `test -f 'float/sfloat/algebraic/cl_SF_sqrt.cc' || echo '$(srcdir)/'`float/sfloat/algebraic/cl_SF_sqrt.cc cl_SF_ceil22.lo: float/sfloat/division/cl_SF_ceil22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_ceil22.lo -MD -MP -MF $(DEPDIR)/cl_SF_ceil22.Tpo -c -o cl_SF_ceil22.lo `test -f 'float/sfloat/division/cl_SF_ceil22.cc' || echo '$(srcdir)/'`float/sfloat/division/cl_SF_ceil22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_ceil22.Tpo $(DEPDIR)/cl_SF_ceil22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/division/cl_SF_ceil22.cc' object='cl_SF_ceil22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_ceil22.lo `test -f 'float/sfloat/division/cl_SF_ceil22.cc' || echo '$(srcdir)/'`float/sfloat/division/cl_SF_ceil22.cc cl_SF_fceil.lo: float/sfloat/division/cl_SF_fceil.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_fceil.lo -MD -MP -MF $(DEPDIR)/cl_SF_fceil.Tpo -c -o cl_SF_fceil.lo `test -f 'float/sfloat/division/cl_SF_fceil.cc' || echo '$(srcdir)/'`float/sfloat/division/cl_SF_fceil.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_fceil.Tpo $(DEPDIR)/cl_SF_fceil.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/division/cl_SF_fceil.cc' object='cl_SF_fceil.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_fceil.lo `test -f 'float/sfloat/division/cl_SF_fceil.cc' || echo '$(srcdir)/'`float/sfloat/division/cl_SF_fceil.cc cl_SF_ffloor.lo: float/sfloat/division/cl_SF_ffloor.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_ffloor.lo -MD -MP -MF $(DEPDIR)/cl_SF_ffloor.Tpo -c -o cl_SF_ffloor.lo `test -f 'float/sfloat/division/cl_SF_ffloor.cc' || echo '$(srcdir)/'`float/sfloat/division/cl_SF_ffloor.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_ffloor.Tpo $(DEPDIR)/cl_SF_ffloor.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/division/cl_SF_ffloor.cc' object='cl_SF_ffloor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_ffloor.lo `test -f 'float/sfloat/division/cl_SF_ffloor.cc' || echo '$(srcdir)/'`float/sfloat/division/cl_SF_ffloor.cc cl_SF_floor22.lo: float/sfloat/division/cl_SF_floor22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_floor22.lo -MD -MP -MF $(DEPDIR)/cl_SF_floor22.Tpo -c -o cl_SF_floor22.lo `test -f 'float/sfloat/division/cl_SF_floor22.cc' || echo '$(srcdir)/'`float/sfloat/division/cl_SF_floor22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_floor22.Tpo $(DEPDIR)/cl_SF_floor22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/division/cl_SF_floor22.cc' object='cl_SF_floor22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_floor22.lo `test -f 'float/sfloat/division/cl_SF_floor22.cc' || echo '$(srcdir)/'`float/sfloat/division/cl_SF_floor22.cc cl_SF_recip.lo: float/sfloat/division/cl_SF_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_recip.lo -MD -MP -MF $(DEPDIR)/cl_SF_recip.Tpo -c -o cl_SF_recip.lo `test -f 'float/sfloat/division/cl_SF_recip.cc' || echo '$(srcdir)/'`float/sfloat/division/cl_SF_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_recip.Tpo $(DEPDIR)/cl_SF_recip.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/division/cl_SF_recip.cc' object='cl_SF_recip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_recip.lo `test -f 'float/sfloat/division/cl_SF_recip.cc' || echo '$(srcdir)/'`float/sfloat/division/cl_SF_recip.cc cl_SF_round22.lo: float/sfloat/division/cl_SF_round22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_round22.lo -MD -MP -MF $(DEPDIR)/cl_SF_round22.Tpo -c -o cl_SF_round22.lo `test -f 'float/sfloat/division/cl_SF_round22.cc' || echo '$(srcdir)/'`float/sfloat/division/cl_SF_round22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_round22.Tpo $(DEPDIR)/cl_SF_round22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/division/cl_SF_round22.cc' object='cl_SF_round22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_round22.lo `test -f 'float/sfloat/division/cl_SF_round22.cc' || echo '$(srcdir)/'`float/sfloat/division/cl_SF_round22.cc cl_SF_trunc22.lo: float/sfloat/division/cl_SF_trunc22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_trunc22.lo -MD -MP -MF $(DEPDIR)/cl_SF_trunc22.Tpo -c -o cl_SF_trunc22.lo `test -f 'float/sfloat/division/cl_SF_trunc22.cc' || echo '$(srcdir)/'`float/sfloat/division/cl_SF_trunc22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_trunc22.Tpo $(DEPDIR)/cl_SF_trunc22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/division/cl_SF_trunc22.cc' object='cl_SF_trunc22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_trunc22.lo `test -f 'float/sfloat/division/cl_SF_trunc22.cc' || echo '$(srcdir)/'`float/sfloat/division/cl_SF_trunc22.cc cl_SF_compare.lo: float/sfloat/elem/cl_SF_compare.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_compare.lo -MD -MP -MF $(DEPDIR)/cl_SF_compare.Tpo -c -o cl_SF_compare.lo `test -f 'float/sfloat/elem/cl_SF_compare.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_compare.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_compare.Tpo $(DEPDIR)/cl_SF_compare.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/elem/cl_SF_compare.cc' object='cl_SF_compare.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_compare.lo `test -f 'float/sfloat/elem/cl_SF_compare.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_compare.cc cl_SF_div.lo: float/sfloat/elem/cl_SF_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_div.lo -MD -MP -MF $(DEPDIR)/cl_SF_div.Tpo -c -o cl_SF_div.lo `test -f 'float/sfloat/elem/cl_SF_div.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_div.Tpo $(DEPDIR)/cl_SF_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/elem/cl_SF_div.cc' object='cl_SF_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_div.lo `test -f 'float/sfloat/elem/cl_SF_div.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_div.cc cl_SF_from_I.lo: float/sfloat/elem/cl_SF_from_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_from_I.lo -MD -MP -MF $(DEPDIR)/cl_SF_from_I.Tpo -c -o cl_SF_from_I.lo `test -f 'float/sfloat/elem/cl_SF_from_I.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_from_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_from_I.Tpo $(DEPDIR)/cl_SF_from_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/elem/cl_SF_from_I.cc' object='cl_SF_from_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_from_I.lo `test -f 'float/sfloat/elem/cl_SF_from_I.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_from_I.cc cl_SF_from_RA.lo: float/sfloat/elem/cl_SF_from_RA.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_from_RA.lo -MD -MP -MF $(DEPDIR)/cl_SF_from_RA.Tpo -c -o cl_SF_from_RA.lo `test -f 'float/sfloat/elem/cl_SF_from_RA.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_from_RA.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_from_RA.Tpo $(DEPDIR)/cl_SF_from_RA.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/elem/cl_SF_from_RA.cc' object='cl_SF_from_RA.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_from_RA.lo `test -f 'float/sfloat/elem/cl_SF_from_RA.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_from_RA.cc cl_SF_fround.lo: float/sfloat/elem/cl_SF_fround.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_fround.lo -MD -MP -MF $(DEPDIR)/cl_SF_fround.Tpo -c -o cl_SF_fround.lo `test -f 'float/sfloat/elem/cl_SF_fround.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_fround.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_fround.Tpo $(DEPDIR)/cl_SF_fround.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/elem/cl_SF_fround.cc' object='cl_SF_fround.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_fround.lo `test -f 'float/sfloat/elem/cl_SF_fround.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_fround.cc cl_SF_ftrunc.lo: float/sfloat/elem/cl_SF_ftrunc.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_ftrunc.lo -MD -MP -MF $(DEPDIR)/cl_SF_ftrunc.Tpo -c -o cl_SF_ftrunc.lo `test -f 'float/sfloat/elem/cl_SF_ftrunc.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_ftrunc.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_ftrunc.Tpo $(DEPDIR)/cl_SF_ftrunc.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/elem/cl_SF_ftrunc.cc' object='cl_SF_ftrunc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_ftrunc.lo `test -f 'float/sfloat/elem/cl_SF_ftrunc.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_ftrunc.cc cl_SF_futrunc.lo: float/sfloat/elem/cl_SF_futrunc.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_futrunc.lo -MD -MP -MF $(DEPDIR)/cl_SF_futrunc.Tpo -c -o cl_SF_futrunc.lo `test -f 'float/sfloat/elem/cl_SF_futrunc.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_futrunc.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_futrunc.Tpo $(DEPDIR)/cl_SF_futrunc.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/elem/cl_SF_futrunc.cc' object='cl_SF_futrunc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_futrunc.lo `test -f 'float/sfloat/elem/cl_SF_futrunc.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_futrunc.cc cl_SF_minus.lo: float/sfloat/elem/cl_SF_minus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_minus.lo -MD -MP -MF $(DEPDIR)/cl_SF_minus.Tpo -c -o cl_SF_minus.lo `test -f 'float/sfloat/elem/cl_SF_minus.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_minus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_minus.Tpo $(DEPDIR)/cl_SF_minus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/elem/cl_SF_minus.cc' object='cl_SF_minus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_minus.lo `test -f 'float/sfloat/elem/cl_SF_minus.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_minus.cc cl_SF_minusp.lo: float/sfloat/elem/cl_SF_minusp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_minusp.lo -MD -MP -MF $(DEPDIR)/cl_SF_minusp.Tpo -c -o cl_SF_minusp.lo `test -f 'float/sfloat/elem/cl_SF_minusp.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_minusp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_minusp.Tpo $(DEPDIR)/cl_SF_minusp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/elem/cl_SF_minusp.cc' object='cl_SF_minusp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_minusp.lo `test -f 'float/sfloat/elem/cl_SF_minusp.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_minusp.cc cl_SF_mul.lo: float/sfloat/elem/cl_SF_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_mul.lo -MD -MP -MF $(DEPDIR)/cl_SF_mul.Tpo -c -o cl_SF_mul.lo `test -f 'float/sfloat/elem/cl_SF_mul.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_mul.Tpo $(DEPDIR)/cl_SF_mul.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/elem/cl_SF_mul.cc' object='cl_SF_mul.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_mul.lo `test -f 'float/sfloat/elem/cl_SF_mul.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_mul.cc cl_SF_plus.lo: float/sfloat/elem/cl_SF_plus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_plus.lo -MD -MP -MF $(DEPDIR)/cl_SF_plus.Tpo -c -o cl_SF_plus.lo `test -f 'float/sfloat/elem/cl_SF_plus.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_plus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_plus.Tpo $(DEPDIR)/cl_SF_plus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/elem/cl_SF_plus.cc' object='cl_SF_plus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_plus.lo `test -f 'float/sfloat/elem/cl_SF_plus.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_plus.cc cl_SF_plusp.lo: float/sfloat/elem/cl_SF_plusp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_plusp.lo -MD -MP -MF $(DEPDIR)/cl_SF_plusp.Tpo -c -o cl_SF_plusp.lo `test -f 'float/sfloat/elem/cl_SF_plusp.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_plusp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_plusp.Tpo $(DEPDIR)/cl_SF_plusp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/elem/cl_SF_plusp.cc' object='cl_SF_plusp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_plusp.lo `test -f 'float/sfloat/elem/cl_SF_plusp.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_plusp.cc cl_SF_scale.lo: float/sfloat/elem/cl_SF_scale.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_scale.lo -MD -MP -MF $(DEPDIR)/cl_SF_scale.Tpo -c -o cl_SF_scale.lo `test -f 'float/sfloat/elem/cl_SF_scale.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_scale.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_scale.Tpo $(DEPDIR)/cl_SF_scale.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/elem/cl_SF_scale.cc' object='cl_SF_scale.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_scale.lo `test -f 'float/sfloat/elem/cl_SF_scale.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_scale.cc cl_SF_scale_I.lo: float/sfloat/elem/cl_SF_scale_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_scale_I.lo -MD -MP -MF $(DEPDIR)/cl_SF_scale_I.Tpo -c -o cl_SF_scale_I.lo `test -f 'float/sfloat/elem/cl_SF_scale_I.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_scale_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_scale_I.Tpo $(DEPDIR)/cl_SF_scale_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/elem/cl_SF_scale_I.cc' object='cl_SF_scale_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_scale_I.lo `test -f 'float/sfloat/elem/cl_SF_scale_I.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_scale_I.cc cl_SF_to_I.lo: float/sfloat/elem/cl_SF_to_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_to_I.lo -MD -MP -MF $(DEPDIR)/cl_SF_to_I.Tpo -c -o cl_SF_to_I.lo `test -f 'float/sfloat/elem/cl_SF_to_I.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_to_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_to_I.Tpo $(DEPDIR)/cl_SF_to_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/elem/cl_SF_to_I.cc' object='cl_SF_to_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_to_I.lo `test -f 'float/sfloat/elem/cl_SF_to_I.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_to_I.cc cl_SF_uminus.lo: float/sfloat/elem/cl_SF_uminus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_uminus.lo -MD -MP -MF $(DEPDIR)/cl_SF_uminus.Tpo -c -o cl_SF_uminus.lo `test -f 'float/sfloat/elem/cl_SF_uminus.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_uminus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_uminus.Tpo $(DEPDIR)/cl_SF_uminus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/elem/cl_SF_uminus.cc' object='cl_SF_uminus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_uminus.lo `test -f 'float/sfloat/elem/cl_SF_uminus.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_uminus.cc cl_SF_zerop.lo: float/sfloat/elem/cl_SF_zerop.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_zerop.lo -MD -MP -MF $(DEPDIR)/cl_SF_zerop.Tpo -c -o cl_SF_zerop.lo `test -f 'float/sfloat/elem/cl_SF_zerop.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_zerop.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_zerop.Tpo $(DEPDIR)/cl_SF_zerop.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/elem/cl_SF_zerop.cc' object='cl_SF_zerop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_zerop.lo `test -f 'float/sfloat/elem/cl_SF_zerop.cc' || echo '$(srcdir)/'`float/sfloat/elem/cl_SF_zerop.cc cl_SF_from_string.lo: float/sfloat/input/cl_SF_from_string.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_from_string.lo -MD -MP -MF $(DEPDIR)/cl_SF_from_string.Tpo -c -o cl_SF_from_string.lo `test -f 'float/sfloat/input/cl_SF_from_string.cc' || echo '$(srcdir)/'`float/sfloat/input/cl_SF_from_string.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_from_string.Tpo $(DEPDIR)/cl_SF_from_string.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/input/cl_SF_from_string.cc' object='cl_SF_from_string.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_from_string.lo `test -f 'float/sfloat/input/cl_SF_from_string.cc' || echo '$(srcdir)/'`float/sfloat/input/cl_SF_from_string.cc cl_SF_abs.lo: float/sfloat/misc/cl_SF_abs.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_abs.lo -MD -MP -MF $(DEPDIR)/cl_SF_abs.Tpo -c -o cl_SF_abs.lo `test -f 'float/sfloat/misc/cl_SF_abs.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_abs.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_abs.Tpo $(DEPDIR)/cl_SF_abs.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/misc/cl_SF_abs.cc' object='cl_SF_abs.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_abs.lo `test -f 'float/sfloat/misc/cl_SF_abs.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_abs.cc cl_SF_as.lo: float/sfloat/misc/cl_SF_as.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_as.lo -MD -MP -MF $(DEPDIR)/cl_SF_as.Tpo -c -o cl_SF_as.lo `test -f 'float/sfloat/misc/cl_SF_as.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_as.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_as.Tpo $(DEPDIR)/cl_SF_as.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/misc/cl_SF_as.cc' object='cl_SF_as.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_as.lo `test -f 'float/sfloat/misc/cl_SF_as.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_as.cc cl_SF_class.lo: float/sfloat/misc/cl_SF_class.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_class.lo -MD -MP -MF $(DEPDIR)/cl_SF_class.Tpo -c -o cl_SF_class.lo `test -f 'float/sfloat/misc/cl_SF_class.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_class.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_class.Tpo $(DEPDIR)/cl_SF_class.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/misc/cl_SF_class.cc' object='cl_SF_class.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_class.lo `test -f 'float/sfloat/misc/cl_SF_class.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_class.cc cl_SF_debug.lo: float/sfloat/misc/cl_SF_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_debug.lo -MD -MP -MF $(DEPDIR)/cl_SF_debug.Tpo -c -o cl_SF_debug.lo `test -f 'float/sfloat/misc/cl_SF_debug.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_debug.Tpo $(DEPDIR)/cl_SF_debug.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/misc/cl_SF_debug.cc' object='cl_SF_debug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_debug.lo `test -f 'float/sfloat/misc/cl_SF_debug.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_debug.cc cl_SF_decode.lo: float/sfloat/misc/cl_SF_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_decode.lo -MD -MP -MF $(DEPDIR)/cl_SF_decode.Tpo -c -o cl_SF_decode.lo `test -f 'float/sfloat/misc/cl_SF_decode.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_decode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_decode.Tpo $(DEPDIR)/cl_SF_decode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/misc/cl_SF_decode.cc' object='cl_SF_decode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_decode.lo `test -f 'float/sfloat/misc/cl_SF_decode.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_decode.cc cl_SF_digits.lo: float/sfloat/misc/cl_SF_digits.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_digits.lo -MD -MP -MF $(DEPDIR)/cl_SF_digits.Tpo -c -o cl_SF_digits.lo `test -f 'float/sfloat/misc/cl_SF_digits.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_digits.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_digits.Tpo $(DEPDIR)/cl_SF_digits.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/misc/cl_SF_digits.cc' object='cl_SF_digits.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_digits.lo `test -f 'float/sfloat/misc/cl_SF_digits.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_digits.cc cl_SF_eqhashcode.lo: float/sfloat/misc/cl_SF_eqhashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_eqhashcode.lo -MD -MP -MF $(DEPDIR)/cl_SF_eqhashcode.Tpo -c -o cl_SF_eqhashcode.lo `test -f 'float/sfloat/misc/cl_SF_eqhashcode.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_eqhashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_eqhashcode.Tpo $(DEPDIR)/cl_SF_eqhashcode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/misc/cl_SF_eqhashcode.cc' object='cl_SF_eqhashcode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_eqhashcode.lo `test -f 'float/sfloat/misc/cl_SF_eqhashcode.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_eqhashcode.cc cl_SF_exponent.lo: float/sfloat/misc/cl_SF_exponent.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_exponent.lo -MD -MP -MF $(DEPDIR)/cl_SF_exponent.Tpo -c -o cl_SF_exponent.lo `test -f 'float/sfloat/misc/cl_SF_exponent.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_exponent.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_exponent.Tpo $(DEPDIR)/cl_SF_exponent.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/misc/cl_SF_exponent.cc' object='cl_SF_exponent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_exponent.lo `test -f 'float/sfloat/misc/cl_SF_exponent.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_exponent.cc cl_SF_idecode.lo: float/sfloat/misc/cl_SF_idecode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_idecode.lo -MD -MP -MF $(DEPDIR)/cl_SF_idecode.Tpo -c -o cl_SF_idecode.lo `test -f 'float/sfloat/misc/cl_SF_idecode.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_idecode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_idecode.Tpo $(DEPDIR)/cl_SF_idecode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/misc/cl_SF_idecode.cc' object='cl_SF_idecode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_idecode.lo `test -f 'float/sfloat/misc/cl_SF_idecode.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_idecode.cc cl_SF_max.lo: float/sfloat/misc/cl_SF_max.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_max.lo -MD -MP -MF $(DEPDIR)/cl_SF_max.Tpo -c -o cl_SF_max.lo `test -f 'float/sfloat/misc/cl_SF_max.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_max.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_max.Tpo $(DEPDIR)/cl_SF_max.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/misc/cl_SF_max.cc' object='cl_SF_max.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_max.lo `test -f 'float/sfloat/misc/cl_SF_max.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_max.cc cl_SF_min.lo: float/sfloat/misc/cl_SF_min.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_min.lo -MD -MP -MF $(DEPDIR)/cl_SF_min.Tpo -c -o cl_SF_min.lo `test -f 'float/sfloat/misc/cl_SF_min.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_min.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_min.Tpo $(DEPDIR)/cl_SF_min.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/misc/cl_SF_min.cc' object='cl_SF_min.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_min.lo `test -f 'float/sfloat/misc/cl_SF_min.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_min.cc cl_SF_precision.lo: float/sfloat/misc/cl_SF_precision.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_precision.lo -MD -MP -MF $(DEPDIR)/cl_SF_precision.Tpo -c -o cl_SF_precision.lo `test -f 'float/sfloat/misc/cl_SF_precision.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_precision.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_precision.Tpo $(DEPDIR)/cl_SF_precision.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/misc/cl_SF_precision.cc' object='cl_SF_precision.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_precision.lo `test -f 'float/sfloat/misc/cl_SF_precision.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_precision.cc cl_SF_sign.lo: float/sfloat/misc/cl_SF_sign.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_sign.lo -MD -MP -MF $(DEPDIR)/cl_SF_sign.Tpo -c -o cl_SF_sign.lo `test -f 'float/sfloat/misc/cl_SF_sign.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_sign.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_sign.Tpo $(DEPDIR)/cl_SF_sign.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/misc/cl_SF_sign.cc' object='cl_SF_sign.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_sign.lo `test -f 'float/sfloat/misc/cl_SF_sign.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_sign.cc cl_SF_signum.lo: float/sfloat/misc/cl_SF_signum.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SF_signum.lo -MD -MP -MF $(DEPDIR)/cl_SF_signum.Tpo -c -o cl_SF_signum.lo `test -f 'float/sfloat/misc/cl_SF_signum.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_signum.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SF_signum.Tpo $(DEPDIR)/cl_SF_signum.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/sfloat/misc/cl_SF_signum.cc' object='cl_SF_signum.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SF_signum.lo `test -f 'float/sfloat/misc/cl_SF_signum.cc' || echo '$(srcdir)/'`float/sfloat/misc/cl_SF_signum.cc cl_F_atanhx.lo: float/transcendental/cl_F_atanhx.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_atanhx.lo -MD -MP -MF $(DEPDIR)/cl_F_atanhx.Tpo -c -o cl_F_atanhx.lo `test -f 'float/transcendental/cl_F_atanhx.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_atanhx.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_atanhx.Tpo $(DEPDIR)/cl_F_atanhx.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_atanhx.cc' object='cl_F_atanhx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_atanhx.lo `test -f 'float/transcendental/cl_F_atanhx.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_atanhx.cc cl_F_atanx.lo: float/transcendental/cl_F_atanx.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_atanx.lo -MD -MP -MF $(DEPDIR)/cl_F_atanx.Tpo -c -o cl_F_atanx.lo `test -f 'float/transcendental/cl_F_atanx.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_atanx.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_atanx.Tpo $(DEPDIR)/cl_F_atanx.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_atanx.cc' object='cl_F_atanx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_atanx.lo `test -f 'float/transcendental/cl_F_atanx.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_atanx.cc cl_F_catalanconst.lo: float/transcendental/cl_F_catalanconst.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_catalanconst.lo -MD -MP -MF $(DEPDIR)/cl_F_catalanconst.Tpo -c -o cl_F_catalanconst.lo `test -f 'float/transcendental/cl_F_catalanconst.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_catalanconst.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_catalanconst.Tpo $(DEPDIR)/cl_F_catalanconst.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_catalanconst.cc' object='cl_F_catalanconst.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_catalanconst.lo `test -f 'float/transcendental/cl_F_catalanconst.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_catalanconst.cc cl_F_catalanconst_def.lo: float/transcendental/cl_F_catalanconst_def.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_catalanconst_def.lo -MD -MP -MF $(DEPDIR)/cl_F_catalanconst_def.Tpo -c -o cl_F_catalanconst_def.lo `test -f 'float/transcendental/cl_F_catalanconst_def.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_catalanconst_def.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_catalanconst_def.Tpo $(DEPDIR)/cl_F_catalanconst_def.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_catalanconst_def.cc' object='cl_F_catalanconst_def.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_catalanconst_def.lo `test -f 'float/transcendental/cl_F_catalanconst_def.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_catalanconst_def.cc cl_F_catalanconst_f.lo: float/transcendental/cl_F_catalanconst_f.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_catalanconst_f.lo -MD -MP -MF $(DEPDIR)/cl_F_catalanconst_f.Tpo -c -o cl_F_catalanconst_f.lo `test -f 'float/transcendental/cl_F_catalanconst_f.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_catalanconst_f.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_catalanconst_f.Tpo $(DEPDIR)/cl_F_catalanconst_f.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_catalanconst_f.cc' object='cl_F_catalanconst_f.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_catalanconst_f.lo `test -f 'float/transcendental/cl_F_catalanconst_f.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_catalanconst_f.cc cl_F_catalanconst_var.lo: float/transcendental/cl_F_catalanconst_var.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_catalanconst_var.lo -MD -MP -MF $(DEPDIR)/cl_F_catalanconst_var.Tpo -c -o cl_F_catalanconst_var.lo `test -f 'float/transcendental/cl_F_catalanconst_var.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_catalanconst_var.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_catalanconst_var.Tpo $(DEPDIR)/cl_F_catalanconst_var.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_catalanconst_var.cc' object='cl_F_catalanconst_var.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_catalanconst_var.lo `test -f 'float/transcendental/cl_F_catalanconst_var.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_catalanconst_var.cc cl_F_cos.lo: float/transcendental/cl_F_cos.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_cos.lo -MD -MP -MF $(DEPDIR)/cl_F_cos.Tpo -c -o cl_F_cos.lo `test -f 'float/transcendental/cl_F_cos.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_cos.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_cos.Tpo $(DEPDIR)/cl_F_cos.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_cos.cc' object='cl_F_cos.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_cos.lo `test -f 'float/transcendental/cl_F_cos.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_cos.cc cl_F_cosh.lo: float/transcendental/cl_F_cosh.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_cosh.lo -MD -MP -MF $(DEPDIR)/cl_F_cosh.Tpo -c -o cl_F_cosh.lo `test -f 'float/transcendental/cl_F_cosh.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_cosh.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_cosh.Tpo $(DEPDIR)/cl_F_cosh.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_cosh.cc' object='cl_F_cosh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_cosh.lo `test -f 'float/transcendental/cl_F_cosh.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_cosh.cc cl_F_coshsinh.lo: float/transcendental/cl_F_coshsinh.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_coshsinh.lo -MD -MP -MF $(DEPDIR)/cl_F_coshsinh.Tpo -c -o cl_F_coshsinh.lo `test -f 'float/transcendental/cl_F_coshsinh.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_coshsinh.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_coshsinh.Tpo $(DEPDIR)/cl_F_coshsinh.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_coshsinh.cc' object='cl_F_coshsinh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_coshsinh.lo `test -f 'float/transcendental/cl_F_coshsinh.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_coshsinh.cc cl_F_cossin.lo: float/transcendental/cl_F_cossin.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_cossin.lo -MD -MP -MF $(DEPDIR)/cl_F_cossin.Tpo -c -o cl_F_cossin.lo `test -f 'float/transcendental/cl_F_cossin.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_cossin.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_cossin.Tpo $(DEPDIR)/cl_F_cossin.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_cossin.cc' object='cl_F_cossin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_cossin.lo `test -f 'float/transcendental/cl_F_cossin.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_cossin.cc cl_F_eulerconst.lo: float/transcendental/cl_F_eulerconst.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_eulerconst.lo -MD -MP -MF $(DEPDIR)/cl_F_eulerconst.Tpo -c -o cl_F_eulerconst.lo `test -f 'float/transcendental/cl_F_eulerconst.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_eulerconst.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_eulerconst.Tpo $(DEPDIR)/cl_F_eulerconst.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_eulerconst.cc' object='cl_F_eulerconst.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_eulerconst.lo `test -f 'float/transcendental/cl_F_eulerconst.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_eulerconst.cc cl_F_eulerconst_def.lo: float/transcendental/cl_F_eulerconst_def.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_eulerconst_def.lo -MD -MP -MF $(DEPDIR)/cl_F_eulerconst_def.Tpo -c -o cl_F_eulerconst_def.lo `test -f 'float/transcendental/cl_F_eulerconst_def.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_eulerconst_def.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_eulerconst_def.Tpo $(DEPDIR)/cl_F_eulerconst_def.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_eulerconst_def.cc' object='cl_F_eulerconst_def.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_eulerconst_def.lo `test -f 'float/transcendental/cl_F_eulerconst_def.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_eulerconst_def.cc cl_F_eulerconst_f.lo: float/transcendental/cl_F_eulerconst_f.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_eulerconst_f.lo -MD -MP -MF $(DEPDIR)/cl_F_eulerconst_f.Tpo -c -o cl_F_eulerconst_f.lo `test -f 'float/transcendental/cl_F_eulerconst_f.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_eulerconst_f.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_eulerconst_f.Tpo $(DEPDIR)/cl_F_eulerconst_f.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_eulerconst_f.cc' object='cl_F_eulerconst_f.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_eulerconst_f.lo `test -f 'float/transcendental/cl_F_eulerconst_f.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_eulerconst_f.cc cl_F_eulerconst_var.lo: float/transcendental/cl_F_eulerconst_var.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_eulerconst_var.lo -MD -MP -MF $(DEPDIR)/cl_F_eulerconst_var.Tpo -c -o cl_F_eulerconst_var.lo `test -f 'float/transcendental/cl_F_eulerconst_var.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_eulerconst_var.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_eulerconst_var.Tpo $(DEPDIR)/cl_F_eulerconst_var.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_eulerconst_var.cc' object='cl_F_eulerconst_var.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_eulerconst_var.lo `test -f 'float/transcendental/cl_F_eulerconst_var.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_eulerconst_var.cc cl_F_exp.lo: float/transcendental/cl_F_exp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_exp.lo -MD -MP -MF $(DEPDIR)/cl_F_exp.Tpo -c -o cl_F_exp.lo `test -f 'float/transcendental/cl_F_exp.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_exp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_exp.Tpo $(DEPDIR)/cl_F_exp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_exp.cc' object='cl_F_exp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_exp.lo `test -f 'float/transcendental/cl_F_exp.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_exp.cc cl_F_exp1.lo: float/transcendental/cl_F_exp1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_exp1.lo -MD -MP -MF $(DEPDIR)/cl_F_exp1.Tpo -c -o cl_F_exp1.lo `test -f 'float/transcendental/cl_F_exp1.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_exp1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_exp1.Tpo $(DEPDIR)/cl_F_exp1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_exp1.cc' object='cl_F_exp1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_exp1.lo `test -f 'float/transcendental/cl_F_exp1.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_exp1.cc cl_F_exp1_def.lo: float/transcendental/cl_F_exp1_def.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_exp1_def.lo -MD -MP -MF $(DEPDIR)/cl_F_exp1_def.Tpo -c -o cl_F_exp1_def.lo `test -f 'float/transcendental/cl_F_exp1_def.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_exp1_def.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_exp1_def.Tpo $(DEPDIR)/cl_F_exp1_def.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_exp1_def.cc' object='cl_F_exp1_def.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_exp1_def.lo `test -f 'float/transcendental/cl_F_exp1_def.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_exp1_def.cc cl_F_exp1_f.lo: float/transcendental/cl_F_exp1_f.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_exp1_f.lo -MD -MP -MF $(DEPDIR)/cl_F_exp1_f.Tpo -c -o cl_F_exp1_f.lo `test -f 'float/transcendental/cl_F_exp1_f.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_exp1_f.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_exp1_f.Tpo $(DEPDIR)/cl_F_exp1_f.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_exp1_f.cc' object='cl_F_exp1_f.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_exp1_f.lo `test -f 'float/transcendental/cl_F_exp1_f.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_exp1_f.cc cl_F_exp1_var.lo: float/transcendental/cl_F_exp1_var.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_exp1_var.lo -MD -MP -MF $(DEPDIR)/cl_F_exp1_var.Tpo -c -o cl_F_exp1_var.lo `test -f 'float/transcendental/cl_F_exp1_var.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_exp1_var.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_exp1_var.Tpo $(DEPDIR)/cl_F_exp1_var.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_exp1_var.cc' object='cl_F_exp1_var.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_exp1_var.lo `test -f 'float/transcendental/cl_F_exp1_var.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_exp1_var.cc cl_F_expx.lo: float/transcendental/cl_F_expx.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_expx.lo -MD -MP -MF $(DEPDIR)/cl_F_expx.Tpo -c -o cl_F_expx.lo `test -f 'float/transcendental/cl_F_expx.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_expx.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_expx.Tpo $(DEPDIR)/cl_F_expx.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_expx.cc' object='cl_F_expx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_expx.lo `test -f 'float/transcendental/cl_F_expx.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_expx.cc cl_F_ln.lo: float/transcendental/cl_F_ln.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_ln.lo -MD -MP -MF $(DEPDIR)/cl_F_ln.Tpo -c -o cl_F_ln.lo `test -f 'float/transcendental/cl_F_ln.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_ln.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_ln.Tpo $(DEPDIR)/cl_F_ln.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_ln.cc' object='cl_F_ln.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_ln.lo `test -f 'float/transcendental/cl_F_ln.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_ln.cc cl_F_ln10.lo: float/transcendental/cl_F_ln10.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_ln10.lo -MD -MP -MF $(DEPDIR)/cl_F_ln10.Tpo -c -o cl_F_ln10.lo `test -f 'float/transcendental/cl_F_ln10.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_ln10.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_ln10.Tpo $(DEPDIR)/cl_F_ln10.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_ln10.cc' object='cl_F_ln10.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_ln10.lo `test -f 'float/transcendental/cl_F_ln10.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_ln10.cc cl_F_ln10_f.lo: float/transcendental/cl_F_ln10_f.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_ln10_f.lo -MD -MP -MF $(DEPDIR)/cl_F_ln10_f.Tpo -c -o cl_F_ln10_f.lo `test -f 'float/transcendental/cl_F_ln10_f.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_ln10_f.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_ln10_f.Tpo $(DEPDIR)/cl_F_ln10_f.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_ln10_f.cc' object='cl_F_ln10_f.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_ln10_f.lo `test -f 'float/transcendental/cl_F_ln10_f.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_ln10_f.cc cl_F_ln10_var.lo: float/transcendental/cl_F_ln10_var.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_ln10_var.lo -MD -MP -MF $(DEPDIR)/cl_F_ln10_var.Tpo -c -o cl_F_ln10_var.lo `test -f 'float/transcendental/cl_F_ln10_var.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_ln10_var.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_ln10_var.Tpo $(DEPDIR)/cl_F_ln10_var.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_ln10_var.cc' object='cl_F_ln10_var.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_ln10_var.lo `test -f 'float/transcendental/cl_F_ln10_var.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_ln10_var.cc cl_F_ln2.lo: float/transcendental/cl_F_ln2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_ln2.lo -MD -MP -MF $(DEPDIR)/cl_F_ln2.Tpo -c -o cl_F_ln2.lo `test -f 'float/transcendental/cl_F_ln2.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_ln2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_ln2.Tpo $(DEPDIR)/cl_F_ln2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_ln2.cc' object='cl_F_ln2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_ln2.lo `test -f 'float/transcendental/cl_F_ln2.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_ln2.cc cl_F_ln2_f.lo: float/transcendental/cl_F_ln2_f.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_ln2_f.lo -MD -MP -MF $(DEPDIR)/cl_F_ln2_f.Tpo -c -o cl_F_ln2_f.lo `test -f 'float/transcendental/cl_F_ln2_f.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_ln2_f.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_ln2_f.Tpo $(DEPDIR)/cl_F_ln2_f.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_ln2_f.cc' object='cl_F_ln2_f.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_ln2_f.lo `test -f 'float/transcendental/cl_F_ln2_f.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_ln2_f.cc cl_F_ln2_var.lo: float/transcendental/cl_F_ln2_var.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_ln2_var.lo -MD -MP -MF $(DEPDIR)/cl_F_ln2_var.Tpo -c -o cl_F_ln2_var.lo `test -f 'float/transcendental/cl_F_ln2_var.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_ln2_var.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_ln2_var.Tpo $(DEPDIR)/cl_F_ln2_var.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_ln2_var.cc' object='cl_F_ln2_var.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_ln2_var.lo `test -f 'float/transcendental/cl_F_ln2_var.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_ln2_var.cc cl_F_lnx.lo: float/transcendental/cl_F_lnx.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_lnx.lo -MD -MP -MF $(DEPDIR)/cl_F_lnx.Tpo -c -o cl_F_lnx.lo `test -f 'float/transcendental/cl_F_lnx.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_lnx.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_lnx.Tpo $(DEPDIR)/cl_F_lnx.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_lnx.cc' object='cl_F_lnx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_lnx.lo `test -f 'float/transcendental/cl_F_lnx.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_lnx.cc cl_F_pi.lo: float/transcendental/cl_F_pi.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_pi.lo -MD -MP -MF $(DEPDIR)/cl_F_pi.Tpo -c -o cl_F_pi.lo `test -f 'float/transcendental/cl_F_pi.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_pi.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_pi.Tpo $(DEPDIR)/cl_F_pi.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_pi.cc' object='cl_F_pi.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_pi.lo `test -f 'float/transcendental/cl_F_pi.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_pi.cc cl_F_pi_def.lo: float/transcendental/cl_F_pi_def.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_pi_def.lo -MD -MP -MF $(DEPDIR)/cl_F_pi_def.Tpo -c -o cl_F_pi_def.lo `test -f 'float/transcendental/cl_F_pi_def.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_pi_def.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_pi_def.Tpo $(DEPDIR)/cl_F_pi_def.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_pi_def.cc' object='cl_F_pi_def.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_pi_def.lo `test -f 'float/transcendental/cl_F_pi_def.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_pi_def.cc cl_F_pi_f.lo: float/transcendental/cl_F_pi_f.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_pi_f.lo -MD -MP -MF $(DEPDIR)/cl_F_pi_f.Tpo -c -o cl_F_pi_f.lo `test -f 'float/transcendental/cl_F_pi_f.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_pi_f.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_pi_f.Tpo $(DEPDIR)/cl_F_pi_f.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_pi_f.cc' object='cl_F_pi_f.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_pi_f.lo `test -f 'float/transcendental/cl_F_pi_f.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_pi_f.cc cl_F_pi_var.lo: float/transcendental/cl_F_pi_var.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_pi_var.lo -MD -MP -MF $(DEPDIR)/cl_F_pi_var.Tpo -c -o cl_F_pi_var.lo `test -f 'float/transcendental/cl_F_pi_var.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_pi_var.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_pi_var.Tpo $(DEPDIR)/cl_F_pi_var.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_pi_var.cc' object='cl_F_pi_var.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_pi_var.lo `test -f 'float/transcendental/cl_F_pi_var.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_pi_var.cc cl_F_roundpi.lo: float/transcendental/cl_F_roundpi.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_roundpi.lo -MD -MP -MF $(DEPDIR)/cl_F_roundpi.Tpo -c -o cl_F_roundpi.lo `test -f 'float/transcendental/cl_F_roundpi.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_roundpi.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_roundpi.Tpo $(DEPDIR)/cl_F_roundpi.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_roundpi.cc' object='cl_F_roundpi.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_roundpi.lo `test -f 'float/transcendental/cl_F_roundpi.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_roundpi.cc cl_F_roundpi2.lo: float/transcendental/cl_F_roundpi2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_roundpi2.lo -MD -MP -MF $(DEPDIR)/cl_F_roundpi2.Tpo -c -o cl_F_roundpi2.lo `test -f 'float/transcendental/cl_F_roundpi2.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_roundpi2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_roundpi2.Tpo $(DEPDIR)/cl_F_roundpi2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_roundpi2.cc' object='cl_F_roundpi2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_roundpi2.lo `test -f 'float/transcendental/cl_F_roundpi2.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_roundpi2.cc cl_F_sin.lo: float/transcendental/cl_F_sin.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_sin.lo -MD -MP -MF $(DEPDIR)/cl_F_sin.Tpo -c -o cl_F_sin.lo `test -f 'float/transcendental/cl_F_sin.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_sin.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_sin.Tpo $(DEPDIR)/cl_F_sin.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_sin.cc' object='cl_F_sin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_sin.lo `test -f 'float/transcendental/cl_F_sin.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_sin.cc cl_F_sinh.lo: float/transcendental/cl_F_sinh.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_sinh.lo -MD -MP -MF $(DEPDIR)/cl_F_sinh.Tpo -c -o cl_F_sinh.lo `test -f 'float/transcendental/cl_F_sinh.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_sinh.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_sinh.Tpo $(DEPDIR)/cl_F_sinh.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_sinh.cc' object='cl_F_sinh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_sinh.lo `test -f 'float/transcendental/cl_F_sinh.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_sinh.cc cl_F_sinhx.lo: float/transcendental/cl_F_sinhx.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_sinhx.lo -MD -MP -MF $(DEPDIR)/cl_F_sinhx.Tpo -c -o cl_F_sinhx.lo `test -f 'float/transcendental/cl_F_sinhx.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_sinhx.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_sinhx.Tpo $(DEPDIR)/cl_F_sinhx.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_sinhx.cc' object='cl_F_sinhx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_sinhx.lo `test -f 'float/transcendental/cl_F_sinhx.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_sinhx.cc cl_F_sinx.lo: float/transcendental/cl_F_sinx.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_sinx.lo -MD -MP -MF $(DEPDIR)/cl_F_sinx.Tpo -c -o cl_F_sinx.lo `test -f 'float/transcendental/cl_F_sinx.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_sinx.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_sinx.Tpo $(DEPDIR)/cl_F_sinx.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_sinx.cc' object='cl_F_sinx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_sinx.lo `test -f 'float/transcendental/cl_F_sinx.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_sinx.cc cl_F_tan.lo: float/transcendental/cl_F_tan.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_tan.lo -MD -MP -MF $(DEPDIR)/cl_F_tan.Tpo -c -o cl_F_tan.lo `test -f 'float/transcendental/cl_F_tan.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_tan.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_tan.Tpo $(DEPDIR)/cl_F_tan.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_tan.cc' object='cl_F_tan.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_tan.lo `test -f 'float/transcendental/cl_F_tan.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_tan.cc cl_F_tanh.lo: float/transcendental/cl_F_tanh.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_tanh.lo -MD -MP -MF $(DEPDIR)/cl_F_tanh.Tpo -c -o cl_F_tanh.lo `test -f 'float/transcendental/cl_F_tanh.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_tanh.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_tanh.Tpo $(DEPDIR)/cl_F_tanh.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_tanh.cc' object='cl_F_tanh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_tanh.lo `test -f 'float/transcendental/cl_F_tanh.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_tanh.cc cl_F_zeta_int.lo: float/transcendental/cl_F_zeta_int.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_zeta_int.lo -MD -MP -MF $(DEPDIR)/cl_F_zeta_int.Tpo -c -o cl_F_zeta_int.lo `test -f 'float/transcendental/cl_F_zeta_int.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_zeta_int.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_zeta_int.Tpo $(DEPDIR)/cl_F_zeta_int.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_zeta_int.cc' object='cl_F_zeta_int.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_zeta_int.lo `test -f 'float/transcendental/cl_F_zeta_int.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_zeta_int.cc cl_F_zeta_int_def.lo: float/transcendental/cl_F_zeta_int_def.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_zeta_int_def.lo -MD -MP -MF $(DEPDIR)/cl_F_zeta_int_def.Tpo -c -o cl_F_zeta_int_def.lo `test -f 'float/transcendental/cl_F_zeta_int_def.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_zeta_int_def.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_zeta_int_def.Tpo $(DEPDIR)/cl_F_zeta_int_def.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_zeta_int_def.cc' object='cl_F_zeta_int_def.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_zeta_int_def.lo `test -f 'float/transcendental/cl_F_zeta_int_def.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_zeta_int_def.cc cl_F_zeta_int_f.lo: float/transcendental/cl_F_zeta_int_f.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_zeta_int_f.lo -MD -MP -MF $(DEPDIR)/cl_F_zeta_int_f.Tpo -c -o cl_F_zeta_int_f.lo `test -f 'float/transcendental/cl_F_zeta_int_f.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_zeta_int_f.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_zeta_int_f.Tpo $(DEPDIR)/cl_F_zeta_int_f.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_F_zeta_int_f.cc' object='cl_F_zeta_int_f.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_zeta_int_f.lo `test -f 'float/transcendental/cl_F_zeta_int_f.cc' || echo '$(srcdir)/'`float/transcendental/cl_F_zeta_int_f.cc cl_LF_atan_recip.lo: float/transcendental/cl_LF_atan_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_atan_recip.lo -MD -MP -MF $(DEPDIR)/cl_LF_atan_recip.Tpo -c -o cl_LF_atan_recip.lo `test -f 'float/transcendental/cl_LF_atan_recip.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_atan_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_atan_recip.Tpo $(DEPDIR)/cl_LF_atan_recip.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_atan_recip.cc' object='cl_LF_atan_recip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_atan_recip.lo `test -f 'float/transcendental/cl_LF_atan_recip.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_atan_recip.cc cl_LF_atanh_recip.lo: float/transcendental/cl_LF_atanh_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_atanh_recip.lo -MD -MP -MF $(DEPDIR)/cl_LF_atanh_recip.Tpo -c -o cl_LF_atanh_recip.lo `test -f 'float/transcendental/cl_LF_atanh_recip.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_atanh_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_atanh_recip.Tpo $(DEPDIR)/cl_LF_atanh_recip.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_atanh_recip.cc' object='cl_LF_atanh_recip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_atanh_recip.lo `test -f 'float/transcendental/cl_LF_atanh_recip.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_atanh_recip.cc cl_LF_catalanconst.lo: float/transcendental/cl_LF_catalanconst.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_catalanconst.lo -MD -MP -MF $(DEPDIR)/cl_LF_catalanconst.Tpo -c -o cl_LF_catalanconst.lo `test -f 'float/transcendental/cl_LF_catalanconst.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_catalanconst.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_catalanconst.Tpo $(DEPDIR)/cl_LF_catalanconst.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_catalanconst.cc' object='cl_LF_catalanconst.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_catalanconst.lo `test -f 'float/transcendental/cl_LF_catalanconst.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_catalanconst.cc cl_LF_coshsinh.lo: float/transcendental/cl_LF_coshsinh.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_coshsinh.lo -MD -MP -MF $(DEPDIR)/cl_LF_coshsinh.Tpo -c -o cl_LF_coshsinh.lo `test -f 'float/transcendental/cl_LF_coshsinh.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_coshsinh.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_coshsinh.Tpo $(DEPDIR)/cl_LF_coshsinh.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_coshsinh.cc' object='cl_LF_coshsinh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_coshsinh.lo `test -f 'float/transcendental/cl_LF_coshsinh.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_coshsinh.cc cl_LF_coshsinh_aux.lo: float/transcendental/cl_LF_coshsinh_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_coshsinh_aux.lo -MD -MP -MF $(DEPDIR)/cl_LF_coshsinh_aux.Tpo -c -o cl_LF_coshsinh_aux.lo `test -f 'float/transcendental/cl_LF_coshsinh_aux.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_coshsinh_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_coshsinh_aux.Tpo $(DEPDIR)/cl_LF_coshsinh_aux.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_coshsinh_aux.cc' object='cl_LF_coshsinh_aux.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_coshsinh_aux.lo `test -f 'float/transcendental/cl_LF_coshsinh_aux.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_coshsinh_aux.cc cl_LF_cossin.lo: float/transcendental/cl_LF_cossin.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_cossin.lo -MD -MP -MF $(DEPDIR)/cl_LF_cossin.Tpo -c -o cl_LF_cossin.lo `test -f 'float/transcendental/cl_LF_cossin.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_cossin.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_cossin.Tpo $(DEPDIR)/cl_LF_cossin.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_cossin.cc' object='cl_LF_cossin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_cossin.lo `test -f 'float/transcendental/cl_LF_cossin.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_cossin.cc cl_LF_cossin_aux.lo: float/transcendental/cl_LF_cossin_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_cossin_aux.lo -MD -MP -MF $(DEPDIR)/cl_LF_cossin_aux.Tpo -c -o cl_LF_cossin_aux.lo `test -f 'float/transcendental/cl_LF_cossin_aux.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_cossin_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_cossin_aux.Tpo $(DEPDIR)/cl_LF_cossin_aux.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_cossin_aux.cc' object='cl_LF_cossin_aux.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_cossin_aux.lo `test -f 'float/transcendental/cl_LF_cossin_aux.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_cossin_aux.cc cl_LF_eulerconst.lo: float/transcendental/cl_LF_eulerconst.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_eulerconst.lo -MD -MP -MF $(DEPDIR)/cl_LF_eulerconst.Tpo -c -o cl_LF_eulerconst.lo `test -f 'float/transcendental/cl_LF_eulerconst.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_eulerconst.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_eulerconst.Tpo $(DEPDIR)/cl_LF_eulerconst.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_eulerconst.cc' object='cl_LF_eulerconst.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_eulerconst.lo `test -f 'float/transcendental/cl_LF_eulerconst.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_eulerconst.cc cl_LF_exp1.lo: float/transcendental/cl_LF_exp1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_exp1.lo -MD -MP -MF $(DEPDIR)/cl_LF_exp1.Tpo -c -o cl_LF_exp1.lo `test -f 'float/transcendental/cl_LF_exp1.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_exp1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_exp1.Tpo $(DEPDIR)/cl_LF_exp1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_exp1.cc' object='cl_LF_exp1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_exp1.lo `test -f 'float/transcendental/cl_LF_exp1.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_exp1.cc cl_LF_exp_aux.lo: float/transcendental/cl_LF_exp_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_exp_aux.lo -MD -MP -MF $(DEPDIR)/cl_LF_exp_aux.Tpo -c -o cl_LF_exp_aux.lo `test -f 'float/transcendental/cl_LF_exp_aux.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_exp_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_exp_aux.Tpo $(DEPDIR)/cl_LF_exp_aux.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_exp_aux.cc' object='cl_LF_exp_aux.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_exp_aux.lo `test -f 'float/transcendental/cl_LF_exp_aux.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_exp_aux.cc cl_LF_ln10.lo: float/transcendental/cl_LF_ln10.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ln10.lo -MD -MP -MF $(DEPDIR)/cl_LF_ln10.Tpo -c -o cl_LF_ln10.lo `test -f 'float/transcendental/cl_LF_ln10.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ln10.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ln10.Tpo $(DEPDIR)/cl_LF_ln10.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ln10.cc' object='cl_LF_ln10.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ln10.lo `test -f 'float/transcendental/cl_LF_ln10.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ln10.cc cl_LF_ln2.lo: float/transcendental/cl_LF_ln2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ln2.lo -MD -MP -MF $(DEPDIR)/cl_LF_ln2.Tpo -c -o cl_LF_ln2.lo `test -f 'float/transcendental/cl_LF_ln2.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ln2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ln2.Tpo $(DEPDIR)/cl_LF_ln2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ln2.cc' object='cl_LF_ln2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ln2.lo `test -f 'float/transcendental/cl_LF_ln2.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ln2.cc cl_LF_pi.lo: float/transcendental/cl_LF_pi.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_pi.lo -MD -MP -MF $(DEPDIR)/cl_LF_pi.Tpo -c -o cl_LF_pi.lo `test -f 'float/transcendental/cl_LF_pi.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_pi.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_pi.Tpo $(DEPDIR)/cl_LF_pi.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_pi.cc' object='cl_LF_pi.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_pi.lo `test -f 'float/transcendental/cl_LF_pi.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_pi.cc cl_LF_ratseries_.lo: float/transcendental/cl_LF_ratseries_.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ratseries_.lo -MD -MP -MF $(DEPDIR)/cl_LF_ratseries_.Tpo -c -o cl_LF_ratseries_.lo `test -f 'float/transcendental/cl_LF_ratseries_.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ratseries_.Tpo $(DEPDIR)/cl_LF_ratseries_.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ratseries_.cc' object='cl_LF_ratseries_.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ratseries_.lo `test -f 'float/transcendental/cl_LF_ratseries_.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_.cc cl_LF_ratseries_a.lo: float/transcendental/cl_LF_ratseries_a.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ratseries_a.lo -MD -MP -MF $(DEPDIR)/cl_LF_ratseries_a.Tpo -c -o cl_LF_ratseries_a.lo `test -f 'float/transcendental/cl_LF_ratseries_a.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_a.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ratseries_a.Tpo $(DEPDIR)/cl_LF_ratseries_a.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ratseries_a.cc' object='cl_LF_ratseries_a.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ratseries_a.lo `test -f 'float/transcendental/cl_LF_ratseries_a.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_a.cc cl_LF_ratseries_ab.lo: float/transcendental/cl_LF_ratseries_ab.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ratseries_ab.lo -MD -MP -MF $(DEPDIR)/cl_LF_ratseries_ab.Tpo -c -o cl_LF_ratseries_ab.lo `test -f 'float/transcendental/cl_LF_ratseries_ab.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_ab.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ratseries_ab.Tpo $(DEPDIR)/cl_LF_ratseries_ab.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ratseries_ab.cc' object='cl_LF_ratseries_ab.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ratseries_ab.lo `test -f 'float/transcendental/cl_LF_ratseries_ab.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_ab.cc cl_LF_ratseries_b.lo: float/transcendental/cl_LF_ratseries_b.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ratseries_b.lo -MD -MP -MF $(DEPDIR)/cl_LF_ratseries_b.Tpo -c -o cl_LF_ratseries_b.lo `test -f 'float/transcendental/cl_LF_ratseries_b.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_b.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ratseries_b.Tpo $(DEPDIR)/cl_LF_ratseries_b.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ratseries_b.cc' object='cl_LF_ratseries_b.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ratseries_b.lo `test -f 'float/transcendental/cl_LF_ratseries_b.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_b.cc cl_LF_ratseries_p.lo: float/transcendental/cl_LF_ratseries_p.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ratseries_p.lo -MD -MP -MF $(DEPDIR)/cl_LF_ratseries_p.Tpo -c -o cl_LF_ratseries_p.lo `test -f 'float/transcendental/cl_LF_ratseries_p.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_p.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ratseries_p.Tpo $(DEPDIR)/cl_LF_ratseries_p.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ratseries_p.cc' object='cl_LF_ratseries_p.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ratseries_p.lo `test -f 'float/transcendental/cl_LF_ratseries_p.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_p.cc cl_LF_ratseries_pa.lo: float/transcendental/cl_LF_ratseries_pa.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ratseries_pa.lo -MD -MP -MF $(DEPDIR)/cl_LF_ratseries_pa.Tpo -c -o cl_LF_ratseries_pa.lo `test -f 'float/transcendental/cl_LF_ratseries_pa.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_pa.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ratseries_pa.Tpo $(DEPDIR)/cl_LF_ratseries_pa.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ratseries_pa.cc' object='cl_LF_ratseries_pa.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ratseries_pa.lo `test -f 'float/transcendental/cl_LF_ratseries_pa.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_pa.cc cl_LF_ratseries_pab.lo: float/transcendental/cl_LF_ratseries_pab.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ratseries_pab.lo -MD -MP -MF $(DEPDIR)/cl_LF_ratseries_pab.Tpo -c -o cl_LF_ratseries_pab.lo `test -f 'float/transcendental/cl_LF_ratseries_pab.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_pab.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ratseries_pab.Tpo $(DEPDIR)/cl_LF_ratseries_pab.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ratseries_pab.cc' object='cl_LF_ratseries_pab.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ratseries_pab.lo `test -f 'float/transcendental/cl_LF_ratseries_pab.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_pab.cc cl_LF_ratseries_pb.lo: float/transcendental/cl_LF_ratseries_pb.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ratseries_pb.lo -MD -MP -MF $(DEPDIR)/cl_LF_ratseries_pb.Tpo -c -o cl_LF_ratseries_pb.lo `test -f 'float/transcendental/cl_LF_ratseries_pb.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_pb.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ratseries_pb.Tpo $(DEPDIR)/cl_LF_ratseries_pb.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ratseries_pb.cc' object='cl_LF_ratseries_pb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ratseries_pb.lo `test -f 'float/transcendental/cl_LF_ratseries_pb.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_pb.cc cl_LF_ratseries_pq.lo: float/transcendental/cl_LF_ratseries_pq.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ratseries_pq.lo -MD -MP -MF $(DEPDIR)/cl_LF_ratseries_pq.Tpo -c -o cl_LF_ratseries_pq.lo `test -f 'float/transcendental/cl_LF_ratseries_pq.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_pq.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ratseries_pq.Tpo $(DEPDIR)/cl_LF_ratseries_pq.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ratseries_pq.cc' object='cl_LF_ratseries_pq.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ratseries_pq.lo `test -f 'float/transcendental/cl_LF_ratseries_pq.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_pq.cc cl_LF_ratseries_pqa.lo: float/transcendental/cl_LF_ratseries_pqa.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ratseries_pqa.lo -MD -MP -MF $(DEPDIR)/cl_LF_ratseries_pqa.Tpo -c -o cl_LF_ratseries_pqa.lo `test -f 'float/transcendental/cl_LF_ratseries_pqa.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_pqa.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ratseries_pqa.Tpo $(DEPDIR)/cl_LF_ratseries_pqa.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ratseries_pqa.cc' object='cl_LF_ratseries_pqa.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ratseries_pqa.lo `test -f 'float/transcendental/cl_LF_ratseries_pqa.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_pqa.cc cl_LF_ratseries_pqab.lo: float/transcendental/cl_LF_ratseries_pqab.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ratseries_pqab.lo -MD -MP -MF $(DEPDIR)/cl_LF_ratseries_pqab.Tpo -c -o cl_LF_ratseries_pqab.lo `test -f 'float/transcendental/cl_LF_ratseries_pqab.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_pqab.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ratseries_pqab.Tpo $(DEPDIR)/cl_LF_ratseries_pqab.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ratseries_pqab.cc' object='cl_LF_ratseries_pqab.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ratseries_pqab.lo `test -f 'float/transcendental/cl_LF_ratseries_pqab.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_pqab.cc cl_LF_ratseries_pqb.lo: float/transcendental/cl_LF_ratseries_pqb.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ratseries_pqb.lo -MD -MP -MF $(DEPDIR)/cl_LF_ratseries_pqb.Tpo -c -o cl_LF_ratseries_pqb.lo `test -f 'float/transcendental/cl_LF_ratseries_pqb.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_pqb.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ratseries_pqb.Tpo $(DEPDIR)/cl_LF_ratseries_pqb.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ratseries_pqb.cc' object='cl_LF_ratseries_pqb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ratseries_pqb.lo `test -f 'float/transcendental/cl_LF_ratseries_pqb.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_pqb.cc cl_LF_ratseries_q.lo: float/transcendental/cl_LF_ratseries_q.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ratseries_q.lo -MD -MP -MF $(DEPDIR)/cl_LF_ratseries_q.Tpo -c -o cl_LF_ratseries_q.lo `test -f 'float/transcendental/cl_LF_ratseries_q.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_q.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ratseries_q.Tpo $(DEPDIR)/cl_LF_ratseries_q.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ratseries_q.cc' object='cl_LF_ratseries_q.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ratseries_q.lo `test -f 'float/transcendental/cl_LF_ratseries_q.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_q.cc cl_LF_ratseries_qa.lo: float/transcendental/cl_LF_ratseries_qa.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ratseries_qa.lo -MD -MP -MF $(DEPDIR)/cl_LF_ratseries_qa.Tpo -c -o cl_LF_ratseries_qa.lo `test -f 'float/transcendental/cl_LF_ratseries_qa.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_qa.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ratseries_qa.Tpo $(DEPDIR)/cl_LF_ratseries_qa.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ratseries_qa.cc' object='cl_LF_ratseries_qa.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ratseries_qa.lo `test -f 'float/transcendental/cl_LF_ratseries_qa.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_qa.cc cl_LF_ratseries_qab.lo: float/transcendental/cl_LF_ratseries_qab.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ratseries_qab.lo -MD -MP -MF $(DEPDIR)/cl_LF_ratseries_qab.Tpo -c -o cl_LF_ratseries_qab.lo `test -f 'float/transcendental/cl_LF_ratseries_qab.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_qab.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ratseries_qab.Tpo $(DEPDIR)/cl_LF_ratseries_qab.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ratseries_qab.cc' object='cl_LF_ratseries_qab.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ratseries_qab.lo `test -f 'float/transcendental/cl_LF_ratseries_qab.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_qab.cc cl_LF_ratseries_qb.lo: float/transcendental/cl_LF_ratseries_qb.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ratseries_qb.lo -MD -MP -MF $(DEPDIR)/cl_LF_ratseries_qb.Tpo -c -o cl_LF_ratseries_qb.lo `test -f 'float/transcendental/cl_LF_ratseries_qb.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_qb.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ratseries_qb.Tpo $(DEPDIR)/cl_LF_ratseries_qb.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ratseries_qb.cc' object='cl_LF_ratseries_qb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ratseries_qb.lo `test -f 'float/transcendental/cl_LF_ratseries_qb.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratseries_qb.cc cl_LF_ratsumseries_pqcd.lo: float/transcendental/cl_LF_ratsumseries_pqcd.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ratsumseries_pqcd.lo -MD -MP -MF $(DEPDIR)/cl_LF_ratsumseries_pqcd.Tpo -c -o cl_LF_ratsumseries_pqcd.lo `test -f 'float/transcendental/cl_LF_ratsumseries_pqcd.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratsumseries_pqcd.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ratsumseries_pqcd.Tpo $(DEPDIR)/cl_LF_ratsumseries_pqcd.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ratsumseries_pqcd.cc' object='cl_LF_ratsumseries_pqcd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ratsumseries_pqcd.lo `test -f 'float/transcendental/cl_LF_ratsumseries_pqcd.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratsumseries_pqcd.cc cl_LF_ratsumseries_pqcd_aux.lo: float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ratsumseries_pqcd_aux.lo -MD -MP -MF $(DEPDIR)/cl_LF_ratsumseries_pqcd_aux.Tpo -c -o cl_LF_ratsumseries_pqcd_aux.lo `test -f 'float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ratsumseries_pqcd_aux.Tpo $(DEPDIR)/cl_LF_ratsumseries_pqcd_aux.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc' object='cl_LF_ratsumseries_pqcd_aux.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ratsumseries_pqcd_aux.lo `test -f 'float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc cl_LF_ratsumseries_pqd.lo: float/transcendental/cl_LF_ratsumseries_pqd.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ratsumseries_pqd.lo -MD -MP -MF $(DEPDIR)/cl_LF_ratsumseries_pqd.Tpo -c -o cl_LF_ratsumseries_pqd.lo `test -f 'float/transcendental/cl_LF_ratsumseries_pqd.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratsumseries_pqd.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ratsumseries_pqd.Tpo $(DEPDIR)/cl_LF_ratsumseries_pqd.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ratsumseries_pqd.cc' object='cl_LF_ratsumseries_pqd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ratsumseries_pqd.lo `test -f 'float/transcendental/cl_LF_ratsumseries_pqd.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratsumseries_pqd.cc cl_LF_ratsumseries_pqd_aux.lo: float/transcendental/cl_LF_ratsumseries_pqd_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_ratsumseries_pqd_aux.lo -MD -MP -MF $(DEPDIR)/cl_LF_ratsumseries_pqd_aux.Tpo -c -o cl_LF_ratsumseries_pqd_aux.lo `test -f 'float/transcendental/cl_LF_ratsumseries_pqd_aux.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratsumseries_pqd_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_ratsumseries_pqd_aux.Tpo $(DEPDIR)/cl_LF_ratsumseries_pqd_aux.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_ratsumseries_pqd_aux.cc' object='cl_LF_ratsumseries_pqd_aux.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_ratsumseries_pqd_aux.lo `test -f 'float/transcendental/cl_LF_ratsumseries_pqd_aux.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_ratsumseries_pqd_aux.cc cl_LF_zeta3.lo: float/transcendental/cl_LF_zeta3.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_zeta3.lo -MD -MP -MF $(DEPDIR)/cl_LF_zeta3.Tpo -c -o cl_LF_zeta3.lo `test -f 'float/transcendental/cl_LF_zeta3.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_zeta3.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_zeta3.Tpo $(DEPDIR)/cl_LF_zeta3.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_zeta3.cc' object='cl_LF_zeta3.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_zeta3.lo `test -f 'float/transcendental/cl_LF_zeta3.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_zeta3.cc cl_LF_zeta_int.lo: float/transcendental/cl_LF_zeta_int.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_LF_zeta_int.lo -MD -MP -MF $(DEPDIR)/cl_LF_zeta_int.Tpo -c -o cl_LF_zeta_int.lo `test -f 'float/transcendental/cl_LF_zeta_int.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_zeta_int.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_LF_zeta_int.Tpo $(DEPDIR)/cl_LF_zeta_int.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='float/transcendental/cl_LF_zeta_int.cc' object='cl_LF_zeta_int.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_LF_zeta_int.lo `test -f 'float/transcendental/cl_LF_zeta_int.cc' || echo '$(srcdir)/'`float/transcendental/cl_LF_zeta_int.cc cl_I_2adic_div.lo: integer/2adic/cl_I_2adic_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_2adic_div.lo -MD -MP -MF $(DEPDIR)/cl_I_2adic_div.Tpo -c -o cl_I_2adic_div.lo `test -f 'integer/2adic/cl_I_2adic_div.cc' || echo '$(srcdir)/'`integer/2adic/cl_I_2adic_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_2adic_div.Tpo $(DEPDIR)/cl_I_2adic_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/2adic/cl_I_2adic_div.cc' object='cl_I_2adic_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_2adic_div.lo `test -f 'integer/2adic/cl_I_2adic_div.cc' || echo '$(srcdir)/'`integer/2adic/cl_I_2adic_div.cc cl_I_2adic_recip.lo: integer/2adic/cl_I_2adic_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_2adic_recip.lo -MD -MP -MF $(DEPDIR)/cl_I_2adic_recip.Tpo -c -o cl_I_2adic_recip.lo `test -f 'integer/2adic/cl_I_2adic_recip.cc' || echo '$(srcdir)/'`integer/2adic/cl_I_2adic_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_2adic_recip.Tpo $(DEPDIR)/cl_I_2adic_recip.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/2adic/cl_I_2adic_recip.cc' object='cl_I_2adic_recip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_2adic_recip.lo `test -f 'integer/2adic/cl_I_2adic_recip.cc' || echo '$(srcdir)/'`integer/2adic/cl_I_2adic_recip.cc cl_I_rootp.lo: integer/algebraic/cl_I_rootp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_rootp.lo -MD -MP -MF $(DEPDIR)/cl_I_rootp.Tpo -c -o cl_I_rootp.lo `test -f 'integer/algebraic/cl_I_rootp.cc' || echo '$(srcdir)/'`integer/algebraic/cl_I_rootp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_rootp.Tpo $(DEPDIR)/cl_I_rootp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/algebraic/cl_I_rootp.cc' object='cl_I_rootp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_rootp.lo `test -f 'integer/algebraic/cl_I_rootp.cc' || echo '$(srcdir)/'`integer/algebraic/cl_I_rootp.cc cl_I_rootp_I.lo: integer/algebraic/cl_I_rootp_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_rootp_I.lo -MD -MP -MF $(DEPDIR)/cl_I_rootp_I.Tpo -c -o cl_I_rootp_I.lo `test -f 'integer/algebraic/cl_I_rootp_I.cc' || echo '$(srcdir)/'`integer/algebraic/cl_I_rootp_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_rootp_I.Tpo $(DEPDIR)/cl_I_rootp_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/algebraic/cl_I_rootp_I.cc' object='cl_I_rootp_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_rootp_I.lo `test -f 'integer/algebraic/cl_I_rootp_I.cc' || echo '$(srcdir)/'`integer/algebraic/cl_I_rootp_I.cc cl_I_rootp_aux.lo: integer/algebraic/cl_I_rootp_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_rootp_aux.lo -MD -MP -MF $(DEPDIR)/cl_I_rootp_aux.Tpo -c -o cl_I_rootp_aux.lo `test -f 'integer/algebraic/cl_I_rootp_aux.cc' || echo '$(srcdir)/'`integer/algebraic/cl_I_rootp_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_rootp_aux.Tpo $(DEPDIR)/cl_I_rootp_aux.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/algebraic/cl_I_rootp_aux.cc' object='cl_I_rootp_aux.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_rootp_aux.lo `test -f 'integer/algebraic/cl_I_rootp_aux.cc' || echo '$(srcdir)/'`integer/algebraic/cl_I_rootp_aux.cc cl_I_sqrt.lo: integer/algebraic/cl_I_sqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_sqrt.lo -MD -MP -MF $(DEPDIR)/cl_I_sqrt.Tpo -c -o cl_I_sqrt.lo `test -f 'integer/algebraic/cl_I_sqrt.cc' || echo '$(srcdir)/'`integer/algebraic/cl_I_sqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_sqrt.Tpo $(DEPDIR)/cl_I_sqrt.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/algebraic/cl_I_sqrt.cc' object='cl_I_sqrt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_sqrt.lo `test -f 'integer/algebraic/cl_I_sqrt.cc' || echo '$(srcdir)/'`integer/algebraic/cl_I_sqrt.cc cl_I_sqrtp.lo: integer/algebraic/cl_I_sqrtp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_sqrtp.lo -MD -MP -MF $(DEPDIR)/cl_I_sqrtp.Tpo -c -o cl_I_sqrtp.lo `test -f 'integer/algebraic/cl_I_sqrtp.cc' || echo '$(srcdir)/'`integer/algebraic/cl_I_sqrtp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_sqrtp.Tpo $(DEPDIR)/cl_I_sqrtp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/algebraic/cl_I_sqrtp.cc' object='cl_I_sqrtp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_sqrtp.lo `test -f 'integer/algebraic/cl_I_sqrtp.cc' || echo '$(srcdir)/'`integer/algebraic/cl_I_sqrtp.cc cl_I_ash.lo: integer/bitwise/cl_I_ash.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_ash.lo -MD -MP -MF $(DEPDIR)/cl_I_ash.Tpo -c -o cl_I_ash.lo `test -f 'integer/bitwise/cl_I_ash.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_ash.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_ash.Tpo $(DEPDIR)/cl_I_ash.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_ash.cc' object='cl_I_ash.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_ash.lo `test -f 'integer/bitwise/cl_I_ash.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_ash.cc cl_I_ash_I.lo: integer/bitwise/cl_I_ash_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_ash_I.lo -MD -MP -MF $(DEPDIR)/cl_I_ash_I.Tpo -c -o cl_I_ash_I.lo `test -f 'integer/bitwise/cl_I_ash_I.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_ash_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_ash_I.Tpo $(DEPDIR)/cl_I_ash_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_ash_I.cc' object='cl_I_ash_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_ash_I.lo `test -f 'integer/bitwise/cl_I_ash_I.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_ash_I.cc cl_I_ash_exception.lo: integer/bitwise/cl_I_ash_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_ash_exception.lo -MD -MP -MF $(DEPDIR)/cl_I_ash_exception.Tpo -c -o cl_I_ash_exception.lo `test -f 'integer/bitwise/cl_I_ash_exception.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_ash_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_ash_exception.Tpo $(DEPDIR)/cl_I_ash_exception.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_ash_exception.cc' object='cl_I_ash_exception.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_ash_exception.lo `test -f 'integer/bitwise/cl_I_ash_exception.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_ash_exception.cc cl_I_boole.lo: integer/bitwise/cl_I_boole.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_boole.lo -MD -MP -MF $(DEPDIR)/cl_I_boole.Tpo -c -o cl_I_boole.lo `test -f 'integer/bitwise/cl_I_boole.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_boole.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_boole.Tpo $(DEPDIR)/cl_I_boole.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_boole.cc' object='cl_I_boole.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_boole.lo `test -f 'integer/bitwise/cl_I_boole.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_boole.cc cl_I_dpb.lo: integer/bitwise/cl_I_dpb.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_dpb.lo -MD -MP -MF $(DEPDIR)/cl_I_dpb.Tpo -c -o cl_I_dpb.lo `test -f 'integer/bitwise/cl_I_dpb.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_dpb.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_dpb.Tpo $(DEPDIR)/cl_I_dpb.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_dpb.cc' object='cl_I_dpb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_dpb.lo `test -f 'integer/bitwise/cl_I_dpb.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_dpb.cc cl_I_dpf.lo: integer/bitwise/cl_I_dpf.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_dpf.lo -MD -MP -MF $(DEPDIR)/cl_I_dpf.Tpo -c -o cl_I_dpf.lo `test -f 'integer/bitwise/cl_I_dpf.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_dpf.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_dpf.Tpo $(DEPDIR)/cl_I_dpf.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_dpf.cc' object='cl_I_dpf.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_dpf.lo `test -f 'integer/bitwise/cl_I_dpf.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_dpf.cc cl_I_fullbyte.lo: integer/bitwise/cl_I_fullbyte.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_fullbyte.lo -MD -MP -MF $(DEPDIR)/cl_I_fullbyte.Tpo -c -o cl_I_fullbyte.lo `test -f 'integer/bitwise/cl_I_fullbyte.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_fullbyte.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_fullbyte.Tpo $(DEPDIR)/cl_I_fullbyte.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_fullbyte.cc' object='cl_I_fullbyte.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_fullbyte.lo `test -f 'integer/bitwise/cl_I_fullbyte.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_fullbyte.cc cl_I_ilength.lo: integer/bitwise/cl_I_ilength.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_ilength.lo -MD -MP -MF $(DEPDIR)/cl_I_ilength.Tpo -c -o cl_I_ilength.lo `test -f 'integer/bitwise/cl_I_ilength.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_ilength.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_ilength.Tpo $(DEPDIR)/cl_I_ilength.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_ilength.cc' object='cl_I_ilength.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_ilength.lo `test -f 'integer/bitwise/cl_I_ilength.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_ilength.cc cl_I_ldb.lo: integer/bitwise/cl_I_ldb.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_ldb.lo -MD -MP -MF $(DEPDIR)/cl_I_ldb.Tpo -c -o cl_I_ldb.lo `test -f 'integer/bitwise/cl_I_ldb.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_ldb.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_ldb.Tpo $(DEPDIR)/cl_I_ldb.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_ldb.cc' object='cl_I_ldb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_ldb.lo `test -f 'integer/bitwise/cl_I_ldb.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_ldb.cc cl_I_ldbtest.lo: integer/bitwise/cl_I_ldbtest.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_ldbtest.lo -MD -MP -MF $(DEPDIR)/cl_I_ldbtest.Tpo -c -o cl_I_ldbtest.lo `test -f 'integer/bitwise/cl_I_ldbtest.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_ldbtest.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_ldbtest.Tpo $(DEPDIR)/cl_I_ldbtest.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_ldbtest.cc' object='cl_I_ldbtest.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_ldbtest.lo `test -f 'integer/bitwise/cl_I_ldbtest.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_ldbtest.cc cl_I_ldbx.lo: integer/bitwise/cl_I_ldbx.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_ldbx.lo -MD -MP -MF $(DEPDIR)/cl_I_ldbx.Tpo -c -o cl_I_ldbx.lo `test -f 'integer/bitwise/cl_I_ldbx.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_ldbx.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_ldbx.Tpo $(DEPDIR)/cl_I_ldbx.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_ldbx.cc' object='cl_I_ldbx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_ldbx.lo `test -f 'integer/bitwise/cl_I_ldbx.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_ldbx.cc cl_I_ldbxtest.lo: integer/bitwise/cl_I_ldbxtest.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_ldbxtest.lo -MD -MP -MF $(DEPDIR)/cl_I_ldbxtest.Tpo -c -o cl_I_ldbxtest.lo `test -f 'integer/bitwise/cl_I_ldbxtest.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_ldbxtest.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_ldbxtest.Tpo $(DEPDIR)/cl_I_ldbxtest.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_ldbxtest.cc' object='cl_I_ldbxtest.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_ldbxtest.lo `test -f 'integer/bitwise/cl_I_ldbxtest.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_ldbxtest.cc cl_I_log_aux.lo: integer/bitwise/cl_I_log_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_log_aux.lo -MD -MP -MF $(DEPDIR)/cl_I_log_aux.Tpo -c -o cl_I_log_aux.lo `test -f 'integer/bitwise/cl_I_log_aux.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_log_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_log_aux.Tpo $(DEPDIR)/cl_I_log_aux.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_log_aux.cc' object='cl_I_log_aux.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_log_aux.lo `test -f 'integer/bitwise/cl_I_log_aux.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_log_aux.cc cl_I_logand.lo: integer/bitwise/cl_I_logand.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_logand.lo -MD -MP -MF $(DEPDIR)/cl_I_logand.Tpo -c -o cl_I_logand.lo `test -f 'integer/bitwise/cl_I_logand.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_logand.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_logand.Tpo $(DEPDIR)/cl_I_logand.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_logand.cc' object='cl_I_logand.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_logand.lo `test -f 'integer/bitwise/cl_I_logand.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_logand.cc cl_I_logandc2.lo: integer/bitwise/cl_I_logandc2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_logandc2.lo -MD -MP -MF $(DEPDIR)/cl_I_logandc2.Tpo -c -o cl_I_logandc2.lo `test -f 'integer/bitwise/cl_I_logandc2.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_logandc2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_logandc2.Tpo $(DEPDIR)/cl_I_logandc2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_logandc2.cc' object='cl_I_logandc2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_logandc2.lo `test -f 'integer/bitwise/cl_I_logandc2.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_logandc2.cc cl_I_logbitp.lo: integer/bitwise/cl_I_logbitp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_logbitp.lo -MD -MP -MF $(DEPDIR)/cl_I_logbitp.Tpo -c -o cl_I_logbitp.lo `test -f 'integer/bitwise/cl_I_logbitp.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_logbitp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_logbitp.Tpo $(DEPDIR)/cl_I_logbitp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_logbitp.cc' object='cl_I_logbitp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_logbitp.lo `test -f 'integer/bitwise/cl_I_logbitp.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_logbitp.cc cl_I_logbitp_I.lo: integer/bitwise/cl_I_logbitp_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_logbitp_I.lo -MD -MP -MF $(DEPDIR)/cl_I_logbitp_I.Tpo -c -o cl_I_logbitp_I.lo `test -f 'integer/bitwise/cl_I_logbitp_I.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_logbitp_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_logbitp_I.Tpo $(DEPDIR)/cl_I_logbitp_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_logbitp_I.cc' object='cl_I_logbitp_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_logbitp_I.lo `test -f 'integer/bitwise/cl_I_logbitp_I.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_logbitp_I.cc cl_I_logcount.lo: integer/bitwise/cl_I_logcount.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_logcount.lo -MD -MP -MF $(DEPDIR)/cl_I_logcount.Tpo -c -o cl_I_logcount.lo `test -f 'integer/bitwise/cl_I_logcount.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_logcount.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_logcount.Tpo $(DEPDIR)/cl_I_logcount.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_logcount.cc' object='cl_I_logcount.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_logcount.lo `test -f 'integer/bitwise/cl_I_logcount.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_logcount.cc cl_I_logeqv.lo: integer/bitwise/cl_I_logeqv.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_logeqv.lo -MD -MP -MF $(DEPDIR)/cl_I_logeqv.Tpo -c -o cl_I_logeqv.lo `test -f 'integer/bitwise/cl_I_logeqv.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_logeqv.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_logeqv.Tpo $(DEPDIR)/cl_I_logeqv.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_logeqv.cc' object='cl_I_logeqv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_logeqv.lo `test -f 'integer/bitwise/cl_I_logeqv.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_logeqv.cc cl_I_logior.lo: integer/bitwise/cl_I_logior.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_logior.lo -MD -MP -MF $(DEPDIR)/cl_I_logior.Tpo -c -o cl_I_logior.lo `test -f 'integer/bitwise/cl_I_logior.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_logior.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_logior.Tpo $(DEPDIR)/cl_I_logior.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_logior.cc' object='cl_I_logior.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_logior.lo `test -f 'integer/bitwise/cl_I_logior.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_logior.cc cl_I_lognand.lo: integer/bitwise/cl_I_lognand.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_lognand.lo -MD -MP -MF $(DEPDIR)/cl_I_lognand.Tpo -c -o cl_I_lognand.lo `test -f 'integer/bitwise/cl_I_lognand.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_lognand.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_lognand.Tpo $(DEPDIR)/cl_I_lognand.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_lognand.cc' object='cl_I_lognand.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_lognand.lo `test -f 'integer/bitwise/cl_I_lognand.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_lognand.cc cl_I_lognor.lo: integer/bitwise/cl_I_lognor.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_lognor.lo -MD -MP -MF $(DEPDIR)/cl_I_lognor.Tpo -c -o cl_I_lognor.lo `test -f 'integer/bitwise/cl_I_lognor.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_lognor.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_lognor.Tpo $(DEPDIR)/cl_I_lognor.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_lognor.cc' object='cl_I_lognor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_lognor.lo `test -f 'integer/bitwise/cl_I_lognor.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_lognor.cc cl_I_lognot.lo: integer/bitwise/cl_I_lognot.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_lognot.lo -MD -MP -MF $(DEPDIR)/cl_I_lognot.Tpo -c -o cl_I_lognot.lo `test -f 'integer/bitwise/cl_I_lognot.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_lognot.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_lognot.Tpo $(DEPDIR)/cl_I_lognot.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_lognot.cc' object='cl_I_lognot.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_lognot.lo `test -f 'integer/bitwise/cl_I_lognot.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_lognot.cc cl_I_logorc2.lo: integer/bitwise/cl_I_logorc2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_logorc2.lo -MD -MP -MF $(DEPDIR)/cl_I_logorc2.Tpo -c -o cl_I_logorc2.lo `test -f 'integer/bitwise/cl_I_logorc2.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_logorc2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_logorc2.Tpo $(DEPDIR)/cl_I_logorc2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_logorc2.cc' object='cl_I_logorc2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_logorc2.lo `test -f 'integer/bitwise/cl_I_logorc2.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_logorc2.cc cl_I_logtest.lo: integer/bitwise/cl_I_logtest.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_logtest.lo -MD -MP -MF $(DEPDIR)/cl_I_logtest.Tpo -c -o cl_I_logtest.lo `test -f 'integer/bitwise/cl_I_logtest.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_logtest.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_logtest.Tpo $(DEPDIR)/cl_I_logtest.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_logtest.cc' object='cl_I_logtest.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_logtest.lo `test -f 'integer/bitwise/cl_I_logtest.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_logtest.cc cl_I_logxor.lo: integer/bitwise/cl_I_logxor.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_logxor.lo -MD -MP -MF $(DEPDIR)/cl_I_logxor.Tpo -c -o cl_I_logxor.lo `test -f 'integer/bitwise/cl_I_logxor.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_logxor.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_logxor.Tpo $(DEPDIR)/cl_I_logxor.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_logxor.cc' object='cl_I_logxor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_logxor.lo `test -f 'integer/bitwise/cl_I_logxor.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_logxor.cc cl_I_mkf.lo: integer/bitwise/cl_I_mkf.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_mkf.lo -MD -MP -MF $(DEPDIR)/cl_I_mkf.Tpo -c -o cl_I_mkf.lo `test -f 'integer/bitwise/cl_I_mkf.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_mkf.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_mkf.Tpo $(DEPDIR)/cl_I_mkf.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_mkf.cc' object='cl_I_mkf.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_mkf.lo `test -f 'integer/bitwise/cl_I_mkf.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_mkf.cc cl_I_mkfx.lo: integer/bitwise/cl_I_mkfx.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_mkfx.lo -MD -MP -MF $(DEPDIR)/cl_I_mkfx.Tpo -c -o cl_I_mkfx.lo `test -f 'integer/bitwise/cl_I_mkfx.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_mkfx.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_mkfx.Tpo $(DEPDIR)/cl_I_mkfx.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/bitwise/cl_I_mkfx.cc' object='cl_I_mkfx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_mkfx.lo `test -f 'integer/bitwise/cl_I_mkfx.cc' || echo '$(srcdir)/'`integer/bitwise/cl_I_mkfx.cc cl_I_cached_power.lo: integer/conv/cl_I_cached_power.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_cached_power.lo -MD -MP -MF $(DEPDIR)/cl_I_cached_power.Tpo -c -o cl_I_cached_power.lo `test -f 'integer/conv/cl_I_cached_power.cc' || echo '$(srcdir)/'`integer/conv/cl_I_cached_power.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_cached_power.Tpo $(DEPDIR)/cl_I_cached_power.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/conv/cl_I_cached_power.cc' object='cl_I_cached_power.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_cached_power.lo `test -f 'integer/conv/cl_I_cached_power.cc' || echo '$(srcdir)/'`integer/conv/cl_I_cached_power.cc cl_I_digits_need.lo: integer/conv/cl_I_digits_need.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_digits_need.lo -MD -MP -MF $(DEPDIR)/cl_I_digits_need.Tpo -c -o cl_I_digits_need.lo `test -f 'integer/conv/cl_I_digits_need.cc' || echo '$(srcdir)/'`integer/conv/cl_I_digits_need.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_digits_need.Tpo $(DEPDIR)/cl_I_digits_need.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/conv/cl_I_digits_need.cc' object='cl_I_digits_need.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_digits_need.lo `test -f 'integer/conv/cl_I_digits_need.cc' || echo '$(srcdir)/'`integer/conv/cl_I_digits_need.cc cl_I_from_DS.lo: integer/conv/cl_I_from_DS.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_from_DS.lo -MD -MP -MF $(DEPDIR)/cl_I_from_DS.Tpo -c -o cl_I_from_DS.lo `test -f 'integer/conv/cl_I_from_DS.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_DS.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_from_DS.Tpo $(DEPDIR)/cl_I_from_DS.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/conv/cl_I_from_DS.cc' object='cl_I_from_DS.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_from_DS.lo `test -f 'integer/conv/cl_I_from_DS.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_DS.cc cl_I_from_L.lo: integer/conv/cl_I_from_L.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_from_L.lo -MD -MP -MF $(DEPDIR)/cl_I_from_L.Tpo -c -o cl_I_from_L.lo `test -f 'integer/conv/cl_I_from_L.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_L.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_from_L.Tpo $(DEPDIR)/cl_I_from_L.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/conv/cl_I_from_L.cc' object='cl_I_from_L.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_from_L.lo `test -f 'integer/conv/cl_I_from_L.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_L.cc cl_I_from_L2.lo: integer/conv/cl_I_from_L2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_from_L2.lo -MD -MP -MF $(DEPDIR)/cl_I_from_L2.Tpo -c -o cl_I_from_L2.lo `test -f 'integer/conv/cl_I_from_L2.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_L2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_from_L2.Tpo $(DEPDIR)/cl_I_from_L2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/conv/cl_I_from_L2.cc' object='cl_I_from_L2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_from_L2.lo `test -f 'integer/conv/cl_I_from_L2.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_L2.cc cl_I_from_NDS.lo: integer/conv/cl_I_from_NDS.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_from_NDS.lo -MD -MP -MF $(DEPDIR)/cl_I_from_NDS.Tpo -c -o cl_I_from_NDS.lo `test -f 'integer/conv/cl_I_from_NDS.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_NDS.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_from_NDS.Tpo $(DEPDIR)/cl_I_from_NDS.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/conv/cl_I_from_NDS.cc' object='cl_I_from_NDS.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_from_NDS.lo `test -f 'integer/conv/cl_I_from_NDS.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_NDS.cc cl_I_from_NUDS.lo: integer/conv/cl_I_from_NUDS.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_from_NUDS.lo -MD -MP -MF $(DEPDIR)/cl_I_from_NUDS.Tpo -c -o cl_I_from_NUDS.lo `test -f 'integer/conv/cl_I_from_NUDS.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_NUDS.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_from_NUDS.Tpo $(DEPDIR)/cl_I_from_NUDS.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/conv/cl_I_from_NUDS.cc' object='cl_I_from_NUDS.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_from_NUDS.lo `test -f 'integer/conv/cl_I_from_NUDS.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_NUDS.cc cl_I_from_Q.lo: integer/conv/cl_I_from_Q.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_from_Q.lo -MD -MP -MF $(DEPDIR)/cl_I_from_Q.Tpo -c -o cl_I_from_Q.lo `test -f 'integer/conv/cl_I_from_Q.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_Q.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_from_Q.Tpo $(DEPDIR)/cl_I_from_Q.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/conv/cl_I_from_Q.cc' object='cl_I_from_Q.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_from_Q.lo `test -f 'integer/conv/cl_I_from_Q.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_Q.cc cl_I_from_Q2.lo: integer/conv/cl_I_from_Q2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_from_Q2.lo -MD -MP -MF $(DEPDIR)/cl_I_from_Q2.Tpo -c -o cl_I_from_Q2.lo `test -f 'integer/conv/cl_I_from_Q2.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_Q2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_from_Q2.Tpo $(DEPDIR)/cl_I_from_Q2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/conv/cl_I_from_Q2.cc' object='cl_I_from_Q2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_from_Q2.lo `test -f 'integer/conv/cl_I_from_Q2.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_Q2.cc cl_I_from_UDS.lo: integer/conv/cl_I_from_UDS.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_from_UDS.lo -MD -MP -MF $(DEPDIR)/cl_I_from_UDS.Tpo -c -o cl_I_from_UDS.lo `test -f 'integer/conv/cl_I_from_UDS.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_UDS.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_from_UDS.Tpo $(DEPDIR)/cl_I_from_UDS.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/conv/cl_I_from_UDS.cc' object='cl_I_from_UDS.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_from_UDS.lo `test -f 'integer/conv/cl_I_from_UDS.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_UDS.cc cl_I_from_UL.lo: integer/conv/cl_I_from_UL.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_from_UL.lo -MD -MP -MF $(DEPDIR)/cl_I_from_UL.Tpo -c -o cl_I_from_UL.lo `test -f 'integer/conv/cl_I_from_UL.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_UL.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_from_UL.Tpo $(DEPDIR)/cl_I_from_UL.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/conv/cl_I_from_UL.cc' object='cl_I_from_UL.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_from_UL.lo `test -f 'integer/conv/cl_I_from_UL.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_UL.cc cl_I_from_UL2.lo: integer/conv/cl_I_from_UL2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_from_UL2.lo -MD -MP -MF $(DEPDIR)/cl_I_from_UL2.Tpo -c -o cl_I_from_UL2.lo `test -f 'integer/conv/cl_I_from_UL2.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_UL2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_from_UL2.Tpo $(DEPDIR)/cl_I_from_UL2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/conv/cl_I_from_UL2.cc' object='cl_I_from_UL2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_from_UL2.lo `test -f 'integer/conv/cl_I_from_UL2.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_UL2.cc cl_I_from_UQ.lo: integer/conv/cl_I_from_UQ.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_from_UQ.lo -MD -MP -MF $(DEPDIR)/cl_I_from_UQ.Tpo -c -o cl_I_from_UQ.lo `test -f 'integer/conv/cl_I_from_UQ.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_UQ.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_from_UQ.Tpo $(DEPDIR)/cl_I_from_UQ.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/conv/cl_I_from_UQ.cc' object='cl_I_from_UQ.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_from_UQ.lo `test -f 'integer/conv/cl_I_from_UQ.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_UQ.cc cl_I_from_digits.lo: integer/conv/cl_I_from_digits.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_from_digits.lo -MD -MP -MF $(DEPDIR)/cl_I_from_digits.Tpo -c -o cl_I_from_digits.lo `test -f 'integer/conv/cl_I_from_digits.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_digits.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_from_digits.Tpo $(DEPDIR)/cl_I_from_digits.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/conv/cl_I_from_digits.cc' object='cl_I_from_digits.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_from_digits.lo `test -f 'integer/conv/cl_I_from_digits.cc' || echo '$(srcdir)/'`integer/conv/cl_I_from_digits.cc cl_I_mul10plus.lo: integer/conv/cl_I_mul10plus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_mul10plus.lo -MD -MP -MF $(DEPDIR)/cl_I_mul10plus.Tpo -c -o cl_I_mul10plus.lo `test -f 'integer/conv/cl_I_mul10plus.cc' || echo '$(srcdir)/'`integer/conv/cl_I_mul10plus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_mul10plus.Tpo $(DEPDIR)/cl_I_mul10plus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/conv/cl_I_mul10plus.cc' object='cl_I_mul10plus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_mul10plus.lo `test -f 'integer/conv/cl_I_mul10plus.cc' || echo '$(srcdir)/'`integer/conv/cl_I_mul10plus.cc cl_I_to_L.lo: integer/conv/cl_I_to_L.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_to_L.lo -MD -MP -MF $(DEPDIR)/cl_I_to_L.Tpo -c -o cl_I_to_L.lo `test -f 'integer/conv/cl_I_to_L.cc' || echo '$(srcdir)/'`integer/conv/cl_I_to_L.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_to_L.Tpo $(DEPDIR)/cl_I_to_L.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/conv/cl_I_to_L.cc' object='cl_I_to_L.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_to_L.lo `test -f 'integer/conv/cl_I_to_L.cc' || echo '$(srcdir)/'`integer/conv/cl_I_to_L.cc cl_I_to_Q.lo: integer/conv/cl_I_to_Q.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_to_Q.lo -MD -MP -MF $(DEPDIR)/cl_I_to_Q.Tpo -c -o cl_I_to_Q.lo `test -f 'integer/conv/cl_I_to_Q.cc' || echo '$(srcdir)/'`integer/conv/cl_I_to_Q.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_to_Q.Tpo $(DEPDIR)/cl_I_to_Q.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/conv/cl_I_to_Q.cc' object='cl_I_to_Q.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_to_Q.lo `test -f 'integer/conv/cl_I_to_Q.cc' || echo '$(srcdir)/'`integer/conv/cl_I_to_Q.cc cl_I_to_UL.lo: integer/conv/cl_I_to_UL.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_to_UL.lo -MD -MP -MF $(DEPDIR)/cl_I_to_UL.Tpo -c -o cl_I_to_UL.lo `test -f 'integer/conv/cl_I_to_UL.cc' || echo '$(srcdir)/'`integer/conv/cl_I_to_UL.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_to_UL.Tpo $(DEPDIR)/cl_I_to_UL.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/conv/cl_I_to_UL.cc' object='cl_I_to_UL.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_to_UL.lo `test -f 'integer/conv/cl_I_to_UL.cc' || echo '$(srcdir)/'`integer/conv/cl_I_to_UL.cc cl_I_to_UQ.lo: integer/conv/cl_I_to_UQ.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_to_UQ.lo -MD -MP -MF $(DEPDIR)/cl_I_to_UQ.Tpo -c -o cl_I_to_UQ.lo `test -f 'integer/conv/cl_I_to_UQ.cc' || echo '$(srcdir)/'`integer/conv/cl_I_to_UQ.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_to_UQ.Tpo $(DEPDIR)/cl_I_to_UQ.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/conv/cl_I_to_UQ.cc' object='cl_I_to_UQ.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_to_UQ.lo `test -f 'integer/conv/cl_I_to_UQ.cc' || echo '$(srcdir)/'`integer/conv/cl_I_to_UQ.cc cl_I_to_digits.lo: integer/conv/cl_I_to_digits.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_to_digits.lo -MD -MP -MF $(DEPDIR)/cl_I_to_digits.Tpo -c -o cl_I_to_digits.lo `test -f 'integer/conv/cl_I_to_digits.cc' || echo '$(srcdir)/'`integer/conv/cl_I_to_digits.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_to_digits.Tpo $(DEPDIR)/cl_I_to_digits.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/conv/cl_I_to_digits.cc' object='cl_I_to_digits.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_to_digits.lo `test -f 'integer/conv/cl_I_to_digits.cc' || echo '$(srcdir)/'`integer/conv/cl_I_to_digits.cc cl_I_ceil1.lo: integer/division/cl_I_ceil1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_ceil1.lo -MD -MP -MF $(DEPDIR)/cl_I_ceil1.Tpo -c -o cl_I_ceil1.lo `test -f 'integer/division/cl_I_ceil1.cc' || echo '$(srcdir)/'`integer/division/cl_I_ceil1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_ceil1.Tpo $(DEPDIR)/cl_I_ceil1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/division/cl_I_ceil1.cc' object='cl_I_ceil1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_ceil1.lo `test -f 'integer/division/cl_I_ceil1.cc' || echo '$(srcdir)/'`integer/division/cl_I_ceil1.cc cl_I_ceil2.lo: integer/division/cl_I_ceil2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_ceil2.lo -MD -MP -MF $(DEPDIR)/cl_I_ceil2.Tpo -c -o cl_I_ceil2.lo `test -f 'integer/division/cl_I_ceil2.cc' || echo '$(srcdir)/'`integer/division/cl_I_ceil2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_ceil2.Tpo $(DEPDIR)/cl_I_ceil2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/division/cl_I_ceil2.cc' object='cl_I_ceil2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_ceil2.lo `test -f 'integer/division/cl_I_ceil2.cc' || echo '$(srcdir)/'`integer/division/cl_I_ceil2.cc cl_I_exquo.lo: integer/division/cl_I_exquo.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_exquo.lo -MD -MP -MF $(DEPDIR)/cl_I_exquo.Tpo -c -o cl_I_exquo.lo `test -f 'integer/division/cl_I_exquo.cc' || echo '$(srcdir)/'`integer/division/cl_I_exquo.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_exquo.Tpo $(DEPDIR)/cl_I_exquo.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/division/cl_I_exquo.cc' object='cl_I_exquo.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_exquo.lo `test -f 'integer/division/cl_I_exquo.cc' || echo '$(srcdir)/'`integer/division/cl_I_exquo.cc cl_I_exquo_exception.lo: integer/division/cl_I_exquo_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_exquo_exception.lo -MD -MP -MF $(DEPDIR)/cl_I_exquo_exception.Tpo -c -o cl_I_exquo_exception.lo `test -f 'integer/division/cl_I_exquo_exception.cc' || echo '$(srcdir)/'`integer/division/cl_I_exquo_exception.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_exquo_exception.Tpo $(DEPDIR)/cl_I_exquo_exception.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/division/cl_I_exquo_exception.cc' object='cl_I_exquo_exception.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_exquo_exception.lo `test -f 'integer/division/cl_I_exquo_exception.cc' || echo '$(srcdir)/'`integer/division/cl_I_exquo_exception.cc cl_I_exquopos.lo: integer/division/cl_I_exquopos.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_exquopos.lo -MD -MP -MF $(DEPDIR)/cl_I_exquopos.Tpo -c -o cl_I_exquopos.lo `test -f 'integer/division/cl_I_exquopos.cc' || echo '$(srcdir)/'`integer/division/cl_I_exquopos.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_exquopos.Tpo $(DEPDIR)/cl_I_exquopos.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/division/cl_I_exquopos.cc' object='cl_I_exquopos.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_exquopos.lo `test -f 'integer/division/cl_I_exquopos.cc' || echo '$(srcdir)/'`integer/division/cl_I_exquopos.cc cl_I_floor1.lo: integer/division/cl_I_floor1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_floor1.lo -MD -MP -MF $(DEPDIR)/cl_I_floor1.Tpo -c -o cl_I_floor1.lo `test -f 'integer/division/cl_I_floor1.cc' || echo '$(srcdir)/'`integer/division/cl_I_floor1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_floor1.Tpo $(DEPDIR)/cl_I_floor1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/division/cl_I_floor1.cc' object='cl_I_floor1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_floor1.lo `test -f 'integer/division/cl_I_floor1.cc' || echo '$(srcdir)/'`integer/division/cl_I_floor1.cc cl_I_floor2.lo: integer/division/cl_I_floor2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_floor2.lo -MD -MP -MF $(DEPDIR)/cl_I_floor2.Tpo -c -o cl_I_floor2.lo `test -f 'integer/division/cl_I_floor2.cc' || echo '$(srcdir)/'`integer/division/cl_I_floor2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_floor2.Tpo $(DEPDIR)/cl_I_floor2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/division/cl_I_floor2.cc' object='cl_I_floor2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_floor2.lo `test -f 'integer/division/cl_I_floor2.cc' || echo '$(srcdir)/'`integer/division/cl_I_floor2.cc cl_I_mod.lo: integer/division/cl_I_mod.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_mod.lo -MD -MP -MF $(DEPDIR)/cl_I_mod.Tpo -c -o cl_I_mod.lo `test -f 'integer/division/cl_I_mod.cc' || echo '$(srcdir)/'`integer/division/cl_I_mod.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_mod.Tpo $(DEPDIR)/cl_I_mod.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/division/cl_I_mod.cc' object='cl_I_mod.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_mod.lo `test -f 'integer/division/cl_I_mod.cc' || echo '$(srcdir)/'`integer/division/cl_I_mod.cc cl_I_rem.lo: integer/division/cl_I_rem.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_rem.lo -MD -MP -MF $(DEPDIR)/cl_I_rem.Tpo -c -o cl_I_rem.lo `test -f 'integer/division/cl_I_rem.cc' || echo '$(srcdir)/'`integer/division/cl_I_rem.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_rem.Tpo $(DEPDIR)/cl_I_rem.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/division/cl_I_rem.cc' object='cl_I_rem.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_rem.lo `test -f 'integer/division/cl_I_rem.cc' || echo '$(srcdir)/'`integer/division/cl_I_rem.cc cl_I_round1.lo: integer/division/cl_I_round1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_round1.lo -MD -MP -MF $(DEPDIR)/cl_I_round1.Tpo -c -o cl_I_round1.lo `test -f 'integer/division/cl_I_round1.cc' || echo '$(srcdir)/'`integer/division/cl_I_round1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_round1.Tpo $(DEPDIR)/cl_I_round1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/division/cl_I_round1.cc' object='cl_I_round1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_round1.lo `test -f 'integer/division/cl_I_round1.cc' || echo '$(srcdir)/'`integer/division/cl_I_round1.cc cl_I_round2.lo: integer/division/cl_I_round2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_round2.lo -MD -MP -MF $(DEPDIR)/cl_I_round2.Tpo -c -o cl_I_round2.lo `test -f 'integer/division/cl_I_round2.cc' || echo '$(srcdir)/'`integer/division/cl_I_round2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_round2.Tpo $(DEPDIR)/cl_I_round2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/division/cl_I_round2.cc' object='cl_I_round2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_round2.lo `test -f 'integer/division/cl_I_round2.cc' || echo '$(srcdir)/'`integer/division/cl_I_round2.cc cl_I_trunc1.lo: integer/division/cl_I_trunc1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_trunc1.lo -MD -MP -MF $(DEPDIR)/cl_I_trunc1.Tpo -c -o cl_I_trunc1.lo `test -f 'integer/division/cl_I_trunc1.cc' || echo '$(srcdir)/'`integer/division/cl_I_trunc1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_trunc1.Tpo $(DEPDIR)/cl_I_trunc1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/division/cl_I_trunc1.cc' object='cl_I_trunc1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_trunc1.lo `test -f 'integer/division/cl_I_trunc1.cc' || echo '$(srcdir)/'`integer/division/cl_I_trunc1.cc cl_I_trunc2.lo: integer/division/cl_I_trunc2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_trunc2.lo -MD -MP -MF $(DEPDIR)/cl_I_trunc2.Tpo -c -o cl_I_trunc2.lo `test -f 'integer/division/cl_I_trunc2.cc' || echo '$(srcdir)/'`integer/division/cl_I_trunc2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_trunc2.Tpo $(DEPDIR)/cl_I_trunc2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/division/cl_I_trunc2.cc' object='cl_I_trunc2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_trunc2.lo `test -f 'integer/division/cl_I_trunc2.cc' || echo '$(srcdir)/'`integer/division/cl_I_trunc2.cc cl_I_compare.lo: integer/elem/cl_I_compare.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_compare.lo -MD -MP -MF $(DEPDIR)/cl_I_compare.Tpo -c -o cl_I_compare.lo `test -f 'integer/elem/cl_I_compare.cc' || echo '$(srcdir)/'`integer/elem/cl_I_compare.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_compare.Tpo $(DEPDIR)/cl_I_compare.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/elem/cl_I_compare.cc' object='cl_I_compare.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_compare.lo `test -f 'integer/elem/cl_I_compare.cc' || echo '$(srcdir)/'`integer/elem/cl_I_compare.cc cl_I_div.lo: integer/elem/cl_I_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_div.lo -MD -MP -MF $(DEPDIR)/cl_I_div.Tpo -c -o cl_I_div.lo `test -f 'integer/elem/cl_I_div.cc' || echo '$(srcdir)/'`integer/elem/cl_I_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_div.Tpo $(DEPDIR)/cl_I_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/elem/cl_I_div.cc' object='cl_I_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_div.lo `test -f 'integer/elem/cl_I_div.cc' || echo '$(srcdir)/'`integer/elem/cl_I_div.cc cl_I_equal.lo: integer/elem/cl_I_equal.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_equal.lo -MD -MP -MF $(DEPDIR)/cl_I_equal.Tpo -c -o cl_I_equal.lo `test -f 'integer/elem/cl_I_equal.cc' || echo '$(srcdir)/'`integer/elem/cl_I_equal.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_equal.Tpo $(DEPDIR)/cl_I_equal.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/elem/cl_I_equal.cc' object='cl_I_equal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_equal.lo `test -f 'integer/elem/cl_I_equal.cc' || echo '$(srcdir)/'`integer/elem/cl_I_equal.cc cl_I_minus.lo: integer/elem/cl_I_minus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_minus.lo -MD -MP -MF $(DEPDIR)/cl_I_minus.Tpo -c -o cl_I_minus.lo `test -f 'integer/elem/cl_I_minus.cc' || echo '$(srcdir)/'`integer/elem/cl_I_minus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_minus.Tpo $(DEPDIR)/cl_I_minus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/elem/cl_I_minus.cc' object='cl_I_minus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_minus.lo `test -f 'integer/elem/cl_I_minus.cc' || echo '$(srcdir)/'`integer/elem/cl_I_minus.cc cl_I_minus1.lo: integer/elem/cl_I_minus1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_minus1.lo -MD -MP -MF $(DEPDIR)/cl_I_minus1.Tpo -c -o cl_I_minus1.lo `test -f 'integer/elem/cl_I_minus1.cc' || echo '$(srcdir)/'`integer/elem/cl_I_minus1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_minus1.Tpo $(DEPDIR)/cl_I_minus1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/elem/cl_I_minus1.cc' object='cl_I_minus1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_minus1.lo `test -f 'integer/elem/cl_I_minus1.cc' || echo '$(srcdir)/'`integer/elem/cl_I_minus1.cc cl_I_minusp.lo: integer/elem/cl_I_minusp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_minusp.lo -MD -MP -MF $(DEPDIR)/cl_I_minusp.Tpo -c -o cl_I_minusp.lo `test -f 'integer/elem/cl_I_minusp.cc' || echo '$(srcdir)/'`integer/elem/cl_I_minusp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_minusp.Tpo $(DEPDIR)/cl_I_minusp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/elem/cl_I_minusp.cc' object='cl_I_minusp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_minusp.lo `test -f 'integer/elem/cl_I_minusp.cc' || echo '$(srcdir)/'`integer/elem/cl_I_minusp.cc cl_I_mul.lo: integer/elem/cl_I_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_mul.lo -MD -MP -MF $(DEPDIR)/cl_I_mul.Tpo -c -o cl_I_mul.lo `test -f 'integer/elem/cl_I_mul.cc' || echo '$(srcdir)/'`integer/elem/cl_I_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_mul.Tpo $(DEPDIR)/cl_I_mul.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/elem/cl_I_mul.cc' object='cl_I_mul.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_mul.lo `test -f 'integer/elem/cl_I_mul.cc' || echo '$(srcdir)/'`integer/elem/cl_I_mul.cc cl_I_plus.lo: integer/elem/cl_I_plus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_plus.lo -MD -MP -MF $(DEPDIR)/cl_I_plus.Tpo -c -o cl_I_plus.lo `test -f 'integer/elem/cl_I_plus.cc' || echo '$(srcdir)/'`integer/elem/cl_I_plus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_plus.Tpo $(DEPDIR)/cl_I_plus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/elem/cl_I_plus.cc' object='cl_I_plus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_plus.lo `test -f 'integer/elem/cl_I_plus.cc' || echo '$(srcdir)/'`integer/elem/cl_I_plus.cc cl_I_plus1.lo: integer/elem/cl_I_plus1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_plus1.lo -MD -MP -MF $(DEPDIR)/cl_I_plus1.Tpo -c -o cl_I_plus1.lo `test -f 'integer/elem/cl_I_plus1.cc' || echo '$(srcdir)/'`integer/elem/cl_I_plus1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_plus1.Tpo $(DEPDIR)/cl_I_plus1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/elem/cl_I_plus1.cc' object='cl_I_plus1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_plus1.lo `test -f 'integer/elem/cl_I_plus1.cc' || echo '$(srcdir)/'`integer/elem/cl_I_plus1.cc cl_I_plusp.lo: integer/elem/cl_I_plusp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_plusp.lo -MD -MP -MF $(DEPDIR)/cl_I_plusp.Tpo -c -o cl_I_plusp.lo `test -f 'integer/elem/cl_I_plusp.cc' || echo '$(srcdir)/'`integer/elem/cl_I_plusp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_plusp.Tpo $(DEPDIR)/cl_I_plusp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/elem/cl_I_plusp.cc' object='cl_I_plusp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_plusp.lo `test -f 'integer/elem/cl_I_plusp.cc' || echo '$(srcdir)/'`integer/elem/cl_I_plusp.cc cl_I_square.lo: integer/elem/cl_I_square.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_square.lo -MD -MP -MF $(DEPDIR)/cl_I_square.Tpo -c -o cl_I_square.lo `test -f 'integer/elem/cl_I_square.cc' || echo '$(srcdir)/'`integer/elem/cl_I_square.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_square.Tpo $(DEPDIR)/cl_I_square.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/elem/cl_I_square.cc' object='cl_I_square.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_square.lo `test -f 'integer/elem/cl_I_square.cc' || echo '$(srcdir)/'`integer/elem/cl_I_square.cc cl_I_uminus.lo: integer/elem/cl_I_uminus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_uminus.lo -MD -MP -MF $(DEPDIR)/cl_I_uminus.Tpo -c -o cl_I_uminus.lo `test -f 'integer/elem/cl_I_uminus.cc' || echo '$(srcdir)/'`integer/elem/cl_I_uminus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_uminus.Tpo $(DEPDIR)/cl_I_uminus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/elem/cl_I_uminus.cc' object='cl_I_uminus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_uminus.lo `test -f 'integer/elem/cl_I_uminus.cc' || echo '$(srcdir)/'`integer/elem/cl_I_uminus.cc cl_I_zerop.lo: integer/elem/cl_I_zerop.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_zerop.lo -MD -MP -MF $(DEPDIR)/cl_I_zerop.Tpo -c -o cl_I_zerop.lo `test -f 'integer/elem/cl_I_zerop.cc' || echo '$(srcdir)/'`integer/elem/cl_I_zerop.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_zerop.Tpo $(DEPDIR)/cl_I_zerop.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/elem/cl_I_zerop.cc' object='cl_I_zerop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_zerop.lo `test -f 'integer/elem/cl_I_zerop.cc' || echo '$(srcdir)/'`integer/elem/cl_I_zerop.cc cl_I_gcd.lo: integer/gcd/cl_I_gcd.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_gcd.lo -MD -MP -MF $(DEPDIR)/cl_I_gcd.Tpo -c -o cl_I_gcd.lo `test -f 'integer/gcd/cl_I_gcd.cc' || echo '$(srcdir)/'`integer/gcd/cl_I_gcd.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_gcd.Tpo $(DEPDIR)/cl_I_gcd.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/gcd/cl_I_gcd.cc' object='cl_I_gcd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_gcd.lo `test -f 'integer/gcd/cl_I_gcd.cc' || echo '$(srcdir)/'`integer/gcd/cl_I_gcd.cc cl_I_gcd_aux.lo: integer/gcd/cl_I_gcd_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_gcd_aux.lo -MD -MP -MF $(DEPDIR)/cl_I_gcd_aux.Tpo -c -o cl_I_gcd_aux.lo `test -f 'integer/gcd/cl_I_gcd_aux.cc' || echo '$(srcdir)/'`integer/gcd/cl_I_gcd_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_gcd_aux.Tpo $(DEPDIR)/cl_I_gcd_aux.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/gcd/cl_I_gcd_aux.cc' object='cl_I_gcd_aux.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_gcd_aux.lo `test -f 'integer/gcd/cl_I_gcd_aux.cc' || echo '$(srcdir)/'`integer/gcd/cl_I_gcd_aux.cc cl_I_gcd_aux2.lo: integer/gcd/cl_I_gcd_aux2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_gcd_aux2.lo -MD -MP -MF $(DEPDIR)/cl_I_gcd_aux2.Tpo -c -o cl_I_gcd_aux2.lo `test -f 'integer/gcd/cl_I_gcd_aux2.cc' || echo '$(srcdir)/'`integer/gcd/cl_I_gcd_aux2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_gcd_aux2.Tpo $(DEPDIR)/cl_I_gcd_aux2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/gcd/cl_I_gcd_aux2.cc' object='cl_I_gcd_aux2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_gcd_aux2.lo `test -f 'integer/gcd/cl_I_gcd_aux2.cc' || echo '$(srcdir)/'`integer/gcd/cl_I_gcd_aux2.cc cl_I_lcm.lo: integer/gcd/cl_I_lcm.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_lcm.lo -MD -MP -MF $(DEPDIR)/cl_I_lcm.Tpo -c -o cl_I_lcm.lo `test -f 'integer/gcd/cl_I_lcm.cc' || echo '$(srcdir)/'`integer/gcd/cl_I_lcm.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_lcm.Tpo $(DEPDIR)/cl_I_lcm.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/gcd/cl_I_lcm.cc' object='cl_I_lcm.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_lcm.lo `test -f 'integer/gcd/cl_I_lcm.cc' || echo '$(srcdir)/'`integer/gcd/cl_I_lcm.cc cl_I_xgcd.lo: integer/gcd/cl_I_xgcd.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_xgcd.lo -MD -MP -MF $(DEPDIR)/cl_I_xgcd.Tpo -c -o cl_I_xgcd.lo `test -f 'integer/gcd/cl_I_xgcd.cc' || echo '$(srcdir)/'`integer/gcd/cl_I_xgcd.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_xgcd.Tpo $(DEPDIR)/cl_I_xgcd.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/gcd/cl_I_xgcd.cc' object='cl_I_xgcd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_xgcd.lo `test -f 'integer/gcd/cl_I_xgcd.cc' || echo '$(srcdir)/'`integer/gcd/cl_I_xgcd.cc cl_low_gcd.lo: integer/gcd/cl_low_gcd.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_low_gcd.lo -MD -MP -MF $(DEPDIR)/cl_low_gcd.Tpo -c -o cl_low_gcd.lo `test -f 'integer/gcd/cl_low_gcd.cc' || echo '$(srcdir)/'`integer/gcd/cl_low_gcd.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_low_gcd.Tpo $(DEPDIR)/cl_low_gcd.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/gcd/cl_low_gcd.cc' object='cl_low_gcd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_low_gcd.lo `test -f 'integer/gcd/cl_low_gcd.cc' || echo '$(srcdir)/'`integer/gcd/cl_low_gcd.cc cl_I_hash_gcobject.lo: integer/hash/cl_I_hash_gcobject.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_hash_gcobject.lo -MD -MP -MF $(DEPDIR)/cl_I_hash_gcobject.Tpo -c -o cl_I_hash_gcobject.lo `test -f 'integer/hash/cl_I_hash_gcobject.cc' || echo '$(srcdir)/'`integer/hash/cl_I_hash_gcobject.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_hash_gcobject.Tpo $(DEPDIR)/cl_I_hash_gcobject.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/hash/cl_I_hash_gcobject.cc' object='cl_I_hash_gcobject.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_hash_gcobject.lo `test -f 'integer/hash/cl_I_hash_gcobject.cc' || echo '$(srcdir)/'`integer/hash/cl_I_hash_gcobject.cc cl_I_hash_gcpointer.lo: integer/hash/cl_I_hash_gcpointer.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_hash_gcpointer.lo -MD -MP -MF $(DEPDIR)/cl_I_hash_gcpointer.Tpo -c -o cl_I_hash_gcpointer.lo `test -f 'integer/hash/cl_I_hash_gcpointer.cc' || echo '$(srcdir)/'`integer/hash/cl_I_hash_gcpointer.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_hash_gcpointer.Tpo $(DEPDIR)/cl_I_hash_gcpointer.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/hash/cl_I_hash_gcpointer.cc' object='cl_I_hash_gcpointer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_hash_gcpointer.lo `test -f 'integer/hash/cl_I_hash_gcpointer.cc' || echo '$(srcdir)/'`integer/hash/cl_I_hash_gcpointer.cc cl_I_hash_pointer.lo: integer/hash/cl_I_hash_pointer.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_hash_pointer.lo -MD -MP -MF $(DEPDIR)/cl_I_hash_pointer.Tpo -c -o cl_I_hash_pointer.lo `test -f 'integer/hash/cl_I_hash_pointer.cc' || echo '$(srcdir)/'`integer/hash/cl_I_hash_pointer.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_hash_pointer.Tpo $(DEPDIR)/cl_I_hash_pointer.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/hash/cl_I_hash_pointer.cc' object='cl_I_hash_pointer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_hash_pointer.lo `test -f 'integer/hash/cl_I_hash_pointer.cc' || echo '$(srcdir)/'`integer/hash/cl_I_hash_pointer.cc cl_I_hash_rcobject.lo: integer/hash/cl_I_hash_rcobject.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_hash_rcobject.lo -MD -MP -MF $(DEPDIR)/cl_I_hash_rcobject.Tpo -c -o cl_I_hash_rcobject.lo `test -f 'integer/hash/cl_I_hash_rcobject.cc' || echo '$(srcdir)/'`integer/hash/cl_I_hash_rcobject.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_hash_rcobject.Tpo $(DEPDIR)/cl_I_hash_rcobject.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/hash/cl_I_hash_rcobject.cc' object='cl_I_hash_rcobject.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_hash_rcobject.lo `test -f 'integer/hash/cl_I_hash_rcobject.cc' || echo '$(srcdir)/'`integer/hash/cl_I_hash_rcobject.cc cl_I_hash_rcpointer.lo: integer/hash/cl_I_hash_rcpointer.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_hash_rcpointer.lo -MD -MP -MF $(DEPDIR)/cl_I_hash_rcpointer.Tpo -c -o cl_I_hash_rcpointer.lo `test -f 'integer/hash/cl_I_hash_rcpointer.cc' || echo '$(srcdir)/'`integer/hash/cl_I_hash_rcpointer.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_hash_rcpointer.Tpo $(DEPDIR)/cl_I_hash_rcpointer.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/hash/cl_I_hash_rcpointer.cc' object='cl_I_hash_rcpointer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_hash_rcpointer.lo `test -f 'integer/hash/cl_I_hash_rcpointer.cc' || echo '$(srcdir)/'`integer/hash/cl_I_hash_rcpointer.cc cl_I_hashcode.lo: integer/hash/cl_I_hashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_hashcode.lo -MD -MP -MF $(DEPDIR)/cl_I_hashcode.Tpo -c -o cl_I_hashcode.lo `test -f 'integer/hash/cl_I_hashcode.cc' || echo '$(srcdir)/'`integer/hash/cl_I_hashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_hashcode.Tpo $(DEPDIR)/cl_I_hashcode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/hash/cl_I_hashcode.cc' object='cl_I_hashcode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_hashcode.lo `test -f 'integer/hash/cl_I_hashcode.cc' || echo '$(srcdir)/'`integer/hash/cl_I_hashcode.cc cl_I_hashweak_rcpointer.lo: integer/hash/cl_I_hashweak_rcpointer.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_hashweak_rcpointer.lo -MD -MP -MF $(DEPDIR)/cl_I_hashweak_rcpointer.Tpo -c -o cl_I_hashweak_rcpointer.lo `test -f 'integer/hash/cl_I_hashweak_rcpointer.cc' || echo '$(srcdir)/'`integer/hash/cl_I_hashweak_rcpointer.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_hashweak_rcpointer.Tpo $(DEPDIR)/cl_I_hashweak_rcpointer.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/hash/cl_I_hashweak_rcpointer.cc' object='cl_I_hashweak_rcpointer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_hashweak_rcpointer.lo `test -f 'integer/hash/cl_I_hashweak_rcpointer.cc' || echo '$(srcdir)/'`integer/hash/cl_I_hashweak_rcpointer.cc cl_I_from_string.lo: integer/input/cl_I_from_string.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_from_string.lo -MD -MP -MF $(DEPDIR)/cl_I_from_string.Tpo -c -o cl_I_from_string.lo `test -f 'integer/input/cl_I_from_string.cc' || echo '$(srcdir)/'`integer/input/cl_I_from_string.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_from_string.Tpo $(DEPDIR)/cl_I_from_string.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/input/cl_I_from_string.cc' object='cl_I_from_string.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_from_string.lo `test -f 'integer/input/cl_I_from_string.cc' || echo '$(srcdir)/'`integer/input/cl_I_from_string.cc cl_I_read.lo: integer/input/cl_I_read.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_read.lo -MD -MP -MF $(DEPDIR)/cl_I_read.Tpo -c -o cl_I_read.lo `test -f 'integer/input/cl_I_read.cc' || echo '$(srcdir)/'`integer/input/cl_I_read.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_read.Tpo $(DEPDIR)/cl_I_read.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/input/cl_I_read.cc' object='cl_I_read.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_read.lo `test -f 'integer/input/cl_I_read.cc' || echo '$(srcdir)/'`integer/input/cl_I_read.cc cl_I_read_stream.lo: integer/input/cl_I_read_stream.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_read_stream.lo -MD -MP -MF $(DEPDIR)/cl_I_read_stream.Tpo -c -o cl_I_read_stream.lo `test -f 'integer/input/cl_I_read_stream.cc' || echo '$(srcdir)/'`integer/input/cl_I_read_stream.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_read_stream.Tpo $(DEPDIR)/cl_I_read_stream.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/input/cl_I_read_stream.cc' object='cl_I_read_stream.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_read_stream.lo `test -f 'integer/input/cl_I_read_stream.cc' || echo '$(srcdir)/'`integer/input/cl_I_read_stream.cc cl_I_readparsed.lo: integer/input/cl_I_readparsed.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_readparsed.lo -MD -MP -MF $(DEPDIR)/cl_I_readparsed.Tpo -c -o cl_I_readparsed.lo `test -f 'integer/input/cl_I_readparsed.cc' || echo '$(srcdir)/'`integer/input/cl_I_readparsed.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_readparsed.Tpo $(DEPDIR)/cl_I_readparsed.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/input/cl_I_readparsed.cc' object='cl_I_readparsed.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_readparsed.lo `test -f 'integer/input/cl_I_readparsed.cc' || echo '$(srcdir)/'`integer/input/cl_I_readparsed.cc cl_BN_class.lo: integer/misc/cl_BN_class.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_BN_class.lo -MD -MP -MF $(DEPDIR)/cl_BN_class.Tpo -c -o cl_BN_class.lo `test -f 'integer/misc/cl_BN_class.cc' || echo '$(srcdir)/'`integer/misc/cl_BN_class.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_BN_class.Tpo $(DEPDIR)/cl_BN_class.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/misc/cl_BN_class.cc' object='cl_BN_class.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_BN_class.lo `test -f 'integer/misc/cl_BN_class.cc' || echo '$(srcdir)/'`integer/misc/cl_BN_class.cc cl_FN_class.lo: integer/misc/cl_FN_class.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_FN_class.lo -MD -MP -MF $(DEPDIR)/cl_FN_class.Tpo -c -o cl_FN_class.lo `test -f 'integer/misc/cl_FN_class.cc' || echo '$(srcdir)/'`integer/misc/cl_FN_class.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_FN_class.Tpo $(DEPDIR)/cl_FN_class.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/misc/cl_FN_class.cc' object='cl_FN_class.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_FN_class.lo `test -f 'integer/misc/cl_FN_class.cc' || echo '$(srcdir)/'`integer/misc/cl_FN_class.cc cl_I_abs.lo: integer/misc/cl_I_abs.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_abs.lo -MD -MP -MF $(DEPDIR)/cl_I_abs.Tpo -c -o cl_I_abs.lo `test -f 'integer/misc/cl_I_abs.cc' || echo '$(srcdir)/'`integer/misc/cl_I_abs.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_abs.Tpo $(DEPDIR)/cl_I_abs.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/misc/cl_I_abs.cc' object='cl_I_abs.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_abs.lo `test -f 'integer/misc/cl_I_abs.cc' || echo '$(srcdir)/'`integer/misc/cl_I_abs.cc cl_I_as.lo: integer/misc/cl_I_as.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_as.lo -MD -MP -MF $(DEPDIR)/cl_I_as.Tpo -c -o cl_I_as.lo `test -f 'integer/misc/cl_I_as.cc' || echo '$(srcdir)/'`integer/misc/cl_I_as.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_as.Tpo $(DEPDIR)/cl_I_as.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/misc/cl_I_as.cc' object='cl_I_as.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_as.lo `test -f 'integer/misc/cl_I_as.cc' || echo '$(srcdir)/'`integer/misc/cl_I_as.cc cl_I_debug.lo: integer/misc/cl_I_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_debug.lo -MD -MP -MF $(DEPDIR)/cl_I_debug.Tpo -c -o cl_I_debug.lo `test -f 'integer/misc/cl_I_debug.cc' || echo '$(srcdir)/'`integer/misc/cl_I_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_debug.Tpo $(DEPDIR)/cl_I_debug.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/misc/cl_I_debug.cc' object='cl_I_debug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_debug.lo `test -f 'integer/misc/cl_I_debug.cc' || echo '$(srcdir)/'`integer/misc/cl_I_debug.cc cl_I_eqhashcode.lo: integer/misc/cl_I_eqhashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_eqhashcode.lo -MD -MP -MF $(DEPDIR)/cl_I_eqhashcode.Tpo -c -o cl_I_eqhashcode.lo `test -f 'integer/misc/cl_I_eqhashcode.cc' || echo '$(srcdir)/'`integer/misc/cl_I_eqhashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_eqhashcode.Tpo $(DEPDIR)/cl_I_eqhashcode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/misc/cl_I_eqhashcode.cc' object='cl_I_eqhashcode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_eqhashcode.lo `test -f 'integer/misc/cl_I_eqhashcode.cc' || echo '$(srcdir)/'`integer/misc/cl_I_eqhashcode.cc cl_I_exptpos.lo: integer/misc/cl_I_exptpos.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_exptpos.lo -MD -MP -MF $(DEPDIR)/cl_I_exptpos.Tpo -c -o cl_I_exptpos.lo `test -f 'integer/misc/cl_I_exptpos.cc' || echo '$(srcdir)/'`integer/misc/cl_I_exptpos.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_exptpos.Tpo $(DEPDIR)/cl_I_exptpos.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/misc/cl_I_exptpos.cc' object='cl_I_exptpos.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_exptpos.lo `test -f 'integer/misc/cl_I_exptpos.cc' || echo '$(srcdir)/'`integer/misc/cl_I_exptpos.cc cl_I_exptpos_I.lo: integer/misc/cl_I_exptpos_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_exptpos_I.lo -MD -MP -MF $(DEPDIR)/cl_I_exptpos_I.Tpo -c -o cl_I_exptpos_I.lo `test -f 'integer/misc/cl_I_exptpos_I.cc' || echo '$(srcdir)/'`integer/misc/cl_I_exptpos_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_exptpos_I.Tpo $(DEPDIR)/cl_I_exptpos_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/misc/cl_I_exptpos_I.cc' object='cl_I_exptpos_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_exptpos_I.lo `test -f 'integer/misc/cl_I_exptpos_I.cc' || echo '$(srcdir)/'`integer/misc/cl_I_exptpos_I.cc cl_I_max.lo: integer/misc/cl_I_max.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_max.lo -MD -MP -MF $(DEPDIR)/cl_I_max.Tpo -c -o cl_I_max.lo `test -f 'integer/misc/cl_I_max.cc' || echo '$(srcdir)/'`integer/misc/cl_I_max.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_max.Tpo $(DEPDIR)/cl_I_max.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/misc/cl_I_max.cc' object='cl_I_max.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_max.lo `test -f 'integer/misc/cl_I_max.cc' || echo '$(srcdir)/'`integer/misc/cl_I_max.cc cl_I_min.lo: integer/misc/cl_I_min.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_min.lo -MD -MP -MF $(DEPDIR)/cl_I_min.Tpo -c -o cl_I_min.lo `test -f 'integer/misc/cl_I_min.cc' || echo '$(srcdir)/'`integer/misc/cl_I_min.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_min.Tpo $(DEPDIR)/cl_I_min.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/misc/cl_I_min.cc' object='cl_I_min.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_min.lo `test -f 'integer/misc/cl_I_min.cc' || echo '$(srcdir)/'`integer/misc/cl_I_min.cc cl_I_oddp.lo: integer/misc/cl_I_oddp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_oddp.lo -MD -MP -MF $(DEPDIR)/cl_I_oddp.Tpo -c -o cl_I_oddp.lo `test -f 'integer/misc/cl_I_oddp.cc' || echo '$(srcdir)/'`integer/misc/cl_I_oddp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_oddp.Tpo $(DEPDIR)/cl_I_oddp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/misc/cl_I_oddp.cc' object='cl_I_oddp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_oddp.lo `test -f 'integer/misc/cl_I_oddp.cc' || echo '$(srcdir)/'`integer/misc/cl_I_oddp.cc cl_I_ord2.lo: integer/misc/cl_I_ord2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_ord2.lo -MD -MP -MF $(DEPDIR)/cl_I_ord2.Tpo -c -o cl_I_ord2.lo `test -f 'integer/misc/cl_I_ord2.cc' || echo '$(srcdir)/'`integer/misc/cl_I_ord2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_ord2.Tpo $(DEPDIR)/cl_I_ord2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/misc/cl_I_ord2.cc' object='cl_I_ord2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_ord2.lo `test -f 'integer/misc/cl_I_ord2.cc' || echo '$(srcdir)/'`integer/misc/cl_I_ord2.cc cl_I_power2p.lo: integer/misc/cl_I_power2p.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_power2p.lo -MD -MP -MF $(DEPDIR)/cl_I_power2p.Tpo -c -o cl_I_power2p.lo `test -f 'integer/misc/cl_I_power2p.cc' || echo '$(srcdir)/'`integer/misc/cl_I_power2p.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_power2p.Tpo $(DEPDIR)/cl_I_power2p.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/misc/cl_I_power2p.cc' object='cl_I_power2p.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_power2p.lo `test -f 'integer/misc/cl_I_power2p.cc' || echo '$(srcdir)/'`integer/misc/cl_I_power2p.cc cl_I_signum.lo: integer/misc/cl_I_signum.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_signum.lo -MD -MP -MF $(DEPDIR)/cl_I_signum.Tpo -c -o cl_I_signum.lo `test -f 'integer/misc/cl_I_signum.cc' || echo '$(srcdir)/'`integer/misc/cl_I_signum.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_signum.Tpo $(DEPDIR)/cl_I_signum.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/misc/cl_I_signum.cc' object='cl_I_signum.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_signum.lo `test -f 'integer/misc/cl_I_signum.cc' || echo '$(srcdir)/'`integer/misc/cl_I_signum.cc cl_I_binomial.lo: integer/misc/combin/cl_I_binomial.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_binomial.lo -MD -MP -MF $(DEPDIR)/cl_I_binomial.Tpo -c -o cl_I_binomial.lo `test -f 'integer/misc/combin/cl_I_binomial.cc' || echo '$(srcdir)/'`integer/misc/combin/cl_I_binomial.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_binomial.Tpo $(DEPDIR)/cl_I_binomial.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/misc/combin/cl_I_binomial.cc' object='cl_I_binomial.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_binomial.lo `test -f 'integer/misc/combin/cl_I_binomial.cc' || echo '$(srcdir)/'`integer/misc/combin/cl_I_binomial.cc cl_I_doublefactorial.lo: integer/misc/combin/cl_I_doublefactorial.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_doublefactorial.lo -MD -MP -MF $(DEPDIR)/cl_I_doublefactorial.Tpo -c -o cl_I_doublefactorial.lo `test -f 'integer/misc/combin/cl_I_doublefactorial.cc' || echo '$(srcdir)/'`integer/misc/combin/cl_I_doublefactorial.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_doublefactorial.Tpo $(DEPDIR)/cl_I_doublefactorial.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/misc/combin/cl_I_doublefactorial.cc' object='cl_I_doublefactorial.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_doublefactorial.lo `test -f 'integer/misc/combin/cl_I_doublefactorial.cc' || echo '$(srcdir)/'`integer/misc/combin/cl_I_doublefactorial.cc cl_I_factorial.lo: integer/misc/combin/cl_I_factorial.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_factorial.lo -MD -MP -MF $(DEPDIR)/cl_I_factorial.Tpo -c -o cl_I_factorial.lo `test -f 'integer/misc/combin/cl_I_factorial.cc' || echo '$(srcdir)/'`integer/misc/combin/cl_I_factorial.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_factorial.Tpo $(DEPDIR)/cl_I_factorial.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/misc/combin/cl_I_factorial.cc' object='cl_I_factorial.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_factorial.lo `test -f 'integer/misc/combin/cl_I_factorial.cc' || echo '$(srcdir)/'`integer/misc/combin/cl_I_factorial.cc cl_I_factorial_aux.lo: integer/misc/combin/cl_I_factorial_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_factorial_aux.lo -MD -MP -MF $(DEPDIR)/cl_I_factorial_aux.Tpo -c -o cl_I_factorial_aux.lo `test -f 'integer/misc/combin/cl_I_factorial_aux.cc' || echo '$(srcdir)/'`integer/misc/combin/cl_I_factorial_aux.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_factorial_aux.Tpo $(DEPDIR)/cl_I_factorial_aux.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/misc/combin/cl_I_factorial_aux.cc' object='cl_I_factorial_aux.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_factorial_aux.lo `test -f 'integer/misc/combin/cl_I_factorial_aux.cc' || echo '$(srcdir)/'`integer/misc/combin/cl_I_factorial_aux.cc cl_I_aprint.lo: integer/output/cl_I_aprint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_aprint.lo -MD -MP -MF $(DEPDIR)/cl_I_aprint.Tpo -c -o cl_I_aprint.lo `test -f 'integer/output/cl_I_aprint.cc' || echo '$(srcdir)/'`integer/output/cl_I_aprint.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_aprint.Tpo $(DEPDIR)/cl_I_aprint.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/output/cl_I_aprint.cc' object='cl_I_aprint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_aprint.lo `test -f 'integer/output/cl_I_aprint.cc' || echo '$(srcdir)/'`integer/output/cl_I_aprint.cc cl_I_bprint.lo: integer/output/cl_I_bprint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_bprint.lo -MD -MP -MF $(DEPDIR)/cl_I_bprint.Tpo -c -o cl_I_bprint.lo `test -f 'integer/output/cl_I_bprint.cc' || echo '$(srcdir)/'`integer/output/cl_I_bprint.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_bprint.Tpo $(DEPDIR)/cl_I_bprint.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/output/cl_I_bprint.cc' object='cl_I_bprint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_bprint.lo `test -f 'integer/output/cl_I_bprint.cc' || echo '$(srcdir)/'`integer/output/cl_I_bprint.cc cl_I_cprint.lo: integer/output/cl_I_cprint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_cprint.lo -MD -MP -MF $(DEPDIR)/cl_I_cprint.Tpo -c -o cl_I_cprint.lo `test -f 'integer/output/cl_I_cprint.cc' || echo '$(srcdir)/'`integer/output/cl_I_cprint.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_cprint.Tpo $(DEPDIR)/cl_I_cprint.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/output/cl_I_cprint.cc' object='cl_I_cprint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_cprint.lo `test -f 'integer/output/cl_I_cprint.cc' || echo '$(srcdir)/'`integer/output/cl_I_cprint.cc cl_I_decstring.lo: integer/output/cl_I_decstring.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_decstring.lo -MD -MP -MF $(DEPDIR)/cl_I_decstring.Tpo -c -o cl_I_decstring.lo `test -f 'integer/output/cl_I_decstring.cc' || echo '$(srcdir)/'`integer/output/cl_I_decstring.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_decstring.Tpo $(DEPDIR)/cl_I_decstring.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/output/cl_I_decstring.cc' object='cl_I_decstring.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_decstring.lo `test -f 'integer/output/cl_I_decstring.cc' || echo '$(srcdir)/'`integer/output/cl_I_decstring.cc cl_I_dprint.lo: integer/output/cl_I_dprint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_dprint.lo -MD -MP -MF $(DEPDIR)/cl_I_dprint.Tpo -c -o cl_I_dprint.lo `test -f 'integer/output/cl_I_dprint.cc' || echo '$(srcdir)/'`integer/output/cl_I_dprint.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_dprint.Tpo $(DEPDIR)/cl_I_dprint.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/output/cl_I_dprint.cc' object='cl_I_dprint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_dprint.lo `test -f 'integer/output/cl_I_dprint.cc' || echo '$(srcdir)/'`integer/output/cl_I_dprint.cc cl_I_print.lo: integer/output/cl_I_print.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_print.lo -MD -MP -MF $(DEPDIR)/cl_I_print.Tpo -c -o cl_I_print.lo `test -f 'integer/output/cl_I_print.cc' || echo '$(srcdir)/'`integer/output/cl_I_print.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_print.Tpo $(DEPDIR)/cl_I_print.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/output/cl_I_print.cc' object='cl_I_print.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_print.lo `test -f 'integer/output/cl_I_print.cc' || echo '$(srcdir)/'`integer/output/cl_I_print.cc cl_I_print_string.lo: integer/output/cl_I_print_string.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_print_string.lo -MD -MP -MF $(DEPDIR)/cl_I_print_string.Tpo -c -o cl_I_print_string.lo `test -f 'integer/output/cl_I_print_string.cc' || echo '$(srcdir)/'`integer/output/cl_I_print_string.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_print_string.Tpo $(DEPDIR)/cl_I_print_string.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/output/cl_I_print_string.cc' object='cl_I_print_string.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_print_string.lo `test -f 'integer/output/cl_I_print_string.cc' || echo '$(srcdir)/'`integer/output/cl_I_print_string.cc cl_I_random.lo: integer/random/cl_I_random.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_random.lo -MD -MP -MF $(DEPDIR)/cl_I_random.Tpo -c -o cl_I_random.lo `test -f 'integer/random/cl_I_random.cc' || echo '$(srcdir)/'`integer/random/cl_I_random.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_random.Tpo $(DEPDIR)/cl_I_random.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/random/cl_I_random.cc' object='cl_I_random.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_random.lo `test -f 'integer/random/cl_I_random.cc' || echo '$(srcdir)/'`integer/random/cl_I_random.cc cl_I_trandom.lo: integer/random/cl_I_trandom.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_trandom.lo -MD -MP -MF $(DEPDIR)/cl_I_trandom.Tpo -c -o cl_I_trandom.lo `test -f 'integer/random/cl_I_trandom.cc' || echo '$(srcdir)/'`integer/random/cl_I_trandom.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_trandom.Tpo $(DEPDIR)/cl_I_trandom.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/random/cl_I_trandom.cc' object='cl_I_trandom.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_trandom.lo `test -f 'integer/random/cl_I_trandom.cc' || echo '$(srcdir)/'`integer/random/cl_I_trandom.cc cl_0_ring.lo: integer/ring/cl_0_ring.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_0_ring.lo -MD -MP -MF $(DEPDIR)/cl_0_ring.Tpo -c -o cl_0_ring.lo `test -f 'integer/ring/cl_0_ring.cc' || echo '$(srcdir)/'`integer/ring/cl_0_ring.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_0_ring.Tpo $(DEPDIR)/cl_0_ring.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/ring/cl_0_ring.cc' object='cl_0_ring.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_0_ring.lo `test -f 'integer/ring/cl_0_ring.cc' || echo '$(srcdir)/'`integer/ring/cl_0_ring.cc cl_I_ring.lo: integer/ring/cl_I_ring.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_ring.lo -MD -MP -MF $(DEPDIR)/cl_I_ring.Tpo -c -o cl_I_ring.lo `test -f 'integer/ring/cl_I_ring.cc' || echo '$(srcdir)/'`integer/ring/cl_I_ring.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_ring.Tpo $(DEPDIR)/cl_I_ring.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='integer/ring/cl_I_ring.cc' object='cl_I_ring.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_ring.lo `test -f 'integer/ring/cl_I_ring.cc' || echo '$(srcdir)/'`integer/ring/cl_I_ring.cc cl_MI.lo: modinteger/cl_MI.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_MI.lo -MD -MP -MF $(DEPDIR)/cl_MI.Tpo -c -o cl_MI.lo `test -f 'modinteger/cl_MI.cc' || echo '$(srcdir)/'`modinteger/cl_MI.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_MI.Tpo $(DEPDIR)/cl_MI.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='modinteger/cl_MI.cc' object='cl_MI.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_MI.lo `test -f 'modinteger/cl_MI.cc' || echo '$(srcdir)/'`modinteger/cl_MI.cc cl_MI_cond_composite.lo: modinteger/cl_MI_cond_composite.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_MI_cond_composite.lo -MD -MP -MF $(DEPDIR)/cl_MI_cond_composite.Tpo -c -o cl_MI_cond_composite.lo `test -f 'modinteger/cl_MI_cond_composite.cc' || echo '$(srcdir)/'`modinteger/cl_MI_cond_composite.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_MI_cond_composite.Tpo $(DEPDIR)/cl_MI_cond_composite.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='modinteger/cl_MI_cond_composite.cc' object='cl_MI_cond_composite.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_MI_cond_composite.lo `test -f 'modinteger/cl_MI_cond_composite.cc' || echo '$(srcdir)/'`modinteger/cl_MI_cond_composite.cc cl_MI_debug.lo: modinteger/cl_MI_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_MI_debug.lo -MD -MP -MF $(DEPDIR)/cl_MI_debug.Tpo -c -o cl_MI_debug.lo `test -f 'modinteger/cl_MI_debug.cc' || echo '$(srcdir)/'`modinteger/cl_MI_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_MI_debug.Tpo $(DEPDIR)/cl_MI_debug.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='modinteger/cl_MI_debug.cc' object='cl_MI_debug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_MI_debug.lo `test -f 'modinteger/cl_MI_debug.cc' || echo '$(srcdir)/'`modinteger/cl_MI_debug.cc cl_MI_err_comp.lo: modinteger/cl_MI_err_comp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_MI_err_comp.lo -MD -MP -MF $(DEPDIR)/cl_MI_err_comp.Tpo -c -o cl_MI_err_comp.lo `test -f 'modinteger/cl_MI_err_comp.cc' || echo '$(srcdir)/'`modinteger/cl_MI_err_comp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_MI_err_comp.Tpo $(DEPDIR)/cl_MI_err_comp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='modinteger/cl_MI_err_comp.cc' object='cl_MI_err_comp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_MI_err_comp.lo `test -f 'modinteger/cl_MI_err_comp.cc' || echo '$(srcdir)/'`modinteger/cl_MI_err_comp.cc cl_MI_lshift.lo: modinteger/cl_MI_lshift.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_MI_lshift.lo -MD -MP -MF $(DEPDIR)/cl_MI_lshift.Tpo -c -o cl_MI_lshift.lo `test -f 'modinteger/cl_MI_lshift.cc' || echo '$(srcdir)/'`modinteger/cl_MI_lshift.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_MI_lshift.Tpo $(DEPDIR)/cl_MI_lshift.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='modinteger/cl_MI_lshift.cc' object='cl_MI_lshift.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_MI_lshift.lo `test -f 'modinteger/cl_MI_lshift.cc' || echo '$(srcdir)/'`modinteger/cl_MI_lshift.cc cl_MI_rshift.lo: modinteger/cl_MI_rshift.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_MI_rshift.lo -MD -MP -MF $(DEPDIR)/cl_MI_rshift.Tpo -c -o cl_MI_rshift.lo `test -f 'modinteger/cl_MI_rshift.cc' || echo '$(srcdir)/'`modinteger/cl_MI_rshift.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_MI_rshift.Tpo $(DEPDIR)/cl_MI_rshift.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='modinteger/cl_MI_rshift.cc' object='cl_MI_rshift.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_MI_rshift.lo `test -f 'modinteger/cl_MI_rshift.cc' || echo '$(srcdir)/'`modinteger/cl_MI_rshift.cc cl_IF_millerrabin.lo: numtheory/cl_IF_millerrabin.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_IF_millerrabin.lo -MD -MP -MF $(DEPDIR)/cl_IF_millerrabin.Tpo -c -o cl_IF_millerrabin.lo `test -f 'numtheory/cl_IF_millerrabin.cc' || echo '$(srcdir)/'`numtheory/cl_IF_millerrabin.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_IF_millerrabin.Tpo $(DEPDIR)/cl_IF_millerrabin.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='numtheory/cl_IF_millerrabin.cc' object='cl_IF_millerrabin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_IF_millerrabin.lo `test -f 'numtheory/cl_IF_millerrabin.cc' || echo '$(srcdir)/'`numtheory/cl_IF_millerrabin.cc cl_IF_smallprimes.lo: numtheory/cl_IF_smallprimes.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_IF_smallprimes.lo -MD -MP -MF $(DEPDIR)/cl_IF_smallprimes.Tpo -c -o cl_IF_smallprimes.lo `test -f 'numtheory/cl_IF_smallprimes.cc' || echo '$(srcdir)/'`numtheory/cl_IF_smallprimes.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_IF_smallprimes.Tpo $(DEPDIR)/cl_IF_smallprimes.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='numtheory/cl_IF_smallprimes.cc' object='cl_IF_smallprimes.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_IF_smallprimes.lo `test -f 'numtheory/cl_IF_smallprimes.cc' || echo '$(srcdir)/'`numtheory/cl_IF_smallprimes.cc cl_IF_trialdiv.lo: numtheory/cl_IF_trialdiv.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_IF_trialdiv.lo -MD -MP -MF $(DEPDIR)/cl_IF_trialdiv.Tpo -c -o cl_IF_trialdiv.lo `test -f 'numtheory/cl_IF_trialdiv.cc' || echo '$(srcdir)/'`numtheory/cl_IF_trialdiv.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_IF_trialdiv.Tpo $(DEPDIR)/cl_IF_trialdiv.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='numtheory/cl_IF_trialdiv.cc' object='cl_IF_trialdiv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_IF_trialdiv.lo `test -f 'numtheory/cl_IF_trialdiv.cc' || echo '$(srcdir)/'`numtheory/cl_IF_trialdiv.cc cl_IF_trialdiv1.lo: numtheory/cl_IF_trialdiv1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_IF_trialdiv1.lo -MD -MP -MF $(DEPDIR)/cl_IF_trialdiv1.Tpo -c -o cl_IF_trialdiv1.lo `test -f 'numtheory/cl_IF_trialdiv1.cc' || echo '$(srcdir)/'`numtheory/cl_IF_trialdiv1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_IF_trialdiv1.Tpo $(DEPDIR)/cl_IF_trialdiv1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='numtheory/cl_IF_trialdiv1.cc' object='cl_IF_trialdiv1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_IF_trialdiv1.lo `test -f 'numtheory/cl_IF_trialdiv1.cc' || echo '$(srcdir)/'`numtheory/cl_IF_trialdiv1.cc cl_IF_trialdiv2.lo: numtheory/cl_IF_trialdiv2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_IF_trialdiv2.lo -MD -MP -MF $(DEPDIR)/cl_IF_trialdiv2.Tpo -c -o cl_IF_trialdiv2.lo `test -f 'numtheory/cl_IF_trialdiv2.cc' || echo '$(srcdir)/'`numtheory/cl_IF_trialdiv2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_IF_trialdiv2.Tpo $(DEPDIR)/cl_IF_trialdiv2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='numtheory/cl_IF_trialdiv2.cc' object='cl_IF_trialdiv2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_IF_trialdiv2.lo `test -f 'numtheory/cl_IF_trialdiv2.cc' || echo '$(srcdir)/'`numtheory/cl_IF_trialdiv2.cc cl_nt_cornacchia1.lo: numtheory/cl_nt_cornacchia1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_nt_cornacchia1.lo -MD -MP -MF $(DEPDIR)/cl_nt_cornacchia1.Tpo -c -o cl_nt_cornacchia1.lo `test -f 'numtheory/cl_nt_cornacchia1.cc' || echo '$(srcdir)/'`numtheory/cl_nt_cornacchia1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_nt_cornacchia1.Tpo $(DEPDIR)/cl_nt_cornacchia1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='numtheory/cl_nt_cornacchia1.cc' object='cl_nt_cornacchia1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_nt_cornacchia1.lo `test -f 'numtheory/cl_nt_cornacchia1.cc' || echo '$(srcdir)/'`numtheory/cl_nt_cornacchia1.cc cl_nt_cornacchia4.lo: numtheory/cl_nt_cornacchia4.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_nt_cornacchia4.lo -MD -MP -MF $(DEPDIR)/cl_nt_cornacchia4.Tpo -c -o cl_nt_cornacchia4.lo `test -f 'numtheory/cl_nt_cornacchia4.cc' || echo '$(srcdir)/'`numtheory/cl_nt_cornacchia4.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_nt_cornacchia4.Tpo $(DEPDIR)/cl_nt_cornacchia4.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='numtheory/cl_nt_cornacchia4.cc' object='cl_nt_cornacchia4.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_nt_cornacchia4.lo `test -f 'numtheory/cl_nt_cornacchia4.cc' || echo '$(srcdir)/'`numtheory/cl_nt_cornacchia4.cc cl_nt_isprobprime.lo: numtheory/cl_nt_isprobprime.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_nt_isprobprime.lo -MD -MP -MF $(DEPDIR)/cl_nt_isprobprime.Tpo -c -o cl_nt_isprobprime.lo `test -f 'numtheory/cl_nt_isprobprime.cc' || echo '$(srcdir)/'`numtheory/cl_nt_isprobprime.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_nt_isprobprime.Tpo $(DEPDIR)/cl_nt_isprobprime.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='numtheory/cl_nt_isprobprime.cc' object='cl_nt_isprobprime.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_nt_isprobprime.lo `test -f 'numtheory/cl_nt_isprobprime.cc' || echo '$(srcdir)/'`numtheory/cl_nt_isprobprime.cc cl_nt_jacobi.lo: numtheory/cl_nt_jacobi.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_nt_jacobi.lo -MD -MP -MF $(DEPDIR)/cl_nt_jacobi.Tpo -c -o cl_nt_jacobi.lo `test -f 'numtheory/cl_nt_jacobi.cc' || echo '$(srcdir)/'`numtheory/cl_nt_jacobi.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_nt_jacobi.Tpo $(DEPDIR)/cl_nt_jacobi.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='numtheory/cl_nt_jacobi.cc' object='cl_nt_jacobi.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_nt_jacobi.lo `test -f 'numtheory/cl_nt_jacobi.cc' || echo '$(srcdir)/'`numtheory/cl_nt_jacobi.cc cl_nt_jacobi_low.lo: numtheory/cl_nt_jacobi_low.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_nt_jacobi_low.lo -MD -MP -MF $(DEPDIR)/cl_nt_jacobi_low.Tpo -c -o cl_nt_jacobi_low.lo `test -f 'numtheory/cl_nt_jacobi_low.cc' || echo '$(srcdir)/'`numtheory/cl_nt_jacobi_low.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_nt_jacobi_low.Tpo $(DEPDIR)/cl_nt_jacobi_low.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='numtheory/cl_nt_jacobi_low.cc' object='cl_nt_jacobi_low.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_nt_jacobi_low.lo `test -f 'numtheory/cl_nt_jacobi_low.cc' || echo '$(srcdir)/'`numtheory/cl_nt_jacobi_low.cc cl_nt_nextprobprime.lo: numtheory/cl_nt_nextprobprime.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_nt_nextprobprime.lo -MD -MP -MF $(DEPDIR)/cl_nt_nextprobprime.Tpo -c -o cl_nt_nextprobprime.lo `test -f 'numtheory/cl_nt_nextprobprime.cc' || echo '$(srcdir)/'`numtheory/cl_nt_nextprobprime.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_nt_nextprobprime.Tpo $(DEPDIR)/cl_nt_nextprobprime.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='numtheory/cl_nt_nextprobprime.cc' object='cl_nt_nextprobprime.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_nt_nextprobprime.lo `test -f 'numtheory/cl_nt_nextprobprime.cc' || echo '$(srcdir)/'`numtheory/cl_nt_nextprobprime.cc cl_nt_sqrtmodp.lo: numtheory/cl_nt_sqrtmodp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_nt_sqrtmodp.lo -MD -MP -MF $(DEPDIR)/cl_nt_sqrtmodp.Tpo -c -o cl_nt_sqrtmodp.lo `test -f 'numtheory/cl_nt_sqrtmodp.cc' || echo '$(srcdir)/'`numtheory/cl_nt_sqrtmodp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_nt_sqrtmodp.Tpo $(DEPDIR)/cl_nt_sqrtmodp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='numtheory/cl_nt_sqrtmodp.cc' object='cl_nt_sqrtmodp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_nt_sqrtmodp.lo `test -f 'numtheory/cl_nt_sqrtmodp.cc' || echo '$(srcdir)/'`numtheory/cl_nt_sqrtmodp.cc cl_UP.lo: polynomial/elem/cl_UP.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_UP.lo -MD -MP -MF $(DEPDIR)/cl_UP.Tpo -c -o cl_UP.lo `test -f 'polynomial/elem/cl_UP.cc' || echo '$(srcdir)/'`polynomial/elem/cl_UP.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_UP.Tpo $(DEPDIR)/cl_UP.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='polynomial/elem/cl_UP.cc' object='cl_UP.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_UP.lo `test -f 'polynomial/elem/cl_UP.cc' || echo '$(srcdir)/'`polynomial/elem/cl_UP.cc cl_UP_named.lo: polynomial/elem/cl_UP_named.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_UP_named.lo -MD -MP -MF $(DEPDIR)/cl_UP_named.Tpo -c -o cl_UP_named.lo `test -f 'polynomial/elem/cl_UP_named.cc' || echo '$(srcdir)/'`polynomial/elem/cl_UP_named.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_UP_named.Tpo $(DEPDIR)/cl_UP_named.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='polynomial/elem/cl_UP_named.cc' object='cl_UP_named.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_UP_named.lo `test -f 'polynomial/elem/cl_UP_named.cc' || echo '$(srcdir)/'`polynomial/elem/cl_UP_named.cc cl_UP_no_ring.lo: polynomial/elem/cl_UP_no_ring.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_UP_no_ring.lo -MD -MP -MF $(DEPDIR)/cl_UP_no_ring.Tpo -c -o cl_UP_no_ring.lo `test -f 'polynomial/elem/cl_UP_no_ring.cc' || echo '$(srcdir)/'`polynomial/elem/cl_UP_no_ring.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_UP_no_ring.Tpo $(DEPDIR)/cl_UP_no_ring.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='polynomial/elem/cl_UP_no_ring.cc' object='cl_UP_no_ring.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_UP_no_ring.lo `test -f 'polynomial/elem/cl_UP_no_ring.cc' || echo '$(srcdir)/'`polynomial/elem/cl_UP_no_ring.cc cl_UP_unnamed.lo: polynomial/elem/cl_UP_unnamed.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_UP_unnamed.lo -MD -MP -MF $(DEPDIR)/cl_UP_unnamed.Tpo -c -o cl_UP_unnamed.lo `test -f 'polynomial/elem/cl_UP_unnamed.cc' || echo '$(srcdir)/'`polynomial/elem/cl_UP_unnamed.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_UP_unnamed.Tpo $(DEPDIR)/cl_UP_unnamed.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='polynomial/elem/cl_UP_unnamed.cc' object='cl_UP_unnamed.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_UP_unnamed.lo `test -f 'polynomial/elem/cl_UP_unnamed.cc' || echo '$(srcdir)/'`polynomial/elem/cl_UP_unnamed.cc cl_UP_I_hermite.lo: polynomial/misc/cl_UP_I_hermite.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_UP_I_hermite.lo -MD -MP -MF $(DEPDIR)/cl_UP_I_hermite.Tpo -c -o cl_UP_I_hermite.lo `test -f 'polynomial/misc/cl_UP_I_hermite.cc' || echo '$(srcdir)/'`polynomial/misc/cl_UP_I_hermite.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_UP_I_hermite.Tpo $(DEPDIR)/cl_UP_I_hermite.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='polynomial/misc/cl_UP_I_hermite.cc' object='cl_UP_I_hermite.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_UP_I_hermite.lo `test -f 'polynomial/misc/cl_UP_I_hermite.cc' || echo '$(srcdir)/'`polynomial/misc/cl_UP_I_hermite.cc cl_UP_I_laguerre.lo: polynomial/misc/cl_UP_I_laguerre.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_UP_I_laguerre.lo -MD -MP -MF $(DEPDIR)/cl_UP_I_laguerre.Tpo -c -o cl_UP_I_laguerre.lo `test -f 'polynomial/misc/cl_UP_I_laguerre.cc' || echo '$(srcdir)/'`polynomial/misc/cl_UP_I_laguerre.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_UP_I_laguerre.Tpo $(DEPDIR)/cl_UP_I_laguerre.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='polynomial/misc/cl_UP_I_laguerre.cc' object='cl_UP_I_laguerre.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_UP_I_laguerre.lo `test -f 'polynomial/misc/cl_UP_I_laguerre.cc' || echo '$(srcdir)/'`polynomial/misc/cl_UP_I_laguerre.cc cl_UP_I_tchebychev.lo: polynomial/misc/cl_UP_I_tchebychev.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_UP_I_tchebychev.lo -MD -MP -MF $(DEPDIR)/cl_UP_I_tchebychev.Tpo -c -o cl_UP_I_tchebychev.lo `test -f 'polynomial/misc/cl_UP_I_tchebychev.cc' || echo '$(srcdir)/'`polynomial/misc/cl_UP_I_tchebychev.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_UP_I_tchebychev.Tpo $(DEPDIR)/cl_UP_I_tchebychev.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='polynomial/misc/cl_UP_I_tchebychev.cc' object='cl_UP_I_tchebychev.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_UP_I_tchebychev.lo `test -f 'polynomial/misc/cl_UP_I_tchebychev.cc' || echo '$(srcdir)/'`polynomial/misc/cl_UP_I_tchebychev.cc cl_UP_RA_legendre.lo: polynomial/misc/cl_UP_RA_legendre.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_UP_RA_legendre.lo -MD -MP -MF $(DEPDIR)/cl_UP_RA_legendre.Tpo -c -o cl_UP_RA_legendre.lo `test -f 'polynomial/misc/cl_UP_RA_legendre.cc' || echo '$(srcdir)/'`polynomial/misc/cl_UP_RA_legendre.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_UP_RA_legendre.Tpo $(DEPDIR)/cl_UP_RA_legendre.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='polynomial/misc/cl_UP_RA_legendre.cc' object='cl_UP_RA_legendre.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_UP_RA_legendre.lo `test -f 'polynomial/misc/cl_UP_RA_legendre.cc' || echo '$(srcdir)/'`polynomial/misc/cl_UP_RA_legendre.cc cl_UP_debug.lo: polynomial/misc/cl_UP_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_UP_debug.lo -MD -MP -MF $(DEPDIR)/cl_UP_debug.Tpo -c -o cl_UP_debug.lo `test -f 'polynomial/misc/cl_UP_debug.cc' || echo '$(srcdir)/'`polynomial/misc/cl_UP_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_UP_debug.Tpo $(DEPDIR)/cl_UP_debug.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='polynomial/misc/cl_UP_debug.cc' object='cl_UP_debug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_UP_debug.lo `test -f 'polynomial/misc/cl_UP_debug.cc' || echo '$(srcdir)/'`polynomial/misc/cl_UP_debug.cc cl_UP_deriv.lo: polynomial/misc/cl_UP_deriv.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_UP_deriv.lo -MD -MP -MF $(DEPDIR)/cl_UP_deriv.Tpo -c -o cl_UP_deriv.lo `test -f 'polynomial/misc/cl_UP_deriv.cc' || echo '$(srcdir)/'`polynomial/misc/cl_UP_deriv.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_UP_deriv.Tpo $(DEPDIR)/cl_UP_deriv.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='polynomial/misc/cl_UP_deriv.cc' object='cl_UP_deriv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_UP_deriv.lo `test -f 'polynomial/misc/cl_UP_deriv.cc' || echo '$(srcdir)/'`polynomial/misc/cl_UP_deriv.cc cl_RA_rootp.lo: rational/algebraic/cl_RA_rootp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_rootp.lo -MD -MP -MF $(DEPDIR)/cl_RA_rootp.Tpo -c -o cl_RA_rootp.lo `test -f 'rational/algebraic/cl_RA_rootp.cc' || echo '$(srcdir)/'`rational/algebraic/cl_RA_rootp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_rootp.Tpo $(DEPDIR)/cl_RA_rootp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/algebraic/cl_RA_rootp.cc' object='cl_RA_rootp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_rootp.lo `test -f 'rational/algebraic/cl_RA_rootp.cc' || echo '$(srcdir)/'`rational/algebraic/cl_RA_rootp.cc cl_RA_rootp_I.lo: rational/algebraic/cl_RA_rootp_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_rootp_I.lo -MD -MP -MF $(DEPDIR)/cl_RA_rootp_I.Tpo -c -o cl_RA_rootp_I.lo `test -f 'rational/algebraic/cl_RA_rootp_I.cc' || echo '$(srcdir)/'`rational/algebraic/cl_RA_rootp_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_rootp_I.Tpo $(DEPDIR)/cl_RA_rootp_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/algebraic/cl_RA_rootp_I.cc' object='cl_RA_rootp_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_rootp_I.lo `test -f 'rational/algebraic/cl_RA_rootp_I.cc' || echo '$(srcdir)/'`rational/algebraic/cl_RA_rootp_I.cc cl_RA_sqrtp.lo: rational/algebraic/cl_RA_sqrtp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_sqrtp.lo -MD -MP -MF $(DEPDIR)/cl_RA_sqrtp.Tpo -c -o cl_RA_sqrtp.lo `test -f 'rational/algebraic/cl_RA_sqrtp.cc' || echo '$(srcdir)/'`rational/algebraic/cl_RA_sqrtp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_sqrtp.Tpo $(DEPDIR)/cl_RA_sqrtp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/algebraic/cl_RA_sqrtp.cc' object='cl_RA_sqrtp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_sqrtp.lo `test -f 'rational/algebraic/cl_RA_sqrtp.cc' || echo '$(srcdir)/'`rational/algebraic/cl_RA_sqrtp.cc cl_RA_ceil1.lo: rational/division/cl_RA_ceil1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_ceil1.lo -MD -MP -MF $(DEPDIR)/cl_RA_ceil1.Tpo -c -o cl_RA_ceil1.lo `test -f 'rational/division/cl_RA_ceil1.cc' || echo '$(srcdir)/'`rational/division/cl_RA_ceil1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_ceil1.Tpo $(DEPDIR)/cl_RA_ceil1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/division/cl_RA_ceil1.cc' object='cl_RA_ceil1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_ceil1.lo `test -f 'rational/division/cl_RA_ceil1.cc' || echo '$(srcdir)/'`rational/division/cl_RA_ceil1.cc cl_RA_ceil12.lo: rational/division/cl_RA_ceil12.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_ceil12.lo -MD -MP -MF $(DEPDIR)/cl_RA_ceil12.Tpo -c -o cl_RA_ceil12.lo `test -f 'rational/division/cl_RA_ceil12.cc' || echo '$(srcdir)/'`rational/division/cl_RA_ceil12.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_ceil12.Tpo $(DEPDIR)/cl_RA_ceil12.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/division/cl_RA_ceil12.cc' object='cl_RA_ceil12.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_ceil12.lo `test -f 'rational/division/cl_RA_ceil12.cc' || echo '$(srcdir)/'`rational/division/cl_RA_ceil12.cc cl_RA_ceil2.lo: rational/division/cl_RA_ceil2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_ceil2.lo -MD -MP -MF $(DEPDIR)/cl_RA_ceil2.Tpo -c -o cl_RA_ceil2.lo `test -f 'rational/division/cl_RA_ceil2.cc' || echo '$(srcdir)/'`rational/division/cl_RA_ceil2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_ceil2.Tpo $(DEPDIR)/cl_RA_ceil2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/division/cl_RA_ceil2.cc' object='cl_RA_ceil2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_ceil2.lo `test -f 'rational/division/cl_RA_ceil2.cc' || echo '$(srcdir)/'`rational/division/cl_RA_ceil2.cc cl_RA_ceil22.lo: rational/division/cl_RA_ceil22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_ceil22.lo -MD -MP -MF $(DEPDIR)/cl_RA_ceil22.Tpo -c -o cl_RA_ceil22.lo `test -f 'rational/division/cl_RA_ceil22.cc' || echo '$(srcdir)/'`rational/division/cl_RA_ceil22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_ceil22.Tpo $(DEPDIR)/cl_RA_ceil22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/division/cl_RA_ceil22.cc' object='cl_RA_ceil22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_ceil22.lo `test -f 'rational/division/cl_RA_ceil22.cc' || echo '$(srcdir)/'`rational/division/cl_RA_ceil22.cc cl_RA_floor1.lo: rational/division/cl_RA_floor1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_floor1.lo -MD -MP -MF $(DEPDIR)/cl_RA_floor1.Tpo -c -o cl_RA_floor1.lo `test -f 'rational/division/cl_RA_floor1.cc' || echo '$(srcdir)/'`rational/division/cl_RA_floor1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_floor1.Tpo $(DEPDIR)/cl_RA_floor1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/division/cl_RA_floor1.cc' object='cl_RA_floor1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_floor1.lo `test -f 'rational/division/cl_RA_floor1.cc' || echo '$(srcdir)/'`rational/division/cl_RA_floor1.cc cl_RA_floor12.lo: rational/division/cl_RA_floor12.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_floor12.lo -MD -MP -MF $(DEPDIR)/cl_RA_floor12.Tpo -c -o cl_RA_floor12.lo `test -f 'rational/division/cl_RA_floor12.cc' || echo '$(srcdir)/'`rational/division/cl_RA_floor12.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_floor12.Tpo $(DEPDIR)/cl_RA_floor12.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/division/cl_RA_floor12.cc' object='cl_RA_floor12.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_floor12.lo `test -f 'rational/division/cl_RA_floor12.cc' || echo '$(srcdir)/'`rational/division/cl_RA_floor12.cc cl_RA_floor2.lo: rational/division/cl_RA_floor2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_floor2.lo -MD -MP -MF $(DEPDIR)/cl_RA_floor2.Tpo -c -o cl_RA_floor2.lo `test -f 'rational/division/cl_RA_floor2.cc' || echo '$(srcdir)/'`rational/division/cl_RA_floor2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_floor2.Tpo $(DEPDIR)/cl_RA_floor2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/division/cl_RA_floor2.cc' object='cl_RA_floor2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_floor2.lo `test -f 'rational/division/cl_RA_floor2.cc' || echo '$(srcdir)/'`rational/division/cl_RA_floor2.cc cl_RA_floor22.lo: rational/division/cl_RA_floor22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_floor22.lo -MD -MP -MF $(DEPDIR)/cl_RA_floor22.Tpo -c -o cl_RA_floor22.lo `test -f 'rational/division/cl_RA_floor22.cc' || echo '$(srcdir)/'`rational/division/cl_RA_floor22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_floor22.Tpo $(DEPDIR)/cl_RA_floor22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/division/cl_RA_floor22.cc' object='cl_RA_floor22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_floor22.lo `test -f 'rational/division/cl_RA_floor22.cc' || echo '$(srcdir)/'`rational/division/cl_RA_floor22.cc cl_RA_round1.lo: rational/division/cl_RA_round1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_round1.lo -MD -MP -MF $(DEPDIR)/cl_RA_round1.Tpo -c -o cl_RA_round1.lo `test -f 'rational/division/cl_RA_round1.cc' || echo '$(srcdir)/'`rational/division/cl_RA_round1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_round1.Tpo $(DEPDIR)/cl_RA_round1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/division/cl_RA_round1.cc' object='cl_RA_round1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_round1.lo `test -f 'rational/division/cl_RA_round1.cc' || echo '$(srcdir)/'`rational/division/cl_RA_round1.cc cl_RA_round12.lo: rational/division/cl_RA_round12.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_round12.lo -MD -MP -MF $(DEPDIR)/cl_RA_round12.Tpo -c -o cl_RA_round12.lo `test -f 'rational/division/cl_RA_round12.cc' || echo '$(srcdir)/'`rational/division/cl_RA_round12.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_round12.Tpo $(DEPDIR)/cl_RA_round12.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/division/cl_RA_round12.cc' object='cl_RA_round12.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_round12.lo `test -f 'rational/division/cl_RA_round12.cc' || echo '$(srcdir)/'`rational/division/cl_RA_round12.cc cl_RA_round2.lo: rational/division/cl_RA_round2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_round2.lo -MD -MP -MF $(DEPDIR)/cl_RA_round2.Tpo -c -o cl_RA_round2.lo `test -f 'rational/division/cl_RA_round2.cc' || echo '$(srcdir)/'`rational/division/cl_RA_round2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_round2.Tpo $(DEPDIR)/cl_RA_round2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/division/cl_RA_round2.cc' object='cl_RA_round2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_round2.lo `test -f 'rational/division/cl_RA_round2.cc' || echo '$(srcdir)/'`rational/division/cl_RA_round2.cc cl_RA_round22.lo: rational/division/cl_RA_round22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_round22.lo -MD -MP -MF $(DEPDIR)/cl_RA_round22.Tpo -c -o cl_RA_round22.lo `test -f 'rational/division/cl_RA_round22.cc' || echo '$(srcdir)/'`rational/division/cl_RA_round22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_round22.Tpo $(DEPDIR)/cl_RA_round22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/division/cl_RA_round22.cc' object='cl_RA_round22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_round22.lo `test -f 'rational/division/cl_RA_round22.cc' || echo '$(srcdir)/'`rational/division/cl_RA_round22.cc cl_RA_trunc1.lo: rational/division/cl_RA_trunc1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_trunc1.lo -MD -MP -MF $(DEPDIR)/cl_RA_trunc1.Tpo -c -o cl_RA_trunc1.lo `test -f 'rational/division/cl_RA_trunc1.cc' || echo '$(srcdir)/'`rational/division/cl_RA_trunc1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_trunc1.Tpo $(DEPDIR)/cl_RA_trunc1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/division/cl_RA_trunc1.cc' object='cl_RA_trunc1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_trunc1.lo `test -f 'rational/division/cl_RA_trunc1.cc' || echo '$(srcdir)/'`rational/division/cl_RA_trunc1.cc cl_RA_trunc12.lo: rational/division/cl_RA_trunc12.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_trunc12.lo -MD -MP -MF $(DEPDIR)/cl_RA_trunc12.Tpo -c -o cl_RA_trunc12.lo `test -f 'rational/division/cl_RA_trunc12.cc' || echo '$(srcdir)/'`rational/division/cl_RA_trunc12.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_trunc12.Tpo $(DEPDIR)/cl_RA_trunc12.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/division/cl_RA_trunc12.cc' object='cl_RA_trunc12.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_trunc12.lo `test -f 'rational/division/cl_RA_trunc12.cc' || echo '$(srcdir)/'`rational/division/cl_RA_trunc12.cc cl_RA_trunc2.lo: rational/division/cl_RA_trunc2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_trunc2.lo -MD -MP -MF $(DEPDIR)/cl_RA_trunc2.Tpo -c -o cl_RA_trunc2.lo `test -f 'rational/division/cl_RA_trunc2.cc' || echo '$(srcdir)/'`rational/division/cl_RA_trunc2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_trunc2.Tpo $(DEPDIR)/cl_RA_trunc2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/division/cl_RA_trunc2.cc' object='cl_RA_trunc2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_trunc2.lo `test -f 'rational/division/cl_RA_trunc2.cc' || echo '$(srcdir)/'`rational/division/cl_RA_trunc2.cc cl_RA_trunc22.lo: rational/division/cl_RA_trunc22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_trunc22.lo -MD -MP -MF $(DEPDIR)/cl_RA_trunc22.Tpo -c -o cl_RA_trunc22.lo `test -f 'rational/division/cl_RA_trunc22.cc' || echo '$(srcdir)/'`rational/division/cl_RA_trunc22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_trunc22.Tpo $(DEPDIR)/cl_RA_trunc22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/division/cl_RA_trunc22.cc' object='cl_RA_trunc22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_trunc22.lo `test -f 'rational/division/cl_RA_trunc22.cc' || echo '$(srcdir)/'`rational/division/cl_RA_trunc22.cc cl_RA_compare.lo: rational/elem/cl_RA_compare.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_compare.lo -MD -MP -MF $(DEPDIR)/cl_RA_compare.Tpo -c -o cl_RA_compare.lo `test -f 'rational/elem/cl_RA_compare.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_compare.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_compare.Tpo $(DEPDIR)/cl_RA_compare.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/elem/cl_RA_compare.cc' object='cl_RA_compare.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_compare.lo `test -f 'rational/elem/cl_RA_compare.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_compare.cc cl_RA_denominator.lo: rational/elem/cl_RA_denominator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_denominator.lo -MD -MP -MF $(DEPDIR)/cl_RA_denominator.Tpo -c -o cl_RA_denominator.lo `test -f 'rational/elem/cl_RA_denominator.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_denominator.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_denominator.Tpo $(DEPDIR)/cl_RA_denominator.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/elem/cl_RA_denominator.cc' object='cl_RA_denominator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_denominator.lo `test -f 'rational/elem/cl_RA_denominator.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_denominator.cc cl_RA_div.lo: rational/elem/cl_RA_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_div.lo -MD -MP -MF $(DEPDIR)/cl_RA_div.Tpo -c -o cl_RA_div.lo `test -f 'rational/elem/cl_RA_div.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_div.Tpo $(DEPDIR)/cl_RA_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/elem/cl_RA_div.cc' object='cl_RA_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_div.lo `test -f 'rational/elem/cl_RA_div.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_div.cc cl_RA_equal.lo: rational/elem/cl_RA_equal.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_equal.lo -MD -MP -MF $(DEPDIR)/cl_RA_equal.Tpo -c -o cl_RA_equal.lo `test -f 'rational/elem/cl_RA_equal.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_equal.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_equal.Tpo $(DEPDIR)/cl_RA_equal.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/elem/cl_RA_equal.cc' object='cl_RA_equal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_equal.lo `test -f 'rational/elem/cl_RA_equal.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_equal.cc cl_RA_from_I_I_div.lo: rational/elem/cl_RA_from_I_I_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_from_I_I_div.lo -MD -MP -MF $(DEPDIR)/cl_RA_from_I_I_div.Tpo -c -o cl_RA_from_I_I_div.lo `test -f 'rational/elem/cl_RA_from_I_I_div.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_from_I_I_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_from_I_I_div.Tpo $(DEPDIR)/cl_RA_from_I_I_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/elem/cl_RA_from_I_I_div.cc' object='cl_RA_from_I_I_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_from_I_I_div.lo `test -f 'rational/elem/cl_RA_from_I_I_div.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_from_I_I_div.cc cl_RA_from_I_posI.lo: rational/elem/cl_RA_from_I_posI.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_from_I_posI.lo -MD -MP -MF $(DEPDIR)/cl_RA_from_I_posI.Tpo -c -o cl_RA_from_I_posI.lo `test -f 'rational/elem/cl_RA_from_I_posI.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_from_I_posI.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_from_I_posI.Tpo $(DEPDIR)/cl_RA_from_I_posI.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/elem/cl_RA_from_I_posI.cc' object='cl_RA_from_I_posI.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_from_I_posI.lo `test -f 'rational/elem/cl_RA_from_I_posI.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_from_I_posI.cc cl_RA_from_I_posI1.lo: rational/elem/cl_RA_from_I_posI1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_from_I_posI1.lo -MD -MP -MF $(DEPDIR)/cl_RA_from_I_posI1.Tpo -c -o cl_RA_from_I_posI1.lo `test -f 'rational/elem/cl_RA_from_I_posI1.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_from_I_posI1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_from_I_posI1.Tpo $(DEPDIR)/cl_RA_from_I_posI1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/elem/cl_RA_from_I_posI1.cc' object='cl_RA_from_I_posI1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_from_I_posI1.lo `test -f 'rational/elem/cl_RA_from_I_posI1.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_from_I_posI1.cc cl_RA_from_I_posI_div.lo: rational/elem/cl_RA_from_I_posI_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_from_I_posI_div.lo -MD -MP -MF $(DEPDIR)/cl_RA_from_I_posI_div.Tpo -c -o cl_RA_from_I_posI_div.lo `test -f 'rational/elem/cl_RA_from_I_posI_div.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_from_I_posI_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_from_I_posI_div.Tpo $(DEPDIR)/cl_RA_from_I_posI_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/elem/cl_RA_from_I_posI_div.cc' object='cl_RA_from_I_posI_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_from_I_posI_div.lo `test -f 'rational/elem/cl_RA_from_I_posI_div.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_from_I_posI_div.cc cl_RA_minus.lo: rational/elem/cl_RA_minus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_minus.lo -MD -MP -MF $(DEPDIR)/cl_RA_minus.Tpo -c -o cl_RA_minus.lo `test -f 'rational/elem/cl_RA_minus.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_minus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_minus.Tpo $(DEPDIR)/cl_RA_minus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/elem/cl_RA_minus.cc' object='cl_RA_minus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_minus.lo `test -f 'rational/elem/cl_RA_minus.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_minus.cc cl_RA_minus1.lo: rational/elem/cl_RA_minus1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_minus1.lo -MD -MP -MF $(DEPDIR)/cl_RA_minus1.Tpo -c -o cl_RA_minus1.lo `test -f 'rational/elem/cl_RA_minus1.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_minus1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_minus1.Tpo $(DEPDIR)/cl_RA_minus1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/elem/cl_RA_minus1.cc' object='cl_RA_minus1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_minus1.lo `test -f 'rational/elem/cl_RA_minus1.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_minus1.cc cl_RA_minusp.lo: rational/elem/cl_RA_minusp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_minusp.lo -MD -MP -MF $(DEPDIR)/cl_RA_minusp.Tpo -c -o cl_RA_minusp.lo `test -f 'rational/elem/cl_RA_minusp.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_minusp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_minusp.Tpo $(DEPDIR)/cl_RA_minusp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/elem/cl_RA_minusp.cc' object='cl_RA_minusp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_minusp.lo `test -f 'rational/elem/cl_RA_minusp.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_minusp.cc cl_RA_mul.lo: rational/elem/cl_RA_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_mul.lo -MD -MP -MF $(DEPDIR)/cl_RA_mul.Tpo -c -o cl_RA_mul.lo `test -f 'rational/elem/cl_RA_mul.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_mul.Tpo $(DEPDIR)/cl_RA_mul.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/elem/cl_RA_mul.cc' object='cl_RA_mul.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_mul.lo `test -f 'rational/elem/cl_RA_mul.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_mul.cc cl_RA_numerator.lo: rational/elem/cl_RA_numerator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_numerator.lo -MD -MP -MF $(DEPDIR)/cl_RA_numerator.Tpo -c -o cl_RA_numerator.lo `test -f 'rational/elem/cl_RA_numerator.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_numerator.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_numerator.Tpo $(DEPDIR)/cl_RA_numerator.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/elem/cl_RA_numerator.cc' object='cl_RA_numerator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_numerator.lo `test -f 'rational/elem/cl_RA_numerator.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_numerator.cc cl_RA_plus.lo: rational/elem/cl_RA_plus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_plus.lo -MD -MP -MF $(DEPDIR)/cl_RA_plus.Tpo -c -o cl_RA_plus.lo `test -f 'rational/elem/cl_RA_plus.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_plus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_plus.Tpo $(DEPDIR)/cl_RA_plus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/elem/cl_RA_plus.cc' object='cl_RA_plus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_plus.lo `test -f 'rational/elem/cl_RA_plus.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_plus.cc cl_RA_plus1.lo: rational/elem/cl_RA_plus1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_plus1.lo -MD -MP -MF $(DEPDIR)/cl_RA_plus1.Tpo -c -o cl_RA_plus1.lo `test -f 'rational/elem/cl_RA_plus1.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_plus1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_plus1.Tpo $(DEPDIR)/cl_RA_plus1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/elem/cl_RA_plus1.cc' object='cl_RA_plus1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_plus1.lo `test -f 'rational/elem/cl_RA_plus1.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_plus1.cc cl_RA_plusp.lo: rational/elem/cl_RA_plusp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_plusp.lo -MD -MP -MF $(DEPDIR)/cl_RA_plusp.Tpo -c -o cl_RA_plusp.lo `test -f 'rational/elem/cl_RA_plusp.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_plusp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_plusp.Tpo $(DEPDIR)/cl_RA_plusp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/elem/cl_RA_plusp.cc' object='cl_RA_plusp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_plusp.lo `test -f 'rational/elem/cl_RA_plusp.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_plusp.cc cl_RA_recip.lo: rational/elem/cl_RA_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_recip.lo -MD -MP -MF $(DEPDIR)/cl_RA_recip.Tpo -c -o cl_RA_recip.lo `test -f 'rational/elem/cl_RA_recip.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_recip.Tpo $(DEPDIR)/cl_RA_recip.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/elem/cl_RA_recip.cc' object='cl_RA_recip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_recip.lo `test -f 'rational/elem/cl_RA_recip.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_recip.cc cl_RA_square.lo: rational/elem/cl_RA_square.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_square.lo -MD -MP -MF $(DEPDIR)/cl_RA_square.Tpo -c -o cl_RA_square.lo `test -f 'rational/elem/cl_RA_square.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_square.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_square.Tpo $(DEPDIR)/cl_RA_square.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/elem/cl_RA_square.cc' object='cl_RA_square.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_square.lo `test -f 'rational/elem/cl_RA_square.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_square.cc cl_RA_uminus.lo: rational/elem/cl_RA_uminus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_uminus.lo -MD -MP -MF $(DEPDIR)/cl_RA_uminus.Tpo -c -o cl_RA_uminus.lo `test -f 'rational/elem/cl_RA_uminus.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_uminus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_uminus.Tpo $(DEPDIR)/cl_RA_uminus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/elem/cl_RA_uminus.cc' object='cl_RA_uminus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_uminus.lo `test -f 'rational/elem/cl_RA_uminus.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_uminus.cc cl_RA_zerop.lo: rational/elem/cl_RA_zerop.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_zerop.lo -MD -MP -MF $(DEPDIR)/cl_RA_zerop.Tpo -c -o cl_RA_zerop.lo `test -f 'rational/elem/cl_RA_zerop.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_zerop.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_zerop.Tpo $(DEPDIR)/cl_RA_zerop.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/elem/cl_RA_zerop.cc' object='cl_RA_zerop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_zerop.lo `test -f 'rational/elem/cl_RA_zerop.cc' || echo '$(srcdir)/'`rational/elem/cl_RA_zerop.cc cl_RA_from_string.lo: rational/input/cl_RA_from_string.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_from_string.lo -MD -MP -MF $(DEPDIR)/cl_RA_from_string.Tpo -c -o cl_RA_from_string.lo `test -f 'rational/input/cl_RA_from_string.cc' || echo '$(srcdir)/'`rational/input/cl_RA_from_string.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_from_string.Tpo $(DEPDIR)/cl_RA_from_string.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/input/cl_RA_from_string.cc' object='cl_RA_from_string.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_from_string.lo `test -f 'rational/input/cl_RA_from_string.cc' || echo '$(srcdir)/'`rational/input/cl_RA_from_string.cc cl_RA_read.lo: rational/input/cl_RA_read.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_read.lo -MD -MP -MF $(DEPDIR)/cl_RA_read.Tpo -c -o cl_RA_read.lo `test -f 'rational/input/cl_RA_read.cc' || echo '$(srcdir)/'`rational/input/cl_RA_read.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_read.Tpo $(DEPDIR)/cl_RA_read.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/input/cl_RA_read.cc' object='cl_RA_read.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_read.lo `test -f 'rational/input/cl_RA_read.cc' || echo '$(srcdir)/'`rational/input/cl_RA_read.cc cl_RA_read_stream.lo: rational/input/cl_RA_read_stream.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_read_stream.lo -MD -MP -MF $(DEPDIR)/cl_RA_read_stream.Tpo -c -o cl_RA_read_stream.lo `test -f 'rational/input/cl_RA_read_stream.cc' || echo '$(srcdir)/'`rational/input/cl_RA_read_stream.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_read_stream.Tpo $(DEPDIR)/cl_RA_read_stream.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/input/cl_RA_read_stream.cc' object='cl_RA_read_stream.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_read_stream.lo `test -f 'rational/input/cl_RA_read_stream.cc' || echo '$(srcdir)/'`rational/input/cl_RA_read_stream.cc cl_RA_readparsed.lo: rational/input/cl_RA_readparsed.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_readparsed.lo -MD -MP -MF $(DEPDIR)/cl_RA_readparsed.Tpo -c -o cl_RA_readparsed.lo `test -f 'rational/input/cl_RA_readparsed.cc' || echo '$(srcdir)/'`rational/input/cl_RA_readparsed.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_readparsed.Tpo $(DEPDIR)/cl_RA_readparsed.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/input/cl_RA_readparsed.cc' object='cl_RA_readparsed.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_readparsed.lo `test -f 'rational/input/cl_RA_readparsed.cc' || echo '$(srcdir)/'`rational/input/cl_RA_readparsed.cc cl_RA_abs.lo: rational/misc/cl_RA_abs.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_abs.lo -MD -MP -MF $(DEPDIR)/cl_RA_abs.Tpo -c -o cl_RA_abs.lo `test -f 'rational/misc/cl_RA_abs.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_abs.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_abs.Tpo $(DEPDIR)/cl_RA_abs.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/misc/cl_RA_abs.cc' object='cl_RA_abs.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_abs.lo `test -f 'rational/misc/cl_RA_abs.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_abs.cc cl_RA_as.lo: rational/misc/cl_RA_as.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_as.lo -MD -MP -MF $(DEPDIR)/cl_RA_as.Tpo -c -o cl_RA_as.lo `test -f 'rational/misc/cl_RA_as.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_as.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_as.Tpo $(DEPDIR)/cl_RA_as.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/misc/cl_RA_as.cc' object='cl_RA_as.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_as.lo `test -f 'rational/misc/cl_RA_as.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_as.cc cl_RA_class.lo: rational/misc/cl_RA_class.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_class.lo -MD -MP -MF $(DEPDIR)/cl_RA_class.Tpo -c -o cl_RA_class.lo `test -f 'rational/misc/cl_RA_class.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_class.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_class.Tpo $(DEPDIR)/cl_RA_class.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/misc/cl_RA_class.cc' object='cl_RA_class.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_class.lo `test -f 'rational/misc/cl_RA_class.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_class.cc cl_RA_debug.lo: rational/misc/cl_RA_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_debug.lo -MD -MP -MF $(DEPDIR)/cl_RA_debug.Tpo -c -o cl_RA_debug.lo `test -f 'rational/misc/cl_RA_debug.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_debug.Tpo $(DEPDIR)/cl_RA_debug.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/misc/cl_RA_debug.cc' object='cl_RA_debug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_debug.lo `test -f 'rational/misc/cl_RA_debug.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_debug.cc cl_RA_eqhashcode.lo: rational/misc/cl_RA_eqhashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_eqhashcode.lo -MD -MP -MF $(DEPDIR)/cl_RA_eqhashcode.Tpo -c -o cl_RA_eqhashcode.lo `test -f 'rational/misc/cl_RA_eqhashcode.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_eqhashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_eqhashcode.Tpo $(DEPDIR)/cl_RA_eqhashcode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/misc/cl_RA_eqhashcode.cc' object='cl_RA_eqhashcode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_eqhashcode.lo `test -f 'rational/misc/cl_RA_eqhashcode.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_eqhashcode.cc cl_RA_expt.lo: rational/misc/cl_RA_expt.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_expt.lo -MD -MP -MF $(DEPDIR)/cl_RA_expt.Tpo -c -o cl_RA_expt.lo `test -f 'rational/misc/cl_RA_expt.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_expt.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_expt.Tpo $(DEPDIR)/cl_RA_expt.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/misc/cl_RA_expt.cc' object='cl_RA_expt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_expt.lo `test -f 'rational/misc/cl_RA_expt.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_expt.cc cl_RA_expt_I.lo: rational/misc/cl_RA_expt_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_expt_I.lo -MD -MP -MF $(DEPDIR)/cl_RA_expt_I.Tpo -c -o cl_RA_expt_I.lo `test -f 'rational/misc/cl_RA_expt_I.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_expt_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_expt_I.Tpo $(DEPDIR)/cl_RA_expt_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/misc/cl_RA_expt_I.cc' object='cl_RA_expt_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_expt_I.lo `test -f 'rational/misc/cl_RA_expt_I.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_expt_I.cc cl_RA_exptpos.lo: rational/misc/cl_RA_exptpos.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_exptpos.lo -MD -MP -MF $(DEPDIR)/cl_RA_exptpos.Tpo -c -o cl_RA_exptpos.lo `test -f 'rational/misc/cl_RA_exptpos.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_exptpos.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_exptpos.Tpo $(DEPDIR)/cl_RA_exptpos.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/misc/cl_RA_exptpos.cc' object='cl_RA_exptpos.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_exptpos.lo `test -f 'rational/misc/cl_RA_exptpos.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_exptpos.cc cl_RA_exptpos_I.lo: rational/misc/cl_RA_exptpos_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_exptpos_I.lo -MD -MP -MF $(DEPDIR)/cl_RA_exptpos_I.Tpo -c -o cl_RA_exptpos_I.lo `test -f 'rational/misc/cl_RA_exptpos_I.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_exptpos_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_exptpos_I.Tpo $(DEPDIR)/cl_RA_exptpos_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/misc/cl_RA_exptpos_I.cc' object='cl_RA_exptpos_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_exptpos_I.lo `test -f 'rational/misc/cl_RA_exptpos_I.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_exptpos_I.cc cl_RA_max.lo: rational/misc/cl_RA_max.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_max.lo -MD -MP -MF $(DEPDIR)/cl_RA_max.Tpo -c -o cl_RA_max.lo `test -f 'rational/misc/cl_RA_max.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_max.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_max.Tpo $(DEPDIR)/cl_RA_max.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/misc/cl_RA_max.cc' object='cl_RA_max.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_max.lo `test -f 'rational/misc/cl_RA_max.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_max.cc cl_RA_min.lo: rational/misc/cl_RA_min.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_min.lo -MD -MP -MF $(DEPDIR)/cl_RA_min.Tpo -c -o cl_RA_min.lo `test -f 'rational/misc/cl_RA_min.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_min.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_min.Tpo $(DEPDIR)/cl_RA_min.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/misc/cl_RA_min.cc' object='cl_RA_min.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_min.lo `test -f 'rational/misc/cl_RA_min.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_min.cc cl_RA_signum.lo: rational/misc/cl_RA_signum.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_signum.lo -MD -MP -MF $(DEPDIR)/cl_RA_signum.Tpo -c -o cl_RA_signum.lo `test -f 'rational/misc/cl_RA_signum.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_signum.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_signum.Tpo $(DEPDIR)/cl_RA_signum.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/misc/cl_RA_signum.cc' object='cl_RA_signum.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_signum.lo `test -f 'rational/misc/cl_RA_signum.cc' || echo '$(srcdir)/'`rational/misc/cl_RA_signum.cc cl_RA_aprint.lo: rational/output/cl_RA_aprint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_aprint.lo -MD -MP -MF $(DEPDIR)/cl_RA_aprint.Tpo -c -o cl_RA_aprint.lo `test -f 'rational/output/cl_RA_aprint.cc' || echo '$(srcdir)/'`rational/output/cl_RA_aprint.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_aprint.Tpo $(DEPDIR)/cl_RA_aprint.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/output/cl_RA_aprint.cc' object='cl_RA_aprint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_aprint.lo `test -f 'rational/output/cl_RA_aprint.cc' || echo '$(srcdir)/'`rational/output/cl_RA_aprint.cc cl_RA_bprint.lo: rational/output/cl_RA_bprint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_bprint.lo -MD -MP -MF $(DEPDIR)/cl_RA_bprint.Tpo -c -o cl_RA_bprint.lo `test -f 'rational/output/cl_RA_bprint.cc' || echo '$(srcdir)/'`rational/output/cl_RA_bprint.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_bprint.Tpo $(DEPDIR)/cl_RA_bprint.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/output/cl_RA_bprint.cc' object='cl_RA_bprint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_bprint.lo `test -f 'rational/output/cl_RA_bprint.cc' || echo '$(srcdir)/'`rational/output/cl_RA_bprint.cc cl_RA_cprint.lo: rational/output/cl_RA_cprint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_cprint.lo -MD -MP -MF $(DEPDIR)/cl_RA_cprint.Tpo -c -o cl_RA_cprint.lo `test -f 'rational/output/cl_RA_cprint.cc' || echo '$(srcdir)/'`rational/output/cl_RA_cprint.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_cprint.Tpo $(DEPDIR)/cl_RA_cprint.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/output/cl_RA_cprint.cc' object='cl_RA_cprint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_cprint.lo `test -f 'rational/output/cl_RA_cprint.cc' || echo '$(srcdir)/'`rational/output/cl_RA_cprint.cc cl_RA_dprint.lo: rational/output/cl_RA_dprint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_dprint.lo -MD -MP -MF $(DEPDIR)/cl_RA_dprint.Tpo -c -o cl_RA_dprint.lo `test -f 'rational/output/cl_RA_dprint.cc' || echo '$(srcdir)/'`rational/output/cl_RA_dprint.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_dprint.Tpo $(DEPDIR)/cl_RA_dprint.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/output/cl_RA_dprint.cc' object='cl_RA_dprint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_dprint.lo `test -f 'rational/output/cl_RA_dprint.cc' || echo '$(srcdir)/'`rational/output/cl_RA_dprint.cc cl_RA_print.lo: rational/output/cl_RA_print.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_print.lo -MD -MP -MF $(DEPDIR)/cl_RA_print.Tpo -c -o cl_RA_print.lo `test -f 'rational/output/cl_RA_print.cc' || echo '$(srcdir)/'`rational/output/cl_RA_print.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_print.Tpo $(DEPDIR)/cl_RA_print.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/output/cl_RA_print.cc' object='cl_RA_print.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_print.lo `test -f 'rational/output/cl_RA_print.cc' || echo '$(srcdir)/'`rational/output/cl_RA_print.cc cl_RA_ring.lo: rational/ring/cl_RA_ring.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_ring.lo -MD -MP -MF $(DEPDIR)/cl_RA_ring.Tpo -c -o cl_RA_ring.lo `test -f 'rational/ring/cl_RA_ring.cc' || echo '$(srcdir)/'`rational/ring/cl_RA_ring.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_ring.Tpo $(DEPDIR)/cl_RA_ring.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/ring/cl_RA_ring.cc' object='cl_RA_ring.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_ring.lo `test -f 'rational/ring/cl_RA_ring.cc' || echo '$(srcdir)/'`rational/ring/cl_RA_ring.cc cl_I_logp.lo: rational/transcendental/cl_I_logp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_I_logp.lo -MD -MP -MF $(DEPDIR)/cl_I_logp.Tpo -c -o cl_I_logp.lo `test -f 'rational/transcendental/cl_I_logp.cc' || echo '$(srcdir)/'`rational/transcendental/cl_I_logp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_I_logp.Tpo $(DEPDIR)/cl_I_logp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/transcendental/cl_I_logp.cc' object='cl_I_logp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_I_logp.lo `test -f 'rational/transcendental/cl_I_logp.cc' || echo '$(srcdir)/'`rational/transcendental/cl_I_logp.cc cl_RA_logp.lo: rational/transcendental/cl_RA_logp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_logp.lo -MD -MP -MF $(DEPDIR)/cl_RA_logp.Tpo -c -o cl_RA_logp.lo `test -f 'rational/transcendental/cl_RA_logp.cc' || echo '$(srcdir)/'`rational/transcendental/cl_RA_logp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_logp.Tpo $(DEPDIR)/cl_RA_logp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rational/transcendental/cl_RA_logp.cc' object='cl_RA_logp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_logp.lo `test -f 'rational/transcendental/cl_RA_logp.cc' || echo '$(srcdir)/'`rational/transcendental/cl_RA_logp.cc cl_RA_sqrt.lo: real/algebraic/cl_RA_sqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_RA_sqrt.lo -MD -MP -MF $(DEPDIR)/cl_RA_sqrt.Tpo -c -o cl_RA_sqrt.lo `test -f 'real/algebraic/cl_RA_sqrt.cc' || echo '$(srcdir)/'`real/algebraic/cl_RA_sqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_RA_sqrt.Tpo $(DEPDIR)/cl_RA_sqrt.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/algebraic/cl_RA_sqrt.cc' object='cl_RA_sqrt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_RA_sqrt.lo `test -f 'real/algebraic/cl_RA_sqrt.cc' || echo '$(srcdir)/'`real/algebraic/cl_RA_sqrt.cc cl_R_sqrt.lo: real/algebraic/cl_R_sqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_sqrt.lo -MD -MP -MF $(DEPDIR)/cl_R_sqrt.Tpo -c -o cl_R_sqrt.lo `test -f 'real/algebraic/cl_R_sqrt.cc' || echo '$(srcdir)/'`real/algebraic/cl_R_sqrt.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_sqrt.Tpo $(DEPDIR)/cl_R_sqrt.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/algebraic/cl_R_sqrt.cc' object='cl_R_sqrt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_sqrt.lo `test -f 'real/algebraic/cl_R_sqrt.cc' || echo '$(srcdir)/'`real/algebraic/cl_R_sqrt.cc cl_F_from_R.lo: real/conv/cl_F_from_R.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_from_R.lo -MD -MP -MF $(DEPDIR)/cl_F_from_R.Tpo -c -o cl_F_from_R.lo `test -f 'real/conv/cl_F_from_R.cc' || echo '$(srcdir)/'`real/conv/cl_F_from_R.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_from_R.Tpo $(DEPDIR)/cl_F_from_R.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/conv/cl_F_from_R.cc' object='cl_F_from_R.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_from_R.lo `test -f 'real/conv/cl_F_from_R.cc' || echo '$(srcdir)/'`real/conv/cl_F_from_R.cc cl_F_from_R_def.lo: real/conv/cl_F_from_R_def.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_from_R_def.lo -MD -MP -MF $(DEPDIR)/cl_F_from_R_def.Tpo -c -o cl_F_from_R_def.lo `test -f 'real/conv/cl_F_from_R_def.cc' || echo '$(srcdir)/'`real/conv/cl_F_from_R_def.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_from_R_def.Tpo $(DEPDIR)/cl_F_from_R_def.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/conv/cl_F_from_R_def.cc' object='cl_F_from_R_def.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_from_R_def.lo `test -f 'real/conv/cl_F_from_R_def.cc' || echo '$(srcdir)/'`real/conv/cl_F_from_R_def.cc cl_F_from_R_f.lo: real/conv/cl_F_from_R_f.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_F_from_R_f.lo -MD -MP -MF $(DEPDIR)/cl_F_from_R_f.Tpo -c -o cl_F_from_R_f.lo `test -f 'real/conv/cl_F_from_R_f.cc' || echo '$(srcdir)/'`real/conv/cl_F_from_R_f.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_F_from_R_f.Tpo $(DEPDIR)/cl_F_from_R_f.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/conv/cl_F_from_R_f.cc' object='cl_F_from_R_f.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_F_from_R_f.lo `test -f 'real/conv/cl_F_from_R_f.cc' || echo '$(srcdir)/'`real/conv/cl_F_from_R_f.cc cl_R_to_DF.lo: real/conv/cl_R_to_DF.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_to_DF.lo -MD -MP -MF $(DEPDIR)/cl_R_to_DF.Tpo -c -o cl_R_to_DF.lo `test -f 'real/conv/cl_R_to_DF.cc' || echo '$(srcdir)/'`real/conv/cl_R_to_DF.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_to_DF.Tpo $(DEPDIR)/cl_R_to_DF.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/conv/cl_R_to_DF.cc' object='cl_R_to_DF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_to_DF.lo `test -f 'real/conv/cl_R_to_DF.cc' || echo '$(srcdir)/'`real/conv/cl_R_to_DF.cc cl_R_to_FF.lo: real/conv/cl_R_to_FF.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_to_FF.lo -MD -MP -MF $(DEPDIR)/cl_R_to_FF.Tpo -c -o cl_R_to_FF.lo `test -f 'real/conv/cl_R_to_FF.cc' || echo '$(srcdir)/'`real/conv/cl_R_to_FF.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_to_FF.Tpo $(DEPDIR)/cl_R_to_FF.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/conv/cl_R_to_FF.cc' object='cl_R_to_FF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_to_FF.lo `test -f 'real/conv/cl_R_to_FF.cc' || echo '$(srcdir)/'`real/conv/cl_R_to_FF.cc cl_R_to_LF.lo: real/conv/cl_R_to_LF.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_to_LF.lo -MD -MP -MF $(DEPDIR)/cl_R_to_LF.Tpo -c -o cl_R_to_LF.lo `test -f 'real/conv/cl_R_to_LF.cc' || echo '$(srcdir)/'`real/conv/cl_R_to_LF.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_to_LF.Tpo $(DEPDIR)/cl_R_to_LF.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/conv/cl_R_to_LF.cc' object='cl_R_to_LF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_to_LF.lo `test -f 'real/conv/cl_R_to_LF.cc' || echo '$(srcdir)/'`real/conv/cl_R_to_LF.cc cl_R_to_SF.lo: real/conv/cl_R_to_SF.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_to_SF.lo -MD -MP -MF $(DEPDIR)/cl_R_to_SF.Tpo -c -o cl_R_to_SF.lo `test -f 'real/conv/cl_R_to_SF.cc' || echo '$(srcdir)/'`real/conv/cl_R_to_SF.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_to_SF.Tpo $(DEPDIR)/cl_R_to_SF.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/conv/cl_R_to_SF.cc' object='cl_R_to_SF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_to_SF.lo `test -f 'real/conv/cl_R_to_SF.cc' || echo '$(srcdir)/'`real/conv/cl_R_to_SF.cc cl_R_to_double.lo: real/conv/cl_R_to_double.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_to_double.lo -MD -MP -MF $(DEPDIR)/cl_R_to_double.Tpo -c -o cl_R_to_double.lo `test -f 'real/conv/cl_R_to_double.cc' || echo '$(srcdir)/'`real/conv/cl_R_to_double.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_to_double.Tpo $(DEPDIR)/cl_R_to_double.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/conv/cl_R_to_double.cc' object='cl_R_to_double.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_to_double.lo `test -f 'real/conv/cl_R_to_double.cc' || echo '$(srcdir)/'`real/conv/cl_R_to_double.cc cl_R_to_float.lo: real/conv/cl_R_to_float.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_to_float.lo -MD -MP -MF $(DEPDIR)/cl_R_to_float.Tpo -c -o cl_R_to_float.lo `test -f 'real/conv/cl_R_to_float.cc' || echo '$(srcdir)/'`real/conv/cl_R_to_float.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_to_float.Tpo $(DEPDIR)/cl_R_to_float.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/conv/cl_R_to_float.cc' object='cl_R_to_float.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_to_float.lo `test -f 'real/conv/cl_R_to_float.cc' || echo '$(srcdir)/'`real/conv/cl_R_to_float.cc cl_R_ceil1.lo: real/division/cl_R_ceil1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_ceil1.lo -MD -MP -MF $(DEPDIR)/cl_R_ceil1.Tpo -c -o cl_R_ceil1.lo `test -f 'real/division/cl_R_ceil1.cc' || echo '$(srcdir)/'`real/division/cl_R_ceil1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_ceil1.Tpo $(DEPDIR)/cl_R_ceil1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_ceil1.cc' object='cl_R_ceil1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_ceil1.lo `test -f 'real/division/cl_R_ceil1.cc' || echo '$(srcdir)/'`real/division/cl_R_ceil1.cc cl_R_ceil12.lo: real/division/cl_R_ceil12.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_ceil12.lo -MD -MP -MF $(DEPDIR)/cl_R_ceil12.Tpo -c -o cl_R_ceil12.lo `test -f 'real/division/cl_R_ceil12.cc' || echo '$(srcdir)/'`real/division/cl_R_ceil12.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_ceil12.Tpo $(DEPDIR)/cl_R_ceil12.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_ceil12.cc' object='cl_R_ceil12.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_ceil12.lo `test -f 'real/division/cl_R_ceil12.cc' || echo '$(srcdir)/'`real/division/cl_R_ceil12.cc cl_R_ceil2.lo: real/division/cl_R_ceil2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_ceil2.lo -MD -MP -MF $(DEPDIR)/cl_R_ceil2.Tpo -c -o cl_R_ceil2.lo `test -f 'real/division/cl_R_ceil2.cc' || echo '$(srcdir)/'`real/division/cl_R_ceil2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_ceil2.Tpo $(DEPDIR)/cl_R_ceil2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_ceil2.cc' object='cl_R_ceil2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_ceil2.lo `test -f 'real/division/cl_R_ceil2.cc' || echo '$(srcdir)/'`real/division/cl_R_ceil2.cc cl_R_ceil22.lo: real/division/cl_R_ceil22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_ceil22.lo -MD -MP -MF $(DEPDIR)/cl_R_ceil22.Tpo -c -o cl_R_ceil22.lo `test -f 'real/division/cl_R_ceil22.cc' || echo '$(srcdir)/'`real/division/cl_R_ceil22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_ceil22.Tpo $(DEPDIR)/cl_R_ceil22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_ceil22.cc' object='cl_R_ceil22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_ceil22.lo `test -f 'real/division/cl_R_ceil22.cc' || echo '$(srcdir)/'`real/division/cl_R_ceil22.cc cl_R_fceil1.lo: real/division/cl_R_fceil1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_fceil1.lo -MD -MP -MF $(DEPDIR)/cl_R_fceil1.Tpo -c -o cl_R_fceil1.lo `test -f 'real/division/cl_R_fceil1.cc' || echo '$(srcdir)/'`real/division/cl_R_fceil1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_fceil1.Tpo $(DEPDIR)/cl_R_fceil1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_fceil1.cc' object='cl_R_fceil1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_fceil1.lo `test -f 'real/division/cl_R_fceil1.cc' || echo '$(srcdir)/'`real/division/cl_R_fceil1.cc cl_R_fceil12.lo: real/division/cl_R_fceil12.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_fceil12.lo -MD -MP -MF $(DEPDIR)/cl_R_fceil12.Tpo -c -o cl_R_fceil12.lo `test -f 'real/division/cl_R_fceil12.cc' || echo '$(srcdir)/'`real/division/cl_R_fceil12.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_fceil12.Tpo $(DEPDIR)/cl_R_fceil12.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_fceil12.cc' object='cl_R_fceil12.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_fceil12.lo `test -f 'real/division/cl_R_fceil12.cc' || echo '$(srcdir)/'`real/division/cl_R_fceil12.cc cl_R_fceil2.lo: real/division/cl_R_fceil2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_fceil2.lo -MD -MP -MF $(DEPDIR)/cl_R_fceil2.Tpo -c -o cl_R_fceil2.lo `test -f 'real/division/cl_R_fceil2.cc' || echo '$(srcdir)/'`real/division/cl_R_fceil2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_fceil2.Tpo $(DEPDIR)/cl_R_fceil2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_fceil2.cc' object='cl_R_fceil2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_fceil2.lo `test -f 'real/division/cl_R_fceil2.cc' || echo '$(srcdir)/'`real/division/cl_R_fceil2.cc cl_R_fceil22.lo: real/division/cl_R_fceil22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_fceil22.lo -MD -MP -MF $(DEPDIR)/cl_R_fceil22.Tpo -c -o cl_R_fceil22.lo `test -f 'real/division/cl_R_fceil22.cc' || echo '$(srcdir)/'`real/division/cl_R_fceil22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_fceil22.Tpo $(DEPDIR)/cl_R_fceil22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_fceil22.cc' object='cl_R_fceil22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_fceil22.lo `test -f 'real/division/cl_R_fceil22.cc' || echo '$(srcdir)/'`real/division/cl_R_fceil22.cc cl_R_ffloor1.lo: real/division/cl_R_ffloor1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_ffloor1.lo -MD -MP -MF $(DEPDIR)/cl_R_ffloor1.Tpo -c -o cl_R_ffloor1.lo `test -f 'real/division/cl_R_ffloor1.cc' || echo '$(srcdir)/'`real/division/cl_R_ffloor1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_ffloor1.Tpo $(DEPDIR)/cl_R_ffloor1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_ffloor1.cc' object='cl_R_ffloor1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_ffloor1.lo `test -f 'real/division/cl_R_ffloor1.cc' || echo '$(srcdir)/'`real/division/cl_R_ffloor1.cc cl_R_ffloor12.lo: real/division/cl_R_ffloor12.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_ffloor12.lo -MD -MP -MF $(DEPDIR)/cl_R_ffloor12.Tpo -c -o cl_R_ffloor12.lo `test -f 'real/division/cl_R_ffloor12.cc' || echo '$(srcdir)/'`real/division/cl_R_ffloor12.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_ffloor12.Tpo $(DEPDIR)/cl_R_ffloor12.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_ffloor12.cc' object='cl_R_ffloor12.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_ffloor12.lo `test -f 'real/division/cl_R_ffloor12.cc' || echo '$(srcdir)/'`real/division/cl_R_ffloor12.cc cl_R_ffloor2.lo: real/division/cl_R_ffloor2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_ffloor2.lo -MD -MP -MF $(DEPDIR)/cl_R_ffloor2.Tpo -c -o cl_R_ffloor2.lo `test -f 'real/division/cl_R_ffloor2.cc' || echo '$(srcdir)/'`real/division/cl_R_ffloor2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_ffloor2.Tpo $(DEPDIR)/cl_R_ffloor2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_ffloor2.cc' object='cl_R_ffloor2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_ffloor2.lo `test -f 'real/division/cl_R_ffloor2.cc' || echo '$(srcdir)/'`real/division/cl_R_ffloor2.cc cl_R_ffloor22.lo: real/division/cl_R_ffloor22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_ffloor22.lo -MD -MP -MF $(DEPDIR)/cl_R_ffloor22.Tpo -c -o cl_R_ffloor22.lo `test -f 'real/division/cl_R_ffloor22.cc' || echo '$(srcdir)/'`real/division/cl_R_ffloor22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_ffloor22.Tpo $(DEPDIR)/cl_R_ffloor22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_ffloor22.cc' object='cl_R_ffloor22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_ffloor22.lo `test -f 'real/division/cl_R_ffloor22.cc' || echo '$(srcdir)/'`real/division/cl_R_ffloor22.cc cl_R_floor1.lo: real/division/cl_R_floor1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_floor1.lo -MD -MP -MF $(DEPDIR)/cl_R_floor1.Tpo -c -o cl_R_floor1.lo `test -f 'real/division/cl_R_floor1.cc' || echo '$(srcdir)/'`real/division/cl_R_floor1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_floor1.Tpo $(DEPDIR)/cl_R_floor1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_floor1.cc' object='cl_R_floor1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_floor1.lo `test -f 'real/division/cl_R_floor1.cc' || echo '$(srcdir)/'`real/division/cl_R_floor1.cc cl_R_floor12.lo: real/division/cl_R_floor12.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_floor12.lo -MD -MP -MF $(DEPDIR)/cl_R_floor12.Tpo -c -o cl_R_floor12.lo `test -f 'real/division/cl_R_floor12.cc' || echo '$(srcdir)/'`real/division/cl_R_floor12.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_floor12.Tpo $(DEPDIR)/cl_R_floor12.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_floor12.cc' object='cl_R_floor12.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_floor12.lo `test -f 'real/division/cl_R_floor12.cc' || echo '$(srcdir)/'`real/division/cl_R_floor12.cc cl_R_floor2.lo: real/division/cl_R_floor2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_floor2.lo -MD -MP -MF $(DEPDIR)/cl_R_floor2.Tpo -c -o cl_R_floor2.lo `test -f 'real/division/cl_R_floor2.cc' || echo '$(srcdir)/'`real/division/cl_R_floor2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_floor2.Tpo $(DEPDIR)/cl_R_floor2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_floor2.cc' object='cl_R_floor2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_floor2.lo `test -f 'real/division/cl_R_floor2.cc' || echo '$(srcdir)/'`real/division/cl_R_floor2.cc cl_R_floor22.lo: real/division/cl_R_floor22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_floor22.lo -MD -MP -MF $(DEPDIR)/cl_R_floor22.Tpo -c -o cl_R_floor22.lo `test -f 'real/division/cl_R_floor22.cc' || echo '$(srcdir)/'`real/division/cl_R_floor22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_floor22.Tpo $(DEPDIR)/cl_R_floor22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_floor22.cc' object='cl_R_floor22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_floor22.lo `test -f 'real/division/cl_R_floor22.cc' || echo '$(srcdir)/'`real/division/cl_R_floor22.cc cl_R_fround1.lo: real/division/cl_R_fround1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_fround1.lo -MD -MP -MF $(DEPDIR)/cl_R_fround1.Tpo -c -o cl_R_fround1.lo `test -f 'real/division/cl_R_fround1.cc' || echo '$(srcdir)/'`real/division/cl_R_fround1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_fround1.Tpo $(DEPDIR)/cl_R_fround1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_fround1.cc' object='cl_R_fround1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_fround1.lo `test -f 'real/division/cl_R_fround1.cc' || echo '$(srcdir)/'`real/division/cl_R_fround1.cc cl_R_fround12.lo: real/division/cl_R_fround12.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_fround12.lo -MD -MP -MF $(DEPDIR)/cl_R_fround12.Tpo -c -o cl_R_fround12.lo `test -f 'real/division/cl_R_fround12.cc' || echo '$(srcdir)/'`real/division/cl_R_fround12.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_fround12.Tpo $(DEPDIR)/cl_R_fround12.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_fround12.cc' object='cl_R_fround12.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_fround12.lo `test -f 'real/division/cl_R_fround12.cc' || echo '$(srcdir)/'`real/division/cl_R_fround12.cc cl_R_fround2.lo: real/division/cl_R_fround2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_fround2.lo -MD -MP -MF $(DEPDIR)/cl_R_fround2.Tpo -c -o cl_R_fround2.lo `test -f 'real/division/cl_R_fround2.cc' || echo '$(srcdir)/'`real/division/cl_R_fround2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_fround2.Tpo $(DEPDIR)/cl_R_fround2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_fround2.cc' object='cl_R_fround2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_fround2.lo `test -f 'real/division/cl_R_fround2.cc' || echo '$(srcdir)/'`real/division/cl_R_fround2.cc cl_R_fround22.lo: real/division/cl_R_fround22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_fround22.lo -MD -MP -MF $(DEPDIR)/cl_R_fround22.Tpo -c -o cl_R_fround22.lo `test -f 'real/division/cl_R_fround22.cc' || echo '$(srcdir)/'`real/division/cl_R_fround22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_fround22.Tpo $(DEPDIR)/cl_R_fround22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_fround22.cc' object='cl_R_fround22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_fround22.lo `test -f 'real/division/cl_R_fround22.cc' || echo '$(srcdir)/'`real/division/cl_R_fround22.cc cl_R_ftrunc1.lo: real/division/cl_R_ftrunc1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_ftrunc1.lo -MD -MP -MF $(DEPDIR)/cl_R_ftrunc1.Tpo -c -o cl_R_ftrunc1.lo `test -f 'real/division/cl_R_ftrunc1.cc' || echo '$(srcdir)/'`real/division/cl_R_ftrunc1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_ftrunc1.Tpo $(DEPDIR)/cl_R_ftrunc1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_ftrunc1.cc' object='cl_R_ftrunc1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_ftrunc1.lo `test -f 'real/division/cl_R_ftrunc1.cc' || echo '$(srcdir)/'`real/division/cl_R_ftrunc1.cc cl_R_ftrunc12.lo: real/division/cl_R_ftrunc12.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_ftrunc12.lo -MD -MP -MF $(DEPDIR)/cl_R_ftrunc12.Tpo -c -o cl_R_ftrunc12.lo `test -f 'real/division/cl_R_ftrunc12.cc' || echo '$(srcdir)/'`real/division/cl_R_ftrunc12.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_ftrunc12.Tpo $(DEPDIR)/cl_R_ftrunc12.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_ftrunc12.cc' object='cl_R_ftrunc12.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_ftrunc12.lo `test -f 'real/division/cl_R_ftrunc12.cc' || echo '$(srcdir)/'`real/division/cl_R_ftrunc12.cc cl_R_ftrunc2.lo: real/division/cl_R_ftrunc2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_ftrunc2.lo -MD -MP -MF $(DEPDIR)/cl_R_ftrunc2.Tpo -c -o cl_R_ftrunc2.lo `test -f 'real/division/cl_R_ftrunc2.cc' || echo '$(srcdir)/'`real/division/cl_R_ftrunc2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_ftrunc2.Tpo $(DEPDIR)/cl_R_ftrunc2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_ftrunc2.cc' object='cl_R_ftrunc2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_ftrunc2.lo `test -f 'real/division/cl_R_ftrunc2.cc' || echo '$(srcdir)/'`real/division/cl_R_ftrunc2.cc cl_R_ftrunc22.lo: real/division/cl_R_ftrunc22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_ftrunc22.lo -MD -MP -MF $(DEPDIR)/cl_R_ftrunc22.Tpo -c -o cl_R_ftrunc22.lo `test -f 'real/division/cl_R_ftrunc22.cc' || echo '$(srcdir)/'`real/division/cl_R_ftrunc22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_ftrunc22.Tpo $(DEPDIR)/cl_R_ftrunc22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_ftrunc22.cc' object='cl_R_ftrunc22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_ftrunc22.lo `test -f 'real/division/cl_R_ftrunc22.cc' || echo '$(srcdir)/'`real/division/cl_R_ftrunc22.cc cl_R_mod.lo: real/division/cl_R_mod.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_mod.lo -MD -MP -MF $(DEPDIR)/cl_R_mod.Tpo -c -o cl_R_mod.lo `test -f 'real/division/cl_R_mod.cc' || echo '$(srcdir)/'`real/division/cl_R_mod.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_mod.Tpo $(DEPDIR)/cl_R_mod.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_mod.cc' object='cl_R_mod.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_mod.lo `test -f 'real/division/cl_R_mod.cc' || echo '$(srcdir)/'`real/division/cl_R_mod.cc cl_R_rem.lo: real/division/cl_R_rem.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_rem.lo -MD -MP -MF $(DEPDIR)/cl_R_rem.Tpo -c -o cl_R_rem.lo `test -f 'real/division/cl_R_rem.cc' || echo '$(srcdir)/'`real/division/cl_R_rem.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_rem.Tpo $(DEPDIR)/cl_R_rem.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_rem.cc' object='cl_R_rem.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_rem.lo `test -f 'real/division/cl_R_rem.cc' || echo '$(srcdir)/'`real/division/cl_R_rem.cc cl_R_round1.lo: real/division/cl_R_round1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_round1.lo -MD -MP -MF $(DEPDIR)/cl_R_round1.Tpo -c -o cl_R_round1.lo `test -f 'real/division/cl_R_round1.cc' || echo '$(srcdir)/'`real/division/cl_R_round1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_round1.Tpo $(DEPDIR)/cl_R_round1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_round1.cc' object='cl_R_round1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_round1.lo `test -f 'real/division/cl_R_round1.cc' || echo '$(srcdir)/'`real/division/cl_R_round1.cc cl_R_round12.lo: real/division/cl_R_round12.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_round12.lo -MD -MP -MF $(DEPDIR)/cl_R_round12.Tpo -c -o cl_R_round12.lo `test -f 'real/division/cl_R_round12.cc' || echo '$(srcdir)/'`real/division/cl_R_round12.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_round12.Tpo $(DEPDIR)/cl_R_round12.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_round12.cc' object='cl_R_round12.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_round12.lo `test -f 'real/division/cl_R_round12.cc' || echo '$(srcdir)/'`real/division/cl_R_round12.cc cl_R_round2.lo: real/division/cl_R_round2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_round2.lo -MD -MP -MF $(DEPDIR)/cl_R_round2.Tpo -c -o cl_R_round2.lo `test -f 'real/division/cl_R_round2.cc' || echo '$(srcdir)/'`real/division/cl_R_round2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_round2.Tpo $(DEPDIR)/cl_R_round2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_round2.cc' object='cl_R_round2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_round2.lo `test -f 'real/division/cl_R_round2.cc' || echo '$(srcdir)/'`real/division/cl_R_round2.cc cl_R_round22.lo: real/division/cl_R_round22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_round22.lo -MD -MP -MF $(DEPDIR)/cl_R_round22.Tpo -c -o cl_R_round22.lo `test -f 'real/division/cl_R_round22.cc' || echo '$(srcdir)/'`real/division/cl_R_round22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_round22.Tpo $(DEPDIR)/cl_R_round22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_round22.cc' object='cl_R_round22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_round22.lo `test -f 'real/division/cl_R_round22.cc' || echo '$(srcdir)/'`real/division/cl_R_round22.cc cl_R_trunc1.lo: real/division/cl_R_trunc1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_trunc1.lo -MD -MP -MF $(DEPDIR)/cl_R_trunc1.Tpo -c -o cl_R_trunc1.lo `test -f 'real/division/cl_R_trunc1.cc' || echo '$(srcdir)/'`real/division/cl_R_trunc1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_trunc1.Tpo $(DEPDIR)/cl_R_trunc1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_trunc1.cc' object='cl_R_trunc1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_trunc1.lo `test -f 'real/division/cl_R_trunc1.cc' || echo '$(srcdir)/'`real/division/cl_R_trunc1.cc cl_R_trunc12.lo: real/division/cl_R_trunc12.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_trunc12.lo -MD -MP -MF $(DEPDIR)/cl_R_trunc12.Tpo -c -o cl_R_trunc12.lo `test -f 'real/division/cl_R_trunc12.cc' || echo '$(srcdir)/'`real/division/cl_R_trunc12.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_trunc12.Tpo $(DEPDIR)/cl_R_trunc12.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_trunc12.cc' object='cl_R_trunc12.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_trunc12.lo `test -f 'real/division/cl_R_trunc12.cc' || echo '$(srcdir)/'`real/division/cl_R_trunc12.cc cl_R_trunc2.lo: real/division/cl_R_trunc2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_trunc2.lo -MD -MP -MF $(DEPDIR)/cl_R_trunc2.Tpo -c -o cl_R_trunc2.lo `test -f 'real/division/cl_R_trunc2.cc' || echo '$(srcdir)/'`real/division/cl_R_trunc2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_trunc2.Tpo $(DEPDIR)/cl_R_trunc2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_trunc2.cc' object='cl_R_trunc2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_trunc2.lo `test -f 'real/division/cl_R_trunc2.cc' || echo '$(srcdir)/'`real/division/cl_R_trunc2.cc cl_R_trunc22.lo: real/division/cl_R_trunc22.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_trunc22.lo -MD -MP -MF $(DEPDIR)/cl_R_trunc22.Tpo -c -o cl_R_trunc22.lo `test -f 'real/division/cl_R_trunc22.cc' || echo '$(srcdir)/'`real/division/cl_R_trunc22.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_trunc22.Tpo $(DEPDIR)/cl_R_trunc22.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/division/cl_R_trunc22.cc' object='cl_R_trunc22.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_trunc22.lo `test -f 'real/division/cl_R_trunc22.cc' || echo '$(srcdir)/'`real/division/cl_R_trunc22.cc cl_R_compare.lo: real/elem/cl_R_compare.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_compare.lo -MD -MP -MF $(DEPDIR)/cl_R_compare.Tpo -c -o cl_R_compare.lo `test -f 'real/elem/cl_R_compare.cc' || echo '$(srcdir)/'`real/elem/cl_R_compare.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_compare.Tpo $(DEPDIR)/cl_R_compare.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/elem/cl_R_compare.cc' object='cl_R_compare.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_compare.lo `test -f 'real/elem/cl_R_compare.cc' || echo '$(srcdir)/'`real/elem/cl_R_compare.cc cl_R_div.lo: real/elem/cl_R_div.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_div.lo -MD -MP -MF $(DEPDIR)/cl_R_div.Tpo -c -o cl_R_div.lo `test -f 'real/elem/cl_R_div.cc' || echo '$(srcdir)/'`real/elem/cl_R_div.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_div.Tpo $(DEPDIR)/cl_R_div.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/elem/cl_R_div.cc' object='cl_R_div.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_div.lo `test -f 'real/elem/cl_R_div.cc' || echo '$(srcdir)/'`real/elem/cl_R_div.cc cl_R_equal.lo: real/elem/cl_R_equal.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_equal.lo -MD -MP -MF $(DEPDIR)/cl_R_equal.Tpo -c -o cl_R_equal.lo `test -f 'real/elem/cl_R_equal.cc' || echo '$(srcdir)/'`real/elem/cl_R_equal.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_equal.Tpo $(DEPDIR)/cl_R_equal.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/elem/cl_R_equal.cc' object='cl_R_equal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_equal.lo `test -f 'real/elem/cl_R_equal.cc' || echo '$(srcdir)/'`real/elem/cl_R_equal.cc cl_R_minus.lo: real/elem/cl_R_minus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_minus.lo -MD -MP -MF $(DEPDIR)/cl_R_minus.Tpo -c -o cl_R_minus.lo `test -f 'real/elem/cl_R_minus.cc' || echo '$(srcdir)/'`real/elem/cl_R_minus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_minus.Tpo $(DEPDIR)/cl_R_minus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/elem/cl_R_minus.cc' object='cl_R_minus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_minus.lo `test -f 'real/elem/cl_R_minus.cc' || echo '$(srcdir)/'`real/elem/cl_R_minus.cc cl_R_minus1.lo: real/elem/cl_R_minus1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_minus1.lo -MD -MP -MF $(DEPDIR)/cl_R_minus1.Tpo -c -o cl_R_minus1.lo `test -f 'real/elem/cl_R_minus1.cc' || echo '$(srcdir)/'`real/elem/cl_R_minus1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_minus1.Tpo $(DEPDIR)/cl_R_minus1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/elem/cl_R_minus1.cc' object='cl_R_minus1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_minus1.lo `test -f 'real/elem/cl_R_minus1.cc' || echo '$(srcdir)/'`real/elem/cl_R_minus1.cc cl_R_minusp.lo: real/elem/cl_R_minusp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_minusp.lo -MD -MP -MF $(DEPDIR)/cl_R_minusp.Tpo -c -o cl_R_minusp.lo `test -f 'real/elem/cl_R_minusp.cc' || echo '$(srcdir)/'`real/elem/cl_R_minusp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_minusp.Tpo $(DEPDIR)/cl_R_minusp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/elem/cl_R_minusp.cc' object='cl_R_minusp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_minusp.lo `test -f 'real/elem/cl_R_minusp.cc' || echo '$(srcdir)/'`real/elem/cl_R_minusp.cc cl_R_mul.lo: real/elem/cl_R_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_mul.lo -MD -MP -MF $(DEPDIR)/cl_R_mul.Tpo -c -o cl_R_mul.lo `test -f 'real/elem/cl_R_mul.cc' || echo '$(srcdir)/'`real/elem/cl_R_mul.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_mul.Tpo $(DEPDIR)/cl_R_mul.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/elem/cl_R_mul.cc' object='cl_R_mul.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_mul.lo `test -f 'real/elem/cl_R_mul.cc' || echo '$(srcdir)/'`real/elem/cl_R_mul.cc cl_R_plus.lo: real/elem/cl_R_plus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_plus.lo -MD -MP -MF $(DEPDIR)/cl_R_plus.Tpo -c -o cl_R_plus.lo `test -f 'real/elem/cl_R_plus.cc' || echo '$(srcdir)/'`real/elem/cl_R_plus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_plus.Tpo $(DEPDIR)/cl_R_plus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/elem/cl_R_plus.cc' object='cl_R_plus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_plus.lo `test -f 'real/elem/cl_R_plus.cc' || echo '$(srcdir)/'`real/elem/cl_R_plus.cc cl_R_plus1.lo: real/elem/cl_R_plus1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_plus1.lo -MD -MP -MF $(DEPDIR)/cl_R_plus1.Tpo -c -o cl_R_plus1.lo `test -f 'real/elem/cl_R_plus1.cc' || echo '$(srcdir)/'`real/elem/cl_R_plus1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_plus1.Tpo $(DEPDIR)/cl_R_plus1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/elem/cl_R_plus1.cc' object='cl_R_plus1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_plus1.lo `test -f 'real/elem/cl_R_plus1.cc' || echo '$(srcdir)/'`real/elem/cl_R_plus1.cc cl_R_plusp.lo: real/elem/cl_R_plusp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_plusp.lo -MD -MP -MF $(DEPDIR)/cl_R_plusp.Tpo -c -o cl_R_plusp.lo `test -f 'real/elem/cl_R_plusp.cc' || echo '$(srcdir)/'`real/elem/cl_R_plusp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_plusp.Tpo $(DEPDIR)/cl_R_plusp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/elem/cl_R_plusp.cc' object='cl_R_plusp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_plusp.lo `test -f 'real/elem/cl_R_plusp.cc' || echo '$(srcdir)/'`real/elem/cl_R_plusp.cc cl_R_recip.lo: real/elem/cl_R_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_recip.lo -MD -MP -MF $(DEPDIR)/cl_R_recip.Tpo -c -o cl_R_recip.lo `test -f 'real/elem/cl_R_recip.cc' || echo '$(srcdir)/'`real/elem/cl_R_recip.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_recip.Tpo $(DEPDIR)/cl_R_recip.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/elem/cl_R_recip.cc' object='cl_R_recip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_recip.lo `test -f 'real/elem/cl_R_recip.cc' || echo '$(srcdir)/'`real/elem/cl_R_recip.cc cl_R_square.lo: real/elem/cl_R_square.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_square.lo -MD -MP -MF $(DEPDIR)/cl_R_square.Tpo -c -o cl_R_square.lo `test -f 'real/elem/cl_R_square.cc' || echo '$(srcdir)/'`real/elem/cl_R_square.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_square.Tpo $(DEPDIR)/cl_R_square.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/elem/cl_R_square.cc' object='cl_R_square.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_square.lo `test -f 'real/elem/cl_R_square.cc' || echo '$(srcdir)/'`real/elem/cl_R_square.cc cl_R_uminus.lo: real/elem/cl_R_uminus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_uminus.lo -MD -MP -MF $(DEPDIR)/cl_R_uminus.Tpo -c -o cl_R_uminus.lo `test -f 'real/elem/cl_R_uminus.cc' || echo '$(srcdir)/'`real/elem/cl_R_uminus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_uminus.Tpo $(DEPDIR)/cl_R_uminus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/elem/cl_R_uminus.cc' object='cl_R_uminus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_uminus.lo `test -f 'real/elem/cl_R_uminus.cc' || echo '$(srcdir)/'`real/elem/cl_R_uminus.cc cl_R_zerop.lo: real/elem/cl_R_zerop.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_zerop.lo -MD -MP -MF $(DEPDIR)/cl_R_zerop.Tpo -c -o cl_R_zerop.lo `test -f 'real/elem/cl_R_zerop.cc' || echo '$(srcdir)/'`real/elem/cl_R_zerop.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_zerop.Tpo $(DEPDIR)/cl_R_zerop.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/elem/cl_R_zerop.cc' object='cl_R_zerop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_zerop.lo `test -f 'real/elem/cl_R_zerop.cc' || echo '$(srcdir)/'`real/elem/cl_R_zerop.cc cl_fmt_cardinal.lo: real/format-output/cl_fmt_cardinal.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_fmt_cardinal.lo -MD -MP -MF $(DEPDIR)/cl_fmt_cardinal.Tpo -c -o cl_fmt_cardinal.lo `test -f 'real/format-output/cl_fmt_cardinal.cc' || echo '$(srcdir)/'`real/format-output/cl_fmt_cardinal.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_fmt_cardinal.Tpo $(DEPDIR)/cl_fmt_cardinal.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/format-output/cl_fmt_cardinal.cc' object='cl_fmt_cardinal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_fmt_cardinal.lo `test -f 'real/format-output/cl_fmt_cardinal.cc' || echo '$(srcdir)/'`real/format-output/cl_fmt_cardinal.cc cl_fmt_floatstring.lo: real/format-output/cl_fmt_floatstring.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_fmt_floatstring.lo -MD -MP -MF $(DEPDIR)/cl_fmt_floatstring.Tpo -c -o cl_fmt_floatstring.lo `test -f 'real/format-output/cl_fmt_floatstring.cc' || echo '$(srcdir)/'`real/format-output/cl_fmt_floatstring.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_fmt_floatstring.Tpo $(DEPDIR)/cl_fmt_floatstring.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/format-output/cl_fmt_floatstring.cc' object='cl_fmt_floatstring.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_fmt_floatstring.lo `test -f 'real/format-output/cl_fmt_floatstring.cc' || echo '$(srcdir)/'`real/format-output/cl_fmt_floatstring.cc cl_fmt_integer.lo: real/format-output/cl_fmt_integer.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_fmt_integer.lo -MD -MP -MF $(DEPDIR)/cl_fmt_integer.Tpo -c -o cl_fmt_integer.lo `test -f 'real/format-output/cl_fmt_integer.cc' || echo '$(srcdir)/'`real/format-output/cl_fmt_integer.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_fmt_integer.Tpo $(DEPDIR)/cl_fmt_integer.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/format-output/cl_fmt_integer.cc' object='cl_fmt_integer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_fmt_integer.lo `test -f 'real/format-output/cl_fmt_integer.cc' || echo '$(srcdir)/'`real/format-output/cl_fmt_integer.cc cl_fmt_newroman.lo: real/format-output/cl_fmt_newroman.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_fmt_newroman.lo -MD -MP -MF $(DEPDIR)/cl_fmt_newroman.Tpo -c -o cl_fmt_newroman.lo `test -f 'real/format-output/cl_fmt_newroman.cc' || echo '$(srcdir)/'`real/format-output/cl_fmt_newroman.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_fmt_newroman.Tpo $(DEPDIR)/cl_fmt_newroman.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/format-output/cl_fmt_newroman.cc' object='cl_fmt_newroman.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_fmt_newroman.lo `test -f 'real/format-output/cl_fmt_newroman.cc' || echo '$(srcdir)/'`real/format-output/cl_fmt_newroman.cc cl_fmt_oldroman.lo: real/format-output/cl_fmt_oldroman.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_fmt_oldroman.lo -MD -MP -MF $(DEPDIR)/cl_fmt_oldroman.Tpo -c -o cl_fmt_oldroman.lo `test -f 'real/format-output/cl_fmt_oldroman.cc' || echo '$(srcdir)/'`real/format-output/cl_fmt_oldroman.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_fmt_oldroman.Tpo $(DEPDIR)/cl_fmt_oldroman.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/format-output/cl_fmt_oldroman.cc' object='cl_fmt_oldroman.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_fmt_oldroman.lo `test -f 'real/format-output/cl_fmt_oldroman.cc' || echo '$(srcdir)/'`real/format-output/cl_fmt_oldroman.cc cl_fmt_ordinal.lo: real/format-output/cl_fmt_ordinal.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_fmt_ordinal.lo -MD -MP -MF $(DEPDIR)/cl_fmt_ordinal.Tpo -c -o cl_fmt_ordinal.lo `test -f 'real/format-output/cl_fmt_ordinal.cc' || echo '$(srcdir)/'`real/format-output/cl_fmt_ordinal.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_fmt_ordinal.Tpo $(DEPDIR)/cl_fmt_ordinal.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/format-output/cl_fmt_ordinal.cc' object='cl_fmt_ordinal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_fmt_ordinal.lo `test -f 'real/format-output/cl_fmt_ordinal.cc' || echo '$(srcdir)/'`real/format-output/cl_fmt_ordinal.cc cl_fmt_paddedstring.lo: real/format-output/cl_fmt_paddedstring.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_fmt_paddedstring.lo -MD -MP -MF $(DEPDIR)/cl_fmt_paddedstring.Tpo -c -o cl_fmt_paddedstring.lo `test -f 'real/format-output/cl_fmt_paddedstring.cc' || echo '$(srcdir)/'`real/format-output/cl_fmt_paddedstring.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_fmt_paddedstring.Tpo $(DEPDIR)/cl_fmt_paddedstring.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/format-output/cl_fmt_paddedstring.cc' object='cl_fmt_paddedstring.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_fmt_paddedstring.lo `test -f 'real/format-output/cl_fmt_paddedstring.cc' || echo '$(srcdir)/'`real/format-output/cl_fmt_paddedstring.cc cl_fmt_scaleexp.lo: real/format-output/cl_fmt_scaleexp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_fmt_scaleexp.lo -MD -MP -MF $(DEPDIR)/cl_fmt_scaleexp.Tpo -c -o cl_fmt_scaleexp.lo `test -f 'real/format-output/cl_fmt_scaleexp.cc' || echo '$(srcdir)/'`real/format-output/cl_fmt_scaleexp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_fmt_scaleexp.Tpo $(DEPDIR)/cl_fmt_scaleexp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/format-output/cl_fmt_scaleexp.cc' object='cl_fmt_scaleexp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_fmt_scaleexp.lo `test -f 'real/format-output/cl_fmt_scaleexp.cc' || echo '$(srcdir)/'`real/format-output/cl_fmt_scaleexp.cc cl_fmt_tens.lo: real/format-output/cl_fmt_tens.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_fmt_tens.lo -MD -MP -MF $(DEPDIR)/cl_fmt_tens.Tpo -c -o cl_fmt_tens.lo `test -f 'real/format-output/cl_fmt_tens.cc' || echo '$(srcdir)/'`real/format-output/cl_fmt_tens.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_fmt_tens.Tpo $(DEPDIR)/cl_fmt_tens.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/format-output/cl_fmt_tens.cc' object='cl_fmt_tens.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_fmt_tens.lo `test -f 'real/format-output/cl_fmt_tens.cc' || echo '$(srcdir)/'`real/format-output/cl_fmt_tens.cc cl_R_from_string.lo: real/input/cl_R_from_string.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_from_string.lo -MD -MP -MF $(DEPDIR)/cl_R_from_string.Tpo -c -o cl_R_from_string.lo `test -f 'real/input/cl_R_from_string.cc' || echo '$(srcdir)/'`real/input/cl_R_from_string.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_from_string.Tpo $(DEPDIR)/cl_R_from_string.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/input/cl_R_from_string.cc' object='cl_R_from_string.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_from_string.lo `test -f 'real/input/cl_R_from_string.cc' || echo '$(srcdir)/'`real/input/cl_R_from_string.cc cl_R_read.lo: real/input/cl_R_read.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_read.lo -MD -MP -MF $(DEPDIR)/cl_R_read.Tpo -c -o cl_R_read.lo `test -f 'real/input/cl_R_read.cc' || echo '$(srcdir)/'`real/input/cl_R_read.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_read.Tpo $(DEPDIR)/cl_R_read.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/input/cl_R_read.cc' object='cl_R_read.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_read.lo `test -f 'real/input/cl_R_read.cc' || echo '$(srcdir)/'`real/input/cl_R_read.cc cl_R_read_stream.lo: real/input/cl_R_read_stream.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_read_stream.lo -MD -MP -MF $(DEPDIR)/cl_R_read_stream.Tpo -c -o cl_R_read_stream.lo `test -f 'real/input/cl_R_read_stream.cc' || echo '$(srcdir)/'`real/input/cl_R_read_stream.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_read_stream.Tpo $(DEPDIR)/cl_R_read_stream.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/input/cl_R_read_stream.cc' object='cl_R_read_stream.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_read_stream.lo `test -f 'real/input/cl_R_read_stream.cc' || echo '$(srcdir)/'`real/input/cl_R_read_stream.cc cl_R_abs.lo: real/misc/cl_R_abs.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_abs.lo -MD -MP -MF $(DEPDIR)/cl_R_abs.Tpo -c -o cl_R_abs.lo `test -f 'real/misc/cl_R_abs.cc' || echo '$(srcdir)/'`real/misc/cl_R_abs.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_abs.Tpo $(DEPDIR)/cl_R_abs.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/misc/cl_R_abs.cc' object='cl_R_abs.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_abs.lo `test -f 'real/misc/cl_R_abs.cc' || echo '$(srcdir)/'`real/misc/cl_R_abs.cc cl_R_as.lo: real/misc/cl_R_as.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_as.lo -MD -MP -MF $(DEPDIR)/cl_R_as.Tpo -c -o cl_R_as.lo `test -f 'real/misc/cl_R_as.cc' || echo '$(srcdir)/'`real/misc/cl_R_as.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_as.Tpo $(DEPDIR)/cl_R_as.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/misc/cl_R_as.cc' object='cl_R_as.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_as.lo `test -f 'real/misc/cl_R_as.cc' || echo '$(srcdir)/'`real/misc/cl_R_as.cc cl_R_contagion.lo: real/misc/cl_R_contagion.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_contagion.lo -MD -MP -MF $(DEPDIR)/cl_R_contagion.Tpo -c -o cl_R_contagion.lo `test -f 'real/misc/cl_R_contagion.cc' || echo '$(srcdir)/'`real/misc/cl_R_contagion.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_contagion.Tpo $(DEPDIR)/cl_R_contagion.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/misc/cl_R_contagion.cc' object='cl_R_contagion.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_contagion.lo `test -f 'real/misc/cl_R_contagion.cc' || echo '$(srcdir)/'`real/misc/cl_R_contagion.cc cl_R_debug.lo: real/misc/cl_R_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_debug.lo -MD -MP -MF $(DEPDIR)/cl_R_debug.Tpo -c -o cl_R_debug.lo `test -f 'real/misc/cl_R_debug.cc' || echo '$(srcdir)/'`real/misc/cl_R_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_debug.Tpo $(DEPDIR)/cl_R_debug.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/misc/cl_R_debug.cc' object='cl_R_debug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_debug.lo `test -f 'real/misc/cl_R_debug.cc' || echo '$(srcdir)/'`real/misc/cl_R_debug.cc cl_R_eqhashcode.lo: real/misc/cl_R_eqhashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_eqhashcode.lo -MD -MP -MF $(DEPDIR)/cl_R_eqhashcode.Tpo -c -o cl_R_eqhashcode.lo `test -f 'real/misc/cl_R_eqhashcode.cc' || echo '$(srcdir)/'`real/misc/cl_R_eqhashcode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_eqhashcode.Tpo $(DEPDIR)/cl_R_eqhashcode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/misc/cl_R_eqhashcode.cc' object='cl_R_eqhashcode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_eqhashcode.lo `test -f 'real/misc/cl_R_eqhashcode.cc' || echo '$(srcdir)/'`real/misc/cl_R_eqhashcode.cc cl_R_expt.lo: real/misc/cl_R_expt.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_expt.lo -MD -MP -MF $(DEPDIR)/cl_R_expt.Tpo -c -o cl_R_expt.lo `test -f 'real/misc/cl_R_expt.cc' || echo '$(srcdir)/'`real/misc/cl_R_expt.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_expt.Tpo $(DEPDIR)/cl_R_expt.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/misc/cl_R_expt.cc' object='cl_R_expt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_expt.lo `test -f 'real/misc/cl_R_expt.cc' || echo '$(srcdir)/'`real/misc/cl_R_expt.cc cl_R_expt_I.lo: real/misc/cl_R_expt_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_expt_I.lo -MD -MP -MF $(DEPDIR)/cl_R_expt_I.Tpo -c -o cl_R_expt_I.lo `test -f 'real/misc/cl_R_expt_I.cc' || echo '$(srcdir)/'`real/misc/cl_R_expt_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_expt_I.Tpo $(DEPDIR)/cl_R_expt_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/misc/cl_R_expt_I.cc' object='cl_R_expt_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_expt_I.lo `test -f 'real/misc/cl_R_expt_I.cc' || echo '$(srcdir)/'`real/misc/cl_R_expt_I.cc cl_R_max.lo: real/misc/cl_R_max.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_max.lo -MD -MP -MF $(DEPDIR)/cl_R_max.Tpo -c -o cl_R_max.lo `test -f 'real/misc/cl_R_max.cc' || echo '$(srcdir)/'`real/misc/cl_R_max.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_max.Tpo $(DEPDIR)/cl_R_max.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/misc/cl_R_max.cc' object='cl_R_max.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_max.lo `test -f 'real/misc/cl_R_max.cc' || echo '$(srcdir)/'`real/misc/cl_R_max.cc cl_R_min.lo: real/misc/cl_R_min.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_min.lo -MD -MP -MF $(DEPDIR)/cl_R_min.Tpo -c -o cl_R_min.lo `test -f 'real/misc/cl_R_min.cc' || echo '$(srcdir)/'`real/misc/cl_R_min.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_min.Tpo $(DEPDIR)/cl_R_min.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/misc/cl_R_min.cc' object='cl_R_min.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_min.lo `test -f 'real/misc/cl_R_min.cc' || echo '$(srcdir)/'`real/misc/cl_R_min.cc cl_R_rational.lo: real/misc/cl_R_rational.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_rational.lo -MD -MP -MF $(DEPDIR)/cl_R_rational.Tpo -c -o cl_R_rational.lo `test -f 'real/misc/cl_R_rational.cc' || echo '$(srcdir)/'`real/misc/cl_R_rational.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_rational.Tpo $(DEPDIR)/cl_R_rational.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/misc/cl_R_rational.cc' object='cl_R_rational.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_rational.lo `test -f 'real/misc/cl_R_rational.cc' || echo '$(srcdir)/'`real/misc/cl_R_rational.cc cl_R_rationalize.lo: real/misc/cl_R_rationalize.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_rationalize.lo -MD -MP -MF $(DEPDIR)/cl_R_rationalize.Tpo -c -o cl_R_rationalize.lo `test -f 'real/misc/cl_R_rationalize.cc' || echo '$(srcdir)/'`real/misc/cl_R_rationalize.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_rationalize.Tpo $(DEPDIR)/cl_R_rationalize.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/misc/cl_R_rationalize.cc' object='cl_R_rationalize.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_rationalize.lo `test -f 'real/misc/cl_R_rationalize.cc' || echo '$(srcdir)/'`real/misc/cl_R_rationalize.cc cl_R_signum.lo: real/misc/cl_R_signum.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_signum.lo -MD -MP -MF $(DEPDIR)/cl_R_signum.Tpo -c -o cl_R_signum.lo `test -f 'real/misc/cl_R_signum.cc' || echo '$(srcdir)/'`real/misc/cl_R_signum.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_signum.Tpo $(DEPDIR)/cl_R_signum.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/misc/cl_R_signum.cc' object='cl_R_signum.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_signum.lo `test -f 'real/misc/cl_R_signum.cc' || echo '$(srcdir)/'`real/misc/cl_R_signum.cc cl_R_aprint.lo: real/output/cl_R_aprint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_aprint.lo -MD -MP -MF $(DEPDIR)/cl_R_aprint.Tpo -c -o cl_R_aprint.lo `test -f 'real/output/cl_R_aprint.cc' || echo '$(srcdir)/'`real/output/cl_R_aprint.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_aprint.Tpo $(DEPDIR)/cl_R_aprint.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/output/cl_R_aprint.cc' object='cl_R_aprint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_aprint.lo `test -f 'real/output/cl_R_aprint.cc' || echo '$(srcdir)/'`real/output/cl_R_aprint.cc cl_R_bprint.lo: real/output/cl_R_bprint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_bprint.lo -MD -MP -MF $(DEPDIR)/cl_R_bprint.Tpo -c -o cl_R_bprint.lo `test -f 'real/output/cl_R_bprint.cc' || echo '$(srcdir)/'`real/output/cl_R_bprint.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_bprint.Tpo $(DEPDIR)/cl_R_bprint.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/output/cl_R_bprint.cc' object='cl_R_bprint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_bprint.lo `test -f 'real/output/cl_R_bprint.cc' || echo '$(srcdir)/'`real/output/cl_R_bprint.cc cl_R_cprint.lo: real/output/cl_R_cprint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_cprint.lo -MD -MP -MF $(DEPDIR)/cl_R_cprint.Tpo -c -o cl_R_cprint.lo `test -f 'real/output/cl_R_cprint.cc' || echo '$(srcdir)/'`real/output/cl_R_cprint.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_cprint.Tpo $(DEPDIR)/cl_R_cprint.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/output/cl_R_cprint.cc' object='cl_R_cprint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_cprint.lo `test -f 'real/output/cl_R_cprint.cc' || echo '$(srcdir)/'`real/output/cl_R_cprint.cc cl_R_random.lo: real/random/cl_R_random.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_random.lo -MD -MP -MF $(DEPDIR)/cl_R_random.Tpo -c -o cl_R_random.lo `test -f 'real/random/cl_R_random.cc' || echo '$(srcdir)/'`real/random/cl_R_random.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_random.Tpo $(DEPDIR)/cl_R_random.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/random/cl_R_random.cc' object='cl_R_random.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_random.lo `test -f 'real/random/cl_R_random.cc' || echo '$(srcdir)/'`real/random/cl_R_random.cc cl_R_ring.lo: real/ring/cl_R_ring.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_ring.lo -MD -MP -MF $(DEPDIR)/cl_R_ring.Tpo -c -o cl_R_ring.lo `test -f 'real/ring/cl_R_ring.cc' || echo '$(srcdir)/'`real/ring/cl_R_ring.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_ring.Tpo $(DEPDIR)/cl_R_ring.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/ring/cl_R_ring.cc' object='cl_R_ring.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_ring.lo `test -f 'real/ring/cl_R_ring.cc' || echo '$(srcdir)/'`real/ring/cl_R_ring.cc cl_R_atan.lo: real/transcendental/cl_R_atan.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_atan.lo -MD -MP -MF $(DEPDIR)/cl_R_atan.Tpo -c -o cl_R_atan.lo `test -f 'real/transcendental/cl_R_atan.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_atan.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_atan.Tpo $(DEPDIR)/cl_R_atan.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/transcendental/cl_R_atan.cc' object='cl_R_atan.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_atan.lo `test -f 'real/transcendental/cl_R_atan.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_atan.cc cl_R_atan2.lo: real/transcendental/cl_R_atan2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_atan2.lo -MD -MP -MF $(DEPDIR)/cl_R_atan2.Tpo -c -o cl_R_atan2.lo `test -f 'real/transcendental/cl_R_atan2.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_atan2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_atan2.Tpo $(DEPDIR)/cl_R_atan2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/transcendental/cl_R_atan2.cc' object='cl_R_atan2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_atan2.lo `test -f 'real/transcendental/cl_R_atan2.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_atan2.cc cl_R_cos.lo: real/transcendental/cl_R_cos.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_cos.lo -MD -MP -MF $(DEPDIR)/cl_R_cos.Tpo -c -o cl_R_cos.lo `test -f 'real/transcendental/cl_R_cos.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_cos.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_cos.Tpo $(DEPDIR)/cl_R_cos.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/transcendental/cl_R_cos.cc' object='cl_R_cos.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_cos.lo `test -f 'real/transcendental/cl_R_cos.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_cos.cc cl_R_cosh.lo: real/transcendental/cl_R_cosh.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_cosh.lo -MD -MP -MF $(DEPDIR)/cl_R_cosh.Tpo -c -o cl_R_cosh.lo `test -f 'real/transcendental/cl_R_cosh.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_cosh.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_cosh.Tpo $(DEPDIR)/cl_R_cosh.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/transcendental/cl_R_cosh.cc' object='cl_R_cosh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_cosh.lo `test -f 'real/transcendental/cl_R_cosh.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_cosh.cc cl_R_coshsinh.lo: real/transcendental/cl_R_coshsinh.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_coshsinh.lo -MD -MP -MF $(DEPDIR)/cl_R_coshsinh.Tpo -c -o cl_R_coshsinh.lo `test -f 'real/transcendental/cl_R_coshsinh.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_coshsinh.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_coshsinh.Tpo $(DEPDIR)/cl_R_coshsinh.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/transcendental/cl_R_coshsinh.cc' object='cl_R_coshsinh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_coshsinh.lo `test -f 'real/transcendental/cl_R_coshsinh.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_coshsinh.cc cl_R_cossin.lo: real/transcendental/cl_R_cossin.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_cossin.lo -MD -MP -MF $(DEPDIR)/cl_R_cossin.Tpo -c -o cl_R_cossin.lo `test -f 'real/transcendental/cl_R_cossin.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_cossin.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_cossin.Tpo $(DEPDIR)/cl_R_cossin.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/transcendental/cl_R_cossin.cc' object='cl_R_cossin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_cossin.lo `test -f 'real/transcendental/cl_R_cossin.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_cossin.cc cl_R_exp.lo: real/transcendental/cl_R_exp.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_exp.lo -MD -MP -MF $(DEPDIR)/cl_R_exp.Tpo -c -o cl_R_exp.lo `test -f 'real/transcendental/cl_R_exp.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_exp.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_exp.Tpo $(DEPDIR)/cl_R_exp.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/transcendental/cl_R_exp.cc' object='cl_R_exp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_exp.lo `test -f 'real/transcendental/cl_R_exp.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_exp.cc cl_R_ln.lo: real/transcendental/cl_R_ln.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_ln.lo -MD -MP -MF $(DEPDIR)/cl_R_ln.Tpo -c -o cl_R_ln.lo `test -f 'real/transcendental/cl_R_ln.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_ln.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_ln.Tpo $(DEPDIR)/cl_R_ln.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/transcendental/cl_R_ln.cc' object='cl_R_ln.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_ln.lo `test -f 'real/transcendental/cl_R_ln.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_ln.cc cl_R_log.lo: real/transcendental/cl_R_log.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_log.lo -MD -MP -MF $(DEPDIR)/cl_R_log.Tpo -c -o cl_R_log.lo `test -f 'real/transcendental/cl_R_log.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_log.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_log.Tpo $(DEPDIR)/cl_R_log.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/transcendental/cl_R_log.cc' object='cl_R_log.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_log.lo `test -f 'real/transcendental/cl_R_log.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_log.cc cl_R_sin.lo: real/transcendental/cl_R_sin.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_sin.lo -MD -MP -MF $(DEPDIR)/cl_R_sin.Tpo -c -o cl_R_sin.lo `test -f 'real/transcendental/cl_R_sin.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_sin.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_sin.Tpo $(DEPDIR)/cl_R_sin.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/transcendental/cl_R_sin.cc' object='cl_R_sin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_sin.lo `test -f 'real/transcendental/cl_R_sin.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_sin.cc cl_R_sinh.lo: real/transcendental/cl_R_sinh.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_sinh.lo -MD -MP -MF $(DEPDIR)/cl_R_sinh.Tpo -c -o cl_R_sinh.lo `test -f 'real/transcendental/cl_R_sinh.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_sinh.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_sinh.Tpo $(DEPDIR)/cl_R_sinh.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/transcendental/cl_R_sinh.cc' object='cl_R_sinh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_sinh.lo `test -f 'real/transcendental/cl_R_sinh.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_sinh.cc cl_R_tan.lo: real/transcendental/cl_R_tan.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_tan.lo -MD -MP -MF $(DEPDIR)/cl_R_tan.Tpo -c -o cl_R_tan.lo `test -f 'real/transcendental/cl_R_tan.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_tan.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_tan.Tpo $(DEPDIR)/cl_R_tan.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/transcendental/cl_R_tan.cc' object='cl_R_tan.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_tan.lo `test -f 'real/transcendental/cl_R_tan.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_tan.cc cl_R_tanh.lo: real/transcendental/cl_R_tanh.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_R_tanh.lo -MD -MP -MF $(DEPDIR)/cl_R_tanh.Tpo -c -o cl_R_tanh.lo `test -f 'real/transcendental/cl_R_tanh.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_tanh.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_R_tanh.Tpo $(DEPDIR)/cl_R_tanh.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='real/transcendental/cl_R_tanh.cc' object='cl_R_tanh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_R_tanh.lo `test -f 'real/transcendental/cl_R_tanh.cc' || echo '$(srcdir)/'`real/transcendental/cl_R_tanh.cc cl_t_c1.lo: timing/cl_t_c1.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_t_c1.lo -MD -MP -MF $(DEPDIR)/cl_t_c1.Tpo -c -o cl_t_c1.lo `test -f 'timing/cl_t_c1.cc' || echo '$(srcdir)/'`timing/cl_t_c1.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_t_c1.Tpo $(DEPDIR)/cl_t_c1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='timing/cl_t_c1.cc' object='cl_t_c1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_t_c1.lo `test -f 'timing/cl_t_c1.cc' || echo '$(srcdir)/'`timing/cl_t_c1.cc cl_t_c2.lo: timing/cl_t_c2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_t_c2.lo -MD -MP -MF $(DEPDIR)/cl_t_c2.Tpo -c -o cl_t_c2.lo `test -f 'timing/cl_t_c2.cc' || echo '$(srcdir)/'`timing/cl_t_c2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_t_c2.Tpo $(DEPDIR)/cl_t_c2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='timing/cl_t_c2.cc' object='cl_t_c2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_t_c2.lo `test -f 'timing/cl_t_c2.cc' || echo '$(srcdir)/'`timing/cl_t_c2.cc cl_t_current.lo: timing/cl_t_current.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_t_current.lo -MD -MP -MF $(DEPDIR)/cl_t_current.Tpo -c -o cl_t_current.lo `test -f 'timing/cl_t_current.cc' || echo '$(srcdir)/'`timing/cl_t_current.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_t_current.Tpo $(DEPDIR)/cl_t_current.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='timing/cl_t_current.cc' object='cl_t_current.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_t_current.lo `test -f 'timing/cl_t_current.cc' || echo '$(srcdir)/'`timing/cl_t_current.cc cl_t_current2.lo: timing/cl_t_current2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_t_current2.lo -MD -MP -MF $(DEPDIR)/cl_t_current2.Tpo -c -o cl_t_current2.lo `test -f 'timing/cl_t_current2.cc' || echo '$(srcdir)/'`timing/cl_t_current2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_t_current2.Tpo $(DEPDIR)/cl_t_current2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='timing/cl_t_current2.cc' object='cl_t_current2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_t_current2.lo `test -f 'timing/cl_t_current2.cc' || echo '$(srcdir)/'`timing/cl_t_current2.cc cl_t_d.lo: timing/cl_t_d.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_t_d.lo -MD -MP -MF $(DEPDIR)/cl_t_d.Tpo -c -o cl_t_d.lo `test -f 'timing/cl_t_d.cc' || echo '$(srcdir)/'`timing/cl_t_d.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_t_d.Tpo $(DEPDIR)/cl_t_d.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='timing/cl_t_d.cc' object='cl_t_d.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_t_d.lo `test -f 'timing/cl_t_d.cc' || echo '$(srcdir)/'`timing/cl_t_d.cc cl_t_dec.lo: timing/cl_t_dec.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_t_dec.lo -MD -MP -MF $(DEPDIR)/cl_t_dec.Tpo -c -o cl_t_dec.lo `test -f 'timing/cl_t_dec.cc' || echo '$(srcdir)/'`timing/cl_t_dec.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_t_dec.Tpo $(DEPDIR)/cl_t_dec.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='timing/cl_t_dec.cc' object='cl_t_dec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_t_dec.lo `test -f 'timing/cl_t_dec.cc' || echo '$(srcdir)/'`timing/cl_t_dec.cc cl_t_inc.lo: timing/cl_t_inc.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_t_inc.lo -MD -MP -MF $(DEPDIR)/cl_t_inc.Tpo -c -o cl_t_inc.lo `test -f 'timing/cl_t_inc.cc' || echo '$(srcdir)/'`timing/cl_t_inc.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_t_inc.Tpo $(DEPDIR)/cl_t_inc.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='timing/cl_t_inc.cc' object='cl_t_inc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_t_inc.lo `test -f 'timing/cl_t_inc.cc' || echo '$(srcdir)/'`timing/cl_t_inc.cc cl_t_minus.lo: timing/cl_t_minus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_t_minus.lo -MD -MP -MF $(DEPDIR)/cl_t_minus.Tpo -c -o cl_t_minus.lo `test -f 'timing/cl_t_minus.cc' || echo '$(srcdir)/'`timing/cl_t_minus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_t_minus.Tpo $(DEPDIR)/cl_t_minus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='timing/cl_t_minus.cc' object='cl_t_minus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_t_minus.lo `test -f 'timing/cl_t_minus.cc' || echo '$(srcdir)/'`timing/cl_t_minus.cc cl_t_report.lo: timing/cl_t_report.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_t_report.lo -MD -MP -MF $(DEPDIR)/cl_t_report.Tpo -c -o cl_t_report.lo `test -f 'timing/cl_t_report.cc' || echo '$(srcdir)/'`timing/cl_t_report.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_t_report.Tpo $(DEPDIR)/cl_t_report.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='timing/cl_t_report.cc' object='cl_t_report.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_t_report.lo `test -f 'timing/cl_t_report.cc' || echo '$(srcdir)/'`timing/cl_t_report.cc cl_t_td_minus.lo: timing/cl_t_td_minus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_t_td_minus.lo -MD -MP -MF $(DEPDIR)/cl_t_td_minus.Tpo -c -o cl_t_td_minus.lo `test -f 'timing/cl_t_td_minus.cc' || echo '$(srcdir)/'`timing/cl_t_td_minus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_t_td_minus.Tpo $(DEPDIR)/cl_t_td_minus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='timing/cl_t_td_minus.cc' object='cl_t_td_minus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_t_td_minus.lo `test -f 'timing/cl_t_td_minus.cc' || echo '$(srcdir)/'`timing/cl_t_td_minus.cc cl_t_td_plus.lo: timing/cl_t_td_plus.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_t_td_plus.lo -MD -MP -MF $(DEPDIR)/cl_t_td_plus.Tpo -c -o cl_t_td_plus.lo `test -f 'timing/cl_t_td_plus.cc' || echo '$(srcdir)/'`timing/cl_t_td_plus.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_t_td_plus.Tpo $(DEPDIR)/cl_t_td_plus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='timing/cl_t_td_plus.cc' object='cl_t_td_plus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_t_td_plus.lo `test -f 'timing/cl_t_td_plus.cc' || echo '$(srcdir)/'`timing/cl_t_td_plus.cc cl_GV_I.lo: vector/cl_GV_I.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_GV_I.lo -MD -MP -MF $(DEPDIR)/cl_GV_I.Tpo -c -o cl_GV_I.lo `test -f 'vector/cl_GV_I.cc' || echo '$(srcdir)/'`vector/cl_GV_I.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_GV_I.Tpo $(DEPDIR)/cl_GV_I.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='vector/cl_GV_I.cc' object='cl_GV_I.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_GV_I.lo `test -f 'vector/cl_GV_I.cc' || echo '$(srcdir)/'`vector/cl_GV_I.cc cl_GV_I_copy.lo: vector/cl_GV_I_copy.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_GV_I_copy.lo -MD -MP -MF $(DEPDIR)/cl_GV_I_copy.Tpo -c -o cl_GV_I_copy.lo `test -f 'vector/cl_GV_I_copy.cc' || echo '$(srcdir)/'`vector/cl_GV_I_copy.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_GV_I_copy.Tpo $(DEPDIR)/cl_GV_I_copy.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='vector/cl_GV_I_copy.cc' object='cl_GV_I_copy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_GV_I_copy.lo `test -f 'vector/cl_GV_I_copy.cc' || echo '$(srcdir)/'`vector/cl_GV_I_copy.cc cl_GV_I_debug.lo: vector/cl_GV_I_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_GV_I_debug.lo -MD -MP -MF $(DEPDIR)/cl_GV_I_debug.Tpo -c -o cl_GV_I_debug.lo `test -f 'vector/cl_GV_I_debug.cc' || echo '$(srcdir)/'`vector/cl_GV_I_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_GV_I_debug.Tpo $(DEPDIR)/cl_GV_I_debug.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='vector/cl_GV_I_debug.cc' object='cl_GV_I_debug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_GV_I_debug.lo `test -f 'vector/cl_GV_I_debug.cc' || echo '$(srcdir)/'`vector/cl_GV_I_debug.cc cl_GV_number.lo: vector/cl_GV_number.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_GV_number.lo -MD -MP -MF $(DEPDIR)/cl_GV_number.Tpo -c -o cl_GV_number.lo `test -f 'vector/cl_GV_number.cc' || echo '$(srcdir)/'`vector/cl_GV_number.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_GV_number.Tpo $(DEPDIR)/cl_GV_number.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='vector/cl_GV_number.cc' object='cl_GV_number.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_GV_number.lo `test -f 'vector/cl_GV_number.cc' || echo '$(srcdir)/'`vector/cl_GV_number.cc cl_GV_number_copy.lo: vector/cl_GV_number_copy.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_GV_number_copy.lo -MD -MP -MF $(DEPDIR)/cl_GV_number_copy.Tpo -c -o cl_GV_number_copy.lo `test -f 'vector/cl_GV_number_copy.cc' || echo '$(srcdir)/'`vector/cl_GV_number_copy.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_GV_number_copy.Tpo $(DEPDIR)/cl_GV_number_copy.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='vector/cl_GV_number_copy.cc' object='cl_GV_number_copy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_GV_number_copy.lo `test -f 'vector/cl_GV_number_copy.cc' || echo '$(srcdir)/'`vector/cl_GV_number_copy.cc cl_GV_number_debug.lo: vector/cl_GV_number_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_GV_number_debug.lo -MD -MP -MF $(DEPDIR)/cl_GV_number_debug.Tpo -c -o cl_GV_number_debug.lo `test -f 'vector/cl_GV_number_debug.cc' || echo '$(srcdir)/'`vector/cl_GV_number_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_GV_number_debug.Tpo $(DEPDIR)/cl_GV_number_debug.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='vector/cl_GV_number_debug.cc' object='cl_GV_number_debug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_GV_number_debug.lo `test -f 'vector/cl_GV_number_debug.cc' || echo '$(srcdir)/'`vector/cl_GV_number_debug.cc cl_SV_copy.lo: vector/cl_SV_copy.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SV_copy.lo -MD -MP -MF $(DEPDIR)/cl_SV_copy.Tpo -c -o cl_SV_copy.lo `test -f 'vector/cl_SV_copy.cc' || echo '$(srcdir)/'`vector/cl_SV_copy.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SV_copy.Tpo $(DEPDIR)/cl_SV_copy.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='vector/cl_SV_copy.cc' object='cl_SV_copy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SV_copy.lo `test -f 'vector/cl_SV_copy.cc' || echo '$(srcdir)/'`vector/cl_SV_copy.cc cl_SV_number.lo: vector/cl_SV_number.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SV_number.lo -MD -MP -MF $(DEPDIR)/cl_SV_number.Tpo -c -o cl_SV_number.lo `test -f 'vector/cl_SV_number.cc' || echo '$(srcdir)/'`vector/cl_SV_number.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SV_number.Tpo $(DEPDIR)/cl_SV_number.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='vector/cl_SV_number.cc' object='cl_SV_number.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SV_number.lo `test -f 'vector/cl_SV_number.cc' || echo '$(srcdir)/'`vector/cl_SV_number.cc cl_SV_number_debug.lo: vector/cl_SV_number_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SV_number_debug.lo -MD -MP -MF $(DEPDIR)/cl_SV_number_debug.Tpo -c -o cl_SV_number_debug.lo `test -f 'vector/cl_SV_number_debug.cc' || echo '$(srcdir)/'`vector/cl_SV_number_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SV_number_debug.Tpo $(DEPDIR)/cl_SV_number_debug.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='vector/cl_SV_number_debug.cc' object='cl_SV_number_debug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SV_number_debug.lo `test -f 'vector/cl_SV_number_debug.cc' || echo '$(srcdir)/'`vector/cl_SV_number_debug.cc cl_SV_ringelt.lo: vector/cl_SV_ringelt.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SV_ringelt.lo -MD -MP -MF $(DEPDIR)/cl_SV_ringelt.Tpo -c -o cl_SV_ringelt.lo `test -f 'vector/cl_SV_ringelt.cc' || echo '$(srcdir)/'`vector/cl_SV_ringelt.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SV_ringelt.Tpo $(DEPDIR)/cl_SV_ringelt.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='vector/cl_SV_ringelt.cc' object='cl_SV_ringelt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SV_ringelt.lo `test -f 'vector/cl_SV_ringelt.cc' || echo '$(srcdir)/'`vector/cl_SV_ringelt.cc cl_SV_ringelt_debug.lo: vector/cl_SV_ringelt_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SV_ringelt_debug.lo -MD -MP -MF $(DEPDIR)/cl_SV_ringelt_debug.Tpo -c -o cl_SV_ringelt_debug.lo `test -f 'vector/cl_SV_ringelt_debug.cc' || echo '$(srcdir)/'`vector/cl_SV_ringelt_debug.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SV_ringelt_debug.Tpo $(DEPDIR)/cl_SV_ringelt_debug.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='vector/cl_SV_ringelt_debug.cc' object='cl_SV_ringelt_debug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SV_ringelt_debug.lo `test -f 'vector/cl_SV_ringelt_debug.cc' || echo '$(srcdir)/'`vector/cl_SV_ringelt_debug.cc cl_GV_number_aprint.lo: vector/output/cl_GV_number_aprint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_GV_number_aprint.lo -MD -MP -MF $(DEPDIR)/cl_GV_number_aprint.Tpo -c -o cl_GV_number_aprint.lo `test -f 'vector/output/cl_GV_number_aprint.cc' || echo '$(srcdir)/'`vector/output/cl_GV_number_aprint.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_GV_number_aprint.Tpo $(DEPDIR)/cl_GV_number_aprint.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='vector/output/cl_GV_number_aprint.cc' object='cl_GV_number_aprint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_GV_number_aprint.lo `test -f 'vector/output/cl_GV_number_aprint.cc' || echo '$(srcdir)/'`vector/output/cl_GV_number_aprint.cc cl_SV_aprint.lo: vector/output/cl_SV_aprint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SV_aprint.lo -MD -MP -MF $(DEPDIR)/cl_SV_aprint.Tpo -c -o cl_SV_aprint.lo `test -f 'vector/output/cl_SV_aprint.cc' || echo '$(srcdir)/'`vector/output/cl_SV_aprint.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SV_aprint.Tpo $(DEPDIR)/cl_SV_aprint.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='vector/output/cl_SV_aprint.cc' object='cl_SV_aprint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SV_aprint.lo `test -f 'vector/output/cl_SV_aprint.cc' || echo '$(srcdir)/'`vector/output/cl_SV_aprint.cc cl_SV_number_aprint.lo: vector/output/cl_SV_number_aprint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT cl_SV_number_aprint.lo -MD -MP -MF $(DEPDIR)/cl_SV_number_aprint.Tpo -c -o cl_SV_number_aprint.lo `test -f 'vector/output/cl_SV_number_aprint.cc' || echo '$(srcdir)/'`vector/output/cl_SV_number_aprint.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cl_SV_number_aprint.Tpo $(DEPDIR)/cl_SV_number_aprint.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='vector/output/cl_SV_number_aprint.cc' object='cl_SV_number_aprint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o cl_SV_number_aprint.lo `test -f 'vector/output/cl_SV_number_aprint.cc' || echo '$(srcdir)/'`vector/output/cl_SV_number_aprint.cc mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs 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 $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; 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) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -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-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES 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 -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool 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-info \ install-info-am install-libLTLIBRARIES 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 mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES base/digitseq/cl_asm.S: $(ASMFILES) $(MKDIR_P) base/digitseq; cp $< $@ polynomial/elem/cl_asm_GF2.S: $(MORE_ASMFILES) $(MKDIR_P) polynomial/elem; cp $< $@ # 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: cln-1.3.3/src/Makefile.am0000644000000000000000000007711011252543153012012 0ustar lib_LTLIBRARIES = libcln.la AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_builddir)/include -I$(top_builddir)/src DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/autoconf libcln_la_LDFLAGS = -version-info $(LT_VERSION_INFO) libcln_la_SOURCES = \ base/cl_N.h \ base/cl_alloca.cc \ base/cl_alloca.h \ base/cl_as_exception.cc \ base/cl_condition.cc \ base/cl_d0_exception.cc \ base/cl_debug.cc \ base/cl_debugout.cc \ base/cl_free.cc \ base/cl_immclasses.cc \ base/cl_inline.h \ base/cl_inline2.h \ base/cl_iterator.h \ base/cl_low.h \ base/cl_macros.h \ base/cl_malloc.cc \ base/cl_maybe_inline.h \ base/cl_notreached_exception.cc \ base/cl_offsetof.h \ base/cl_sysdep.h \ base/cl_version.cc \ base/cl_xmacros.h \ base/digit/cl_2D.h \ base/digit/cl_2D_div.cc \ base/digit/cl_2D_exptpos.cc \ base/digit/cl_D.h \ base/digitseq/cl_2DS.h \ base/digitseq/cl_2DS_div.cc \ base/digitseq/cl_2DS_recip.cc \ base/digitseq/cl_DS.h \ base/digitseq/cl_DS_div.cc \ base/digitseq/cl_DS_endian.h \ base/digitseq/cl_DS_mul.cc \ base/digitseq/cl_DS_mul_fftc.h \ base/digitseq/cl_DS_mul_fftcs.h \ base/digitseq/cl_DS_mul_fftm.h \ base/digitseq/cl_DS_mul_fftp.h \ base/digitseq/cl_DS_mul_fftp3.h \ base/digitseq/cl_DS_mul_fftp3m.h \ base/digitseq/cl_DS_mul_fftr.h \ base/digitseq/cl_DS_mul_kara.h \ base/digitseq/cl_DS_mul_kara_sqr.h \ base/digitseq/cl_DS_mul_nuss.h \ base/digitseq/cl_DS_random.cc \ base/digitseq/cl_DS_recip.cc \ base/digitseq/cl_DS_recipsqrt.cc \ base/digitseq/cl_DS_sqrt.cc \ base/digitseq/cl_DS_trandom.cc \ base/digitseq/cl_asm.h \ base/hash/cl_hash.h \ base/hash/cl_hash1.h \ base/hash/cl_hash1weak.h \ base/hash/cl_hash2.h \ base/hash/cl_hash2weak.h \ base/hash/cl_hashset.h \ base/hash/cl_hashuniq.h \ base/hash/cl_hashuniqweak.h \ base/hash/cl_rcpointer2_hashweak_rcpointer.cc \ base/hash/cl_rcpointer2_hashweak_rcpointer.h \ base/hash/cl_rcpointer_hashweak_rcpointer.cc \ base/hash/cl_rcpointer_hashweak_rcpointer.h \ base/input/cl_read_bad_syntax_exception.cc \ base/input/cl_read_eof_exception.cc \ base/input/cl_read_junk_exception.cc \ base/low/cl_low_div.cc \ base/low/cl_low_isqrt.cc \ base/low/cl_low_isqrt2.cc \ base/low/cl_low_mul.cc \ base/output/cl_output_dec.cc \ base/output/cl_output_hex.cc \ base/output/cl_prin_globals.cc \ base/proplist/cl_pl_add.cc \ base/proplist/cl_pl_d.cc \ base/proplist/cl_pl_get.cc \ base/random/cl_UL_random.cc \ base/random/cl_random_def.cc \ base/random/cl_random_from.cc \ base/random/cl_random_impl.h \ base/ring/cl_no_ring.cc \ base/ring/cl_ring_debug.cc \ base/string/cl_spushstring.h \ base/string/cl_spushstring_append.cc \ base/string/cl_spushstring_push.cc \ base/string/cl_sstring.cc \ base/string/cl_sstring.h \ base/string/cl_st_c2.cc \ base/string/cl_st_concat1.cc \ base/string/cl_st_concat2.cc \ base/string/cl_st_concat3.cc \ base/string/cl_st_debug.cc \ base/string/cl_st_hashcode.cc \ base/string/cl_st_make0.cc \ base/string/cl_st_make0.h \ base/string/cl_st_make1.cc \ base/string/cl_st_make2.cc \ base/string/input/cl_st_get1.cc \ base/string/input/cl_st_get2.cc \ base/string/input/cl_st_getline1.cc \ base/string/input/cl_st_getline2.cc \ base/string/input/cl_st_gettoken.cc \ base/string/misc/cl_st_class.cc \ base/string/output/cl_st_print.cc \ base/symbol/cl_sy_hashcode.cc \ base/symbol/cl_symbol.cc \ complex/algebraic/cl_C_abs.cc \ complex/algebraic/cl_C_abs_aux.cc \ complex/algebraic/cl_C_signum.cc \ complex/algebraic/cl_C_sqrt.cc \ complex/algebraic/cl_DF_hypot.cc \ complex/algebraic/cl_FF_hypot.cc \ complex/algebraic/cl_LF_hypot.cc \ complex/algebraic/cl_R_hypot.cc \ complex/algebraic/cl_SF_hypot.cc \ complex/cl_C.h \ complex/elem/cl_C_equal.cc \ complex/elem/cl_C_from_R_R_complex.cc \ complex/elem/cl_C_from_R_R_complex1.cc \ complex/elem/cl_C_imagpart.cc \ complex/elem/cl_C_minus.cc \ complex/elem/cl_C_minus1.cc \ complex/elem/cl_C_mul.cc \ complex/elem/cl_C_plus.cc \ complex/elem/cl_C_plus1.cc \ complex/elem/cl_C_realpart.cc \ complex/elem/cl_C_square.cc \ complex/elem/cl_C_uminus.cc \ complex/elem/cl_C_zerop.cc \ complex/elem/division/cl_C_DF_recip.cc \ complex/elem/division/cl_C_FF_recip.cc \ complex/elem/division/cl_C_LF_recip.cc \ complex/elem/division/cl_C_SF_recip.cc \ complex/elem/division/cl_C_div.cc \ complex/elem/division/cl_C_recip.cc \ complex/input/cl_N_from_string.cc \ complex/input/cl_N_read.cc \ complex/input/cl_N_read_stream.cc \ complex/misc/cl_C_class.cc \ complex/misc/cl_C_conjugate.cc \ complex/misc/cl_C_debug.cc \ complex/misc/cl_C_eqhashcode.cc \ complex/misc/cl_C_expt.cc \ complex/misc/cl_C_expt_I.cc \ complex/misc/cl_N_as.cc \ complex/output/cl_N_aprint.cc \ complex/output/cl_N_bprint.cc \ complex/ring/cl_C_ring.cc \ complex/transcendental/cl_C_acos.cc \ complex/transcendental/cl_C_acosh.cc \ complex/transcendental/cl_C_asin.cc \ complex/transcendental/cl_C_asinh.cc \ complex/transcendental/cl_C_asinh_aux.cc \ complex/transcendental/cl_C_atan.cc \ complex/transcendental/cl_C_atanh.cc \ complex/transcendental/cl_C_atanh_aux.cc \ complex/transcendental/cl_C_cis.cc \ complex/transcendental/cl_C_cos.cc \ complex/transcendental/cl_C_cosh.cc \ complex/transcendental/cl_C_exp.cc \ complex/transcendental/cl_C_expt_C.cc \ complex/transcendental/cl_C_log.cc \ complex/transcendental/cl_C_log2.cc \ complex/transcendental/cl_C_phase.cc \ complex/transcendental/cl_C_sin.cc \ complex/transcendental/cl_C_sinh.cc \ complex/transcendental/cl_C_tan.cc \ complex/transcendental/cl_C_tanh.cc \ complex/transcendental/cl_R_cis.cc \ float/algebraic/cl_F_sqrt.cc \ float/base/cl_F_globals.cc \ float/base/cl_F_nan_exception.cc \ float/base/cl_F_overflow_exception.cc \ float/base/cl_F_underflow_exception.cc \ float/cl_F.h \ float/conv/cl_DF_to_FF.cc \ float/conv/cl_DF_to_LF.cc \ float/conv/cl_DF_to_SF.cc \ float/conv/cl_DF_to_double.cc \ float/conv/cl_DF_to_float.cc \ float/conv/cl_FF_to_DF.cc \ float/conv/cl_FF_to_LF.cc \ float/conv/cl_FF_to_SF.cc \ float/conv/cl_FF_to_double.cc \ float/conv/cl_FF_to_float.cc \ float/conv/cl_F_from_F.cc \ float/conv/cl_F_from_F_f.cc \ float/conv/cl_F_from_I.cc \ float/conv/cl_F_from_I_def.cc \ float/conv/cl_F_from_I_f.cc \ float/conv/cl_F_from_RA.cc \ float/conv/cl_F_from_RA_def.cc \ float/conv/cl_F_from_RA_f.cc \ float/conv/cl_F_to_DF.cc \ float/conv/cl_F_to_FF.cc \ float/conv/cl_F_to_LF.cc \ float/conv/cl_F_to_SF.cc \ float/conv/cl_F_to_double.cc \ float/conv/cl_F_to_float.cc \ float/conv/cl_LF_to_DF.cc \ float/conv/cl_LF_to_FF.cc \ float/conv/cl_LF_to_SF.cc \ float/conv/cl_LF_to_double.cc \ float/conv/cl_LF_to_float.cc \ float/conv/cl_SF_to_DF.cc \ float/conv/cl_SF_to_FF.cc \ float/conv/cl_SF_to_LF.cc \ float/conv/cl_SF_to_double.cc \ float/conv/cl_SF_to_float.cc \ float/dfloat/algebraic/cl_DF_sqrt.cc \ float/dfloat/cl_DF.h \ float/dfloat/conv/cl_DF_from_double.cc \ float/dfloat/conv/cl_DF_to_doublej.cc \ float/dfloat/conv/cl_I_to_double.cc \ float/dfloat/conv/cl_RA_to_double.cc \ float/dfloat/division/cl_DF_ceil22.cc \ float/dfloat/division/cl_DF_fceil.cc \ float/dfloat/division/cl_DF_floor22.cc \ float/dfloat/division/cl_DF_recip.cc \ float/dfloat/division/cl_DF_round22.cc \ float/dfloat/division/cl_DF_trunc22.cc \ float/dfloat/elem/cl_DF_compare.cc \ float/dfloat/elem/cl_DF_div.cc \ float/dfloat/elem/cl_DF_ffloor.cc \ float/dfloat/elem/cl_DF_from_I.cc \ float/dfloat/elem/cl_DF_from_RA.cc \ float/dfloat/elem/cl_DF_fround.cc \ float/dfloat/elem/cl_DF_ftrunc.cc \ float/dfloat/elem/cl_DF_futrunc.cc \ float/dfloat/elem/cl_DF_globals.cc \ float/dfloat/elem/cl_DF_minus.cc \ float/dfloat/elem/cl_DF_minusp.cc \ float/dfloat/elem/cl_DF_mul.cc \ float/dfloat/elem/cl_DF_plus.cc \ float/dfloat/elem/cl_DF_plusp.cc \ float/dfloat/elem/cl_DF_scale.cc \ float/dfloat/elem/cl_DF_scale_I.cc \ float/dfloat/elem/cl_DF_to_I.cc \ float/dfloat/elem/cl_DF_uminus.cc \ float/dfloat/elem/cl_DF_zerop.cc \ float/dfloat/input/cl_DF_from_string.cc \ float/dfloat/misc/cl_DF_abs.cc \ float/dfloat/misc/cl_DF_as.cc \ float/dfloat/misc/cl_DF_class.cc \ float/dfloat/misc/cl_DF_debug.cc \ float/dfloat/misc/cl_DF_decode.cc \ float/dfloat/misc/cl_DF_digits.cc \ float/dfloat/misc/cl_DF_eqhashcode.cc \ float/dfloat/misc/cl_DF_exponent.cc \ float/dfloat/misc/cl_DF_idecode.cc \ float/dfloat/misc/cl_DF_max.cc \ float/dfloat/misc/cl_DF_min.cc \ float/dfloat/misc/cl_DF_precision.cc \ float/dfloat/misc/cl_DF_sign.cc \ float/dfloat/misc/cl_DF_signum.cc \ float/division/cl_F_ceil1.cc \ float/division/cl_F_ceil2.cc \ float/division/cl_F_ceil22.cc \ float/division/cl_F_fceil1.cc \ float/division/cl_F_fceil2.cc \ float/division/cl_F_ffloor1.cc \ float/division/cl_F_ffloor2.cc \ float/division/cl_F_floor1.cc \ float/division/cl_F_floor2.cc \ float/division/cl_F_floor22.cc \ float/division/cl_F_fround1.cc \ float/division/cl_F_fround2.cc \ float/division/cl_F_ftrunc1.cc \ float/division/cl_F_ftrunc2.cc \ float/division/cl_F_round1.cc \ float/division/cl_F_round2.cc \ float/division/cl_F_round22.cc \ float/division/cl_F_trunc1.cc \ float/division/cl_F_trunc2.cc \ float/division/cl_F_trunc22.cc \ float/elem/cl_F_I_div.cc \ float/elem/cl_F_I_mul.cc \ float/elem/cl_F_RA_div.cc \ float/elem/cl_F_RA_mul.cc \ float/elem/cl_F_compare.cc \ float/elem/cl_F_div.cc \ float/elem/cl_F_minus.cc \ float/elem/cl_F_minusp.cc \ float/elem/cl_F_mul.cc \ float/elem/cl_F_plus.cc \ float/elem/cl_F_plusp.cc \ float/elem/cl_F_recip.cc \ float/elem/cl_F_scale.cc \ float/elem/cl_F_scale_I.cc \ float/elem/cl_F_square.cc \ float/elem/cl_F_uminus.cc \ float/elem/cl_F_zerop.cc \ float/elem/cl_I_F_div.cc \ float/elem/cl_RA_F_div.cc \ float/ffloat/algebraic/cl_FF_sqrt.cc \ float/ffloat/cl_FF.h \ float/ffloat/conv/cl_FF_from_float.cc \ float/ffloat/conv/cl_FF_to_floatj.cc \ float/ffloat/conv/cl_I_to_float.cc \ float/ffloat/conv/cl_RA_to_float.cc \ float/ffloat/division/cl_FF_ceil22.cc \ float/ffloat/division/cl_FF_fceil.cc \ float/ffloat/division/cl_FF_floor22.cc \ float/ffloat/division/cl_FF_recip.cc \ float/ffloat/division/cl_FF_round22.cc \ float/ffloat/division/cl_FF_trunc22.cc \ float/ffloat/elem/cl_FF_compare.cc \ float/ffloat/elem/cl_FF_div.cc \ float/ffloat/elem/cl_FF_ffloor.cc \ float/ffloat/elem/cl_FF_from_I.cc \ float/ffloat/elem/cl_FF_from_RA.cc \ float/ffloat/elem/cl_FF_fround.cc \ float/ffloat/elem/cl_FF_ftrunc.cc \ float/ffloat/elem/cl_FF_futrunc.cc \ float/ffloat/elem/cl_FF_globals.cc \ float/ffloat/elem/cl_FF_minus.cc \ float/ffloat/elem/cl_FF_minusp.cc \ float/ffloat/elem/cl_FF_mul.cc \ float/ffloat/elem/cl_FF_plus.cc \ float/ffloat/elem/cl_FF_plusp.cc \ float/ffloat/elem/cl_FF_scale.cc \ float/ffloat/elem/cl_FF_scale_I.cc \ float/ffloat/elem/cl_FF_to_I.cc \ float/ffloat/elem/cl_FF_uminus.cc \ float/ffloat/elem/cl_FF_zerop.cc \ float/ffloat/input/cl_FF_from_string.cc \ float/ffloat/misc/cl_FF_abs.cc \ float/ffloat/misc/cl_FF_as.cc \ float/ffloat/misc/cl_FF_class.cc \ float/ffloat/misc/cl_FF_debug.cc \ float/ffloat/misc/cl_FF_decode.cc \ float/ffloat/misc/cl_FF_digits.cc \ float/ffloat/misc/cl_FF_eqhashcode.cc \ float/ffloat/misc/cl_FF_exponent.cc \ float/ffloat/misc/cl_FF_idecode.cc \ float/ffloat/misc/cl_FF_max.cc \ float/ffloat/misc/cl_FF_min.cc \ float/ffloat/misc/cl_FF_precision.cc \ float/ffloat/misc/cl_FF_sign.cc \ float/ffloat/misc/cl_FF_signum.cc \ float/input/cl_F_from_string.cc \ float/input/cl_F_read.cc \ float/input/cl_F_read_stream.cc \ float/input/cl_F_readparsed.cc \ float/lfloat/algebraic/cl_LF_sqrt.cc \ float/lfloat/cl_LF.h \ float/lfloat/cl_LF_impl.h \ float/lfloat/division/cl_LF_ceil22.cc \ float/lfloat/division/cl_LF_fceil.cc \ float/lfloat/division/cl_LF_floor22.cc \ float/lfloat/division/cl_LF_recip.cc \ float/lfloat/division/cl_LF_round22.cc \ float/lfloat/division/cl_LF_trunc22.cc \ float/lfloat/elem/cl_I_LF_div.cc \ float/lfloat/elem/cl_LF_1minus.cc \ float/lfloat/elem/cl_LF_1plus.cc \ float/lfloat/elem/cl_LF_2minus.cc \ float/lfloat/elem/cl_LF_2plus.cc \ float/lfloat/elem/cl_LF_I_div.cc \ float/lfloat/elem/cl_LF_I_mul.cc \ float/lfloat/elem/cl_LF_RA_div.cc \ float/lfloat/elem/cl_LF_RA_mul.cc \ float/lfloat/elem/cl_LF_compare.cc \ float/lfloat/elem/cl_LF_div.cc \ float/lfloat/elem/cl_LF_ffloor.cc \ float/lfloat/elem/cl_LF_from_I.cc \ float/lfloat/elem/cl_LF_from_RA.cc \ float/lfloat/elem/cl_LF_fround.cc \ float/lfloat/elem/cl_LF_ftrunc.cc \ float/lfloat/elem/cl_LF_futrunc.cc \ float/lfloat/elem/cl_LF_globals.cc \ float/lfloat/elem/cl_LF_minus1.cc \ float/lfloat/elem/cl_LF_minusp.cc \ float/lfloat/elem/cl_LF_mul.cc \ float/lfloat/elem/cl_LF_plus1.cc \ float/lfloat/elem/cl_LF_plusp.cc \ float/lfloat/elem/cl_LF_scale.cc \ float/lfloat/elem/cl_LF_scale_I.cc \ float/lfloat/elem/cl_LF_square.cc \ float/lfloat/elem/cl_LF_to_I.cc \ float/lfloat/elem/cl_LF_uminus.cc \ float/lfloat/elem/cl_LF_zerop.cc \ float/lfloat/elem/cl_RA_LF_div.cc \ float/lfloat/input/cl_LF_from_string.cc \ float/lfloat/misc/cl_LF_abs.cc \ float/lfloat/misc/cl_LF_as.cc \ float/lfloat/misc/cl_LF_class.cc \ float/lfloat/misc/cl_LF_debug.cc \ float/lfloat/misc/cl_LF_decode.cc \ float/lfloat/misc/cl_LF_digits.cc \ float/lfloat/misc/cl_LF_eqhashcode.cc \ float/lfloat/misc/cl_LF_exponent.cc \ float/lfloat/misc/cl_LF_extend.cc \ float/lfloat/misc/cl_LF_idecode.cc \ float/lfloat/misc/cl_LF_leninc.cc \ float/lfloat/misc/cl_LF_lenincx.cc \ float/lfloat/misc/cl_LF_max.cc \ float/lfloat/misc/cl_LF_min.cc \ float/lfloat/misc/cl_LF_precision.cc \ float/lfloat/misc/cl_LF_shorten.cc \ float/lfloat/misc/cl_LF_shortenrel.cc \ float/lfloat/misc/cl_LF_shortenwith.cc \ float/lfloat/misc/cl_LF_sign.cc \ float/lfloat/misc/cl_LF_signum.cc \ float/lfloat/misc/cl_LF_to_LF.cc \ float/misc/cl_F_abs.cc \ float/misc/cl_F_as.cc \ float/misc/cl_F_decode.cc \ float/misc/cl_F_digits.cc \ float/misc/cl_F_epsneg.cc \ float/misc/cl_F_epspos.cc \ float/misc/cl_F_eqhashcode.cc \ float/misc/cl_F_exponent.cc \ float/misc/cl_F_extendsqrt.cc \ float/misc/cl_F_extendsqrtx.cc \ float/misc/cl_F_idecode.cc \ float/misc/cl_F_leastneg.cc \ float/misc/cl_F_leastpos.cc \ float/misc/cl_F_max.cc \ float/misc/cl_F_min.cc \ float/misc/cl_F_mostneg.cc \ float/misc/cl_F_mostpos.cc \ float/misc/cl_F_precision.cc \ float/misc/cl_F_rational.cc \ float/misc/cl_F_shortenrel.cc \ float/misc/cl_F_sign.cc \ float/misc/cl_F_sign2.cc \ float/misc/cl_F_signum.cc \ float/misc/cl_float_format.cc \ float/output/cl_F_aprint.cc \ float/output/cl_F_bprint.cc \ float/output/cl_F_cprint.cc \ float/output/cl_F_dprint.cc \ float/output/cl_F_printb.cc \ float/random/cl_F_random.cc \ float/sfloat/algebraic/cl_SF_sqrt.cc \ float/sfloat/cl_SF.h \ float/sfloat/division/cl_SF_ceil22.cc \ float/sfloat/division/cl_SF_fceil.cc \ float/sfloat/division/cl_SF_ffloor.cc \ float/sfloat/division/cl_SF_floor22.cc \ float/sfloat/division/cl_SF_recip.cc \ float/sfloat/division/cl_SF_round22.cc \ float/sfloat/division/cl_SF_trunc22.cc \ float/sfloat/elem/cl_SF_compare.cc \ float/sfloat/elem/cl_SF_div.cc \ float/sfloat/elem/cl_SF_from_I.cc \ float/sfloat/elem/cl_SF_from_RA.cc \ float/sfloat/elem/cl_SF_fround.cc \ float/sfloat/elem/cl_SF_ftrunc.cc \ float/sfloat/elem/cl_SF_futrunc.cc \ float/sfloat/elem/cl_SF_minus.cc \ float/sfloat/elem/cl_SF_minusp.cc \ float/sfloat/elem/cl_SF_mul.cc \ float/sfloat/elem/cl_SF_plus.cc \ float/sfloat/elem/cl_SF_plusp.cc \ float/sfloat/elem/cl_SF_scale.cc \ float/sfloat/elem/cl_SF_scale_I.cc \ float/sfloat/elem/cl_SF_to_I.cc \ float/sfloat/elem/cl_SF_uminus.cc \ float/sfloat/elem/cl_SF_zerop.cc \ float/sfloat/input/cl_SF_from_string.cc \ float/sfloat/misc/cl_SF_abs.cc \ float/sfloat/misc/cl_SF_as.cc \ float/sfloat/misc/cl_SF_class.cc \ float/sfloat/misc/cl_SF_debug.cc \ float/sfloat/misc/cl_SF_decode.cc \ float/sfloat/misc/cl_SF_digits.cc \ float/sfloat/misc/cl_SF_eqhashcode.cc \ float/sfloat/misc/cl_SF_exponent.cc \ float/sfloat/misc/cl_SF_idecode.cc \ float/sfloat/misc/cl_SF_max.cc \ float/sfloat/misc/cl_SF_min.cc \ float/sfloat/misc/cl_SF_precision.cc \ float/sfloat/misc/cl_SF_sign.cc \ float/sfloat/misc/cl_SF_signum.cc \ float/transcendental/Makefile.devel \ float/transcendental/cl_F_atanhx.cc \ float/transcendental/cl_F_atanx.cc \ float/transcendental/cl_F_catalanconst.cc \ float/transcendental/cl_F_catalanconst_def.cc \ float/transcendental/cl_F_catalanconst_f.cc \ float/transcendental/cl_F_catalanconst_var.cc \ float/transcendental/cl_F_catalanconst_var.h \ float/transcendental/cl_F_cos.cc \ float/transcendental/cl_F_cosh.cc \ float/transcendental/cl_F_coshsinh.cc \ float/transcendental/cl_F_cossin.cc \ float/transcendental/cl_F_eulerconst.cc \ float/transcendental/cl_F_eulerconst_def.cc \ float/transcendental/cl_F_eulerconst_f.cc \ float/transcendental/cl_F_eulerconst_var.cc \ float/transcendental/cl_F_eulerconst_var.h \ float/transcendental/cl_F_exp.cc \ float/transcendental/cl_F_exp1.cc \ float/transcendental/cl_F_exp1_def.cc \ float/transcendental/cl_F_exp1_f.cc \ float/transcendental/cl_F_exp1_var.cc \ float/transcendental/cl_F_exp1_var.h \ float/transcendental/cl_F_expx.cc \ float/transcendental/cl_F_ln.cc \ float/transcendental/cl_F_ln10.cc \ float/transcendental/cl_F_ln10_f.cc \ float/transcendental/cl_F_ln10_var.cc \ float/transcendental/cl_F_ln10_var.h \ float/transcendental/cl_F_ln2.cc \ float/transcendental/cl_F_ln2_f.cc \ float/transcendental/cl_F_ln2_var.cc \ float/transcendental/cl_F_ln2_var.h \ float/transcendental/cl_F_lnx.cc \ float/transcendental/cl_F_pi.cc \ float/transcendental/cl_F_pi_def.cc \ float/transcendental/cl_F_pi_f.cc \ float/transcendental/cl_F_pi_var.cc \ float/transcendental/cl_F_pi_var.h \ float/transcendental/cl_F_roundpi.cc \ float/transcendental/cl_F_roundpi2.cc \ float/transcendental/cl_F_sin.cc \ float/transcendental/cl_F_sinh.cc \ float/transcendental/cl_F_sinhx.cc \ float/transcendental/cl_F_sinx.cc \ float/transcendental/cl_F_tan.cc \ float/transcendental/cl_F_tanh.cc \ float/transcendental/cl_F_tran.h \ float/transcendental/cl_F_zeta_int.cc \ float/transcendental/cl_F_zeta_int_def.cc \ float/transcendental/cl_F_zeta_int_f.cc \ float/transcendental/cl_LF_atan_recip.cc \ float/transcendental/cl_LF_atanh_recip.cc \ float/transcendental/cl_LF_catalanconst.cc \ float/transcendental/cl_LF_coshsinh.cc \ float/transcendental/cl_LF_coshsinh_aux.cc \ float/transcendental/cl_LF_cossin.cc \ float/transcendental/cl_LF_cossin_aux.cc \ float/transcendental/cl_LF_eulerconst.cc \ float/transcendental/cl_LF_exp1.cc \ float/transcendental/cl_LF_exp_aux.cc \ float/transcendental/cl_LF_ln10.cc \ float/transcendental/cl_LF_ln2.cc \ float/transcendental/cl_LF_pi.cc \ float/transcendental/cl_LF_ratseries_.cc \ float/transcendental/cl_LF_ratseries_a.cc \ float/transcendental/cl_LF_ratseries_ab.cc \ float/transcendental/cl_LF_ratseries_b.cc \ float/transcendental/cl_LF_ratseries_p.cc \ float/transcendental/cl_LF_ratseries_pa.cc \ float/transcendental/cl_LF_ratseries_pab.cc \ float/transcendental/cl_LF_ratseries_pb.cc \ float/transcendental/cl_LF_ratseries_pq.cc \ float/transcendental/cl_LF_ratseries_pqa.cc \ float/transcendental/cl_LF_ratseries_pqab.cc \ float/transcendental/cl_LF_ratseries_pqb.cc \ float/transcendental/cl_LF_ratseries_q.cc \ float/transcendental/cl_LF_ratseries_qa.cc \ float/transcendental/cl_LF_ratseries_qab.cc \ float/transcendental/cl_LF_ratseries_qb.cc \ float/transcendental/cl_LF_ratsumseries_pqcd.cc \ float/transcendental/cl_LF_ratsumseries_pqcd_aux.cc \ float/transcendental/cl_LF_ratsumseries_pqd.cc \ float/transcendental/cl_LF_ratsumseries_pqd_aux.cc \ float/transcendental/cl_LF_tran.h \ float/transcendental/cl_LF_zeta3.cc \ float/transcendental/cl_LF_zeta_int.cc \ integer/2adic/cl_I_2adic_div.cc \ integer/2adic/cl_I_2adic_recip.cc \ integer/algebraic/cl_I_rootp.cc \ integer/algebraic/cl_I_rootp_I.cc \ integer/algebraic/cl_I_rootp_aux.cc \ integer/algebraic/cl_I_sqrt.cc \ integer/algebraic/cl_I_sqrtp.cc \ integer/bitwise/cl_I_ash.cc \ integer/bitwise/cl_I_ash_I.cc \ integer/bitwise/cl_I_ash_exception.cc \ integer/bitwise/cl_I_boole.cc \ integer/bitwise/cl_I_byte.h \ integer/bitwise/cl_I_dpb.cc \ integer/bitwise/cl_I_dpf.cc \ integer/bitwise/cl_I_fullbyte.cc \ integer/bitwise/cl_I_ilength.cc \ integer/bitwise/cl_I_ldb.cc \ integer/bitwise/cl_I_ldbtest.cc \ integer/bitwise/cl_I_ldbx.cc \ integer/bitwise/cl_I_ldbxtest.cc \ integer/bitwise/cl_I_log.h \ integer/bitwise/cl_I_log_aux.cc \ integer/bitwise/cl_I_logand.cc \ integer/bitwise/cl_I_logandc2.cc \ integer/bitwise/cl_I_logbitp.cc \ integer/bitwise/cl_I_logbitp_I.cc \ integer/bitwise/cl_I_logcount.cc \ integer/bitwise/cl_I_logeqv.cc \ integer/bitwise/cl_I_logior.cc \ integer/bitwise/cl_I_lognand.cc \ integer/bitwise/cl_I_lognor.cc \ integer/bitwise/cl_I_lognot.cc \ integer/bitwise/cl_I_logorc2.cc \ integer/bitwise/cl_I_logtest.cc \ integer/bitwise/cl_I_logxor.cc \ integer/bitwise/cl_I_mkf.cc \ integer/bitwise/cl_I_mkfx.cc \ integer/cl_I.h \ integer/conv/cl_I_cached_power.cc \ integer/conv/cl_I_cached_power.h \ integer/conv/cl_I_digits_need.cc \ integer/conv/cl_I_from_DS.cc \ integer/conv/cl_I_from_L.cc \ integer/conv/cl_I_from_L2.cc \ integer/conv/cl_I_from_NDS.cc \ integer/conv/cl_I_from_NUDS.cc \ integer/conv/cl_I_from_Q.cc \ integer/conv/cl_I_from_Q2.cc \ integer/conv/cl_I_from_UDS.cc \ integer/conv/cl_I_from_UL.cc \ integer/conv/cl_I_from_UL2.cc \ integer/conv/cl_I_from_UQ.cc \ integer/conv/cl_I_from_digits.cc \ integer/conv/cl_I_mul10plus.cc \ integer/conv/cl_I_to_L.cc \ integer/conv/cl_I_to_Q.cc \ integer/conv/cl_I_to_UL.cc \ integer/conv/cl_I_to_UQ.cc \ integer/conv/cl_I_to_digits.cc \ integer/division/cl_I_ceil1.cc \ integer/division/cl_I_ceil2.cc \ integer/division/cl_I_exquo.cc \ integer/division/cl_I_exquo_exception.cc \ integer/division/cl_I_exquopos.cc \ integer/division/cl_I_floor1.cc \ integer/division/cl_I_floor2.cc \ integer/division/cl_I_mod.cc \ integer/division/cl_I_rem.cc \ integer/division/cl_I_round1.cc \ integer/division/cl_I_round2.cc \ integer/division/cl_I_trunc1.cc \ integer/division/cl_I_trunc2.cc \ integer/elem/cl_I_compare.cc \ integer/elem/cl_I_div.cc \ integer/elem/cl_I_equal.cc \ integer/elem/cl_I_minus.cc \ integer/elem/cl_I_minus1.cc \ integer/elem/cl_I_minusp.cc \ integer/elem/cl_I_mul.cc \ integer/elem/cl_I_plus.cc \ integer/elem/cl_I_plus1.cc \ integer/elem/cl_I_plusp.cc \ integer/elem/cl_I_square.cc \ integer/elem/cl_I_uminus.cc \ integer/elem/cl_I_zerop.cc \ integer/gcd/cl_I_gcd.cc \ integer/gcd/cl_I_gcd_aux.cc \ integer/gcd/cl_I_gcd_aux2.cc \ integer/gcd/cl_I_lcm.cc \ integer/gcd/cl_I_xgcd.cc \ integer/gcd/cl_low_gcd.cc \ integer/hash/cl_I_hash_gcobject.cc \ integer/hash/cl_I_hash_gcobject.h \ integer/hash/cl_I_hash_gcpointer.cc \ integer/hash/cl_I_hash_gcpointer.h \ integer/hash/cl_I_hash_pointer.cc \ integer/hash/cl_I_hash_pointer.h \ integer/hash/cl_I_hash_rcobject.cc \ integer/hash/cl_I_hash_rcobject.h \ integer/hash/cl_I_hash_rcpointer.cc \ integer/hash/cl_I_hash_rcpointer.h \ integer/hash/cl_I_hashcode.cc \ integer/hash/cl_I_hashweak_rcpointer.cc \ integer/hash/cl_I_hashweak_rcpointer.h \ integer/input/cl_I_from_string.cc \ integer/input/cl_I_read.cc \ integer/input/cl_I_read_stream.cc \ integer/input/cl_I_readparsed.cc \ integer/misc/cl_BN_class.cc \ integer/misc/cl_FN_class.cc \ integer/misc/cl_I_abs.cc \ integer/misc/cl_I_as.cc \ integer/misc/cl_I_debug.cc \ integer/misc/cl_I_eqhashcode.cc \ integer/misc/cl_I_exptpos.cc \ integer/misc/cl_I_exptpos_I.cc \ integer/misc/cl_I_max.cc \ integer/misc/cl_I_min.cc \ integer/misc/cl_I_oddp.cc \ integer/misc/cl_I_ord2.cc \ integer/misc/cl_I_power2p.cc \ integer/misc/cl_I_signum.cc \ integer/misc/combin/cl_I_binomial.cc \ integer/misc/combin/cl_I_combin.h \ integer/misc/combin/cl_I_doublefactorial.cc \ integer/misc/combin/cl_I_factorial.cc \ integer/misc/combin/cl_I_factorial_aux.cc \ integer/output/cl_I_aprint.cc \ integer/output/cl_I_bprint.cc \ integer/output/cl_I_cprint.cc \ integer/output/cl_I_decstring.cc \ integer/output/cl_I_dprint.cc \ integer/output/cl_I_print.cc \ integer/output/cl_I_print_string.cc \ integer/random/cl_I_random.cc \ integer/random/cl_I_trandom.cc \ integer/ring/cl_0_ring.cc \ integer/ring/cl_I_ring.cc \ modinteger/cl_MI.cc \ modinteger/cl_MI.h \ modinteger/cl_MI_cond_composite.cc \ modinteger/cl_MI_debug.cc \ modinteger/cl_MI_err_comp.cc \ modinteger/cl_MI_fix16.h \ modinteger/cl_MI_fix29.h \ modinteger/cl_MI_fix32.h \ modinteger/cl_MI_int.h \ modinteger/cl_MI_int32.h \ modinteger/cl_MI_lshift.cc \ modinteger/cl_MI_montgom.h \ modinteger/cl_MI_pow2.h \ modinteger/cl_MI_pow2m1.h \ modinteger/cl_MI_pow2p1.h \ modinteger/cl_MI_rshift.cc \ modinteger/cl_MI_std.h \ numtheory/cl_IF.h \ numtheory/cl_IF_millerrabin.cc \ numtheory/cl_IF_smallprimes.cc \ numtheory/cl_IF_trialdiv.cc \ numtheory/cl_IF_trialdiv1.cc \ numtheory/cl_IF_trialdiv2.cc \ numtheory/cl_nt_cornacchia1.cc \ numtheory/cl_nt_cornacchia4.cc \ numtheory/cl_nt_isprobprime.cc \ numtheory/cl_nt_jacobi.cc \ numtheory/cl_nt_jacobi_low.cc \ numtheory/cl_nt_nextprobprime.cc \ numtheory/cl_nt_sqrtmodp.cc \ polynomial/cl_UP.h \ polynomial/elem/cl_UP.cc \ polynomial/elem/cl_UP_GF2.h \ polynomial/elem/cl_UP_MI.h \ polynomial/elem/cl_UP_gen.h \ polynomial/elem/cl_UP_named.cc \ polynomial/elem/cl_UP_no_ring.cc \ polynomial/elem/cl_UP_number.h \ polynomial/elem/cl_UP_unnamed.cc \ polynomial/misc/cl_UP_I_hermite.cc \ polynomial/misc/cl_UP_I_laguerre.cc \ polynomial/misc/cl_UP_I_tchebychev.cc \ polynomial/misc/cl_UP_RA_legendre.cc \ polynomial/misc/cl_UP_debug.cc \ polynomial/misc/cl_UP_deriv.cc \ rational/algebraic/cl_RA_rootp.cc \ rational/algebraic/cl_RA_rootp_I.cc \ rational/algebraic/cl_RA_sqrtp.cc \ rational/cl_RA.h \ rational/division/cl_RA_ceil1.cc \ rational/division/cl_RA_ceil12.cc \ rational/division/cl_RA_ceil2.cc \ rational/division/cl_RA_ceil22.cc \ rational/division/cl_RA_floor1.cc \ rational/division/cl_RA_floor12.cc \ rational/division/cl_RA_floor2.cc \ rational/division/cl_RA_floor22.cc \ rational/division/cl_RA_round1.cc \ rational/division/cl_RA_round12.cc \ rational/division/cl_RA_round2.cc \ rational/division/cl_RA_round22.cc \ rational/division/cl_RA_trunc1.cc \ rational/division/cl_RA_trunc12.cc \ rational/division/cl_RA_trunc2.cc \ rational/division/cl_RA_trunc22.cc \ rational/elem/cl_RA_compare.cc \ rational/elem/cl_RA_denominator.cc \ rational/elem/cl_RA_div.cc \ rational/elem/cl_RA_equal.cc \ rational/elem/cl_RA_from_I_I_div.cc \ rational/elem/cl_RA_from_I_posI.cc \ rational/elem/cl_RA_from_I_posI1.cc \ rational/elem/cl_RA_from_I_posI_div.cc \ rational/elem/cl_RA_minus.cc \ rational/elem/cl_RA_minus1.cc \ rational/elem/cl_RA_minusp.cc \ rational/elem/cl_RA_mul.cc \ rational/elem/cl_RA_numerator.cc \ rational/elem/cl_RA_plus.cc \ rational/elem/cl_RA_plus1.cc \ rational/elem/cl_RA_plusp.cc \ rational/elem/cl_RA_recip.cc \ rational/elem/cl_RA_square.cc \ rational/elem/cl_RA_uminus.cc \ rational/elem/cl_RA_zerop.cc \ rational/input/cl_RA_from_string.cc \ rational/input/cl_RA_read.cc \ rational/input/cl_RA_read_stream.cc \ rational/input/cl_RA_readparsed.cc \ rational/misc/cl_RA_abs.cc \ rational/misc/cl_RA_as.cc \ rational/misc/cl_RA_class.cc \ rational/misc/cl_RA_debug.cc \ rational/misc/cl_RA_eqhashcode.cc \ rational/misc/cl_RA_expt.cc \ rational/misc/cl_RA_expt_I.cc \ rational/misc/cl_RA_exptpos.cc \ rational/misc/cl_RA_exptpos_I.cc \ rational/misc/cl_RA_max.cc \ rational/misc/cl_RA_min.cc \ rational/misc/cl_RA_signum.cc \ rational/output/cl_RA_aprint.cc \ rational/output/cl_RA_bprint.cc \ rational/output/cl_RA_cprint.cc \ rational/output/cl_RA_dprint.cc \ rational/output/cl_RA_print.cc \ rational/ring/cl_RA_ring.cc \ rational/transcendental/cl_I_logp.cc \ rational/transcendental/cl_RA_logp.cc \ real/algebraic/cl_RA_sqrt.cc \ real/algebraic/cl_R_sqrt.cc \ real/cl_R.h \ real/conv/cl_F_from_R.cc \ real/conv/cl_F_from_R_def.cc \ real/conv/cl_F_from_R_f.cc \ real/conv/cl_R_to_DF.cc \ real/conv/cl_R_to_FF.cc \ real/conv/cl_R_to_LF.cc \ real/conv/cl_R_to_SF.cc \ real/conv/cl_R_to_double.cc \ real/conv/cl_R_to_float.cc \ real/division/cl_R_ceil1.cc \ real/division/cl_R_ceil12.cc \ real/division/cl_R_ceil2.cc \ real/division/cl_R_ceil22.cc \ real/division/cl_R_div_t.h \ real/division/cl_R_fceil1.cc \ real/division/cl_R_fceil12.cc \ real/division/cl_R_fceil2.cc \ real/division/cl_R_fceil22.cc \ real/division/cl_R_ffloor1.cc \ real/division/cl_R_ffloor12.cc \ real/division/cl_R_ffloor2.cc \ real/division/cl_R_ffloor22.cc \ real/division/cl_R_floor1.cc \ real/division/cl_R_floor12.cc \ real/division/cl_R_floor2.cc \ real/division/cl_R_floor22.cc \ real/division/cl_R_fround1.cc \ real/division/cl_R_fround12.cc \ real/division/cl_R_fround2.cc \ real/division/cl_R_fround22.cc \ real/division/cl_R_ftrunc1.cc \ real/division/cl_R_ftrunc12.cc \ real/division/cl_R_ftrunc2.cc \ real/division/cl_R_ftrunc22.cc \ real/division/cl_R_mod.cc \ real/division/cl_R_rem.cc \ real/division/cl_R_round1.cc \ real/division/cl_R_round12.cc \ real/division/cl_R_round2.cc \ real/division/cl_R_round22.cc \ real/division/cl_R_trunc1.cc \ real/division/cl_R_trunc12.cc \ real/division/cl_R_trunc2.cc \ real/division/cl_R_trunc22.cc \ real/elem/cl_R_compare.cc \ real/elem/cl_R_div.cc \ real/elem/cl_R_equal.cc \ real/elem/cl_R_minus.cc \ real/elem/cl_R_minus1.cc \ real/elem/cl_R_minusp.cc \ real/elem/cl_R_mul.cc \ real/elem/cl_R_plus.cc \ real/elem/cl_R_plus1.cc \ real/elem/cl_R_plusp.cc \ real/elem/cl_R_recip.cc \ real/elem/cl_R_square.cc \ real/elem/cl_R_uminus.cc \ real/elem/cl_R_zerop.cc \ real/format-output/TODO-format \ real/format-output/cl_fmt_cardinal.cc \ real/format-output/cl_fmt_floatstring.cc \ real/format-output/cl_fmt_integer.cc \ real/format-output/cl_fmt_newroman.cc \ real/format-output/cl_fmt_oldroman.cc \ real/format-output/cl_fmt_ordinal.cc \ real/format-output/cl_fmt_paddedstring.cc \ real/format-output/cl_fmt_scaleexp.cc \ real/format-output/cl_fmt_tens.cc \ real/format-output/cl_format.h \ real/input/cl_R_from_string.cc \ real/input/cl_R_read.cc \ real/input/cl_R_read_stream.cc \ real/misc/cl_R_abs.cc \ real/misc/cl_R_as.cc \ real/misc/cl_R_contagion.cc \ real/misc/cl_R_debug.cc \ real/misc/cl_R_eqhashcode.cc \ real/misc/cl_R_expt.cc \ real/misc/cl_R_expt_I.cc \ real/misc/cl_R_max.cc \ real/misc/cl_R_min.cc \ real/misc/cl_R_rational.cc \ real/misc/cl_R_rationalize.cc \ real/misc/cl_R_signum.cc \ real/output/cl_R_aprint.cc \ real/output/cl_R_bprint.cc \ real/output/cl_R_cprint.cc \ real/random/cl_R_random.cc \ real/ring/cl_R_ring.cc \ real/transcendental/cl_R_atan.cc \ real/transcendental/cl_R_atan2.cc \ real/transcendental/cl_R_cos.cc \ real/transcendental/cl_R_cosh.cc \ real/transcendental/cl_R_coshsinh.cc \ real/transcendental/cl_R_cossin.cc \ real/transcendental/cl_R_exp.cc \ real/transcendental/cl_R_ln.cc \ real/transcendental/cl_R_log.cc \ real/transcendental/cl_R_sin.cc \ real/transcendental/cl_R_sinh.cc \ real/transcendental/cl_R_tan.cc \ real/transcendental/cl_R_tanh.cc \ timing/cl_t_c1.cc \ timing/cl_t_c2.cc \ timing/cl_t_current.cc \ timing/cl_t_current2.cc \ timing/cl_t_d.cc \ timing/cl_t_dec.cc \ timing/cl_t_inc.cc \ timing/cl_t_minus.cc \ timing/cl_t_report.cc \ timing/cl_t_td_minus.cc \ timing/cl_t_td_plus.cc \ vector/cl_GV_I.cc \ vector/cl_GV_I_copy.cc \ vector/cl_GV_I_debug.cc \ vector/cl_GV_io.h \ vector/cl_GV_number.cc \ vector/cl_GV_number_copy.cc \ vector/cl_GV_number_debug.cc \ vector/cl_SV_copy.cc \ vector/cl_SV_io.h \ vector/cl_SV_number.cc \ vector/cl_SV_number_debug.cc \ vector/cl_SV_ringelt.cc \ vector/cl_SV_ringelt_debug.cc \ vector/output/cl_GV_number_aprint.cc \ vector/output/cl_SV_aprint.cc \ vector/output/cl_SV_number_aprint.cc nodist_libcln_la_SOURCES = \ base/digitseq/cl_asm.S \ polynomial/elem/cl_asm_GF2.S ASMFILES = \ base/digitseq/cl_asm_.cc \ base/digitseq/cl_asm_arm.h \ base/digitseq/cl_asm_arm_.cc \ base/digitseq/cl_asm_hppa.h \ base/digitseq/cl_asm_hppa_.cc \ base/digitseq/cl_asm_i386.h \ base/digitseq/cl_asm_i386_.cc \ base/digitseq/cl_asm_m68k.h \ base/digitseq/cl_asm_m68k_.cc \ base/digitseq/cl_asm_mips.h \ base/digitseq/cl_asm_mips_.cc \ base/digitseq/cl_asm_mipsel_.cc \ base/digitseq/cl_asm_sparc.h \ base/digitseq/cl_asm_sparc64.h \ base/digitseq/cl_asm_sparc64_.cc \ base/digitseq/cl_asm_sparc_.cc base/digitseq/cl_asm.S: $(ASMFILES) $(MKDIR_P) base/digitseq; cp $< $@ MORE_ASMFILES = \ polynomial/elem/cl_asm_GF2.cc \ polynomial/elem/cl_asm_sparc_GF2.cc polynomial/elem/cl_asm_GF2.S: $(MORE_ASMFILES) $(MKDIR_P) polynomial/elem; cp $< $@ EXTRA_DIST = $(ASMFILES) $(MORE_ASMFILES) DISTCLEANFILES = \ base/digitseq/cl_asm.S \ polynomial/elem/cl_asm_GF2.S